blob: 4f2d9592ad80dbe3b13c50a3d629fe30ced45afc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE TemplateHaskell, GADTs #-}
module Main where
import Language.Haskell.TH
main :: IO ()
main = do
x <- [d| newtype MyType where MyCons :: Bool -> MyType
newtype MyType1 where MyCons1 :: Show a => a -> Bool -> MyType
newtype MyType2 a where MyCons2 :: a -> MyType
newtype MyType3 a where MyCons3 :: a -> MyType
newtype MyType4 = (:#) Int
newtype MyType5 where (:##) :: Int -> MyType
|]
putStrLn $ pprint x
|