1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
ON THIS PAGE
package OCanren
-
OCanren
-
-
pa_ocanren
-
tester
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Auxiliary functions
Main
val run_r :
( 'a OCanren.ilogic, 'b ) OCanren.Reifier.t ->
( 'b -> string ) ->
int ->
( unit ->
( 'c ->
OCanren.State.t ->
'd )
* ( 'e ->
OCanren.Env.t ->
'f )
* ( 'd ->
'e * OCanren.State.t OCanren.Stream.t )
* ( 'g ->
'f ->
unit ->
unit ) ) ->
( ( int -> string -> 'a OCanren.reified -> unit ) -> 'g ) ->
(string * 'c) ->
unit
The call run_r reifier to_string count num num_handler ("description", goal)
should be used to a goal goal
, get count
answers, reify all of them using reifier
, and print them using provided to_string
function. Auxiliary functions num
and num_handler
allow using this function in polyvariadic manner
For example:
open OCanren
run_r (Std.List.prj_exn prj_exn) show_int 1 q qh ("simple", (fun q -> q === inj 1))
val run_gen :
'a ->
int ->
( unit ->
( 'b ->
OCanren.State.t ->
'c )
* ( 'd ->
OCanren.Env.t ->
'e )
* ( 'c ->
'd * OCanren.State.t OCanren.Stream.t )
* ( 'f ->
'e ->
unit ->
unit ) ) ->
( 'a -> 'f ) ->
(string * 'b) ->
unit
More general combinator. The run_r
is implemented using it. Unlikely will be used in practice
ON THIS PAGE