lean4-htt/tests/lean/run/677.lean
Leonardo de Moura e9d85f49e6 chore: remove tryPureCoe?
Based on the discussion at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/for.2C.20unexpected.20need.20for.20type.20ascription/near/269083574
The consensus seemed to be that "auto pure" is more confusing than its worth.
2022-02-03 16:25:24 -08:00

10 lines
268 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Lean
open Lean
def encodeDecode [ToJson α] [FromJson α] (x : α) : Except String α := do
let json := toJson x
fromJson? json
#eval IO.ofExcept <| encodeDecode (Name.mkNum Name.anonymous 5)
#eval IO.ofExcept <| encodeDecode (Name.mkStr `bla "foo.boo")