[Haskell] ANN: vty 2.0

2006-12-30 Thread Stefan O'Rear
A new major version of vty exists: http://members.cox.net/stefanor/vty/dist/vty-2.0.tar.gz darcs get --tag=rel-2.0 http://members.cox.net/stefanor/vty Differences from 1.0: * vty now uses a record type for attributes, instead of bitfields in an Int. This is the reason for increasing the majo

Re: [Haskell] Re: state of HaXml?

2006-12-30 Thread Terrence Brannon
Ok, I got it working: module Main where import qualified Text.XML.HaXml as X import qualified Text.XML.HaXml.Parse as XP import qualified Text.XML.HaXml.Pretty as XPP import qualified IO import qualified System load fn = do contents <- readFile fn return $ XP.xmlParse fn

Re: [Haskell] Re: state of HaXml?

2006-12-30 Thread Neil Mitchell
Hi of 'FilePath -> IO String'. Dunno if this is a bug or a feature, since as far as the compiler is concerned, FilePath and String are the same type... Consider it a bug. Hoogle currently doesn't support type aliases. Version 4 will support them perfectly. As it turns out for type searching a

Re: [Haskell] Re: state of HaXml?

2006-12-30 Thread Norman Ramsey
> The simplest thing is to use readFile (from the Prelude) instead of > using handles. readFile will take care of everything for you when the > time is right. Thanks---I'll try it. Somehow my hoogle query missed readFile... undoubtedly because I asked for 'String -> IO String' instead of 'File

[Haskell] "Limits to implicit parallelism in functional applications"

2006-12-30 Thread John DeTreville
Hello, True or False? "Many interesting functional applications contain significant amounts of implicit parallelism that we can imagine usefully exploiting." I've recently written a short paper about how much implicit parallelism there might be in ordinary functional applications. Here's an abstra

Re: [Haskell] Re: Converting a 'streaming' monad into a list

2006-12-30 Thread Ross Paterson
On Sat, Dec 30, 2006 at 10:31:30PM +, Chris Kuklewicz wrote: > But WriterT is not lazy enough. So I put a lazier version up on the wiki: > > http://haskell.org/haskellwiki/New_monads/LazyWriterT Interesting. Writer is lazy but WriterT Identity isn't. I imagine that both lazy and strict var

Re: [Haskell] Re: Converting a 'streaming' monad into a list

2006-12-30 Thread Chris Kuklewicz
> > > Oh, the Writer has much nicer properties than I thought. > But WriterT is not lazy enough. So I put a lazier version up on the wiki: http://haskell.org/haskellwiki/New_monads/LazyWriterT And I actually tried the same streaming generator type problem when I started Haskell, and my resu

Re: [Haskell] Re: Converting a 'streaming' monad into a list

2006-12-30 Thread Lennart Kolmodin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: >>> I am trying to create a monad which allows computations to output data >>> to a stream. (Probably such a thing already exists, but it's a good >>> problem for my current skill level in Haskell) >>> For example: >>> streamD

[Haskell] Re: Converting a 'streaming' monad into a list

2006-12-30 Thread apfelmus
>> I am trying to create a monad which allows computations to output data >> to a stream. (Probably such a thing already exists, but it's a good >> problem for my current skill level in Haskell) > >> For example: >> streamDemo = do >> output 1 >> output 2 >> output 5 >> makelist strea

Re: [Haskell] Converting a 'streaming' monad into a list

2006-12-30 Thread Lennart Kolmodin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ryan Ingram wrote: > Hi everyone... it's my newbie post! > > I am trying to create a monad which allows computations to output data > to a stream. (Probably such a thing already exists, but it's a good > problem for my current skill level in Haskell

[Haskell] Converting a 'streaming' monad into a list

2006-12-30 Thread Ryan Ingram
Hi everyone... it's my newbie post! I am trying to create a monad which allows computations to output data to a stream. (Probably such a thing already exists, but it's a good problem for my current skill level in Haskell) For example: streamDemo = do output 1 output 2 output 5 makelist

Re: [Haskell] Re: state of HaXml?

2006-12-30 Thread Lennart Kolmodin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wagner Ferenc wrote: > [EMAIL PROTECTED] (Norman Ramsey) writes: > >> load :: String -> IO X.Document >> load fn = do handle <- IO.openFile fn IO.ReadMode >>contents <- IO.hGetContents handle >>IO.hClose handle >>