summaryrefslogtreecommitdiff
path: root/compiler/types/Type.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/types/Type.lhs')
-rw-r--r--compiler/types/Type.lhs20
1 files changed, 2 insertions, 18 deletions
diff --git a/compiler/types/Type.lhs b/compiler/types/Type.lhs
index 5753aba0c1..9db0aaa3ee 100644
--- a/compiler/types/Type.lhs
+++ b/compiler/types/Type.lhs
@@ -166,7 +166,6 @@ import CoAxiom
-- others
import Unique ( Unique, hasKey )
import BasicTypes ( Arity, RepArity )
-import StaticFlags
import Util
import Outputable
import FastString
@@ -1093,25 +1092,10 @@ isClosedAlgType ty
\begin{code}
-- | Computes whether an argument (or let right hand side) should
-- be computed strictly or lazily, based only on its type.
--- Works just like 'isUnLiftedType', except that it has a special case
--- for dictionaries (i.e. does not work purely on representation types)
+-- Currently, it's just 'isUnLiftedType'.
--- Since it takes account of class 'PredType's, you might think
--- this function should be in 'TcType', but 'isStrictType' is used by 'DataCon',
--- which is below 'TcType' in the hierarchy, so it's convenient to put it here.
---
--- We may be strict in dictionary types, but only if it
--- has more than one component.
---
--- (Being strict in a single-component dictionary risks
--- poking the dictionary component, which is wrong.)
isStrictType :: Type -> Bool
-isStrictType ty | Just ty' <- coreView ty = isStrictType ty'
-isStrictType (ForAllTy _ ty) = isStrictType ty
-isStrictType (TyConApp tc _)
- | isUnLiftedTyCon tc = True
- | isClassTyCon tc, opt_DictsStrict = True
-isStrictType _ = False
+isStrictType = isUnLiftedType
\end{code}
\begin{code}