summaryrefslogtreecommitdiff
path: root/compiler/specialise/SpecConstr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/specialise/SpecConstr.hs')
-rw-r--r--compiler/specialise/SpecConstr.hs19
1 files changed, 3 insertions, 16 deletions
diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs
index 60632255d8..2f2087cd2e 100644
--- a/compiler/specialise/SpecConstr.hs
+++ b/compiler/specialise/SpecConstr.hs
@@ -13,10 +13,8 @@ ToDo [Oct 2013]
{-# LANGUAGE CPP #-}
module SpecConstr(
- specConstrProgram
-#ifdef GHCI
- , SpecConstrAnnotation(..)
-#endif
+ specConstrProgram,
+ SpecConstrAnnotation(..)
) where
#include "HsVersions.h"
@@ -61,12 +59,9 @@ import PrelNames ( specTyConName )
import Module
-- See Note [Forcing specialisation]
-#ifndef GHCI
-type SpecConstrAnnotation = ()
-#else
+
import TyCon ( TyCon )
import GHC.Exts( SpecConstrAnnotation(..) )
-#endif
{-
-----------------------------------------------------
@@ -954,11 +949,6 @@ ignoreType :: ScEnv -> Type -> Bool
ignoreDataCon :: ScEnv -> DataCon -> Bool
forceSpecBndr :: ScEnv -> Var -> Bool
-#ifndef GHCI
-ignoreType _ _ = False
-ignoreDataCon _ _ = False
-#else /* GHCI */
-
ignoreDataCon env dc = ignoreTyCon env (dataConTyCon dc)
ignoreType env ty
@@ -969,7 +959,6 @@ ignoreType env ty
ignoreTyCon :: ScEnv -> TyCon -> Bool
ignoreTyCon env tycon
= lookupUFM (sc_annotations env) tycon == Just NoSpecConstr
-#endif /* GHCI */
forceSpecBndr env var = forceSpecFunTy env . snd . splitForAllTys . varType $ var
@@ -984,9 +973,7 @@ forceSpecArgTy env ty
| Just (tycon, tys) <- splitTyConApp_maybe ty
, tycon /= funTyCon
= tyConName tycon == specTyConName
-#ifdef GHCI
|| lookupUFM (sc_annotations env) tycon == Just ForceSpecConstr
-#endif
|| any (forceSpecArgTy env) tys
forceSpecArgTy _ _ = False