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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ching-Tsun Chou <ctchou@m...>
Subject: Re: [Caml-list] Weird typing problem

Thanks!  But I still fail to see why the compiler and the interpreter
should behave differently.

- Ching Tsun

   X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f
   Cc: caml-list@pauillac.inria.fr
   From: Pixel <pixel@mandrakesoft.com>
   Date: 22 May 2002 01:03:59 +0200
   User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
   Content-Type: text/plain; charset=us-ascii
   Sender: owner-caml-list@pauillac.inria.fr
   Precedence: bulk

   Ching-Tsun Chou <ctchou@mipos2.intel.com> writes:

   [...]

   > let list_last = List.hd << List.rev

   [...]

   > val list_last : '_a list -> '_a = <fun>

   make it:


   let list_last l = (List.hd << List.rev) l

   val list_last : 'a list -> 'a


   that's monomorphism restriction:
   http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html#variables_de_types_faibles
   -------------------
   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

-------------------
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