projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add comment for the invariant that DataAlt is never a newtype
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
CoreSyn.lhs
diff --git
a/compiler/coreSyn/CoreSyn.lhs
b/compiler/coreSyn/CoreSyn.lhs
index
f83845f
..
a108945
100644
(file)
--- a/
compiler/coreSyn/CoreSyn.lhs
+++ b/
compiler/coreSyn/CoreSyn.lhs
@@
-112,7
+112,8
@@
type Arg b = Expr b -- Can be a Type
type Alt b = (AltCon, [b], Expr b) -- (DEFAULT, [], rhs) is the default alternative
type Alt b = (AltCon, [b], Expr b) -- (DEFAULT, [], rhs) is the default alternative
-data AltCon = DataAlt DataCon
+data AltCon = DataAlt DataCon -- Invariant: the DataCon is always from
+ -- a *data* type, and never from a *newtype*
| LitAlt Literal
| DEFAULT
deriving (Eq, Ord)
| LitAlt Literal
| DEFAULT
deriving (Eq, Ord)