
I'm writing a parser for polynomial equation (ex : 5 x ^2 + 3 x ^ 1 = 3 x ^ 2). I'm using parsec to decompose my parser into smaller parts, and it works, but all my parser functions have the type : parser :: Stream s m Char => ParsecT s u m <Type to Parse> Is there a way to factor out that boilerplate, in such a way that I could simply write a type like parser :: Parser <Type to parse> ? The farther I've been is : type Parser s = ParsecT s () Identity type St = Stream s Identity Char (using ConstraintKinds) parser :: St s => Parser s <Type to Parse> But that still feels tedious to write every time... I've tried to search the wiki and the internet in general, but did not find an answer to that particularly. Thxs a lot if you have any hindsights. Max Gautier