rename BindName.name to .val
This commit is contained in:
parent
08fb686bf6
commit
ee22486e97
4 changed files with 4 additions and 4 deletions
|
@ -365,4 +365,4 @@ parameters {opts : LayoutOpts} {0 tm : Nat -> Type}
|
||||||
namespace BContext
|
namespace BContext
|
||||||
export
|
export
|
||||||
toNames : BContext n -> SnocList BaseName
|
toNames : BContext n -> SnocList BaseName
|
||||||
toNames = foldl (\xs, x => xs :< x.name) [<]
|
toNames = foldl (\xs, x => xs :< x.val) [<]
|
||||||
|
|
|
@ -95,7 +95,7 @@ export FromString Name where fromString = fromPBaseName
|
||||||
public export
|
public export
|
||||||
record BindName where
|
record BindName where
|
||||||
constructor BN
|
constructor BN
|
||||||
name : BaseName
|
val : BaseName
|
||||||
loc_ : Loc
|
loc_ : Loc
|
||||||
%runElab derive "BindName" [Eq, Ord, Show]
|
%runElab derive "BindName" [Eq, Ord, Show]
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ prettyFree = hl Free . prettyName
|
||||||
|
|
||||||
export
|
export
|
||||||
prettyBind' : BindName -> Doc opts
|
prettyBind' : BindName -> Doc opts
|
||||||
prettyBind' = text . baseStr . name
|
prettyBind' = text . baseStr . val
|
||||||
|
|
||||||
export
|
export
|
||||||
prettyTBind : {opts : LayoutOpts} -> BindName -> Eff Pretty (Doc opts)
|
prettyTBind : {opts : LayoutOpts} -> BindName -> Eff Pretty (Doc opts)
|
||||||
|
|
|
@ -513,7 +513,7 @@ prettyElim dnames tnames (CaseNat qty qtyIH nat ret zero succ _) = do
|
||||||
[< p, ih] = succ.names
|
[< p, ih] = succ.names
|
||||||
spat0 <- [|succD <++> prettyTBind p|]
|
spat0 <- [|succD <++> prettyTBind p|]
|
||||||
ihpat0 <- map hcat $ sequence [prettyQty qtyIH, dotD, prettyTBind ih]
|
ihpat0 <- map hcat $ sequence [prettyQty qtyIH, dotD, prettyTBind ih]
|
||||||
spat <- if ih.name == Unused
|
spat <- if ih.val == Unused
|
||||||
then pure spat0
|
then pure spat0
|
||||||
else pure $ hsep [spat0 <+> !commaD, ihpat0]
|
else pure $ hsep [spat0 <+> !commaD, ihpat0]
|
||||||
let sarm = MkCaseArm spat [<] [< p, ih] succ.term
|
let sarm = MkCaseArm spat [<] [< p, ih] succ.term
|
||||||
|
|
Loading…
Reference in a new issue