lean4-htt/tests/lean/pp_char_bug.lean
Leonardo de Moura a0a8103804 chore(frontends/lean): go back to 'c' as notation for characters
This suggestion has been discussed at Slack.
We have decided to use #"c" as notation because we wanted to allow `'`
in the beginning of identifiers like in SML and F*. In particular,
we wanted to allow users to use 'a 'b 'c for naming type parameters
like in SML. However, nobody used this notation. In the Lean standard
library, we are using greek letters for naming type parameters.
So, there is no real motivation for the ugly #"c" syntax.
2017-05-02 13:00:51 -07:00

22 lines
412 B
Text

#check (fin.mk 2 dec_trivial : fin 5)
#check (fin.mk 1 dec_trivial : fin 3)
#check 'a'
#check to_string 'a'
#eval to_string 'a'
#eval 'a'
#eval char.of_nat 1
#eval char.of_nat 1
#eval char.of_nat 20
#check char.of_nat 1
#check char.of_nat 20
#check char.of_nat 15
#check char.of_nat 16
#eval char.of_nat 15
#eval char.of_nat 16
example : char.of_nat 1 = '\x01' :=
rfl
example : char.of_nat 20 = '\x14' :=
rfl