Re: explicit signatures and default for integer literals

2005-05-31 Thread Dinko Tenev
On 5/31/05, Seth Kurtzberg <[EMAIL PROTECTED]> wrote: > Because I'm not smart enough to understand it? > > ;-) OK, sorry about the notation (I just didn't feel like doing so much typing, you know :) Here goes... First we observe that, g = new . flip zip [0..], so, without the type specification

Re: explicit signatures and default for integer literals

2005-05-31 Thread Mirko Rahn
Answer: Since somewhere an instance e.g. New [(a,Double)] (Map a Int) could be defined, leading to problems when threating 0 as (0::Int). There could be such an instance, but that's obviously not the case. No, suppose module A is the module with the definitions as before. Now: module B wh

RE: Are new sequences really O(1)?

2005-05-31 Thread Simon Marlow
On 27 May 2005 21:02, Marcin 'Qrczak' Kowalczyk wrote: > [moved from libraries to glasgow-haskell-users] > > Ross Paterson <[EMAIL PROTECTED]> writes: > >> GCs that happen during this process will be more expensive, as they >> have to scan the stack. I suspect that GC costs are swamping >> every

Re: explicit signatures and default for integer literals

2005-05-31 Thread robert dockins
Dinko Tenev wrote: First we observe that, g = new . flip zip [0..], so, without the type specification, it has the general type (New [(a, b1)] b, Num b1, Enum b1) => [a] -> b, as reported by GHC. Then we infer from (1) g :: (New [(u, v)] w, Num v, Enum v) => [u] -> w and (2) instan

Re: explicit signatures and default for integer literals

2005-05-31 Thread Dinko Tenev
On 5/31/05, robert dockins <[EMAIL PROTECTED]> wrote: > > Dinko Tenev wrote: > > > > > First we observe that, g = new . flip zip [0..], so, without the type > > specification, it has the general type (New [(a, b1)] b, Num b1, Enum > > b1) => [a] -> b, as reported by GHC. > > > > Then we infer fro

Re: explicit signatures and default for integer literals

2005-05-31 Thread Abraham Egnor
Ghc can't assume "in this context" - the object file produced by compilation could be linked into code that provides other instances. Abe On 5/31/05, Dinko Tenev <[EMAIL PROTECTED]> wrote: > On 5/31/05, robert dockins <[EMAIL PROTECTED]> wrote: > > > > Dinko Tenev wrote: > > > > > > > > First we

Re: Are new sequences really O(1)?

2005-05-31 Thread Marcin 'Qrczak' Kowalczyk
"Simon Marlow" <[EMAIL PROTECTED]> writes: > Nice trick. Unfortunately the same assumptions don't hold for GHC's > garbage collector - objects are aged in the youngest generation, so > it is usually at least two GCs before an object is promoted. We > could still do the same trick, but instead we'd

GHC hang

2005-05-31 Thread John Goerzen
Hi, I'm trying to compile WashNGo 2.3.1 on my amd64 machine running GHC 6.4. When compiling HTMLMonad98.hs, ghc hangs. It's been running over 5 minutes now with no output or other activity. What can I do to help the GHC folks debug this? ___ Glasgow