always print the direction in coe/comp
This commit is contained in:
parent
f3f74d581a
commit
ba77c45c64
1 changed files with 7 additions and 14 deletions
|
@ -524,12 +524,7 @@ prettyElim dnames tnames (Ann tm ty _) =
|
||||||
!(withPrec Outer (prettyTerm dnames tnames ty))
|
!(withPrec Outer (prettyTerm dnames tnames ty))
|
||||||
|
|
||||||
prettyElim dnames tnames (Coe ty p q val _) =
|
prettyElim dnames tnames (Coe ty p q val _) =
|
||||||
parensIfM App =<<
|
parensIfM App =<< do
|
||||||
if isDefaultDir p q then do
|
|
||||||
ty <- prettyTypeLine dnames tnames ty
|
|
||||||
val <- prettyTArg dnames tnames val
|
|
||||||
prettyAppD !coeD [ty, val]
|
|
||||||
else do
|
|
||||||
ty <- prettyTypeLine dnames tnames ty
|
ty <- prettyTypeLine dnames tnames ty
|
||||||
p <- prettyDArg dnames p
|
p <- prettyDArg dnames p
|
||||||
q <- prettyDArg dnames q
|
q <- prettyDArg dnames q
|
||||||
|
@ -545,9 +540,7 @@ prettyElim dnames tnames e@(Comp ty p q val r zero one _) =
|
||||||
arm0 <- [|prettyCompArm dnames tnames Zero zero <+> semiD|]
|
arm0 <- [|prettyCompArm dnames tnames Zero zero <+> semiD|]
|
||||||
arm1 <- prettyCompArm dnames tnames One one
|
arm1 <- prettyCompArm dnames tnames One one
|
||||||
ind <- askAt INDENT
|
ind <- askAt INDENT
|
||||||
if isDefaultDir p q
|
layoutComp [ty, pq] val r [arm0, arm1]
|
||||||
then layoutComp [ty] val r [arm0, arm1]
|
|
||||||
else layoutComp [ty, pq] val r [arm0, arm1]
|
|
||||||
|
|
||||||
prettyElim dnames tnames (TypeCase ty ret arms def _) = do
|
prettyElim dnames tnames (TypeCase ty ret arms def _) = do
|
||||||
arms <- for (toList arms) $ \(k ** body) => do
|
arms <- for (toList arms) $ \(k ** body) => do
|
||||||
|
|
Loading…
Reference in a new issue