12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849openBasemoduletypeMakePureCombTransform_arg=sigincludeComb.Primitivesvalwire:int->tval(<==):t->t->unitendmoduletypeTransform=sigtype'atransform_fn'=(Signal.Uid.t->'a)->Signal.t->'atypetransform_fn=Signal.ttransform_fn'moduletypeTransformFn'=sigtypetvaltransform:ttransform_fn'valrewrite:ttransform_fn'->Signal.tMap.M(Signal.Uid).t->Signal.tlist->tlistvalrewrite_signals:ttransform_fn'->Signal.tlist->tlistendmoduletypeTransformFn=sig(** function which will map signals to a new representation *)valtransform:transform_fnendmoduletypeMakePureCombTransform_arg=MakePureCombTransform_arg(** functor to build the function to map a signal to a new combinatorial signal
representation *)moduleMakePureCombTransform(B:MakePureCombTransform_arg):TransformFn'withtypet=B.t(** functor to build the function to map a signal to a new combinatorial signal
representation *)moduleMakeCombTransform(B:Comb.Primitiveswithtypet=Signal.t):TransformFn(** simple copying transform *)moduleCopyTransform:TransformFn(** rewrites the list of signals based on the given function *)valrewrite_signals:transform_fn->Signal.tlist->Signal.tlistend