summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_run/readRun003.hs
blob: 578e2d18dbaf353fad838fdbd2f3d7f289f8254d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# LANGUAGE MagicHash #-}
-- !!! Negative unboxed literals, part 2

import GHC.Exts

main = do
  --Newly implemented: don't parse this as subtraction (Prelude.-):
  print (I# (negateInt# -3#))
  print (F# (negateFloat# -3.0#))
  print (D# (negateDouble# -3.0##))
  --nor this as  let (-) f 1# = ...
  print (let { f -1# = True } in f (-1#))