mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
15cc8243f7
The prelude interfaces that have default definitions for all of their fields are declared total so that users are forced to think about meeting the minimal requirements for an implementation to be valid.
14 lines
250 B
Idris
14 lines
250 B
Idris
import Language.Reflection
|
|
import DerivingEq
|
|
|
|
%language ElabReflection
|
|
|
|
-- This tree doesn't work
|
|
|
|
data TreeTwo a = BranchTwo (TreeTwo a) a (TreeTwo a)
|
|
| Leaf
|
|
|
|
covering
|
|
Eq a => Eq (TreeTwo a) where
|
|
(==) = %runElab genEq `{ TreeTwo }
|