summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/th/TH_repPrimOutput.hs
blob: 721b15dd2cd3f9f8520038d7b6c6966c1c81b67e (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 #-}
-- 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 <- [| I# 20# |]
                                  return e )
          putStrLn $ show $ $( do e <- [| W# 32## |]
                                  return e )
          putStrLn $ show $ $( do e <- [| F# 12.3# |]
                                  return e )
          putStrLn $ show $ $( do e <- [| D# 24.6## |]
                                  return e )