Skip to content

Instantly share code, notes, and snippets.

@hgiasac
Created January 4, 2019 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgiasac/818ce07e96b24ae07e3d5a6daeefae8b to your computer and use it in GitHub Desktop.
Save hgiasac/818ce07e96b24ae07e3d5a6daeefae8b to your computer and use it in GitHub Desktop.
data (a :: k1) :~~: (a :: k2) where
HRefl :: forall (a :: k). a :~~: a
eqT :: forall k1 k2 (a :: k1) (b :: k2)
. TypeRep a -> TypeRep b -> Maybe (a :~~: b)
eqT a b
| typeRepFingerprint a == typeRepFingerprint b = Just (unsafeCoerce Refl)
| otherwise = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment