From 734470ae9d932dedd0481609c474f10bfa738043 Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Wed, 18 Jan 2023 08:36:54 +0100 Subject: [PATCH] Make #1847 easier to debug. --- src/Language/Futhark/Pretty.hs | 3 ++- src/Language/Futhark/Traversals.hs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Language/Futhark/Pretty.hs b/src/Language/Futhark/Pretty.hs index f53205f12e..99be6a3840 100644 --- a/src/Language/Futhark/Pretty.hs +++ b/src/Language/Futhark/Pretty.hs @@ -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 diff --git a/src/Language/Futhark/Traversals.hs b/src/Language/Futhark/Traversals.hs index 752e6c602f..d113f2f571 100644 --- a/src/Language/Futhark/Traversals.hs +++ b/src/Language/Futhark/Traversals.hs @@ -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) =