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
56 | ||| Top-level function declaration of a proof that all the `conIndexXY`
57 | ||| function is injective.
58 | export
72 | ||| Top-level function declaration of a proof that every value is
73 | ||| indeed included in `Data.Finite.values`.
74 | export
81 | ||| Top-level function declaration for a conversion of a data constructor
82 | ||| to a value of type `Index n`, where `n` is the number of data constructors
83 | ||| of the type.
84 | export
92 | ||| Top-level `Enum` implementation declaration
93 | export
99 | ||| Top-level `Enum` implementation declaration
100 | export
106 | --------------------------------------------------------------------------------
107 | -- Definitions
108 | --------------------------------------------------------------------------------
110 | export
113 | where
117 | export
123 | export
126 | where
135 | export
138 | where
145 | export
150 | export
155 | --------------------------------------------------------------------------------
156 | -- Deriving
157 | --------------------------------------------------------------------------------
159 | ||| Generates a proof that the constructor index returned by `conIndexXY` is
160 | ||| strictly less than the number of constructors.
161 | export
168 | ]
170 | ||| Alias for `ConIndexLtVis Export`
175 | ||| Generates a conversion of data constructors to values of type `Index n`,
176 | ||| where `n` is the number of data constructors of the given type.
177 | |||
178 | ||| This includes `ConIndexLtVis`
179 | export
188 | ]
190 | ||| Alias for `ToIndexVis Export`
195 | ||| Generates a proof that the `toIndexXY` function is injective.
196 | export
203 | ]
205 | ||| Alias for `ToIndexInjectiveVis Export`
210 | ||| Generates a proof that the `Data.Finite.values` indeed contains every
211 | ||| possible value. This currently only works for enum types.
212 | export
218 | ]
220 | ||| Alias for `ValuesCompleteVis Export`
225 | ||| Derives interfaces `Eq`, `Ord`, `Finite`, and `Enum` plus utility
226 | ||| functions with the relevant proofs for the given type.
227 | |||
228 | ||| Erased proofs are generated at `export` visibility.
229 | export
244 | ]
246 | ||| Alias for `EnumVis Public`
251 | ||| Generates a proof that the `toIndexXY` function is injective.
252 | export
259 | ]
261 | ||| Alias for `ToIndexInjectiveTVis Export`
266 | ||| Derives interfaces `TEnum` plus utility
267 | ||| functions with the relevant proofs for the given `Type -> Type`.
268 | |||
269 | ||| Erased proofs are generated at `export` visibility.
270 | export
281 | ]
283 | ||| Alias for `TEnumVis Public`