mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-15 14:23:32 +03:00
690328421a
...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
13 lines
243 B
Idris
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 }}
|