-
-
Save kmizu/7b179034867a337de08919e69fb91545 to your computer and use it in GitHub Desktop.
Ambiguous occurrence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class M a where | |
(+) :: a -> a -> a | |
add x y = x + y | |
main = do print "Hello" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ ghc M.hs
[1 of 1] Compiling Main ( M.hs, M.o )
M.hs:4:13: error:
Ambiguous occurrence ‘+’
It could refer to either ‘Prelude.+’,
imported from ‘Prelude’ at M.hs:1:1
(and originally defined in ‘GHC.Num’)
or ‘Main.+’, defined at M.hs:2:3