Created
July 10, 2015 06:03
-
-
Save cutsea110/0afdd72f62036575456e to your computer and use it in GitHub Desktop.
type class
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 Test where | |
open import Data.Bool | |
open import Data.Char hiding (_==_) | |
open import Data.String hiding (_==_) | |
record Eq (A : Set) : Set₁ where | |
field | |
_==_ : A → A → Bool | |
open Eq {{...}} | |
EqChar : Eq Char | |
EqChar = record { _==_ = Data.Char._==_ } | |
EqString : Eq String | |
EqString = record { _==_ = Data.String._==_ } | |
test : Bool | |
test = (_==_ ⦃ EqChar ⦄ 'a' 'A') ∧ (_==_ ⦃ EqString ⦄ "foo" "foo") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment