Mitar wrote: > On Fri, Jul 18, 2008 at 3:54 PM, Chaddaï Fouché > <[EMAIL PROTECTED]> wrote: >>> So that I can easily change the type everywhere. But it would be much >>> nicer to write: >>> >>> data Quaternion a = Q !a !a !a !a deriving (Eq,Show) >>> >>> Only the performance of Num instance functions of Quaternion is then >>> quite worse. >> >> You can probably use a specialization pragma to get around that. > > But why is this not automatic? If I use Quaternions of only one type > in the whole program then why it does not make specialized version for > it? At least with -O2 switch.
You could try jhc: it does whole program optimization. Ghc compiles each module separately. Cheers Ben _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe