[Haskell-cafe] Template Haskell.

2006-11-10 Thread [EMAIL PROTECTED]
Why doesn't reify return function body? reify (mkName somefunction) for a function defined in the same module returns constructor VarI (of data type Info) that does not contain function declaration in (Maybe Dec) part. What actions should I perform to get a function body with patterns,

Re: [Haskell-cafe] Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Henning Thielemann
On Fri, 10 Nov 2006, Benjamin Franksen wrote: Although one could view this as a bug in the offending module it makes me somewhat uneasy that one additional import can have such a drastic effect on the code in a module /even if you don't use anything from that module/. It's the same as with

Re: [Haskell-cafe] Haskell Quiz Solution - Haskell Newbie Requesting Review

2006-11-10 Thread Justin Bailey
On 11/9/06, Brandon Moore [EMAIL PROTECTED] wrote: Looks nice, especially if you're just getting started. The overall structure looks good, I've just made a bunch of little changes to the details. Mostly I found repeated patterns to replace with library functions or extract as helper functions.

[Haskell-cafe] Re: Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Benjamin Franksen
Henning Thielemann wrote: On Fri, 10 Nov 2006, Benjamin Franksen wrote: Although one could view this as a bug in the offending module it makes me somewhat uneasy that one additional import can have such a drastic effect on the code in a module /even if you don't use anything from that

Re: [Haskell-cafe] Haskell Quiz Solution - Haskell Newbie Requesting Review

2006-11-10 Thread Dougal Stanton
Quoth Justin Bailey, nevermore, Above are all more examples of partial functions and function composition. I understand the first concept, but function composition escapes me somehow. What are the rules for partial functions getting arguments when they are eventually supplied? For example, in

Re: [Haskell-cafe] Haskell Quiz Solution - Haskell Newbie Requesting Review

2006-11-10 Thread Justin Bailey
On 11/10/06, Dougal Stanton [EMAIL PROTECTED] wrote: As you noted that doesn't seem right --- how does compile capture its input? Well, the (.) operator is slightly different. It captures variables and passes them into the 'innermost' function, a bit like this: That is a great explanation.

Re: [Haskell-cafe] Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Jan-Willem Maessen
On Nov 9, 2006, at 7:16 PM, Benjamin Franksen wrote: Carl Witty wrote: On Thu, 2006-11-09 at 22:20 +0100, Benjamin Franksen wrote: Henning Thielemann wrote: Maybe making fixity declarations like type class instance declarations is good. I thought so too at first but, having thought

Re: [Haskell-cafe] Template Haskell.

2006-11-10 Thread Jason Dagit
On 11/10/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Why doesn't reify return function body? reify (mkName somefunction) for a function defined in the same module returns constructor VarI (of data type Info) that does not contain function declaration in (Maybe Dec) part. What actions should

[Haskell-cafe] Re: Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Benjamin Franksen
Jan-Willem Maessen wrote: On Nov 9, 2006, at 7:16 PM, Benjamin Franksen wrote: Carl Witty wrote: If you have operators op1 and op2, where the compiler sees conflicting requirements for the precedence of op1 and op2, then they are treated as non-associative relative to each other: the

[Haskell-cafe] Re: Fractional/negative fixity?

2006-11-10 Thread Ben Rudiak-Gould
I'm surprised that no one has mentioned showsPrec and readsPrec. Anything more complicated than negative fixities would require their interfaces to be changed. -- Ben ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Livecoding music in Haskell

2006-11-10 Thread Henning Thielemann
On Wed, 8 Nov 2006, Rohan Drape wrote: import Sound.SC3 import Control.Concurrent (forkIO) ping f a = out 0 (sinOsc AR f 0 * e) where c = EnvNum (-4.0) e = envGen KR 1 a 0 1 removeSynth (envPerc 0.1 0.6 1 [c,c]) latency = 0.01 bundle t m = OscB (t + latency) m

Re: [Haskell-cafe] Great language shootout: reloaded

2006-11-10 Thread Henk-Jan van Tuyl
On Fri, 10 Nov 2006 01:44:15 +0100, Donald Bruce Stewart [EMAIL PROTECTED] wrote: So back in January we had lots of fun tuning up Haskell code for the Great Language Shootout[1]. We did quite well at the time, at one point ranking overall first[2]. [...] Haskell suddenly dropped several

Re: [Haskell-cafe] Great language shootout: reloaded

2006-11-10 Thread Sebastian Sylvan
On 11/10/06, Henk-Jan van Tuyl [EMAIL PROTECTED] wrote: On Fri, 10 Nov 2006 01:44:15 +0100, Donald Bruce Stewart [EMAIL PROTECTED] wrote: So back in January we had lots of fun tuning up Haskell code for the Great Language Shootout[1]. We did quite well at the time, at one point ranking

Re: [Haskell-cafe] Great language shootout: reloaded

2006-11-10 Thread Tony Morris
Sebastian Sylvan wrote: On 11/10/06, Henk-Jan van Tuyl [EMAIL PROTECTED] wrote: On Fri, 10 Nov 2006 01:44:15 +0100, Donald Bruce Stewart [EMAIL PROTECTED] wrote: So back in January we had lots of fun tuning up Haskell code for the Great Language Shootout[1]. We did quite well at the time,

[Haskell-cafe] Great language shootout: reloaded

2006-11-10 Thread Isaac Gouy
On 11/10/06, Henk-Jan van Tuyl hjgtuyl at chello.nl wrote: Haskell suddenly dropped several places in the overall socre, when the size measurement changed from line-count to number-of-bytes after gzipping. Maybe it's worth it, to study why this is; Haskell programs are often much more

Re: [Haskell-cafe] Great language shootout: reloaded

2006-11-10 Thread Donald Bruce Stewart
igouy2: On 11/10/06, Henk-Jan van Tuyl hjgtuyl at chello.nl wrote: Haskell suddenly dropped several places in the overall socre, when the size measurement changed from line-count to number-of-bytes after gzipping. Maybe it's worth it, to study why this is; Haskell programs are

Re: [Haskell-cafe] Re: Livecoding music in Haskell

2006-11-10 Thread Rohan Drape
When I run this, then SuperCollider emits the error FAILURE ew Command not found Do you use some new feature? No, however you may need to run darcs update, there was an error in the OSC bundle encoder that I located writing that example: Wed Nov 8 21:29:28 EST 2006 Rohan Drape [EMAIL

Re: [Haskell-cafe] Re: aggressiveness of functional dependencies

2006-11-10 Thread Nicolas Frisby
First off, thanks for the reply. I am accustomed to GHC ignoring instance contexts as you mentioned. It's the mostly part that I'm curious about: mostly implies there's some phases that don't ignore context. Is that only the checking the type of the method definitions and absolutely nothing