blob: 6894f827c9f3802e2eeec8a681bb1f8e71ce2127 (
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
|