Add one source doc

pull/222/head^2
Lennart Spitzner 2019-06-05 15:56:32 +02:00
parent bd8b743e36
commit ca3c8b6f9e
1 changed files with 9 additions and 0 deletions

View File

@ -960,8 +960,17 @@ layoutLhsAndType
layoutLhsAndType hasComments lhs sep typeDoc = do layoutLhsAndType hasComments lhs sep typeDoc = do
let sepDoc = appSep . docLit $ Text.pack sep let sepDoc = appSep . docLit $ Text.pack sep
runFilteredAlternative $ do runFilteredAlternative $ do
-- (separators probably are "=" or "::")
-- lhs = type
-- lhs :: type
addAlternativeCond (not hasComments) addAlternativeCond (not hasComments)
$ docSeq [lhs, sepDoc, docForceSingleline typeDoc] $ docSeq [lhs, sepDoc, docForceSingleline typeDoc]
-- lhs
-- :: typeA
-- -> typeB
-- lhs
-- = typeA
-- -> typeB
addAlternative $ docAddBaseY BrIndentRegular $ docPar lhs $ docCols addAlternative $ docAddBaseY BrIndentRegular $ docPar lhs $ docCols
ColTyOpPrefix ColTyOpPrefix
[sepDoc, docAddBaseY (BrIndentSpecial (length sep + 1)) typeDoc] [sepDoc, docAddBaseY (BrIndentSpecial (length sep + 1)) typeDoc]