|
Re: ReadS with Maybe: msg#00046lang.haskell.cafe
Henning Thielemann <lemming@xxxxxxxxxxxxxxxxxxxxx> wrote: > What is the reason for the definition > ReadS a = [(a, String)] > not being > ReadS a = Maybe (a, String) > ? The latter one reflects that either one or no value is read, whereas > the first definition allows an arbitrary number of read values which > is confusing and unsafe in my opinion. List is a backtracking monad, while Maybe is merely an error monad. You have to have backtracking to bet better than LL(1) or LR(1) parsing, and LL(1) is not an acceptable restriction for a fundamental function like read. Jonathan Cast |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Tutorial for server programming in concurrent Haskell: 00046, Ahn Ki-yung |
|---|---|
| Next by Date: | Re: Tutorial for server programming in concurrent Haskell: 00046, Peter Simons |
| Previous by Thread: | Re: ReadS with Maybei: 00046, David Roundy |
| Next by Thread: | RE: GHC for .NET?: 00046, Don Syme |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |