lean4-htt/tests/lean/derivingRepr.lean.expected.out
Zygimantas Straznickas 49ebd30fd5 fix: fix deriving Repr for structure-like inductives
The deriving code currently uses isStructureLike when choosing whether to use
Inductive or Structure logic, which fails for inductives that are
structure-like. The commit changes the code to use isStructure.
2021-02-25 13:38:33 -08:00

23 lines
770 B
Text

{ name := "Joe",
val := [40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14,
13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
lower := 40,
inv := _,
flag := true }
Tree.node
[Tree.node [Tree.leaf 10] true,
Tree.node [Tree.leaf 9] false,
Tree.node [Tree.leaf 8] true,
Tree.node [Tree.leaf 7] false,
Tree.node [Tree.leaf 6] true,
Tree.node [Tree.leaf 5] false,
Tree.node [Tree.leaf 4] true,
Tree.node [Tree.leaf 3] false,
Tree.node [Tree.leaf 2] true,
Tree.node [Tree.leaf 1] false]
true
StructureLikeInductive.field 5
Foo.Tree.node
(Foo.TreeList.cons
(Foo.Tree.leaf 30)
(Foo.TreeList.cons (Foo.Tree.leaf 20) (Foo.TreeList.cons (Foo.Tree.leaf 10) (Foo.TreeList.nil))))