Skip to content

Tests don't compile with release flag

$ cabal build spec -frelease
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - copar-0.1.0.0 (test:spec) (additional components to build)
Preprocessing test suite 'spec' for copar-0.1.0.0..
Building test suite 'spec' for copar-0.1.0.0..
[19 of 27] Compiling Copar.Functors.PowersetSpec ( tests/Copar/Functors/PowersetSpec.hs, /somewhere/dist-newstyle/build/x86_64-linux/ghc-8.6.5/copar-0.1.0.0/t/spec/build/spec/spec-tmp/Copar/Functors/PowersetSpec.o ) [Copar.Coalgebra.Parser changed]

tests/Copar/Functors/PowersetSpec.hs:20:14: error:
    • Couldn't match type ‘()’ with ‘Sorted ()’
      Expected type: Either
                       (Text.Megaparsec.Error.ParseErrorBundle
                          Data.Text.Internal.Text Data.Void.Void)
                       (SymbolTable,
                        Data.MorphismEncoding.Encoding (Sorted ()) (Sorted Bool))
        Actual type: Either
                       (Text.Megaparsec.Error.ParseErrorBundle
                          Data.Text.Internal.Text Data.Void.Void)
                       (SymbolTable,
                        Data.MorphismEncoding.Encoding
                          (Copar.RefinementInterface.Label
                             (Copar.FunctorExpression.Desorting.Desorted Powerset))
                          (Copar.RefinementInterface.F1
                             (Copar.FunctorExpression.Desorting.Desorted Powerset)))
    • In the second argument of ‘(<$>)’, namely
        ‘parseMorphisms
           (Functor 1 (Powerset Variable))
           EnableSanityChecks
           ""
           "x: {x, y}\ny: {}"’
      In the first argument of ‘shouldParse’, namely
        ‘(snd
            <$>
              parseMorphisms
                (Functor 1 (Powerset Variable))
                EnableSanityChecks
                ""
                "x: {x, y}\ny: {}")’
      In the second argument of ‘($)’, namely
        ‘(snd
            <$>
              parseMorphisms
                (Functor 1 (Powerset Variable))
                EnableSanityChecks
                ""
                "x: {x, y}\ny: {}")
           `shouldParse`
             (encoding
                [(Sorted 1 True), (Sorted 1 False)]
                [(0, (Sorted 1 ()), 0), (0, (Sorted 1 ()), 1)])’
   |
20 |     (snd <$> parseMorphisms (Functor 1 (Powerset Variable)) EnableSanityChecks "" "x: {x, y}\ny: {}") `shouldParse`
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^