summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/TH_repPrimOutput2.hs
blob: a7282064db6360e3330bfc74e9ffa025e76e1156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE MagicHash, UnboxedTuples #-}
-- test the representation of unboxed literals

module Main
where

import GHC.Exts
import GHC.Float
import Language.Haskell.TH
import Text.PrettyPrint
import System.IO

main :: IO ()
main = do putStrLn $ show $ $( do e <- [| 20# |]
                                  [| I# $(return e) |] )
          putStrLn $ show $ $( do e <- [| 32## |]
                                  [| W# $(return e) |] )
          putStrLn $ show $ $( do e <- [| 12.3# |]
                                  [| F# $(return e) |] )
          putStrLn $ show $ $( do e <- [| 24.6## |]
                                  [| D# $(return e) |] )