Re: [Haskell-cafe] Getting WriterT log lazily

2009-05-06 Thread Stephen Hicks
Magnus Therning wrote: Martijn van Steenbergen wrote: Otherwise, you can use unsafeInterleaveIO: no unsafePerformIO or seq needed, but there's still unsafe in that name there. This works for me: ... Thanks, that does indeed work, but it still requires that unsafe there so I'm hesitant

[Haskell-cafe] ANN: language-sh-0.0.3.1

2009-01-17 Thread Stephen Hicks
Hi everyone, I'm pleased to announce a new package I've just uploaded to hackage: language-sh. It's a set of modules for parsing, manipulating, and printing sh-style shell scripts. It's being developed alongside shsh, the Simple Hakell Shell (available at http://code.haskell.org/shsh/, but it's

[Haskell-cafe] Cabal dependencies

2009-01-15 Thread Stephen Hicks
Hi, I'm having some difficulty specifying dependencies in my .cabal file for a package I'm looking to upload to hackage soon. The difficulty is as follows. I basically want to specify parsec (= 2.1 3.0.0) || ( 3.0.0 4) The problem is that 3.0.0 as it exists on hackage is missing a

[Haskell-cafe] Functions with generic return types

2009-01-12 Thread Stephen Hicks
Hi, I'm trying to write a small module for conveniently writing functions that can return any of a finite number of types. That is, I'd like to be able to write something like foo :: StringOrInt t = String - IO t This is pretty easy to do if I hard-code the classes as above, but I run into

[Haskell-cafe] Possible issue with Hoogle and Haddock?

2008-11-20 Thread Stephen Hicks
Hi, I was noticing recently that there seems to be a problem with Hoogle and Haddock. In particular, I just hoogled bracket and got the following result: bracket :: IO a - a - IO b - a - IO c - IO c Clearly this is the wrong type, as it should be bracket :: IO a - (a - IO b) - (a

[Haskell-cafe] Plans for new System.Process?

2008-10-20 Thread Stephen Hicks
Hi, I've been trying out the new System.Process and have found it to be very useful. I was wondering what the plans for it were - I'd rather not give up support for older versions of ghc just because I want to use createProcess. Are there plans of releasing process-1.0.1 so that it's compatible

Re: [Haskell-cafe] Build without install, using cabal

2008-10-20 Thread Stephen Hicks
On Mon, Oct 20, 2008 at 3:04 PM, Mauricio [EMAIL PROTECTED] wrote: I would like to include a few source files as 'executable' sections in a .cabal package description. However, although I do want to use main=mainDefault features, I do not want those packages to be installed when I run

[Haskell-cafe] Detecting unused read handles? (was: File handles and pipes)

2008-10-19 Thread Stephen Hicks
On Sun, Oct 19, 2008 at 1:44 AM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On 2008 Oct 19, at 1:37, Stephen Hicks wrote: I'm trying to understand how to get pipes working in Haskell, in particular with the revamped System.Process (though I've tried similar experiments

[Haskell-cafe] File handles and pipes

2008-10-18 Thread Stephen Hicks
Hi, I'm trying to understand how to get pipes working in Haskell, in particular with the revamped System.Process (though I've tried similar experiments with System.Posix.IO and Control.Concurrent). Specifically I'm trying to concatenate the output of two system calls into the input of a third.

Re: [Haskell-cafe] Improving MTL instances (was: Overlapping/Incoherent instances)

2008-10-13 Thread Stephen Hicks
On Mon, Oct 13, 2008 at 3:29 AM, Ryan Ingram [EMAIL PROTECTED] wrote: On Mon, Oct 13, 2008 at 2:04 AM, J. Garrett Morris [EMAIL PROTECTED] wrote: Indeed - MTL seems to have been rewritten at some point in the past to prefer exhaustive enumeration to overlap. Indeed, and I actually think this

Re: [Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Stephen Hicks
(First of all, sorry for the double reply...) 2008/10/13 Arun Suresh [EMAIL PROTECTED]: Now my client want to write another subclass for Drawable... He can do that in any other file... package.. whatever... How would he do that in Haskell ??? considering he may not modify the source file in

Re: [Haskell-cafe] couple of questions on monads

2008-10-13 Thread Stephen Hicks
2008/10/13 Daryoush Mehrtash [EMAIL PROTECTED]: Is there a write up on what makes an implementation lazy vs strict? I would be interested in seeing this, too! I like to better understand the trade off between the two and use cases where one is better than the other. I noticed that some

Re: [Haskell-cafe] [ANN] Haskell Cheatsheet v1.0

2008-10-11 Thread Stephen Hicks
On Fri, Oct 10, 2008 at 7:08 PM, Justin Bailey [EMAIL PROTECTED] wrote: I've created a cheat sheet for Haskell. It's a PDF that tries to summarize Haskell 98's syntax, keywords and other language elements. It's currently available on hackage[1]. Once downloaded, unpack the archive and you'll