module UHC.Util.CHR.Base
( IsConstraint(..)
, ConstraintSolvesVia(..)
, IsCHRConstraint(..)
, IsCHRGuard(..)
, IsCHRPrio(..)
, IsCHRBacktrackPrio(..)
, CHREmptySubstitution(..)
, CHRMatcherFailure(..)
, CHRMatcher
, chrmatcherRun'
, chrmatcherRun
, chrmatcherstateEnv
, chrmatcherstateVarLookup
, chrMatchResolveCompareAndContinue
, chrMatchSubst
, chrMatchBind
, chrMatchFail
, chrMatchFailNoBinding
, chrMatchSuccess
, chrMatchWait
, chrMatchSucces
, CHRMatchEnv(..)
, emptyCHRMatchEnv
, CHRMatchable(..)
, CHRMatchableKey
, CHRMatchHow(..)
, chrMatchAndWaitToM
, CHRWaitForVarSet
, CHRCheckable(..)
, Prio(..)
, CHRPrioEvaluatable(..)
, CHRPrioEvaluatableVal
, CHRTrOpt(..)
, IVar
, VarToNmMp
, emptyVarToNmMp
, NmToVarMp
, emptyNmToVarMp
)
where
import UHC.Util.VarMp
import UHC.Util.Lookup (Lookup, Stacked, LookupApply)
import qualified UHC.Util.Lookup as Lk
import qualified UHC.Util.Lookup.Stacked as Lk
import Data.Word
import Data.Monoid
import Data.Typeable
import Data.Function
import Unsafe.Coerce
import qualified Data.Set as Set
import UHC.Util.Pretty
import UHC.Util.CHR.Key
import Control.Monad
import Control.Monad.State.Strict
import Control.Monad.Except
import Control.Monad.Identity
import UHC.Util.Lens
import UHC.Util.Utils
import UHC.Util.Binary
import UHC.Util.Serialize
import UHC.Util.Substitutable
import CHR.Types.Core hiding
( IsCHRConstraint
, IsCHRGuard
, IsCHRBacktrackPrio
, IsCHRPrio
)
import qualified CHR.Types.Core as CHR
import UHC.Util.Debug
class ( CHRMatchable env c subst
, VarExtractable c
, VarUpdatable c subst
, Typeable c
, Serialize c
, TTKeyable c
, IsConstraint c
, Ord c
, Ord (TTKey c)
, PP c
, PP (TTKey c)
) => IsCHRConstraint env c subst
class ( CHRCheckable env g subst
, VarExtractable g
, VarUpdatable g subst
, Typeable g
, Serialize g
, PP g
) => IsCHRGuard env g subst
class ( CHRPrioEvaluatable env p subst
, Typeable p
, Serialize p
, PP p
) => IsCHRPrio env p subst
class ( IsCHRPrio env bp subst
, CHRMatchable env bp subst
, PP (CHRPrioEvaluatableVal bp)
) => IsCHRBacktrackPrio env bp subst