We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When specifying an action space with a one-element list, this results in a parser error.
Minimal open game with this behaviour:
testGame = [opengame| inputs : ; feedback : ; :---------------------------: inputs: ; feedback: ; operation: dependentDecision "p1" (const [1]); outputs: discardedOutput; returns: 0; :----------------------------: outputs : ; returns : ; |]
The game compiles.
Compilation raises the following error:
/open-games-hs/src/Examples/PieCutting_open.hs:171:12: error: • Exception when trying to run compile-time code: "verbose parser" (line 6, column 47): unexpected "]" expecting digit, "(", "if", "\\", identifier, natural, literal string, "[", "do", "let", operator, "," or ".." CallStack (from HasCallStack): error, called at /open-games-hs/src/Preprocessor/Compile.hs:108:39 in main:Preprocessor.Compile Code: Language.Haskell.TH.Quote.quoteExp opengame "\n\ \ inputs : ;\n\ \ feedback : ;\n\ \ :---------------------------:\n\ \ inputs: ;\n\ \ feedback: ;\n\ \ operation: dependentDecision \"p1\" (const [1]);\n\ \ outputs: discardedOutput;\n\ \ returns: 0;\n\ \ :----------------------------:\n\ \ outputs : ;\n\ \ returns : ;\n\ \ " • In the quasi-quotation: [opengame| inputs : ; feedback : ; :---------------------------: inputs: ; feedback: ; operation: dependentDecision "p1" (const [1]); outputs: discardedOutput; returns: 0; :----------------------------: outputs : ; returns : ; |] | 171 | testGame = [opengame| | ^^^^^^^^^^... Failed, 38 modules loaded.
Specify the game like this:
testGame = [opengame| inputs : ; feedback : ; :---------------------------: inputs: ; feedback: ; operation: dependentDecision "p1" (const lsOne); outputs: discardedOutput; returns: 0; :----------------------------: outputs : ; returns : ; |] where lsOne = [1]
This compiles, but is not a very nice solution, so changing the parser to be able to deal with this would be nicer.
The text was updated successfully, but these errors were encountered:
Update: this bug also gets triggered for action spaces with a specified resolution:
operation : dependentDecision playerName (\x -> [0, 0.1 .. x]) ;
A similar where statement as above can get around this for the time being.
where
Sorry, something went wrong.
No branches or pull requests
Description
When specifying an action space with a one-element list, this results in a parser error.
Minimal open game with this behaviour:
Expected behaviour
The game compiles.
Actual behaviour
Compilation raises the following error:
Current solution
Specify the game like this:
This compiles, but is not a very nice solution, so changing the parser to be able to deal with this would be nicer.
The text was updated successfully, but these errors were encountered: