Last active
December 14, 2018 15:02
-
-
Save dmwit/d9ddce9f90f67e86bba6a8d028789c7e 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
data Zero = Zero deriving Show | |
data Succ n = Succ deriving Show | |
class Foo a where foo :: a | |
instance Foo Zero where foo = Zero | |
instance Foo n => Foo (Succ n) where foo = Succ | |
type Two zero = Succ (Succ zero) | |
type Four zero = Two (Two zero) | |
type Eight zero = Four (Four zero) | |
type Sixteen zero = Eight (Eight zero) | |
type ThirtyTwo zero = Sixteen (Sixteen zero) | |
type SixtyFour zero = ThirtyTwo (ThirtyTwo zero) | |
type OneTwentyEight zero = SixtyFour (SixtyFour zero) | |
type TwoFiftySix zero = OneTwentyEight (OneTwentyEight zero) | |
main = print (foo :: TwoFiftySix Zero) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment