Fix haddock generation. #35

Merged
alanz merged 1 commits from dev into dev 2017-07-07 13:52:17 +02:00
4 changed files with 8 additions and 8 deletions

View File

@ -207,10 +207,10 @@ layoutExpr lexpr@(L _ expr) = docWrapNode lexpr $ case expr of
-- this case rather leads to some unfortunate layouting than to anything
-- useful; disabling for now. (it interfers with cols stuff.)
-- , docSetBaseY
-- $ docPar
-- - $ docPar
-- leftOperandDoc
-- ( docLines
-- $ (appListDocs <&> \(od, ed) -> docCols ColOpPrefix [appSep od, docSetBaseY ed])
-- - $ (appListDocs <&> \(od, ed) -> docCols ColOpPrefix [appSep od, docSetBaseY ed])
-- ++ [docCols ColOpPrefix [appSep opLastDoc, docSetBaseY expLastDoc]]
-- )
, docPar

View File

@ -130,11 +130,11 @@ layoutPat lpat@(L _ pat) = docWrapNode lpat $ case pat of
NPat llit@(L _ (OverLit olit _ _ _)) _ _ _ -> do
fmap Seq.singleton $ docWrapNode llit $ allocateNode $ overLitValBriDoc olit
-- #if MIN_VERSION_ghc(8,0,0)
-- if MIN_VERSION_ghc(8,0,0)
-- VarPat n -> return $ stringLayouter lpat $ lrdrNameToText n
-- #else
-- else
-- VarPat n -> return $ stringLayouter lpat $ rdrNameToText n
-- #endif
-- endif
_ -> fmap return $ briDocByExactInlineOnly "some unknown pattern" lpat
colsWrapPat :: Seq BriDocNumbered -> ToBriDocM BriDocNumbered

View File

@ -224,7 +224,7 @@ transformAlts briDoc =
++ ",lineCheck=" ++ show (lineCheck vs)
++ " " ++ show (toConstr bd)
#endif
id -- $ (fmap $ \x -> traceShow (briDocToDoc x) x)
id -- - $ (fmap $ \x -> traceShow (briDocToDoc x) x)
$ rec
$ fromMaybe (-- trace ("choosing last") $
List.last alts)
@ -262,7 +262,7 @@ transformAlts briDoc =
++ " " ++ show (toConstr bd)
tellDebugMess $ " " ++ show (Data.Maybe.mapMaybe (fmap fst) checkedOptions)
#endif
id -- $ (fmap $ \x -> traceShow (briDocToDoc x) x)
id -- - $ (fmap $ \x -> traceShow (briDocToDoc x) x)
$ rec
$ fromMaybe (-- trace ("choosing last") $
List.last alts)

View File

@ -119,7 +119,7 @@ customLayouterF anns layoutF =
occName = simpleLayouter . ("{OccName: "++) . (++"}") . OccName.occNameString
srcSpan :: GHC.SrcSpan -> NodeLayouter
srcSpan ss = simpleLayouter
-- $ "{"++ showSDoc_ (GHC.ppr ss)++"}"
-- - $ "{"++ showSDoc_ (GHC.ppr ss)++"}"
$ "{" ++ showGhc ss ++ "}"
located :: (Data b, Data loc) => GHC.GenLocated loc b -> NodeLayouter
located (GHC.L ss a) = runDataToLayouter layoutF $ A annStr a