Mentions légales du service

Skip to content
  • Andrei Paskevich's avatar
    whyml: include pure symbols in the program namespace · 55c1fc02
    Andrei Paskevich authored
    Thus, we do not need to look through two different namespaces.
    The only difference w.r.t. the core namespace semantics is that
    a program symbol (pvsymbol, psymbol, plsymbol, or xsymbol) may
    be introduced in the scope of an lsymbol of the same name and
    overshadow it in program expressions, though not in specifications.
    For example, the following declarations allow to use (!) both in
    programs and specifications:
    
        type ref 'a = {| mutable contents : 'a |}
        function (!) (x: ref 'a) : 'a = x.contents
        let (!) (r: ref 'a) = {} r.contents { result = !r }
    
    Notice, however, that itsymbols cannot overshadow pure tsymbols.
    55c1fc02