-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A general solver for equations -- -- A general solver for type checkers of programming languages and real -- world puzzles with complex constraints. @package RSolve @version 0.1.0.1 module RSolve.BrMonad newtype Br s a Br :: (s -> [(a, s)]) -> Br s a [runBr] :: Br s a -> s -> [(a, s)] getBy :: () => (t -> a) -> Br t a putBy :: () => (t -> t) -> Br t () instance GHC.Base.Functor (RSolve.BrMonad.Br s) instance GHC.Base.Applicative (RSolve.BrMonad.Br s) instance Control.Monad.Fail.MonadFail (RSolve.BrMonad.Br s) instance GHC.Base.Monad (RSolve.BrMonad.Br s) instance GHC.Base.Alternative (RSolve.BrMonad.Br s) module RSolve.Infr type Addr = Int class Eq a => Reference a isRef :: Reference a => a -> Maybe Addr mkRef :: Reference a => Addr -> a class Reference a => Unify a prune :: Unify a => a -> Br (LState a) a unify :: Unify a => a -> a -> Br (LState a) () complement :: Unify a => a -> a -> Br (LState a) () class EnumSet a toEnumerable :: EnumSet a => Br (LState a) () data Allocator a Allocator :: Map Addr a -> Addr -> Allocator a [storage] :: Allocator a -> Map Addr a [addr] :: Allocator a -> Addr data LState a LState :: Allocator a -> [(a, a)] -> [Br (LState a) Bool] -> LState a [allocator] :: LState a -> Allocator a [negPairs] :: LState a -> [(a, a)] [constrains] :: LState a -> [Br (LState a) Bool] allocator' :: () => Allocator a -> LState a -> LState a negPairs' :: () => [(a, a)] -> LState a -> LState a constrains' :: () => [Br (LState a) Bool] -> LState a -> LState a inc :: Reference a => Allocator a -> (Addr, Allocator a) alloc :: Reference a => a -> Allocator a -> (Addr, Allocator a) renew :: Reference a => Addr -> a -> Allocator a -> Allocator a store :: (Reference a, Eq a) => a -> Br (LState a) a update :: Reference a => Addr -> a -> Br (LState a) () load :: Addr -> Br (LState a) a tryLoad :: Addr -> Br (LState a) (Maybe a) new :: Reference a => Br (LState a) Addr negUnify :: Reference a => a -> a -> Br (LState a) () emptyAllocator :: () => Allocator a emptyLState :: () => LState a instance GHC.Show.Show a => GHC.Show.Show (RSolve.Infr.Allocator a) module RSolve.Logic data Cond a [Unify] :: Unify a => a -> a -> Cond a [Not] :: Cond a -> Cond a [Pred] :: Br (LState a) Bool -> Cond a [Or] :: Cond a -> Cond a -> Cond a [And] :: Cond a -> Cond a -> Cond a [Imply] :: Cond a -> Cond a -> Cond a solve :: Cond a -> Br (LState a) () solveNeg :: Unify a => Br (LState a) () solvePred :: EnumSet a => Br (LState a) () require :: Unify a => a -> Br (LState a) a module RSolve.HM.Core type Id = Int data TypeOp Arrow :: TypeOp Join :: TypeOp Stmt :: TypeOp data Prim Int :: Prim Float :: Prim Char :: Prim data Core [Prim] :: Prim -> Core [Op] :: TypeOp -> Core -> Core -> Core [Forall] :: [Id] -> Core -> Core [Var] :: Id -> Core free :: Map Id Core -> Core -> Core occurIn :: Addr -> Addr -> Br (LState Core) Bool instance GHC.Classes.Eq RSolve.HM.Core.Core instance GHC.Classes.Ord RSolve.HM.Core.Prim instance GHC.Classes.Eq RSolve.HM.Core.Prim instance GHC.Show.Show RSolve.HM.Core.Prim instance GHC.Classes.Ord RSolve.HM.Core.TypeOp instance GHC.Classes.Eq RSolve.HM.Core.TypeOp instance GHC.Show.Show RSolve.HM.Core.TypeOp instance GHC.Show.Show RSolve.HM.Core.Core instance RSolve.Infr.Reference RSolve.HM.Core.Core instance RSolve.Infr.Unify RSolve.HM.Core.Core module RSolve.Options.Core data Option A :: Option B :: Option C :: Option D :: Option data Term Var :: Int -> Term Sol :: Set Option -> Term pruneSol :: Term -> Br (LState Term) (Int, Maybe (Set Option)) instance GHC.Show.Show RSolve.Options.Core.Term instance GHC.Classes.Eq RSolve.Options.Core.Term instance GHC.Enum.Enum RSolve.Options.Core.Option instance GHC.Classes.Ord RSolve.Options.Core.Option instance GHC.Show.Show RSolve.Options.Core.Option instance GHC.Classes.Eq RSolve.Options.Core.Option instance RSolve.Infr.Reference RSolve.Options.Core.Term instance RSolve.Infr.Unify RSolve.Options.Core.Term instance RSolve.Infr.EnumSet RSolve.Options.Core.Term