projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
890ca96
)
Improve error message in mkSelCase.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Tue, 13 Apr 2010 14:48:24 +0000
(16:48 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Tue, 13 Apr 2010 14:48:24 +0000
(16:48 +0200)
cλash/CLasH/Utils/Core/CoreTools.hs
patch
|
blob
|
history
diff --git
a/cλash/CLasH/Utils/Core/CoreTools.hs
b/cλash/CLasH/Utils/Core/CoreTools.hs
index 09595702570cfe8745e49ec8190c4afd6d3fe44b..ce42678a7683634edd4368351709384b8d777310 100644
(file)
--- a/
cλash/CLasH/Utils/Core/CoreTools.hs
+++ b/
cλash/CLasH/Utils/Core/CoreTools.hs
@@
-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)