Happy Parsers and constraints

18 May
2017
18 May
'17
8:32 p.m.
Hi all If I have a happy parser for an AST that is polymorphic, is there any way to put constraints on the individual rules? e.g. if I have data Foo a = Foo String a and a rule something like foo :: { (Show a) => Foo a } foo : otherrule { Foo (show $1) $1 } Because of the way the tables are constructed in happy, the Show constraint is not attached to the point where the rule RHS is applied. Is this simply impossible? Alan
2972
Age (days ago)
2972
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alan & Kim Zimmerman