The simpleHello rule in helloDSL grammar accepts hello with no parameters.
The HelloDSLSemantics semantics file, however, uses the pattern (SimpleHello name),
raising an error The constructor ‘SimpleHello’ should have no arguments, but has been given 1.
Changing (SimpleHello name) to (SimpleHello) solves the problem, with either
runHelloDSL $ begin |> hello |> name "ymzk" |> end or runHelloDSL $ begin |> hello |> end.
The
simpleHellorule inhelloDSLgrammar acceptshellowith no parameters.The
HelloDSLSemanticssemantics file, however, uses the pattern(SimpleHello name),raising an error
The constructor ‘SimpleHello’ should have no arguments, but has been given 1.Changing
(SimpleHello name)to(SimpleHello)solves the problem, with eitherrunHelloDSL $ begin |> hello |> name "ymzk" |> endorrunHelloDSL $ begin |> hello |> end.