Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Ocaml secrets
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Francois Rouaix <frouaix@l...>
Subject: Re: Ocaml secrets
> Please tell me where in the OCaml manual I could have discovered
> the ability to write
>   tm.Unix.tm_hour

Well, the online manual says

    label ::= label-name
           |  module-path .  lowercase-ident


and expr ::= ... | expr.label

I'd say it's a matter of faith in the regularity of the compiler (or 
its authors, hi guys, how are you) ;-)
Since we know that a language object (except modules and weird things like
method names) always lives in some module, and since we know that we can use 
M.x to access value x in module M, we should expect M.l to be valid to refer
to label l in module M.