summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T14888.hs
blob: e2bcec64ea02aceb08ec47d1d523f52aef9ee342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE TemplateHaskell #-}
module T14888 where

import Language.Haskell.TH

foo :: $([t| (->) Bool Bool |])
foo x = x

class Functor' f where
  fmap' :: (a -> b) -> f a -> f b

instance Functor' ((->) r) where
  fmap' = (.)

$(return [])

functor'Instances :: String
functor'Instances = $(reify ''Functor' >>= stringE . pprint)