Commit f86fb5e5 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add regression tests for #10045, #10999

parent c10c01cd
module T10045 where
newtype Meta = Meta ()
foo (Meta ws1) =
let copy :: _
copy w from = copy w True
in copy ws1 False
T10045.hs:6:18: error:
Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’
Where: ‘t1’ is a rigid type variable bound by
the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
‘t2’ is a rigid type variable bound by
the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
To use the inferred type, enable PartialTypeSignatures
Relevant bindings include
ws1 :: () (bound at T10045.hs:5:11)
foo :: Meta -> t (bound at T10045.hs:5:1)
In the type signature for:
copy :: _
In the expression:
let
copy :: _
copy w from = copy w True
in copy ws1 False
In an equation for ‘foo’:
foo (Meta ws1)
= let
copy :: _
copy w from = copy w True
in copy ws1 False
module T10999 where
import qualified Data.Set as Set
f :: () -> _
f _ = Set.fromList undefined
g = map fst $ Set.toList $ f ()
......@@ -59,4 +59,6 @@ test('WildcardInTypeFamilyInstanceRHS', normal, compile_fail, [''])
test('WildcardInTypeSynonymLHS', normal, compile_fail, [''])
test('WildcardInTypeSynonymRHS', normal, compile_fail, [''])
test('T10615', normal, compile_fail, [''])
test('T10045', normal, compile_fail, [''])
test('T10999', normal, compile_fail, [''])
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