stefan-hoeck / idris2-sop

Idris port of Haskell's sop-core library
BSD 2-Clause "Simplified" License
33 stars 2 forks source link

Using derived `decEq` on inductive datatypes fails #28

Open rvs314 opened 1 year ago

rvs314 commented 1 year ago

I'm trying to derive a DecEq instance on an inductive datatype, but it seems to fail (it causes the Idris2 process to eat all of my ram and get killed by the OS). Here is the code I used:

import Decidable.Equality
import Generics.Derive

%language ElabReflection

data Term = Zero | Next Term

%runElab derive "Term" [Generic, DecEq]

Running this isn't an issue, but trying to run decEq Zero Zero is what causes the failure. Is this an error on my part, or can this be recreated?

jmanuel1 commented 1 year ago

Does it work if you add Meta to the list [Generic, DecEq]?