Commit f5700b8
irmin-lwt: link top-level types to Schema in module type S
Without these equalities, [Irmin_lwt.S with module Schema = Schema] in a
downstream consumer (Tezos' [Tezos_context_helpers.Context.DB]) only
substituted [Schema] but left [hash], [contents], [step], etc. abstract.
Cue type errors like "Store.Tree.hash returns Store.hash but Tezos
expects Hash.t (= Schema.Hash.t)".
Mirror the pattern of [Irmin.Generic_key.S]: declare [Schema] first and
define the types it derives as type aliases:
type step = Schema.Path.step
type path = Schema.Path.t
type metadata = Schema.Metadata.t
type contents = Schema.Contents.t
type branch = Schema.Branch.t
type info = Schema.Info.t
type hash = Schema.Hash.t
Now [Irmin_lwt.S with module Schema = Schema] propagates the equalities
to every Schema-derived type. The redundant [type X = S.X] constraints
in [Make]'s output type are dropped accordingly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 260e64e commit f5700b8
2 files changed
Lines changed: 28 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
29 | 35 | | |
30 | | - | |
31 | | - | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
43 | | - | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
42 | | - | |
| 48 | + | |
43 | 49 | | |
44 | | - | |
45 | | - | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
57 | | - | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
704 | 709 | | |
705 | 710 | | |
706 | 711 | | |
707 | | - | |
| 712 | + | |
| 713 | + | |
708 | 714 | | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | 715 | | |
714 | 716 | | |
715 | 717 | | |
716 | | - | |
717 | 718 | | |
718 | | - | |
719 | | - | |
720 | 719 | | |
721 | 720 | | |
722 | 721 | | |
723 | 722 | | |
724 | 723 | | |
725 | 724 | | |
726 | 725 | | |
727 | | - | |
728 | 726 | | |
729 | 727 | | |
730 | 728 | | |
| |||
0 commit comments