> In particular I want to be able to do something like
> the following:
>
> {-# Magic Pragma Here #-}
> f (A a) = g a
> f (B b) = g b
>
> so that usages of the form:
>
> h a@(A i) (A _) = f a
> h (A _) b@(B j) = f b
> h _ b = f b
>
> will *always* be translated into:
>
> h (A i) (A _) = g i
> h (A _) (B j) = g j
> h _ b = f b
>
> or something similar.
How about {-# INLINE f #-} ? Should do what you're after.
Cheers,
Simon
- unfolding optimisation Marc van Dongen
- Simon Marlow
