#haskell - Sat 31 Mar 2007 between 19:44 and 20:08

NY Lost Funds



DukeDaveHi guys, am I right in thinking the Read class is a little arkward :S
*awkward
sorearRead is broken in every way!
@seen malcolmw
lambdabotI saw malcolmw leaving #haskell-soc, #ghc, #haskell-overflow, #haskell-blah and #haskell 1d 6h 43m 13s ago, and .
sorear@goo malcolm text parse blog
lambdabothttp://nhc98.blogspot.com/
Title: malcolm
sorearI think it's on there.
when you want code:
@where polyparse
lambdabothttp://www.cs.york.ac.uk/fp/polyparse
DukeDavehm, I think this might be a little over the top for me :)
zarvokhere's the post you want:
DukeDave(reading in pairs of ints!)
zarvokhttp://nhc98.blogspot.com/2005/11/replacement-for-read-class.html
lambdabotTitle: malcolm: Replacement for Read class
zarvokyeah, you may not care about all this stuff :)
CaleDukeDave: The read class would be better replaced by a proper parser combinator library, but it does its job reasonably well for basic reading of datatypes.
DukeDave: How are the pairs of Ints formatted?
If they're like "(57,12)", you can just apply read straight off.
> read "(57,12)" :: (Int, Int)
lambdabot(57,12)
CaleI think probably the easiest way to create an instance of Read is to use ReadP and use the ReadP_to_S function to get reads.
(er, readsPrec, but you can ignore the precedence parameter.)
If you really need precedence parsing, there's ReadPrec, which ReadP lifts into as well.
araujoHello
CaleHi
araujo:-)
how you doing Cale ?
Caleall right
sorearhello!
actionaraujo packs sorear into a State transformer
araujopacks sorear into a State transformer
actionsorear execStates himself
sorearexecStates himself
araujo:-)
sorearWow, this isn't something you see every day.
Almost unbelievable, even.
GHC's "probable cause" was correct.
araujo!?
Calesorear: huh?

Page: 2 9 16 23 30 37 44 51 58 65 

IrcArchive

NY Lost Funds