Improve error message in mkSelCase.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 13 Apr 2010 14:48:24 +0000 (16:48 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 13 Apr 2010 14:48:24 +0000 (16:48 +0200)
cλash/CLasH/Utils/Core/CoreTools.hs

index 09595702570cfe8745e49ec8190c4afd6d3fe44b..ce42678a7683634edd4368351709384b8d777310 100644 (file)
@@ -492,4 +492,4 @@ mkSelCase scrut i = do
         let binders = take i wildbndrs ++ [sel_bndr] ++ drop (i+1) wildbndrs
         return $ CoreSyn.Case scrut scrut_bndr scrut_ty [(CoreSyn.DataAlt datacon, binders, CoreSyn.Var sel_bndr)]
       dcs -> error $ "CoreTools.mkSelCase: Scrutinee type must have exactly one datacon. Extracting element " ++ (show i) ++ " from '" ++ pprString scrut ++ "' Datacons: " ++ (show dcs) ++ " Type: " ++ (pprString scrut_ty)
         let binders = take i wildbndrs ++ [sel_bndr] ++ drop (i+1) wildbndrs
         return $ CoreSyn.Case scrut scrut_bndr scrut_ty [(CoreSyn.DataAlt datacon, binders, CoreSyn.Var sel_bndr)]
       dcs -> error $ "CoreTools.mkSelCase: Scrutinee type must have exactly one datacon. Extracting element " ++ (show i) ++ " from '" ++ pprString scrut ++ "' Datacons: " ++ (show dcs) ++ " Type: " ++ (pprString scrut_ty)
-    Nothing -> error $ "CoreTools.mkSelCase: Creating extractor case, but scrutinee has no tycon? Extracting element " ++ (show i) ++ " from '" ++ pprString scrut ++ "'"
+    Nothing -> error $ "CoreTools.mkSelCase: Creating extractor case, but scrutinee has no tycon? Extracting element " ++ (show i) ++ " from '" ++ pprString scrut ++ "'" ++ " Type: " ++ (pprString scrut_ty)