Last active
August 29, 2020 14:56
-
-
Save jchia/afe04a4d21e2538a758c38999e80b379 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Isomorphic a b where | |
convert :: a -> b | |
data Unit = Unit deriving Generic | |
data Three a b c = A a | B b | C c deriving Generic | |
data Foo a b = Foo a b deriving Generic | |
data MyBool = MyFalse | MyTrue deriving Generic | |
instance Isomorphic (Either () (Either [(Int, Bool)] Char)) | |
(Three Unit [Foo (Identity Int) MyBool] Char) | |
instance Isomorphic (a, b) (Foo a b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment