yi-editor / yi

The Haskell-Scriptable Editor
GNU General Public License v2.0
1.5k stars 199 forks source link

MonadFail proposal #1108

Open xaverdh opened 5 years ago

xaverdh commented 5 years ago

This does the necessary changes to make yi-core compile with ghc 8.6, implementing the monad fail proposal.

xaverdh commented 5 years ago

Maybe someone with more knowledge of the code can tell if the marks in 6f0b1c0302c312e992c18f1f1d02b02fb86f258d are expected to be there (in which case this should be doing the right thing; erroring out), or not. Something similar appears to be going on in Yi.Search here for example, but I understand the assumptions there even less.

xaverdh commented 5 years ago

The Hoogle part appears to be unused and in a bad shape in general. As it is, it would crash on you more or less immediately. I just did the bare minimum necessary to make it compile, but it should probably be reworked / dropped?

jhance commented 4 years ago

Since this has been waiting forever and not received any review, I'm going to play with it a bit, if it needs any changes I'll do them myself.

xnox commented 4 years ago

Is this related?

src/Parser/Incremental.hs:185:5-8: error:
    ‘fail’ is not a (visible) method of class ‘Monad’
    |
185 |     fail _message = Empt
    |     ^^^^
Haddock coverage:
Haddock failed (no modules?), refusing to create empty documentation package.
xaverdh commented 4 years ago

Is this related?

src/Parser/Incremental.hs:185:5-8: error:
    ‘fail’ is not a (visible) method of class ‘Monad’
    |
185 |     fail _message = Empt
    |     ^^^^
Haddock coverage:
Haddock failed (no modules?), refusing to create empty documentation package.

Yes since ghc 8.8the Monad class no longer has fail a method (my pr was written when ghc 8.6 was the newest release). Will need to be fixed on top of this pr.

xnox commented 4 years ago

Ubuntu has removed yi from the Ubuntu Archive and will no longer ship it, as it fails to build from source with current 8.8.3 ghc + upgraded dependencies.