diff --git a/src/Language/Haskell/Liquid/Constraint/Generate.hs b/src/Language/Haskell/Liquid/Constraint/Generate.hs index aeeefbbad2..2b716ee205 100644 --- a/src/Language/Haskell/Liquid/Constraint/Generate.hs +++ b/src/Language/Haskell/Liquid/Constraint/Generate.hs @@ -1458,14 +1458,13 @@ isPLETerm γ -- | @isGenericVar@ determines whether the @RTyVar@ has no class constraints isGenericVar :: RTyVar -> SpecType -> Bool -isGenericVar α t = all (\(c, α') -> (α'/=α) || isOrd c || isEq c ) (classConstrs t) +isGenericVar α t = all (\(c, α') -> (α'/=α) || isGenericClass c ) (classConstrs t) where classConstrs t = [(c, ty_var_value α') | (c, ts) <- tyClasses t , t' <- ts , α' <- freeTyVars t'] - isOrd = (ordClassName ==) . className - isEq = (eqClassName ==) . className + isGenericClass c = className c `elem` [ordClassName, eqClassName, functorClassName] -- instance MonadFail CG where -- fail msg = panic Nothing msg diff --git a/tests/pos/T1619.hs b/tests/pos/T1619.hs new file mode 100644 index 0000000000..966a0a3f59 --- /dev/null +++ b/tests/pos/T1619.hs @@ -0,0 +1,30 @@ +{-# LANGUAGE Rank2Types #-} + +{-@ data Label