summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/TcStaticPointers01.hs
blob: a48568eb7b847c79a515d7fe7d139ae8bbc34a35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE StaticPointers #-}

module StaticPointers01 where

import GHC.StaticPtr

f0 :: StaticPtr (Int -> Int)
f0 = static g

f1 :: StaticPtr (Bool -> Bool -> Bool)
f1 = static (&&)

f2 :: StaticPtr (Bool -> Bool -> Bool)
f2 = static ((&&) . id)

g :: Int -> Int
g = id