Skip to content

Commit

Permalink
Pretty-print Prop constructor PAnd using tuple-style syntax.
Browse files Browse the repository at this point in the history
This matches the syntax used for parsing type constraint synonyms.

Fixes #731.
  • Loading branch information
Brian Huffman committed May 19, 2020
1 parent 5c44ac6 commit e1fb6e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Cryptol/TypeCheck/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ instance PP (WithNames Type) where
(PFin, [t1]) -> optParens (prec > 3) $ text "fin" <+> (go 4 t1)
(PHas x, [t1,t2]) -> ppSelector x <+> text "of"
<+> go 0 t1 <+> text "is" <+> go 0 t2
(PAnd, [t1,t2]) -> parens (commaSep (map (go 0) (t1 : pSplitAnd t2)))

(_, _) -> optParens (prec > 3) $ pp pc <+> fsep (map (go 4) ts)

Expand Down

0 comments on commit e1fb6e9

Please sign in to comment.