Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Build failure with mono-traversable 1.0/chunked-data 0.3 #7

Closed
snoyberg opened this issue Jul 5, 2016 · 6 comments
Closed

Build failure with mono-traversable 1.0/chunked-data 0.3 #7

snoyberg opened this issue Jul 5, 2016 · 6 comments

Comments

@snoyberg
Copy link

snoyberg commented Jul 5, 2016

> /tmp/stackage-build8$ stack unpack imm-1.0.0.0
Unpacked imm-1.0.0.0 to /tmp/stackage-build8/imm-1.0.0.0/
> /tmp/stackage-build8/imm-1.0.0.0$ runghc -clear-package-db -global-package-db -package-db=/home/stackage/work/builds/nightly/pkgdb Setup configure --package-db=clear --package-db=global --package-db=/home/stackage/work/builds/nightly/pkgdb --libdir=/home/stackage/work/builds/nightly/lib --bindir=/home/stackage/work/builds/nightly/bin --datadir=/home/stackage/work/builds/nightly/share --libexecdir=/home/stackage/work/builds/nightly/libexec --sysconfdir=/home/stackage/work/builds/nightly/etc --docdir=/home/stackage/work/builds/nightly/doc/imm-1.0.0.0 --htmldir=/home/stackage/work/builds/nightly/doc/imm-1.0.0.0 --haddockdir=/home/stackage/work/builds/nightly/doc/imm-1.0.0.0 --flags=
Configuring imm-1.0.0.0...
> /tmp/stackage-build8/imm-1.0.0.0$ runghc -clear-package-db -global-package-db -package-db=/home/stackage/work/builds/nightly/pkgdb Setup build
Building imm-1.0.0.0...
Preprocessing library imm-1.0.0.0...
[ 1 of 20] Compiling Paths_imm        ( dist/build/autogen/Paths_imm.hs, dist/build/Paths_imm.o )
[ 2 of 20] Compiling Imm.Prelude      ( src/lib/Imm/Prelude.hs, dist/build/Imm/Prelude.o )

src/lib/Imm/Prelude.hs:39:1: error:
    Failed to load interface for ‘Data.Sequences.Lazy’
    Perhaps you meant
      Data.Sequence.Lens (needs flag -package-key lens-4.14)
      Data.Sequences (from mono-traversable-1.0.0)
    Use -v to see a list of the files searched for.

src/lib/Imm/Prelude.hs:43:1: error:
    Failed to load interface for ‘Data.Textual.Encoding’
    Perhaps you meant
      Data.Text.Encoding (from text-1.2.2.1)
      Data.Text.Lazy.Encoding (from text-1.2.2.1)
    Use -v to see a list of the files searched for.
snoyberg added a commit to commercialhaskell/stackage that referenced this issue Jul 5, 2016
@k0ral
Copy link
Owner

k0ral commented Jul 7, 2016

@snoyberg I feel misguided for asking it, but why has the signature of omapM_ changed in mono-traversable-1.0 ? It used to be aligned (only more general) with the one from Data.Foldable (cf here vs there).

@snoyberg
Copy link
Author

snoyberg commented Jul 7, 2016

You mean the generalization to Applicative? Or something else?

@snoyberg
Copy link
Author

snoyberg commented Jul 7, 2016

Signature from 0.10.2:

omapM_ :: (MonoFoldable mono, Monad m) => (Element mono -> m ()) -> mono -> m ()

From 1.0.0:

omapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()

@k0ral
Copy link
Owner

k0ral commented Jul 7, 2016

Hmm indeed, my bad. My confusion comes from the fact that my code used to build fine, now it's failing because:

Couldn't match type `Bool' with `()'
    Expected type: Element (Maybe Authentication) -> IO ()
      Actual type: Authentication -> IO Bool
    In the second argument of `forM_', namely

Sorry for the noise, there must be something else at hand, I'll check better.
Out of curiosity, what prevents you from generalizing to the below signature ?

omapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m a) -> mono -> m ()

@snoyberg
Copy link
Author

snoyberg commented Jul 7, 2016

It's a combination of a performance a correctness issue.

@k0ral
Copy link
Owner

k0ral commented Jul 8, 2016

Fixed in 7540c8c, included in new release 1.0.1.0.
Thank you !

@k0ral k0ral closed this as completed Jul 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants