> SPECIALIZE with '=' is very desirable.
> Otherwise, how can one denote with the same name a function together
> with its particularly efficient specialization?
Yes it's desirable. I'm not sure how soon we'll get to it
unless other people start yelling too!
In general, expect a quiet patch on the GHC develoment front until
March 10th, which is the ICFP submission deadline...
Simon
> Second question: is this hard to implement specializations like
>
> f :: C a => a -> ... -- exported function
> f x = ...
>
> f_spec :: (C a, D a) => a -> ... -- hidden function
>
> {-# SPECIALIZE f :: (C a,D a) => a -> ... = f_spec #-}
Yes, that is harder, because it involves search. At present
GHC picks the most specific specialisation and never backs out.
Specialisation is currently done well after the type checker,
at which point the compiler doesn't know how to come up with
this new dictionary 'D a'. This belongs with a bunch of
interesting topics in the 'further extensions of type classes' pile.