rest-rewrite-0.4.1: Rewriting library with online termination checking
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.REST.Rest

Description

This module contains the core REST algorithm

Synopsis

Documentation

rest :: forall m rule term oc rtype. (MonadIO m, RewriteRule m rule term, Hashable term, Eq term, Hashable rule, Hashable oc, Eq rule, Eq oc, Show oc, RESTResult rtype) => RESTParams m rule term oc rtype -> term -> m (rtype rule term oc, Maybe (Path rule term oc)) Source #

pathsResult :: PathsResult rule term oc Source #

An initial (empty) instance of PathsResult

termsResult :: TermsResult rule term oc Source #

An initial (empty) instance of TermsResult

newtype PathsResult rule term oc Source #

The set of all Paths explored by REST.

Constructors

PathsResult (HashSet (Path rule term oc)) 

Instances

Instances details
RESTResult PathsResult Source # 
Instance details

Defined in Language.REST.Rest

Methods

includeInResult :: (Hashable oc, Eq oc, Hashable rule, Eq rule, Hashable term, Eq term) => Path rule term oc -> PathsResult rule term oc -> PathsResult rule term oc Source #

resultTerms :: (Eq term, Hashable term) => PathsResult rule term oc -> HashSet term Source #

data TermsResult rule term oc Source #

The set of all terms explored by REST.

Instances

Instances details
RESTResult TermsResult Source # 
Instance details

Defined in Language.REST.Rest

Methods

includeInResult :: (Hashable oc, Eq oc, Hashable rule, Eq rule, Hashable term, Eq term) => Path rule term oc -> TermsResult rule term oc -> TermsResult rule term oc Source #

resultTerms :: (Eq term, Hashable term) => TermsResult rule term oc -> HashSet term Source #

newtype WorkStrategy rule term oc Source #

WorkStrategy defines the procedure for choosing which pending path REST explores

Constructors

WorkStrategy (forall m. GetWork m rule term oc) 

data RESTParams m rule term oc rtype Source #

Constructors

RESTParams 

Fields

class RESTResult a where Source #

Methods

includeInResult :: (Hashable oc, Eq oc, Hashable rule, Eq rule, Hashable term, Eq term) => Path rule term oc -> a rule term oc -> a rule term oc Source #

Includes a term in the result

resultTerms :: (Eq term, Hashable term) => a rule term oc -> HashSet term Source #

Obtains the terms explored by REST

Instances

Instances details
RESTResult PathsResult Source # 
Instance details

Defined in Language.REST.Rest

Methods

includeInResult :: (Hashable oc, Eq oc, Hashable rule, Eq rule, Hashable term, Eq term) => Path rule term oc -> PathsResult rule term oc -> PathsResult rule term oc Source #

resultTerms :: (Eq term, Hashable term) => PathsResult rule term oc -> HashSet term Source #

RESTResult TermsResult Source # 
Instance details

Defined in Language.REST.Rest

Methods

includeInResult :: (Hashable oc, Eq oc, Hashable rule, Eq rule, Hashable term, Eq term) => Path rule term oc -> TermsResult rule term oc -> TermsResult rule term oc Source #

resultTerms :: (Eq term, Hashable term) => TermsResult rule term oc -> HashSet term Source #