snoyberg / classy-prelude

A typeclass-based Prelude.
108 stars 15 forks source link

mono-traversable drops to 0.4.0 #98

Closed vlatkoB closed 9 years ago

vlatkoB commented 9 years ago

Hello,

from hackage repo with and without Stackage LTS 1.14 .config, I'm trying to install deps for the .cabal file below in a sandbox (no other constraints in local cabal.config), but fail. mono-traversable falls to 0.4.0 and can't be built. When one-space indented packages are commented out, all goes fine and classy-prelude is on 0.11.0. Any thoughts?

cabal file:

library
  build-depends: 
                   acid-state,
                   async,
                   base >= 4.7,
                   classy-prelude == 0.5.*,
                   conduit,
                   containers,
                   data-default,
                   deepseq,
                   directory,
                   errors,
                    esqueleto,
                   filepath,
                   hashable,
                   hslogger,
                   HTTP,
                   hxt,
                   hxt-curl,
                   MissingH,
                    monad-logger,
                   monad-loops,
                   mtl,
                   network-uri,
                   old-locale,
                   parallel,
                   pipes,
                    persistent,
                    persistent-mysql,
                    persistent-postgresql,
                    persistent-sqlite,
                    persistent-template,
                   resourcet,
                   rdtsc,
                    safecopy,
                   SafeSemaphore,
                   split,
                   strict,
                   system-filepath,
                   system-fileio,
                   text,
                   time,
                   transformers,
                   unordered-containers

Filtered dry-run output ... without classy-prelude

mtl-2.1.3.1 (latest: 2.2.1)
transformers-compat-0.4.0.3 (latest: 0.4.0.4)

classy-prelude without constraint

mtl-2.1.3.1 (latest: 2.2.1)
transformers-compat-0.4.0.3 (latest: 0.4.0.4)
mono-traversable-0.4.0 (latest: 0.9.1)
classy-prelude-0.9.1 (latest: 0.11.0)

classy-prelude with constraint 0.5.*

mtl-2.1.3.1 (latest: 2.2.1)
transformers-compat-0.4.0.3 (latest: 0.4.0.4)
classy-prelude-0.5.10 (latest: 0.11.0)

Best regards,

vlakto

snoyberg commented 9 years ago

I can't say anything without seeing the actual error message.

Is this an academic question, or a practical one? If practical: why not just fix it by using the LTS cabal.config? It's designed to solve these exact kinds of use cases.

vlatkoB commented 9 years ago

It is a practical question. As mentioned, I did try both, with LTS 1.14 cabal.config, and without it. The error in compiling mono-traversable is because it is in version 0.4.0, and current one is 0.9.1. A lot has changed since, I'd assume. I was quite surprised that versions for mono-traversable and class-prelude drop so much, to 0.4.0 (mono) and 0.9.1 (classy).

If you use the cabal above (without ==5 constraint for classy-prelude), and try the cabal install --only-dependencies, you'll see the same issue. This is not about my code, but installing deps in clean sandbox only.

The error:

src/Data/MinLen.hs:80:1:' Could not coerce from ‘f1 mono’ to ‘f1 (MinLen nat mono)’

snoyberg commented 9 years ago

I'm having a lot of trouble understanding your bug report. In any event, it's missing some important information to continue:

Given that http://www.stackage.org/lts/1.14/cabal.config specifies mono-traversable ==0.7.0, I have no idea how cabal could be selecting version 0.4.

vlatkoB commented 9 years ago

Ups. Arch, GHC 7.8.4, Cabal 1.22.0.0

My bad. I missed to carefully read the first step in LTS setup guide, and thought that placing LTS config in ~./cabal will have effect on the whole system. Like remote-repo. Sorry for taking your time.