projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make simplifier report which phase it is doing in -ddump output
[ghc-hetmet.git]
/
compiler
/
basicTypes
/
DataCon.lhs
diff --git
a/compiler/basicTypes/DataCon.lhs
b/compiler/basicTypes/DataCon.lhs
index
805ef73
..
8b1ed9e
100644
(file)
--- a/
compiler/basicTypes/DataCon.lhs
+++ b/
compiler/basicTypes/DataCon.lhs
@@
-452,9
+452,11
@@
dataConWorkId dc = case dcIds dc of
NewDC _ -> pprPanic "dataConWorkId" (ppr dc)
dataConWrapId_maybe :: DataCon -> Maybe Id
NewDC _ -> pprPanic "dataConWorkId" (ppr dc)
dataConWrapId_maybe :: DataCon -> Maybe Id
+-- Returns Nothing if there is no wrapper for an algebraic data con
+-- and also for a newtype (whose constructor is inlined compulsorily)
dataConWrapId_maybe dc = case dcIds dc of
AlgDC mb_wrap _ -> mb_wrap
dataConWrapId_maybe dc = case dcIds dc of
AlgDC mb_wrap _ -> mb_wrap
- NewDC wrap -> Just wrap
+ NewDC wrap -> Nothing
dataConWrapId :: DataCon -> Id
-- Returns an Id which looks like the Haskell-source constructor
dataConWrapId :: DataCon -> Id
-- Returns an Id which looks like the Haskell-source constructor