1 -- test Lifting instances
5 module TH_Lift where
8 import Data.Ratio
9 import Data.Word
10 import Data.Int
11 import Numeric.Natural
13 a :: Integer
14 a = \$( (\x -> [| x |]) (5 :: Integer) )
16 b :: Int
17 b = \$( (\x -> [| x |]) (5 :: Int) )
19 b1 :: Int8
20 b1 = \$( (\x -> [| x |]) (5 :: Int8) )
22 b2 :: Int16
23 b2 = \$( (\x -> [| x |]) (5 :: Int16) )
25 b3 :: Int32
26 b3 = \$( (\x -> [| x |]) (5 :: Int32) )
28 b4 :: Int64
29 b4 = \$( (\x -> [| x |]) (5 :: Int64) )
31 c :: Word
32 c = \$( (\x -> [| x |]) (5 :: Word) )
34 d :: Word8
35 d = \$( (\x -> [| x |]) (5 :: Word8) )
37 e :: Word16
38 e = \$( (\x -> [| x |]) (5 :: Word16) )
40 f :: Word32
41 f = \$( (\x -> [| x |]) (5 :: Word32) )
43 g :: Word64
44 g = \$( (\x -> [| x |]) (5 :: Word64) )
46 g1 :: Natural
47 g1 = \$( (\x -> [| x |]) (5 :: Natural) )
49 h :: Rational
50 h = \$( (\x -> [| x |]) (5 % 3 :: Rational) )
52 h1 :: Float
53 h1 = \$( (\x -> [| x |]) (pi :: Float) )
55 h2 :: Double
56 h2 = \$( (\x -> [| x |]) (pi :: Double) )
58 i :: Char
59 i = \$( (\x -> [| x |]) 'x' )
61 j :: Bool
62 j = \$( (\x -> [| x |]) True )
64 k :: Maybe Char
65 k = \$( (\x -> [| x |]) (Just 'x') )
67 l :: Either Char Bool
68 l = \$( (\x -> [| x |]) (Right False :: Either Char Bool) )
70 m :: [Char]
71 m = \$( (\x -> [| x |]) "hi!")
73 n :: ()
74 n = \$( (\x -> [| x |]) () )
76 o :: (Bool, Char, Int)
77 o = \$( (\x -> [| x |]) (True, 'x', 4 :: Int) )