mbid / hmemo

Spaced repetition of flash cards on the command line
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

Ambiguous occurrence ‘<>’ #1

Open zugz opened 7 years ago

zugz commented 7 years ago

$ cabal build Preprocessing executable 'hmemo' for hmemo-0.1.0.0... [1 of 1] Compiling Main ( app/Main.hs, dist/build/hmemo/hmemo-tmp/Main.o )

app/Main.hs:74:32: error: Ambiguous occurrence ‘<>’ It could refer to either ‘Options.Applicative.<>’, imported from ‘Options.Applicative’ at app/Main.hs:3:1-26 (and originally defined in ‘Data.Monoid’) or ‘Data.Semigroup.<>’, imported from ‘Data.Semigroup’ at app/Main.hs:4:1-21

[and many more instances of the same error]

$ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.0.2

mbid commented 7 years ago

Thanks for reporting this! Unfortunately, I don't use cabal, and can't really because I'm on arch where the maintainers have decided to f*** up the global ghc install. I've just pushed a version that imports (<>) from Data.Monoid instead of Data.Semigroup. Could you try again? If it still doesn't work, you could try installing via stack, which seems to work for me.

zugz commented 7 years ago

Cheers, that patch fixed it. It now compiles cleanly, except for one warning:

app/Main.hs:77:9: warning: [-Woverlapping-patterns] Pattern match is redundant In a case alternative: (1, 1) -> ...