automatically run ormolu

This commit is contained in:
pchiusano 2023-07-20 23:01:04 +00:00 committed by github-actions[bot]
parent 6d627d791c
commit 90ade2dcd1

View File

@ -173,8 +173,8 @@ data DocLiteralContext
-}
isBindingSoftHangable :: (Var v) => Term2 v at ap v a -> Bool
isBindingSoftHangable (isSoftHangable -> True) = True
isBindingSoftHangable :: (Var v) => Term2 v at ap v a -> Bool
isBindingSoftHangable (isSoftHangable -> True) = True
isBindingSoftHangable (Apps' _ (unsnoc -> Just (_, last))) = isSoftHangable last
isBindingSoftHangable _ = False
@ -185,14 +185,14 @@ pretty0 ::
Term3 v PrintAnnotation ->
m (Pretty SyntaxText)
pretty0 a tm | precedence a == -2 && not (isBindingSoftHangable tm) = do
-- precedence = -2 means this is a top level binding, and we allow
-- precedence = -2 means this is a top level binding, and we allow
-- use clause insertion here even when it otherwise wouldn't be
-- (as long as the tm isn't soft hangable, if it gets soft hung then
-- adding use clauses beforehand will mess things up)
tmp <- pretty0 (a { imports = im, precedence = -1 }) tm
tmp <- pretty0 (a {imports = im, precedence = -1}) tm
pure $ PP.lines (uses <> [tmp])
where
(im, uses) = calcImports (imports a) tm
(im, uses) = calcImports (imports a) tm
pretty0
a@AmbientContext
{ precedence = p,