Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Sep 30, 2024
1 parent 3e37066 commit e1435b3
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ computePolarities tab defs topOccurrences =
where
addPolarity :: InductiveParam -> Polarity -> Sem r ()
addPolarity var p = do
modif <- ask
let new :: Polarity = p <> modif
modify (over (builderPolarities . at var) (Just . maybe new (new <>)))
unblock var new
newPol <- (p <>) <$> ask
modify (over (builderPolarities . at var) (Just . maybe newPol (newPol <>)))
unblock var newPol

unblock :: forall r. (Members '[State Builder] r) => InductiveParam -> Polarity -> Sem r ()
unblock p newPol = unblockGo
Expand Down Expand Up @@ -236,7 +235,7 @@ computePolarities tab defs topOccurrences =
AppInductive a -> goInductive a os

goAxiomArgs :: (Members '[State Builder, Reader Polarity] r) => [Occurrences] -> Sem r ()
goAxiomArgs os = local (const axiomPolarity) (mapM_ go os)
goAxiomArgs os = local (<> axiomPolarity) (mapM_ go os)

goVarArgs :: (Members '[State Builder, Reader Polarity] r) => [Occurrences] -> Sem r ()
goVarArgs os = local (const PolarityNonStrictlyPositive) (mapM_ go os)
Expand Down

0 comments on commit e1435b3

Please sign in to comment.