Browse thread
More problems with memoization
[
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: | NaN-NaN-NaN (NaN:NaN) |
| From: | Tom <tom.primozic@g...> |
| Subject: | Re: [Caml-list] More problems with memoization |
>
>
>
> Well, the problem is, that the ocaml type inference forbids a function to
> return a polymorphic value, so the type of make_mem' is only ('_a -> '_b)
> -> '_a -> '_b. So the right thing to do here (as this type is, obviously,
> incorrect) is to use Obj.magic:
I'm sorry, the OCaml type inference is correct to infer the type ('_a ->
'_b) -> '_a -> '_b here, but I believe that there can be no error caused
generalizing it.