Minor cleanup, Add -rtsopts to unittests
parent
f96dceb74b
commit
58c2bfbcc8
|
@ -221,6 +221,7 @@ test-suite unittests
|
|||
-j
|
||||
-fno-warn-unused-imports
|
||||
-fno-warn-orphans
|
||||
-rtsopts
|
||||
-with-rtsopts "-M2G"
|
||||
}
|
||||
if flag(brittany-dev) {
|
||||
|
|
|
@ -230,76 +230,6 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of
|
|||
]
|
||||
)
|
||||
]
|
||||
-- HsQualTy (L _ cntxts) typ2 -> do
|
||||
-- layouter@(Layouter desc _ _) <- layoutType typ2
|
||||
-- cntxtLayouters <- cntxts `forM` layoutType
|
||||
-- let mLine =
|
||||
-- [ LayoutColumns ColumnKeyUnique [len] len
|
||||
-- | -- (A a, B b) =>
|
||||
-- -- 1 2 6
|
||||
-- constraintLen <- if null cntxts
|
||||
-- then return 0
|
||||
-- else ( sequence
|
||||
-- $ cntxtLayouters <&> _layouter_desc .> _ldesc_line)
|
||||
-- <&> \cols -> 5
|
||||
-- + 2 * length cols
|
||||
-- + sum (_lColumns_min <$> cols)
|
||||
-- , tyLen <- _lColumns_min <$> _ldesc_line desc
|
||||
-- , let len = constraintLen + tyLen
|
||||
-- ]
|
||||
-- let mBlock =
|
||||
-- [ BlockDesc
|
||||
-- { _bdesc_blockStart = AllSameIndent -- this might not be accurate,
|
||||
-- -- but it should simply not matter.
|
||||
-- -- *lazy*
|
||||
-- , _bdesc_min = minR
|
||||
-- , _bdesc_max = maxR
|
||||
-- , _bdesc_opIndentFloatUp = Nothing
|
||||
-- }
|
||||
-- | (tyMin, tyMax) <- descToMinMax 0 desc
|
||||
-- , constrMinMaxs <- sequence $ cntxtLayouters <&> _layouter_desc .> descToMinMax 0
|
||||
-- , let constrMin = constrMinMaxs <&> fst & maximum
|
||||
-- , let constrMax = constrMinMaxs <&> snd & maximum
|
||||
-- , let minR = 3 + maximum [constrMin, tyMin]
|
||||
-- , let maxR = 3 + maximum [constrMax, tyMax]
|
||||
-- ]
|
||||
-- return $ Layouter
|
||||
-- { _layouter_desc = LayoutDesc
|
||||
-- { _ldesc_line = mLine
|
||||
-- , _ldesc_block = mBlock
|
||||
-- }
|
||||
-- , _layouter_func = \params -> do
|
||||
-- layoutWritePriorCommentsRestore ltype
|
||||
-- remaining <- getCurRemaining
|
||||
-- case mLine of
|
||||
-- Just (LayoutColumns _ _ m) | m <= remaining -> do
|
||||
-- when (not $ null cntxts) $ do
|
||||
-- layoutWriteAppend $ Text.pack "("
|
||||
-- sequence_ $ intersperse (layoutWriteAppend $ Text.pack ", ")
|
||||
-- $ cntxtLayouters <&> \lay -> applyLayouterRestore lay defaultParams
|
||||
-- layoutWriteAppend $ Text.pack ") => "
|
||||
-- applyLayouterRestore layouter defaultParams
|
||||
-- _ -> do
|
||||
-- if null cntxts
|
||||
-- then do
|
||||
-- layoutWriteAppend $ Text.pack "()"
|
||||
-- else do
|
||||
-- layoutWithNonParamIndent params $ do
|
||||
-- layoutWriteAppend $ Text.pack "( "
|
||||
-- let iAct = do
|
||||
-- layoutWriteNewline
|
||||
-- layoutWriteAppend $ Text.pack ", "
|
||||
-- sequence_ $ intersperse iAct
|
||||
-- $ cntxtLayouters <&> \lay -> applyLayouter lay defaultParams
|
||||
-- layoutWriteNewline
|
||||
-- layoutWriteAppend $ Text.pack ")"
|
||||
-- layoutWriteNewline
|
||||
-- layoutWriteAppend $ Text.pack "=> "
|
||||
-- applyLayouterRestore layouter defaultParams
|
||||
-- { _params_opIndent = _params_opIndent params
|
||||
-- }
|
||||
-- , _layouter_ast = ltype
|
||||
-- }
|
||||
HsFunTy typ1 typ2 -> do
|
||||
typeDoc1 <- docSharedWrapper layoutType typ1
|
||||
typeDoc2 <- docSharedWrapper layoutType typ2
|
||||
|
|
Loading…
Reference in New Issue