Skip to content

Test fail to compile with GHC 9 + TypeApplications #9

@phijor

Description

@phijor

When using GHC 9 to compile this package (as nix does currently), the tests fail to type check with a rather obscure error:

test/Data/Foldable/LevenshteinSpec.hs:18:117: error:
    Variable not in scope:
      (@) :: ([a29] -> [a29] -> Bool) -> t29 -> prop29
   |
18 |   it "lowerbound string difference" (quickCheckWith stdArgs { maxSuccess = ntimes } (property (lowerBoundLengthDiff @ Int)))
   |                                                                                                                     ^

test/Data/Foldable/LevenshteinSpec.hs:18:119: error:
    Data constructor not in scope: Int
   |
18 |   it "lowerbound string difference" (quickCheckWith stdArgs { maxSuccess = ntimes } (property (lowerBoundLengthDiff @ Int)))
   |

This seems to be caused by the whitespace-sensitive parsing of certain operators, including (@) from the language extension -XTypeApplications.

To fix this, I propose changing occurences of @ Foo to @Foo everywhere in test/Data/Foldable/LevenshteinSpec.hs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions