packages feed

antisplice 0.16.0.1 → 0.17.0.0

raw patch · 32 files changed

+129/−1235 lines, 32 filesdep +chatty-utilsdep ~chattyPVP ok

version bump matches the API change (PVP)

Dependencies added: chatty-utils

Dependency ranges changed: chatty

API changes (from Hackage documentation)

- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (AnsiPrinterT m0)
- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (AtomStoreT m0)
- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (CounterT m0)
- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (ExpanderT m0)
- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (HtmlPrinterT m0)
- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (NullExpanderT m0)
- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (RecorderT m0)
- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (SplErrT m0)
- Game.Antisplice.Monad: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (VocabT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (AtomStoreT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (CounterT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (DungeonT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (ObjectT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (PlayerT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (RoomT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (SplErrT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (VocabT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (AtomStoreT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (CounterT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (DungeonT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (ObjectT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (PlayerT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (RoomT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (SplErrT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (VocabT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Int m0 => ChannelPrinter Int (AtomStoreT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Int m0 => ChannelPrinter Int (CounterT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Int m0 => ChannelPrinter Int (DungeonT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Int m0 => ChannelPrinter Int (ObjectT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Int m0 => ChannelPrinter Int (PlayerT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Int m0 => ChannelPrinter Int (RoomT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Int m0 => ChannelPrinter Int (SplErrT m0)
- Game.Antisplice.Monad: instance ChannelPrinter Int m0 => ChannelPrinter Int (VocabT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m => Broadcaster PlayerId (DungeonT m)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (AnsiPrinterT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (AtomStoreT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (CounterT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (DungeonT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (ExpanderT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (HtmlPrinterT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (NullExpanderT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (ObjectT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (PlayerT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (RecorderT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (RoomT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (SplErrT m0)
- Game.Antisplice.Monad: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (VocabT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (AtomStoreT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (CounterT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (DungeonT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (ObjectT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (PlayerFilterT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (PlayerT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (RoomT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (SplErrT m0)
- Game.Antisplice.Monad: instance ExpanderEnv m0 => ExpanderEnv (VocabT m0)
- Game.Antisplice.Monad: instance ExtendedPrinter m0 => ExtendedPrinter (AtomStoreT m0)
- Game.Antisplice.Monad: instance ExtendedPrinter m0 => ExtendedPrinter (CounterT m0)
- Game.Antisplice.Monad: instance ExtendedPrinter m0 => ExtendedPrinter (DungeonT m0)
- Game.Antisplice.Monad: instance ExtendedPrinter m0 => ExtendedPrinter (ObjectT m0)
- Game.Antisplice.Monad: instance ExtendedPrinter m0 => ExtendedPrinter (PlayerT m0)
- Game.Antisplice.Monad: instance ExtendedPrinter m0 => ExtendedPrinter (RoomT m0)
- Game.Antisplice.Monad: instance ExtendedPrinter m0 => ExtendedPrinter (SplErrT m0)
- Game.Antisplice.Monad: instance ExtendedPrinter m0 => ExtendedPrinter (VocabT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (AtomStoreT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (CounterT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (DungeonT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (ObjectT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (PlayerFilterT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (PlayerT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (RoomT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (SplErrT m0)
- Game.Antisplice.Monad: instance HistoryEnv m0 => HistoryEnv (VocabT m0)
- Game.Antisplice.Monad: instance MonadAtoms m0 => MonadAtoms (CounterT m0)
- Game.Antisplice.Monad: instance MonadAtoms m0 => MonadAtoms (DungeonT m0)
- Game.Antisplice.Monad: instance MonadAtoms m0 => MonadAtoms (ObjectT m0)
- Game.Antisplice.Monad: instance MonadAtoms m0 => MonadAtoms (PlayerFilterT m0)
- Game.Antisplice.Monad: instance MonadAtoms m0 => MonadAtoms (PlayerT m0)
- Game.Antisplice.Monad: instance MonadAtoms m0 => MonadAtoms (RoomT m0)
- Game.Antisplice.Monad: instance MonadAtoms m0 => MonadAtoms (SplErrT m0)
- Game.Antisplice.Monad: instance MonadAtoms m0 => MonadAtoms (VocabT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (AtomStoreT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (CounterT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (DungeonT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (ObjectT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (PlayerFilterT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (PlayerT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (RoomT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (SplErrT m0)
- Game.Antisplice.Monad: instance MonadClock m0 => MonadClock (VocabT m0)
- Game.Antisplice.Monad: instance MonadCounter m0 => MonadCounter (DungeonT m0)
- Game.Antisplice.Monad: instance MonadCounter m0 => MonadCounter (ObjectT m0)
- Game.Antisplice.Monad: instance MonadCounter m0 => MonadCounter (PlayerFilterT m0)
- Game.Antisplice.Monad: instance MonadCounter m0 => MonadCounter (PlayerT m0)
- Game.Antisplice.Monad: instance MonadCounter m0 => MonadCounter (RoomT m0)
- Game.Antisplice.Monad: instance MonadCounter m0 => MonadCounter (SplErrT m0)
- Game.Antisplice.Monad: instance MonadCounter m0 => MonadCounter (VocabT m0)
- Game.Antisplice.Monad: instance MonadExpand m0 => MonadExpand (AtomStoreT m0)
- Game.Antisplice.Monad: instance MonadExpand m0 => MonadExpand (CounterT m0)
- Game.Antisplice.Monad: instance MonadExpand m0 => MonadExpand (ObjectT m0)
- Game.Antisplice.Monad: instance MonadExpand m0 => MonadExpand (PlayerFilterT m0)
- Game.Antisplice.Monad: instance MonadExpand m0 => MonadExpand (PlayerT m0)
- Game.Antisplice.Monad: instance MonadExpand m0 => MonadExpand (RoomT m0)
- Game.Antisplice.Monad: instance MonadExpand m0 => MonadExpand (SplErrT m0)
- Game.Antisplice.Monad: instance MonadExpand m0 => MonadExpand (VocabT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (AtomStoreT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (CounterT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (DungeonT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (ObjectT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (PlayerFilterT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (PlayerT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (RoomT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (SplErrT m0)
- Game.Antisplice.Monad: instance MonadFinalizer m0 => MonadFinalizer (VocabT m0)
- Game.Antisplice.Monad: instance MonadPrinter m0 => MonadPrinter (AtomStoreT m0)
- Game.Antisplice.Monad: instance MonadPrinter m0 => MonadPrinter (CounterT m0)
- Game.Antisplice.Monad: instance MonadPrinter m0 => MonadPrinter (DungeonT m0)
- Game.Antisplice.Monad: instance MonadPrinter m0 => MonadPrinter (ObjectT m0)
- Game.Antisplice.Monad: instance MonadPrinter m0 => MonadPrinter (PlayerT m0)
- Game.Antisplice.Monad: instance MonadPrinter m0 => MonadPrinter (RoomT m0)
- Game.Antisplice.Monad: instance MonadPrinter m0 => MonadPrinter (SplErrT m0)
- Game.Antisplice.Monad: instance MonadPrinter m0 => MonadPrinter (VocabT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (AtomStoreT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (CounterT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (DungeonT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (ObjectT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (PlayerFilterT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (PlayerT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (RoomT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (SplErrT m0)
- Game.Antisplice.Monad: instance MonadRandom m0 => MonadRandom (VocabT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (AtomStoreT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (CounterT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (DungeonT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (ObjectT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (PlayerFilterT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (PlayerT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (RoomT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (SplErrT m0)
- Game.Antisplice.Monad: instance MonadScanner m0 => MonadScanner (VocabT m0)
- Game.Antisplice.Monad: instance MonadSpawn m0 => MonadSpawn (AtomStoreT m0)
- Game.Antisplice.Monad: instance MonadSpawn m0 => MonadSpawn (CounterT m0)
- Game.Antisplice.Monad: instance MonadSpawn m0 => MonadSpawn (ObjectT m0)
- Game.Antisplice.Monad: instance MonadSpawn m0 => MonadSpawn (PlayerFilterT m0)
- Game.Antisplice.Monad: instance MonadSpawn m0 => MonadSpawn (PlayerT m0)
- Game.Antisplice.Monad: instance MonadSpawn m0 => MonadSpawn (RoomT m0)
- Game.Antisplice.Monad: instance MonadSpawn m0 => MonadSpawn (SplErrT m0)
- Game.Antisplice.Monad: instance MonadSpawn m0 => MonadSpawn (VocabT m0)
- Game.Antisplice.Rooms: instance (Functor m, MonadExpand m) => MonadExpand (DungeonT m)
- Game.Antisplice.Stereos: instance (MonadDungeon m0, ChannelPrinter PlayerId m0) => Broadcaster PlayerId (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance ChannelPrinter Bool m0 => ChannelPrinter Bool (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance ChannelPrinter Handle m0 => ChannelPrinter Handle (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance ChannelPrinter Int m0 => ChannelPrinter Int (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance ChannelPrinter PlayerId m0 => ChannelPrinter PlayerId (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance ExpanderEnv m0 => ExpanderEnv (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance ExtendedPrinter m0 => ExtendedPrinter (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance HistoryEnv m0 => HistoryEnv (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadAtoms m0 => MonadAtoms (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadClock m0 => MonadClock (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadCounter m0 => MonadCounter (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadExpand m0 => MonadExpand (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadFinalizer m0 => MonadFinalizer (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadPrinter m0 => MonadPrinter (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadRandom m0 => MonadRandom (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadScanner m0 => MonadScanner (StereoBuilderT m0)
- Game.Antisplice.Stereos: instance MonadSpawn m0 => MonadSpawn (StereoBuilderT m0)
- Game.Antisplice.Utils.AVL: AVL :: a -> Int -> Int -> !(AVL a) -> !(AVL a) -> AVL a
- Game.Antisplice.Utils.AVL: EmptyAVL :: AVL a
- Game.Antisplice.Utils.AVL: avlHeight :: AVL i -> Int
- Game.Antisplice.Utils.AVL: avlInorder :: AVL i -> [i]
- Game.Antisplice.Utils.AVL: avlInsert :: Indexable i o v => i -> AVL i -> AVL i
- Game.Antisplice.Utils.AVL: avlLookup :: Indexable i o v => o -> AVL i -> Maybe v
- Game.Antisplice.Utils.AVL: avlMax :: AVL i -> Maybe i
- Game.Antisplice.Utils.AVL: avlMin :: AVL i -> Maybe i
- Game.Antisplice.Utils.AVL: avlPostorder :: AVL i -> [i]
- Game.Antisplice.Utils.AVL: avlPreorder :: AVL i -> [i]
- Game.Antisplice.Utils.AVL: avlRemove :: Indexable i o v => o -> AVL i -> AVL i
- Game.Antisplice.Utils.AVL: avlRoot :: AVL i -> i
- Game.Antisplice.Utils.AVL: avlSize :: AVL i -> Int
- Game.Antisplice.Utils.AVL: data AVL a
- Game.Antisplice.Utils.AVL: instance Functor AVL
- Game.Antisplice.Utils.AVL: instance Indexable i o v => AnyBST AVL i o v
- Game.Antisplice.Utils.AVL: instance None (AVL a)
- Game.Antisplice.Utils.Atoms: Atom :: Int -> Atom a
- Game.Antisplice.Utils.Atoms: AtomStore :: (AVL (Int, Dynamic) -> m (a, AVL (Int, Dynamic))) -> AtomStoreT m a
- Game.Antisplice.Utils.Atoms: Atomar :: (Atom a -> m (Atom b)) -> Atomar m a b
- Game.Antisplice.Utils.Atoms: class MonadCounter m => MonadAtoms m where cloneAtom a = do { b <- newAtom; v <- getAtom a; putAtom b v; return b }
- Game.Antisplice.Utils.Atoms: cloneAtom :: (MonadAtoms m, Typeable v) => Atom v -> m (Atom v)
- Game.Antisplice.Utils.Atoms: dispAtom :: MonadAtoms m => Atom v -> m ()
- Game.Antisplice.Utils.Atoms: getAtom :: (MonadAtoms m, Typeable v) => Atom v -> m v
- Game.Antisplice.Utils.Atoms: instance (Functor m, MonadCounter m) => MonadAtoms (AtomStoreT m)
- Game.Antisplice.Utils.Atoms: instance Eq (Atom a)
- Game.Antisplice.Utils.Atoms: instance Functor m => Functor (AtomStoreT m)
- Game.Antisplice.Utils.Atoms: instance Monad m => Monad (AtomStoreT m)
- Game.Antisplice.Utils.Atoms: instance MonadCounter m => MonadCounter (AtomStoreT m)
- Game.Antisplice.Utils.Atoms: instance MonadIO m => MonadIO (AtomStoreT m)
- Game.Antisplice.Utils.Atoms: instance MonadTrans AtomStoreT
- Game.Antisplice.Utils.Atoms: instance Ord (Atom a)
- Game.Antisplice.Utils.Atoms: mapAtom :: (Typeable a, Typeable b, MonadAtoms m) => (a -> b) -> Atom a -> m (Atom b)
- Game.Antisplice.Utils.Atoms: newAtom :: (MonadAtoms m, Typeable v) => m (Atom v)
- Game.Antisplice.Utils.Atoms: newtype Atom a
- Game.Antisplice.Utils.Atoms: newtype AtomStoreT m a
- Game.Antisplice.Utils.Atoms: newtype (Typeable a, Typeable b) => Atomar m a b
- Game.Antisplice.Utils.Atoms: putAtom :: (MonadAtoms m, Typeable v) => Atom v -> v -> m ()
- Game.Antisplice.Utils.Atoms: runAtomStoreT :: AtomStoreT m a -> AVL (Int, Dynamic) -> m (a, AVL (Int, Dynamic))
- Game.Antisplice.Utils.Atoms: runAtomar :: Atomar m a b -> Atom a -> m (Atom b)
- Game.Antisplice.Utils.BST: BST :: a -> !(BST a) -> !(BST a) -> BST a
- Game.Antisplice.Utils.BST: EmptyBST :: BST a
- Game.Antisplice.Utils.BST: anyBstEmpty :: AnyBST t i o v => t i
- Game.Antisplice.Utils.BST: anyBstHead :: AnyBST t i o v => t i -> Maybe i
- Game.Antisplice.Utils.BST: anyBstInorder :: AnyBST t i o v => t i -> [i]
- Game.Antisplice.Utils.BST: anyBstInsert :: AnyBST t i o v => i -> t i -> t i
- Game.Antisplice.Utils.BST: anyBstLookup :: AnyBST t i o v => o -> t i -> Maybe v
- Game.Antisplice.Utils.BST: anyBstMax :: AnyBST t i o v => t i -> Maybe i
- Game.Antisplice.Utils.BST: anyBstMin :: AnyBST t i o v => t i -> Maybe i
- Game.Antisplice.Utils.BST: anyBstRemove :: AnyBST t i o v => o -> t i -> t i
- Game.Antisplice.Utils.BST: bstHead :: Indexable i o v => BST i -> Maybe i
- Game.Antisplice.Utils.BST: bstInorder :: Indexable i o v => BST i -> [i]
- Game.Antisplice.Utils.BST: bstInsert :: Indexable i o v => i -> BST i -> BST i
- Game.Antisplice.Utils.BST: bstLookup :: Indexable i o v => o -> BST i -> Maybe v
- Game.Antisplice.Utils.BST: bstMax :: BST i -> Maybe i
- Game.Antisplice.Utils.BST: bstMin :: BST i -> Maybe i
- Game.Antisplice.Utils.BST: bstRemove :: Indexable i o v => o -> BST i -> BST i
- Game.Antisplice.Utils.BST: class Indexable i o v => AnyBST t i o v
- Game.Antisplice.Utils.BST: class Ord o => Indexable i o v | i -> o, i -> v where type family IndexOf i type family ValueOf i
- Game.Antisplice.Utils.BST: data BST a
- Game.Antisplice.Utils.BST: indexOf :: Indexable i o v => i -> o
- Game.Antisplice.Utils.BST: instance Indexable Int Int Int
- Game.Antisplice.Utils.BST: instance Indexable i o v => AnyBST BST i o v
- Game.Antisplice.Utils.BST: instance None (BST a)
- Game.Antisplice.Utils.BST: instance Ord o => Indexable (o, a) o a
- Game.Antisplice.Utils.BST: instance Ord o => Indexable (o, a, b) o (a, b)
- Game.Antisplice.Utils.BST: instance Ord o => Indexable (o, a, b, c) o (a, b, c)
- Game.Antisplice.Utils.BST: instance Ord o => Indexable (o, a, b, c, d) o (a, b, c, d)
- Game.Antisplice.Utils.BST: instance Ord o => Indexable (o, a, b, c, d, e) o (a, b, c, d, e)
- Game.Antisplice.Utils.BST: valueOf :: Indexable i o v => i -> v
- Game.Antisplice.Utils.Counter: Counter :: (Int -> m (a, Int)) -> CounterT m a
- Game.Antisplice.Utils.Counter: class Monad m => MonadCounter m
- Game.Antisplice.Utils.Counter: countOn :: MonadCounter m => m Int
- Game.Antisplice.Utils.Counter: instance Functor m => Functor (CounterT m)
- Game.Antisplice.Utils.Counter: instance Monad m => Monad (CounterT m)
- Game.Antisplice.Utils.Counter: instance Monad m => MonadCounter (CounterT m)
- Game.Antisplice.Utils.Counter: instance MonadTrans CounterT
- Game.Antisplice.Utils.Counter: newtype CounterT m a
- Game.Antisplice.Utils.Counter: runCounterT :: CounterT m a -> Int -> m (a, Int)
- Game.Antisplice.Utils.Counter: withCounter :: (Monad m, Functor m) => CounterT m a -> m a
- Game.Antisplice.Utils.Fail: Fail :: m (Either e a) -> FailT e m a
- Game.Antisplice.Utils.Fail: instance Monad m => Functor (FailT e m)
- Game.Antisplice.Utils.Fail: instance Monad m => Monad (FailT e m)
- Game.Antisplice.Utils.Fail: instance Monad m => MonadError e (FailT e m)
- Game.Antisplice.Utils.Fail: instance MonadTrans (FailT e)
- Game.Antisplice.Utils.Fail: newtype FailT e m a
- Game.Antisplice.Utils.Fail: runFailT :: FailT e m a -> m (Either e a)
- Game.Antisplice.Utils.Fail: type Fail e = FailT e Identity
- Game.Antisplice.Utils.Focus: data Focus a
- Game.Antisplice.Utils.Focus: focusSelect :: Indexable a o v => o -> Focus a -> Maybe (Focus a)
- Game.Antisplice.Utils.Focus: instance Indexable i o v => AnyBST Focus i o v
- Game.Antisplice.Utils.Focus: instance None (Focus a)
- Game.Antisplice.Utils.Graph: Edge :: NodeId -> NodeId -> Int -> b -> c -> Edge b c
- Game.Antisplice.Utils.Graph: Graph :: AVL (Node a) -> [Edge b c] -> NodeId -> Graph a b c
- Game.Antisplice.Utils.Graph: Node :: Bool -> a -> NodeId -> Node a
- Game.Antisplice.Utils.Graph: NodeId :: Int -> NodeId
- Game.Antisplice.Utils.Graph: addEdge :: NodeId -> NodeId -> Int -> b -> c -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: addEdge' :: Edge b c -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: addEdges :: [(NodeId, NodeId, Int, b, c)] -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: addEdges' :: [Edge b c] -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: addMutualEdge :: NodeId -> NodeId -> Int -> b -> c -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: addMutualEdges :: [(NodeId, NodeId, Int, b, c)] -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: addNode :: a -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: addNode' :: a -> Graph a b c -> (NodeId, Graph a b c)
- Game.Antisplice.Utils.Graph: addNodes :: [a] -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: addNodes' :: [a] -> Graph a b c -> ([NodeId], Graph a b c)
- Game.Antisplice.Utils.Graph: allNodes :: Graph a b c -> [Node a]
- Game.Antisplice.Utils.Graph: content :: Edge b c -> c
- Game.Antisplice.Utils.Graph: data Edge b c
- Game.Antisplice.Utils.Graph: data Graph a b c
- Game.Antisplice.Utils.Graph: data Node a
- Game.Antisplice.Utils.Graph: edges :: Graph a b c -> [Edge b c]
- Game.Antisplice.Utils.Graph: emptyGraph :: Graph a b c
- Game.Antisplice.Utils.Graph: followEdge :: Eq b => NodeId -> b -> Graph a b c -> Maybe NodeId
- Game.Antisplice.Utils.Graph: fromNode :: Edge b c -> NodeId
- Game.Antisplice.Utils.Graph: getNode :: NodeId -> Graph a b c -> a
- Game.Antisplice.Utils.Graph: getNode' :: NodeId -> Graph a b c -> Node a
- Game.Antisplice.Utils.Graph: incId :: NodeId -> NodeId
- Game.Antisplice.Utils.Graph: instance Eq NodeId
- Game.Antisplice.Utils.Graph: instance Indexable (Node a) NodeId (Node a)
- Game.Antisplice.Utils.Graph: instance None (Graph a b c)
- Game.Antisplice.Utils.Graph: instance Ord NodeId
- Game.Antisplice.Utils.Graph: instance Show NodeId
- Game.Antisplice.Utils.Graph: instance Show a => Show (Node a)
- Game.Antisplice.Utils.Graph: instance Show b => Show (Edge b c)
- Game.Antisplice.Utils.Graph: label :: Edge b c -> b
- Game.Antisplice.Utils.Graph: listEdges :: NodeId -> Graph a b c -> [(b, c, NodeId)]
- Game.Antisplice.Utils.Graph: markNode :: NodeId -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: newtype NodeId
- Game.Antisplice.Utils.Graph: nextId :: Graph a b c -> NodeId
- Game.Antisplice.Utils.Graph: nodeContent :: Node a -> a
- Game.Antisplice.Utils.Graph: nodeId :: Node a -> NodeId
- Game.Antisplice.Utils.Graph: nodeMarked :: Node a -> Bool
- Game.Antisplice.Utils.Graph: nodes :: Graph a b c -> AVL (Node a)
- Game.Antisplice.Utils.Graph: queryEdge :: Eq b => NodeId -> b -> Graph a b c -> Maybe c
- Game.Antisplice.Utils.Graph: rootNode :: Graph a b c -> NodeId
- Game.Antisplice.Utils.Graph: setNode :: NodeId -> a -> Graph a b c -> Graph a b c
- Game.Antisplice.Utils.Graph: toNode :: Edge b c -> NodeId
- Game.Antisplice.Utils.Graph: weight :: Edge b c -> Int
- Game.Antisplice.Utils.Hetero: (:-:) :: a -> b -> Cons a b
- Game.Antisplice.Utils.Hetero: Nil :: Nil
- Game.Antisplice.Utils.Hetero: Titled :: String -> a -> Titled a
- Game.Antisplice.Utils.Hetero: class Append a b ab | a b -> ab
- Game.Antisplice.Utils.Hetero: class IntoMaybe a ar
- Game.Antisplice.Utils.Hetero: class Tuplify l t | l -> t
- Game.Antisplice.Utils.Hetero: data Cons a b
- Game.Antisplice.Utils.Hetero: data Nil
- Game.Antisplice.Utils.Hetero: data Titled a
- Game.Antisplice.Utils.Hetero: instance (Tuplify a ar, Tuplify b br) => Tuplify (Cons a (Cons b Nil)) (ar, br)
- Game.Antisplice.Utils.Hetero: instance (Tuplify a ar, Tuplify b br, Tuplify c cr) => Tuplify (Cons a (Cons b (Cons c Nil))) (ar, br, cr)
- Game.Antisplice.Utils.Hetero: instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr) => Tuplify (Cons a (Cons b (Cons c (Cons d Nil)))) (ar, br, cr, dr)
- Game.Antisplice.Utils.Hetero: instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e Nil))))) (ar, br, cr, dr, er)
- Game.Antisplice.Utils.Hetero: instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er, Tuplify f fr) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil)))))) (ar, br, cr, dr, er, fr)
- Game.Antisplice.Utils.Hetero: instance Append Nil b b
- Game.Antisplice.Utils.Hetero: instance Append b c bc => Append (Cons a b) c (Cons a bc)
- Game.Antisplice.Utils.Hetero: instance IntoMaybe (Cons a as) (Cons (Maybe (Cons a as)) Nil)
- Game.Antisplice.Utils.Hetero: instance IntoMaybe Nil Nil
- Game.Antisplice.Utils.Hetero: instance Tuplify Char Char
- Game.Antisplice.Utils.Hetero: instance Tuplify Int Int
- Game.Antisplice.Utils.Hetero: instance Tuplify Nil ()
- Game.Antisplice.Utils.Hetero: instance Tuplify a ar => Tuplify (Cons a Nil) ar
- Game.Antisplice.Utils.Hetero: instance Tuplify a ar => Tuplify (Maybe a) (Maybe ar)
- Game.Antisplice.Utils.Hetero: instance Tuplify a ar => Tuplify (Titled a) ar
- Game.Antisplice.Utils.Hetero: instance Tuplify a ar => Tuplify [a] [ar]
- Game.Antisplice.Utils.Hetero: tappend :: Append a b ab => a -> b -> ab
- Game.Antisplice.Utils.Hetero: tjust :: IntoMaybe a ar => a -> ar
- Game.Antisplice.Utils.Hetero: tnothing :: IntoMaybe a ar => a -> ar
- Game.Antisplice.Utils.Hetero: tuplify :: Tuplify l t => l -> t
- Game.Antisplice.Utils.ListBuilder: (>-<) :: ListBuilder l (a, b) => a -> b -> l ()
- Game.Antisplice.Utils.ListBuilder: LazyBuilder :: (([i] -> [i]) -> m (a, [i] -> [i])) -> LazyBuilderT i m a
- Game.Antisplice.Utils.ListBuilder: StrictBuilder :: ([i] -> m (a, [i])) -> StrictBuilderT i m a
- Game.Antisplice.Utils.ListBuilder: buildList :: ListBuilder l i => l () -> [i]
- Game.Antisplice.Utils.ListBuilder: class Monad l => ListBuilder l i | l -> i
- Game.Antisplice.Utils.ListBuilder: instance Functor m => Functor (LazyBuilderT i m)
- Game.Antisplice.Utils.ListBuilder: instance Functor m => Functor (StrictBuilderT i m)
- Game.Antisplice.Utils.ListBuilder: instance ListBuilder (LazyBuilder i) i
- Game.Antisplice.Utils.ListBuilder: instance ListBuilder (StrictBuilder i) i
- Game.Antisplice.Utils.ListBuilder: instance Monad m => Monad (LazyBuilderT i m)
- Game.Antisplice.Utils.ListBuilder: instance Monad m => Monad (StrictBuilderT i m)
- Game.Antisplice.Utils.ListBuilder: instance MonadTrans (LazyBuilderT i)
- Game.Antisplice.Utils.ListBuilder: instance MonadTrans (StrictBuilderT i)
- Game.Antisplice.Utils.ListBuilder: lazyBuild :: LazyBuilderT i Identity () -> [i]
- Game.Antisplice.Utils.ListBuilder: li :: ListBuilder l i => i -> l ()
- Game.Antisplice.Utils.ListBuilder: lis :: ListBuilder l i => [i] -> l ()
- Game.Antisplice.Utils.ListBuilder: lit :: ListBuilder l (a, b) => a -> b -> l ()
- Game.Antisplice.Utils.ListBuilder: newtype LazyBuilderT i m a
- Game.Antisplice.Utils.ListBuilder: newtype StrictBuilderT i m a
- Game.Antisplice.Utils.ListBuilder: runLazyBuilderT :: LazyBuilderT i m a -> ([i] -> [i]) -> m (a, [i] -> [i])
- Game.Antisplice.Utils.ListBuilder: runStrictBuilderT :: StrictBuilderT i m a -> [i] -> m (a, [i])
- Game.Antisplice.Utils.ListBuilder: strictBuild :: StrictBuilderT i Identity () -> [i]
- Game.Antisplice.Utils.ListBuilder: type LazyBuilder i = LazyBuilderT i Identity
- Game.Antisplice.Utils.ListBuilder: type StrictBuilder i = StrictBuilderT i Identity
- Game.Antisplice.Utils.None: class None n
- Game.Antisplice.Utils.None: cleanMaybe :: (Eq n, None n) => Maybe n -> Maybe n
- Game.Antisplice.Utils.None: expandMaybe :: (Eq n, None n) => n -> Maybe n
- Game.Antisplice.Utils.None: instance Monad m => None (a -> m a)
- Game.Antisplice.Utils.None: instance None ()
- Game.Antisplice.Utils.None: instance None (Maybe a)
- Game.Antisplice.Utils.None: instance None (a -> a)
- Game.Antisplice.Utils.None: instance None Bool
- Game.Antisplice.Utils.None: instance None Int
- Game.Antisplice.Utils.None: instance None Integer
- Game.Antisplice.Utils.None: instance None Text
- Game.Antisplice.Utils.None: instance None [a]
- Game.Antisplice.Utils.None: joinMaybe :: None n => Maybe n -> n
- Game.Antisplice.Utils.None: none :: None n => n
- Game.Antisplice.Utils.None: noneM :: (Monad m, None n) => m n
- Game.Antisplice.Utils.None: reduce :: (Eq n, None n) => [n] -> [n]
- Game.Antisplice.Utils.None: reduceMaybe :: [Maybe a] -> [a]
- Game.Antisplice.Utils.Run: class MonadTrans t => Run t where type family Baretype t m a
- Game.Antisplice.Utils.Run: instance Run (FailT e)
- Game.Antisplice.Utils.Run: instance Run DungeonT
- Game.Antisplice.Utils.Run: instance Run RoomT
- Game.Antisplice.Utils.Run: run :: (Run t, Monad m) => t m a -> Baretype t m a
- Game.Antisplice.Utils.TST: EmptyTST :: TST a
- Game.Antisplice.Utils.TST: TST :: Char -> (Maybe a) -> (TST a) -> (TST a) -> (TST a) -> TST a
- Game.Antisplice.Utils.TST: data TST a
- Game.Antisplice.Utils.TST: instance None (TST a)
- Game.Antisplice.Utils.TST: tstContains :: String -> TST a -> Bool
- Game.Antisplice.Utils.TST: tstInsert :: String -> a -> TST a -> TST a
- Game.Antisplice.Utils.TST: tstLookup :: String -> TST a -> Maybe a
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (AnsiPrinterT m0)
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (AtomStoreT m0)
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (CounterT m0)
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (ExpanderT m0)
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (HtmlPrinterT m0)
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (NullExpanderT m0)
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (RecorderT m0)
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (SplErrT m0)
+ Game.Antisplice.Monad: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (VocabT m0)
+ Game.Antisplice.Monad: instance ChAtoms m0 => ChAtoms (CounterT m0)
+ Game.Antisplice.Monad: instance ChAtoms m0 => ChAtoms (DungeonT m0)
+ Game.Antisplice.Monad: instance ChAtoms m0 => ChAtoms (ObjectT m0)
+ Game.Antisplice.Monad: instance ChAtoms m0 => ChAtoms (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChAtoms m0 => ChAtoms (PlayerT m0)
+ Game.Antisplice.Monad: instance ChAtoms m0 => ChAtoms (RoomT m0)
+ Game.Antisplice.Monad: instance ChAtoms m0 => ChAtoms (SplErrT m0)
+ Game.Antisplice.Monad: instance ChAtoms m0 => ChAtoms (VocabT m0)
+ Game.Antisplice.Monad: instance ChBufferedScanner m0 => ChBufferedScanner (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChBufferedScanner m0 => ChBufferedScanner (CounterT m0)
+ Game.Antisplice.Monad: instance ChBufferedScanner m0 => ChBufferedScanner (ObjectT m0)
+ Game.Antisplice.Monad: instance ChBufferedScanner m0 => ChBufferedScanner (PlayerT m0)
+ Game.Antisplice.Monad: instance ChBufferedScanner m0 => ChBufferedScanner (RoomT m0)
+ Game.Antisplice.Monad: instance ChBufferedScanner m0 => ChBufferedScanner (SplErrT m0)
+ Game.Antisplice.Monad: instance ChBufferedScanner m0 => ChBufferedScanner (VocabT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (CounterT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (DungeonT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (ObjectT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (PlayerT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (RoomT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (SplErrT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (VocabT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (CounterT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (DungeonT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (ObjectT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (PlayerT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (RoomT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (SplErrT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (VocabT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (CounterT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (DungeonT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (ObjectT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (PlayerT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (RoomT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (SplErrT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (VocabT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m => ChBroadcaster PlayerId (DungeonT m)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (AnsiPrinterT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (CounterT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (DungeonT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (ExpanderT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (HtmlPrinterT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (NullExpanderT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (ObjectT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (PlayerT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (RecorderT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (RoomT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (SplErrT m0)
+ Game.Antisplice.Monad: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (VocabT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (CounterT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (DungeonT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (ObjectT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (PlayerT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (RoomT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (SplErrT m0)
+ Game.Antisplice.Monad: instance ChClock m0 => ChClock (VocabT m0)
+ Game.Antisplice.Monad: instance ChCounter m0 => ChCounter (DungeonT m0)
+ Game.Antisplice.Monad: instance ChCounter m0 => ChCounter (ObjectT m0)
+ Game.Antisplice.Monad: instance ChCounter m0 => ChCounter (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChCounter m0 => ChCounter (PlayerT m0)
+ Game.Antisplice.Monad: instance ChCounter m0 => ChCounter (RoomT m0)
+ Game.Antisplice.Monad: instance ChCounter m0 => ChCounter (SplErrT m0)
+ Game.Antisplice.Monad: instance ChCounter m0 => ChCounter (VocabT m0)
+ Game.Antisplice.Monad: instance ChExpand m0 => ChExpand (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChExpand m0 => ChExpand (CounterT m0)
+ Game.Antisplice.Monad: instance ChExpand m0 => ChExpand (ObjectT m0)
+ Game.Antisplice.Monad: instance ChExpand m0 => ChExpand (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChExpand m0 => ChExpand (PlayerT m0)
+ Game.Antisplice.Monad: instance ChExpand m0 => ChExpand (RoomT m0)
+ Game.Antisplice.Monad: instance ChExpand m0 => ChExpand (SplErrT m0)
+ Game.Antisplice.Monad: instance ChExpand m0 => ChExpand (VocabT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (CounterT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (DungeonT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (ObjectT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (PlayerT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (RoomT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (SplErrT m0)
+ Game.Antisplice.Monad: instance ChExpanderEnv m0 => ChExpanderEnv (VocabT m0)
+ Game.Antisplice.Monad: instance ChExtendedPrinter m0 => ChExtendedPrinter (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChExtendedPrinter m0 => ChExtendedPrinter (CounterT m0)
+ Game.Antisplice.Monad: instance ChExtendedPrinter m0 => ChExtendedPrinter (DungeonT m0)
+ Game.Antisplice.Monad: instance ChExtendedPrinter m0 => ChExtendedPrinter (ObjectT m0)
+ Game.Antisplice.Monad: instance ChExtendedPrinter m0 => ChExtendedPrinter (PlayerT m0)
+ Game.Antisplice.Monad: instance ChExtendedPrinter m0 => ChExtendedPrinter (RoomT m0)
+ Game.Antisplice.Monad: instance ChExtendedPrinter m0 => ChExtendedPrinter (SplErrT m0)
+ Game.Antisplice.Monad: instance ChExtendedPrinter m0 => ChExtendedPrinter (VocabT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (CounterT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (DungeonT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (ObjectT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (PlayerT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (RoomT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (SplErrT m0)
+ Game.Antisplice.Monad: instance ChFinalizer m0 => ChFinalizer (VocabT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (CounterT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (DungeonT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (ObjectT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (PlayerT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (RoomT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (SplErrT m0)
+ Game.Antisplice.Monad: instance ChHistoryEnv m0 => ChHistoryEnv (VocabT m0)
+ Game.Antisplice.Monad: instance ChPrinter m0 => ChPrinter (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChPrinter m0 => ChPrinter (CounterT m0)
+ Game.Antisplice.Monad: instance ChPrinter m0 => ChPrinter (DungeonT m0)
+ Game.Antisplice.Monad: instance ChPrinter m0 => ChPrinter (ObjectT m0)
+ Game.Antisplice.Monad: instance ChPrinter m0 => ChPrinter (PlayerT m0)
+ Game.Antisplice.Monad: instance ChPrinter m0 => ChPrinter (RoomT m0)
+ Game.Antisplice.Monad: instance ChPrinter m0 => ChPrinter (SplErrT m0)
+ Game.Antisplice.Monad: instance ChPrinter m0 => ChPrinter (VocabT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (CounterT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (DungeonT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (ObjectT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (PlayerT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (RoomT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (SplErrT m0)
+ Game.Antisplice.Monad: instance ChRandom m0 => ChRandom (VocabT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (CounterT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (DungeonT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (ObjectT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (PlayerT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (RoomT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (SplErrT m0)
+ Game.Antisplice.Monad: instance ChScanner m0 => ChScanner (VocabT m0)
+ Game.Antisplice.Monad: instance ChSpawn m0 => ChSpawn (AtomStoreT m0)
+ Game.Antisplice.Monad: instance ChSpawn m0 => ChSpawn (CounterT m0)
+ Game.Antisplice.Monad: instance ChSpawn m0 => ChSpawn (ObjectT m0)
+ Game.Antisplice.Monad: instance ChSpawn m0 => ChSpawn (PlayerFilterT m0)
+ Game.Antisplice.Monad: instance ChSpawn m0 => ChSpawn (PlayerT m0)
+ Game.Antisplice.Monad: instance ChSpawn m0 => ChSpawn (RoomT m0)
+ Game.Antisplice.Monad: instance ChSpawn m0 => ChSpawn (SplErrT m0)
+ Game.Antisplice.Monad: instance ChSpawn m0 => ChSpawn (VocabT m0)
+ Game.Antisplice.Rooms: instance (Functor m, ChExpand m) => ChExpand (DungeonT m)
+ Game.Antisplice.Stereos: instance (MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChAtoms m0 => ChAtoms (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChBufferedScanner m0 => ChBufferedScanner (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChChannelPrinter Bool m0 => ChChannelPrinter Bool (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChChannelPrinter Handle m0 => ChChannelPrinter Handle (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChChannelPrinter Int m0 => ChChannelPrinter Int (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChClock m0 => ChClock (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChCounter m0 => ChCounter (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChExpand m0 => ChExpand (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChExpanderEnv m0 => ChExpanderEnv (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChExtendedPrinter m0 => ChExtendedPrinter (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChFinalizer m0 => ChFinalizer (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChHistoryEnv m0 => ChHistoryEnv (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChPrinter m0 => ChPrinter (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChRandom m0 => ChRandom (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChScanner m0 => ChScanner (StereoBuilderT m0)
+ Game.Antisplice.Stereos: instance ChSpawn m0 => ChSpawn (StereoBuilderT m0)
- Game.Antisplice: type Constructor a = forall m. (Functor m, ExtendedPrinter m, MonadExpand m, ExpanderEnv m, MonadAtoms m, MonadClock m, MonadVocab m, MonadError SplErr m, MonadDungeon m) => m a
+ Game.Antisplice: type Constructor a = forall m. (Functor m, ChExtendedPrinter m, ChExpand m, ChExpanderEnv m, ChAtoms m, ChClock m, MonadVocab m, MonadError SplErr m, MonadDungeon m) => m a
- Game.Antisplice.Action: implyCooldownA :: MonadCounter m => Integer -> m Action
+ Game.Antisplice.Action: implyCooldownA :: ChCounter m => Integer -> m Action
- Game.Antisplice.Monad.Dungeon: type ChattyDungeonM a = forall m. (Functor m, ExtendedPrinter m, MonadExpand m, ExpanderEnv m, MonadDungeon m, MonadError SplErr m, MonadAtoms m, MonadClock m, MonadVocab m, MonadRandom m, Broadcaster PlayerId m) => m a
+ Game.Antisplice.Monad.Dungeon: type ChattyDungeonM a = forall m. SomeChattyDungeon m => m a
- Game.Antisplice.Prototypes: addRoomDesc :: MonadAtoms m => String -> RoomT m ObjectId
+ Game.Antisplice.Prototypes: addRoomDesc :: ChAtoms m => String -> RoomT m ObjectId
- Game.Antisplice.Prototypes: ctorRoom :: MonadAtoms m => String -> String -> RoomT m ()
+ Game.Antisplice.Prototypes: ctorRoom :: ChAtoms m => String -> String -> RoomT m ()
- Game.Antisplice.Prototypes: ctorSign :: (MonadAtoms m, MonadVocab m, MonadError SplErr m) => String -> [String] -> ObjectT m ()
+ Game.Antisplice.Prototypes: ctorSign :: (ChAtoms m, MonadVocab m, MonadError SplErr m) => String -> [String] -> ObjectT m ()
- Game.Antisplice.Rooms: addDescSeg :: (MonadObject m, MonadAtoms m) => String -> m ()
+ Game.Antisplice.Rooms: addDescSeg :: (MonadObject m, ChAtoms m) => String -> m ()
- Game.Antisplice.Rooms: addRoomObject :: (MonadCounter m, MonadRoom m) => ObjectT m a -> m ObjectId
+ Game.Antisplice.Rooms: addRoomObject :: (ChCounter m, MonadRoom m) => ObjectT m a -> m ObjectId
- Game.Antisplice.Rooms: consumeAlcohol :: (MonadPrinter m, MonadRandom m, MonadPlayer m, MonadDungeon m, MonadClock m) => Int -> m ()
+ Game.Antisplice.Rooms: consumeAlcohol :: (ChPrinter m, ChRandom m, MonadPlayer m, MonadDungeon m, ChClock m) => Int -> m ()
- Game.Antisplice.Rooms: drunken :: (MonadRandom m, MonadPlayer m) => String -> m String
+ Game.Antisplice.Rooms: drunken :: (ChRandom m, MonadPlayer m) => String -> m String
- Game.Antisplice.Rooms: getRoomDesc :: (MonadRoom m, MonadAtoms m) => m String
+ Game.Antisplice.Rooms: getRoomDesc :: (MonadRoom m, ChAtoms m) => m String
- Game.Antisplice.Rooms: instanciateForm :: (MonadAtoms m, MonadRoom m, MonadCounter m) => Atom ObjectState -> m ObjectId
+ Game.Antisplice.Rooms: instanciateForm :: (ChAtoms m, MonadRoom m) => Atom ObjectState -> m ObjectId
- Game.Antisplice.Rooms: registerCurrency :: (MonadCounter m, MonadDungeon m) => String -> String -> m CurrencyId
+ Game.Antisplice.Rooms: registerCurrency :: (ChCounter m, MonadDungeon m) => String -> String -> m CurrencyId
- Game.Antisplice.Rooms: registerForm :: MonadAtoms m => ObjectT m () -> m (Atom ObjectState)
+ Game.Antisplice.Rooms: registerForm :: ChAtoms m => ObjectT m () -> m (Atom ObjectState)
- Game.Antisplice.Rooms: registerKind :: MonadCounter m => m KindId
+ Game.Antisplice.Rooms: registerKind :: ChCounter m => m KindId
- Game.Antisplice.Rooms: schedule :: (MonadDungeon m, MonadClock m) => Integer -> Handler -> m ()
+ Game.Antisplice.Rooms: schedule :: (MonadDungeon m, ChClock m) => Integer -> Handler -> m ()
- Game.Antisplice.Rooms: subscribePlayer :: (MonadDungeon m, MonadCounter m) => PlayerT m a -> m ()
+ Game.Antisplice.Rooms: subscribePlayer :: (MonadDungeon m, ChCounter m) => PlayerT m a -> m ()
- Game.Antisplice.Stats: calcStat :: (MonadPlayer m, MonadAtoms m, MonadRoom m) => StatKey -> m Int
+ Game.Antisplice.Stats: calcStat :: (MonadPlayer m, ChAtoms m, MonadRoom m) => StatKey -> m Int
- Game.Antisplice.Stats: totalStereo :: (MonadAtoms m, MonadPlayer m, MonadRoom m) => m PlayerStereo
+ Game.Antisplice.Stats: totalStereo :: (ChAtoms m, MonadPlayer m, MonadRoom m) => m PlayerStereo
- Game.Antisplice.Stereos: registerStereo :: MonadAtoms m => PlayerStereo -> m (Atom PlayerStereo)
+ Game.Antisplice.Stereos: registerStereo :: ChAtoms m => PlayerStereo -> m (Atom PlayerStereo)
- Game.Antisplice.Stereos: registerStereoM :: MonadAtoms m => StereoBuilderT m () -> m (Atom PlayerStereo)
+ Game.Antisplice.Stereos: registerStereoM :: ChAtoms m => StereoBuilderT m () -> m (Atom PlayerStereo)
- Game.Antisplice.Terminal.Repl: repl :: (ExtendedPrinter m, MonadScanner m, MonadError SplErr m, MonadIO m, MonadExpand m, ExpanderEnv m, MonadDungeon m, MonadAtoms m, MonadRoom m, MonadClock m, MonadVocab m, HistoryEnv m, MonadRandom m, Broadcaster PlayerId m) => m ()
+ Game.Antisplice.Terminal.Repl: repl :: (ChExtendedPrinter m, ChScanner m, MonadError SplErr m, MonadIO m, ChExpand m, ChExpanderEnv m, MonadDungeon m, ChAtoms m, MonadRoom m, ChClock m, MonadVocab m, ChHistoryEnv m, ChRandom m, ChBroadcaster PlayerId m) => m ()

Files

antisplice.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.16.0.1+version:             0.17.0.0  -- A short (one-line) description of the package. synopsis:            An engine for text-based dungeons.@@ -48,7 +48,7 @@  library   -- Modules exported by the library.-  exposed-modules:     Game.Antisplice.Prototypes, Game.Antisplice.Templates, Game.Antisplice.Lang, Game.Antisplice.Monad, Game.Antisplice.Rooms, Game.Antisplice.Errors, Game.Antisplice.Utils.TST, Game.Antisplice.Utils.AVL, Game.Antisplice.Utils.Run, Game.Antisplice.Utils.BST, Game.Antisplice.Utils.Graph, Game.Antisplice.Utils.Counter, Game.Antisplice.Utils.Fail, Game.Antisplice.Monad.Dungeon, Game.Antisplice.Terminal.Repl, Game.Antisplice.Events, Game.Antisplice.Monad.Vocab, Game.Antisplice.Utils.Atoms, Game.Antisplice.Stats, Game.Antisplice.Utils.None, Game.Antisplice.Utils.Focus, Game.Antisplice.SingleUser, Game.Antisplice, Game.Antisplice.Skills, Game.Antisplice.Stereos, Game.Antisplice.Paths, Game.Antisplice.Action, Game.Antisplice.Utils.ListBuilder, Game.Antisplice.Call, Game.Antisplice.MaskedSkills, Game.Antisplice.Utils.Hetero+  exposed-modules:     Game.Antisplice.Prototypes, Game.Antisplice.Templates, Game.Antisplice.Lang, Game.Antisplice.Monad, Game.Antisplice.Rooms, Game.Antisplice.Errors, Game.Antisplice.Monad.Dungeon, Game.Antisplice.Terminal.Repl, Game.Antisplice.Events, Game.Antisplice.Monad.Vocab, Game.Antisplice.Stats, Game.Antisplice.SingleUser, Game.Antisplice, Game.Antisplice.Skills, Game.Antisplice.Stereos, Game.Antisplice.Paths, Game.Antisplice.Action, Game.Antisplice.Call, Game.Antisplice.MaskedSkills      -- Modules included in this library but not exported.   -- other-modules:       @@ -57,7 +57,7 @@   other-extensions:    TemplateHaskell, QuasiQuotes, FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances, FlexibleContexts, UndecidableInstances, RankNTypes, TypeFamilies, FunctionalDependencies, LambdaCase, ScopedTypeVariables, ExistentialQuantification, TupleSections, RecordWildCards, DeriveDataTypeable      -- Other library packages from which modules are imported.-  build-depends:       base >=4.6 && <4.7, chatty >=0.5.4 && <0.6, text >=0.11 && <0.12, template-haskell >=2.8 && <2.9, mtl >=2.1 && <2.2, transformers >=0.3 && <0.4, haskeline >= 0.7 && < 0.8, time >= 1.4 && < 1.5+  build-depends:       base >=4.6 && <4.7, chatty >=0.6 && <0.7, chatty-utils >= 0.6 && <0.7, text >=0.11 && <0.12, template-haskell >=2.8 && <2.9, mtl >=2.1 && <2.2, transformers >=0.3 && <0.4, haskeline >= 0.7 && < 0.8, time >= 1.4 && < 1.5      -- Directories containing source files.   hs-source-dirs:      src
src/Game/Antisplice.hs view
@@ -29,11 +29,11 @@   module Game.Antisplice.Call,   module Game.Antisplice.Monad.Dungeon,   module Game.Antisplice.Monad.Vocab,-  module Game.Antisplice.Utils.Fail,-  module Game.Antisplice.Utils.Atoms,-  module Game.Antisplice.Utils.None,-  module Game.Antisplice.Utils.BST,-  module Game.Antisplice.Utils.Counter,+  module Data.Chatty.Fail,+  module Data.Chatty.Atoms,+  module Data.Chatty.None,+  module Data.Chatty.BST,+  module Data.Chatty.Counter,   module Game.Antisplice.Rooms,   module Game.Antisplice.Stats,   module Game.Antisplice.Stereos,@@ -45,7 +45,7 @@   module Game.Antisplice.Events,   module Game.Antisplice.Paths,   module Game.Antisplice.Action,-  module Game.Antisplice.Utils.Hetero,+  module Data.Chatty.Hetero,   -- * Type abbreviations   Constructor) where @@ -58,12 +58,12 @@ import Game.Antisplice.Monad import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Monad.Vocab-import Game.Antisplice.Utils.Fail-import Game.Antisplice.Utils.Atoms-import Game.Antisplice.Utils.None-import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.Counter-import Game.Antisplice.Utils.Hetero+import Data.Chatty.Fail+import Data.Chatty.Atoms+import Data.Chatty.None+import Data.Chatty.BST+import Data.Chatty.Counter+import Data.Chatty.Hetero import Game.Antisplice.Rooms import Game.Antisplice.Stats import Game.Antisplice.Stereos@@ -79,4 +79,4 @@ import Control.Monad.Error.Class  -- | A dungeon constructor function-type Constructor a = forall m.(Functor m,ExtendedPrinter m,MonadExpand m,ExpanderEnv m,MonadAtoms m,MonadClock m,MonadVocab m,MonadError SplErr m,MonadDungeon m) => m a+type Constructor a = forall m.(Functor m,ChExtendedPrinter m,ChExpand m,ChExpanderEnv m,ChAtoms m,ChClock m,MonadVocab m,MonadError SplErr m,MonadDungeon m) => m a
src/Game/Antisplice/Action.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes, FlexibleContexts, LambdaCase, FlexibleInstances #-}+{-# LANGUAGE RankNTypes, FlexibleContexts, LambdaCase, FlexibleInstances, ConstraintKinds #-}  {-   This module is part of Antisplice.@@ -31,10 +31,10 @@ import Game.Antisplice.Rooms import Game.Antisplice.Errors import Game.Antisplice.Stats-import Game.Antisplice.Utils.Counter-import Game.Antisplice.Utils.None-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.BST+import Data.Chatty.Counter+import Data.Chatty.None+import Data.Chatty.AVL+import Data.Chatty.BST  -- | A typeclass for all action types carrying an execution condition. class IsAction a where@@ -210,7 +210,7 @@ dealDamageA m = Action (return Nothing) (dealDamage =<< m)  -- | Use for actions that require a cooldown time.-implyCooldownA :: MonadCounter m => Integer -> m Action+implyCooldownA :: ChCounter m => Integer -> m Action implyCooldownA ms = do   cid <- liftM CooldownId countOn   return (Action
src/Game/Antisplice/Call.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, RankNTypes, FlexibleContexts, LambdaCase, ScopedTypeVariables #-}+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, RankNTypes, FlexibleContexts, LambdaCase, ScopedTypeVariables, ConstraintKinds #-}  {-   This module is part of Antisplice.@@ -54,9 +54,9 @@ import Game.Antisplice.Errors import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Monad.Vocab-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.Hetero+import Data.Chatty.AVL+import Data.Chatty.BST+import Data.Chatty.Hetero  unint :: Monad m => String -> m (Either ReError a) unint = return . Left . Unint 0
src/Game/Antisplice/Errors.hs view
@@ -22,7 +22,7 @@ -- | Provides the error datatype for Antisplice module Game.Antisplice.Errors where -import Game.Antisplice.Utils.Fail+import Data.Chatty.Fail  -- | Antisplice errors data SplErr = UnknownError
src/Game/Antisplice/Events.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes, FlexibleContexts #-}+{-# LANGUAGE RankNTypes, FlexibleContexts, ConstraintKinds #-}  {-   This module is part of Antisplice.
src/Game/Antisplice/Lang.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE FlexibleContexts, RankNTypes, LambdaCase #-}+{-# LANGUAGE FlexibleContexts, RankNTypes, LambdaCase, ConstraintKinds	 #-}  {-   This module is part of Antisplice.@@ -32,13 +32,13 @@ import Game.Antisplice.Monad import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Monad.Vocab-import Game.Antisplice.Utils.Graph-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.TST-import Game.Antisplice.Utils.None-import Game.Antisplice.Utils.ListBuilder-import Game.Antisplice.Utils.Hetero+import Data.Chatty.Graph+import Data.Chatty.AVL+import Data.Chatty.BST+import Data.Chatty.TST+import Data.Chatty.None+import Data.Chatty.ListBuilder+import Data.Chatty.Hetero import Game.Antisplice.Rooms import Game.Antisplice.Stats import Game.Antisplice.Skills
src/Game/Antisplice/MaskedSkills.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE ExistentialQuantification, RankNTypes, FlexibleContexts, ScopedTypeVariables #-}+{-# LANGUAGE ExistentialQuantification, RankNTypes, FlexibleContexts, ScopedTypeVariables, ConstraintKinds #-}  {-   This module is part of Antisplice.@@ -27,8 +27,8 @@ import Data.Monoid import Game.Antisplice.Call import Game.Antisplice.Monad.Dungeon-import Game.Antisplice.Utils.None-import Game.Antisplice.Utils.Hetero+import Data.Chatty.None+import Data.Chatty.Hetero  -- | A special consumer whose conditions and actions rely on evaluation result masks data MaskedConsumer r = MasCon [PredMaskCond r] [PostMaskHandler r]
src/Game/Antisplice/Monad.hs view
@@ -25,14 +25,14 @@ module Game.Antisplice.Monad where  import Game.Antisplice.Templates-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.None-import Game.Antisplice.Utils.Fail-import Game.Antisplice.Utils.Counter+import Data.Chatty.AVL+import Data.Chatty.None+import Data.Chatty.Fail+import Data.Chatty.Counter import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Monad.Vocab-import Game.Antisplice.Utils.Atoms-import Game.Antisplice.Utils.BST+import Data.Chatty.Atoms+import Data.Chatty.BST import Game.Antisplice.Errors import Control.Monad import Control.Monad.Trans.Class@@ -61,7 +61,7 @@ liftM concat $ forM [''AnsiPrinterT,''HtmlPrinterT,''ExpanderT,''NullExpanderT,''RecorderT] $ \s ->   mkInteractor s (mkChannelPrinter ''PlayerId) mkDungeon mkPlayer mkRoom (mkFail ''SplErr) -instance ChannelPrinter PlayerId m => Broadcaster PlayerId (DungeonT m) where+instance ChChannelPrinter PlayerId m => ChBroadcaster PlayerId (DungeonT m) where   bprint c str = do     s <- getDungeonState     forM_ (anyBstInorder $ playersOf s) $ \p -> do
src/Game/Antisplice/Monad/Dungeon.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, RankNTypes, FlexibleContexts, TypeFamilies, DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, RankNTypes, FlexibleContexts, TypeFamilies, DeriveDataTypeable, ConstraintKinds #-}  {-   This module is part of Antisplice.@@ -86,16 +86,16 @@ import Text.Chatty.Extended.Printer import Text.Chatty.Channel.Printer import Text.Chatty.Channel.Broadcast-import Game.Antisplice.Utils.Graph-import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.Atoms+import Data.Chatty.Graph+import Data.Chatty.BST+import Data.Chatty.AVL+import Data.Chatty.Atoms import Game.Antisplice.Errors-import Game.Antisplice.Utils.Fail-import Game.Antisplice.Utils.Counter-import Game.Antisplice.Utils.None-import Game.Antisplice.Utils.Focus-import Game.Antisplice.Utils.Hetero+import Data.Chatty.Fail+import Data.Chatty.Counter+import Data.Chatty.None+import Data.Chatty.Focus+import Data.Chatty.Hetero import Game.Antisplice.Monad.Vocab import Control.Arrow import Control.Monad.Error@@ -106,10 +106,14 @@ import Data.Typeable import Debug.Trace --- | Matches any 'MonadDungeon' context-type DungeonM a = forall m.(MonadDungeon m,MonadError SplErr m,MonadVocab m) => m a--- | Matches any 'MonadDungeon' context that also implements most of the Chatty classes and some of our utility classes.-type ChattyDungeonM a = forall m.(Functor m,ExtendedPrinter m,MonadExpand m,ExpanderEnv m,MonadDungeon m,MonadError SplErr m,MonadAtoms m,MonadClock m,MonadVocab m,MonadRandom m,Broadcaster PlayerId m) => m a+-- | Matches any 'SomeDungeon' context+type DungeonM a = forall m.SomeDungeon m => m a+-- | Wrap up 'MonadDungeon', 'MonadError' 'SplErr' and 'MonadVocab' to a single constraint.+type SomeDungeon m = (MonadDungeon m,MonadError SplErr m,MonadVocab m)+-- | Matches any 'SomeChattyDungeon' context+type ChattyDungeonM a = forall m.SomeChattyDungeon m => m a+-- | Wrap up 'SomeDungeon', most Chatty classes and some utility classes to a single sonstraint.+type SomeChattyDungeon m = (Functor m,ChExtendedPrinter m,ChExpand m,ChExpanderEnv m,ChAtoms m,ChClock m,SomeDungeon m,ChRandom m,ChBroadcaster PlayerId m) -- | The common type of all event handlers. type Handler = ChattyDungeonM () -- | A boxed 'Handler' to avoid ImpredicativeTypes@@ -152,8 +156,6 @@   tuplify = id  instance Indexable EquipKey EquipKey EquipKey where-  type ValueOf EquipKey = EquipKey-  type IndexOf EquipKey = EquipKey   indexOf = id   valueOf = id @@ -250,8 +252,6 @@   tuplify = id  instance Indexable Feature Feature Feature where-  type IndexOf Feature = Feature-  type ValueOf Feature = Feature   indexOf = id   valueOf = id @@ -320,8 +320,6 @@   tuplify = id  instance Indexable ObjectState ObjectId ObjectState where-  type IndexOf ObjectState = ObjectId-  type ValueOf ObjectState = ObjectState   indexOf = objectIdOf   valueOf = id @@ -419,20 +417,14 @@   }  instance Indexable PlayerState PlayerId PlayerState where-  type IndexOf PlayerState = PlayerId-  type ValueOf PlayerState = PlayerState   indexOf = playerIdOf   valueOf = id  instance Indexable CooldownId CooldownId CooldownId where-  type IndexOf CooldownId = CooldownId-  type ValueOf CooldownId = CooldownId   indexOf = id   valueOf = id  instance Indexable Currency CurrencyId Currency where-  type IndexOf Currency = CurrencyId-  type ValueOf Currency = Currency   indexOf = currencyIdOf   valueOf = id 
src/Game/Antisplice/Monad/Vocab.hs view
@@ -29,8 +29,8 @@ import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Class-import Game.Antisplice.Utils.TST-import Game.Antisplice.Utils.Hetero+import Data.Chatty.TST+import Data.Chatty.Hetero  -- | Algebraic type for primitive and complex tokens. data Token = Unintellegible String
src/Game/Antisplice/Paths.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes, FlexibleContexts #-}+{-# LANGUAGE RankNTypes, FlexibleContexts, ConstraintKinds #-}  {-   This module is part of Antisplice.@@ -30,8 +30,8 @@ import Game.Antisplice.Action import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Rooms-import Game.Antisplice.Utils.Graph-import Game.Antisplice.Utils.None+import Data.Chatty.Graph+import Data.Chatty.None  -- | A one-way path from 'f' to 't'. unipath :: MonadDungeon m => NodeId -> NodeId -> Direction -> m ()
src/Game/Antisplice/Prototypes.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TupleSections, FlexibleContexts #-}+{-# LANGUAGE TupleSections, FlexibleContexts, ConstraintKinds #-}  {-   This module is part of Antisplice.@@ -29,13 +29,13 @@ import Text.Chatty.Extended.Printer import Control.Monad import Control.Monad.Error.Class+import Data.Chatty.Atoms+import Data.Chatty.Fail+import Data.Chatty.AVL+import Data.Chatty.Graph import Game.Antisplice.Monad import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Monad.Vocab-import Game.Antisplice.Utils.Atoms-import Game.Antisplice.Utils.Fail-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.Graph import Game.Antisplice.Rooms import Game.Antisplice.Events import Game.Antisplice.Errors@@ -45,7 +45,7 @@ import Data.List  -- | Construct a simple room from a title and a description.-ctorRoom :: MonadAtoms m => String -> String -> RoomT m ()+ctorRoom :: ChAtoms m => String -> String -> RoomT m () ctorRoom t d = do   setRoomTitle t   addRoomDesc d@@ -56,7 +56,7 @@     sequence_ $ avlInorder $ flip fmap (roomObjectsOf rs) $ \os -> objectTriggerOnAnnounceOf os  -- | Construct a sign from a text and some attributes.-ctorSign :: (MonadAtoms m,MonadVocab m,MonadError SplErr m) => String -> [String] -> ObjectT m ()+ctorSign :: (ChAtoms m,MonadVocab m,MonadError SplErr m) => String -> [String] -> ObjectT m () ctorSign t as = do   onRead $ enomaskLn (Vivid White) =<< expand =<< drunken t   lookCountA <- newAtom@@ -139,5 +139,5 @@   setObjectIsAcquirable True  -- | Add a room descriptor object to the current room-addRoomDesc :: MonadAtoms m => String -> RoomT m ObjectId+addRoomDesc :: ChAtoms m => String -> RoomT m ObjectId addRoomDesc = addRoomObject . addDescSeg
src/Game/Antisplice/Rooms.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes, FlexibleContexts #-}+{-# LANGUAGE RankNTypes, FlexibleContexts, ConstraintKinds #-}  {-   This module is part of Antisplice.@@ -110,12 +110,12 @@ import System.Chatty.Misc import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Monad-import Game.Antisplice.Utils.Graph-import Game.Antisplice.Utils.Counter-import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.Atoms-import Game.Antisplice.Utils.None+import Data.Chatty.Graph+import Data.Chatty.Counter+import Data.Chatty.BST+import Data.Chatty.AVL+import Data.Chatty.Atoms+import Data.Chatty.None import Game.Antisplice.Errors import Control.Arrow import Control.Monad@@ -135,7 +135,7 @@   putRoomState (f s)  -- | Get the current room's description-getRoomDesc :: (MonadRoom m,MonadAtoms m) => m String+getRoomDesc :: (MonadRoom m,ChAtoms m) => m String getRoomDesc = do   s <- getRoomState   --return (fromText $ roomDescOf s)@@ -244,7 +244,7 @@                 Nothing -> throwError CantWalkThereError  -- | Add a new object to the current room. It is contructed using the object monad.-addRoomObject :: (MonadCounter m,MonadRoom m) => ObjectT m a -> m ObjectId+addRoomObject :: (ChCounter m,MonadRoom m) => ObjectT m a -> m ObjectId addRoomObject m = do   i <- liftM ObjectId countOn   k <- liftM KindId countOn@@ -347,7 +347,7 @@ addObjectAttr t = modifyObjectState $ \s -> s{objectAttributesOf=t:objectAttributesOf s}  -- | Create a new player using the player monad-subscribePlayer :: (MonadDungeon m,MonadCounter m) => PlayerT m a -> m ()+subscribePlayer :: (MonadDungeon m,ChCounter m) => PlayerT m a -> m () subscribePlayer m = do   s <- getDungeonState   i <- liftM PlayerId countOn@@ -374,7 +374,7 @@ setObjectKind k = modifyObjectState $ \o -> o{objectKindOf=k}  -- | Register an object kind.-registerKind :: MonadCounter m => m KindId+registerKind :: ChCounter m => m KindId registerKind = liftM KindId countOn  -- | Check if the current object is acquirable.@@ -388,7 +388,7 @@         a False = avlRemove Acquirable  -- | Schedule an event for a given time offset (in milliseconds).-schedule :: (MonadDungeon m,MonadClock m) => Integer -> Handler -> m ()+schedule :: (MonadDungeon m,ChClock m) => Integer -> Handler -> m () schedule ms t = do   now <- mgetstamp   let t' = now + (realToFrac ms / 1000)@@ -491,14 +491,14 @@ addFeature f = modifyObjectState $ \s -> s{objectFeaturesOf=avlInsert f $ objectFeaturesOf s}  -- | Add a room description segment to the current object-addDescSeg :: (MonadObject m,MonadAtoms m) => String -> m ()+addDescSeg :: (MonadObject m,ChAtoms m) => String -> m () addDescSeg s = do   a <- newAtom   putAtom a s   addFeature $ Described a  -- | Register an object form and return its atom-registerForm :: (MonadAtoms m) => ObjectT m () -> m (Atom ObjectState)+registerForm :: (ChAtoms m) => ObjectT m () -> m (Atom ObjectState) registerForm m = do   a <- newAtom   k <- liftM KindId countOn@@ -507,7 +507,7 @@   return a  -- | Instanciate a registered form-instanciateForm :: (MonadAtoms m,MonadRoom m,MonadCounter m) => Atom ObjectState -> m ObjectId+instanciateForm :: (ChAtoms m,MonadRoom m) => Atom ObjectState -> m ObjectId instanciateForm a = do   i <- countOn   o <- getAtom a@@ -566,7 +566,7 @@   in p{playerCurrenciesOf=avlInsert (c,f c1) $ playerCurrenciesOf p}  -- | Register a currency-registerCurrency :: (MonadCounter m,MonadDungeon m) => String -> String -> m CurrencyId+registerCurrency :: (ChCounter m,MonadDungeon m) => String -> String -> m CurrencyId registerCurrency n d = do   s <- getDungeonState   i <- liftM CurrencyId countOn@@ -634,10 +634,10 @@   o <- liftM playerOpponentOf getPlayerState   damage (TargetObject o) r   -instance (Functor m,MonadExpand m) => MonadExpand (DungeonT m) where+instance (Functor m,ChExpand m) => ChExpand (DungeonT m) where   expand = lift . expand <=< liftM (replay.snd) . runRecorderT . expandDun -expandDun :: (MonadPrinter m,MonadDungeon m) => String -> m ()+expandDun :: (ChPrinter m,MonadDungeon m) => String -> m () expandDun [] = return () expandDun ('\\':'#':ss) = do   mprint "#"@@ -675,7 +675,7 @@       strfun (Just "capital") (s:ss) = toUpper s : ss       strfun Nothing s = s       strfun _ _ = ""-      replace :: (MonadPrinter m,MonadDungeon m) => String -> Maybe Int -> Maybe Int -> Maybe String -> m ()+      replace :: (ChPrinter m,MonadDungeon m) => String -> Maybe Int -> Maybe Int -> Maybe String -> m ()       replace "health" d m f = liftM (prnum d m . numfun f . joinMaybe . avlLookup Health . playerCurrenciesOf) getPlayerState >>= mprint       replace "ohealth" d m f = do         i <- liftM playerOpponentOf getPlayerState@@ -711,7 +711,7 @@   expandDun ss  -- | Consider the player's alcohol rate and mask the string with random underscores.-drunken :: (MonadRandom m,MonadPlayer m) => String -> m String+drunken :: (ChRandom m,MonadPlayer m) => String -> m String drunken [] = return [] drunken ('}':cs) = do   cx <- drunken cs@@ -730,7 +730,7 @@   return $ if r < p then '_' : cx else c : cx  -- | Consume alcohol.-consumeAlcohol :: (MonadPrinter m,MonadRandom m,MonadPlayer m,MonadDungeon m,MonadClock m) => Int -> m ()+consumeAlcohol :: (ChPrinter m,ChRandom m,MonadPlayer m,MonadDungeon m,ChClock m) => Int -> m () consumeAlcohol r = do   modifyPlayerState $ \p -> p{playerAlcoholOf=r+playerAlcoholOf p}   p <- getPlayerState
src/Game/Antisplice/SingleUser.hs view
@@ -32,10 +32,10 @@ import Text.Chatty.Channel.Printer import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Monad.Vocab-import Game.Antisplice.Utils.Fail-import Game.Antisplice.Utils.Counter-import Game.Antisplice.Utils.Atoms-import Game.Antisplice.Utils.None+import Data.Chatty.Fail+import Data.Chatty.Counter+import Data.Chatty.Atoms+import Data.Chatty.None import Game.Antisplice.Errors import Game.Antisplice.Monad import Game.Antisplice.Rooms
src/Game/Antisplice/Skills.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes, FlexibleContexts, FlexibleInstances, RecordWildCards, LambdaCase #-}+{-# LANGUAGE RankNTypes, FlexibleContexts, FlexibleInstances, RecordWildCards, LambdaCase, ConstraintKinds #-}  {-   This module is part of Antisplice.@@ -63,10 +63,10 @@ import Game.Antisplice.Monad.Vocab import Game.Antisplice.Rooms import Game.Antisplice.Stats-import Game.Antisplice.Utils.None-import Game.Antisplice.Utils.Counter-import Game.Antisplice.Utils.Atoms-import Game.Antisplice.Utils.Hetero+import Data.Chatty.None+import Data.Chatty.Counter+import Data.Chatty.Atoms+import Data.Chatty.Hetero import Game.Antisplice.MaskedSkills  -- | A wrapper type for skill execution preconditions.
src/Game/Antisplice/Stats.hs view
@@ -29,9 +29,9 @@ import Data.Monoid import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Rooms-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.Atoms-import Game.Antisplice.Utils.None+import Data.Chatty.AVL+import Data.Chatty.Atoms+import Data.Chatty.None import Text.Chatty.Printer  -- | Typeclass for every pure data that saves stats@@ -59,7 +59,7 @@   getStatM k = (return . getStat k) =<< getPlayerState  -- | Calculates the stats of the objects the player carries-calcStat :: (MonadPlayer m,MonadAtoms m,MonadRoom m) => StatKey -> m Int+calcStat :: (MonadPlayer m,ChAtoms m,MonadRoom m) => StatKey -> m Int calcStat k = do   p <- getPlayerState   let ss k = getStat k p@@ -67,7 +67,7 @@   return $ stereoCalcStatBonus stes ss k + ss k  -- | Calculates the total stereotype the player carries-totalStereo :: (MonadAtoms m,MonadPlayer m,MonadRoom m) => m PlayerStereo+totalStereo :: (ChAtoms m,MonadPlayer m,MonadRoom m) => m PlayerStereo totalStereo = do   p <- getPlayerState   r <- getRoomState
src/Game/Antisplice/Stereos.hs view
@@ -62,14 +62,14 @@ import Game.Antisplice.Skills import Game.Antisplice.Stats import Game.Antisplice.Templates-import Game.Antisplice.Utils.Atoms-import Game.Antisplice.Utils.None-import Game.Antisplice.Utils.Hetero+import Data.Chatty.Atoms+import Data.Chatty.None+import Data.Chatty.Hetero import Text.Chatty.Interactor.Templates import System.IO  -- | Register the given stereotype and return its atom.-registerStereo :: MonadAtoms m => PlayerStereo -> m (Atom PlayerStereo)+registerStereo :: ChAtoms m => PlayerStereo -> m (Atom PlayerStereo) registerStereo s = do   a <- newAtom   putAtom a s@@ -155,7 +155,7 @@   mergeRecipe rp  -- | Process the builder chain and register the resulting stereotype-registerStereoM :: MonadAtoms m => StereoBuilderT m () -> m (Atom PlayerStereo)+registerStereoM :: ChAtoms m => StereoBuilderT m () -> m (Atom PlayerStereo) registerStereoM m = do   (_,s) <- runStereoBuilderT m none   registerStereo s
src/Game/Antisplice/Templates.hs view
@@ -28,12 +28,11 @@ import Text.Chatty.Templates import Text.Chatty.Channel.Printer import Text.Chatty.Channel.Broadcast-import Game.Antisplice.Utils.Fail-import Game.Antisplice.Utils.Run-import Game.Antisplice.Utils.Counter+import Data.Chatty.Fail+import Data.Chatty.Counter import Game.Antisplice.Monad.Dungeon import Game.Antisplice.Monad.Vocab-import Game.Antisplice.Utils.Atoms+import Data.Chatty.Atoms import Control.Monad.Error.Class import Control.Monad.Trans.Class import Control.Monad.State.Class@@ -63,14 +62,14 @@     instance MonadDungeon m => MonadDungeon ($sx m) where       getDungeonState = lift getDungeonState       putDungeonState = lift . putDungeonState-    instance (MonadDungeon m,ChannelPrinter PlayerId m) => Broadcaster PlayerId ($sx m) where+    instance (MonadDungeon m,ChChannelPrinter PlayerId m) => ChBroadcaster PlayerId ($sx m) where       bprint c = lowerDungeon . bprint (lift . c)   |]   where sx = strToType s  -- | Automatically derive an instance for 'MonadCounter' mkCounter s = [d|-    instance MonadCounter m => MonadCounter ($sx m) where+    instance ChCounter m => ChCounter ($sx m) where       countOn = lift countOn   |]   where sx = strToType s@@ -109,7 +108,7 @@  -- | Automatically derive an instance for 'MonadAtoms' mkAtoms s = [d|-    instance MonadAtoms m => MonadAtoms ($sx m) where+    instance ChAtoms m => ChAtoms ($sx m) where       newAtom = lift newAtom       putAtom k = lift . putAtom k       getAtom = lift . getAtom
src/Game/Antisplice/Terminal/Repl.hs view
@@ -38,11 +38,11 @@ import Game.Antisplice.Monad import Game.Antisplice.Errors import Game.Antisplice.Lang-import Game.Antisplice.Utils.Fail-import Game.Antisplice.Utils.Counter-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.Atoms+import Data.Chatty.Fail+import Data.Chatty.Counter+import Data.Chatty.AVL+import Data.Chatty.BST+import Data.Chatty.Atoms import Control.Monad import Control.Concurrent import Control.Concurrent.MVar@@ -53,7 +53,7 @@ import System.Console.Haskeline.History  -- | Read Eval Print Loop for Antisplice.-repl :: (ExtendedPrinter m,MonadScanner m,MonadError SplErr m,MonadIO m,MonadExpand m,ExpanderEnv m,MonadDungeon m,MonadAtoms m,MonadRoom m,MonadClock m,MonadVocab m,HistoryEnv m,MonadRandom m,Broadcaster PlayerId m) => m ()+repl :: (ChExtendedPrinter m,ChScanner m,MonadError SplErr m,MonadIO m,ChExpand m,ChExpanderEnv m,MonadDungeon m,ChAtoms m,MonadRoom m,ChClock m,MonadVocab m,ChHistoryEnv m,ChRandom m,ChBroadcaster PlayerId m) => m () repl = do   mv <- liftIO (newEmptyMVar :: IO (MVar (Maybe String)))   cont <- liftIO (newEmptyMVar :: IO (MVar String))
− src/Game/Antisplice/Utils/AVL.hs
@@ -1,170 +0,0 @@-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}--{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides an AVL tree.-module Game.Antisplice.Utils.AVL (avlMax,avlMin,avlLookup,avlHeight,avlSize,avlInsert,avlRemove,AVL (EmptyAVL,AVL),avlRoot,avlPreorder,avlPostorder,avlInorder) where--import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.None--instance Indexable i o v => AnyBST AVL i o v where-  anyBstMax = avlMax-  anyBstMin = avlMin-  anyBstLookup = avlLookup-  anyBstEmpty = EmptyAVL-  anyBstInsert = avlInsert-  anyBstRemove = avlRemove-  anyBstHead = avlHead-  anyBstInorder = avlInorder--instance None (AVL a) where-  none = EmptyAVL---- | An AVL tree.-data AVL a = EmptyAVL | AVL a Int Int !(AVL a) !(AVL a)---- | Get the greatest element.-avlMax :: AVL i -> Maybe i-avlMax EmptyAVL = Nothing-avlMax (AVL a _ _ _ EmptyAVL) = Just a-avlMax (AVL _ _ _ _ r) = avlMax r---- | Get the least element.-avlMin :: AVL i -> Maybe i-avlMin EmptyAVL = Nothing-avlMin (AVL a _ _ EmptyAVL _) = Just a-avlMin (AVL _ _ _ l _) = avlMin l---- | Lookup a given key.-avlLookup :: Indexable i o v => o -> AVL i -> Maybe v-avlLookup _ EmptyAVL = Nothing-avlLookup o (AVL a _ _ l r)-  | o == indexOf a = Just $ valueOf a-  | o < indexOf a = avlLookup o l-  | o > indexOf a = avlLookup o r---- | Get the height of the tree.-avlHeight :: AVL i -> Int-avlHeight EmptyAVL = 0-avlHeight (AVL _ _ h _ _) = h---- | Get the size of the tree.-avlSize :: AVL i -> Int-avlSize EmptyAVL = 0-avlSize (AVL _ s _ _ _) = s--avlBalance :: AVL i -> AVL i-avlBalance EmptyAVL = EmptyAVL-avlBalance t@(AVL a _ _ l r)-  | abs (avlHeight l - avlHeight r) < 2 = t-  | avlHeight l < avlHeight r = case r of-    AVL a1 _ _ l1 r1 ->-      let child = AVL a (findSize l l1) (findHeight l l1) l l1-      in AVL a1 (findSize child r1) (findHeight child r1) child r1-  | otherwise = case l of-    AVL a1 _ _ l1 r1 ->-      let child = AVL a (findSize r1 r) (findHeight r1 r) r1 r-      in AVL a1 (findSize l1 child) (findHeight l1 child) l1 child--findSize :: AVL i -> AVL i -> Int-findSize a b = 1 + avlSize a + avlSize b--findHeight :: AVL i -> AVL i -> Int-findHeight a b = 1 + max (avlHeight a) (avlHeight b)---- | Insert into the tree.-avlInsert :: Indexable i o v => i -> AVL i -> AVL i-avlInsert a EmptyAVL = AVL a 1 1 EmptyAVL EmptyAVL-avlInsert a (AVL a1 s h l r)-  | indexOf a == indexOf a1 = AVL a s h l r-  | indexOf a < indexOf a1 =-    let l' = avlInsert a l-    in avlBalance $ AVL a1 (s+1) (findHeight l' r) l' r-  | otherwise =-    let r' = avlInsert a r-    in avlBalance $ AVL a1 (s+1) (findHeight l r') l r' ---- | Remove from the tree.-avlRemove :: Indexable i o v => o -> AVL i -> AVL i-avlRemove _ EmptyAVL = EmptyAVL-avlRemove o t@(AVL a _ _ EmptyAVL EmptyAVL)-  | indexOf a == o = EmptyAVL-  | otherwise = t-avlRemove o t@(AVL a _ _ l r)-  | indexOf a == o =-    case t of-      AVL _ _ _ EmptyAVL _ -> case getLeft r of-        (Just a',r') -> avlBalance $ AVL a' (findSize EmptyAVL r') (findHeight EmptyAVL r') EmptyAVL r'-      _ -> case getRight l of-        (Just a',l') -> avlBalance $ AVL a' (findSize l' r) (findHeight l' r) l' r-  | o < indexOf a =-    let l' = avlRemove o l-    in avlBalance $ AVL a (findSize l' r) (findHeight l' r) l' r-  | otherwise =-    let r' = avlRemove o r-    in avlBalance $ AVL a (findSize l r') (findHeight l r') l r'--getLeft :: AVL i -> (Maybe i,AVL i)-getLeft EmptyAVL = (Nothing,EmptyAVL)-getLeft (AVL a _ _ EmptyAVL EmptyAVL) = (Just a,EmptyAVL)-getLeft (AVL a _ _ EmptyAVL r) = (Just a,r)-getLeft (AVL a _ _ l r) =-  case getLeft l of-    (p, t2) -> (p, AVL a (findSize r t2) (findHeight r t2) t2 r)--getRight :: AVL i -> (Maybe i,AVL i)-getRight EmptyAVL = (Nothing,EmptyAVL)-getRight (AVL a _ _ EmptyAVL EmptyAVL) = (Just a,EmptyAVL)-getRight (AVL a _ _ l EmptyAVL) = (Just a,l)-getRight (AVL a _ _ l r) =-  case getRight r of-    (p, t2) -> (p, AVL a (findSize l t2) (findHeight l t2) l t2)--instance Functor AVL where-  fmap _ EmptyAVL = EmptyAVL-  fmap f (AVL a s h l r) = AVL (f a) s h (fmap f l) (fmap f r)---- | Get the root of the tree.-avlRoot :: AVL i -> i-avlRoot EmptyAVL = error "Trying to get the root of an empty AVL tree."-avlRoot (AVL a _ _ _ _) = a---- | Get the root of the tree (safely)-avlHead :: AVL i -> Maybe i-avlHead EmptyAVL = Nothing-avlHead t = Just $ avlRoot t---- | Traverse the tree, order (head, left, right)-avlPreorder :: AVL i -> [i]-avlPreorder EmptyAVL = []-avlPreorder (AVL a _ _ l r) = a : avlPreorder l ++ avlPreorder r---- | Traverse the tree, order (left, right, head)-avlPostorder :: AVL i -> [i]-avlPostorder EmptyAVL = []-avlPostorder (AVL a _ _ l r) = avlPostorder l ++ avlPostorder r ++ [a]---- | Traverse the tree, order (left, head, right)-avlInorder :: AVL i -> [i]-avlInorder EmptyAVL = []-avlInorder (AVL a _ _ l r) = avlInorder l ++ [a] ++ avlInorder r
− src/Game/Antisplice/Utils/Atoms.hs
@@ -1,104 +0,0 @@-{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides a variable-storing monad and functions for access (they almost form an arrow)-module Game.Antisplice.Utils.Atoms where--import Control.Arrow-import qualified Control.Category as C-import Control.Monad-import Control.Monad.Trans.Class-import Control.Monad.IO.Class-import Data.Dynamic-import Data.Typeable-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.Counter---- | Phantom type for atom IDs-newtype Atom a = Atom Int deriving (Ord,Eq)---- | The storage monad-newtype AtomStoreT m a = AtomStore { runAtomStoreT :: AVL (Int,Dynamic) -> m (a,AVL (Int,Dynamic)) }--instance Functor m => Functor (AtomStoreT m) where-  fmap f a = AtomStore $ \s -> fmap (first f) $ runAtomStoreT a s--instance Monad m => Monad (AtomStoreT m) where-  return a = AtomStore $ \s -> return (a,s)-  m >>= f = AtomStore $ \s -> do (a,s') <- runAtomStoreT m s; runAtomStoreT (f a) s'--instance MonadTrans AtomStoreT where-  lift m = AtomStore $ \s -> do a <- m; return (a,s)--instance MonadIO m => MonadIO (AtomStoreT m) where-  liftIO = lift . liftIO--instance MonadCounter m => MonadCounter (AtomStoreT m) where-  countOn = lift countOn---- | Typeclass for all atom-storing monads.-class MonadCounter m => MonadAtoms m where-  -- | Reserve a new atom.-  newAtom :: Typeable v => m (Atom v)-  -- | Save a value for the given atom.-  putAtom :: Typeable v => Atom v -> v -> m ()-  -- | Get the value from a given atom.-  getAtom :: Typeable v => Atom v -> m v-  -- | Dispose the given atom.-  dispAtom :: Atom v -> m ()-  -- | Clone the given atom.-  cloneAtom :: Typeable v => Atom v -> m (Atom v)-  cloneAtom a = do-    b <- newAtom-    v <- getAtom a-    putAtom b v-    return b--instance (Functor m,MonadCounter m) => MonadAtoms (AtomStoreT m) where-  newAtom = fmap Atom $ lift countOn-  putAtom (Atom a) v = AtomStore $ \s -> return ((),avlInsert (a,toDyn v) s)-  getAtom (Atom a) = AtomStore $ \s -> let Just v = avlLookup a s in return (fromDyn v undefined,s)-  dispAtom (Atom a) = AtomStore $ \s -> return ((),avlRemove a s)---- | Atomar operation (almost arrow)-newtype (Typeable a,Typeable b) => Atomar m a b = Atomar { runAtomar :: Atom a -> m (Atom b) }--{-instance MonadAtoms m => C.Category (Atomar m) where-  id = Atomar return-  a . b = Atomar (runAtomar a <=< runAtomar b)--instance MonadAtoms m => Arrow (Atomar m) where-  arr = Atomar . mapAtom-  first f = Atomar $ \a -> do-    b <- cloneAtom a-    b' <- mapAtom fst b-    c <- runAtomar f b'-    v <- getAtom c-    mapAtom (first $ const v) a-    dispAtom c-}---- | Run a pure function on atoms.-mapAtom :: (Typeable a, Typeable b, MonadAtoms m) => (a -> b) -> Atom a -> m (Atom b)-mapAtom f (Atom a) = do-  v <- getAtom (Atom a)-  putAtom (Atom a) $ f v-  return (Atom a)-
− src/Game/Antisplice/Utils/BST.hs
@@ -1,155 +0,0 @@-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FunctionalDependencies, TypeFamilies #-}--{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides a typeclass for all binary search trees and an unbalanced implementation-module Game.Antisplice.Utils.BST where--import Game.Antisplice.Utils.None---- | Only instances of Indexable may be saved in a BST-class Ord o => Indexable i o v | i -> o, i -> v where-  type IndexOf i-  type ValueOf i-  -- | Extract the index-  indexOf :: i -> o-  -- | Extract the value-  valueOf :: i -> v--instance Indexable Int Int Int where-  type IndexOf Int = Int-  type ValueOf Int = Int-  indexOf = id-  valueOf = id--instance Ord o => Indexable (o,a) o a where-  type IndexOf (o,a) = o-  type ValueOf (o,a) = a-  indexOf = fst-  valueOf = snd--instance Ord o => Indexable (o,a,b) o (a,b) where-  type IndexOf (o,a,b) = o-  type ValueOf (o,a,b) = (a,b)-  indexOf (o,_,_) = o-  valueOf (_,a,b) = (a,b)--instance Ord o => Indexable (o,a,b,c) o (a,b,c) where-  type IndexOf (o,a,b,c) = o-  type ValueOf (o,a,b,c) = (a,b,c)-  indexOf (o,_,_,_) = o-  valueOf (_,a,b,c) = (a,b,c)--instance Ord o => Indexable (o,a,b,c,d) o (a,b,c,d) where-  type IndexOf (o,a,b,c,d) = o-  type ValueOf (o,a,b,c,d) = (a,b,c,d)-  indexOf (o,_,_,_,_) = o-  valueOf (_,a,b,c,d) = (a,b,c,d)--instance Ord o => Indexable (o,a,b,c,d,e) o (a,b,c,d,e) where-  type IndexOf (o,a,b,c,d,e) = o-  type ValueOf (o,a,b,c,d,e) = (a,b,c,d,e)-  indexOf (o,a,b,c,d,e) = o-  valueOf (o,a,b,c,d,e) = (a,b,c,d,e)---- | Typeclass for all BSTs that store the given Indexable-class Indexable i o v => AnyBST t i o v where-  -- | Insert into the tree-  anyBstInsert :: i -> t i -> t i-  -- | Remove from the tree-  anyBstRemove :: o -> t i -> t i-  -- | Get the greatest element-  anyBstMax :: t i -> Maybe i-  -- | Get the least element-  anyBstMin :: t i -> Maybe i-  -- | Lookup a given key-  anyBstLookup :: o -> t i -> Maybe v-  -- | An empty tree-  anyBstEmpty :: t i-  -- | The root of the tree-  anyBstHead :: t i -> Maybe i-  -- | Traverse the tree in order-  anyBstInorder :: t i -> [i]--instance Indexable i o v => AnyBST BST i o v where-  anyBstInsert = bstInsert-  anyBstRemove = bstRemove-  anyBstMax = bstMax-  anyBstMin =  bstMin-  anyBstLookup = bstLookup-  anyBstEmpty = EmptyBST-  anyBstHead = bstHead-  anyBstInorder = bstInorder--instance None (BST a) where-  none = EmptyBST---- | An unbalanced binary search tree-data BST a = EmptyBST | BST a !(BST a) !(BST a)---- | Insert into the BST-bstInsert :: Indexable i o v => i -> BST i -> BST i-bstInsert i EmptyBST = BST i EmptyBST EmptyBST-bstInsert i (BST a l r)-  | indexOf i < indexOf a = BST a (bstInsert i l) r-  | indexOf i > indexOf a = BST a l (bstInsert i r)-  | otherwise = BST i l r---- | Remove from the BST-bstRemove :: Indexable i o v => o -> BST i -> BST i-bstRemove o EmptyBST = EmptyBST-bstRemove o (BST a EmptyBST r) | indexOf a == o = r-bstRemove o (BST a l EmptyBST) | indexOf a == o = l-bstRemove o (BST a l r)-  | indexOf a < o = BST a (bstRemove o l) r-  | indexOf a > o = BST a l (bstRemove o r)-  | otherwise = let (Just m) = bstMax l in BST m (bstRemove (indexOf m) l) r---- | Get the greatest element-bstMax :: BST i -> Maybe i-bstMax EmptyBST = Nothing-bstMax (BST a _ EmptyBST) = Just a-bstMax (BST _ _ r) = bstMax r---- | Get the least element-bstMin :: BST i -> Maybe i-bstMin EmptyBST = Nothing-bstMin (BST a EmptyBST _) = Just a-bstMin (BST _ l _) = bstMin l---- | Lookup a given key-bstLookup :: Indexable i o v => o -> BST i -> Maybe v-bstLookup _ EmptyBST = Nothing-bstLookup o (BST a l r)-  | o == indexOf a = Just $ valueOf a-  | o < indexOf a = bstLookup o l-  | o > indexOf a = bstLookup o r---- | Return the tree's root-bstHead :: Indexable i o v => BST i -> Maybe i-bstHead EmptyBST = Nothing-bstHead (BST a _ _) = Just a---- | Traverse the tree in order-bstInorder :: Indexable i o v => BST i -> [i]-bstInorder EmptyBST = []-bstInorder (BST a l r) = bstInorder l ++ [a] ++ bstInorder r
− src/Game/Antisplice/Utils/Counter.hs
@@ -1,52 +0,0 @@-{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides a counter monad.-module Game.Antisplice.Utils.Counter where--import Control.Arrow-import Control.Monad-import Control.Monad.Trans.Class---- | A counter monad.-newtype CounterT m a = Counter { runCounterT :: Int -> m (a,Int) }--instance Functor m => Functor (CounterT m) where-  fmap f a = Counter $ \s -> fmap (first f) $ runCounterT a s--instance Monad m => Monad (CounterT m) where-  return a = Counter $ \s -> return (a,s)-  m >>= f = Counter $ \s -> do (a,s') <- runCounterT m s; runCounterT (f a) s'--instance MonadTrans CounterT where-  lift m = Counter $ \s -> do a <- m; return (a,s)---- | Typeclass for all counter monads.-class Monad m => MonadCounter m where-  -- | Tell the current number and increment it-  countOn :: m Int--instance Monad m => MonadCounter (CounterT m) where-  countOn = Counter $ \s -> return (s,s+1)---- | Run the given function inside a counter-withCounter :: (Monad m,Functor m) => CounterT m a -> m a-withCounter m = fmap fst $ runCounterT m 0
− src/Game/Antisplice/Utils/Fail.hs
@@ -1,62 +0,0 @@-{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}--{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides a monad for error handling. Okay, I confess it's equal to ErrorT...-module Game.Antisplice.Utils.Fail where--import Control.Monad-import Control.Monad.Identity-import Control.Monad.Error.Class-import Control.Monad.Trans.Class---- | The error handling monad.-newtype FailT e m a = Fail { runFailT :: m (Either e a) }-type Fail e = FailT e Identity--instance Monad m => Functor (FailT e m) where-  fmap f a = Fail $ do-     v <- runFailT a-     case v of-       Left e -> return $ Left e-       Right x -> return $ Right (f x)--instance Monad m => Monad (FailT e m) where-  return a = Fail $ return $ Right a-  m >>= f = Fail $ do-    v <- runFailT m-    case v of-      Left e -> return $ Left e-      Right x -> runFailT $ f x--instance MonadTrans (FailT e) where-  lift m = Fail $ do-    a <- m-    return $ Right a--instance Monad m => MonadError e (FailT e m) where-  throwError e = Fail $ return $ Left e-  catchError m h = Fail $ do-    v <- runFailT m-    case v of-      Left e -> runFailT $ h e-      Right x -> return v
− src/Game/Antisplice/Utils/Focus.hs
@@ -1,62 +0,0 @@-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FunctionalDependencies, TypeFamilies #-}--{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides an unbalanced BST with a focus on the root.-module Game.Antisplice.Utils.Focus (Focus, focusSelect) where--import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.None---- | An unbalanced BST with a focus on the root.-newtype Focus a = Focus { runFocus :: BST a }--instance None (Focus a) where-  none = Focus none--instance Indexable i o v => AnyBST Focus i o v where-  anyBstInsert i t = Focus $ bstInsert i $ runFocus t-  anyBstRemove o t = Focus $ bstRemove o $ runFocus t-  anyBstMax t = bstMax $ runFocus t-  anyBstMin t = bstMin $ runFocus t-  anyBstLookup o t = bstLookup o $ runFocus t-  anyBstHead t = bstHead $ runFocus t-  anyBstEmpty = Focus none-  anyBstInorder t = bstInorder $ runFocus t--focusSelect' :: Indexable i o v => o -> BST i -> Maybe (BST i)-focusSelect' _ EmptyBST = Nothing-focusSelect' o t@(BST a l r)-  | o == indexOf a = Just t-  | o < indexOf a = case focusSelect' o l of-      Just (BST a' l' r') -> Just $ BST a' l' (BST a r' r)-      Nothing -> Nothing-  | otherwise = case focusSelect' o r of-      Nothing -> Nothing-      Just (BST a' l' r') -> Just $ BST a' (BST a l l') r'--focusInsert' :: Indexable i o v => i -> BST i -> BST i-focusInsert' i = unjust . focusSelect' (indexOf i) . bstInsert i-  where unjust (Just j) = j---- | Rotate the tree such that the given element becomes the root node.-focusSelect o t = fmap Focus $ focusSelect' o $ runFocus t
− src/Game/Antisplice/Utils/Graph.hs
@@ -1,152 +0,0 @@-{-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-}--{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides a general graph.-module Game.Antisplice.Utils.Graph where--import Game.Antisplice.Utils.BST-import Game.Antisplice.Utils.AVL-import Game.Antisplice.Utils.None---- | Phantom type for a node ID-newtype NodeId = NodeId Int deriving (Eq,Show,Ord)---- | A general graph-data Graph a b c = Graph { nodes :: AVL (Node a), edges :: [Edge b c], nextId :: NodeId }---- | A node for the graph-data Node a = Node { nodeMarked :: Bool, nodeContent :: a, nodeId :: NodeId }---- | An edge for the graph-data Edge b c = Edge { fromNode :: NodeId, toNode :: NodeId, weight :: Int, label :: b, content :: c }--instance Indexable (Node a) NodeId (Node a) where-  type IndexOf (Node a) = NodeId-  type ValueOf (Node a) = Node a  -  indexOf = nodeId-  valueOf = id----instance (Show a,Show b) => Show (Graph a b) where---  show (Graph ns es _) = unlines (map show (reverse ns) ++ map show es)-  -instance (Show a) => Show (Node a) where-  show (Node _ c i) = concat [show i, ": ", show c]--instance (Show b) => Show (Edge b c) where-  show (Edge f t w l _) = concat [show f, " --", show l, "-> ", show t, " [", show w, "]"]---- | Increment a NodeId-incId :: NodeId -> NodeId-incId (NodeId i) = NodeId (i+1)---- | An empty graph-emptyGraph :: Graph a b c-emptyGraph = Graph EmptyAVL [] (NodeId 0)--instance None (Graph a b c) where-  none = emptyGraph---- | Add a node to the graph-addNode :: a -> Graph a b c -> Graph a b c-addNode x = snd . addNode' x---- | Add a node to the graph and also return its ID-addNode' :: a -> Graph a b c -> (NodeId,Graph a b c)-addNode' x (Graph ns es nid) = (nid, Graph (avlInsert (Node False x nid) ns) es (incId nid))---- | Add a bunch of nodes-addNodes :: [a] -> Graph a b c -> Graph a b c-addNodes xs = snd . addNodes' xs---- | Add a bunch of nodes and also return their IDs-addNodes' :: [a] -> Graph a b c -> ([NodeId],Graph a b c)-addNodes' [] g = ([],g)-addNodes' (p:ps) g = let (ls, g'') = addNodes' ps g'-                         (l, g') = addNode' p g-                     in (l:ls, g'')---- | Return all nodes-allNodes :: Graph a b c -> [Node a]-allNodes = avlInorder . nodes---- | Return the node in the AVL tree's root-rootNode :: Graph a b c -> NodeId-rootNode = nodeId . avlRoot . nodes---- | Add a unidirectional edge to the graph (provide both nodes, a weight and a label)-addEdge :: NodeId -> NodeId -> Int -> b -> c -> Graph a b c -> Graph a b c-addEdge f t w l c = addEdge' (Edge f t w l c)---- | Add a unidirectional edge to the graph (provide the 'Edge')-addEdge' :: Edge b c -> Graph a b c -> Graph a b c-addEdge' e g = g{edges=e:edges g}---- | Add a bidirectional edge to the graph (provide both nodes, a weight and a label)-addMutualEdge :: NodeId -> NodeId -> Int -> b -> c -> Graph a b c -> Graph a b c-addMutualEdge f t w l c = addEdge f t w l c . addEdge t f w l c---- | Add a bunch of edges unidirectionally (provide both nodes, a weight and a label)-addEdges :: [(NodeId,NodeId,Int,b,c)] -> Graph a b c -> Graph a b c-addEdges es g = foldr (addEdge' . (\(f,t,w,l,c) -> Edge f t w l c)) g es---- | Add a bunch of edges unidirectionally (provide the 'Edge's)-addEdges' :: [Edge b c] -> Graph a b c -> Graph a b c-addEdges' = flip $ foldr addEdge'---- | Add a bunch of edges bidirectionally (provide both nodes, a weight and a label)-addMutualEdges :: [(NodeId,NodeId,Int,b,c)] -> Graph a b c -> Graph a b c-addMutualEdges es = addEdges es . addEdges (map (\(f,t,w,l,c) -> (t,f,w,l,c)) es)---- | Get the node's content from its ID-getNode :: NodeId -> Graph a b c -> a-getNode n = nodeContent . getNode' n---- | Get the 'Node' object from its ID-getNode' :: NodeId -> Graph a b c -> Node a-getNode' n = (\(Just x) -> x) . avlLookup n . nodes---- | Set the node's content by its ID-setNode :: NodeId -> a -> Graph a b c -> Graph a b c-setNode n a g@(Graph ns _ _) = g{nodes=fmap setNode' ns}-  where setNode' (Node m c i) = if i == n then Node m a i else Node m c i---- | Mark a node by its ID-markNode :: NodeId -> Graph a b c -> Graph a b c-markNode n g@(Graph ns _ _) = g{nodes=fmap markNode' ns}-  where markNode' (Node m c i) = if i == n then Node True c i else Node m c i ---- | Follow an edge by its source node and label-followEdge :: Eq b => NodeId -> b -> Graph a b c -> Maybe NodeId-followEdge n l g = case filter ((==l).label) $ filter ((==n).fromNode) $ edges g of-  [] -> Nothing-  (x:_) -> Just (toNode x)---- | Query an edge's content-queryEdge :: Eq b => NodeId -> b -> Graph a b c -> Maybe c-queryEdge n l g = case filter ((==l).label) $ filter ((==n).fromNode) $ edges g of-  [] -> Nothing-  (x:_) -> Just (content x)---- | List all edges from the given node-listEdges :: NodeId -> Graph a b c -> [(b,c,NodeId)]-listEdges n g = fmap (\(Edge _ t _ l c) -> (l,c,t)) $ filter ((==n).fromNode) $ edges g
− src/Game/Antisplice/Utils/Hetero.hs
@@ -1,91 +0,0 @@-{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, RankNTypes, FlexibleContexts, LambdaCase, ScopedTypeVariables #-}--{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}--module Game.Antisplice.Utils.Hetero where--infixr 9 :-:--- | The Cons type for a heterogenous list-data Cons a b = (:-:) a b--- | The empty list-data Nil = Nil---- | Typeclass for appending one heterogenous list to another one-class Append a b ab | a b -> ab where-  tappend :: a -> b -> ab-instance Append Nil b b where-  tappend Nil b = b-instance Append b c bc => Append (Cons a b) c (Cons a bc) where-  tappend (a :-: b) c = a :-: tappend b c---- | Typeclass for wrapping a heterogenous list into a Maybe on demand-class IntoMaybe a ar  where-  tjust :: a -> ar-  tnothing :: a -> ar-instance IntoMaybe Nil Nil where-  tjust Nil = Nil-  tnothing a = Nil-instance IntoMaybe (Cons a as) (Cons (Maybe (Cons a as)) Nil) where-  tjust a = Just a :-: Nil-  tnothing a = Nothing :-: Nil---- | Typeclass for everything that may be converted to a tuple-class Tuplify l t | l -> t where-  tuplify :: l -> t--instance Tuplify Nil () where-  tuplify Nil = ()--instance Tuplify a ar => Tuplify (Cons a Nil) ar where-  tuplify (a :-: Nil) = tuplify a--instance (Tuplify a ar, Tuplify b br) => Tuplify (Cons a (Cons b Nil)) (ar,br) where-  tuplify (a :-: b :-: Nil) = (tuplify a, tuplify b)--instance (Tuplify a ar, Tuplify b br, Tuplify c cr) => Tuplify (Cons a (Cons b (Cons c Nil))) (ar,br,cr) where-  tuplify (a :-: b :-: c :-: Nil) = (tuplify a, tuplify b, tuplify c)--instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr) => Tuplify (Cons a (Cons b (Cons c (Cons d Nil)))) (ar,br,cr,dr) where-  tuplify (a :-: b :-: c :-: d :-: Nil) = (tuplify a, tuplify b,tuplify c,tuplify d)--instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e Nil))))) (ar,br,cr,dr,er) where-  tuplify (a :-: b :-: c :-: d :-: e :-: Nil) = (tuplify a,tuplify b,tuplify c,tuplify d,tuplify e)--instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er, Tuplify f fr) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil)))))) (ar,br,cr,dr,er,fr) where-  tuplify (a :-: b :-: c :-: d :-: e :-: f :-: Nil) = (tuplify a,tuplify b,tuplify c,tuplify d,tuplify e,tuplify f)--instance Tuplify Int Int where-  tuplify = id--instance Tuplify Char Char where-  tuplify = id--instance Tuplify a ar => Tuplify [a] [ar] where-  tuplify = map tuplify--instance Tuplify a ar => Tuplify (Maybe a) (Maybe ar) where-  tuplify = fmap tuplify--data Titled a = Titled String a--instance Tuplify a ar => Tuplify (Titled a) ar where-  tuplify (Titled _ a) = tuplify a
− src/Game/Antisplice/Utils/ListBuilder.hs
@@ -1,60 +0,0 @@-{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts #-}--module Game.Antisplice.Utils.ListBuilder where--import Control.Arrow-import Control.Monad.Trans.Class-import Control.Monad.Identity--class Monad l => ListBuilder l i | l -> i where-  li :: i -> l ()-  buildList :: l () -> [i]--newtype StrictBuilderT i m a = StrictBuilder { runStrictBuilderT :: [i] -> m (a,[i]) }-type StrictBuilder i = StrictBuilderT i Identity--instance Functor m => Functor (StrictBuilderT i m) where-  fmap f a = StrictBuilder $ \s -> fmap (first f) $ runStrictBuilderT a s--instance Monad m => Monad (StrictBuilderT i m) where-  return a = StrictBuilder $ \s -> return (a,s)-  m >>= f = StrictBuilder $ \s -> do (a,s') <- runStrictBuilderT m s; runStrictBuilderT (f a) s'--instance MonadTrans (StrictBuilderT i) where-  lift m = StrictBuilder $ \s -> do a <- m; return (a,s)--instance ListBuilder (StrictBuilder i) i where-  li a = seq a $ StrictBuilder $ \s -> return ((),s++[a])-  buildList m = snd $ runIdentity $ runStrictBuilderT m []--strictBuild :: StrictBuilderT i Identity () -> [i]-strictBuild = buildList--newtype LazyBuilderT i m a = LazyBuilder { runLazyBuilderT :: ([i] -> [i]) -> m (a,[i] -> [i]) }-type LazyBuilder i = LazyBuilderT i Identity--instance Functor m => Functor (LazyBuilderT i m) where-  fmap f a = LazyBuilder $ \s -> fmap (first f) $ runLazyBuilderT a s--instance Monad m => Monad (LazyBuilderT i m) where-  return a = LazyBuilder $ \s -> return (a,s)-  m >>= f = LazyBuilder $ \s -> do (a,s') <- runLazyBuilderT m s; runLazyBuilderT (f a) s'--instance MonadTrans (LazyBuilderT i) where-  lift m = LazyBuilder $ \s -> do a <- m; return (a,s)--instance ListBuilder (LazyBuilder i) i where-  li a = LazyBuilder $ \s -> return ((),s.([a]++))-  buildList m = ($[]) $ snd $ runIdentity $ runLazyBuilderT m ([]++)--lazyBuild :: LazyBuilderT i Identity () -> [i]-lazyBuild = buildList--lis :: ListBuilder l i => [i] -> l ()-lis = mapM_ li--lit :: ListBuilder l (a,b) => a -> b -> l ()-lit a b = li (a,b)--(>-<) :: ListBuilder l (a,b) => a -> b -> l ()-(>-<) = lit
− src/Game/Antisplice/Utils/None.hs
@@ -1,87 +0,0 @@-{-# LANGUAGE FlexibleInstances #-}--{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides a typeclass for everything that may carry a void value-module Game.Antisplice.Utils.None where--import Data.Maybe-import Data.Text (pack, Text)---- | Typeclass for everything that may carry a void value-class None n where-  none :: n--instance None [a] where-  none = []--instance None (Maybe a) where-  none = Nothing--instance None () where-  none = ()--instance None Text where-  none = pack ""--instance None (a -> a) where-  none = id--instance Monad m => None (a -> m a) where-  none = return--instance None Int where-  none = 0--instance None Integer where-  none = 0--instance None Bool where-  none = False---- | Wrap the void into a monad.-noneM :: (Monad m,None n) => m n-noneM = return none---- | Join a maybe into the underlying type. 'Nothing' becomes 'none'.-joinMaybe :: None n => Maybe n -> n-joinMaybe (Just j) = j-joinMaybe Nothing = none---- | Wrap the value into a maybe. 'none' becomes 'Nothing'.-expandMaybe :: (Eq n,None n) => n -> Maybe n-expandMaybe n-  | n == none = Nothing-  | otherwise = Just n---- | Clean the maybe by pulling wrapped 'none's to the outside (as a 'Nothing').-cleanMaybe :: (Eq n,None n) => Maybe n -> Maybe n-cleanMaybe = expandMaybe . joinMaybe---- | Eliminate all void elements from the list.-reduce :: (Eq n,None n) => [n] -> [n]-reduce = filter (/=none)---- | Eliminate all 'Nothing's from the list and unjust all remaining values.-reduceMaybe :: [Maybe a] -> [a]-reduceMaybe = map unjust . filter isJust-  where unjust (Just j) = j
− src/Game/Antisplice/Utils/Run.hs
@@ -1,47 +0,0 @@-{-# LANGUAGE TypeFamilies #-}--{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides a generalized way of running newtypes.-module Game.Antisplice.Utils.Run where--import Control.Monad-import Control.Monad.Trans.Class-import Game.Antisplice.Utils.Fail-import Game.Antisplice.Monad.Dungeon---- | Typeclass for all runnable newtype 'MonadTrans'ers-class MonadTrans t => Run t where-  type Baretype t m a-  run :: Monad m => t m a -> Baretype t m a--instance Run (FailT e) where-  type Baretype (FailT e) m a = m (Either e a)-  run = runFailT--instance Run DungeonT where-  type Baretype DungeonT m a = DungeonState -> m (a,DungeonState)-  run = runDungeonT--instance Run RoomT where-  type Baretype RoomT m a = RoomState -> m (a,RoomState)-  run = runRoomT
− src/Game/Antisplice/Utils/TST.hs
@@ -1,55 +0,0 @@-{--  This module is part of Antisplice.-  Copyleft (c) 2014 Marvin Cohrs--  All wrongs reversed. Sharing is an act of love, not crime.-  Please share Antisplice with everyone you like.--  Antisplice is free software: you can redistribute it and/or modify-  it under the terms of the GNU Affero General Public License as published by-  the Free Software Foundation, either version 3 of the License, or-  (at your option) any later version.--  Antisplice is distributed in the hope that it will be useful,-  but WITHOUT ANY WARRANTY; without even the implied warranty of-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-  GNU Affero General Public License for more details.--  You should have received a copy of the GNU Affero General Public License-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.--}---- | Provides a ternary search trie-module Game.Antisplice.Utils.TST where--import Data.Maybe-import Game.Antisplice.Utils.None---- | A ternary search trie-data TST a = EmptyTST | TST Char (Maybe a) (TST a) (TST a) (TST a)---- | Insert something into the TST-tstInsert :: String -> a -> TST a -> TST a-tstInsert (c:[]) a EmptyTST = TST c (Just a) EmptyTST EmptyTST EmptyTST-tstInsert (c:cs) a EmptyTST = TST c Nothing (tstInsert cs a EmptyTST) EmptyTST EmptyTST-tstInsert cs a (TST c1 a1 f l r)-  | head cs < c1 = TST c1 a1 f (tstInsert cs a l) r-  | head cs > c1 = TST c1 a1 f l (tstInsert cs a r)-  | cs == [c1] = TST c1 (Just a) f l r-  | otherwise = TST c1 a1 (tstInsert (tail cs) a f) l r---- | Lookup some string in the TST-tstLookup :: String -> TST a -> Maybe a-tstLookup _ EmptyTST = Nothing-tstLookup cs (TST c1 a1 f l r)-  | head cs < c1 = tstLookup cs l-  | head cs > c1 = tstLookup cs r-  | cs == [c1] = a1-  | otherwise = tstLookup (tail cs) f---- | Check if the TST contains the given key-tstContains :: String -> TST a -> Bool-tstContains cs = isJust . tstLookup cs--instance None (TST a) where-  none = EmptyTST