summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T5037.hs
blob: 06f42ab88ce2392250df647deea583db5bad62d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE TemplateHaskell #-}
module T5037 where
import Language.Haskell.TH
import System.IO

$( do ds <- [d|  f :: Maybe Int -> Int
                 f Nothing = 3
                 f (Just x) = $(varE (mkName "x"))
            |]
      runIO $ (putStrLn (pprint ds) >> hFlush stdout)
      return ds )