T4135.hs 333 Bytes
Newer Older
Simon Peyton Jones's avatar
Simon Peyton Jones committed
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 })