rename BindName.name to .val

This commit is contained in:
rhiannon morris 2023-09-20 21:58:27 +02:00
parent 08fb686bf6
commit ee22486e97
4 changed files with 4 additions and 4 deletions

View File

@ -365,4 +365,4 @@ parameters {opts : LayoutOpts} {0 tm : Nat -> Type}
namespace BContext
export
toNames : BContext n -> SnocList BaseName
toNames = foldl (\xs, x => xs :< x.name) [<]
toNames = foldl (\xs, x => xs :< x.val) [<]

View File

@ -95,7 +95,7 @@ export FromString Name where fromString = fromPBaseName
public export
record BindName where
constructor BN
name : BaseName
val : BaseName
loc_ : Loc
%runElab derive "BindName" [Eq, Ord, Show]

View File

@ -219,7 +219,7 @@ prettyFree = hl Free . prettyName
export
prettyBind' : BindName -> Doc opts
prettyBind' = text . baseStr . name
prettyBind' = text . baseStr . val
export
prettyTBind : {opts : LayoutOpts} -> BindName -> Eff Pretty (Doc opts)

View File

@ -513,7 +513,7 @@ prettyElim dnames tnames (CaseNat qty qtyIH nat ret zero succ _) = do
[< p, ih] = succ.names
spat0 <- [|succD <++> prettyTBind p|]
ihpat0 <- map hcat $ sequence [prettyQty qtyIH, dotD, prettyTBind ih]
spat <- if ih.name == Unused
spat <- if ih.val == Unused
then pure spat0
else pure $ hsep [spat0 <+> !commaD, ihpat0]
let sarm = MkCaseArm spat [<] [< p, ih] succ.term