TH_repE1.hs 421 Bytes
Newer Older
chak's avatar
chak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
-- test the representation of literals and also explicit type annotations

module TH_repE1
where

import Language.Haskell.THSyntax

intExpr :: Expr
intExpr = [| 42 :: Int |]

integerExpr :: Expr
integerExpr = [| 42 :: Integer |]

charExpr :: Expr
charExpr = [| 'x' |]

stringExpr :: Expr
stringExpr = [| "A String" |]

floatExpr :: Expr
floatExpr = [| 1.2 :: Float |]

doubleExpr :: Expr
doubleExpr = [| 1.2 :: Double |]