Re: testing 7.02-candidate

2011-03-20 Thread Ian Lynagh

Hi Serge,

 [ 3 of 17] Compiling T_cubeext( T_cubeext.hs, T_cubeext.o )
 
 T_cubeext.hs:143:9:
 Overlapping instances for LinSolvRing (UPol k)
   arising from a use of `ct'
 Matching instances:
   instance [overlap ok] EuclideanRing a = LinSolvRing (UPol a)
 -- Defined in docon-2.12:Pol2_
   instance [overlap ok] (LinSolvRing (Pol a), CommutativeRing a) =
 LinSolvRing (UPol (Pol a))
 -- Defined in docon-2.12:Pol3_
 (The choice depends on the instantiation of `k'
  To pick the first instance above, use -XIncoherentInstances
  when compiling the other instance declarations)
 In the first argument of `(.)', namely `ct unE'
 In the expression: ct unE . kToB
 In an equation for `kToE': kToE = ct unE . kToB

Thanks for the report. I've taken a look, but it'll need someone like
Simon or Dimitrios to give a definitive answer as to which behaviour is
right and which is wrong.

I've put a cut-down (but not standalone) version of the offending module
below. I believe the relevant steps are then:

The ct application means we need an instance for:
  Cast (ResidueI (Pol (ResidueE (UPol k
 (Pol (ResidueE (UPol k)))

Need: Cast (ResidueI (Pol (ResidueE (UPol k
 (Pol (ResidueE (UPol k)))
Have: instance LinSolvRing a = Cast (ResidueI a) a

Now need: LinSolvRing (Pol (ResidueE (UPol k)))
Have: instance EuclideanRing a = LinSolvRing (Pol a)

Now need: EuclideanRing (ResidueE (UPol k))
Have: instance (EuclideanRing a, Ring (ResidueE a) )
= EuclideanRing (ResidueE a)

Now need: EuclideanRing (UPol k)
Have: instance Field a = EuclideanRing (UPol a)

Now need: LinSolvRing (UPol k)(from the EuclideanRing class constraints)
Have: instance EuclideanRing a = LinSolvRing (UPol a)  (Pol2_.hs:95)
And:  instance (LinSolvRing (Pol a), CommutativeRing a)
= LinSolvRing (UPol (Pol a))

A different instance should be used depending on whether or not
k = Pol x
(for some x).


module T_cubeext (cubicExt) where

import Prelude (undefined)
import DPrelude (ct)
import Categs (ResidueE)
import SetGroup ()
import RingModule (Field, FactorizationRing)
import VecMatr  ()
import Fraction ()
import Pol (Pol, UPol)
import Residue (ResidueI)
import GBasis  ()

cubicExt :: forall k . (Field k, FactorizationRing (UPol k))
 = k - ()
cubicExt _ = undefined
 where unE :: ResidueI (Pol (ResidueE (UPol k)))
   unE  = undefined

   kToE :: Pol (ResidueE (UPol k)) - ResidueI (Pol (ResidueE (UPol k)))
   kToE = ct unE


Thanks
Ian


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


GHC7 (on OSX.5)

2011-03-20 Thread wren ng thornton
So I'm having a go of installing ghc-7.0.2 and 
haskell-platform-2011.2.0.0 on OSX 10.5. Since 10.5 is no longer 
supported I've had to compile from source. The good news is, so far as I 
can tell, everything works right out of the box.[1]


But I've noticed when compiling the base libraries and HP a lot of 
warnings like the following:


SpecConstr
Function `a_s2Qn{v} [lid]'
  has three call patterns, but the limit is 1
Use -fspec-constr-count=n to set the bound
Use -dppr-debug to see specialisations

Though the number of call patterns and the limit vary. Googling led me 
to the SpecConstr file which I read briefly, so I know it has to do with 
optimizing away constructor allocations, but that's about it. Are these 
warnings I should be concerned about?



[1]
OSX   10.5.8
arch  x86_64 (though it calls itself i386)
Xcode 3.1.2  (not that it matters)
gcc   4.0.1  (i686-apple-darwin9-gcc-4.0.1 Apple Inc. build 5490)
ghc   6.12.1 / hp 2010.1.0.0

--
Live well,
~wren

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC7 (on OSX.5)

2011-03-20 Thread Max Bolingbroke
On 20 March 2011 19:01, wren ng thornton w...@freegeek.org wrote:
 Are these
 warnings I should be concerned about?

No.

These warnings just tell you explicitly that SpecConstr has exceeded
the limit of specialisations that GHC is happy to generate. They are
totally harmless and just mean that the output code is perhaps slower
than it could be.

Cheers,
Max

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Using the GHC heap profiler

2011-03-20 Thread Tim Docker


My question on the ghc heap profiler on stack overflow:

http://stackoverflow.com/questions/5306717/how-should-i-interpret-the-output-of-the-ghc-heap-profiler

remains unanswered :-( Perhaps that's not the best forum. Is there 
someone here prepared to explain how the memory usage in the heap 
profiler relates to the  Live Bytes count shown in the garbage 
collection statistics?


Many thanks,

Tim

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Using the GHC heap profiler

2011-03-20 Thread Evan Laforge
On Mon, Mar 21, 2011 at 9:59 AM, Tim Docker t...@dockerz.net wrote:

 My question on the ghc heap profiler on stack overflow:

 http://stackoverflow.com/questions/5306717/how-should-i-interpret-the-output-of-the-ghc-heap-profiler

 remains unanswered :-( Perhaps that's not the best forum. Is there someone
 here prepared to explain how the memory usage in the heap profiler relates
 to the  Live Bytes count shown in the garbage collection statistics?

I've long had the same questions and still don't know the answers, so
I'm curious too.  My guess was that the heap graph has the profiling
overhead subtracted out, but I don't know really.  The numbers don't
line up with +RTS -s output, but they seem to go up and down by the
same amount.

Also, the time axis clearly isn't wall time.  I'm guessing CPU time,
but once again, it doesn't line up with getCPUTime output.  It's
actually kind of annoying because to get a steady state picture of
heap usage the only thing I could think of was to write a several
second busy loop and look for the flat spot.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users