mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-22 07:48:10 +03:00
Improve show instance for ABT
- Use precedence in Var case.
This commit is contained in:
parent
abe17a5b20
commit
4c3e52c2be
@ -698,7 +698,7 @@ subtract _ t1s t2s =
|
||||
instance (Show1 f, Show v) => Show (Term f v a) where
|
||||
-- annotations not shown
|
||||
showsPrec p (Term _ _ out) = case out of
|
||||
Var v -> \x -> "Var " ++ show v ++ x
|
||||
Var v -> showParen (p>=9) $ \x -> "Var " ++ show v ++ x
|
||||
Cycle body -> ("Cycle " ++) . showsPrec p body
|
||||
Abs v body -> showParen True $ (show v ++) . showString ". " . showsPrec p body
|
||||
Tm f -> showsPrec1 p f
|
||||
|
Loading…
Reference in New Issue
Block a user