diff options
Diffstat (limited to 'compiler/simplStg')
-rw-r--r-- | compiler/simplStg/RepType.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/simplStg/RepType.hs b/compiler/simplStg/RepType.hs index ca8438eec1..6309aecb3a 100644 --- a/compiler/simplStg/RepType.hs +++ b/compiler/simplStg/RepType.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE FlexibleContexts #-} module RepType ( -- * Code generator views onto Types @@ -332,14 +333,14 @@ fitsIn ty1 ty2 ********************************************************************** -} -- | Discovers the primitive representation of a more abstract 'UnaryType' -typePrimRep :: UnaryType -> PrimRep +typePrimRep :: HasDebugCallStack => UnaryType -> PrimRep typePrimRep ty = kindPrimRep (text "kindRep ty" <+> ppr ty $$ ppr (typeKind ty)) (typeKind ty) -- | Find the runtime representation of a 'TyCon'. Defined here to -- avoid module loops. Do not call this on unboxed tuples or sums, -- because they don't /have/ a runtime representation -tyConPrimRep :: TyCon -> PrimRep +tyConPrimRep :: HasDebugCallStack => TyCon -> PrimRep tyConPrimRep tc = ASSERT2( not (isUnboxedTupleTyCon tc), ppr tc ) ASSERT2( not (isUnboxedSumTyCon tc), ppr tc ) @@ -350,7 +351,7 @@ tyConPrimRep tc -- | Take a kind (of shape @TYPE rr@) and produce the 'PrimRep' -- of values of types of this kind. -kindPrimRep :: SDoc -> Kind -> PrimRep +kindPrimRep :: HasDebugCallStack => SDoc -> Kind -> PrimRep kindPrimRep doc ki | Just ki' <- coreViewOneStarKind ki = kindPrimRep doc ki' |