lean4-htt/src
TomasPuverle a108644461
feat: implement To/FromJSON Empty (#5421)
Resolve cases when the `To/FromJSON` type classes are used with `Empty`,
e.g. in the following motivating example.

```
import Lean

structure Foo (α : Type) where
  y : Option α
deriving Lean.ToJson

#eval Lean.toJson (⟨none⟩ : Foo Empty) -- fails
```

This is a follow-up to this PR
https://github.com/leanprover/lean4/pull/5415, as suggested by
@eric-wieser. It expands on the original suggestion by also handling
`FromJSON`.

---------

Co-authored-by: Kyle Miller <kmill31415@gmail.com>
2024-09-24 03:27:23 +00:00
..
bin
cmake chore: more libuv search patterns for the speedcenter (#5008) 2024-08-13 10:40:09 +02:00
include/lean chore: rename Array.data to Array.toList 2024-09-10 15:24:23 +10:00
Init chore: remove (syntactically) duplicate imports (#5437) 2024-09-23 23:07:56 +00:00
initialize fix: explicitly initialize Std in lean_initialize (#4668) 2024-07-06 13:17:30 +00:00
kernel chore: fix spelling mistakes in non-Lean files (#5430) 2024-09-23 21:11:20 +00:00
lake chore: fix spelling mistakes in tests (#5439) 2024-09-24 03:22:53 +00:00
Lean feat: implement To/FromJSON Empty (#5421) 2024-09-24 03:27:23 +00:00
library fix: modify projection instance binder info (#5376) 2024-09-20 06:03:59 +00:00
runtime chore: fix spelling mistakes in non-Lean files (#5430) 2024-09-23 21:11:20 +00:00
shell chore: avoid rebuilding leanmanifest in each build (#5057) 2024-08-15 14:55:36 +00:00
Std chore: remove (syntactically) duplicate imports (#5437) 2024-09-23 23:07:56 +00:00
util chore: fix spelling mistakes in non-Lean files (#5430) 2024-09-23 21:11:20 +00:00
cadical.mk feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
CMakeLists.txt chore: restore Lake build 2024-09-10 15:24:23 +10:00
config.h.in
githash.h.in
Init.lean feat: grind normalization theorems (#4164) 2024-05-14 19:19:38 +00:00
lakefile.toml.in feat: introduce Std (#4499) 2024-06-21 07:08:45 +00:00
lean-toolchain
Lean.lean feat: propagate maxHeartbeats to kernel (#4113) 2024-05-09 17:44:19 +00:00
lean.mk.in fix: split libleanshared on Windows to avoid symbol limit 2024-08-12 14:14:42 +02:00
Leanc.lean feat: expose flags for the bundled C compiler (#4477) 2024-06-22 01:23:33 +00:00
Std.lean chore: move Lean.Data.Parsec to Std.Internal.Parsec (#5115) 2024-08-21 15:26:17 +00:00
stdlib.make.in fix: do not link to Lake_shared with absolute path (#5286) 2024-09-09 11:11:00 +00:00
stdlib_flags.h chore: unset parseQuotWithCurrentStage in stage1’s src/stdlib_flags.h (#4537) 2024-06-23 09:44:14 +00:00
version.h.in