Knowledge (XXG)

Type variable

Source 📝

236: 171: 191: 302: 317: 283: 312: 245: 59: 40:, a type variable remains an abstraction, in the sense that it does not correspond to some memory locations. 47: 276: 51: 37: 29: 217: 141: 307: 43: 21: 70:
that has a universally quantified type, which is printed by the interpreter on the second line:
269: 67: 253: 55: 176: 296: 249: 17: 33: 202: 63: 257: 220: 179: 144: 134:In mathematical notation, the type of the function 230: 185: 165: 224: 277: 8: 62:type variables. For example, the following 36:. Even in programming languages that allow 284: 270: 219: 178: 143: 54:type variables. Languages that support 7: 210: 208: 256:. You can help Knowledge (XXG) by 221: 145: 14: 303:Programming language theory stubs 231:{\displaystyle \Gamma \!\vdash } 166:{\displaystyle \forall a.a\to a} 157: 1: 318:Dependently typed programming 246:programming language theory 66:code defines a polymorphic 334: 207: 72: 60:existentially quantified 48:parametric polymorphism 313:Functional programming 252:-related article is a 232: 187: 167: 52:universally quantified 233: 188: 168: 44:Programming languages 30:mathematical variable 22:programming languages 218: 193:is a type variable. 177: 142: 228: 183: 163: 265: 264: 186:{\displaystyle a} 68:identity function 56:existential types 38:mutable variables 325: 286: 279: 272: 237: 235: 234: 229: 209: 192: 190: 189: 184: 172: 170: 169: 164: 137: 130: 127: 124: 121: 118: 115: 112: 109: 106: 103: 100: 97: 94: 91: 88: 85: 82: 79: 76: 333: 332: 328: 327: 326: 324: 323: 322: 293: 292: 291: 290: 240: 239: 238: 216: 215: 199: 175: 174: 140: 139: 135: 132: 131: 128: 125: 122: 119: 116: 113: 110: 107: 104: 101: 98: 95: 92: 89: 86: 83: 80: 77: 74: 12: 11: 5: 331: 329: 321: 320: 315: 310: 305: 295: 294: 289: 288: 281: 274: 266: 263: 262: 241: 227: 223: 214: 213: 212: 206: 205: 198: 195: 182: 162: 159: 156: 153: 150: 147: 73: 13: 10: 9: 6: 4: 3: 2: 330: 319: 316: 314: 311: 309: 306: 304: 301: 300: 298: 287: 282: 280: 275: 273: 268: 267: 261: 259: 255: 251: 247: 242: 225: 211: 204: 201: 200: 196: 194: 180: 160: 154: 151: 148: 71: 69: 65: 61: 57: 53: 49: 46:that support 45: 41: 39: 35: 32:ranging over 31: 27: 26:type variable 23: 19: 258:expanding it 243: 133: 58:make use of 50:make use of 42: 25: 15: 308:Type theory 250:type theory 18:type theory 297:Categories 226:⊢ 222:Γ 158:→ 146:∀ 203:System F 197:See also 173:, where 244:This 114:' 111:-> 105:' 64:OCaml 34:types 28:is a 254:stub 129:> 123:< 24:, a 20:and 248:or 138:is 126:fun 96:val 78:let 16:In 299:: 136:id 99:id 93:;; 81:id 285:e 278:t 271:v 260:. 181:a 161:a 155:a 152:. 149:a 120:= 117:a 108:a 102:: 90:x 87:= 84:x 75:#

Index

type theory
programming languages
mathematical variable
types
mutable variables
Programming languages
parametric polymorphism
universally quantified
existential types
existentially quantified
OCaml
identity function
System F
programming language theory
type theory
stub
expanding it
v
t
e
Categories
Programming language theory stubs
Type theory
Functional programming
Dependently typed programming

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.