Skip to content

Commit da1f707

Browse files
cknittclaude
andcommitted
Remove the never-passed ?loc of Ast_literal.type_bool
The interface declared type_bool with the core_type_lit abbreviation, which hid its optional ?loc from reanalyze; with the abbreviation fix in reanalyze (rescript-lang/reanalyze#224) it is reported: the only caller, bs_builtin_ppx, passes no location. Before: val type_bool : core_type_lit (?loc:Location.t -> unit -> _) After: val type_bool : unit -> Parsetree.core_type Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT Signed-off-by: Christoph Knittel <ck@cca.io>
1 parent cdf5d8b commit da1f707

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎compiler/frontend/ast_literal.ml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ let type_string ?loc () =
6666
| Some loc ->
6767
Ast_helper.Typ.mk ~loc (Ptyp_constr ({txt = Lid.type_string; loc}, []))
6868

69-
let type_bool ?loc () =
70-
match loc with
71-
| None -> No_loc.type_bool
72-
| Some loc ->
73-
Ast_helper.Typ.mk ~loc (Ptyp_constr ({txt = Lid.type_bool; loc}, []))
69+
let type_bool () = No_loc.type_bool
7470

7571
let type_int ?loc () =
7672
match loc with

‎compiler/frontend/ast_literal.mli‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type core_type_lit = Parsetree.core_type lit
4444

4545
val type_string : core_type_lit
4646

47-
val type_bool : core_type_lit
47+
val type_bool : unit -> Parsetree.core_type
4848

4949
val type_int : core_type_lit
5050

0 commit comments

Comments
 (0)