Skip to content

Commit

Permalink
Make #1847 easier to debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Jan 18, 2023
1 parent 8a399ab commit 734470a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Language/Futhark/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ prettyExp _ (ProjectSection fields _ _) =
p name = "." <> pretty name
prettyExp _ (IndexSection idxs _ _) =
parens $ "." <> brackets (commasep (map pretty idxs))
prettyExp _ (Constr n cs _ _) = "#" <> pretty n <+> sep (map pretty cs)
prettyExp _ (Constr n cs t _) =
"#" <> pretty n <+> sep (map pretty cs) <> prettyInst t
prettyExp _ (Attr attr e _) =
prettyAttr attr </> prettyExp (-1) e
prettyExp i (AppExp e _) = prettyAppExp i e
Expand Down
4 changes: 2 additions & 2 deletions src/Language/Futhark/Traversals.hs
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ instance ASTMappable (ExpBase Info VName) where
<$> mapM (astMap tv) idxs
<*> traverse (mapOnPatType tv) t
<*> pure loc
astMap tv (Constr name es ts loc) =
Constr name <$> traverse (mapOnExp tv) es <*> traverse (mapOnPatType tv) ts <*> pure loc
astMap tv (Constr name es t loc) =
Constr name <$> traverse (mapOnExp tv) es <*> traverse (mapOnPatType tv) t <*> pure loc
astMap tv (Attr attr e loc) =
Attr attr <$> mapOnExp tv e <*> pure loc
astMap tv (AppExp e res) =
Expand Down

0 comments on commit 734470a

Please sign in to comment.