@@ -2460,26 +2460,26 @@ and arg_to_trie_path ~depth t path_depth : Discrimination_tree.path =
2460
2460
else
2461
2461
let path_depth = path_depth - 1 in
2462
2462
match deref_head ~depth t with
2463
- | Const k when k == Global_symbols. uvarc -> [Variable ]
2464
- | Const k -> [Constant (k, 0 ) ]
2465
- | CData d -> [Primitive ( CData. hash d) ]
2466
- | App (k ,_ ,_ ) when k == Global_symbols. uvarc -> [Variable ]
2463
+ | Const k when k == Global_symbols. uvarc -> [mkVariable ]
2464
+ | Const k -> [mkConstant k 0 ]
2465
+ | CData d -> [mkPrimitive d ]
2466
+ | App (k ,_ ,_ ) when k == Global_symbols. uvarc -> [mkVariable ]
2467
2467
| App (k ,a ,_ ) when k == Global_symbols. asc -> arg_to_trie_path ~depth a (path_depth+ 1 )
2468
- | Nil -> [Constant ( Global_symbols. nilc, 0 ) ]
2469
- | Lam _ -> [Other ] (* loose indexing to enable eta *)
2470
- | Arg _ | UVar _ | AppArg _ | AppUVar _ | Discard -> [Other ]
2468
+ | Nil -> [mkConstant Global_symbols. nilc 0 ]
2469
+ | Lam _ -> [mkOther ] (* loose indexing to enable eta *)
2470
+ | Arg _ | UVar _ | AppArg _ | AppUVar _ | Discard -> [mkOther ]
2471
2471
| Builtin (k ,tl ) ->
2472
2472
let path = arg_to_trie_path_aux ~depth tl path_depth in
2473
- Constant (k, if path_depth = 0 then 0 else List. length tl) :: path
2473
+ mkConstant k ( if path_depth = 0 then 0 else List. length tl) :: path
2474
2474
| App (k , x , xs ) ->
2475
2475
let arg_length = if path_depth = 0 then 0 else List. length xs + 1 in
2476
2476
let hd_path = arg_to_trie_path ~depth x path_depth in
2477
2477
let tl_path = arg_to_trie_path_aux ~depth xs path_depth in
2478
- Constant (k, arg_length) :: hd_path @ tl_path
2478
+ mkConstant k arg_length :: hd_path @ tl_path
2479
2479
| Cons (x ,xs ) ->
2480
2480
let hd_path = arg_to_trie_path ~depth x path_depth in
2481
2481
let tl_path = arg_to_trie_path ~depth xs path_depth in
2482
- Constant ( Global_symbols. consc, 2 ) :: hd_path @ tl_path
2482
+ mkConstant Global_symbols. consc 2 :: hd_path @ tl_path
2483
2483
2484
2484
(* *
2485
2485
[arg_to_trie_path ~path_depth ~depth t]
0 commit comments