summaryrefslogtreecommitdiff
path: root/compiler/types
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-12 18:34:30 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-19 09:04:39 -0400
commit912afaf49e86501657468f32c1fd20961f98a6d1 (patch)
tree300d50a6f42ba640781a8c8994b7d6802d89d0b4 /compiler/types
parentc675d08fb08151c10e94a975452ce0c5c2cf997a (diff)
downloadhaskell-912afaf49e86501657468f32c1fd20961f98a6d1.tar.gz
CoreUtils: Use mightBeUnliftedType in exprIsTopLevelBindable
Also add reference from isUnliftedType to mightBeUnliftedType.
Diffstat (limited to 'compiler/types')
-rw-r--r--compiler/types/Type.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs
index 94ee5af202..f574132c4f 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -2214,7 +2214,9 @@ isLiftedType_maybe ty = go (getRuntimeRep ty)
| otherwise = Nothing -- levity polymorphic
-- | See "Type#type_classification" for what an unlifted type is.
--- Panics on levity polymorphic types.
+-- Panics on levity polymorphic types; See 'mightBeUnliftedType' for
+-- a more approximate predicate that behaves better in the presence of
+-- levity polymorphism.
isUnliftedType :: HasDebugCallStack => Type -> Bool
-- isUnliftedType returns True for forall'd unlifted types:
-- x :: forall a. Int#