[Haskell-cafe] Re: I love purity, but it's killing me.

2008-02-13 Thread Chung-chieh Shan
Henning Thielemann [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: It seems to become a FAQ. I think all DSLs suffer from the same problems: sharing and recursion. I've used wrappers for CSound, SuperCollider, MetaPost, they all have these problems. What

[Haskell-cafe] hoogle gtk2hs

2008-02-13 Thread Gour
Hi! Emacs haskell-mode has haskell-hoogle function to search Haskell API, but it, unfortunately, does not work with gtk2hs API which can be accessed via web at http://haskell.org/hoogle/?package=gtk Any plan to integrate Gtk2Hs so it becomes accessible via haskell-hoogle function? Sincerely,

[Haskell-cafe] Announce : Sydney (Australia) Functional Programming Group

2008-02-13 Thread Erik de Castro Lopo
Hi all, I'd like to announce the FP-SYD, the Sydney (Australia) Functional Programming group. The intro page is here: http://groups.google.com/group/fp-syd To subscribe to the mailing list (mainly for meeting organisation, meeting announcements, and Sydney job offers) either go to the URL

[Haskell-cafe] Designing DSL with explicit sharing [was: I love purity, but it's killing me]

2008-02-13 Thread oleg
Tom Hawkins wrote: ] My DSLs invariably define a datatype to capture expressions; something ] like this: ] ] data Expression ] = Add Expression Expression ] | Sub Expression Expression ] | Variable String ] | Constant Int ] deriving Eq ] The problem comes when I want to generate

Re: [Haskell-cafe] Foreign.C.Types question ...

2008-02-13 Thread Magnus Therning
On 2/12/08, Galchin Vasili [EMAIL PROTECTED] wrote: Hello, http://cvs.haskell.org/Hugs/pages/libraries/base/Foreign-C-Types.html .. I want to look at the actual code for these C types so that I can see how the instances of Storable for each type are coded so e.g. I can see how

Re: [Haskell-cafe] Designing DSL with explicit sharing [was: I love purity, but it's killing me]

2008-02-13 Thread Luke Palmer
On Feb 13, 2008 9:33 AM, [EMAIL PROTECTED] wrote: The approach is based on the final tagless representation. Here is our DSL: class Exp repr where constant :: Int - repr Int variable :: String - repr Int add :: repr Int - repr Int - repr Int sub :: repr Int - repr Int -

[Haskell-cafe] existential types

2008-02-13 Thread Simeon Mattes
I have found that ghc has adopted the existential data constructors. Because it was first time I have heard this term I have found some articles about it. The less complex for me was the following explanation data Worker x y = Worker {buffer :: b, input :: x, output :: y} This is wrong in

Re: [Haskell-cafe] existential types

2008-02-13 Thread Henning Thielemann
On Wed, 13 Feb 2008, Simeon Mattes wrote: I have found that ghc has adopted the existential data constructors. Because it was first time I have heard this term I have found some articles about it. The less complex for me was the following explanation data Worker x y = Worker {buffer :: b,

[Haskell-cafe] ANN: unix-pty-light 0.1

2008-02-13 Thread Stuart Cook
A little while ago, I needed bindings for creating and accessing a pseudo-terminal device. Since I couldn't find any in the unix package, I wrote my own. Later, I found out that unix-2.2.0.0 does indeed contain pseudo-terminal bindings, but unfortunately it seems to be incompatible with my

Re: [Haskell-cafe] existential types

2008-02-13 Thread Daniil Elovkov
Simeon Mattes wrote: I have found that ghc has adopted the existential data constructors. Because it was first time I have heard this term I have found some articles about it. The less complex for me was the following explanation data Worker x y = Worker {buffer :: b, input :: x, output :: y}

[Haskell-cafe] Haskell wiki is searched by google.

2008-02-13 Thread Daniil Elovkov
Hello I remember there was a problem with haskell wiki pages not being indexed and searched. Now it seems to work perfectly. Actually typing 'monomorphism restriction' in google I see the appropriate wiki page as the first result. I must have missed the moment when it was fixed. Just

Re: [Haskell-cafe] Haskell wiki is searched by google.

2008-02-13 Thread Richard Kelsall
Daniil Elovkov wrote: Hello I remember there was a problem with haskell wiki pages not being indexed and searched. Now it seems to work perfectly. Actually typing 'monomorphism restriction' in google I see the appropriate wiki page as the first result. I must have missed the moment when

Re: [Haskell-cafe] Designing DSL with explicit sharing [was: I love purity, but it's killing me]

2008-02-13 Thread Matthew Naylor
Hi Oleg, it's not immediately clear (to me at least) how efficient your method will be in practice. Any method based on common sub-expression elimination surely must inspect every node in the flattened graph. In the worst case, an acyclic graph containing n nodes could have 2^n nodes when

Re: [Haskell-cafe] Haskell wiki is searched by google.

2008-02-13 Thread Daniil Elovkov
Richard Kelsall wrote: Daniil Elovkov wrote: Hello I remember there was a problem with haskell wiki pages not being indexed and searched. Now it seems to work perfectly. Actually typing 'monomorphism restriction' in google I see the appropriate wiki page as the first result. I must have

Re: [Haskell-cafe] Haskell wiki is searched by google.

2008-02-13 Thread Richard Kelsall
Daniil Elovkov wrote: Richard Kelsall wrote: Daniil Elovkov wrote: Hello I remember there was a problem with haskell wiki pages not being indexed and searched. Now it seems to work perfectly. Actually typing 'monomorphism restriction' in google I see the appropriate wiki page as the first

Re: [Haskell-cafe] existential types

2008-02-13 Thread Jake McArthur
Oops, I was hasty in typing those data definitions. They will not work because they have no constructors. Sorry about that. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] existential types

2008-02-13 Thread Felipe Lessa
On Feb 13, 2008 2:41 PM, Jake McArthur [EMAIL PROTECTED] wrote: Now we can have NumericLists like [1 :: Int, 5.7 :: Double, 4%5 :: Rational]. No, we can't =). Using data NumericList = forall a . Num a = N [a] *Main let a = N [1::Int,2,3,4] *Main let b = N [1::Double,2,3,4] *Main let c = N

[Haskell-cafe] Re: existential types

2008-02-13 Thread Simeon Mattes
The help of all was very useful. But since Jake gave me an example I prefer to follow this up. Although I 'm not so familiar generally with datatypes I have understood you. It seems in this example that with existential types we can put in the same list different types although generally this is

Re: [Haskell-cafe] ANN: Leksah 0.1 - Haskell IDE written in Haskell

2008-02-13 Thread Justin Bailey
That looks really cool and I'd like to try it out. Can you provide links to these packages? gtk =0.9.12, glib =0.9.12, sourceview =0.9.12, binary =0.4.1 I just don't have time to track them down myself ... Justin ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ANN: Leksah 0.1 - Haskell IDE written in Haskell

2008-02-13 Thread Antoine Latter
The package `binary' should be on hackage.haskell.org. The others can be found in gtk2hs, I think: http://www.haskell.org/gtk2hs/ Antoine On Feb 13, 2008 11:52 AM, Justin Bailey [EMAIL PROTECTED] wrote: That looks really cool and I'd like to try it out. Can you provide links to these

Re: [Haskell-cafe] Designing DSL with explicit sharing [was: I love purity, but it's killing me]

2008-02-13 Thread Matthew Naylor
Hello again, since Oleg presented an approach to the sharing problem that works on acyclic graphs, I may as well mention an alternative, pure, standard Haskell solution which is to express the fork points in the circuit (or expression), i.e. the points at which an expression is duplicated. You

Re: [Haskell-cafe] Re: existential types

2008-02-13 Thread Ryan Ingram
The name existential types comes from the logical connective exists, which is the dual of for all. For example, given some property P of objects of type T, you can say forall x : T. P(x) -- means that P holds for all things of type x or exists x : T. P(x) -- means that there is some x for which

Re: [Haskell-cafe] Designing DSL with explicit sharing [was: I love purity, but it's killing me]

2008-02-13 Thread Matthew Naylor
tricky 0 = constant 0 tricky d = add e0 e1 where (e0, e1) = fork (tricky (d-1)) Oops, I just realised that this isn't a very good example of expressible sharing! The problem is that it doesn't take any inputs, and expressible sharing just collapses (partially evaluates)

Re: [Haskell-cafe] Haskell wiki is searched by google.

2008-02-13 Thread Mads Lindstrøm
Richard Kelsall wrote: Daniil Elovkov wrote: Hello I remember there was a problem with haskell wiki pages not being indexed and searched. Now it seems to work perfectly. Actually typing 'monomorphism restriction' in google I see the appropriate wiki page as the first result.

Re: [Haskell-cafe] Re: existential types

2008-02-13 Thread Dan Licata
Hi Ryan, On Feb13, Ryan Ingram wrote: However, you can express exists in terms of forall: exists x, P(x) is equivalent to (not (forall x, not P(x))) that is, if it is not true for all x that P(x) does not hold, then there must be some x for which it does hold. The existential types

Re: [Haskell-cafe] Re: existential types

2008-02-13 Thread Derek Elkins
On Wed, 2008-02-13 at 16:31 -0500, Dan Licata wrote: Hi Ryan, On Feb13, Ryan Ingram wrote: However, you can express exists in terms of forall: exists x, P(x) is equivalent to (not (forall x, not P(x))) that is, if it is not true for all x that P(x) does not hold, then there must be

Re: [Haskell-cafe] ANN: nano-hmac 0.2.0

2008-02-13 Thread Steve Lihn
And in perl CPAN world, there are bundles that put together related packages in one big install... Maybe there can be Cabal bundles. Just an idea! On Feb 12, 2008 2:03 PM, Don Stewart [EMAIL PROTECTED] wrote: Ok, I'll leave it up there as a separate package then. :) -- Don hitesh.jasani:

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

2008-02-13 Thread Richard A. O'Keefe
On 12 Feb 2008, at 5:14 pm, [EMAIL PROTECTED] wrote: Would you say that *no* typical floating-point software is reliable? With lots of hedging and clutching of protective amulets around the word reliable, of course not. What I *am* saying is that (a) it's exceptionally HARD to make reliable

Re: [Haskell-cafe] Re: Implementing fixed-sized vectors (using datatype algebra?)

2008-02-13 Thread Richard A. O'Keefe
Concerning parametrized vs parameterized On 12 Feb 2008, at 11:21 pm, Wolfgang Jeltsch asked: What spelling is more common? Strictly speaking, there is no such word in English as parametrized. There is no general morphological rule Xer = Xrized in English. The only spelling accepted by the OED

[Haskell-cafe] a general question on Arrows

2008-02-13 Thread Steve Lihn
In John Hughes' paper [1], Programming with Arrows, p. 20, The truly interesting arrow types are those which do not correspond to a monad, because it is here that arrows give us real extra generality. Since we know that stream functions cannot be represented as a monad, then they are one of these

Re: [Haskell-cafe] ANN: nano-hmac 0.2.0

2008-02-13 Thread Thomas DuBuisson
Hopefully this bundle would be a module that re-exports all the submodules packages. I'm kind of annoyed by some of my code that imports ten different modules for one function from each. So in this case: import nanoCrypto (md5, sha, hmac) where nanoCrypto is a bundle (just another hackage

Re: [Haskell-cafe] existential types

2008-02-13 Thread Jake McArthur
From: Jake McArthur [EMAIL PROTECTED] Date: February 13, 2008 7:04:49 PM CST To: Felipe Lessa [EMAIL PROTECTED] Subject: Re: [Haskell-cafe] existential types On Feb 13, 2008, at 11:15 AM, Felipe Lessa wrote: On Feb 13, 2008 2:41 PM, Jake McArthur [EMAIL PROTECTED] wrote: Now we can have

Re: [Haskell-cafe] Re: Implementing fixed-sized vectors (using datatype algebra?)

2008-02-13 Thread Dan Weston
Richard A. O'Keefe wrote: Concerning parametrized vs parameterized On 12 Feb 2008, at 11:21 pm, Wolfgang Jeltsch asked: What spelling is more common? Strictly speaking, there is no such word in English as parametrized. Except that, strictly speaking, there *is* a word parametrized in

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

2008-02-13 Thread jerzy . karczmarczuk
Trialog: Roman Leshchinskiy writes: Richard A. O'Keefe wrote: [EMAIL PROTECTED] wrote: Would you say that *no* typical floating-point software is reliable? With lots of hedging and clutching of protective amulets around the word reliable, of course not. What I *am* saying is that (a) it's

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

2008-02-13 Thread Roman Leshchinskiy
Richard A. O'Keefe wrote: On 14 Feb 2008, at 2:28 pm, Roman Leshchinskiy wrote: Richard A. O'Keefe wrote: On 12 Feb 2008, at 5:14 pm, [EMAIL PROTECTED] wrote: Would you say that *no* typical floating-point software is reliable? With lots of hedging and clutching of protective amulets

Re: [Haskell-cafe] ANN: Leksah 0.1 - Haskell IDE written in Haskell

2008-02-13 Thread Austin Seipp
gtk =0.9.12, glib =0.9.12, sourceview =0.9.12, These are all apart of gtk2hs: http://haskell.org/gtk2hs/ For my build on Linux I had to pass a --enable-sourceview option to ./configure so that the sourceview package was picked up and built, but I figure it's probably picked up

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

2008-02-13 Thread Roman Leshchinskiy
[EMAIL PROTECTED] wrote: Trialog: Roman Leshchinskiy writes: Richard A. O'Keefe wrote: [EMAIL PROTECTED] wrote: Would you say that *no* typical floating-point software is reliable? With lots of hedging and clutching of protective amulets around the word reliable, of course not. What I

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

2008-02-13 Thread Richard A. O'Keefe
On 14 Feb 2008, at 6:01 pm, Roman Leshchinskiy wrote: I don't understand this. Why use a type which can overflow in the first place? Why not use Integer? Why is this hard to understand? Dijkstra's classic A Discipline of Programming distinguishes several kinds of machine. I'm quoting from

Re: [Haskell-cafe] Designing DSL with explicit sharing [was: I love purity, but it's killing me]

2008-02-13 Thread David Menendez
On Feb 13, 2008 5:36 AM, Luke Palmer [EMAIL PROTECTED] wrote: On Feb 13, 2008 9:33 AM, [EMAIL PROTECTED] wrote: The approach is based on the final tagless representation. Here is our DSL: class Exp repr where constant :: Int - repr Int variable :: String - repr Int add

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

2008-02-13 Thread Richard A. O'Keefe
On 14 Feb 2008, at 2:28 pm, Roman Leshchinskiy wrote: Richard A. O'Keefe wrote: On 12 Feb 2008, at 5:14 pm, [EMAIL PROTECTED] wrote: Would you say that *no* typical floating-point software is reliable? With lots of hedging and clutching of protective amulets around the word reliable, of