[Haskell-beginners] Fwd: Factor out parsec types

Max Gautier ashelia1000 at gmail.com
Tue Mar 24 17:08:42 UTC 2020


Hi Francesco.

If I understand correctly the parsec interface, leaving the stream
type s as a type variable
allows me to specify the concrete stream type at the time of use
without changing the parser,
as long as that stream gives Char tokens, is that correct ?
And using a concrete stream type forfeit that, does'nt it ?

(So for example in Quickcheck tests in can just use a String as my
stream, and in other contexts something like Text).
(I have not really experimented yet with the various "string" type, so
maybe this is unnecessary (but in that
case, what is the point of ParsecT exposing these type parameters ?))

The main purpose of my project is to learn Haskell, so I'm trying to
understand the full power of the tools
I use^ .


More information about the Beginners mailing list