[Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread John Dorsey
Fellow Haskellers, Much attention has been paid over the years to the regrettable omission of singleton tuples from Haskell. I am pleased to announce OneTuple, a humble implementation of the singleton tuple for Haskell. Now you can: * Wrap a single value of any type in a OneTuple ! *

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread ajb
G'day all. Quoting John Dorsey [EMAIL PROTECTED]: Contributions are welcome. The project could use a tutorial, and a decent test suite. Strict singleton tuples are planned for the next version. I hope it has a Monad instance. But more to the point: Can it send email? Cheers, Andrew

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread Simon Brenner
On 10/2/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: G'day all. Quoting John Dorsey [EMAIL PROTECTED]: Contributions are welcome. The project could use a tutorial, and a decent test suite. Strict singleton tuples are planned for the next version. I hope it has a Monad

RE: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread Simon Peyton-Jones
| Unless you use a different compiler. | | Malcolm keeping the dream of multiple implementations alive | | And keep dividing our compiler teams' efforts, while | single-implementation languages conquer :) | | Don thinking that compiler developer fragmentation doesn't help now the

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread Luke Palmer
On Thu, Oct 2, 2008 at 1:17 AM, Simon Brenner [EMAIL PROTECTED] wrote: On 10/2/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: G'day all. Quoting John Dorsey [EMAIL PROTECTED]: Contributions are welcome. The project could use a tutorial, and a decent test suite. Strict singleton tuples

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread Luke Palmer
Hmm, it looks like you forgot to write a Traversable instance. I don't believe: sequenceA (OneTuple [1,2,3,4]) = _|_ is correct. Here is my contribution! instance Traversable OneTuple where sequenceA (OneTuple x) = fmap OneTuple x Luke On Thu, Oct 2, 2008 at 12:56 AM, John Dorsey

[Haskell-cafe] Re: Announcing OneTuple-0.1.0

2008-10-02 Thread Benjamin L . Russell
On Thu, 2 Oct 2008 02:56:08 -0400, John Dorsey [EMAIL PROTECTED] wrote: Fellow Haskellers, Much attention has been paid over the years to the regrettable omission of singleton tuples from Haskell. I am pleased to announce OneTuple, a humble implementation of the singleton tuple for Haskell.

[Haskell-cafe] Re: Health effects

2008-10-02 Thread Adrian Neumann
The Wikipedia says: For a finite set of points in the plane, each colored red or blue, there is a line that simultaneously bisects the red points and bisects the blue points, that is, the number of red points on either side of the line is equal and the number of blue points on either side

Re[2]: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread Bulat Ziganshin
Hello Don, Thursday, October 2, 2008, 12:07:47 PM, you wrote: Don, I usually agree with almost everything you say -- but not this! and i usually answer only in those few cases when i disagree ;) My point was really that investing the effort required to get nhc98 into the shape that we could

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-02 Thread Arnar Birgisson
On Thu, Oct 2, 2008 at 00:39, Bill [EMAIL PROTECTED] wrote: On Wed, 2008-10-01 at 16:46 -0400, John Van Enk wrote: . . . I fully realize how un-clever this is. Some one please give me something more worth of the original list. :) You shoot the gun but nothing happens (Haskell is pure,

[Haskell-cafe] Re: Announcing OneTuple-0.1.0

2008-10-02 Thread Jon Fairbairn
Benjamin L.Russell [EMAIL PROTECTED] writes: Note: the singleton tuple does not support tuple syntax. What is the syntax for the singleton tuple? [...] the singleton syntax will be different from the non-singleton syntax, which is also syntactically inelegant. What is your solution?

[Haskell-cafe] A question about constraints

2008-10-02 Thread jean-christophe mincke
Hello, Given a type T, this type identifies a set of values and this set can be deduced from the structure of type T. i.e the type String is the set of all possible lists of character whatever their length. This being said, I have the following question: Given a type T, how is it possible to

Re: [Haskell-cafe] Re: Announcing OneTuple-0.1.0

2008-10-02 Thread minh thu
2008/10/2 Jon Fairbairn [EMAIL PROTECTED]: Benjamin L.Russell [EMAIL PROTECTED] writes: Note: the singleton tuple does not support tuple syntax. What is the syntax for the singleton tuple? [...] the singleton syntax will be different from the non-singleton syntax, which is also

Re: [Haskell-cafe] A question about constraints

2008-10-02 Thread minh thu
2008/10/2 jean-christophe mincke [EMAIL PROTECTED]: Hello, Given a type T, this type identifies a set of values and this set can be deduced from the structure of type T. i.e the type String is the set of all possible lists of character whatever their length. This being said, I have the

Re: [Haskell-cafe] A question about constraints

2008-10-02 Thread Bulat Ziganshin
Hello jean-christophe, Thursday, October 2, 2008, 1:46:20 PM, you wrote: If one wants to use pattern matching, afaik we had so-called views in early haskell versions. they proivide way to define two-way constructors - used for deconstruction via pattern-matching too views wa removed from

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread Jeremy O'Donoghue
On Tue, 30 Sep 2008 21:54:34 -0400, Stefan Monnier [EMAIL PROTECTED] said: I am not allowed to use such an interpretation. The (expensive and very carefully researched) legal advice used to shape the use of Open Source code at my employer has resulted in a no LGPL under any circumstances

Re: [Haskell-cafe] Climbing up the shootout...

2008-10-02 Thread Manlio Perillo
Don Stewart ha scritto: Thanks to those guys who've submitted parallel programs to the language benchmarks game, we're climbing up the rankings, now in 3rd, and ahead of C :) http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=all Just one or two more parallel programs

Re: [Haskell-cafe] Re: Health effects

2008-10-02 Thread Ketil Malde
Adrian Neumann [EMAIL PROTECTED] writes: Does this work with more than two colours? i.e. can I recursively subdivide the halves into quarters with another cut? I don't think so. In order to divide a group, a line needs to pass through somewhere in the middle, or more precisely, it must

[Haskell-cafe] announcing darcs 2.1.0pre3

2008-10-02 Thread Eric Kow
Hi everybody, The third pre-release of darcs 2.1 is now available at http://darcs.net/darcs-2.1.0pre3.tar.gz Since the last pre-release, we have resolved two of the items on our work list and a recently discovered darcs 2 bug. On the other hand, we have discovered a new regression from darcs

[Haskell-cafe] Re: [Streams] Couldn't match expected type ?`Distribution.Verbosity.Verbosity'

2008-10-02 Thread Stephane Bortzmeyer
On Wed, Sep 24, 2008 at 08:14:34PM -0400, Stephane Bortzmeyer [EMAIL PROTECTED] wrote a message of 34 lines which said: I cannot compile Streams 0.1: This problem is experienced by other people: http://groups.google.com/group/fa.haskell/browse_thread/thread/bafa0006f9fb2ba7 but nobody

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread Darrin Thompson
On Wed, Oct 1, 2008 at 4:00 PM, Don Stewart [EMAIL PROTECTED] wrote: And keep dividing our compiler teams' efforts, while single-implementation languages conquer :) Seems like Haskell has a pretty clear story about which is the right implementation for general purpose use. I don't see a

[Haskell-cafe] SCGI module

2008-10-02 Thread Anton Tayanovskyy
Hello, SCGI module from Hackage is not working for me with Apache mod_scgi, I think because it uses LazyBytestring to hGetContents on a socket handle and the Apache side does not close the socket. Also, looking at the source I didn't see any fork* calls, so I assume it is not doing concurrency.

Re: [Haskell-cafe] A question about constraints

2008-10-02 Thread Luke Palmer
On Thu, Oct 2, 2008 at 4:11 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: finally, ghc now includes some form of active patterns which may be used to define your own way to decompose values. but their syntax isn't compatible with constructors so you can't define complex type which mimicks

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread David Leimbach
On Thu, Oct 2, 2008 at 3:12 AM, Jeremy O'Donoghue [EMAIL PROTECTED] wrote: On Tue, 30 Sep 2008 21:54:34 -0400, Stefan Monnier [EMAIL PROTECTED] said: I am not allowed to use such an interpretation. The (expensive and very carefully researched) legal advice used to shape the use of Open

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread David Leimbach
2008/10/2 Darrin Thompson [EMAIL PROTECTED] On Wed, Oct 1, 2008 at 4:00 PM, Don Stewart [EMAIL PROTECTED] wrote: And keep dividing our compiler teams' efforts, while single-implementation languages conquer :) Seems like Haskell has a pretty clear story about which is the right

[Haskell-cafe] enumeration I/O and non-sequential access

2008-10-02 Thread John Lato
Hello, I've recently been looking at Oleg's Iteratee approach to I/O (http://okmij.org/ftp/Haskell/Iteratee/), and I was wondering about something. In general this seems to be a very good approach to handling sequential access, but I don't see a means of applying it where non-sequential (esp.

[Haskell-cafe] Re: System.Process

2008-10-02 Thread Simon Marlow
Andrew Coppin wrote: Anyway, the point I'm trying to get to is... would it be hard for however maintains this library to add a little more flexibility in what it can do please? In the new System.Process, that comes with GHC 6.10.1: Prelude System.Process createProcess (shell echo $FOO){ env

[Haskell-cafe] mysql (hsql-mysql-1.7) on Linux with GHC 8.3 - cabal issues

2008-10-02 Thread Anton Tayanovskyy
Hello, I had some difficulty building hsql and hsql-mysql (native driver) packages under GHC 8.3 on Fedora 9. Namely, they do not install with cabal install, because of a few API changes. Is this considered all right as GHC 8.3 is still experimental, or should the packages be updated? If so, can

Re: [Haskell-cafe] csv one-liner

2008-10-02 Thread Marco TĂșlio Gontijo e Silva
Op woensdag 01-10-2008 om 18:59 uur [tijdzone -0700], schreef Jason Dusek: Reply to all? No. Reply-to-list is a different thing. When you reply-to-all to a person who is in the list, the person gets two copies of the e-mail with different headers, which messes with filters and replies.

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-02 Thread Albert Y. C. Lai
Don't forget about memory consumption! If you don't look, the bullet causes heap overflow. If you look, the bullet causes stack overflow. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] One liner?

2008-10-02 Thread Paul Keir
Hi all, There's a common little situation I keep bumping up against. I don't understand where I'm going wrong, so I've made a little example. It's to do with binding a result to a variable name using -. This code works fine: -- module Main where

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-02 Thread Arnar Birgisson
On Thu, Oct 2, 2008 at 17:11, Albert Y. C. Lai [EMAIL PROTECTED] wrote: Don't forget about memory consumption! If you don't look, the bullet causes heap overflow. If you look, the bullet causes stack overflow. So it is a Heisenberg-bullet? Arnar

RE: [Haskell-cafe] One liner?

2008-10-02 Thread Mitchell, Neil
Hi You can translate this step by step. main = do dc - getDirectoryContents ./foo/ mapM_ putStrLn dc Translating out the do notation (http://www.haskell.org/haskellwiki/Keywords#do): main = getDirectoryContents = \dc - mapM_ putStrLn dc Then we can chop out the dc argument,

Re: [Haskell-cafe] enumeration I/O and non-sequential access

2008-10-02 Thread Johan Tibell
On Thu, Oct 2, 2008 at 3:50 PM, John Lato [EMAIL PROTECTED] wrote: Hello, I've recently been looking at Oleg's Iteratee approach to I/O (http://okmij.org/ftp/Haskell/Iteratee/), and I was wondering about something. In general this seems to be a very good approach to handling sequential

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread Malcolm Wallace
The GPL and LGPL are needlessly difficult for mere mortals to understand in their entirety, and as you've alluded to, many lawyers would interpret it differently. I suspect many different judges would too. I think the evidence is rather to the contrary. Most lawsuits involving

[Haskell-cafe] Re: Shooting your self in the foot with Haskell

2008-10-02 Thread Joe Buehler
Arnar Birgisson wrote: So it is a Heisenberg-bullet? I'm uncertain. -- Joe Buehler ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] One liner?

2008-10-02 Thread Ketil Malde
Paul Keir [EMAIL PROTECTED] writes: module Main where import System.Directory (getDirectoryContents) main = do dc - getDirectoryContents ./foo/ mapM_ putStrLn dc mapM_ putStrLn (getDirectoryContents ./foo/) Couldn't match expected type `[String]' mapM_ putStrLn needs a

Re: [Haskell-cafe] Health effects

2008-10-02 Thread Albert Y. C. Lai
[EMAIL PROTECTED] wrote: One, if the cut is allowed to be curved and self-intersecting. Crouching Tiger, Hidden Dragon? Kill Bill? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

RE: [Haskell-cafe] One liner?

2008-10-02 Thread Mitchell, Neil
main = do dc - getDirectoryContents ./foo/ mapM_ putStrLn dc Translating out the do notation (http://www.haskell.org/haskellwiki/Keywords#do): main = getDirectoryContents = \dc - mapM_ putStrLn dc Woops, I lost ./foo/ here, but it should be fairly easy to insert through

RE: [Haskell-cafe] One liner?

2008-10-02 Thread Paul Keir
Thanks, and to Ketil too. I did see past the missing ./foo/. That's certainly a solution I'm happy with, and I didn't know the term eta reduction, so thanks for that too. Paul -Original Message- From: Mitchell, Neil [mailto:[EMAIL PROTECTED] Sent: Thu 02/10/2008 16:26 To: Paul Keir;

Re[2]: [Haskell-cafe] One liner?

2008-10-02 Thread Bulat Ziganshin
Hello Neil, Thursday, October 2, 2008, 7:26:23 PM, you wrote: shortly speaking, getDirectoryContents is an action (having IO a type) while second mapM_ argument should be a value returned by this action. by using dc variable or = operator, you can evaluate action and pass its result to mapM_. of

Re: [Haskell-cafe] enumeration I/O and non-sequential access

2008-10-02 Thread John Lato
On Thu, Oct 2, 2008 at 4:28 PM, Johan Tibell [EMAIL PROTECTED] wrote: On Thu, Oct 2, 2008 at 3:50 PM, John Lato [EMAIL PROTECTED] wrote: Hello, I've recently been looking at Oleg's Iteratee approach to I/O (http://okmij.org/ftp/Haskell/Iteratee/), and I was wondering about something. In

Re: [Haskell-cafe] Climbing up the shootout...

2008-10-02 Thread Don Stewart
manlio_perillo: Don Stewart ha scritto: Thanks to those guys who've submitted parallel programs to the language benchmarks game, we're climbing up the rankings, now in 3rd, and ahead of C :) http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=all Just one or two more

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-02 Thread Andrew Coppin
John Van Enk wrote: There's the well known How to shoot your self in the foot list which I have it printed and taped on my desk at work. http://www-users.cs.york.ac.uk/susan/joke/foot.htm I had a co-worker ask me how you'd shoot your self in the foot with Haskell. The interesting thing

Re: [Haskell-cafe] Re: Health effects

2008-10-02 Thread Ryan Ingram
It seems like if your primitive operation is break bar in two you need exactly n-1 breaks to get n squares, no matter what choice you make for where to break along the chocolate grid. This is a simple consequence of the fact that each break increases the number of pieces by one. If you're

[Haskell-cafe] Stacking monads

2008-10-02 Thread Andrew Coppin
Consider the following beautiful code: run :: State - Foo - ResultSet State run_and :: State - Foo - Foo - ResultSet State run_and s0 x y = do s1 - run s0 x s2 - run s1 y return s2 run_or :: State - Foo - Foo - ResultSet State run_or s0 x y = merge (run s0 x) (run s0 y) That

Re: [Haskell-cafe] Climbing up the shootout...

2008-10-02 Thread Manlio Perillo
Don Stewart ha scritto: [...] There is a lot of efforts to improve CPU time, but what about memory usage? http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=ghc No one is looking at memory at the moment, as the parallel/multicore profiler isn't working in 6.8.2.

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Jonathan Cast
On Thu, 2008-10-02 at 18:18 +0100, Andrew Coppin wrote: Consider the following beautiful code: run :: State - Foo - ResultSet State run_and :: State - Foo - Foo - ResultSet State run_and s0 x y = do s1 - run s0 x s2 - run s1 y return s2 run_or :: State - Foo - Foo

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Reid Barton
On Thu, Oct 02, 2008 at 06:18:19PM +0100, Andrew Coppin wrote: run :: State - Foo - Either ErrorType (ResultSet State) run_and :: State - Foo - Foo - Either ErrorType (ResultSet State) {- some Either-ified version of run_and :: State - Foo - Foo - ResultSet State run_and s0 x y =

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread David Menendez
On Thu, Oct 2, 2008 at 1:18 PM, Andrew Coppin [EMAIL PROTECTED] wrote: At this point I am sorely tempted to just change ResultSet to include the error functionallity I need. However, ResultSet is *already* an extremely complicated monad that took me weeks to get working correctly... I'd really

Re: [Haskell-cafe] Re: Total Functional Programming in Haskell

2008-10-02 Thread David Menendez
On Wed, Oct 1, 2008 at 7:53 PM, wren ng thornton [EMAIL PROTECTED] wrote: [1] Just like existential types, you can put something in but you can never get it back out again. For inescapable monads like IO and ST, this is why they have the behavior of sucking your whole program into the

Re: [Haskell-cafe] Hmm, what license to use?

2008-10-02 Thread Wolfgang Jeltsch
Am Dienstag, 30. September 2008 00:18 schrieb Duncan Coutts: Yet another reason for getting dynamic linking / shared libs for Haskell packages working reliably on all platforms. You mean shared libraries without the opportunity to inline library code? This would result in a huge performance

Re: [Haskell-cafe] Hmm, what license to use?

2008-10-02 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wolfgang Jeltsch wrote: Am Dienstag, 30. September 2008 00:18 schrieb Duncan Coutts: Yet another reason for getting dynamic linking / shared libs for Haskell packages working reliably on all platforms. You mean shared libraries without the

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread Magnus Therning
On Wed, Oct 1, 2008 at 6:03 PM, Simon Marlow [EMAIL PROTECTED] wrote: [..] Dynamic linking doesn't solve all the problems, we still have the problem that GHC does a lot of cross-module inlining, regardless of whether dynamic linking is used. However, I really would like to have a way to have

Re: [Haskell-cafe] Hmm, what license to use?

2008-10-02 Thread Wolfgang Jeltsch
Am Donnerstag, 2. Oktober 2008 20:33 schrieben Sie: Wolfgang Jeltsch wrote: You mean shared libraries without the opportunity to inline library code? This would result in a huge performance loss, I think. Usually _mild_ performance loss, in exchange for major code-size savings, I would

Re: [Haskell-cafe] Hmm, what license to use?

2008-10-02 Thread David Leimbach
On Thu, Oct 2, 2008 at 11:25 AM, Wolfgang Jeltsch [EMAIL PROTECTED] wrote: Am Dienstag, 30. September 2008 00:18 schrieb Duncan Coutts: Yet another reason for getting dynamic linking / shared libs for Haskell packages working reliably on all platforms. You mean shared libraries without

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Andrew Coppin
David Menendez wrote: In general, monads don't compose. That is, there's no foolproof way to take two monads m1 and m2 and create a third monad m3 which does everything m1 and m2 does. People mostly get around that by using monad transformers. ...OK then. You could try using an exception

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Andrew Coppin
Reid Barton wrote: I'll assume for simplicity and concreteness that ResultSet = []. It more or less is. (But with a more complex internal structure, and correspondingly more complex (=) implementation.) That's right. The type mismatches are telling you that there's a situation you

Re[2]: [Haskell-cafe] Hmm, what license to use?

2008-10-02 Thread Bulat Ziganshin
Hello Wolfgang, Thursday, October 2, 2008, 11:25:52 PM, you wrote: You mean shared libraries without the opportunity to inline library code? This would result in a huge performance loss, I think. Usually _mild_ performance loss, in exchange for major code-size savings, I would think. C

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Andrew Coppin
Jonathan Cast wrote: On Thu, 2008-10-02 at 18:18 +0100, Andrew Coppin wrote: After an insane amount of time making my head hurt, I disocvered that the type Either ErrorType (ResultSet State) is actually a monad. It's a monad if you can write a function join :: Either ErrorType

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread John Dorsey
All, I'm bundling responses to save paper. [EMAIL PROTECTED] wrote: I hope it has a Monad instance. Naturally! But more to the point: Can it send email? Can you give an example of a use case? Do the Haskell-98 standard tuples have a correspondence feature? I wasn't able to find one with

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Anton van Straaten
Andrew Coppin wrote: I thought ErrorT was a class name...? No, it's the name of the error monad transformer type. Error is just an ordinary monad, it's ErrorT that's the transformer. So it sounds like the answer to your question below: You could try using an exception monad transformer

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread John Goerzen
On Thu, Oct 02, 2008 at 03:58:12PM -0400, John Dorsey wrote: All, I'm bundling responses to save paper. [EMAIL PROTECTED] wrote: I hope it has a Monad instance. Naturally! But more to the point: Can it send email? Can you give an example of a use case? Do the Haskell-98

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Robert Greayer
--- On Thu, 10/2/08, Andrew Coppin [EMAIL PROTECTED] wrote: I'm lost... (What does liftM have to do with fmap?) They're (effectively) the same function. i.e. liftM :: (Monad m) = (a - b) - m a - m b fmap :: (Functor f) = (a - b) - f a - f b liftM turns a function from a to b into a

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Andrew Coppin
Robert Greayer wrote: --- On Thu, 10/2/08, Andrew Coppin [EMAIL PROTECTED] wrote: I'm lost... (What does liftM have to do with fmap?) They're (effectively) the same function. i.e. liftM :: (Monad m) = (a - b) - m a - m b fmap :: (Functor f) = (a - b) - f a - f b Hmm.

Re: [Haskell-cafe] Restricted file reading monad

2008-10-02 Thread Bryan O'Sullivan
2008/10/1 George Pollard [EMAIL PROTECTED]: Since the ID3 tag as a whole has size information, I need to pass that into the frame-reading functions to ensure that I never read past the end of the total header. What you want for this is the environment monad, also known as the Reader monad in

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread minh thu
2008/10/2 John Dorsey [EMAIL PROTECTED]: All, I'm bundling responses to save paper. [EMAIL PROTECTED] wrote: I hope it has a Monad instance. Naturally! But more to the point: Can it send email? Can you give an example of a use case? Do the Haskell-98 standard tuples have a

Re: [Haskell-cafe] mysql (hsql-mysql-1.7) on Linux with GHC 8.3 - cabal issues

2008-10-02 Thread Anton Tayanovskyy
On Thu, Oct 2, 2008 at 6:39 PM, Duncan Coutts [EMAIL PROTECTED] wrote: The problem here really is that HSQL has no maintainer and has not been updated for about two years if my memory serves me correctly. Some distros, Fedora, Gentoo etc have patched HSQL to keep it working with ghc-6.8. I

[Haskell-cafe] Alex and Flex

2008-10-02 Thread Manlio Perillo
Hi. I'm starting to write a CSS parser with Alex and Happy. The grammar is defined here: http://www.w3.org/TR/CSS21/grammar.html However I have noted that there are some difference in the syntax between Alex and Flex? What is the rationale? One more thing. Here:

[Haskell-cafe] Alex and Flex

2008-10-02 Thread Manlio Perillo
Hi. I'm starting to write a CSS parser with Alex and Happy. The grammar is defined here: http://www.w3.org/TR/CSS21/grammar.html However I have noted that there are some difference in the syntax between Alex and Flex? What is the rationale? One more thing. Here:

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Jonathan Cast
On Thu, 2008-10-02 at 20:53 +0100, Andrew Coppin wrote: Jonathan Cast wrote: On Thu, 2008-10-02 at 18:18 +0100, Andrew Coppin wrote: After an insane amount of time making my head hurt, I disocvered that the type Either ErrorType (ResultSet State) is actually a monad. It's a

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread Jason Dusek
John Dorsey [EMAIL PROTECTED] wrote: Now you can: * Solve any of the software problems that cannot be solved without the singleton tuple ! What would those be? I'm still trying to figure out how a singelton tuple is really distinct from a plain value. -- _jsn

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Tillmann Rendel
Hi Andrew, Andrew Coppin wrote: Uh... what's Applicative? (I had a look at Control.Applicative, but it just tells me that it's a strong lax monoidal functor. Which isn't very helpful, obviously.) Seriously, what are you talking about? The haddock page for Control.Applicative hoogle links to

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread David Menendez
On Thu, Oct 2, 2008 at 3:40 PM, Andrew Coppin [EMAIL PROTECTED] wrote: David Menendez wrote: You could try using an exception monad transformer here I thought I already was? No, a monad transformer is a type constructor that takes a monad as an argument and produces another monad. So,

Re: [Haskell-cafe] Hmm, what license to use?

2008-10-02 Thread Don Stewart
bulat.ziganshin: Hello Wolfgang, Thursday, October 2, 2008, 11:25:52 PM, you wrote: You mean shared libraries without the opportunity to inline library code? This would result in a huge performance loss, I think. Usually _mild_ performance loss, in exchange for major code-size

Re: [Haskell-cafe] SCGI module

2008-10-02 Thread Don Stewart
anton.tayanovskyy: Hello, SCGI module from Hackage is not working for me with Apache mod_scgi, I think because it uses LazyBytestring to hGetContents on a socket handle and the Apache side does not close the socket. Also, looking at the source I didn't see any fork* calls, so I assume it is

Re[2]: [Haskell-cafe] Hmm, what license to use?

2008-10-02 Thread Bulat Ziganshin
Hello Don, Friday, October 3, 2008, 2:22:49 AM, you wrote: and type classes. once i've forget to addinline pragma, my program (serializing arrays) becomes 200x slower. it was due to use of hieararchy of several type classes. afaiu, their dictionaries are also lazily evaluated plus we have

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread Jason Dagit
On Thu, Oct 2, 2008 at 2:46 PM, Jason Dusek [EMAIL PROTECTED] wrote: John Dorsey [EMAIL PROTECTED] wrote: Now you can: * Solve any of the software problems that cannot be solved without the singleton tuple ! What would those be? I'm still trying to figure out how a singelton

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread Lennart Augustsson
Just FYI, at Credit Suisse I wrote a 1-tuple type a few years ago. It was the only way to get a consistent way of dealing with certain things. But I called it One. I think the OneTuple should be in the base library, I mean, ask an 8 year old what number is missing in this sequence

Re: [Haskell-cafe] Stacking monads

2008-10-02 Thread Ryan Ingram
If your datatype with a Monad instance also has a Functor instance (which it *can* have, you just need to declare the instance), then liftM is equivalent to fmap. Only if you ignore efficiency issues, of course. Some monads have an fmap which is significantly faster than bind. liftM f m =

[Haskell-cafe] Source of 16x16 Sudokus?

2008-10-02 Thread Murray Gross
Folks: For research on the behavior of parallel Haskell, does anyone know of a source for graded (easy through evil) 16x16 Sudoku puzzles? Our hardware runs too fast for us to get meaningful timings on 9x9's. I suppose we could insert time wasters, but I think that would also distort the

Re: [Haskell-cafe] Announcing OneTuple-0.1.0

2008-10-02 Thread Brandon S. Allbery KF8NH
On 2008 Oct 2, at 19:00, Jason Dagit wrote: On Thu, Oct 2, 2008 at 2:46 PM, Jason Dusek [EMAIL PROTECTED] wrote: John Dorsey [EMAIL PROTECTED] wrote: Now you can: * Solve any of the software problems that cannot be solved without the singleton tuple ! What would those be? I'm still

Re: [Haskell-cafe] Source of 16x16 Sudokus?

2008-10-02 Thread David Stigant
Simon Tatham has a sudoku program which generates Sudoku's of any size in varying difficulties: http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ It's down at the bottom and is called Solo. I can't speak to the actual quality/difficulty of the puzzles, but every feature you asked for is