summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/rule1.hs
blob: 923f4805fbc754478faec613e9f24d11bbae5003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

-- This one triggers the bug reported in Trac #1092
-- The problem is that the rule 
--	forall w. f (\v->w) = w 
-- erroneously matches the call
--	f id
--
-- Lint catches the error

module Foo where

f :: (Int -> Int) -> Int
{-# NOINLINE f #-}
f g = g 4
{-# RULES 
  "f" forall w. f (\v->w) = w 
 #-}

h = f id