@@ -40,7 +40,7 @@ lambda :: Context -> Doc -> Doc -> [Doc] -> Doc
40lambda context arg1 arg2 args =
40lambda context arg1 arg2 args =
42 lambdaDoc =
42 lambdaDoc =
43− D.sep (arg1 : map ("->" <+>) (arg2:args))
43+ D.align $ D.sep (arg1 : map ("->" <+>) (arg2:args))
45 case context of
45 case context of
46 None -> lambdaDoc
46 None -> lambdaDoc
@@ -71,7 +71,7 @@ tuple a b cs =
72 zipWith (<+>) ("(" : repeat ",") (a:b:cs)
72 zipWith (<+>) ("(" : repeat ",") (a:b:cs)
74− D.sep [ D.cat entries, ")" ]
74+ D.align $ D.sep [ D.cat entries, ")" ]
77record :: [(Doc, Doc)] -> Maybe Doc -> Doc
77record :: [(Doc, Doc)] -> Maybe Doc -> Doc
@@ -81,13 +81,13 @@ record entries maybeExt =
83 (fields, Nothing) ->
83 (fields, Nothing) ->
84− D.sep
84+ D.align $ D.sep $
85 [ D.cat (zipWith (<+>) ("{" : repeat ",") fields)
85 [ D.cat (zipWith (<+>) ("{" : repeat ",") fields)
89 (fields, Just ext) ->
89 (fields, Just ext) ->
90− D.sep
90+ D.align $ D.sep $
91 [ D.hang 4 $ D.sep $
91 [ D.hang 4 $ D.sep $
92 [ "{" <+> ext
92 [ "{" <+> ext
93 , D.cat (zipWith (<+>) ("|" : repeat ",") fields)
93 , D.cat (zipWith (<+>) ("|" : repeat ",") fields)