Trying to define the following program:
corecord Gedde : Type where
han : Gedde -> Maybe Nat
hun : Gedde -> (n : Nat) -> fisk Nat (Just n)
stime : Gedde -> Gedde
uvist : (john : Gedde) -> case han john of
Just n => Vect n (Maybe Nat)
Nothing => Bool
I get the error:
When elaborating right hand side of x.Gedde.uvist:
Can't unify
case block in MkGedde han hun stime han
with
case block in MkGedde han
hun
(Delay (Force (Delay (Force stime))))
han
Specifically:
Can't unify
case block in MkGedde han hun stime han
with
case block in MkGedde han
hun
(Delay (Force (Delay (Force stime))))
han
However, an equivalent record definition only issues warnings:
record A : Type where
MkA : (han : Maybe Nat) -> (hun : (n : Nat) ->
fisk Nat (Just n)) -> (stime : A) ->
(uvist : case han of
Just n => Vect n (Maybe Nat)
Nothing => Bool) ->
A
I believe case analysis in types in corecords should be possible.
Trying to define the following program:
I get the error:
However, an equivalent record definition only issues warnings:
I believe case analysis in types in corecords should be possible.