Embrace -XTypeInType, add -XStarIsType
[ghc.git] / testsuite / tests / simplCore / should_run / simplrun008.hs
1
2 module Main where
3 import Data.Char
4
5 {-# NOINLINE f #-}
6 f :: Int -> String
7 f x = "NOT FIRED"
8
9 {-# NOINLINE neg #-}
10 neg :: Int -> Int
11 neg = negate
12
13 {-# NOINLINE myord #-}
14 myord :: Char -> Int
15 myord = ord
16
17 {-# RULES
18 "f" forall (c::Char->Int) (x::Char). f (c x) = "RULE FIRED"
19 #-}
20
21 main = do { print (f (myord 'a')) -- Rule should fire
22 ; print (f (neg 1)) } -- Rule should not fire