Idris2/tests/idris2/reg033/test.idr
Edwin Brady 690328421a Delay building references for case blocks
...until the definition is complete. This is necessary since sometimes
information outside the case block can help resolve interfaces, and in
the simplest case, we might just have delayed resolving a default
Integer. It turns out this was also an obscure bug waiting to happen
with coverage checking of nested case blocks (so there's a test update
there too).

Fixes #443
2020-07-18 19:22:03 +01:00

13 lines
243 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 }}