module bug03;
import Stdlib.Data.Nat open;
type Box := mkBox { unbox : Nat };
f (b : Box) : Box :=
case b of {
mkBox x := mkBox (x + 1)
};
main : Nat := f (mkBox 4);
results in
juvix: normalization of case expressions is not supported yet
CallStack (from HasCallStack):
error, called at src/Juvix/Prelude/Base/Foundation.hs:378:9 in juvix-0.6.1-JZCYqLPdJSb72XcDgw5V5D:Juvix.Prelude.Base.Foundation
error, called at src/Juvix/Compiler/Internal/Translation/FromInternal/Analysis/TypeChecking/Data/Inference.hs:151:28 in juvix-0.6.1-JZCYqLPdJSb72XcDgw5V5D:Juvix.Compiler.Internal.Translation.FromInternal.Analysis.TypeChecking.Data.Inference
Expected behaviour: it should give a type error saying that Box doesn't match Nat.
Typechecking
results in
Expected behaviour: it should give a type error saying that
Box
doesn't matchNat
.