Commit f2f90679 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Type families: clean up

- RankN1 was a bogus test.  There error didn't have anything to do with
  rank-n types, but was just due to an ambiguous signature.
parent e182cdb8
Class3.hs:7:0:
Warning: No explicit method nor default method for `foo'
In the instance declaration for `C ()'
......@@ -9,5 +9,7 @@ data Pair p where
foo :: a
foo = case Pair () () of
-- this works:
-- case Pair () () : Pair ((), ()) of
Pair x y -> undefined
{-# LANGUAGE TypeFamilies, RankNTypes #-}
module RankN1 where
type family F x
foo, bar :: (forall x. x -> x) -> F x
foo = bar
bar = undefined
......@@ -70,15 +70,13 @@ test('GADT12', expect_fail, compile, [''])
test('Class1', normal, compile, [''])
test('Class2', normal, compile, [''])
test('Class3', expect_fail, compile, [''])
test('Class3', if_compiler_lt('ghc', '6.9', expect_fail), compile, [''])
test('Refl', normal, compile, [''])
test('Refl2', normal, compile, [''])
test('Rules1', normal, compile, [''])
test('RankN1', expect_fail, compile, [''])
test('Numerals', normal, compile, [''])
test('ColInference', normal, compile, [''])
......
Simple16.hs:10:11:
Couldn't match expected type `p a' against inferred type `F ()'
In the first argument of `foo', namely `(undefined :: F ())'
In the expression: foo (undefined :: F ())
In the definition of `bar': bar = foo (undefined :: F ())
......@@ -22,7 +22,7 @@ test('Simple12', normal, compile_fail, [''])
test('Simple13', normal, compile_fail, [''])
test('Simple14', normal, compile_fail, [''])
test('Simple15', normal, compile_fail, [''])
test('Simple16', expect_fail, compile_fail, [''])
test('Simple16', normal, compile_fail, [''])
test('TyFamArity1', normal, compile_fail, [''])
test('TyFamArity2', normal, compile_fail, [''])
test('TyFamUndec', 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