types - Haskell Weird Kinds: Kind of (->) is ?? -> ? -> * -


When I was experimenting with the Haskell type, and -> and it showed:

  $ ghci ... prelude & gt; : K (- & gt;) (- & gt;) :: ?? - & gt; ? - & gt; * Preface & gt;  

Expected * - & gt; Instead of * - & gt; * . ?? and ? What are the things? Do they mean concrete type or "types of variables"? or something else?

These are the GHC-specific extensions of the Haxley type system Haskell 98 report:

... Type expression is classified into different types, which takes one of two possible forms:

Symbol * All types of type type constructor if k1 and k2 are types, then K1-> k2 is a type of type that takes one type of K1 and returns a type K2.

allows GHC with type subtype, and allows the function constructor to exceed the polymorphic type. The type of mesh supports GHC:

 ? / \ / \ ?? (#) / \ * # Where: * [Lifttech Kend] means boxed type # [unchanged typecand] means unbranded type (#) [UbxTupleKind] means without a tuple? [ArgTypeKind] is the place of {*, #}? [OpenPayPend] means defined in any type  

Specifically:

  & gt; Error :: forall a:? String - & gt; One & gt; (- & gt;) :: ?? - & gt; ? - & gt; * & Gt; (\\ (x :: t) - & gt; ...)  

In the previous example t :: ?? (i.e. one is unboxed tuple). Therefore, for the quotation of GHC, "there is a sub-type at such a level".

For interested souls, GHC strongly supports types and types ("Type-level words that support acts as evidence for equality"), GADT, Nuitip and Type is used in families.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -