Created
August 22, 2020 10:00
-
-
Save fendor/60e4cca8111966cf4f19e16d72eded67 to your computer and use it in GitHub Desktop.
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
GHC/Foo.hs:6:12: error: | |
• Overlapping instances for MyEq Bool arising from a use of ‘==’ | |
Matching instances: | |
instance MyEq Bool -- Defined in ‘GHC.Base’ | |
instance MyEq Bool -- Defined in ‘GHC.Base’ | |
• In the expression: True == True | |
In an equation for ‘foo’: foo = True == True |
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
module GHC.Base (module GHC.Base, Bool(..)) where | |
import GHC.Prim | |
import GHC.Types | |
default () | |
class MyEq a where | |
(==), (/=) :: a -> a -> Bool | |
x /= y = not (x == y) | |
x == y = not (x /= y) | |
instance MyEq Bool where | |
False == False = True | |
True == True = True | |
_ == _ = False | |
not :: Bool -> Bool | |
not True = False | |
not False = True | |
inline x = x | |
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
module GHC.Foo where | |
import GHC.Base | |
foo = True == True | |
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
TOP=../../.. | |
include $(TOP)/mk/boilerplate.mk | |
include $(TOP)/mk/test.mk | |
clean: | |
rm -f GHC/*.o | |
rm -f GHC/*.hi | |
base01: | |
rm -f GHC/*.o | |
rm -f GHC/*.hi | |
'$(TEST_HC)' $(TEST_HC_OPTS) -XNoImplicitPrelude -this-unit-id base -c GHC/Base.hs | |
'$(TEST_HC)' $(TEST_HC_OPTS) -XNoImplicitPrelude -this-unit-id base --make GHC.Foo | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment