Created
June 17, 2015 15:22
-
-
Save gallais/05d2d021236e92d9030b to your computer and use it in GitHub Desktop.
Only GADTs can be partially applied.
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 Extend' (r :: Nat -> *) (t :: *) (n :: Nat) where | |
Here :: t -> Extend' r t Zero | |
There :: r n -> Extend' r t (Succ n) | |
type family Extend (r :: Nat -> *) (t :: *) (n :: Nat) where | |
Extend r t Zero = t | |
Extend r t (Succ n) = r n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment