Hi,
On Apr 3, 2005 7:33 AM, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote:
> Assume the following type class declarations with functional
> dependencies:
>
> > {-# OPTIONS -fglasgow-exts #-}
> >
> > class C a b c | a b -> c where
> > foo :: (a, b) -> c
> >
> > instance C a a r => C a (b, c) r
On Sun, Apr 03, 2005 at 02:38:30PM +0100, Ian Lynagh wrote:
> Why does it matter whether the definition is in the current file or is
> imported from the standard libraries?
The issue is not whether it is imported but rather how many uses the
function has. The routine declared in the standard libra
Assume the following type class declarations with functional
dependencies:
> {-# OPTIONS -fglasgow-exts #-}
>
> class C a b c | a b -> c where
> foo :: (a, b) -> c
>
> instance C a a r => C a (b, c) r where
> foo (a, (b, c)) = foo (a, a)
Now, in GHCi (version 6.4),
> *FDs> let bar x = foo (
Hi all,
With foo.hs below, if I compile normally then it takes about 70 seconds
to run:
$ rm -f *.o *.hi foo
$ ghc -cpp -Wall -O2 foo.hs -o foo
$ time ./foo
real1m10.266s
user1m9.698s
sys 0m0.521s
If I turn up the inlining threshold then it takes only about 13 seconds:
$ rm -f *.o