caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] 'should have type unit' warning in 'let _ =' ?
@ 2003-07-15  0:29 henridf
  2003-07-15  1:04 ` Jacques Garrigue
  0 siblings, 1 reply; 5+ messages in thread
From: henridf @ 2003-07-15  0:29 UTC (permalink / raw)
  To: caml-list

hi, 

i had a minor bug where the last expression in a 
let _ = ...
block of my module was not fully applied and hence was returning a 
functional value rather than apply the function (because I had added a 
parameter to the function).

pretty harmless, but it led me to wonder why I wasn't writing 'let () = 
..' for all my module initialization blocks, which would have given me 
'warning should have type unit' in the above situation.

So is there a reason why the commonly used idiom seems to be 'let _ =' 
rather than 'let () = '? 

Thanks

Henri


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


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

end of thread, other threads:[~2003-07-16  7:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-15  0:29 [Caml-list] 'should have type unit' warning in 'let _ =' ? henridf
2003-07-15  1:04 ` Jacques Garrigue
2003-07-15 11:36   ` Richard Jones
2003-07-16  0:10     ` Jacques Garrigue
2003-07-16  7:11       ` Jean-Christophe Filliatre

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