Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
b9bef8d6
Commit
b9bef8d6
authored
Apr 27, 1999
by
simonm
Browse files
[project @ 1999-04-27 15:21:32 by simonm]
off-by-one in folding of tagToEnum#.
parent
e0955d95
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/simplCore/ConFold.lhs
View file @
b9bef8d6
...
...
@@ -104,7 +104,7 @@ tryPrimOp TagToEnumOp [Type ty, Con (Literal (MachInt i _)) _]
| otherwise = panic "tryPrimOp: tagToEnum# on non-enumeration type"
where tag = fromInteger i
constrs = tyConDataCons tycon
(dc:_) = [ dc | dc <- constrs, tag == dataConTag dc ]
(dc:_) = [ dc | dc <- constrs, tag == dataConTag dc
- fIRST_TAG
]
(Just (tycon,_)) = splitTyConApp_maybe ty
\end{code}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment