Created
May 9, 2012 08:23
-
-
Save missingfaktor/2642944 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
// [ Scala ] | |
// You need to tell compiler that F, T, and A are of kinds (*, *) -> *, * -> *, and * respectively. | |
// See all those underscores. | |
trait Foo[F[_, _], T[_], A] { | |
def foo: F[T[A], A] | |
} | |
// [ Haskell ] | |
// It can infer kinds from context. | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
class Foo f t a where | |
foo :: f (t a) a | |
// [ F# ] | |
// It does not support higher kinds. | |
failwith "Herp derp" | |
// [ C# ] | |
// It does not support higher kinds. | |
throw new Exception("Herp derp."); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment