blob: bdf483caced67a1d9b3390f3077cc336f59fe06b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeApplications #-}
module T2600 where
-- ** See trac #10595 for why we're okay with this generating warnings! **
class T t where
to :: [a] -> t a
from :: t a -> [a]
tmap :: (a -> a) -> t a -> t a
{-# RULES
"myrule" forall t a. forall f x.
from (tmap f (to x :: t a)) = map f (from (to x :: t a))
#-}
|