Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] serious type confusion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: briand@a...
Subject: Re: [Caml-list] serious type confusion
>>>>> "Matt" == Matt Gushee <mgushee@havenrock.com> writes:

  Matt> * Is current_polyline defined within the same scope where the error
  Matt>   occurs, or is it received as an argument? If it is the latter, and
  Matt>   somewhere before the error location there is an expression that *uses*
  Matt>   !current_polyline as a point, that would explain your error.  If your
  Matt>   function is too complex to easily identify the problem by sight, an
  Matt>   easy way to check for this would be to put a type constraint on the
  Matt>   parameter:

  Matt>     let myfun (current_polyline:point list ref) =
  Matt>       ....

That was it exactly (see my followup).

However that's a very nice trick for future debuggin effort.

Thanks

Brian

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners