Commit 8c3dc562 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Another test for Trac #7354

parent d143e5f4
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
T7354a:
'$(TEST_HC)' $(TEST_HC_OPTS) -c T7354b.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) -c T7354a.hs
module T7354a where
import T7354b
foo = embed ()
bar = foo
T7354a.hs:5:13:
Couldn't match expected type `Base t t' with actual type `()'
Relevant bindings include foo :: t (bound at T7354a.hs:5:1)
In the first argument of `embed', namely `()'
In the expression: embed ()
In an equation for `foo': foo = embed ()
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
module T7354b where
type family Base t :: * -> *
class Unfoldable t where
embed :: Base t t -> t
......@@ -79,3 +79,11 @@ test('ExtraTcsUntch', normal, compile_fail, [''])
test('T7010', normal, compile_fail, [''])
test('T7194', normal, compile_fail, [''])
test('T7354', normal, compile_fail, [''])
test('T7354a',
extra_clean(['T7354b.o', 'T7354b.hi']),
run_command,
['$MAKE -s --no-print-directory T7354a'])
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