Re: [Haskell-cafe] problem using ST monad

2008-10-26 Thread Henning Thielemann
On Sat, 25 Oct 2008, Paul L wrote: I'm have some trouble using the ST monad, and I think I'm confused about its use of existential type. {-# OPTIONS -XRankNTypes #-} import Control.Monad.ST import Data.Array.ST I want to implement a map function that unfold all ST monads in a list: mapST

Re: [Haskell-cafe] problem using ST monad

2008-10-26 Thread Paul L
Thanks very much for the explanation, I now have a better understanding. On 10/26/08, David Menendez [EMAIL PROTECTED] wrote: ..[snipped].. It may be helpful to rewrite the types with a more explicit notation. For example, runST :: (a :: *) - ((s :: *) - ST s a) - a mapST_wrong :: (a :: *)

Re: [Haskell-cafe] Haskell syntax inside QuasiQuote

2008-10-26 Thread Matt Morrow
I've just uploaded an alpha version of the translation to hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-meta-0.0.1 (I starting thinking after I uploaded that maybe haskell-src-th is a better name..) Here's one strategy for a haskell QQ:

[Haskell-cafe] Slavomir Kaslev has invited you to radiusIM.com

2008-10-26 Thread Slavomir Kaslev
Slavomir Kaslev ([EMAIL PROTECTED]) has invited you to check out radiusIM.com. Their username on radiusIM is hikercho. radiusIM is the Social Instant Messenger. Connect with people from all over the world and also IM your buddies on MSN, AIM/AOL/ICQ, Yahoo, and Google Talk.

Re: [Haskell-cafe] Slavomir Kaslev has invited you to radiusIM.com

2008-10-26 Thread Slavomir Kaslev
Sorry for the noise everyone. Next time I'll think twice before hiting 'Send to all my contacts' buton. Cheers. 2008/10/26 Slavomir Kaslev [EMAIL PROTECTED]: Slavomir Kaslev ([EMAIL PROTECTED]) has invited you to check out radiusIM.com. Their username on

Re: [Haskell-cafe] using ghc as a library

2008-10-26 Thread Daniel GorĂ­n
On Oct 25, 2008, at 8:39 PM, Anatoly Yakovenko wrote: so I am trying to figure out how to use ghc as a library. following this example, http://www.haskell.org/haskellwiki/GHC/As_a_library, i can load a module and examine its symbols: [...] given Test.hs: module Test where hello = hello

[Haskell-cafe] performance difference for binary-0.4.3.1 with ghc-6.8.3 and ghc-6.10

2008-10-26 Thread John Lato
Hello, I was experimenting with using ghc-6.10.0.20081007 on a project, and it seems that binary-0.4.3.1 has markedly worse performance in certain cases. With the following simple test: import qualified Data.ByteString.Lazy as L import Data.Binary import Data.Binary.Get import Control.Monad

[Haskell-cafe] Examples of Mutually Recursive Types

2008-10-26 Thread Hugo Pacheco
Hi all, I have been searching for examples of Haskell real scenarios that employ mutually recursive datatype definitions. Does anyone know some interesting libraries or structures that I could play with? Thanks, hugo -- www.di.uminho.pt/~hpacheco ___

Re: [Haskell-cafe] Examples of Mutually Recursive Types

2008-10-26 Thread wren ng thornton
Hugo Pacheco wrote: Hi all, I have been searching for examples of Haskell real scenarios that employ mutually recursive datatype definitions. Does anyone know some interesting libraries or structures that I could play with? Tim Sheard presents a realistic use case in [1]. We're using it in a

Re: [Haskell-cafe] Examples of Mutually Recursive Types

2008-10-26 Thread Henning Thielemann
On Sun, 26 Oct 2008, Hugo Pacheco wrote: Hi all, I have been searching for examples of Haskell real scenarios that employ mutually recursive datatype definitions. Does anyone know some interesting libraries or structures that I could play with?

Re: [Haskell-cafe] problem using ST monad

2008-10-26 Thread David Menendez
On Sun, Oct 26, 2008 at 8:17 AM, Paul L [EMAIL PROTECTED] wrote: Thanks very much for the explanation, I now have a better understanding. I'm glad I could help. On 10/26/08, David Menendez [EMAIL PROTECTED] wrote: ..[snipped].. It may be helpful to rewrite the types with a more explicit

Re: [Haskell-cafe] Examples of Mutually Recursive Types

2008-10-26 Thread Martijn van Steenbergen
Think of any real programming language out there. For example, in many languages statements may contain expressions, and expressions in turn may contain statements (in Java through anonymous inner classes, for example). Boa noite, Martijn. Hugo Pacheco wrote: Hi all, I have been

Re: [Haskell-cafe] Examples of Mutually Recursive Types

2008-10-26 Thread Niklas Broberg
Think of any real programming language out there. For example, in many languages statements may contain expressions, and expressions in turn may contain statements (in Java through anonymous inner classes, for example). ... and as an example of this you could have a look at the

Re: [Haskell-cafe] Examples of Mutually Recursive Types

2008-10-26 Thread Hugo Pacheco
Probably I overdid the real part.I was thinking of examples such as ASTs (such as the Haskell one), trees and imagining more fancy things, maybe L-systems and fractal processing. I will have a look at the Haskell sources and the previous papers from Tim Sheard. Cheers, hugo On Sun, Oct 26, 2008

[Haskell-cafe] Re: Examples of Mutually Recursive Types

2008-10-26 Thread Larry Evans
On 10/26/08 17:06, Hugo Pacheco wrote: Probably I overdid the real part. I was thinking of examples such as ASTs (such as the Haskell one), trees and imagining more fancy things, maybe L-systems and fractal processing. I will have a look at the Haskell sources and the previous papers from Tim

Re: [Haskell-cafe] using ghc as a library

2008-10-26 Thread Anatoly Yakovenko
Hi, Anatoly Sorry for don't answering your question in the first place, but for this kind of tasks I believe you might be better off using some lightweight wrapper of the GHC Api. thanks, that's really cool, but I am trying to figure out a way to embed haskell into another program so i can

Re: [Haskell-cafe] performance difference for binary-0.4.3.1 with ghc-6.8.3 and ghc-6.10

2008-10-26 Thread Alexander Dunlap
On Sun, Oct 26, 2008 at 9:36 AM, John Lato [EMAIL PROTECTED] wrote: Hello, I was experimenting with using ghc-6.10.0.20081007 on a project, and it seems that binary-0.4.3.1 has markedly worse performance in certain cases. With the following simple test: import qualified

[Haskell-cafe] Cabal and GHCi

2008-10-26 Thread Reiner Pope
Hi, Is there a way to use GHCi with code which is cabal-buildable but not ghc --make-able? The emacs haskell-mode makes a pretty good guess by :cd-ing into the directory with the .cabal file; however, if there is a different source-dir this doesn't work so well. A number of more advanced cabal

[Haskell-cafe] Instances of Lattice?

2008-10-26 Thread Galchin, Vasili
Hi Henning, I am rereading my emails and I don't believe I got an examples of instance Lattice. E.g. instance Lattice Bool. ?? Thanks, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org