OnlineWoerterBuecher.de
Internes

Lexikon


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 href="module.php?name=Lexikon&file=search&eid=1&query=quantifier">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 href="module.php?name=Lexikon&file=search&eid=1&query=Hindley-Milner type">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 href="module.php?name=Lexikon&file=search&eid=1&query=quantifier">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.

In addition suitable contents:
[ href="module.php?name=Lexikon&op=content&tid=134">= ] [ href="module.php?name=Lexikon&op=content&tid=259">actual argument ] [ href="module.php?name=Lexikon&op=content&tid=411">ai ] [ href="module.php?name=Lexikon&op=content&tid=433">al ] [ href="module.php?name=Lexikon&op=content&tid=544">am ] [ href="module.php?name=Lexikon&op=content&tid=592">an ] [ href="module.php?name=Lexikon&op=content&tid=683">app ] [ href="module.php?name=Lexikon&op=content&tid=740">ar ] [ href="module.php?name=Lexikon&op=content&tid=743">arc ] [ href="module.php?name=Lexikon&op=content&tid=759">arg ] [ href="module.php?name=Lexikon&op=content&tid=760">argument ] [ href="module.php?name=Lexikon&op=content&tid=800">as ] [ href="module.php?name=Lexikon&op=content&tid=894">at ] [ href="module.php?name=Lexikon&op=content&tid=996">av ] [ href="module.php?name=Lexikon&op=content&tid=1025">B ] [ href="module.php?name=Lexikon&op=content&tid=1026">b ] [ href="module.php?name=Lexikon&op=content&tid=1181">be ] [ href="module.php?name=Lexikon&op=content&tid=1444">bo ] [ href="module.php?name=Lexikon&op=content&tid=1501">bot ] [ href="module.php?name=Lexikon&op=content&tid=1708">C ] [ href="module.php?name=Lexikon&op=content&tid=1724">ca ] [ href="module.php?name=Lexikon&op=content&tid=1896">cc ] [ href="module.php?name=Lexikon&op=content&tid=2001">ch ] [ href="module.php?name=Lexikon&op=content&tid=2099">ci ] [ href="module.php?name=Lexikon&op=content&tid=2247">co ] [ href="module.php?name=Lexikon&op=content&tid=2545">con ] [ href="module.php?name=Lexikon&op=content&tid=2606">cons ] [ href="module.php?name=Lexikon&op=content&tid=2791">cr ] [ href="module.php?name=Lexikon&op=content&tid=2900">cu ] [ href="module.php?name=Lexikon&op=content&tid=2976">D ] [ href="module.php?name=Lexikon&op=content&tid=3151">de ] [ href="module.php?name=Lexikon&op=content&tid=3371">diff ] [ href="module.php?name=Lexikon&op=content&tid=3565">do ] [ href="module.php?name=Lexikon&op=content&tid=3752">du ] [ href="module.php?name=Lexikon&op=content&tid=3865">ec ] [ href="module.php?name=Lexikon&op=content&tid=3896">ed ] [ href="module.php?name=Lexikon&op=content&tid=3929">ee ] [ href="module.php?name=Lexikon&op=content&tid=3946">eg ] [ href="module.php?name=Lexikon&op=content&tid=4148">er ] [ href="module.php?name=Lexikon&op=content&tid=4150">era ] [ href="module.php?name=Lexikon&op=content&tid=4171">es ] [ href="module.php?name=Lexikon&op=content&tid=4199">et ] [ href="module.php?name=Lexikon&op=content&tid=4317">expression ] [ href="module.php?name=Lexikon&op=content&tid=4379">fact ] [ href="module.php?name=Lexikon&op=content&tid=4497">fi ] [ href="module.php?name=Lexikon&op=content&tid=4520">file ] [ href="module.php?name=Lexikon&op=content&tid=4700">fo ] [ href="module.php?name=Lexikon&op=content&tid=4727">for ] [ href="module.php?name=Lexikon&op=content&tid=4940">function ] [ href="module.php?name=Lexikon&op=content&tid=4989">ga ] [ href="module.php?name=Lexikon&op=content&tid=5057">ge ] [ href="module.php?name=Lexikon&op=content&tid=5070">gen ] [ href="module.php?name=Lexikon&op=content&tid=5291">gr ] [ href="module.php?name=Lexikon&op=content&tid=5403">gu ] [ href="module.php?name=Lexikon&op=content&tid=5434">h ] [ href="module.php?name=Lexikon&op=content&tid=5540">hat ] [ href="module.php?name=Lexikon&op=content&tid=5722">hose ] [ href="module.php?name=Lexikon&op=content&tid=5768">hr ] [ href="module.php?name=Lexikon&op=content&tid=5791">hu ] [ href="module.php?name=Lexikon&op=content&tid=5931">id ] [ href="module.php?name=Lexikon&op=content&tid=5956">ie ] [ href="module.php?name=Lexikon&op=content&tid=5986">iff ] [ href="module.php?name=Lexikon&op=content&tid=6013">il ] [ href="module.php?name=Lexikon&op=content&tid=6064">in ] [ href="module.php?name=Lexikon&op=content&tid=6179">instance ] [ href="module.php?name=Lexikon&op=content&tid=6181">instantiate ] [ href="module.php?name=Lexikon&op=content&tid=6413">io ] [ href="module.php?name=Lexikon&op=content&tid=6449">ir ] [ href="module.php?name=Lexikon&op=content&tid=6482">is ] [ href="module.php?name=Lexikon&op=content&tid=6558">it ] [ href="module.php?name=Lexikon&op=content&tid=6861">kn ] [ href="module.php?name=Lexikon&op=content&tid=6918">la ] [ href="module.php?name=Lexikon&op=content&tid=7023">ld ] [ href="module.php?name=Lexikon&op=content&tid=7068">legal ] [ href="module.php?name=Lexikon&op=content&tid=7091">Lex ] [ href="module.php?name=Lexikon&op=content&tid=7107">li ] [ href="module.php?name=Lexikon&op=content&tid=7399">ls ] [ href="module.php?name=Lexikon&op=content&tid=7410">lt ] [ href="module.php?name=Lexikon&op=content&tid=7441">ly ] [ href="module.php?name=Lexikon&op=content&tid=7457">M ] [ href="module.php?name=Lexikon&op=content&tid=7463">ma ] [ href="module.php?name=Lexikon&op=content&tid=7932">mil ] [ href="module.php?name=Lexikon&op=content&tid=8019">mm ] [ href="module.php?name=Lexikon&op=content&tid=8032">mo ] [ href="module.php?name=Lexikon&op=content&tid=8040">mod ] [ href="module.php?name=Lexikon&op=content&tid=8079">module ] [ href="module.php?name=Lexikon&op=content&tid=8167">mp ] [ href="module.php?name=Lexikon&op=content&tid=8258">mu ] [ href="module.php?name=Lexikon&op=content&tid=8386">na ] [ href="module.php?name=Lexikon&op=content&tid=8460">nc ] [ href="module.php?name=Lexikon&op=content&tid=8472">ne ] [ href="module.php?name=Lexikon&op=content&tid=8627">ng ] [ href="module.php?name=Lexikon&op=content&tid=8630">ni ] [ href="module.php?name=Lexikon&op=content&tid=8660">nl ] [ href="module.php?name=Lexikon&op=content&tid=8675">no ] [ href="module.php?name=Lexikon&op=content&tid=8760">ns ] [ href="module.php?name=Lexikon&op=content&tid=8964">om ] [ href="module.php?name=Lexikon&op=content&tid=9014">op ] [ href="module.php?name=Lexikon&op=content&tid=9204">pa ] [ href="module.php?name=Lexikon&op=content&tid=9457">pe ] [ href="module.php?name=Lexikon&op=content&tid=9550">ph ] [ href="module.php?name=Lexikon&op=content&tid=9651">pl ] [ href="module.php?name=Lexikon&op=content&tid=9908">pr ] [ href="module.php?name=Lexikon&op=content&tid=10023">program ] [ href="module.php?name=Lexikon&op=content&tid=10042">programming ] [ href="module.php?name=Lexikon&op=content&tid=10234">quantifier ] [ href="module.php?name=Lexikon&op=content&tid=10253">query ] [ href="module.php?name=Lexikon&op=content&tid=10364">rc ] [ href="module.php?name=Lexikon&op=content&tid=10385">re ] [ href="module.php?name=Lexikon&op=content&tid=10767">ro ] [ href="module.php?name=Lexikon&op=content&tid=10887">ru ] [ href="module.php?name=Lexikon&op=content&tid=10922">sa ] [ href="module.php?name=Lexikon&op=content&tid=10959">sam ] [ href="module.php?name=Lexikon&op=content&tid=10999">say ] [ href="module.php?name=Lexikon&op=content&tid=11010">sc ] [ href="module.php?name=Lexikon&op=content&tid=11045">schematic type variable ] [ href="module.php?name=Lexikon&op=content&tid=11150">se ] [ href="module.php?name=Lexikon&op=content&tid=11376">si ] [ href="module.php?name=Lexikon&op=content&tid=11651">so ] [ href="module.php?name=Lexikon&op=content&tid=11934">st ] [ href="module.php?name=Lexikon&op=content&tid=12133">su ] [ href="module.php?name=Lexikon&op=content&tid=12162">suit ] [ href="module.php?name=Lexikon&op=content&tid=12359">T ] [ href="module.php?name=Lexikon&op=content&tid=12369">table ] [ href="module.php?name=Lexikon&op=content&tid=12440">tc ] [ href="module.php?name=Lexikon&op=content&tid=12479">tee ] [ href="module.php?name=Lexikon&op=content&tid=12588">th ] [ href="module.php?name=Lexikon&op=content&tid=12721">to ] [ href="module.php?name=Lexikon&op=content&tid=12787">tr ] [ href="module.php?name=Lexikon&op=content&tid=12939">tw ] [ href="module.php?name=Lexikon&op=content&tid=12970">type ] [ href="module.php?name=Lexikon&op=content&tid=12986">ua ] [ href="module.php?name=Lexikon&op=content&tid=13030">um ] [ href="module.php?name=Lexikon&op=content&tid=13175">us ] [ href="module.php?name=Lexikon&op=content&tid=13252">va ] [ href="module.php?name=Lexikon&op=content&tid=13274">var ] [ href="module.php?name=Lexikon&op=content&tid=13275">variable ] [ href="module.php?name=Lexikon&op=content&tid=13310">ve ] [ href="module.php?name=Lexikon&op=content&tid=13366">vi ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (5110 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.0973 Seconds, with 16 Database-Queries
Zurück zur Startseite