Tweak: get the types on value declarations printing right.

This commit is contained in:
2016-07-17 12:39:00 -07:00
parent 15b4059163
commit c542476365

View File

@@ -74,8 +74,8 @@ ppValueDeclaration vd = frees $+$ typedecl $+$ valuedecl
text "free value variables: " <+> text "free value variables: " <+>
braces (hsep (punctuate comma (map ppName (_vdFreeValueVariables vd)))) braces (hsep (punctuate comma (map ppName (_vdFreeValueVariables vd))))
typedecl typedecl
| Just dt <- _vdDeclaredType vd = | Just t <- _vdDeclaredType vd =
ppTypeDeclaration (TypeDeclaration (_vdName vd) (_vdLocation vd) dt) ppName (_vdName vd) <+> text "::" <+> ppType t
| otherwise = empty | otherwise = empty
valuedecl = ppName (_vdName vd) <+> text "=" <+> ppExpression (_vdValue vd) valuedecl = ppName (_vdName vd) <+> text "=" <+> ppExpression (_vdValue vd)