Ad
  • Custom User Avatar

    Haskell sample tests don't even compile without any modification to the code.

    Server Execution Error:
    The name of the test module must end with 'Spec'
    

    Adding Spec to the module name later fails with:

    test/Codewars/Kata/AllNoneAny/TestSpec.hs:25:5: error:
        • Couldn't match type ‘Arg a0’ with ‘()’
          Expected type: SpecWith ()
            Actual type: SpecWith (Arg a0)
          The type variable ‘a0’ is ambiguous
        • In a stmt of a 'do' block:
            it "shouldn't use any forbidden modules or functions"
              $ do hidden
                     [FromModule "Prelude" "any", FromModule "Prelude" "all", ....]
          In the second argument of ‘($)’, namely
            ‘do it "shouldn't use any forbidden modules or functions"
                  $ do hidden [...]’
          In a stmt of a 'do' block:
            describe "hidden modules"
              $ do it "shouldn't use any forbidden modules or functions"
                     $ do hidden [...]
       |
    25 |     it "shouldn't use any forbidden modules or functions" $ do
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...