Re: [Haskell-cafe] Re: AT solution: rebinding = for restricted monads

2007-02-27 Thread Pepe Iborra
Did anyone with knowledge of Associated Types pursue this solution? Where did you get this from. My haskell-cafe mail folder doesn't seem to have the thread you are replying to. Sorry I replied from gmane; I should have included a link to the original thread, but I really expected gmane

Re[2]: [Haskell-cafe] FFI basics

2007-02-27 Thread Bulat Ziganshin
Hello Evan, Tuesday, February 27, 2007, 12:02:57 AM, you wrote: Unfortunately, ghc doesn't seem relink the target if cfile.o changed, so as a hack I put 'rm target' before the ghc line to make it link every time. it's a bug. i don't know whether it's already fixed, try it with the latest 6.6

[Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-27 Thread Fawzi Mohamed
On Feb 27, 2007, at 1:59 PM, Sven Panne wrote: On Tuesday 27 February 2007 13:44, Andrzej Jaworski wrote: I have learned logic from much deeper sources;-) My statement was: Guys started in Haskell and got to conclusion that for performance reasons it is better to move to C. The guys know

[Haskell-cafe] Logic programming using lazy evaluation

2007-02-27 Thread Henning Thielemann
I suspect that someone has already done this: A Haskell library which solves a system of simple equations, where it is only necessary to derive a value from an equation where all but one variables are determined. Say 1+2=x -- add 1 2 x y*z=20 -- times y z 20 x+y=5 -- add x y 5

[Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-27 Thread Fawzi Mohamed
On Feb 27, 2007, at 3:51 PM, Andrzej Jaworski wrote: [...] Nevertheless my point is still valid: when on compiler side the heap is stretched and on program side you need Ockham's Razor in action Haskell chokes. I hoped at least to stimulate interest in repeating GP experiment with latest

Re: [Haskell-cafe] Trouble with record syntax and classes

2007-02-27 Thread Andreas Rossberg
[EMAIL PROTECTED] wrote: When you type class Foo in Java or C++, it does three things: 1. It declares a new type called Foo. 2. It declares a _set_ of types (i.e. a class). 3. It declares that the type Foo (and all of its subtypes) is a member of the set of types Foo. I would add: 4.

[Haskell-cafe] Re: problems installing ghc 6.6 with extralibs (bad interface file)

2007-02-27 Thread Thomas Hartman
Thanks. I incorporated these changes, and it cranks longer now before failing. But still fails, now with a seg fault. Does this just mean I don't have enough ram, or cpu, or ... Any ideas? thomas. * [EMAIL PROTECTED]:~/haskellInstalls$ tail -n13 out.txt ../compiler/ghc-inplace

Re: [Haskell-cafe] Logic programming using lazy evaluation

2007-02-27 Thread Ulf Norell
On 2/27/07, Henning Thielemann [EMAIL PROTECTED] wrote: I suspect that someone has already done this: A Haskell library which solves a system of simple equations, where it is only necessary to derive a value from an equation where all but one variables are determined. Say You might want to

[Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-27 Thread Claus Reinke
I hoped at least to stimulate interest in repeating GP experiment with latest GHC version. until that happens, I'd be wary to draw too many conclusions for today's applications from this paper. two orders of magnitude difference would seem to imply programming problems to me (though the

[Haskell-cafe] Re: overlapping instances, selecting if type a does not belong to class?

2007-02-27 Thread Marc Weber
However, it seems that your particular problem can be solved with simpler means: instance (HList a) = HListAppendArbitrary a HNil a where hAppendArbitrary a _ = a instance (HList a, HList b, HList c) = HListAppendArbitrary a (HCons b d) c where hAppendArbitrary a b = hAppend

[Haskell-cafe] Declaring variance of class parameters?

2007-02-27 Thread Jacques Carette
If I have a class, say class Symantics repr where int:: Int - repr Int and so on, I would like to *require* that 'repr' be covariant. Is there any way to do that? Jacques ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Declaring variance of class parameters?

2007-02-27 Thread Ross Paterson
On Tue, Feb 27, 2007 at 02:00:29PM -0500, Jacques Carette wrote: If I have a class, say class Symantics repr where int:: Int - repr Int and so on, I would like to *require* that 'repr' be covariant. Is there any way to do that? class Functor repr = Symantics repr would be

Re: [Haskell-cafe] Logic programming using lazy evaluation

2007-02-27 Thread Henning Thielemann
On Tue, 27 Feb 2007, Ulf Norell wrote: On 2/27/07, Henning Thielemann [EMAIL PROTECTED] wrote: I suspect that someone has already done this: A Haskell library which solves a system of simple equations, where it is only necessary to derive a value from an equation where all but one

Re: [Haskell-cafe] Re: Trouble with record syntax and classes

2007-02-27 Thread Albert Y. C. Lai
Thomas Nelson wrote: data ISine = Sine Integer Integer Integer String | MetaSine Integer Integer Integer [ISine] Having advised you to use different field names for different record types last time, I now confuse you by saying you can share field names in the different cases

Re: [Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-27 Thread Duncan Coutts
On Tue, 2007-02-27 at 16:51 +, Claus Reinke wrote: okay, profiling was not available for the Haskell version back then, but using ML profiling to improve a Haskell version sounds highly dangerous to me, even more so if the authors do not even mention any awareness of this danger. in

[Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-27 Thread Andrzej Jaworski
On 2/26/07, Kirsten Chevalier honored me with his attention: Can you clarify what you mean by this? How do you formally prove that a programming language (rather than a specific implementation of one) performs better for a given problem? (..) It is about my saying:SML was exhaustively proved to

Re: [Haskell-cafe] Logic programming using lazy evaluation

2007-02-27 Thread Chris Kuklewicz
Henning Thielemann wrote: I suspect that someone has already done this: A Haskell library which solves a system of simple equations, where it is only necessary to derive a value from an equation where all but one variables are determined. Say 1+2=x -- add 1 2 x y*z=20 -- times y z

[Haskell-cafe] What inhabits this type: (forall a. a - b) - (forall a. m a - m b)

2007-02-27 Thread Jacques Carette
Since my last query was answered so quickly, let's try another. I have looked on Hoogle. I would have asked Djinn, but I don't have it around. So, can someone find a term that inhabits (forall a. a - b) - (forall a. m a - m b) ? I think of this as the type of functions that, given a

Re: [Haskell-cafe] What inhabits this type: (forall a. a - b) - (forall a. m a - m b)

2007-02-27 Thread Stefan O'Rear
On Tue, Feb 27, 2007 at 06:01:44PM -0500, Jacques Carette wrote: Since my last query was answered so quickly, let's try another. I have looked on Hoogle. I would have asked Djinn, but I don't have it No you couldn't. Djinn doesn't support rank2 types. (FWIW you can go to #haskell at

Re: [Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-27 Thread Claus Reinke
It'd be interesting to get the real code for this. Partly to just try optimising it but more so as a real test case for list/array fusion. As far as I see, there's no reason that consuming an assoc list of a bool vector with a foldl' (the ' is probably essential) should be slow. If it's fused

Re: [Haskell-cafe] What inhabits this type: (forall a. a - b) - (forall a. m a - m b)

2007-02-27 Thread Nicolas Frisby
The type doesn't actually indicate that the type m supports a return operation. I introduced the qualifier that it was a functor. You implicity introduced the constraint that it is a monad (actually a pointed functor, but that's a Monad's return operator). With that constraint, your thought

Re: [Haskell-cafe] Re: problems installing ghc 6.6 with extralibs (bad interface file)

2007-02-27 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas Hartman wrote: Thanks. I incorporated these changes, and it cranks longer now before failing. But still fails, now with a seg fault. Does this just mean I don't have enough ram, or cpu, or ... Any ideas? [...] gcc: Internal error:

Re: [Haskell-cafe] Re: problems installing ghc 6.6 with extralibs (bad interface file)

2007-02-27 Thread Seth Gordon
Thomas Hartman wrote: Thanks. I incorporated these changes, and it cranks longer now before failing. But still fails, now with a seg fault. * gcc: Internal error: Segmentation fault (program cc1) Please submit a full bug report. See URL:http://gcc.gnu.org/bugs.html for

Re: [Haskell-cafe] Plotting in Haskell

2007-02-27 Thread Tim Docker
Chirs Witte wrote: Are there any good libraries for drawing plots (2D and 3D) in Haskell (under Windows using GHC)? Dons has already mentioned my charting library: http://dockerz.net/software/chart.html This is 2D only for now. good depends your perspective :-) It is (intended to be)

Re: [Haskell-cafe] Re: problems installing ghc 6.6 with extralibs (bad interface file)

2007-02-27 Thread Paul Brown
On 2/27/07, Seth Gordon [EMAIL PROTECTED] wrote: Thomas Hartman wrote: Thanks. I incorporated these changes, and it cranks longer now before failing. But still fails, now with a seg fault. According to conventional wisdom, when gcc segfaults on a big compilation job (e.g., the Linux kernel),

[Haskell-cafe] Re: overlapping instances, selecting if type a does not belong to class?

2007-02-27 Thread oleg
The problem you report can be fixed with some trickery and local functional dependencies. I'd like to show a different solution, which follows a useful general pattern, of isolating overlapping instances to one small part of the program that analyzes the type. The rest of the type program just