Skip to content
New issue

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

Remove types from Haskell judging in TESTed #541

Open
tibvdm opened this issue Sep 24, 2024 · 0 comments
Open

Remove types from Haskell judging in TESTed #541

tibvdm opened this issue Sep 24, 2024 · 0 comments

Comments

@tibvdm
Copy link
Collaborator

tibvdm commented Sep 24, 2024

I have the following python syntax in my tested YAML file:

- tab: geefNde
  contexts:
    - testcases:
      - expression: geefNde(2, [1, 2, 3, 4])
        return: 3

In the translation from Tested to Haskell, the judge adds the types to the arguments. The expression is translated to geefNde 2 :: Int [1 :: Int, 2 :: Int, 3 :: Int, 4 :: Int]. Since this isn't valid Haskell syntax, Dodona shows an error:

Execution0.hs:57:54: error:
    Illegal type: ‘[1 :: Int, 2 :: Int, 3 :: Int, 4 :: Int]’
      Perhaps you intended to use DataKinds
   |
56 |             r <- return (Submission.geefNde 2 :: Int [1 :: Int, 2 :: Int, 3 :: Int, 4 :: Int])
   |                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Execution0.hs:57:55: error:
    Illegal type: ‘1’ Perhaps you intended to use DataKinds
   |
56 |             r <- return (Submission.geefNde 2 :: Int [1 :: Int, 2 :: Int, 3 :: Int, 4 :: Int])
   |                                                       ^
Execution0.hs:57:65: error:
    Illegal type: ‘2’ Perhaps you intended to use DataKinds
   |
56 |             r <- return (Submission.geefNde 2 :: Int [1 :: Int, 2 :: Int, 3 :: Int, 4 :: Int])
   |                                                                 ^
Execution0.hs:57:75: error:
    Illegal type: ‘3’ Perhaps you intended to use DataKinds
   |
56 |             r <- return (Submission.geefNde 2 :: Int [1 :: Int, 2 :: Int, 3 :: Int, 4 :: Int])
   |                                                                           ^
Execution0.hs:57:85: error:
    Illegal type: ‘4’ Perhaps you intended to use DataKinds
   |
56 |             r <- return (Submission.geefNde 2 :: Int [1 :: Int, 2 :: Int, 3 :: Int, 4 :: Int])
   |                                                                                     ^
[1 of 6] Compiling EvaluationUtils  ( EvaluationUtils.hs, EvaluationUtils.o )
[2 of 6] Compiling Submission       ( <code>, Submission.o )
[3 of 6] Compiling Values           ( Values.hs, Values.o )
[4 of 6] Compiling Execution0       ( Execution0.hs, Execution0.o )

Is it possible to remove these types from the translation or add an option to disable it?

@pdawyndt pdawyndt changed the title Remove types from Haskell judging in Tested Remove types from Haskell judging in TESTed Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant