[ fix ] solve autos in data declarations

This commit is contained in:
2025-07-26 08:09:46 -07:00
parent 0e110cd14f
commit a79f92793b
2 changed files with 16 additions and 1 deletions

14
tests/AutoInData.newt Normal file
View File

@@ -0,0 +1,14 @@
module AutoInData
import Prelude
rep : a. Nat a List a
rep Z x = Nil
rep (S k) x = x :: rep k x
data RunLength : ty. List ty U where
Empty : ty. RunLength {ty} Nil
Run : ty more. (n : Nat)
(x : ty)
RunLength more
RunLength (rep n x ++ more)