mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-11 14:57:30 +03:00
Minor change to display of metavariables
Displaying things with machine generated names is really just noise, and potentially confusing since they're inaccessible and typically an artefact of the elaboration process, so hide them. (If this turns out to be differently confusing, we'll have to consider an option to display them. Maybe we should do that anyway.)
This commit is contained in:
parent
b54006872f
commit
18e4b21071
@ -711,8 +711,8 @@ checkPiGoal n
|
||||
= do g <- goal
|
||||
case g of
|
||||
Bind _ (Pi _ _ _) _ -> return ()
|
||||
_ -> do a <- getNameFrom (sMN 0 "pargTy")
|
||||
b <- getNameFrom (sMN 0 "pretTy")
|
||||
_ -> do a <- getNameFrom (sMN 0 "__pargTy")
|
||||
b <- getNameFrom (sMN 0 "__pretTy")
|
||||
f <- getNameFrom (sMN 0 "pf")
|
||||
claim a RType
|
||||
claim b RType
|
||||
@ -725,8 +725,8 @@ checkPiGoal n
|
||||
|
||||
simple_app :: Bool -> Elab' aux () -> Elab' aux () -> String -> Elab' aux ()
|
||||
simple_app infer fun arg str =
|
||||
do a <- getNameFrom (sMN 0 "argTy")
|
||||
b <- getNameFrom (sMN 0 "retTy")
|
||||
do a <- getNameFrom (sMN 0 "__argTy")
|
||||
b <- getNameFrom (sMN 0 "__retTy")
|
||||
f <- getNameFrom (sMN 0 "f")
|
||||
s <- getNameFrom (sMN 0 "s")
|
||||
claim a RType
|
||||
|
@ -942,12 +942,14 @@ process fn (Check (PRef _ _ n))
|
||||
putTy :: PPOption -> IState -> Int -> [(Name, Bool)] -> PTerm -> Doc OutputAnnotation
|
||||
putTy ppo ist 0 bnd sc = putGoal ppo ist bnd sc
|
||||
putTy ppo ist i bnd (PPi _ n _ t sc)
|
||||
= let current = text " " <>
|
||||
(case n of
|
||||
MN _ _ -> text "_"
|
||||
UN nm | ('_':'_':_) <- str nm -> text "_"
|
||||
_ -> bindingOf n False) <+>
|
||||
colon <+> align (tPretty bnd ist t) <> line
|
||||
= let current = case n of
|
||||
MN _ _ -> text ""
|
||||
UN nm | ('_':'_':_) <- str nm -> text ""
|
||||
_ -> text " " <>
|
||||
bindingOf n False
|
||||
<+> colon
|
||||
<+> align (tPretty bnd ist t)
|
||||
<> line
|
||||
in
|
||||
current <> putTy ppo ist (i-1) ((n,False):bnd) sc
|
||||
putTy ppo ist _ bnd sc = putGoal ppo ist ((n,False):bnd) sc
|
||||
|
Loading…
Reference in New Issue
Block a user