Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issues with GHC 8.8 due to the MonadFail change-over. #27

Closed
ekmett opened this issue Jun 16, 2019 · 4 comments
Closed

Compilation issues with GHC 8.8 due to the MonadFail change-over. #27

ekmett opened this issue Jun 16, 2019 · 4 comments

Comments

@ekmett
Copy link
Member

ekmett commented Jun 16, 2019

HSCParser.hs:41:5: error:
    ‘fail’ is not a (visible) method of class ‘Monad’
   |
41 |     fail msg = Parser $ \pos _ -> Failure pos msg
   |     ^^^^
@phadej
Copy link
Contributor

phadej commented Jun 28, 2019

I made revisions for three latest releases: https://hackage.haskell.org/package/hsc2hs-0.68.4/revisions/

There are no hsc2hc compatible with ghc-8.8 (but there's patch in head.hackage).

@hvr
Copy link
Member

hvr commented Aug 11, 2019

This has been fixed last year already in Git via 6324184 and the upcoming hsc2hs-0.68.6 release (to go along with GHC 8.8.1) will contain it

@RyanGlScott
Copy link
Member

hsc2hs-0.68.6 is now on Hackage.

@perlpunk
Copy link

perlpunk commented Aug 2, 2020

I ran into the same error message for https://github.com/orenbenkiki/yamlreference
Any idea why on alpine linux ghc 8.8.3 is delivered with hsc2hs 0.68.5?

/ # hsc2hs --version
hsc2hs version 0.68.5
/ # ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.3
Configuring executable 'yaml2yeast' for YamlReference-0.10.0..
Preprocessing executable 'yaml2yeast' for YamlReference-0.10.0..
Building executable 'yaml2yeast' for YamlReference-0.10.0..
[1 of 2] Compiling Text.Yaml.Reference ( Text/Yaml/Reference.hs, /tmp/yamlreference-master/dist-newstyle/build/x86_64-linux/ghc-8.8.3/YamlReference-0.10.0/x/yaml2yeast/build/yaml2yeast/yaml2yeast-tmp/Text/Yaml/Reference.o )                        

Text/Yaml/Reference.hs:711:3: error:
    ‘fail’ is not a (visible) method of class ‘Monad’
    |
711 |   fail message = Parser $ \ state -> failReply state message
    |   ^^^^

Should I build hsc2hs from source or maybe wait for an alpine update?
Dockerfile: https://github.com/yaml/yaml-runtimes/blob/update-alpine/docker/haskell/alpine-builder.dockerfile
Install script: https://github.com/yaml/yaml-runtimes/blob/update-alpine/docker/haskell/utils/hs-build.sh

See also yaml/yaml-runtimes#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants