mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-30 15:13:37 +03:00
13 lines
241 B
Idris
13 lines
241 B
Idris
import Language.Reflection
|
|
import DerivingEq
|
|
|
|
%language ElabReflection
|
|
|
|
-- This tree doesn't work
|
|
|
|
data TreeTwo a = BranchTwo (TreeTwo a) a (TreeTwo a)
|
|
| Leaf
|
|
|
|
Eq a => Eq (TreeTwo a) where
|
|
(==) = %runElab genEq `{ TreeTwo }
|