RULES/SPECIALIZE not parsing:
Simon Marlow
simonmar at microsoft.com
Wed Dec 4 05:36:29 EST 2002
> Rules.hs:
>
> module Rules where
>
> my_id :: a -> a
> my_id a = a
>
> my_int_id :: Int -> Int
> my_int_id a = a
>
> {-# RULES my_id = my_int_id #-}
Each rule should begin with a string, like:
{-# RULES "my_id" my_id = my_int_id #-}
> {-# SPECIALIZE my_id :: Int -> Int = my_int_id #-}
These kind of specialise pragmas aren't supported any more, because the
same effect can be achieved using RULES (it looks like that's what you
were trying to do).
The docs have some bogusness, which I'll fix.
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list