Commit 8b4da92a authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add tests for -XPolymorphicComponents

parent a4af4851
......@@ -245,6 +245,7 @@ test('tc229', normal, compile, [''])
test('tc230', normal, compile, [''])
test('tc231', normal, compile, [''])
test('tc232', reqlib('mtl'), compile, [''])
test('tc233', normal, compile, [''])
test('faxen', normal, compile, [''])
......
{-# OPTIONS_GHC -XPolymorphicComponents #-}
module ShouldCompile where
newtype Swizzle = MkSwizzle (forall a. Ord a => [a] -> [a])
......@@ -168,3 +168,5 @@ test('tcfail179', normal, compile_fail, [''])
test('tcfail180', normal, compile_fail, [''])
test('tcfail181', normal, compile_fail, [''])
test('tcfail182', normal, compile_fail, [''])
test('tcfail183', normal, compile_fail, [''])
test('tcfail184', normal, compile_fail, [''])
module ShouldCompile where
newtype Swizzle = MkSwizzle (forall a. Ord a => [a] -> [a])
{-# OPTIONS_GHC -XScopedTypeVariables #-}
-- We don't actually want scoped type variables, but this flag makes the
-- forall be recognised by the parser
module ShouldCompile where
newtype Swizzle = MkSwizzle (forall a. Ord a => [a] -> [a])
tcfail184.hs:8:18:
Illegal polymorphic or qualified type: forall a.
(Ord a) =>
[a] -> [a]
In the definition of data constructor `MkSwizzle'
In the newtype declaration for `Swizzle'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment