-
-
Save andreas/ee2fc584996ec7b10e9baab4eb513d53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type 'a foo = Foo : { | |
f : 'a -> int; | |
mutable x : string; | |
} -> 'a foo | |
let some_foo : 'a. 'a foo = Foo { | |
f = (fun _ -> 1); | |
x = ""; | |
} | |
(* | |
File "foo.ml", line 6, characters 28-65: | |
Error: This definition has type 'a foo which is less general than | |
'a0. 'a0 foo | |
*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment