Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Typechecker overflow the stack on cyclic type annotation after matching on a GADT #6768
Original bug ID: 6768
The following make the typechecker loop and eventually overflow, while 4.01.0 fails saying the type annotation d is cyclic (which is correct).
Steps to reproduce
type _ prod =
let f : type t. t prod -> _ =
Removing the pattern matching, simplifying either the GADT constraint or the type declaration (e.g. "type d = d") or removing the typing constraint/abstraction on f yields the correct error message.