@@ -370,21 +370,23 @@ struct
370370 let relift = Option. map Base. relift
371371end
372372
373- module Lift2 (Base1 : S ) (Base2 : S ) (N : LiftingNames ) =
373+ module Lift2Conf ( Conf : EitherConf ) (Base1 : S ) (Base2 : S ) (N : LiftingNames ) =
374374struct
375375 type t = [`Bot | `Lifted1 of Base1 .t | `Lifted2 of Base2 .t | `Top ] [@@ deriving eq , ord , hash ]
376376 include Std
377377 include N
378378
379379 let pretty () (state :t ) =
380380 match state with
381+ (* TODO: expand * )
381382 | `Lifted1 n -> Base1. pretty () n
382383 | `Lifted2 n -> Base2. pretty () n
383384 | `Bot -> text bot_name
384385 | `Top -> text top_name
385386
386387 let show state =
387388 match state with
389+ (* TODO: expand * )
388390 | `Lifted1 n -> Base1. show n
389391 | `Lifted2 n -> Base2. show n
390392 | `Bot -> bot_name
@@ -399,16 +401,22 @@ struct
399401 let printXml f = function
400402 | `Bot -> BatPrintf. fprintf f " <value>\n <data>\n %s\n </data>\n </value>\n " N. bot_name
401403 | `Top -> BatPrintf. fprintf f " <value>\n <data>\n %s\n </data>\n </value>\n " N. top_name
402- | `Lifted1 x -> BatPrintf. fprintf f " <value>\n <map>\n <key>\n Lifted1\n </key>\n %a</map>\n </value>\n " Base1. printXml x
403- | `Lifted2 x -> BatPrintf. fprintf f " <value>\n <map>\n <key>\n Lifted2\n </key>\n %a</map>\n </value>\n " Base2. printXml x
404+ | `Lifted1 x when Conf. expand1 -> BatPrintf. fprintf f " <value>\n <map>\n <key>\n Lifted1\n </key>\n %a</map>\n </value>\n " Base1. printXml x
405+ | `Lifted1 x -> Base1. printXml f x
406+ | `Lifted2 x when Conf. expand2 -> BatPrintf. fprintf f " <value>\n <map>\n <key>\n Lifted2\n </key>\n %a</map>\n </value>\n " Base2. printXml x
407+ | `Lifted2 x -> Base2. printXml f x
404408
405409 let to_yojson = function
406410 | `Bot -> `String N. bot_name
407411 | `Top -> `String N. top_name
408- | `Lifted1 x -> `Assoc [ Base1. name () , Base1. to_yojson x ]
409- | `Lifted2 x -> `Assoc [ Base2. name () , Base2. to_yojson x ]
412+ | `Lifted1 x when Conf. expand1 -> `Assoc [ Base1. name () , Base1. to_yojson x ]
413+ | `Lifted1 x -> Base1. to_yojson x
414+ | `Lifted2 x when Conf. expand2 -> `Assoc [ Base2. name () , Base2. to_yojson x ]
415+ | `Lifted2 x -> Base2. to_yojson x
410416end
411417
418+ module Lift2 = Lift2Conf (struct let expand1 = true let expand2 = true end )
419+
412420module type ProdConfiguration =
413421sig
414422 val expand_fst : bool
0 commit comments