Copyright © Philip M. Parker, INSEAD. Terms of Use.

GENERIC TYPE VARIABLE

Specialty Definition: GENERIC TYPE VARIABLE

DomainDefinition

Computing

Generic type variable (Also known as a "schematic type variable"). Different occurrences of a generic type variable in a type expression may be instantiated to different types. Thus, in the expression let id x = x in (id True, id 1) id's type is (for all a: a -> a). The universal quantifier "for all a:" means that a is a generic type variable. For the two uses of id, a is instantiated to Bool and Int. Compare this with let id x = x in let f g = (g True, g 1) in f id This looks similar but f has no legal Hindley-Milner type. If we say f :: (a -> b) -> (b, b) this would permit g's type to be any instance of (a -> b) rather than requiring it to be at least as general as (a -> b). Furthermore, it constrains both instances of g to have the same result type whereas they do not. The type variables a and b in the above are implicitly quantified at the top level: f :: for all a: for all b: (a -> b) -> (b, b) so instantiating them (removing the quantifiers) can only be done once, at the top level. To correctly describe the type of f requires that they be locally quantified: f :: ((for all a: a) -> (for all b: b)) -> (c, d) which means that each time g is applied, a and b may be instantiated differently. f's actual argument must have a type at least as general as ((for all a: a) -> (for all b: b)), and may not be some less general instance of this type. Type variables c and d are still implicitly quantified at the top level and, now that g's result type is a generic type variable, any types chosen for c and d are guaranteed to be instances of it. This type for f does not express the fact that b only needs to be at least as general as the types c and d. For example, if c and d were both Bool then any function of type (for all a: a -> Bool) would be a suitable argument to f but it would not match the above type for f. Source: The Free On-line Dictionary of Computing.

Source: compiled by the editor from various references; see credits.

Top     

Crosswords: GENERIC TYPE VARIABLE

Specialty definitions using "GENERIC TYPE VARIABLE": schematic type variabletype inference, type scheme. (references)

Top     

Anagrams: GENERIC TYPE VARIABLE

Scrabble® YAWL-Verified Anagrams

Words within the letters "a-a-b-c-e-e-e-e-g-i-i-l-n-p-r-r-t-v-y"

-5 letters: regeneratively.

Source: compiled by the editor from various references; see credits.

SCRABBLE® is a registered trademark. All intellectual property rights in and to the game are owned in the U.S.A and Canada by Hasbro Inc., and throughout the rest of the world by J.W. Spear & Sons Limited of Maidenhead, Berkshire, England, a subsidiary of Mattel Inc. Mattel and Spear are not affiliated with Hasbro.

Top     

Alternative Orthography: GENERIC TYPE VARIABLE


Hexadecimal (or equivalents, 770AD-1900s) (references)

47 45 4E 45 52 49 43      54 59 50 45      56 41 52 49 41 42 4C 45

Leonardo da Vinci (1452-1519; backwards) (references)

        

Binary Code (1918-1938, probably earlier) (references)

01000111 01000101 01001110 01000101 01010010 01001001 01000011 00100000 01010100 01011001 01010000 01000101 00100000 01010110 01000001 01010010 01001001 01000001 01000010 01001100 01000101

HTML Code (1990) (references)

&#71 &#69 &#78 &#69 &#82 &#73 &#67 &#32 &#84 &#89 &#80 &#69 &#32 &#86 &#65 &#82 &#73 &#65 &#66 &#76 &#69

ISO 10646 (1991-1993) (references)

0047 0045 004E 0045 0052 0049 0043      0054 0059 0050 0045      0056 0041 0052 0049 0041 0042 004C 0045

Encryption (beginner's substitution cypher): (references)

4139483952433725459503925635524335364639

Top     



INDEX

1. Crosswords
2. Anagrams
3. Orthography
4. Bibliography


  

Copyright © Philip M. Parker, INSEAD. Terms of Use.