Re: [Haskell-cafe] [GSoC] A data parallel physics engine

2008-03-13 Thread Roman Cheplyaka
* Manuel M T Chakravarty [EMAIL PROTECTED] [2008-03-13 12:30:40+1100] Indeed, a matrix library would be really nice. Before getting serious about this, please take a very close look at how PETSc (http://www-unix.mcs.anl.gov/petsc/) handles matrices. The abstraction is very important

[Haskell-cafe] Re: Reflective capabilities of Haskell (cont'd)

2008-03-13 Thread oleg
Martin Hofmann wrote: Thanks a lot, this helps a bit, but access to function bodies is exactly what I need. Then perhaps you might like the method of reconstructing bodies (of possibly compiled) functions http://okmij.org/ftp/Computation/Generative.html#diff-th in the form of AST --

[Haskell-cafe] Re: An offer to any haskell projects out there.

2008-03-13 Thread Bjorn Buckwalter
michael at schmong.org writes: Hello, My name is Michael Litchard. I'm a techie living in silicon valley, and I want to move into tech writing. I've got the background, now I need a portfolio. I figured the best way to go is to attach myself to some open source

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-13 Thread Luke Palmer
On Wed, Mar 12, 2008 at 4:45 PM, Donn Cave [EMAIL PROTECTED] wrote: Well, the problem inherently requires a certain order of evaluation. But if you will just handle pattern match failure in the IO monad, then you can write a simple functional expression of the problem instead, let

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-13 Thread Henning Thielemann
On Wed, 12 Mar 2008, Donn Cave wrote: On Mar 12, 2008, at 2:10 PM, Henning Thielemann wrote: On Wed, 12 Mar 2008, Donn Cave wrote: On Mar 12, 2008, at 12:32 PM, Brandon S. Allbery KF8NH wrote: On Mar 12, 2008, at 14:17 , Donn Cave wrote: Sure. It isn't a lot of code, so I subjected it

Re: [Haskell-cafe] floating point operations and representation

2008-03-13 Thread Henning Thielemann
On Wed, 12 Mar 2008, Don Stewart wrote: I am under the restriction that I need to write Haskell programs using Double which mimic existing C/C++ programs or generated data sets, and get the same answers. (It's silly, but take it as a given requirement.) If the C programs are using log2, then

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Adrian Hey
[EMAIL PROTECTED] wrote: G'day all. Adrian Hey wrote: This might be a reasonable thing to say about *sortBy*, but not sort as the ordering of equal elements should not be observable (for any correct instance of Ord). It should be impossible to implement a function which can discriminate

Re: [Haskell-cafe] An offer to any haskell projects out there.

2008-03-13 Thread Benjamin L. Russell
I am also interested in helping out in this manner, particularly with HaskellWiki. I work as a patent translator in Tokyo, and my specialty is technical translation. In particular, I could help write English-language documentation on Haskell and also translate such documentation into Japanese

[Haskell-cafe] Template Haskell -- when are things evaluated?

2008-03-13 Thread Emil Axelsson
Hello all! Up until yesterday I thought I understood the basics of Template Haskell, but now I'm a little confused. Consider the following code module A where a1 = [| (2::Int) + 2 |] a2 = let x = (2::Int) + 2 in [| x |] a3 = [| y |] where y = (2::Int) + 2 z

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Luke Palmer
On Thu, Mar 13, 2008 at 1:00 AM, Adrian Hey [EMAIL PROTECTED] wrote: AFAICT the report is ambiguous about this, or at least the non-intutive equality semantics are not at all clear to me from what I can see in the Eq class definition (para 6.3.1). I think an the absence of any clear and

Re: [Haskell-cafe] Template Haskell -- when are things evaluated?

2008-03-13 Thread Alfonso Acosta
Hi Emil, Your problem is related to how are things evaluated not when. The short answer is: if you want to make sure an expression is evaluated before you lift it, don't use quasiquotes, call Language.Haskell.TH.lift On Thu, Mar 13, 2008 at 9:00 AM, Emil Axelsson [EMAIL PROTECTED] wrote:

RE: [Haskell-cafe] Termination of substitution

2008-03-13 Thread Simon Peyton-Jones
As Stefan says, System Fw is strongly normalising. This is a remarkable result because (as you observe) it's very non-obvious how to prove it. However GHC goes beyond Fw by adding data types letrec This blows strong normalisation out of the water. (Assuming you have reasonable

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Luke Palmer
On Thu, Mar 13, 2008 at 3:02 AM, Adrian Hey [EMAIL PROTECTED] wrote: The report doesn't state that for all Ints, (x==y = True) implies that x=y. There's no reason to suppose the Int instance is in any way special, so do you really seriously consider the possibility that this might not hold

Some clarity please! (was Re: [Haskell-cafe] Re: (flawed?) benchmark : sort)

2008-03-13 Thread Adrian Hey
Hello All, I'm top posting because I'm getting bored and frustrated with this thread and I don't want to respond detail to everything Aaron has said below. Aaron: Where are you getting this equivalence stuff from? Searching the report for the word equivalence the only remotely relevant section

Re: [Haskell-cafe] floating point operations and representation

2008-03-13 Thread Ketil Malde
Jacob Schwartz [EMAIL PROTECTED] writes: A test on IEEE computers (x86 and x86-64), shows that for a range of 64-bit double values, the answers in C do differ (in the last bit) if you use log2(x) and log10(x) versus log (x) / log(2) and log(x) / log(10). I think this may also depend on C

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Adrian Hey
Luke Palmer wrote: On Thu, Mar 13, 2008 at 1:00 AM, Adrian Hey [EMAIL PROTECTED] wrote: AFAICT the report is ambiguous about this, or at least the non-intutive equality semantics are not at all clear to me from what I can see in the Eq class definition (para 6.3.1). I think an the absence of

[Haskell-cafe] Re: unification

2008-03-13 Thread Christian Maeder
andrea wrote: data Tipo = Var Int | Const String | Tipo :- Tipo deriving (Show, Eq) But now how can I do to make the set of Const fixed?? I want just a few base types, like int and string, how could I define it? your base types could be: Const String :: Tipo Const Int :: Tipo and the

Re: [Haskell-cafe] File I/O question

2008-03-13 Thread Bjorn Bringert
On Wed, Mar 12, 2008 at 10:03 PM, Andrew Coppin [EMAIL PROTECTED] wrote: Don Stewart wrote: Hey Andrew, What are you trying to do? Read and write to the same file (if so, you need to use strict IO), or are you trying something sneakier? I have a long-running Haskell program that

[Haskell-cafe] Re: Re: Re: Reflective capabilities of Haskell (cont'd)

2008-03-13 Thread Martin Hofmann
On Wed, 2008-03-12 at 15:59 -0400, Jeff Polakow wrote: Data.Generics allows you to do this (to a certain extent), i.e. there is a function dataTypeConstrs :: DataType - [Constr] It might be hard, or even impossible, to get Data.Typeable and Data.Generics to play with each

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Adrian Hey
Luke Palmer wrote: On Thu, Mar 13, 2008 at 3:02 AM, Adrian Hey [EMAIL PROTECTED] wrote: The report doesn't state that for all Ints, (x==y = True) implies that x=y. There's no reason to suppose the Int instance is in any way special, so do you really seriously consider the possibility that

Re: [Haskell-cafe] Template Haskell -- when are things evaluated?

2008-03-13 Thread Emil Axelsson
Aha, I guess I thought for a while that [|x|] and lift x where the same thing. Having thought too much about partial evaluation lately, I forgot that the main purpose of quoting is to get the unevaluated AST. I'll just use lift in the future then (for partial evalutation). Thanks, Alfonso!

[Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Aaron Denney
On 2008-03-13, Adrian Hey [EMAIL PROTECTED] wrote: But the trouble is the report says practically *nothing* about Eq class or what the (==) operator means. It all seems to be assumed, and even when it does talk about it informally it talks about equality, not equivalence or some other word.

[Haskell-cafe] Re: floating point operations and representation

2008-03-13 Thread Wilhelm B. Kloke
Jacob Schwartz [EMAIL PROTECTED] schrieb: I have two questions about using the Double data type and the operations in the Floating typeclass on a computer that uses IEEE floating point numbers. I notice that the Floating class only provides log (presumably log base 'e') and logBase (which,

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Adrian Hey
Aaron Denney wrote: so do you really seriously consider the possibility that this might not hold in your Int related code? if (x==y) then f x else g x y might not mean the same as.. if (x==y) then f y else g x y In Int code, of course not, because I know the types, and I know the behaviour

Re: [Haskell-cafe] Template Haskell -- when are things evaluated?

2008-03-13 Thread Emil Axelsson
I'm reading the following rule from your answer: [|exp|] normally returns the unevaluated AST of exp. However, if exp contains local variables, these are lifted using Language.Haskell.TH.lift (i.e. evaluated before lifting). Is that correct? / Emil On 2008-03-13 09:49, Alfonso Acosta

[Haskell-cafe] Re: Some clarity please! (was Re: Re: (flawed?) benchmark : sort)

2008-03-13 Thread Aaron Denney
On 2008-03-13, Adrian Hey [EMAIL PROTECTED] wrote: Hello All, I'm top posting because I'm getting bored and frustrated with this thread and I don't want to respond detail to everything Aaron has said below. Aaron: Where are you getting this equivalence stuff from? Not from the prose in the

[Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Aaron Denney
On 2008-03-13, Adrian Hey [EMAIL PROTECTED] wrote: Aaron Denney wrote: so do you really seriously consider the possibility that this might not hold in your Int related code? if (x==y) then f x else g x y might not mean the same as.. if (x==y) then f y else g x y In Int code, of course

Re: [Haskell-cafe] Re: Some clarity please!

2008-03-13 Thread Ketil Malde
Aaron Denney [EMAIL PROTECTED] writes: Well, the way the report specifies that max's default definition is. I'd actually favor making that not an instance function at all, and instead have max and min be external functions. If you permit a naïve question: Prelude :i Ord class (Eq a) = Ord a

Re: [Haskell-cafe] An offer to any haskell projects out there.

2008-03-13 Thread Hans van Thiel
On Tue, 2008-03-11 at 18:46 -0400, [EMAIL PROTECTED] wrote: Hello, My name is Michael Litchard. I'm a techie living in silicon valley, and I want to move into tech writing. I've got the background, now I need a portfolio. I figured the best way to go is to attach

[Haskell-cafe] Re: Some clarity please! (was Re: Re: (flawed?) benchmark : sort)

2008-03-13 Thread Christian Maeder
Adrian Hey wrote: 2 - It does matter, and the result is guaranteed to be the last maximum in all cases because: (x==y) = True implies max x y = y This seems to be the case looking into GHC/Base.lhs max x y = if x = y then y else x Christian

[Haskell-cafe] Re: Some clarity please!

2008-03-13 Thread Aaron Denney
On 2008-03-13, Ketil Malde [EMAIL PROTECTED] wrote: Aaron Denney [EMAIL PROTECTED] writes: Well, the way the report specifies that max's default definition is. I'd actually favor making that not an instance function at all, and instead have max and min be external functions. If you permit

Re: [Haskell-cafe] floating point operations and representation

2008-03-13 Thread Lennart Augustsson
Wow, you have a tough mission if you want to replicate the bit level answers for double (btw, hi Jacob). Libraries differ for transcendental function, and even worse, CPUs differ. You may get different answers on an Intel and and AMD. That said, I think your best bet is to import log2 and log10

Re: [Haskell-cafe] floating point operations and representation

2008-03-13 Thread Jan-Willem Maessen
On Mar 12, 2008, at 8:35 PM, Jacob Schwartz wrote: My second question is how to get at the IEEE bit representation for a Double. My (rhetorical) question on this front isn't how do I get the representation, but why is it so hard and non-portable to get the representation sensibly? A

Re: [Haskell-cafe] IO () and IO [()]

2008-03-13 Thread Lennart Augustsson
I don't think writing (1,) is an option for Haskell, it looks like a section (and should be one). On Wed, Mar 12, 2008 at 9:13 PM, Bryan O'Sullivan [EMAIL PROTECTED] wrote: Lennart Augustsson wrote: Yes, I wish Haskell had a 1-tuple. The obvious syntax is already taken, but I could accept

Re: [Haskell-cafe] File I/O question

2008-03-13 Thread Bulat Ziganshin
Hello Andrew, Wednesday, March 12, 2008, 10:06:44 PM, you wrote: When I write to a file using System.IO, the file is locked for exclusive access. I gather this is as specified in the Haskell Report. Which is nice, but... I'd actually prefer the file to *not* be locked. Anybody know how to

Re: [Haskell-cafe] Bug with GADT in function Patterns?

2008-03-13 Thread Hugo Pacheco
Submited: http://hackage.haskell.org/trac/ghc/ticket/2151#preview hugo ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] floating point operations and representation

2008-03-13 Thread Henning Thielemann
On Thu, 13 Mar 2008, Lennart Augustsson wrote: Wow, you have a tough mission if you want to replicate the bit level answers for double (btw, hi Jacob). Libraries differ for transcendental function, and even worse, CPUs differ. You may get different answers on an Intel and and AMD. That

[Haskell-cafe] Problem making a program in ghc

2008-03-13 Thread Maverick
Hi, I have a problem when I am trying to use a binary file generated by ghc make in Windows. Ihave writed an application that parses xml files and returns a result(using HaXml), this is published as a service, I implemented a server(withSocketsDo), the server listen the port 5760 in a

Re: [Haskell-cafe] Template Haskell -- when are things evaluated?

2008-03-13 Thread Alfonso Acosta
On Thu, Mar 13, 2008 at 11:13 AM, Emil Axelsson [EMAIL PROTECTED] wrote: I'm reading the following rule from your answer: [|exp|] normally returns the unevaluated AST of exp. However, if exp contains local variables, these are lifted using Language.Haskell.TH.lift (i.e. evaluated before

Re: [Haskell-cafe] floating point operations and representation

2008-03-13 Thread Alfonso Acosta
On Thu, Mar 13, 2008 at 1:35 AM, Jacob Schwartz [EMAIL PROTECTED] wrote: I have two questions about using the Double data type and the operations in the Floating typeclass on a computer that uses IEEE floating point numbers. I notice that the Floating class only provides log (presumably

Re: [Haskell-cafe] floating point operations and representation

2008-03-13 Thread Brandon S. Allbery KF8NH
On Mar 13, 2008, at 5:12 , Ketil Malde wrote: Perhaps now everybody uses SSE to do math, but earlier Intel FPU architectures did floating point with 80-bit registers, so the accuracy of the result could depend on whether an intermediate result was flushed to memory (by a context switch).

Re: [Haskell-cafe] Space leak - help needed

2008-03-13 Thread Bertram Felgenhauer
Krzysztof Kościuszkiewicz wrote: I have tried both Poly.StateLazy and Poly.State and they work quite well - at least the space leak is eliminated. Now evaluation of the parser state blows the stack... The code is at http://hpaste.org/6310 Apparently, stUpdate is too lazy. I'd define

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-13 Thread Donn Cave
On Mar 12, 2008, at 11:23 PM, Luke Palmer wrote: The issue is that exception handling semantics do induce an order of evaluation for determinacy: if both functions in a composition throw an exception at some point (say in the 3rd element of a list they're generating), you need to decide which

Re: [Haskell-cafe] File I/O question

2008-03-13 Thread Andrew Coppin
Bulat Ziganshin wrote: Hello Andrew, one (and only?) possible way is to use Streams library which happens to not lock files: Is that likely to compile on Windows? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] A question about monad laws

2008-03-13 Thread Wolfgang Jeltsch
Am Mittwoch, 12. März 2008 00:53 schrieb askyle: […] So if floating point (==) doesn't correspond with numeric equality, it's not FP's fault, but ours for expecting it to do! No, I think, it’s the Prelude’s fault to define (==) as “floating point equality”. We should us a different

Re: [Haskell-cafe] Problem making a program in ghc

2008-03-13 Thread Adam Langley
2008/3/13 Maverick [EMAIL PROTECTED]: I have writed an application that parses xml files and returns a result (using HaXml), this is published as a service, I implemented a server (withSocketsDo), the server listen the port 5760 in a forever fashion, when a message arrives, then the program

Re: [Haskell-cafe] A question about monad laws

2008-03-13 Thread Dan Weston
Not to be picky, but where did you hear that (==) established an equivalence relation? Not I expect from the Haskell98 Report! The only law I can find there is that x /= y iff not (x == y) So, the definition x == y = False x /= y = True would be perfectly legitimate,

[Haskell-cafe] Re: Exception handling when using STUArray

2008-03-13 Thread Ben Franksen
Luke Palmer wrote: On Wed, Mar 12, 2008 at 4:45 PM, Donn Cave [EMAIL PROTECTED] wrote: Well, the problem inherently requires a certain order of evaluation. But if you will just handle pattern match failure in the IO monad, then you can write a simple functional expression of the problem

[Haskell-cafe] Video / Slides: Type-driven testing in Haskell (Simon Peyton Jones)

2008-03-13 Thread Robert Hulme
I was lucky enough to attend a lecture by SPJ yesterday. You're lucky that I taped it and have put it all online :-) http://www.foomongers.org.uk/videos/spj-typedriventestinginhaskell.html If you're a redditer please vote it up on programming.reddit!

Re: Some clarity please! (was Re: [Haskell-cafe] Re: (flawed?) benchmark : sort)

2008-03-13 Thread Conor McBride
Hi folks I'm late into this thread, so apologies if I'm being dim. On 13 Mar 2008, at 16:17, [EMAIL PROTECTED] wrote: Adrian Hey [EMAIL PROTECTED] wrote: I would ask for any correct Eq instance something like the law: (x==y) = True implies x=y (and vice-versa) I wish I knew what =

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread David Menendez
On Wed, Mar 12, 2008 at 4:29 PM, Aaron Denney [EMAIL PROTECTED] wrote: When defining max, yes, you must take care to make sure it useable for cases when Eq is an equivalence relation, rather than equality. If you're writing library code, then it won't generally know whether Eq means true

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread ajb
G'day all. Quoting Adrian Hey [EMAIL PROTECTED]: I take it you mean something like .. Err... yes, I did. Where's the Eq instance for OrdWrap? Omitted for brevity. This may or may not satisfy the law: (compare a b) = EQ implies (a == b) = True. I think everbody agrees about that, but I

Re: [Haskell-cafe] Space leak - help needed

2008-03-13 Thread Krzysztof Kościuszkiewicz
On Thu, Mar 13, 2008 at 05:52:05PM +0100, Bertram Felgenhauer wrote: ... Now evaluation of the parser state blows the stack... The code is at http://hpaste.org/6310 Apparently, stUpdate is too lazy. I'd define stUpdate' :: (s - s) - Parser s t () stUpdate' f = stUpdate f

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Conor McBride
Hi On 13 Mar 2008, at 22:28, [EMAIL PROTECTED] wrote: G'day all. Quoting Adrian Hey [EMAIL PROTECTED]: What's disputed is whether or not this law should hold: (a == b) = True implies a = b Apart from possibly your good self, I don't think this is disputed. Quotient types, as noted

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Adrian Hey
[EMAIL PROTECTED] wrote: What's disputed is whether or not this law should hold: (a == b) = True implies a = b Apart from possibly your good self, I don't think this is disputed. If that's supposed it imply you think I'm in a minority of one I don't think you've been following this thread

[Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Aaron Denney
On 2008-03-13, Conor McBride [EMAIL PROTECTED] wrote: Hi On 13 Mar 2008, at 22:28, [EMAIL PROTECTED] wrote: G'day all. Quoting Adrian Hey [EMAIL PROTECTED]: What's disputed is whether or not this law should hold: (a == b) = True implies a = b Apart from possibly your good self, I don't

[Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Aaron Denney
On 2008-03-13, David Menendez [EMAIL PROTECTED] wrote: On Wed, Mar 12, 2008 at 4:29 PM, Aaron Denney [EMAIL PROTECTED] wrote: When defining max, yes, you must take care to make sure it useable for cases when Eq is an equivalence relation, rather than equality. If you're writing library

Re: [Haskell-cafe] Space leak - help needed

2008-03-13 Thread Krzysztof Kościuszkiewicz
On Wed, Mar 12, 2008 at 12:34:38PM -0700, Justin Bailey wrote: The stack blows up when a bunch of unevaluated thunks build up, and you try to evaluate them. One way to determine where those thunks are getting built is to use GHCs retainer profiling. Retainer sets will show you the call stack

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread ajb
G'day all. Quoting Conor McBride [EMAIL PROTECTED]: How depressing! Sorry, I don't understand that. Quotient types are good, but they're not the whole story. They just happen to be one use case with a solid history behind them. it's just that we need to manage information hiding

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Conor McBride
Hi On 13 Mar 2008, at 23:33, Aaron Denney wrote: On 2008-03-13, Conor McBride [EMAIL PROTECTED] wrote: Hi On 13 Mar 2008, at 22:28, [EMAIL PROTECTED] wrote: G'day all. Quoting Adrian Hey [EMAIL PROTECTED]: What's disputed is whether or not this law should hold: (a == b) = True implies a

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread ajb
G'day all. Quoting Adrian Hey [EMAIL PROTECTED]: If that's supposed it imply you think I'm in a minority of one I don't think you've been following this thread very well. Sorry, that was a bit of hyperbole. Even the report uses the word equality in the prose. Indeed, and the only

Re: Some clarity please! (was Re: [Haskell-cafe] Re: (flawed?) benchmark : sort)

2008-03-13 Thread Conor McBride
Hi On 13 Mar 2008, at 23:42, [EMAIL PROTECTED] wrote: Conor McBride [EMAIL PROTECTED] responded to my comment: (mapMonotonic should of course be removed, too, or specified to fail (preferably in some MonadZero) if the precondition is violated, which should still be implementable in linear

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-13 Thread Robert Dockins
On Thursday 13 March 2008 07:33:12 pm Aaron Denney wrote: [snip] I've seen mention of difficulties with Data.Map, and edison, but not in enough detail to really grasp what the problems are. Until I do, my natural bias (which I'm trying to resist, really) is that it's a matter of lazy coding,

[Haskell-cafe] Ackermann Function Memoization, GHC Weird Output or Bug?

2008-03-13 Thread Donnie Jones
Hello, I'm learning Haskell, so I was attempting memoization based upon the Fibonacci examples but for the Ackermann function. In my tests, I found what seems to be truncated output. See my comments at the end of the code for the test cases and output. ### Begin Code ### module Main where

Re: Some clarity please! (was Re: [Haskell-cafe] Re: (flawed?) benchmark : sort)

2008-03-13 Thread Roman Leshchinskiy
Adrian Hey wrote: I would ask for any correct Eq instance something like the law: (x==y) = True implies x=y (and vice-versa) which implies f x = f y for all definable f which implies (f x == f y) = True (for expression types which are instances of Eq). This pretty much requires structural

Re: [Haskell-cafe] Problem making a program in ghc

2008-03-13 Thread Sterling Clover
This answer may be way off base, but if differences appear between ghci and compiled versions, I've often found its as simple as remembering to compile with the -threaded flag. The ghci runtime is threaded by default, as I understand it, while compiled binaries are not, and IO operations

Re: [Haskell-cafe] Ackermann Function Memoization, GHC Weird Output or Bug?

2008-03-13 Thread Brandon S. Allbery KF8NH
On Mar 13, 2008, at 23:47 , Donnie Jones wrote: It seems if I don't choose an upper bound pair for (m,n) that is large enough I get truncated output for the answer, instead of GHC giving me an array index exception... This behavior seems very odd to me, can someone explain? Or is this a

[Haskell-cafe] Naming as infection

2008-03-13 Thread Greg Meredith
All, Here http://biosimilarity.blogspot.com/2008/03/naming-as-dialectic.html is a deliberately provocative posting (with running code and a shameless plug for BNFC) on the process of introducing naming and name management into the design of data structures. Comments greatly appreciated. Best