Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Duncan Coutts
On Fri, 2009-12-18 at 23:01 +, Ozgur Akgun wrote: > Hi, > > When I run cabal install zlib or cabal upgrade zlib I get the > following error: > > Resolving dependencies... > Configuring zlib-0.5.2.0... > Preprocessing library zlib-0.5.2.0... > Only one output file may be specified We'll need

Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Ozgur Akgun
Thanks for the feedback. I guess the following part is the problematic part: (But I've no idea how to resolve it) Creating dist/build (and its parents) Creating dist/build/autogen (and its parents) Preprocessing library zlib-0.5.2.0... Creating dist/build/Codec/Compression/Zlib (and its parents)

Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Max Cantor
I actually ran into this problem last night. Here's my workaround (note that it involves downgrading to zlib-0.5.0.0 1) unregister the zlib-0.5.2.0 package (prompt> ghc-pkg unregister zlib-0.5.2.0) 2) rebuild and install cabal-install: prompt> tar -zxvf ~/.cabal/packages/hackage.haskell

[Haskell-cafe] Re: Pattern matching, and bugs

2009-12-19 Thread John Lato
> From: Felipe Lessa > > On Fri, Dec 18, 2009 at 02:13:02PM +, John Lato wrote: >> So now the program needs a result of some type (String in your >> example) and gets an undefined, and then immediately crashes >> with an "Exception - undefined" error. > > I think this is the second time this i

[Haskell-cafe] How to use Control.Failure?

2009-12-19 Thread ntupel
I have looked at the recently released Control.Failure library but I admit, I couldn't understand it completely. So given the example below, how would Control.Failure help me here? Thanks, nt -- Theirs (other library code stubs) data TheirError = TheirErrorCase deriving Show data TheirData = Th

[Haskell-cafe] Haskell Weekly News: Issue 144 - December 19, 2009

2009-12-19 Thread jfredett
--- Haskell Weekly News http://sequence.complete.org/hwn/20091219 Issue 144 - December 19, 2009 --- Welcome to issue 144 of HWN, a newsletter covering

Re: [Haskell-cafe] How to use Control.Failure?

2009-12-19 Thread Michael Snoyman
On Sat, Dec 19, 2009 at 4:46 PM, ntupel wrote: > I have looked at the recently released Control.Failure library but I > admit, I couldn't understand it completely. So given the example > below, how would Control.Failure help me here? > > Thanks, > nt > > > -- Theirs (other library code stubs) > d

[Haskell-cafe] Re: How to use Control.Failure?

2009-12-19 Thread ntupel
On Dec 19, 5:14 pm, Michael Snoyman wrote: > > Well, here's one way of doing it. You have lots of choices here; these are > the decisions I made in implementing the code: > > * myFuncB no longer lives in the IO monad. I wasn't sure if you specifically > wanted that, but now it can work with *any*

Re: [Haskell-cafe] Pattern matching, and bugs

2009-12-19 Thread wren ng thornton
Ketil Malde wrote: András Mocsáry writes: Now we have a problem, which is most generally fixed in these ways: C-like: switch ( x ) { Case 0: "Unchecked" Case 1: "Checked" Case 2: "Unknown" Default: "Nothing" } This is not a fix, this is a workaround for a design bug, namely that x is

Re: [Haskell-cafe] sizeOf on a type

2009-12-19 Thread wren ng thornton
Sean Leather wrote: I can see what's going on: it can't tell that the "a" I am writing there is the same "a" that's in the type specification, but is there any way that I can make it identify "a" with the "a" in the specification for nextPtr? Lexically scoped type variables: http://www.haskel

[Haskell-cafe] ANN: Happstack 0.4.1

2009-12-19 Thread Jeremy Shaw
Happstack 0.4.1 STABLE is now available. We recommend that all users of Happstack update to 0.4.1 immediately. Migration from Happstack 0.3 should be trivial. There was one race condition in happstack-state which could cause a state event to fail under heavy congestion. Happstack is the Haskell

Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Duncan Coutts
On Sat, 2009-12-19 at 09:39 +, Ozgur Akgun wrote: > I guess the following part is the problematic part: (But I've no idea > how to resolve it) [..] > --lflag=-lm --lflag=-lffi --lflag=-lgmp --lflag=-ldl *-o > dist/build/Codec/Compression/Zlib/Stream.hs > Codec/Compression/Zlib/Stream.hsc* >

Re: [Haskell-cafe] ANN: Happstack 0.4.1

2009-12-19 Thread Niklas Broberg
>   GHC 6.12 currently requires a minor patch to HJScript. Details here: HJScript-0.4.5 is now on hackage, fixing this problem. Thanks for the heads-up. Cheers, /Niklas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailm

[Haskell-cafe] Search a directory for files

2009-12-19 Thread Eitan Goldshtrom
Hi, I'm trying to make a program to make it easy to rename files in bulk. What I'm wondering is how to get a list of all files in a particular directory. I found System.Posix.Files and I'm planning on using the rename function in it for actually renaming, but I can't find an easy way to get al

Re: [Haskell-cafe] Search a directory for files

2009-12-19 Thread Gregory Crosswhite
Look in System.Directory; specifically, getDirectoryContents should do what you want. You might also check out the FileManip package, which provides some convenient functionality for finding all files which match a particular pattern. Cheers, Greg On Dec 19, 2009, at 6:40 PM, Eitan Goldshtrom

Re: [Haskell-cafe] Search a directory for files

2009-12-19 Thread Eitan Goldshtrom
Thanks. This looks like exactly what I was looking for. I feel silly for not finding it myself. =P -Eitan Gregory Crosswhite wrote: Look in System.Directory; specifically, getDirectoryContents should do what you want. You might also check out the FileManip package, which provides some co