Re: [Haskell-cafe] Rational and % operator remix

2009-03-30 Thread Ketil Malde
michael rice nowg...@yahoo.com writes: cf2 :: Rational - [Int] cf2 a = let ai = floor a  -- Doesn't this make ai an Int?   -Michael     in   if a == (toRational ai)     then [ai]     else ai : cf2 (1 / (a - ai)) One thing that you could

Re: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Lennart Augustsson
When I looked at it a year ago or so, it was a return of one constructor in a sum. Looking at core, you can see several places where a function is called and that function always returns the same constructor, so the case analysis of the return value is not needed; it should be returned as an

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread Lennart Augustsson
There is already a library for type level number, called typelevel. It's nice because it uses decimal representation of numbers and can handle numbers of reasonable size. I use it in the LLVM bindings. -- Lennart On Mon, Mar 30, 2009 at 1:07 AM, spoon sp...@killersmurf.com wrote: I've been

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread José Pedro Magalhães
Hello, I suppose Lennart is referring to type-level [1]. But type-level uses functional dependencies, right? There is also tfp [2], which uses type families. In general, how would you say your work compares to these two? Thanks, Pedro [1]

Re: [Haskell-cafe] Re: Darcs - dependencies between repositories (aka forests)

2009-03-30 Thread Ketil Malde
Peter Verswyvelen bugf...@gmail.com writes: I don't think it is realistic to expect that for a project of medium to large size that you work only with stable versions of modules (this would exclude most packages on Hackage I guess). I think you're putting too much into stable here. IMO,

RE: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Simon Peyton-Jones
Lennart, | Unfortunately, GHC lacks certain optimizations to make efficient code | when using CMonad, | so instead of C speed you get low speed. ... | When I looked at it a year ago or so, it was a return of one | constructor in a sum. | Looking at core, you can see several places where a

Re: [Haskell-cafe] Re: Darcs - dependencies between repositories (aka forests)

2009-03-30 Thread Thomas Davie
On 29 Mar 2009, at 22:26, Xiao-Yong Jin wrote: Peter Verswyvelen bugf...@gmail.com writes: Mmm, my email was indeed very unclear about my question. A very simple example: suppose a development team is working on a program. This program consist of modules A and B. Each module has it's own

Re: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Claus Reinke
| When I looked at it a year ago or so, it was a return of one | constructor in a sum. | Looking at core, you can see several places where a function is called | and that function always returns the same constructor, so the case | analysis of the return value is not needed; it should be returned

Re: [Haskell-cafe] Problem using #define in .hsc files

2009-03-30 Thread Alistair Bayley
2009/3/29 Johan Tibell johan.tib...@gmail.com: foreign import CALLCONV unsafe send    c_send :: CInt - Ptr a - CSize - CInt - IO CInt Compiling results in: parse error on input `CALLCONV' This is what we use in Takusen's Database.ODBC.OdbcFunctions.hsc: #ifdef mingw32_HOST_OS #let

Re: [Haskell-cafe] Re: ANNOUNCE: wxAsteroids 1.0

2009-03-30 Thread Henk-Jan van Tuyl
On Mon, 30 Mar 2009 07:09:25 +0200, Benjamin L.Russell dekudekup...@yahoo.com wrote: This sounds entertaining, but according to the HaskellWiki entry for GuiTV (see http://haskell.org/haskellwiki/GuiTV), wxHaskell ... can be difficult to install. Has this difficulty been resolved? I am

[Haskell-cafe] Re: Exception handling in numeric computations

2009-03-30 Thread Simon Marlow
Nicolas Pouillard wrote: Excerpts from Henning Thielemann's message of Sat Mar 28 21:49:33 +0100 2009: On Sat, 28 Mar 2009, John Lato wrote: From: Donn Cave d...@avvanta.com I have never felt that I really understood that one. Honestly, me neither, until recently. I'm only barely starting

Re: [Haskell-cafe] Re: A guess on stack-overflows - thunks build-up andtail recursion

2009-03-30 Thread Claus Reinke
I wonder if I could write some sort of chunked fold which basically still produces the same amount of thunks but in a way so that the do not go on the stack all at once for reduction and thus do not cause a stack overflow. Kind of a tree. Not without re-associating the applications of the

Re: [Haskell-cafe] Problem using #define in .hsc files

2009-03-30 Thread John Van Enk
In Scurry, I select the CALLCONV on the CPP command line. This might be better if it's the only place you need an #ifdef. http://hackage.haskell.org/packages/archive/Scurry/0.0.3/Scurry.cabal See the OS selection in the executable section: executable scurry [..] if os(mingw32)

Re: [Haskell-cafe] Re: Darcs - dependencies between repositories (aka forests)

2009-03-30 Thread Peter Verswyvelen
On Mon, Mar 30, 2009 at 8:33 AM, Ketil Malde ke...@malde.org wrote: Do one thing, and do it well. File versioning and change history: darcs. Dependency tracking and building: cabal. Yes, that could actually work. I would just need some link between a cabal version and Darcs version (I must

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Bas van Dijk
On Sun, Mar 29, 2009 at 11:16 AM, Lennart Augustsson lenn...@augustsson.net wrote: I've uploaded my CMonad package to Hackage.  It allows you to write Haskell code in a C style. Nice! A nice addition would be to output a C AST from language-c:

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Sebastiaan Visser
On Mar 30, 2009, at 3:30 PM, Bas van Dijk wrote: On Sun, Mar 29, 2009 at 11:16 AM, Lennart Augustsson lenn...@augustsson.net wrote: I've uploaded my CMonad package to Hackage. It allows you to write Haskell code in a C style. Nice! A nice addition would be to output a C AST from language-c:

Re: [Haskell-cafe] Rational and % operator remix

2009-03-30 Thread michael rice
My query was in response to an earlier post claiming that ai was a Rational, which post he almost simultaneously said to ignore. I've used GHC and like it better than Hugs, but the Fedora Linux package is humongous and I'm only on dialup right now. I'm still not sure what some of the error

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-30 Thread Manlio Perillo
Claus Reinke ha scritto: But Claus was right, appendU is lazy; this seems to be the cause of the problem. appendU is strict, insertWith just doesn't force it (follow the source link in the haddocks to see why). Ok, I see. But, IMHO, this should be clearly documented. I have updated my test

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-30 Thread Don Stewart
Can I close this ticket as not being to do with uvector? -- Don manlio_perillo: Claus Reinke ha scritto: But Claus was right, appendU is lazy; this seems to be the cause of the problem. appendU is strict, insertWith just doesn't force it (follow the source link in the haddocks to see

Re: [Haskell-cafe] Re: Exception handling in numeric computations

2009-03-30 Thread Jonathan Cast
On Fri, 2009-03-27 at 21:16 -0700, Donn Cave wrote: Quoth Henning Thielemann lemm...@henning-thielemann.de, On Fri, 27 Mar 2009, Donn Cave wrote: Quoth Jonathan Cast jonathancc...@fastmail.fm, An `error' is any condition where the correct response is for the programmer to change the

Re: [Haskell-cafe] Rational and % operator remix

2009-03-30 Thread Ryan Ingram
2009/3/30 michael rice nowg...@yahoo.com: I'm still not sure what some of the error messages I was getting were about. As I wrote the function I tried to be aware of what mixed mode operations were kosher ala This is a mistake, but understandable given your lispy background; there aren't

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Edward Kmett
First, BASIC, now C. What's next, Haskell? =) -Edward Kmett On Sun, Mar 29, 2009 at 5:16 AM, Lennart Augustsson lenn...@augustsson.netwrote: I've uploaded my CMonad package to Hackage. It allows you to write Haskell code in a C style. Unfortunately, GHC lacks certain optimizations to make

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-30 Thread Manlio Perillo
Don Stewart ha scritto: Can I close this ticket as not being to do with uvector? Yes, thanks; and sorry for the noise. But it may be interesting to study this the example I have pasted: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=3103 I find it a bit surprising that using appendU is

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread Edward Kmett
Lennart, I think the major emphasis that John's library has is on doing things other than numbers well in the type system, using the type family syntax to avoid the proliferation of intermediary names that the fundep approach yields. I think his type family approach for type-level monads for

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread John Van Enk
Haskell not having 'polymorphic kinds'. Is there a good description of why Haskell doesn't have polymorphic kinds? 2009/3/30 Edward Kmett ekm...@gmail.com Lennart, I think the major emphasis that John's library has is on doing things other than numbers well in the type system, using the

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread Martijn van Steenbergen
John Van Enk wrote: Haskell not having 'polymorphic kinds'. Is there a good description of why Haskell doesn't have polymorphic kinds? IANA expert but polymorphic kinds belong to a set of reasonably new influences (e.g. from dependently typed programming languages and generic

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Ross Mellgren
I think my brain just exploded. On Mar 30, 2009, at 1:29 PM, Edward Kmett wrote: First, BASIC, now C. What's next, Haskell? =) -Edward Kmett On Sun, Mar 29, 2009 at 5:16 AM, Lennart Augustsson lenn...@augustsson.net wrote: I've uploaded my CMonad package to Hackage. It allows you to

Re: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Don Stewart
Duncan and I have thought about this too, exactly as you describe. (Just !x) = (# tag#, x# #) -- Don lennart: When I looked at it a year ago or so, it was a return of one constructor in a sum. Looking at core, you can see several places where a function is called and that function

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Miguel Mitrofanov
As it goes, it'd probably be Forth. On 30 Mar 2009, at 21:29, Edward Kmett wrote: First, BASIC, now C. What's next, Haskell? =) -Edward Kmett On Sun, Mar 29, 2009 at 5:16 AM, Lennart Augustsson lenn...@augustsson.net wrote: I've uploaded my CMonad package to Hackage. It allows you to

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread John Van Enk
I suppose having a good description of what I'd like to do might help: I'd like to be able to make an N-Tuple an instance of a type class. class Foo a where instance Foo (,) where instance Foo (,,) where The different kindedness of (,) and (,,) prevent this from

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Andrew Coppin
Sebastiaan Visser wrote: Lennart, what is the next language DSL you are going to build? Prolog? XSLT? Declarative 3D scene construction? ;-) (What? I can wish, can't I?) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread John Van Enk
Declarative 3D scene construction? ;-) +1 On Mon, Mar 30, 2009 at 3:16 PM, Andrew Coppin andrewcop...@btinternet.comwrote: Sebastiaan Visser wrote: Lennart, what is the next language DSL you are going to build? Prolog? XSLT? Declarative 3D scene construction? ;-) (What? I can wish,

[Haskell-cafe] Looking for practical examples of Zippers

2009-03-30 Thread Gü?nther Schmidt
Hi, my quest for data structures continues. Lately I came across Zippers. Can anybody point be to some useful examples? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread Edward Kmett
Thats a bit farther down the rabbit hole than the concern in question, though certainly related. An example of what you could write with polymorphic kinds, inventing a notation for polymorphic kind variables using 'x to denote a polymorphic kind x, which could subtitute in for a kind k = * | **

Re: [Haskell-cafe] Re: Exception handling in numeric computations

2009-03-30 Thread Jonathan Cast
On Sat, 2009-03-28 at 01:27 +0100, Henning Thielemann wrote: Jonathan Cast schrieb: i.e., that application's file decoding result should be an Either type that anticipates that the file encoding may be invalid. This is pretty standard, I thought. Do people write Haskell file input

[Haskell-cafe] Unique monad?

2009-03-30 Thread Andrew Coppin
Maybe I'm just being blind here, but I don't see a monad transformer (or even a monad) in the standard libraries for producing unique values. Have I missed something? Related, I don't see a monad for gradually consuming input. We've got the Reader monad, but that appears to just give you

Re: [Haskell-cafe] Looking for practical examples of Zippers

2009-03-30 Thread Don Stewart
xmonad's state is represented as a zipper on nested lists. The wikipedia article on zippers lists this and other examples. gue.schmidt: Hi, my quest for data structures continues. Lately I came across Zippers. Can anybody point be to some useful examples? Günther

[Haskell-cafe] Scene description/construction

2009-03-30 Thread Andrew Coppin
John Van Enk wrote: Declarative 3D scene construction? ;-) +1 On Mon, Mar 30, 2009 at 3:16 PM, Andrew Coppin andrewcop...@btinternet.com mailto:andrewcop...@btinternet.com wrote: Sebastiaan Visser wrote: Lennart, what is the next language DSL you are going to build?

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread Jeremy Shaw
At Mon, 30 Mar 2009 20:29:14 +0100, Andrew Coppin wrote: Maybe I'm just being blind here, but I don't see a monad transformer (or even a monad) in the standard libraries for producing unique values. Have I missed something? There is Data.Unique

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread David Leimbach
On Mon, Mar 30, 2009 at 12:40 PM, Jeremy Shaw jer...@n-heptane.com wrote: At Mon, 30 Mar 2009 20:29:14 +0100, Andrew Coppin wrote: Maybe I'm just being blind here, but I don't see a monad transformer (or even a monad) in the standard libraries for producing unique values. Have I missed

[Haskell-cafe] Re: Looking for practical examples of Zippers

2009-03-30 Thread Gü?nther Schmidt
Thanks Don, I followed some examples but have not yet seen anything that would show me how, for instance, turn a nested Map like Map Int (Map Int (Map String Double) into a zipped version. That is presuming of course that this use is feasible at all. Günther Don Stewart schrieb:

Re: [Haskell-cafe] Looking for practical examples of Zippers

2009-03-30 Thread Henk-Jan van Tuyl
On Mon, 30 Mar 2009 21:21:14 +0200, Gü?nther Schmidt gue.schm...@web.de wrote: Hi, my quest for data structures continues. Lately I came across Zippers. Can anybody point be to some useful examples? Günther Searching for Haskell ziper leads to the following pages:

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread Edward Kmett
Well, there are a few approaches available. On the supply front you have the MonadSupply and MonadUnique proposals from the wiki: http://www.haskell.org/haskellwiki/New_monads/MonadSupply http://www.haskell.org/haskellwiki/New_monads/MonadUnique and of course, the ability to roll your own using

[Haskell-cafe] Haddock: inserting interactive sessions in the documentation

2009-03-30 Thread Manlio Perillo
Hi. What is the suggested (if any) convention for inserting an interactive session in the documentation? Right know I'm doing (in random-shuffle package): -- |Convert a sequence @(e1...en)@ to a complete binary tree. -- -- @ -- System.Random.Shuffle buildTree ['a','b','c','d','e'] -- Node

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread Martijn van Steenbergen
Andrew Coppin wrote: Maybe I'm just being blind here, but I don't see a monad transformer (or even a monad) in the standard libraries for producing unique values. Have I missed something? http://haskell.org/haskellwiki/New_monads/MonadSupply linked to from:

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread Lennart Augustsson
I wasn't questioning the utility of John's library. But I saw him mentioning unary numbers and I think it's a mistake to use those for anything practical involving even moderately sized numbers. I'd love to see a good type level programming library. There's a lot of it out there, but it's never

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread Lennart Augustsson
I think Data.Unique is horrible and should be banned. It encourages a global variable style of programming that will just bite you in the end. -- Lennart On Mon, Mar 30, 2009 at 8:40 PM, Jeremy Shaw jer...@n-heptane.com wrote: At Mon, 30 Mar 2009 20:29:14 +0100, Andrew Coppin wrote: Maybe

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread Edward Kmett
On Mon, Mar 30, 2009 at 3:54 PM, Lennart Augustsson lenn...@augustsson.netwrote: I wasn't questioning the utility of John's library. But I saw him mentioning unary numbers and I think it's a mistake to use those for anything practical involving even moderately sized numbers. Completely

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread John Meacham
If you want one to generate names inside of a compiler. Here is a monad that is specialized to provide features useful for that. (like keeping track of in scope bound names independently of new names that arn't available for binding when renaming mutually recursive bindings as a group). Feel free

[Haskell-cafe] TMVar's are great but fail under ghc 6.10.1 windows

2009-03-30 Thread Alberto G. Corona
Control.Concurrent.STM.TMVar's combine the best of MVars and TVars: -Unlike TVars, they permit blocking/early retry when the TMVar is being used by other process, so that complete processes are not retried at the end when happens that the TVars have been modified in the meantime. - Unlike MVars,

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread Jeremy Shaw
At Mon, 30 Mar 2009 20:57:02 +0100, Lennart Augustsson wrote: I think Data.Unique is horrible and should be banned. It encourages a global variable style of programming that will just bite you in the end. Agreed. I'm ashamed I even mentioned it. - jeremy

Re: [Haskell-cafe] Record updates

2009-03-30 Thread Henning Thielemann
On Sun, 29 Mar 2009, Andrew Coppin wrote: Ryan Ingram wrote: Take a look at Data.Accessor on hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/data-accessor http://hackage.haskell.org/cgi-bin/hackage-scripts/package/data-accessor-template So, to summarise, it provides a

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Malcolm Wallace
On 30 Mar 2009, at 20:16, Andrew Coppin wrote: Lennart, what is the next language DSL you are going to build? Prolog? XSLT? Declarative 3D scene construction? ;-) The ICFP programming contest in year 2000 was to write a ray tracer for a given declarative 3D scene construction language

[Haskell-cafe] [Probably a dumb question] Quasiquoting

2009-03-30 Thread Andrew Coppin
Can somebody explain to me how [$expr| 1 + 2 |] is different from ($expr 1 + 2) Other than a superficially different type signature, I'm not seeing what the fundamental difference is... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread Claus Reinke
I suppose having a good description of what I'd like to do might help: I'd like to be able to make an N-Tuple an instance of a type class. class Foo a where instance Foo (,) where instance Foo (,,) where The different kindedness of (,) and (,,) prevent this from working. Not that this

Re: [Haskell-cafe] Record updates

2009-03-30 Thread Peter Verswyvelen
I hope Haskell prime will be a bit more first class when it comes to records. On Mon, Mar 30, 2009 at 11:14 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Sun, 29 Mar 2009, Andrew Coppin wrote: Ryan Ingram wrote: Take a look at Data.Accessor on hackage:

Re: [Haskell-cafe] Re: Exception handling in numeric computations

2009-03-30 Thread Henning Thielemann
On Mon, 30 Mar 2009, Simon Marlow wrote: Nicolas Pouillard wrote: By reading the documentation of 'hGetLine' [1] one can see that this function can throw only an EOF exception so why not give it a type like below? hGetLine :: Handle - ErrorT EOF IO String Since one will have to handle

Re: [Haskell-cafe] Really need some help understanding a solution

2009-03-30 Thread Peter Verswyvelen
On Sat, Mar 28, 2009 at 3:03 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: What about using a custom list type, that has only one constructor like (:), that is, a type for infinite lists? You mean Data.Stream?http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Stream

Re: [Haskell-cafe] Re: Exception handling in numeric computations

2009-03-30 Thread Henning Thielemann
On Sun, 29 Mar 2009, John Lato wrote: On Sat, Mar 28, 2009 at 9:49 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Sat, 28 Mar 2009, John Lato wrote: Honestly, me neither, until recently.  I'm only barely starting to understand it, and I do think there's a great deal of

Re: [Haskell-cafe] Internationalization of Haskell code

2009-03-30 Thread Henning Thielemann
Sorry, my reply got lost in a private mailbox. :-) On Sat, 28 Mar 2009, Henning Thielemann wrote: On Sat, 28 Mar 2009, Martijn van Steenbergen wrote: Hi Henning, Henning Thielemann wrote: Thanks for working on that issue! The German translation is fine. I have recently written a Wiki

[Haskell-cafe] [SoC] XML Schema Implementation

2009-03-30 Thread Vlad Dogaru
Hello everyone, I am writing to judge interest in a Summer of Code proposition: an XML Schema[1] implementation, described as a possbile application here[2]. As both a tool and an inspiration, I intend to use HaXML[3]. More specifically, I would be interested in the degree the Haskell community

Re: [Haskell-cafe] [Probably a dumb question] Quasiquoting

2009-03-30 Thread Robert Greayer
With some more context: foo = ($expr 1 + 2) v. bar = [$expr| 1 + 2] In the first example (assuming TH is enabled), $expr is a splice, which happens at compile time. 'expr' is some value of type Q Exp (the AST for a Haskell expression, in the quotation monad). The application of $expr to

Re: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Max Bolingbroke
2009/3/30 Don Stewart d...@galois.com: Duncan and I have thought about this too, exactly as you describe.    (Just !x)  =    (# tag#, x# #) It would be nice to generalize this to arbitrary sum types, but doing so plays hell with the type checker - I think the most straightforward way would

Re: [Haskell-cafe] Rational and % operator remix

2009-03-30 Thread michael rice
Thanks for the information. Michael --- On Mon, 3/30/09, Ryan Ingram ryani.s...@gmail.com wrote: From: Ryan Ingram ryani.s...@gmail.com Subject: Re: [Haskell-cafe] Rational and % operator remix To: michael rice nowg...@yahoo.com Cc: Ketil Malde ke...@malde.org, haskell-cafe@haskell.org Date:

[Haskell-cafe] abou the Godel Numbering for untyped lambda calculus

2009-03-30 Thread Algebras Math
Hi all, I am reading the book The lambda calculus: Its syntax and Semantics in the chapter about Godel Numbering but I am confused in some points. We know for Church Numerals, we have Cn = \fx.f^n(x) for some n=0, i.e. C0= \fx.x and C 1 = \fx.fx. From the above definition, I could guess the

Re: [Haskell-cafe] TMVar's are great but fail under ghc 6.10.1 windows

2009-03-30 Thread Sterling Clover
Is it possible to rewrite this without unsafeIOToSTM? unsafeIOToSTM is insanely unsafe, and can cause otherwise working STM code to do unpredictable and terrible things to the runtime. Cheers, Sterl. On Mar 30, 2009, at 4:27 PM, Alberto G. Corona wrote: Control.Concurrent.STM.TMVar's

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread Sterling Clover
On the other hand, I find its use in Control.Timeout to be perfectly sane (or at least as sane as anything else in that particular library). Cheers, Sterl. On Mar 30, 2009, at 4:42 PM, Jeremy Shaw wrote: At Mon, 30 Mar 2009 20:57:02 +0100, Lennart Augustsson wrote: I think Data.Unique is

Re: [Haskell-cafe] [SoC] XML Schema Implementation

2009-03-30 Thread Antoine Latter
On Mon, Mar 30, 2009 at 5:16 PM, Vlad Dogaru ddv...@anaconda.cs.pub.ro wrote:  * a translator from XML Schema to Haskell, similar to DtdToHaskell[4] For the latter item, some runtime checking will definitely be required: restrictions such as value ranges for integers or minimum and maximum

[Haskell-cafe] ghc: Var/Type length mismatch message - what does it mean?

2009-03-30 Thread John Lask
consider the following types (from the paper: Stream Fusion From Lists to Streams to Nothing at All) data Stream a = forall s. Stream ( s -(Step a s)) s data Step a s = Done | Yield a s | Skip s an instance of this data type is: stream0 :: Stream () stream0 = Stream (\ s - Yield ()

Re: [Haskell-cafe] abou the Godel Numbering for untyped lambda calculus

2009-03-30 Thread Dan Weston
I can't tell exactly what you're asking, but I'll give it a try! :) primes :: [Integer] primes = [2,3,5,7,11,13,17,19,23,29,31,undefined] godel :: String - Integer godel = product . zipWith (^) primes . map (toInteger . ord) -- Here is the identity function (note that double backslash is a

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread ajb
G'day all. Quoting Lennart Augustsson lenn...@augustsson.net: I think Data.Unique is horrible and should be banned. It encourages a global variable style of programming that will just bite you in the end. In the sense that it doesn't give you anything that Monad.Supply or

[Haskell-cafe] ANN: new release of HTTP, version 4000.0.5

2009-03-30 Thread Sigbjorn Finne
Hi, a new version of the HTTP package - 4000.0.5 has been uploaded, http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HTTP Includes a bunch of fixes and cleanups (thanks to all that have reportedcontributed), along with some (shock, horror) API documentation. Let me know if it

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Alexandr N. Zamaraev
Sebastiaan Visser wrote: A nice addition would be to output a C AST from language-c: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/language-c And compile and link that back into your program! Nice toys indeed. Lennart, what is the next language DSL you are going to build? Prolog?

Re: [Haskell-cafe] Unique monad?

2009-03-30 Thread Jason Dusek
2009/03/30 Edward Kmett ekm...@gmail.com: The main issue with generalizing consumption of input is what does it entail? when you are parsing a list do you have one element at a time consumption? or do you have the ability to grab a whole prefix at once? These issues tend to push you towards

[Haskell-cafe] ANNOUNCE: vacuum: extract graph representations of ghc heap values.

2009-03-30 Thread Matt Morrow
I am pleased to announce the release of vacuum, a Haskellhttp://haskell.org/library for extracting graph representations of values from the GHC http://haskell.org/ghc/ heap, which may then be further processed and/or translated to Graphviz http://graphviz.org/ dot format to be visualized. The

[Haskell-cafe] ANNOUNCE: vacuum: extract graph representations of ghc heap values. (take 2)

2009-03-30 Thread Matt Morrow
I am pleased to announce the release of vacuum, a library for extracting graph representations of values from the GHC heap, which may then be further processed and/or translated to Graphviz dot format to be visualized. The package website is at http://moonpatio.com/vacuum/ , which contains a

[Haskell-cafe] ANNOUNCE: vacuum-cairo: a cairo frontend to vacuum for live Haskell data visualization

2009-03-30 Thread Don Stewart
I am pleased to announce the release of vacuum-cairo, a Haskell library for interactive rendering and display of values on the GHC heap using Matt Morrow's vacuum library. This library takes vacuum's output, generates dot graph format from it, renders it to SVG with graphviz, and displays the