Commit da98c427 authored by simonpj's avatar simonpj
Browse files

Add test for Trac #3346

parent 835e0607
{-# OPTIONS_GHC -XTypeFamilies #-}
-- Trac #3346
module Foo where
class EP a where
type Result a
from :: a -> Result a
to :: Result a -> a
{-# RULES "rule1" forall x. to (from x) = x #-}
{-# RULES "rule2" forall x. from (to x) = x #-}
foo :: EP a => a -> a
-- This is typed in a way rather similarly to RULE rule1
foo x = to (from x)
bar x = from (to x)
......@@ -297,6 +297,7 @@ test('T2735', normal, compile, [''])
test('T2799', normal, compile, [''])
test('T3219', normal, compile, [''])
test('T3342', normal, compile, [''])
test('T3346', normal, compile, [''])
test('T2412',
extra_clean(['T2412.hi-boot', 'T2412.o-boot',
......
Supports Markdown
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