Idris2/tests/idris2/reg033/test.idr
G. Allais 15cc8243f7
[ re #2001 ] Make some prelude interfaces total (#2083)
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.
2021-11-02 15:34:52 +00:00

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 }