Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgurakgun committed Apr 20, 2024
1 parent e15c334 commit 25e9bc6
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/Conjure/Process/Streamlining.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ streamliningToStdout model = do
streamliners <- streamlining model

liftIO $ print $ prettyList prBraces ","
[ (showStr $ show i) <> ":" <+> prBraces (vcat
[ showStr (show i) <> ":" <+> prBraces (vcat
[ showStr "onVariable" <> ":" <+> showStr (show (pretty nm)) <> ","
, showStr "groups" <> ":" <+> prettyList prBrackets "," (map showStr groups) <> ","
, showStr "constraint" <> ":" <+> (showStr $ map whitespace $ show $ pretty cons)
, showStr "groups" <> ":" <+> prettyList prBrackets "," (map showStr (nub groups)) <> ","
, showStr "constraint" <> ":" <+> showStr (map whitespace $ show $ pretty cons)
])
| (i, (nm, (cons, groups))) <- zip allNats streamliners
]
Expand All @@ -53,16 +53,15 @@ streamlining ::
(?typeCheckerMode :: TypeCheckerMode) =>
Model -> m [(Name, Streamliner)]
streamlining model = do
concatForM (mStatements model) $ \ statement ->
case statement of
Declaration (FindOrGiven Find nm domain) -> do
let ref = Reference nm (Just (DeclNoRepr Find nm domain NoRegion))
streamliners <- streamlinersForSingleVariable ref
-- traceM $ show $ vcat [ "Streamliners for --" <+> pretty statement
-- , vcat [ nest 4 (vcat (pretty x : map pretty gs)) | (x,gs) <- streamliners ]
-- ]
return [ (nm, s) | s <- streamliners ]
_ -> noStreamliner
concatForM (mStatements model) $ \case
Declaration (FindOrGiven Find nm domain) -> do
let ref = Reference nm (Just (DeclNoRepr Find nm domain NoRegion))
streamliners <- streamlinersForSingleVariable ref
-- traceM $ show $ vcat [ "Streamliners for --" <+> pretty statement
-- , vcat [ nest 4 (vcat (pretty x : map pretty gs)) | (x,gs) <- streamliners ]
-- ]
return [ (nm, s) | s <- streamliners ]
_ -> noStreamliner


type StreamlinerGroup = String
Expand Down

0 comments on commit 25e9bc6

Please sign in to comment.