Created
July 1, 2014 05:34
-
-
Save possiblywrong/a3937bb4224352c2805f to your computer and use it in GitHub Desktop.
GADT unification
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
data Container :: * -> * -> * where | |
-- Some other cases go here | |
Map :: (a -> b) -> Container b v -> Container a v | |
-- Think a map type, k to v | |
combine :: (v -> v -> v) -> Container k v -> Container k v -> Container k v | |
combine c (Map f ct1) (Map g ct2) = Map f $ combine c ct1 ct2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment