Die Wahrheit über Read

Standard-Haskell:

class Read where 
    readsPrec :: Int -> ReadS a
type ReadS a = String -> [(a,String)]
das ist der monadische Parsertyp, aber die Monad-Instanz fehlt (deswegen keine Do-Notations usw.) -- Repariert in GHC:
class Read where     ...
    readPrec :: ReadPrec a
Siehe http://www.haskell.org/ghc/docs/latest/html/libraries/base/Text-ParserCombinators-ReadPrec.html



Johannes Waldmann 2010-01-25