T2714.hs 358 Bytes
Newer Older
1
{-# LANGUAGE ScopedTypeVariables, RankNTypes #-}
Simon Peyton Jones's avatar
Simon Peyton Jones committed
2 3 4 5 6 7

-- Trac #2714

module T2714 where

f :: ((a -> b) -> b) -> (forall c. c -> a)
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
f = ffmap

ffmap :: Functor f => (p->q) -> f p -> f q
ffmap = error "urk"

{-
   a ~ f q
   c ~ f p
   (p->q) ~ (a->b) -> b

 =>
   a ~ f q
   c ~ f p
   p ~ a->b
   q ~ b
 =>
   a ~ f b
   c ~ f (a->b)
-}