From 912afaf49e86501657468f32c1fd20961f98a6d1 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 12 Sep 2019 18:34:30 -0400 Subject: CoreUtils: Use mightBeUnliftedType in exprIsTopLevelBindable Also add reference from isUnliftedType to mightBeUnliftedType. --- compiler/types/Type.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/types') 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# -- cgit v1.2.1