Another question, if i have lines
module StringMap = Map.Make (String);;
let nstate = ref StringMap.empty;;
..no error messages.
If i add one line
let nstate2 = ref StringMap.empty;;
that it looks like
module StringMap = Map.Make (String);;
let nstate = ref StringMap.empty;;
let nstate2 = ref StringMap.empty;;
..i get a message
File "ptk2.ml", line 306, characters 14-33:
Error: The type of this expression, '_a StringMap.t ref, ] 00198 /
00401
contains type variables that cannot be generalized
*** omake: 198/401 targets are up to date
*** omake: failed (5.05 sec, 2/51 scans, 1/86 rules, 2/443 digests)
*** omake: targets were not rebuilt because of errors:
know anybody a cause?
--
All the best: Ivo
2010/12/26 Ivo Seeba <[email protected]>
> I need a list, or other structures, that enables insert elements of
> different types.
> I need a list like [("A",3);("B",[2;3;4]);("A",[[3;4];[1;2]])];.
> or like
> let st = ref ();;
> let insert b = (st:=(b,!st));;
> insert ("A",3);;
> insert ("B",[1;2]);;
>
> or.
>
> let st = ();;
> let insert b = ( let st = (b,st) );;
> ..
> Can anybody help me?
> --
> All the best and a happy new year: Ivo
>
>
--
You received this message because you are subscribed to the Google Groups
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html