valderman / haste-compiler

A GHC-based Haskell to JavaScript compiler
http://haste-lang.org
BSD 3-Clause "New" or "Revised" License
1.45k stars 109 forks source link

Pin `either` to version that still has Control.Monad.Trans.Either. #421

Closed cpressey closed 5 years ago

cpressey commented 5 years ago

Hello,

I tried to build haste today (from git) using the instructions in the README, and encountered this error:

Preprocessing executable 'hastec' for haste-compiler-0.6.0.0...

src/Haste/Linker.hs:9:8:
    Could not find module ‘Control.Monad.Trans.Either’
    Perhaps you meant
      Control.Monad.Trans.Writer (needs flag -package-key transformers-0.4.2.0@trans_GZTjP9K5WFq01xC9BAGQpF)
      Control.Monad.Trans.Error (needs flag -package-key transformers-0.4.2.0@trans_GZTjP9K5WFq01xC9BAGQpF)
      Control.Monad.Trans.Reader (needs flag -package-key transformers-0.4.2.0@trans_GZTjP9K5WFq01xC9BAGQpF)
    Use -v to see a list of the files searched for.

It seems that the latest version of either has dropped Control.Monad.Trans.Either:

https://github.com/ekmett/either/commit/543f78bce4bcd8131318b912574d409f59ce6144

So, this PR holds back the version of either to a version where Control.Monad.Trans.Either still exists. This permits haste to build for me. (There are some failing tests but they're probably unrelated.)

The other option would be to migrate to Control.Monad.Trans.Except from transformers, or transformers-compat as suggested by the CHANGELOG message in the above commit, but I do not feel qualified to make that change (at least not at the moment).

valderman commented 5 years ago

Yeah, long term it's probably for the best to migrate towards a newer version, but getting stuff to build in the meantime is great. Thanks!