From 7b59be96ad5a84796a91452a6c72de418208512a Mon Sep 17 00:00:00 2001 From: istr Date: Mon, 29 Jul 2013 16:27:59 +0200 Subject: [PATCH] expose qry and action types --- src/glc.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/glc.erl b/src/glc.erl index 1ced79d..1150340 100644 --- a/src/glc.erl +++ b/src/glc.erl @@ -91,6 +91,11 @@ qtree :: term() }). +-export_type([qry/0, action/0]). + +-type qry() :: {atom(), '*'|false|true|[any(),...]} | {atom(), '<'|'='|'>', _}. +-type action() :: fun((gre:event()) -> any()). + -spec lt(atom(), term()) -> glc_ops:op(). lt(Key, Term) -> glc_ops:lt(Key, Term). @@ -140,8 +145,6 @@ null(Result) -> %% Updating the output action of a query finalizes it. Attempting %% to use a finalized query to construct a new query will result %% in a `badarg' error. --type qry() :: {atom(), '*'|false|true|[any(),...]} | {atom(), '<'|'='|'>', _}. --type action() :: fun((gre:event()) -> any()). -spec with(Query::qry(), Action::action()) -> {with, Query::qry(), Action::action()}. with(Query, Action) -> glc_ops:with(Query, Action).