Skip to content

Runtime <<loop>> due to incorrect inferred type

There is a bug in the type checker of 7.6.1 and 7.6.2, which accepts an incorrect type resulting in <<loop>> at runtime. Furthermore, 7.6.2 even automatically infers this incorrect type. Hence, the attached code has the following behavior:

  • No explicit type: Code works in 7.6.1, loops in 7.6.2
  • Correct explicit type: Code works fine in 7.6.1 and 7.6.2
  • Incorrect explicit type: Code loops in 7.6.1 and 7.6.2

The incorrect type has a parameter that is too polymorphic, i.e. an "a" type is accepted while the function does a pattern match on the parameter from which it is clear that it should be a Maybe type. In 7.4.* versions this incorrect type is not accepted.

Trac metadata
Trac field Value
Version 7.6.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information