Re: [Haskell-cafe] Endian conversion

2005-10-06 Thread Joel Reymont
Regarding NewBinary... I think my challenge is how to add endian- conversion without duplicating all the put and get methods from NewBinary. I would still use that bit of TH code to figure out whether my platform is big or little endian. I don't care about cross- compilation and what that

Re: [Haskell-cafe] Papers from the 2005 Haskell Workshop (Tallinn)?

2005-10-06 Thread Neil Mitchell
It was a demonstration, not a paper. The half page thing is all there is. There were however slides that went with the presentation which you might be able to get off the author. I think its also being released open source, so you could even put your home directory on it :) Neil On 10/6/05,

RE: [Haskell-cafe] Papers from the 2005 Haskell Workshop (Tallinn)?

2005-10-06 Thread Simon Marlow
On 05 October 2005 17:11, Dimitry Golubovsky wrote: The papers presented at the Workshop are already available in the ACM library which requires membership/subscription to read full text PDFs. Are there any plans to make those papers available anywhere else on the Web without subscription?

Re: [Haskell-cafe] Confused about types

2005-10-06 Thread Lanny Ripple
Thanks for the feedback. It was basically a disposable example of something to learn the language with. All the examples in all the tutorials are toy problems and all the systems put forward as having been written in haskell are huge. A collection of medium solutions that folks could use to

[Haskell-cafe] Alternatives to hs-plugins?

2005-10-06 Thread John Goerzen
I'm thinking of porting my OfflineIMAP program from Python to Haskell. In the configuration file for OfflineIMAP, I permit people to use a Python lambda expression for some things. For instance: folderfilter = lambda foldername: not re.search('(^Trash$|Del)', foldername) So I think it would be

Re: [Haskell-cafe] Alternatives to hs-plugins?

2005-10-06 Thread Nils Anders Danielsson
On Thu, 06 Oct 2005, John Goerzen [EMAIL PROTECTED] wrote: I'm wondering if there are any alternatives? Can a Haskell program using Hugs call Hugs to evaluate an arbitrary hunk of code? Although it is not very efficient you can of course call Hugs and parse its output. I have some working

Re: [Haskell-cafe] Endian conversion

2005-10-06 Thread Joel Reymont
I don't want to replicate all the code in NewBinary for Little/Big endian. I'm looking for an elegant solution (Haskell, the elegant language, you know). I don't care about cross-compiling stuff and the server that I need to work with runs on Wintel whereas I can be either on Windows or

Re: [Haskell-cafe] Endian conversion

2005-10-06 Thread Donn Cave
On Thu, 6 Oct 2005, Joel Reymont wrote: I don't want to replicate all the code in NewBinary for Little/Big endian. I'm looking for an elegant solution (Haskell, the elegant language, you know). Maybe that's why I haven't seen anyone propose a foreign interface, but it's sure how I would do

[Haskell-cafe] Working inside the fold

2005-10-06 Thread Greg Buchholz
Recently I've been browsing some of Oleg Kiselyov's articles entitled Towards the best collection traversal interface... http://okmij.org/ftp/Computation/Continuations.html#enumerator-stream A programming language system gives us typically one of the two interfaces to

Re: [Haskell-cafe] Endian conversion

2005-10-06 Thread Joel Reymont
Why doesn't this compile? be = $( (1::CChar) /= (unsafePerformIO $ with (1::CInt) $ peekByteOff `flip` 0) ) :: Bool Endian.hs:10:8: Couldn't match `Language.Haskell.TH.Lib.ExpQ' against `Bool' Expected type: Language.Haskell.TH.Lib.ExpQ

Re: [Haskell-cafe] Endian conversion

2005-10-06 Thread Joel Reymont
Solution by TheHunter on #haskell: be = $(lift $ (1::CChar) /= (unsafePerformIO $ with (1::CInt) $ peekByteOff `flip` 0) ) :: Bool Thanks, Joel On Oct 6, 2005, at 9:13 PM, Joel Reymont wrote: Why doesn't this compile? be = $(

[Haskell-cafe] Emacs Haskell Mode: Indenting after where

2005-10-06 Thread Joel Reymont
Folks, Does anyone know how to make the Haskell mode (Emacs) indent the line after where for this type of look: peek = if be then peek0 else peekR where peek0 a = fmap BigEndian $ peek (castAway a) peekR a = peekByteOff a 0 instead of this: peek = if

[Haskell-cafe] New to Monads

2005-10-06 Thread Tom Hawkins
I'm just starting to feel comfortable working inside IO; now I am trying to wrap my head around Control.Monad.State. Looking at the implementation, I came across some unfamiliar syntax... class (Monad m) = MonadState s m | m - s where What is the meaning of | m - s? I found no mention of it

Re: [Haskell-cafe] New to Monads

2005-10-06 Thread Cale Gibbard
That | m - s reads where m determines s, and means that there can be at most one s (here, the state type) for a given m (the monad type). This is used in type inference and checking to ensure that the type of state being carried around by a monad in MonadState is well defined, and to prevent you