Skip to content

Instantly share code, notes, and snippets.

@louisswarren
Created June 8, 2018 04:57
Show Gist options
  • Save louisswarren/acb0ee83d68b171b3b2843b2322999f6 to your computer and use it in GitHub Desktop.
Save louisswarren/acb0ee83d68b171b3b2843b2322999f6 to your computer and use it in GitHub Desktop.
Is string equality even reflexive?
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
open import Agda.Builtin.String
data Inspect {A : Set}(x : A) : Set where
_with≡_ : (y : A) → x ≡ y → Inspect x
inspect : {A : Set} → (x : A) → Inspect x
inspect x = x with≡ refl
f : "a" ≡ "a"
f = refl
g : (A : Set) → "a" ≡ "b" → A
g A ()
ref : (s : String) → (primStringEquality s s) ≡ true
ref s with inspect (primStringEquality s s)
ref s | false with≡ x = {! !}
ref s | true with≡ x = x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment