Closed paulcadman closed 1 year ago
A similar issue occurs in the containers library at https://github.com/anoma/juvix-containers/blob/851119ca6b4e94fab0ce7353c4b9d2930f53cc56/Data/Set/AVL.juvix#L234
containers/Data/Set/AVL.juvix:234:19-57: error:
The expression catMaybes {_} (:: {_} (toTree {_} l) (:: {_} (toTree {_} r) (nil {_}))) has type:
List (Tree _ω1850)
but is expected to have type:
Forest _ω1850
make: *** [build/Map] Error 1
for the 'type alias' Forest
at: https://github.com/anoma/juvix-containers/blob/851119ca6b4e94fab0ce7353c4b9d2930f53cc56/Data/Tree.juvix#L14
I spotted this behaviour change in the type checker when trying to compile the
containers
library with juvix HEAD. Specifically there's a type error on this line https://github.com/anoma/juvix-containers/blob/851119ca6b4e94fab0ce7353c4b9d2930f53cc56/Data/Map.juvix#L36This behaviour change was introduced by (analysis using git bisect):
For a more minimal reproduction, consider the following two modules:
Bug.juvix
Import.juvix
Run
juvix typecheck Import.juvix
Note that the following type checks fine, so the import is necessary to trigger the bug:
Import.juvix typechecks fine with Juvix v0.4.1.