Browse thread
[Caml-list] 'should have type unit' warning in 'let _ =' ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | henridf@l... |
| Subject: | [Caml-list] 'should have type unit' warning in 'let _ =' ? |
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