8 | --------------------------------------------------------------------------------
9 | -- Claims
10 | --------------------------------------------------------------------------------
12 | export
16 | export
20 | export
24 | export
28 | ||| Top-level function declaration of a proof that all constructor indexes
29 | ||| are less than the total number of constructors.
30 | export
39 | ||| Top-level function declaration of a proof that all the `conIndexXY`
40 | ||| function is injective.
41 | export
51 | ||| Top-level function declaration of a proof that every value is
52 | ||| indeed included in `Data.Finite.values`.
53 | export
60 | ||| Top-level function declaration for a conversion of a data constructor
61 | ||| to a value of type `Index n`, where `n` is the number of data constructors
62 | ||| of the type.
63 | export
71 | ||| Top-level `Enum` implementation declaration
72 | export
78 | --------------------------------------------------------------------------------
79 | -- Definitions
80 | --------------------------------------------------------------------------------
82 | export
85 | where
89 | export
95 | export
98 | where
102 | export
105 | where
112 | export
117 | --------------------------------------------------------------------------------
118 | -- Deriving
119 | --------------------------------------------------------------------------------
121 | ||| Generates a proof that the constructor index returned by `conIndexXY` is
122 | ||| strictly less than the number of constructors.
123 | export
130 | ]
132 | ||| Alias for `ConIndexLtVis Export`
137 | ||| Generates a conversion of data constructors to values of type `Index n`,
138 | ||| where `n` is the number of data constructors of the given type.
139 | |||
140 | ||| This includes `ConIndexLtVis`
141 | export
150 | ]
152 | ||| Alias for `ToIndexVis Export`
157 | ||| Generates a proof that the `toIndexXY` function is injective.
158 | export
165 | ]
167 | ||| Alias for `ToIndexInjectiveVis Export`
172 | ||| Generates a proof that the `Data.Finite.values` indeed contains every
173 | ||| possible value. This currently only works for enum types.
174 | export
180 | ]
182 | ||| Alias for `ValuesCompleteVis Export`
187 | ||| Derives interfaces `Eq`, `Ord`, `Finite`, and `Enum` plus utility
188 | ||| functions with the relevant proofs for the given type.
189 | |||
190 | ||| Erased proofs are generated at `export` visibility.
191 | export
206 | ]
208 | ||| Alias for `ValuesCompleteVis Export`