logo       

RE: RULES/SPECIALIZE not parsing:: msg#00004

lang.haskell.glasgow.bugs

Subject: RE: RULES/SPECIALIZE not parsing:


> 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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise