Add consistency between contsrained and unconstrained forall format
Constrained forall formats aligned the `.` to the left. Constrained formats aligned the `.` to the right. This change adds consistency between both formats.pull/66/head
parent
3bbf81baab
commit
de5f0401f3
|
@ -174,17 +174,17 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of
|
||||||
, docForceSingleline $ return $ typeDoc
|
, docForceSingleline $ return $ typeDoc
|
||||||
]
|
]
|
||||||
-- :: forall x
|
-- :: forall x
|
||||||
-- . x
|
-- . x
|
||||||
, docPar
|
, docPar
|
||||||
(docSeq $ docLit (Text.pack "forall") : tyVarDocLineList)
|
(docSeq $ docLit (Text.pack "forall") : tyVarDocLineList)
|
||||||
( docCols ColTyOpPrefix
|
( docCols ColTyOpPrefix
|
||||||
[ docWrapNodeRest ltype $ docLit $ Text.pack ". "
|
[ docWrapNodeRest ltype $ docLit $ Text.pack " . "
|
||||||
, maybeForceML $ return typeDoc
|
, maybeForceML $ return typeDoc
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
-- :: forall
|
-- :: forall
|
||||||
-- (x :: *)
|
-- (x :: *)
|
||||||
-- . x
|
-- . x
|
||||||
, docPar
|
, docPar
|
||||||
(docLit (Text.pack "forall"))
|
(docLit (Text.pack "forall"))
|
||||||
(docLines
|
(docLines
|
||||||
|
@ -204,7 +204,7 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
++[ docCols ColTyOpPrefix
|
++[ docCols ColTyOpPrefix
|
||||||
[ docWrapNodeRest ltype $ docLit $ Text.pack ". "
|
[ docWrapNodeRest ltype $ docLit $ Text.pack " . "
|
||||||
, maybeForceML $ return typeDoc
|
, maybeForceML $ return typeDoc
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -499,7 +499,7 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of
|
||||||
)
|
)
|
||||||
(docCols ColTyOpPrefix
|
(docCols ColTyOpPrefix
|
||||||
[ docWrapNodeRest ltype
|
[ docWrapNodeRest ltype
|
||||||
$ docLit $ Text.pack "::"
|
$ docLit $ Text.pack ":: "
|
||||||
, docAddBaseY (BrIndentSpecial 2) typeDoc1
|
, docAddBaseY (BrIndentSpecial 2) typeDoc1
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue