You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 26, 2018. It is now read-only.
considering the problem I had at #28 with the extensive use of variants in a large grammar, the opervars was proposed as partial solution:
-- hack to get the same behaviour as from variants. parses both, linearizes the first. oper vars : Str -> Str -> Str =\x,y ->pre { ""=> x ; _ => y } ;
it then became a definition in a module of the grammar, but I wonder if it shouldn't be in the Prelude, so that no other grammars need to repeat its definition.
The text was updated successfully, but these errors were encountered:
I don't have an opinion on this; I understand @aarneranta and @krangelov may have some plans to change the behaviour of variants at some point so that it doesn't explode that much?
Another point is that variants are not recommended in the resource grammar in any case, because it's better to have predictable output. It is better to define two functions: e.g. contracted and uncontracted negation in English (don't and do not), or different genders in second person pronoun. Then an application grammar can use variants to allow all of these.
Another point is that variants are not recommended in the resource grammar in any case, because it's better to have predictable output.
after having this argument twice I'm finally being convinced of this!
still, I think the vars oper seems useful enough as a way to parse typos (but not linearise them!) to warrant its inclusion in the prelude or some other core module...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
considering the problem I had at #28 with the extensive use of variants in a large grammar, the
oper
vars
was proposed as partial solution:it then became a definition in a module of the grammar, but I wonder if it shouldn't be in the
Prelude
, so that no other grammars need to repeat its definition.The text was updated successfully, but these errors were encountered: