@@ -728,6 +728,7 @@ let primitivec = E.Constants.declare_global_symbol "primitive"
728728type primitive_value =
729729 | Uint63 of Uint63 .t
730730 | Float64 of Float64 .t
731+ | Pstring of Pstring .t
731732 | Projection of Projection .t
732733
733734let primitive_value : primitive_value API.Conversion.t =
@@ -738,6 +739,7 @@ let primitive_value : primitive_value API.Conversion.t =
738739 pp = (fun fmt -> function
739740 | Uint63 i -> Format. fprintf fmt " Type"
740741 | Float64 f -> Format. fprintf fmt " Set"
742+ | Pstring s -> Format. fprintf fmt " Set"
741743 | Projection p -> Format. fprintf fmt " " );
742744 constructors = [
743745 K (" uint63" ," unsigned integers over 63 bits" ,A (B. uint63,N ),
@@ -746,6 +748,9 @@ let primitive_value : primitive_value API.Conversion.t =
746748 K (" float64" ," double precision foalting points" ,A (B. float64,N ),
747749 B (fun x -> Float64 x),
748750 M (fun ~ok ~ko -> function Float64 x -> ok x | _ -> ko () ));
751+ K (" pstring" ," primitive string" ,A (B. pstring,N ),
752+ B (fun x -> Pstring x),
753+ M (fun ~ok ~ko -> function Pstring x -> ok x | _ -> ko () ));
749754 K (" proj" ," primitive projection" ,A (B. projection,A (API.BuiltInData. int ,N )),
750755 B (fun p n -> Projection p),
751756 M (fun ~ok ~ko -> function Projection p -> ok p Names.Projection. (arg p + npars p) | _ -> ko () ));
@@ -1382,6 +1387,7 @@ let rec constr2lp coq_ctx ~calldepth ~depth state t =
13821387 | C. CoFix _ -> nYI " HOAS for cofix"
13831388 | C. Int i -> in_elpi_primitive ~depth state (Uint63 i)
13841389 | C. Float f -> in_elpi_primitive ~depth state (Float64 f)
1390+ | C. String s -> in_elpi_primitive ~depth state (Pstring s)
13851391 | C. Array _ -> nYI " HOAS for persistent arrays"
13861392 in
13871393 debug Pp. (fun () ->
@@ -1975,6 +1981,7 @@ and lp2constr ~calldepth syntactic_constraints coq_ctx ~depth state ?(on_ty=fals
19751981 begin match v with
19761982 | Uint63 i -> state, EC. mkInt i, gls
19771983 | Float64 f -> state, EC. mkFloat f, gls
1984+ | Pstring s -> state, EC. mkString s, gls
19781985 | Projection p -> state, EC.UnsafeMonomorphic. mkConst (Names.Projection. constant p), gls
19791986 end
19801987
0 commit comments