• Robbert Krebbers's avatar
    Make language notations stable under simpl. · f2082e90
    Robbert Krebbers authored
    Before they were not, for example:
    
      Check ('10 + '10 )%L.           (* prints ('10 + '10)%L *)
      Eval simpl in ('10 + '10 )%L.   (* prints (Lit 10 + Lit 10)%L *)
    
    The notation added by this comment is ambigious, for example the
    notation '10 + '10 is used for both:
    
      BinOp PlusOp (Lit (LitNat 10)) (Lit (LitNat 10))
      BinOp PlusOp (of_val (LitV (LitNat 10))) (of_val (LitV (LitNat 10)))
    
    But fortunatelly, these terms are convertible.
    
    Note that literals 'x are now parsed as values (as a LitV), but still
    pretty printed when they appear as expressions (as a Lit).
    f2082e90
notation.v 2.17 KB