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 (parent:
4583b2b
)
Don't mix up the i and dc_i variables.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 16 Jun 2010 09:18:15 +0000
(11:18 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 16 Jun 2010 09:18:15 +0000
(11:18 +0200)
clash/CLasH/Utils/Core/CoreTools.hs
patch
|
blob
|
history
diff --git
a/clash/CLasH/Utils/Core/CoreTools.hs
b/clash/CLasH/Utils/Core/CoreTools.hs
index a88bf47a8c2bbb926cfd69923a8c2b49d9d23795..c7bce65eeceabaa27b691ce929a8117014ff8e57 100644
(file)
--- a/
clash/CLasH/Utils/Core/CoreTools.hs
+++ b/
clash/CLasH/Utils/Core/CoreTools.hs
@@
-464,7
+464,7
@@
mkSelCase scrut dc_i i = do
Just (tycon, tyargs) -> case TyCon.tyConDataCons_maybe tycon of
-- The scrutinee type should have a single dataconstructor,
-- otherwise we can't construct a valid selector case.
Just (tycon, tyargs) -> case TyCon.tyConDataCons_maybe tycon of
-- The scrutinee type should have a single dataconstructor,
-- otherwise we can't construct a valid selector case.
- Just dcs |
i < 0 ||
i >= length dcs -> error $ "\nCoreTools.mkSelCase: Creating extractor case, but datacon index is invalid." ++ error_msg
+ Just dcs |
dc_i < 0 || dc_
i >= length dcs -> error $ "\nCoreTools.mkSelCase: Creating extractor case, but datacon index is invalid." ++ error_msg
| otherwise -> do
let datacon = (dcs!!dc_i)
let field_tys = DataCon.dataConInstOrigArgTys datacon tyargs
| otherwise -> do
let datacon = (dcs!!dc_i)
let field_tys = DataCon.dataConInstOrigArgTys datacon tyargs