caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Is this supposed to happen?
@ 1993-11-16 18:14 Young and Loud
  1993-11-16 21:37 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Young and Loud @ 1993-11-16 18:14 UTC (permalink / raw)
  To: caml-list

        (I've posted this to comp.lang.ml as well, but thought it ought to
be sent to the CAML list as well)


        This seems strange -- it's not at all what I wanted
to happen.  I'm running CAML-LIGHT on a Mac Centris 660AV.

(* begin code fragment *)
type foo ={
        a : int;
        b : string
} ;;

type bar = {
        a : int;
        c : float
} ;;

let v1 = {
        a = 1;
        b = "typefoo?"
} ;;

(* end fragment *)

        Running it through the interpreter, I get the following
error:
>.........{
>       a = 1;
>       b = "typefoo?"
>}...
> Expression of type bar
> cannot be used with type foo
- : unit = ()

        I'm a novice ML programmer, but I don't think I should
be getting that error -- help?

        Thanks in advance!

        -o






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-11-17 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-11-16 18:14 Is this supposed to happen? Young and Loud
1993-11-16 21:37 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).