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

The fetch is no longer in scope for the test files #2

Open
CMCDragonkai opened this issue Sep 22, 2020 · 2 comments
Open

The fetch is no longer in scope for the test files #2

CMCDragonkai opened this issue Sep 22, 2020 · 2 comments

Comments

@CMCDragonkai
Copy link

When attempting to build this library now:

[1 of 3] Compiling Parameterized.Control.Monad.Trans.Reader.ReaderSpec ( test/Parameterized/Control/Monad/Trans/Reader/ReaderSpec.hs, dist/build/parameterized-test/parameterized-test-tmp/Parameterized/Control/Monad/Trans/Reader/ReaderSpec.o )

test/Parameterized/Control/Monad/Trans/Reader/ReaderSpec.hs:94:13: error:
    Variable not in scope: fetch
   |
94 |     let r = fetch @Int a
   |             ^^^^^

test/Parameterized/Control/Monad/Trans/Reader/ReaderSpec.hs:94:13: error:
    • Cannot apply expression of type ‘t1’
      to a visible type argument ‘Int’
    • In the expression: fetch @Int a
      In an equation for ‘r’: r = fetch @Int a
      In the expression:
        do a <- ask
           let r = fetch @Int a
           case r of
             0 -> empty
             r' -> pure $ show r'
   |
94 |     let r = fetch @Int a
   |             ^^^^^^^^^^^^

test/Parameterized/Control/Monad/Trans/Reader/ReaderSpec.hs:102:13: error:
    Variable not in scope: fetch
    |
102 |     let r = fetch @Bool a
    |             ^^^^^

test/Parameterized/Control/Monad/Trans/Reader/ReaderSpec.hs:102:13: error:
    • Cannot apply expression of type ‘t1’
      to a visible type argument ‘Bool’
    • In the expression: fetch @Bool a
      In an equation for ‘r’: r = fetch @Bool a
      In the expression:
        do a <- ask
           let r = fetch @Bool a
           case r of
             False -> empty
             r' -> pure $ show r'
    |
102 |     let r = fetch @Bool a
    |             ^^^^^^^^^^^^^
[2 of 3] Compiling Parameterized.Control.Monad.Trans.State.Strict.StateSpec ( test/Parameterized/Control/Monad/Trans/State/Strict/StateSpec.hs, dist/build/parameterized-test/parameterized-test-tmp/Parameterized/Control/Monad/Trans/State/Strict/StateSpec.o )

test/Parameterized/Control/Monad/Trans/State/Strict/StateSpec.hs:29:13: error:
    Variable not in scope: fetch
   |
29 |     let r = fetch @Int s
   |             ^^^^^

test/Parameterized/Control/Monad/Trans/State/Strict/StateSpec.hs:29:13: error:
    • Cannot apply expression of type ‘t1’
      to a visible type argument ‘Int’
    • In the expression: fetch @Int s
      In an equation for ‘r’: r = fetch @Int s
      In the expression:
        do s <- get
           let r = fetch @Int s
           case r of
             0 -> empty
             r' -> do ...
   |
29 |     let r = fetch @Int s
   |             ^^^^^^^^^^^^

test/Parameterized/Control/Monad/Trans/State/Strict/StateSpec.hs:39:13: error:
    Variable not in scope: fetch
   |
39 |     let r = fetch @Bool s
   |             ^^^^^

test/Parameterized/Control/Monad/Trans/State/Strict/StateSpec.hs:39:13: error:
    • Cannot apply expression of type ‘t1’
      to a visible type argument ‘Bool’
    • In the expression: fetch @Bool s
      In an equation for ‘r’: r = fetch @Bool s
      In the expression:
        do s <- get
           let r = fetch @Bool s
           case r of
             False -> empty
             r' -> do ...
   |
39 |     let r = fetch @Bool s
   |             ^^^^^^^^^^^^^

This is because this file https://github.com/louispan/parameterized/blob/master/test/Parameterized/Control/Monad/Trans/Reader/ReaderSpec.hs

Is not explicitly importing fetch and the fetch is no longer exported by default by one of the dependencies.

@CMCDragonkai
Copy link
Author

In order to make this work in Nixpkgs. We had to disable the tests:

    parameterized = pkgs.haskell.lib.dontCheck super.parameterized;

@CMCDragonkai
Copy link
Author

CMCDragonkai commented Sep 22, 2020

@louispan can you update the tests so that the fetch is explicitly imported and then release a new revision.

Gabriella439 added a commit to Gabriella439/nixpkgs that referenced this issue Apr 19, 2021
The package builds without the test suite

The upstream issue is: louispan/parameterized#2
sternenseemann pushed a commit to NixOS/nixpkgs that referenced this issue Apr 19, 2021
The package builds without the test suite

The upstream issue is: louispan/parameterized#2
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