summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T4135.hs
blob: 71a5106ba42cbe3fbd05462e55e09c5ea74eabd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE TypeFamilies,TemplateHaskell #-}
module Bug where

import Language.Haskell.TH
import System.IO

class C a where
    type T a

$(do { ds <- [d|
                 instance C (Maybe a) where
                    type T (Maybe a) = Char
             |]
     ; runIO $ do { putStrLn (pprint ds); hFlush stdout }
     ; return ds })