summaryrefslogtreecommitdiff
path: root/testsuite/tests/rebindable/rebindable11.hs
blob: 747fb232d336b29f66462d4d2631e1e0a02d2224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE StaticPointers #-}
module Rebindable11 where

import Prelude

ifThenElse :: Bool -> () -> () -> Int
ifThenElse cond b1 b2 = 0

a1 = let foo = if 'a' then () else () in foo*foo
a2 = (if 'a' then () else ())*2 + 1
a3 = if 'a' then () else ()
a4 = if (if 'a' then () else ()) == 10 then () else ()
a5 = static (if 'a' then () else ())
a6 = (if 'a' then () else ()) :: Int

data A = A { field :: Int }
a7 = A { field = if 'a' then () else () }
a8 = let someA = A 10 in someA { field = if True == 'a' then () else () }