Add whitespace around operator in section, Fixes #67

pull/75/head
Lennart Spitzner 2017-11-28 17:56:28 +01:00
parent fdd2f5f6dc
commit 6a97379b33
3 changed files with 14 additions and 11 deletions

View File

@ -467,7 +467,6 @@ func = (1+)
func = (+ 1) func = (+ 1)
#test left inf #test left inf
## TODO: this could be improved..
func = (1 `abc`) func = (1 `abc`)
#test right inf #test right inf

View File

@ -486,3 +486,7 @@ func
-> Proxy (str :: [*]) -> Proxy (str :: [*])
-> m (Tagged str String) -> m (Tagged str String)
#test issue 67
fmapuv :: U.Unbox a => (a -> b) -> U.Vector a -> V.Vector b
fmapuv f xs = G.generate (G.length xs) (f . (xs G.!))

View File

@ -321,11 +321,11 @@ layoutExpr lexpr@(L _ expr) = docWrapNode lexpr $ case expr of
SectionL left op -> do -- TODO: add to testsuite SectionL left op -> do -- TODO: add to testsuite
leftDoc <- docSharedWrapper layoutExpr left leftDoc <- docSharedWrapper layoutExpr left
opDoc <- docSharedWrapper layoutExpr op opDoc <- docSharedWrapper layoutExpr op
docSeq [leftDoc, opDoc] docSeq [leftDoc, docSeparator, opDoc]
SectionR op right -> do -- TODO: add to testsuite SectionR op right -> do -- TODO: add to testsuite
opDoc <- docSharedWrapper layoutExpr op opDoc <- docSharedWrapper layoutExpr op
rightDoc <- docSharedWrapper layoutExpr right rightDoc <- docSharedWrapper layoutExpr right
docSeq [opDoc, rightDoc] docSeq [opDoc, docSeparator, rightDoc]
ExplicitTuple args boxity ExplicitTuple args boxity
| Just argExprs <- args `forM` (\case (L _ (Present e)) -> Just e; _ -> Nothing) -> do | Just argExprs <- args `forM` (\case (L _ (Present e)) -> Just e; _ -> Nothing) -> do
argDocs <- docSharedWrapper layoutExpr `mapM` argExprs argDocs <- docSharedWrapper layoutExpr `mapM` argExprs