From ec56d76fb3c72922f441a8c158c7419fb305f974 Mon Sep 17 00:00:00 2001 From: Emin Arslan Date: Wed, 7 Jan 2026 20:00:11 +0300 Subject: [PATCH] syntactic_ast: modify the phantom types to have concrete constructors, as the ocaml compiler cannot prove them distinct otherwise --- lib/compiler/syntactic_ast.ml | 12 ++++++------ lib/compiler/syntactic_ast.mli | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/compiler/syntactic_ast.ml b/lib/compiler/syntactic_ast.ml index 07162a2..a1ffe32 100644 --- a/lib/compiler/syntactic_ast.ml +++ b/lib/compiler/syntactic_ast.ml @@ -7,12 +7,12 @@ open Containers type symbol = string (* These are just used for the GADT *) -type expression -type definition -type clause (* for cond *) -type binding (* for let *) -type lambda_list -type body +type expression = Phantom_expr +type definition = Phantom_def +type clause = Phantom_clause (* for cond *) +type binding = Phantom_binding(* for let *) +type lambda_list = Phantom_lambda_list +type body = Phantom_body type _ t = (* Literals *) diff --git a/lib/compiler/syntactic_ast.mli b/lib/compiler/syntactic_ast.mli index f99d452..45c24c3 100644 --- a/lib/compiler/syntactic_ast.mli +++ b/lib/compiler/syntactic_ast.mli @@ -1,12 +1,12 @@ type symbol = string (* These are just used for the GADT *) -type expression -type definition -type clause (* for cond *) -type binding (* for let *) -type lambda_list -type body +type expression = Phantom_expr +type definition = Phantom_def +type clause = Phantom_clause (* for cond *) +type binding = Phantom_binding(* for let *) +type lambda_list = Phantom_lambda_list +type body = Phantom_body type _ t = (* Literals *)