faylang / fay

A proper subset of Haskell that compiles to JavaScript
https://github.com/faylang/fay/wiki
BSD 3-Clause "New" or "Revised" License
1.29k stars 86 forks source link

Update fay to run with more recent haskell-src-exts #452

Closed henrylaxen closed 6 years ago

henrylaxen commented 6 years ago

Hi Adam,

I have quite of bit of code that depends on fay, so when it doesn't compile with the version of ghc I'm using, I notice. Well, I couldn't compile fay with ghc 8.4.2 so I started looking into it. I discovered that the culprits where mainly two. The new Semigroup class and some new names introduced to haskell-src-exts. So I added those changes to fay and found I still couldn't compile because of dependency on testing-feat in language-ecmascript. It turns out that testing-feat is not really required to compile the language, it is just need to run the tests. I modified the language-ecmascript.cabal file to pull out the testing-feat dependency and put it into the test section of the cabal file and filed a pull request, https://github.com/jswebtools/language-ecmascript/pull/84, almost a month ago. Sadly it has not yet been included in Hackage so I have to have my own private version of language-ecmascript in order to compile fay. I'm included the file fay-language-ecmascript.diff in this pull request so perhaps you can encourage Andrey (https://github.com/achudnov) to push it to hackage. Anyway, after making all those changes, it now compiles and passes the tests with nightly-2018-05-13. I was hoping an lts package that uses ghc 8.4.2 becomes available before I sent this, but so far it hasn't and I need to move on to other things. I wish I understood the code you have written to implement fay better, but it is above my haskell pay grade at this point. Anyway, I hope you find this effort helpful in keeping fay up to date.

Best wishes, Henry Laxen

PS

I ran the fay.cabal file through cabal-bounds, which completely reformatted the fay.cabal file. That is why the diff is the entire cabal file. Sorry. Also I compiled and ran fay-tests and all of the tests came back OK.

bergmark commented 6 years ago

Hi, sorry for the delay on this. Hopefully I can get this merged this weekend.

Looks like we can get all the dependencies back into stackage nightly: https://github.com/commercialhaskell/stackage/pull/3723

mihaimaruseac commented 6 years ago

Just merged commercialhaskell/stackage#3723 and got a full build to pass, so all deps will be in nightly in a few hours.

bergmark commented 6 years ago

Hi again,

I've incorporated your changes into master and released fay-0.24.0.1, I'll send a PR to get it into stackage nightly.

Thanks for the help!