Browse thread
value restriction
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Andrej Bauer <andrej.bauer@a...> |
| Subject: | Re: [Caml-list] Re: value restriction |
> on another note (but staying very much on the same topic), why won't the
> following generalize:
> # let foo =
>    let counter  = ref 0 in
>    let bar = !counter  in
> Â Â Â let baz = fun x -> bar
> Â Â Â in
> Â Â Â Â baz
>
> val foo : '_a -> int = <fun>
It's even worse:
Objective Caml version 3.11.1
# let _ = ref () in fun x -> x ;;
- : '_a -> '_a = <fun>
I am sure this makes sense in France. Happy new year!
Andrej