X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FDataCon.lhs;h=8b1ed9eedc0143e496d31cb553bc864603f32e04;hb=0119bfdc7ae348c0f45b591391d1b68bc6bd8cc8;hp=805ef73c597c1fbfdf752fcbe79b89afefa09406;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs index 805ef73..8b1ed9e 100644 --- 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 +-- 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 - NewDC wrap -> Just wrap + NewDC wrap -> Nothing dataConWrapId :: DataCon -> Id -- Returns an Id which looks like the Haskell-source constructor