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
12 import Data.List.NonEmpty
14 a :: Integer
15 a = \$( (\x -> [| x |]) (5 :: Integer) )
17 b :: Int
18 b = \$( (\x -> [| x |]) (5 :: Int) )
20 b1 :: Int8
21 b1 = \$( (\x -> [| x |]) (5 :: Int8) )
23 b2 :: Int16
24 b2 = \$( (\x -> [| x |]) (5 :: Int16) )
26 b3 :: Int32
27 b3 = \$( (\x -> [| x |]) (5 :: Int32) )
29 b4 :: Int64
30 b4 = \$( (\x -> [| x |]) (5 :: Int64) )
32 c :: Word
33 c = \$( (\x -> [| x |]) (5 :: Word) )
35 d :: Word8
36 d = \$( (\x -> [| x |]) (5 :: Word8) )
38 e :: Word16
39 e = \$( (\x -> [| x |]) (5 :: Word16) )
41 f :: Word32
42 f = \$( (\x -> [| x |]) (5 :: Word32) )
44 g :: Word64
45 g = \$( (\x -> [| x |]) (5 :: Word64) )
47 g1 :: Natural
48 g1 = \$( (\x -> [| x |]) (5 :: Natural) )
50 h :: Rational
51 h = \$( (\x -> [| x |]) (5 % 3 :: Rational) )
53 h1 :: Float
54 h1 = \$( (\x -> [| x |]) (pi :: Float) )
56 h2 :: Double
57 h2 = \$( (\x -> [| x |]) (pi :: Double) )
59 i :: Char
60 i = \$( (\x -> [| x |]) 'x' )
62 j :: Bool
63 j = \$( (\x -> [| x |]) True )
65 k :: Maybe Char
66 k = \$( (\x -> [| x |]) (Just 'x') )
68 l :: Either Char Bool
69 l = \$( (\x -> [| x |]) (Right False :: Either Char Bool) )
71 m :: [Char]
72 m = \$( (\x -> [| x |]) "hi!")
74 n :: ()
75 n = \$( (\x -> [| x |]) () )
77 o :: (Bool, Char, Int)
78 o = \$( (\x -> [| x |]) (True, 'x', 4 :: Int) )
80 p :: NonEmpty Char
81 p = \$( (\x -> [| x |]) ('a' :| "bcde") )