-
-
Save rightfold/66ac5d2c5acd7324b75c 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
import vlinder.logic | |
import vlinder.text | |
typeclass Eq[T: *] { | |
eq: (T, T) => logic.T | |
} | |
sub ne[T: * where Eq[T]](a: T, b: T): logic.T { | |
!(a == b) | |
} | |
typeclassinstance Eq[logic.T] { | |
sub eq(a: logic.T, b: logic.T): logic.T { | |
... | |
} | |
} | |
typeclassinstance Eq[text.T] { | |
sub eq(a: text.T, b: text.T): logic.T { | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment