You did not ask a big question, but if you need a general idea: yes, the “prominent” system of both of these languages is a type system for their own type system. Type * not a wildcard, but a special type of atom; * - the type of "specific types" such as String , [String] and Tree String .
In turn, there are such things as [] or Tree (see the difference?), Which have the form * -> * ; it is a type of "one-parameterized types" that take a particular type and produce another specific type.
Last example: there are things called “monad transformers,” such as MaybeT , which takes the monad as IO and creates another monad like IO . Maybe IO . Maybe (if you pardon the use of function composition operators, it is usually not allowed). What is it? Of course, (* -> *) -> * -> * , of course: monads have the form * -> * , so we take one of these types and convert it to the other of these types.
I cannot speak with much experience in Scala syntax, but on the Internet we see the definition of a monad transformer symbol in Scala as:
trait MonadTrans[F[_[_], _]] { def lift[G[_] : Monad, A](a: G[A]): F[G, A] }
so I think your guess is basically correct (that the brackets point to the dependent type).
Having a type theory of these things ensures that you never write things like IO IO as a specific type, or MaybeT String .
source share