
On Tue, 2008-10-14 at 07:13 -0500, Antoine Latter wrote:
On Tue, Oct 14, 2008 at 12:03 AM, Magicloud
wrote: Hi, I wanted to install this package. Well, Building hprotoc-0.3.1... ... [3 of 7] Compiling Text.ProtocolBuffers.ProtoCompile.Parser ...
Text/ProtocolBuffers/ProtoCompile/Parser.hs:48:0: Type synonym `GenParser' should have 2 arguments, but has been given 1 In the type synonym declaration for `P'
And it just stopped here.
This is an incompatibility between parsec-2 and parsec-3. In parsec-2, 'GenParser' is declared with a 'data' declaration, whereas in parsec-3 it's a type synonym. Since type-synonym declared type-constructors cannot be partially applied this doesn't work.
Currently in parsec-3 'GenParser' is declared as:
type GenParser tk st = Parsec [tk] st
We should be able to change it to:
type GenParser tk = Parsec [tk]
in Text.Parsec.String, unless I'm forgetting something else tricky about type synonyms.
Derek, does this sound reasonable?
The problem is Parsec itself is a type synonym. type Parsec s u = ParsecT s u Identity so that latter definition of GenParser leads to a partial application of Parsec.