Commit 43f57418 authored by simonpj's avatar simonpj
Browse files

[project @ 2005-02-23 13:47:26 by simonpj]

Add infix type contructor test
parent 57a8676c
......@@ -197,6 +197,7 @@ test('tc184', normal, compile, [''])
test('tc185', only_compiler_types(['ghc']), compile, [''])
test('tc186', normal, compile, [''])
test('tc187', normal, compile, [''])
test('tc188', normal, compile, [''])
test('LoopOfTheDay1', normal, compile, [''])
test('LoopOfTheDay2', normal, compile, [''])
......
{-# OPTIONS -fglasgow-exts #-}
-- Test infix type constructors for type synonyms
module ShouldCompile where
infix 9 :-+-:
type (f :-+-: g) t o1 o2 = Either (f t o1 o2) (g t o1 o2)
data Foo a b c = Foo (a,b,c)
type App f = f Int Bool Int
f :: (Foo :-+-: Foo) Bool Int Bool
f = error "urk"
g :: App (Foo :-+-: Foo)
g = error "urk"
-------- classes --------
class (Eq a, Eq b) => a :&: b where
op :: a -> b
h :: (a :&: b) => a -> b
h x = op x
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