Beruflich Dokumente
Kultur Dokumente
Label mismatch
type point_3d = {x : float; y : float; z : float};; type point_2d = {x : float; y : float};; {x = 10.; y = 20.; z = 30.};; Error: The record field label z belongs to the type point_3d but is mixed here with labels of type point_2d
Orpat vars id
let product a b = match (a, b) with (a, 0.) | (0., b) -> 0. | (a, b) -> a *. b;; Error: Variable a must occur on both sides of this | pattern Note: Prevents matching where variable will not be used - enforces good programming practice - must use _ if value is not later used.
Label multiply dened, Label missing labels, Abstract wrong label, Incoherent label order
type t = {x: int; y:int};; {x = 3};; Some record field labels are undefined: y
Incomplete format
Printf.printf "%";; Error: Premature end of format string "%"
Bad conversion
Bad conversion %%%c, at char number %d
Undened method
Object-oriented feature, as is Undened inherited method, Virtual class, Unbound instance variable, Instance variable not mutable, Not subtype(tr1, tr2), Outside class, Value multiply overridden, Coercion failure, Masked instance variable, Private type, Private label 2
Less general
type t = {x: a. a list};; {x = [3]};; Error: This field value has type int list which is less general than a. a list
Recursive type
type a a = a a;; ^^^^^^^^^^^^ Error: The type abbreviation a is cyclic
Unbound row variable, Cannot quantify, Multiple constraints on type, Repeated method label, Unbound class, Unbound label, Unbound cltype
Object-oriented features.
Type mismatch
Obsolete.
Unbound value
x;; ^ Error: Unbound value x
Unbound constructor
Car 3;; ^^^^^ Error: Unbound constructor Car
Unbound module
open Blah;; ^^^^^^^^^ Error: Unbound module Blah