Skip to content

Fix type_newtype from issue #14842 - #14983

Open
garrigue wants to merge 3 commits into
ocaml:trunkfrom
COCTI:fix14842b
Open

Fix type_newtype from issue #14842#14983
garrigue wants to merge 3 commits into
ocaml:trunkfrom
COCTI:fix14842b

Conversation

@garrigue

@garrigue garrigue commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

In the second issue described in #14842, @smuenzel observed that the problem comes from an expansion being hidden by the use of Subst.type_expr.
While this may be hiding a deeper problem of wrong handling of scopes, this PR fixes the problem by replacing this use of Subst.type_expr by with_local_level_generalize_structure/Ctype.instance. Arguably, this makes sense because all newtypes can only occur at a generalizable level.

<fun>
|}]

(* Bug #1842b *)

@sidkshatriya sidkshatriya Aug 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo. (* Bug #1842b *) should be (* Bug #14842b *)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants