Created
February 11, 2015 13:29
-
-
Save ghorn/93cb7ebb808fc7535834 to your computer and use it in GitHub Desktop.
haskell has no type-level lambda?
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
type Compose f g a = f (g a) | |
type Apply f a = f a | |
-- This one fails with "Compose has 3 arguments but you gave it 2". | |
-- All the others work. | |
x0 :: Apply (Compose f g) a | |
x0 = undefined | |
x1 :: (Compose f g) a | |
x1 = undefined | |
newtype Compose' f g a = Compose' f (g a) | |
newtype Apply' f a = Apply' (f a) | |
x3 :: Apply' (Compose' f g) a | |
x3 = undefined | |
x4 :: (Compose' f g) a | |
x4 = undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment