diff --git a/System/Chatty/Commands.hs b/System/Chatty/Commands.hs
--- a/System/Chatty/Commands.hs
+++ b/System/Chatty/Commands.hs
@@ -37,32 +37,32 @@
 import System.Posix.Files
 
 -- | Like 'cat' on the command line. Accepts a list of filenames. Simple pass-through, if none are provided.
-cat :: (MonadScanner m, MonadPrinter m, MonadIO m,Functor m,MonadFinalizer m) => [String] -> m ()
+cat :: (ChScanner m, ChPrinter m, MonadIO m,Functor m,ChFinalizer m) => [String] -> m ()
 cat [] = mscanL >>= mprint
 cat [f] = cat [] .<. f
 cat (f:fs) = cat [f] >> cat fs
 
 -- | Like 'cat', but reverses the line order.
-tac :: (MonadFinalizer m,MonadScanner m, MonadPrinter m, MonadIO m,Functor m) => [String] -> m ()
+tac :: (ChFinalizer m,ChScanner m, ChPrinter m, MonadIO m,Functor m) => [String] -> m ()
 tac [] = mscanL >>= (mprint . unlines . reverse . lines)
 tac fs = cat fs .|. tac []
 
 -- | Pass-through, simultanously writing all input to a given file.
-tee :: (MonadScanner m, MonadPrinter m, MonadIO m, Functor m) => String -> m ()
+tee :: (ChScanner m, ChPrinter m, MonadIO m, Functor m) => String -> m ()
 tee f = do
   s <- mscanL
   mprint s .>. f
   mprint s
 
 -- | Prints the given string, after expanding it.
-echo :: (MonadPrinter m,MonadExpand m) => String => m ()
+echo :: (ChPrinter m,ChExpand m) => String => m ()
 echo = mprintLn <=< expand
 
 -- | Mode for 'wc'.
 data WcMode = CountChars | CountLines | CountWords
 
 -- | Count characters, lines or words of the input.
-wc :: (MonadScanner m, MonadPrinter m, MonadIO m, Functor m) => WcMode -> m ()
+wc :: (ChScanner m, ChPrinter m, MonadIO m, Functor m) => WcMode -> m ()
 wc CountChars = mscanL >>= (mprint . show . length) >> mprint "\n"
 wc CountLines = mscanL >>= (mprint . show . length . lines) >> mprint "\n"
 wc CountWords = mscanL >>= (mprint . show . length . words) >> mprint "\n"
@@ -72,11 +72,11 @@
 cd = liftIO . setCurrentDirectory
 
 -- | Print current working directory.
-pwd :: (MonadIO m,MonadPrinter m) => m ()
+pwd :: (MonadIO m,ChPrinter m) => m ()
 pwd = liftIO getCurrentDirectory >>= mprintLn
 
 -- | List directory contents of the given directories (current one, if empty list).
-ls :: (MonadIO m,MonadPrinter m) => [String] -> m ()
+ls :: (MonadIO m,ChPrinter m) => [String] -> m ()
 ls [] = liftIO (getDirectoryContents ".") >>= (mprint . unlines)
 ls [p] = do
   fs <- liftIO $ getFileStatus p
@@ -87,9 +87,9 @@
 ls (p:ps) = ls [p] >> ls ps
 
 -- | Filters only the first n lines of the input.
-head :: (MonadScanner m,MonadPrinter m,MonadIO m,Functor m) => Int -> m ()
+head :: (ChScanner m,ChPrinter m,MonadIO m,Functor m) => Int -> m ()
 head n = mscanL >>= (mprint . unlines . take n . lines)
 
 -- | FIlters only the last n lines of the input.
-tail :: (MonadScanner m,MonadPrinter m,MonadIO m,Functor m) => Int -> m ()
+tail :: (ChScanner m,ChPrinter m,MonadIO m,Functor m) => Int -> m ()
 tail n = mscanL >>= (mprint . unlines . reverse . take n . reverse . lines)
diff --git a/System/Chatty/Misc.hs b/System/Chatty/Misc.hs
--- a/System/Chatty/Misc.hs
+++ b/System/Chatty/Misc.hs
@@ -27,24 +27,24 @@
 import System.Random
 
 -- | Typeclass for all monads that know the time
-class (Functor m,Monad m) => MonadClock m where
+class (Functor m,Monad m) => ChClock m where
   -- | Get UTC Time
   mutctime :: m UTCTime
   -- | Get timestamp, guaranteed to grow
   mgetstamp :: m NominalDiffTime
   mgetstamp = fmap (flip diffUTCTime (UTCTime (fromGregorian 1970 1 1) (secondsToDiffTime 0))) mutctime
 
-instance MonadClock IO where
+instance ChClock IO where
   mutctime = getCurrentTime
 
 -- | Typeclass for all monads that may provide random numbers
-class Monad m => MonadRandom m where
+class Monad m => ChRandom m where
   -- | Get a single random number
   mrandom :: Random r => m r
   -- | Get a single random number in the given range
   mrandomR :: Random r => (r,r) -> m r
 
-instance MonadRandom IO where
+instance ChRandom IO where
   mrandom = randomIO
   mrandomR rs = randomRIO rs
 
diff --git a/System/Chatty/Spawn.hs b/System/Chatty/Spawn.hs
--- a/System/Chatty/Spawn.hs
+++ b/System/Chatty/Spawn.hs
@@ -31,13 +31,13 @@
 import qualified System.Process as P
 
 -- | Class for all (real or pseudo) process-spawning monads.
-class Monad m => MonadSpawn m where
+class Monad m => ChSpawn m where
   -- | Spawn process
   mspw :: String -> [String] -> Either Handle String -> m (Int,String,[Handle])
   -- | Accept handle as input?
   mah :: String -> m Bool
 
-instance MonadSpawn IO where
+instance ChSpawn IO where
   mspw pn as (Left h) = do
     (_, Just hout, _, ph) <- P.createProcess (P.proc pn as){
       P.std_in = P.UseHandle h,
@@ -57,7 +57,7 @@
   mah = return $ return True
 
 -- | Spawn process
-spawn :: (MonadFinalizer m,MonadScanner m,MonadPrinter m, MonadSpawn m,Functor m) => String -> [String] -> m Int
+spawn :: (ChFinalizer m,ChScanner m,ChPrinter m, ChSpawn m,Functor m) => String -> [String] -> m Int
 spawn fn as = do
   ah <- mah fn
   mscanh >>= \h' -> case if ah then h' else Nothing of
diff --git a/System/Chatty/Spawn/Builtins.hs b/System/Chatty/Spawn/Builtins.hs
--- a/System/Chatty/Spawn/Builtins.hs
+++ b/System/Chatty/Spawn/Builtins.hs
@@ -26,10 +26,10 @@
 import System.Chatty.Spawn.Overlay
 
 -- | Use builtins if possible.
-withBuiltins :: (Functor m, MonadSpawn m) => SpawnOverlayT m a -> m a
+withBuiltins :: (Functor m, ChSpawn m) => SpawnOverlayT m a -> m a
 withBuiltins m = fmap fst $ runSpawnOverlayT m builtins
 
-builtins :: MonadSpawn m => [(String,[String] -> String -> m (Int,String))]
+builtins :: ChSpawn m => [(String,[String] -> String -> m (Int,String))]
 builtins =
   ("cat", \_ si -> return (0,si)):
   []
diff --git a/System/Chatty/Spawn/Overlay.hs b/System/Chatty/Spawn/Overlay.hs
--- a/System/Chatty/Spawn/Overlay.hs
+++ b/System/Chatty/Spawn/Overlay.hs
@@ -43,7 +43,7 @@
 instance Monad m => Functor (SpawnOverlayT m) where
   fmap f a = SpawnOverlay $ \s -> do (a',s') <- runSpawnOverlayT a s; return (f a',s')
 
-instance MonadSpawn m => MonadSpawn (SpawnOverlayT m) where
+instance ChSpawn m => ChSpawn (SpawnOverlayT m) where
   mspw pn as (Right si) = SpawnOverlay $ \s ->
     case pn `elem` (map fst s) of
       True -> let c = snd $ head $ filter ((==pn).fst) s
diff --git a/Text/Chatty/Channel/Broadcast.hs b/Text/Chatty/Channel/Broadcast.hs
--- a/Text/Chatty/Channel/Broadcast.hs
+++ b/Text/Chatty/Channel/Broadcast.hs
@@ -31,12 +31,12 @@
 import Text.Chatty.Channel.Printer
 
 -- | Typeclass for all channel printers that may broadcast to all channels that fulfill a condition.
-class ChannelPrinter c m => Broadcaster c m where
+class ChChannelPrinter c m => ChBroadcaster c m where
   -- | Print the string to all channels that fulfill the current condition.
   bprint :: (c -> m Bool) -> String -> m ()
 
 -- | Typeclass for all broadcaster that may embrace sections
-class Broadcaster c m => BroadcasterBracket c m where
+class ChBroadcaster c m => ChBroadcasterBracket c m where
   -- | Run the function and print to all channels that fulfill the given condition.
   bbracket :: (c -> m Bool) -> m a -> m a
   bbracket f m = bstart f >> m >>= \a -> bfin f >> return a
diff --git a/Text/Chatty/Channel/Printer.hs b/Text/Chatty/Channel/Printer.hs
--- a/Text/Chatty/Channel/Printer.hs
+++ b/Text/Chatty/Channel/Printer.hs
@@ -22,7 +22,7 @@
 
 -- | Provides a printer class that offers several channels.
 module Text.Chatty.Channel.Printer (
-  ChannelPrinter (..),
+  ChChannelPrinter (..),
   ArchiverT (..),
   IntArchiverT,
   BoolArchiverT,
@@ -43,7 +43,7 @@
 import System.IO
 
 -- | Typeclass for all printers that offer several channels.
-class (MonadPrinter m,Eq c) => ChannelPrinter c m where
+class (ChPrinter m,Eq c) => ChChannelPrinter c m where
   -- | Run the function with the given channel.
   cbracket :: c -> m a -> m a
   cbracket c m = cstart c >> m >>= \a -> cfin c >> return a
@@ -79,10 +79,10 @@
   | p == k = (p,f a) : ps
   | otherwise = (p,a) : withAssoc k n f ps
 
-instance (Eq c,Monad m) => MonadPrinter (ArchiverT c m) where
+instance (Eq c,Monad m) => ChPrinter (ArchiverT c m) where
   mprint s = Archiver $ \(r,c:cx) -> return ((),(withAssoc c [] (s:) r,c:cx))
 
-instance (Eq c,Monad m) => ChannelPrinter c (ArchiverT c m) where
+instance (Eq c,Monad m) => ChChannelPrinter c (ArchiverT c m) where
   cbracket c m = Archiver $ \(r,c1) -> do
     (a,(r',_)) <- runArchiverT' m (r,c:c1)
     return (a,(r',c1))
@@ -114,11 +114,11 @@
 instance Monad m => Functor (FilterT c m) where
   fmap f a = liftM f a
 
-instance (Eq c,MonadPrinter m) => MonadPrinter (FilterT c m) where
+instance (Eq c,ChPrinter m) => ChPrinter (FilterT c m) where
   mprint str = Filter $ \(c,c1:cx) -> if c == c1 then mprint str >> return ((),c1:cx) else return ((),c1:cx)
   mnomask str = Filter $ \(c,c1:cx) -> if c == c1 then mnomask str >> return ((),c1:cx) else return ((),c1:cx)
 
-instance (Eq c,MonadPrinter m) => ChannelPrinter c (FilterT c m) where
+instance (Eq c,ChPrinter m) => ChChannelPrinter c (FilterT c m) where
   cbracket c m = Filter $ \(cf,cx) -> do
     (a,_) <- runFilterT m (cf,c:cx)
     return (a,cx)
@@ -147,11 +147,11 @@
 instance Functor m => Functor (JoinerT m) where
   fmap f (Joiner j) = Joiner $ fmap f j
 
-instance MonadPrinter m => MonadPrinter (JoinerT m) where
+instance ChPrinter m => ChPrinter (JoinerT m) where
   mprint = lift . mprint
   mnomask = lift . mnomask
 
-instance (Eq c,MonadPrinter m) => ChannelPrinter c (JoinerT m) where
+instance (Eq c,ChPrinter m) => ChChannelPrinter c (JoinerT m) where
   cstart _ = return ()
   cfin _ = return ()
   cbracket _ m = m
diff --git a/Text/Chatty/Expansion.hs b/Text/Chatty/Expansion.hs
--- a/Text/Chatty/Expansion.hs
+++ b/Text/Chatty/Expansion.hs
@@ -27,7 +27,7 @@
 import Control.Monad.Trans.Class
 
 -- | Typeclass for all string-expanding monads.
-class Monad e => MonadExpand e where
+class Monad e => ChExpand e where
   -- | Expand the given string.
   expand :: String -> e String
 
@@ -46,7 +46,7 @@
 instance MonadIO m => MonadIO (NullExpanderT m) where
   liftIO = lift . liftIO
 
-instance Monad m => MonadExpand (NullExpanderT m) where
+instance Monad m => ChExpand (NullExpanderT m) where
   expand = return
 
 withExpansion :: Monad m => NullExpanderT m a -> m a
diff --git a/Text/Chatty/Expansion/History.hs b/Text/Chatty/Expansion/History.hs
--- a/Text/Chatty/Expansion/History.hs
+++ b/Text/Chatty/Expansion/History.hs
@@ -46,19 +46,19 @@
 instance Monad m => Functor (HistoryT m) where
   fmap f a = History $ \s -> do (a',s') <- runHistoryT a s; return (f a',s')
 
-class Monad he => HistoryEnv he where
+class Monad he => ChHistoryEnv he where
   mcounth :: he Int
   mgeth :: Int -> he String
   mputh :: String -> he ()
 
-instance Monad m => HistoryEnv (HistoryT m) where
+instance Monad m => ChHistoryEnv (HistoryT m) where
   mcounth = History $ runKleisli (arr length &&& id)
   mgeth i
     | i <= 0 = let j = -i in History $ runKleisli (arr (!!j) &&& id)
     | otherwise = History . runKleisli $ arr ((!!i).reverse &&& id)
   mputh s = History . runKleisli $ arr (const () &&& (s:))
 
-expandHist :: HistoryEnv h => String -> h String
+expandHist :: ChHistoryEnv h => String -> h String
 expandHist [] = return []
 expandHist ('!':ss) =
   let (nm,rm) = (takeWhile isNum &&& dropWhile isNum) ss
@@ -73,7 +73,7 @@
       return (h++hs)
 expandHist (s:ss) = do ss' <- expandHist ss; return (s:ss')
 
-instance MonadExpand m => MonadExpand (HistoryT m) where
+instance ChExpand m => ChExpand (HistoryT m) where
   expand = lift . expand <=< expandHist
 
 withHistory :: Monad m => HistoryT m a -> m a
diff --git a/Text/Chatty/Expansion/Vars.hs b/Text/Chatty/Expansion/Vars.hs
--- a/Text/Chatty/Expansion/Vars.hs
+++ b/Text/Chatty/Expansion/Vars.hs
@@ -78,14 +78,14 @@
   liftIO $ forM_ vs $ \(k,v) -> setEnv k (show v) True
   return ((),vs)
 
-instance MonadExpand IO where
+instance ChExpand IO where
   expand = expandVars
 
-instance MonadExpand m => MonadExpand (ExpanderT m) where
+instance ChExpand m => ChExpand (ExpanderT m) where
   expand = lift . expand <=< expandVars
 
 -- | Expand $variables
-expandVars :: (Monad m,Functor m,ExpanderEnv m) => String -> m String
+expandVars :: (Monad m,Functor m,ChExpanderEnv m) => String -> m String
 expandVars [] = return []
 expandVars ('\\':'$':ss) = do r <- expandVars ss; return ('$':r)
 expandVars ('$':'{':ss) =
@@ -111,19 +111,19 @@
 isAnum = (`elem` (['a'..'z']++['A'..'Z']++"_"++['0'..'9']))
 
 -- | Typeclass for all environment storages.
-class Monad ee => ExpanderEnv ee where
+class Monad ee => ChExpanderEnv ee where
   -- | Get environment variable
   mgetv :: String -> ee EnvVar
   -- | Put environment variable
   mputv :: String -> EnvVar -> ee ()
 
-instance Monad m => ExpanderEnv (ExpanderT m) where
+instance Monad m => ChExpanderEnv (ExpanderT m) where
   mgetv s = Expander $ \vs -> return $
     case filter ((==s).fst) vs of
       [] -> (NotSet,vs)
       ((_,v):_) -> (v,vs)
   mputv k v = Expander $ \vs -> return ((),(k,v):filter ((/=k).fst) vs)
 
-instance ExpanderEnv IO where
+instance ChExpanderEnv IO where
   mgetv = fmap (\v -> case v of Nothing -> NotSet; Just v' -> Literal v') . getEnv
   mputv k v = setEnv k (show v) True
diff --git a/Text/Chatty/Extended/ANSI.hs b/Text/Chatty/Extended/ANSI.hs
--- a/Text/Chatty/Extended/ANSI.hs
+++ b/Text/Chatty/Extended/ANSI.hs
@@ -19,7 +19,7 @@
   along with Chatty. If not, see <http://www.gnu.org/licenses/>.
 -}
 
--- | Provides an ExtendedPrinter that handles colours using standardized ANSI codes.
+-- | Provides a 'ChExtendedPrinter' that handles colours using standardized ANSI codes.
 module Text.Chatty.Extended.ANSI where
 
 import qualified System.Console.ANSI as A
@@ -30,7 +30,7 @@
 import Text.Chatty.Extended.Printer
 import Text.Chatty.Expansion
 
--- | An ExtendedPrinter that uses ANSI colour codes.
+-- | A 'ChExtendedPrinter' that uses ANSI colour codes.
 newtype AnsiPrinterT m a = AnsiPrinter { runAnsiPrinterT :: [Colour] -> m (a,[Colour]) }
 
 instance Monad m => Monad (AnsiPrinterT m) where
@@ -46,13 +46,13 @@
 instance MonadIO m => MonadIO (AnsiPrinterT m) where
   liftIO = lift . liftIO
 
-instance MonadPrinter m => MonadPrinter (AnsiPrinterT m) where
+instance ChPrinter m => ChPrinter (AnsiPrinterT m) where
   mprint = lift . mprint
   mnoecho = lift . mnoecho
   mflush = lift mflush
   mnomask = lift . mnomask
 
-instance MonadPrinter m => ExtendedPrinter (AnsiPrinterT m) where
+instance ChPrinter m => ChExtendedPrinter (AnsiPrinterT m) where
   estart c = AnsiPrinter $ \c1 -> do
     mprint $ A.setSGRCode [A.SetColor A.Foreground (mkColourInt c) (mkColourCode c)]
     return ((),c:c1)
@@ -65,7 +65,7 @@
         mprint $ A.setSGRCode [A.Reset]
         return ((),[])
 
-instance (Functor m,MonadExpand m) => MonadExpand (AnsiPrinterT m) where
+instance (Functor m,ChExpand m) => ChExpand (AnsiPrinterT m) where
   expand s = AnsiPrinter $ \cx -> do
     s1 <- (expand =<<) $ liftM (replay.snd) $ runRecorderT $ liftM fst $ flip runAnsiPrinterT cx $ expandClr s
     return (s1, cx)
diff --git a/Text/Chatty/Extended/HTML.hs b/Text/Chatty/Extended/HTML.hs
--- a/Text/Chatty/Extended/HTML.hs
+++ b/Text/Chatty/Extended/HTML.hs
@@ -19,7 +19,7 @@
   along with Chatty. If not, see <http://www.gnu.org/licenses/>.
 -}
 
--- | Provides an 'ExtendedPrinter' that handles colours using HTML output.
+-- | Provides an 'ChExtendedPrinter' that handles colours using HTML output.
 module Text.Chatty.Extended.HTML where
 
 import Text.Chatty.Printer
@@ -29,7 +29,7 @@
 import Control.Monad.Trans.Class
 import Control.Monad.IO.Class
 
--- | An 'ExtendedPrinter' for HTML output.
+-- | An 'ChExtendedPrinter' for HTML output.
 newtype HtmlPrinterT m a = HtmlPrinter { runHtmlPrinterT :: m a }
 
 instance Monad m => Monad (HtmlPrinterT m) where
@@ -45,17 +45,17 @@
 instance MonadIO m => MonadIO (HtmlPrinterT m) where
   liftIO = lift . liftIO
 
-instance MonadPrinter m => MonadPrinter (HtmlPrinterT m) where
+instance ChPrinter m => ChPrinter (HtmlPrinterT m) where
   mprint = lift . mprint . concatMap maskHtml
   mnoecho = lift . mnoecho . concatMap maskHtml
   mflush = lift mflush
   mnomask = lift . mnomask
 
-instance MonadPrinter m => ExtendedPrinter (HtmlPrinterT m) where
+instance ChPrinter m => ChExtendedPrinter (HtmlPrinterT m) where
   estart c =  lift $ mprint $ concat ["<span style=\"color: #", hexColour c, ";\">"]
   efin = lift $ mprint "</span>"
 
-instance (Functor m,MonadExpand m) => MonadExpand (HtmlPrinterT m) where
+instance (Functor m,ChExpand m) => ChExpand (HtmlPrinterT m) where
   expand = lift . expand <=< liftM (replay.snd) . runRecorderT . runHtmlPrinterT . expandClr
 
 -- | Convert the given character to its HTML representation.
diff --git a/Text/Chatty/Extended/Printer.hs b/Text/Chatty/Extended/Printer.hs
--- a/Text/Chatty/Extended/Printer.hs
+++ b/Text/Chatty/Extended/Printer.hs
@@ -20,7 +20,7 @@
 -}
 
 -- | Provides an extended printer class that supports colours.
-module Text.Chatty.Extended.Printer (ExtendedPrinter(..),Tone(..),Colour(..),expandClr) where
+module Text.Chatty.Extended.Printer (ChExtendedPrinter(..),Tone(..),Colour(..),expandClr) where
 
 import Text.Chatty.Printer
 
@@ -30,7 +30,7 @@
 data Colour = Dull Tone | Vivid Tone
 
 -- | Typeclass for all printers that support colourized output.
-class MonadPrinter m => ExtendedPrinter m where
+class ChPrinter m => ChExtendedPrinter m where
   -- | Run the function with the given colour.
   ebracket :: Colour -> m a -> m a
   ebracket c m = do estart c; a <- m; efin; return a
@@ -62,7 +62,7 @@
 
 procClr c ss = let (nm,rm) = splitBrace ss in ebracket c (expandClr nm) >> expandClr rm
 
-expandClr :: ExtendedPrinter m => String -> m ()
+expandClr :: ChExtendedPrinter m => String -> m ()
 expandClr ('%':'{':'V':'0':';':ss) = procClr (Vivid Black) ss
 expandClr ('%':'{':'V':'1':';':ss) = procClr (Vivid Red) ss
 expandClr ('%':'{':'V':'2':';':ss) = procClr (Vivid Green) ss
diff --git a/Text/Chatty/Finalizer.hs b/Text/Chatty/Finalizer.hs
--- a/Text/Chatty/Finalizer.hs
+++ b/Text/Chatty/Finalizer.hs
@@ -28,7 +28,7 @@
 import System.IO
 
 -- | Class for all handle-finalizing monads. Required for file redirections.
-class Monad m => MonadFinalizer m where
+class Monad m => ChFinalizer m where
   -- | Enqueue handle
   mqfh :: Handle -> m ()
   -- | Enqueue list of handles
@@ -53,7 +53,7 @@
 instance MonadIO m => MonadIO (HandleCloserT m) where
   liftIO = lift . liftIO
 
-instance MonadIO m => MonadFinalizer (HandleCloserT m) where
+instance MonadIO m => ChFinalizer (HandleCloserT m) where
   mqfh h = HandleCloser $ \hs -> return ((),h:hs)
   mfin = HandleCloser $ \hs -> do
     sequence_ $ fmap (liftIO.hClose) hs
@@ -62,4 +62,3 @@
 -- | Run function with handle closer
 withLazyIO :: (MonadIO m,Functor m) => HandleCloserT m a -> m a
 withLazyIO m = fmap fst $ runHandleCloserT (do a <- m; mfin; return a) []
-
diff --git a/Text/Chatty/Interactor/Templates.hs b/Text/Chatty/Interactor/Templates.hs
--- a/Text/Chatty/Interactor/Templates.hs
+++ b/Text/Chatty/Interactor/Templates.hs
@@ -42,10 +42,10 @@
 import System.Chatty.Misc
 import System.IO
 
--- | Automatically derives a MonadScanner instance for you.
+-- | Automatically derives a ChScanner instance for you.
 mkScanner :: Name -> Q [Dec]
 mkScanner s = [d|
-    instance MonadScanner m => MonadScanner ($sx m) where
+    instance ChScanner m => ChScanner ($sx m) where
       mscan1 = lift mscan1
       mscanL = lift mscanL
       mscannable = lift mscannable
@@ -54,19 +54,19 @@
   |]
   where sx = strToType s
 
--- | Automatically derives a BufferedScanner instance for you.
+-- | Automatically derives a ChBufferedScanner instance for you.
 mkBufferedScanner :: Name -> Q [Dec]
 mkBufferedScanner s = [d|
-    instance BufferedScanner m => BufferedScanner ($sx m) where
+    instance ChBufferedScanner m => ChBufferedScanner ($sx m) where
       mpeek1 = lift mpeek1
       mprepend = lift . mprepend
   |]
   where sx = strToType s
 
--- | Automatically derives a MonadPrinter instance for you.
+-- | Automatically derives a ChPrinter instance for you.
 mkPrinter :: Name -> Q [Dec]
 mkPrinter s = [d|
-    instance MonadPrinter m => MonadPrinter ($sx m) where
+    instance ChPrinter m => ChPrinter ($sx m) where
       mprint = lift . mprint
       mnoecho = lift . mnoecho
       mflush = lift mflush
@@ -74,10 +74,10 @@
   |]
   where sx = strToType s
 
--- | Automatically derives an ExtendedPrinter instance for you.
+-- | Automatically derives an ChExtendedPrinter instance for you.
 mkExtendedPrinter :: Name -> Q [Dec]
 mkExtendedPrinter s = [d|
-    instance ExtendedPrinter m => ExtendedPrinter ($sx m) where
+    instance ChExtendedPrinter m => ChExtendedPrinter ($sx m) where
       estart = lift . estart
       efin = lift efin
       eprint c = lift . eprint c
@@ -85,10 +85,10 @@
   |]             
   where sx = strToType s
 
--- | Automatically derives a ChannelPrinter instance for you.
+-- | Automatically derives a ChChannelPrinter instance for you.
 mkChannelPrinter :: Name ->  Name -> Q [Dec]
 mkChannelPrinter c s = [d|
-    instance ChannelPrinter $cx m => ChannelPrinter $cx ($sx m) where
+    instance ChChannelPrinter $cx m => ChChannelPrinter $cx ($sx m) where
       cstart = lift . cstart
       cfin = lift . cfin
       cprint c = lift . cprint c
@@ -109,7 +109,7 @@
   where sx = strToType s
         cx = strToType c-}
 
--- | Automatically derives ChannelPrinter instances for 'Int', 'Bool' and 'Handle' channels.
+-- | Automatically derives ChChannelPrinter instances for 'Int', 'Bool' and 'Handle' channels.
 mkDefCP :: Name -> Q [Dec]
 mkDefCP s = mkInteractor s (mkChannelPrinter ''Int) (mkChannelPrinter ''Bool) (mkChannelPrinter ''Handle)
 
@@ -117,64 +117,64 @@
 mkDefBC :: Name -> Q [Dec]
 mkDefBC s = mkInteractor s (mkBroadcaster ''Int) (mkBroadcaster ''Bool) (mkBroadcaster ''Handle)-}
 
--- | Automatically derives a MonadFinalizer instance for you.
+-- | Automatically derives a ChFinalizer instance for you.
 mkFinalizer :: Name -> Q [Dec]
 mkFinalizer s = [d|
-    instance MonadFinalizer m => MonadFinalizer ($sx m) where
+    instance ChFinalizer m => ChFinalizer ($sx m) where
       mqfh = lift . mqfh
       mfin = lift mfin
   |]               
   where sx = strToType s
 
--- | Automatically derives a MonadExpand instance for you.
+-- | Automatically derives a ChExpand instance for you.
 mkExpander :: Name -> Q [Dec]
 mkExpander s = [d|
-    instance MonadExpand m => MonadExpand ($sx m) where
+    instance ChExpand m => ChExpand ($sx m) where
       expand = lift . expand
   |]
   where sx = strToType s
 
--- | Automatically derives an ExpanderEnv instance for you
+-- | Automatically derives an ChExpanderEnv instance for you
 mkExpanderEnv :: Name -> Q [Dec]
 mkExpanderEnv s = [d|
-    instance ExpanderEnv m => ExpanderEnv ($sx m) where
+    instance ChExpanderEnv m => ChExpanderEnv ($sx m) where
       mgetv = lift . mgetv
       mputv k v = lift $ mputv k v
   |]
   where sx = strToType s
 
--- | Automatically derives a HistoryEnv instance for you
+-- | Automatically derives a ChHistoryEnv instance for you
 mkHistoryEnv :: Name -> Q [Dec]
 mkHistoryEnv s = [d|
-    instance HistoryEnv m => HistoryEnv ($sx m) where
+    instance ChHistoryEnv m => ChHistoryEnv ($sx m) where
       mcounth = lift mcounth
       mgeth = lift . mgeth
       mputh = lift . mputh
   |]
   where sx = strToType s
 
--- | Automatically derives a MonadSpawn instance for you.
+-- | Automatically derives a ChSpawn instance for you.
 mkSpawn :: Name -> Q [Dec]
 mkSpawn s = [d|
-    instance MonadSpawn m => MonadSpawn ($sx m) where
+    instance ChSpawn m => ChSpawn ($sx m) where
       mspw pn as si = lift $ mspw pn as si
       mah = lift . mah
   |]
   where sx = strToType s
 
--- | Automatically derives a MonadRandom instance for you.
+-- | Automatically derives a ChRandom instance for you.
 mkRandom :: Name -> Q [Dec]
 mkRandom s = [d|
-    instance MonadRandom m => MonadRandom ($sx m) where
+    instance ChRandom m => ChRandom ($sx m) where
       mrandom = lift mrandom
       mrandomR = lift . mrandomR
   |]            
   where sx = strToType s
 
--- | Automatically derives a MonadClock instance for you.
+-- | Automatically derives a ChClock instance for you.
 mkClock :: Name -> Q [Dec]
 mkClock s = [d|
-    instance MonadClock m => MonadClock ($sx m) where
+    instance ChClock m => ChClock ($sx m) where
       mutctime = lift mutctime
       mgetstamp = lift mgetstamp
   |]           
diff --git a/Text/Chatty/Parser.hs b/Text/Chatty/Parser.hs
deleted file mode 100644
--- a/Text/Chatty/Parser.hs
+++ /dev/null
@@ -1,92 +0,0 @@
-{-
-  This module is part of Chatty.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Chatty 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.
-
-  Chatty 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 Chatty. If not, see <http://www.gnu.org/licenses/>.
--}
-
-module Text.Chatty.Parser where
-
-import Control.Monad
-import Data.Char
-import Text.Chatty.Scanner
-
-class MonadScanner m => MonadParser m where
-  pabort :: m a
-  (??) :: Eq a => m a -> m a -> m a
-  (???) :: m a -> m a -> m a
-  ptry :: MonadPlus n => m a -> m (n a)
-
-request :: MonadScanner m => m Char
-request = mscan1
-
-match :: MonadParser m => Char -> m Char
-match c = do
-  k <- request
-  if k == c then return c else pabort
-
-matchs :: MonadParser m => String -> m String
-matchs [] = return []
-matchs (c:cs) = do
-  match c
-  matchs cs
-  return (c:cs)
-
-white :: MonadParser m => m Char
-white = do
-  k <- request
-  if isSpace k then return k else pabort
-
-digit :: MonadParser m => m Int
-digit = do
-  k <- request
-  if isDigit k then return (read [k]) else pabort
-
-alpha :: MonadParser m => m Char
-alpha = do
-  k <- request
-  if isAlpha k then return k else pabort
-
-anum :: MonadParser m => m Char
-anum = do
-  k <- request
-  if isAlphaNum k then return k else pabort
-
-possibly :: MonadParser m => m a -> m (Maybe a)
-possibly f = liftM Just f ??? return Nothing
-
-many :: MonadParser m => m a -> m [a]
-many f = do
-  x <- possibly f
-  case x of
-    Nothing -> return []
-    Just x -> do
-      xs <- many f
-      return (x : xs)
-
-some :: MonadParser m => m a -> m [a]
-some f = do
-  x <- f
-  xs <- many f
-  return (x : xs)
-
-number :: MonadParser m => m Int
-number = do
-  many white
-  ds <- some digit
-  many white
-  return $ foldl (\k n -> k * 10 + n) 0 ds
diff --git a/Text/Chatty/Parser/Nondeterministic.hs b/Text/Chatty/Parser/Nondeterministic.hs
deleted file mode 100644
--- a/Text/Chatty/Parser/Nondeterministic.hs
+++ /dev/null
@@ -1,81 +0,0 @@
-{-
-  This module is part of Chatty.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Chatty 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.
-
-  Chatty 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 Chatty. If not, see <http://www.gnu.org/licenses/>.
--}
-
-module Text.Chatty.Parser.Nondeterministic where
-
-import Control.Monad
-import Data.List
-import qualified Data.Foldable as F
-import Text.Chatty.Parser
-import Text.Chatty.Scanner
-
-data ForkerT m a = Result (m a) (Char -> ForkerT m a) | Failed
-
-instance (MonadPlus m,F.Foldable m) => Monad (ForkerT m) where
-  return a = Result (return a) $ const Failed
-  (Result as f) >>= m = Result (results >>= rResult) (\k -> F.foldl (???) (f k >>= m) (liftM (flip rFunction k) results))
-    where isResult (Result _ _) = True
-          isResult _ = False
-          rResult (Result x _) = x
-          rFunction (Result _ f) = f
-          results = mfilter isResult $ liftM m as
-  Failed >>= m = Failed
-  fail _ = Failed
-
-instance (MonadPlus m,F.Foldable m) => MonadParser (ForkerT m) where
-  pabort = Failed
-  Failed ?? b = b
-  a ?? Failed = a
-  (Result as f) ?? (Result bs g) = Result (msum $ liftM return $ nub $ F.foldr (:) [] $ mplus as bs) $ \k -> f k ?? g k
-  Failed ??? b = b
-  a ??? Failed = a
-  (Result as f) ??? (Result bs g) = Result (mplus as bs) $ \k -> f k ??? g k
-  ptry Failed = Failed
-  ptry (Result as f) = Result (msum $ liftM return [msum $ liftM return $ F.foldr (:) [] as]) $ \k -> ptry $ f k
-
-instance (MonadPlus m,F.Foldable m) => MonadScanner (ForkerT m) where
-  mscan1 = Result mzero return
-  mscanL = do
-    c <- mscan1
-    cs <- mscanL
-    return (c:cs)
-  mscannable = return True
-  mready = return False
-
-feedForkerT1 :: (MonadPlus m,F.Foldable m) => Char -> ForkerT m a -> ForkerT m a
-feedForkerT1 _ Failed = Failed
-feedForkerT1 c (Result _ f) = f c
-
-feedForkerT :: (MonadPlus m,F.Foldable m) => String -> ForkerT m a -> ForkerT m a
-feedForkerT [] = id
-feedForkerT (c:cs) = feedForkerT cs . feedForkerT1 c
-
-embedForkerT :: (MonadPlus n,F.Foldable n,MonadScanner m) => ForkerT n a -> m (n a)
-embedForkerT f = do
-  b <- mscannable
-  if not b then
-      case f of
-        Failed -> return mzero
-        Result xs _ -> return xs
-    else do
-      k <- mscan1
-      embedForkerT $ feedForkerT1 k f
-        
diff --git a/Text/Chatty/Printer.hs b/Text/Chatty/Printer.hs
--- a/Text/Chatty/Printer.hs
+++ b/Text/Chatty/Printer.hs
@@ -31,7 +31,7 @@
 import System.IO
 
 -- | A typeclass for all monads that may output strings.
-class Monad m => MonadPrinter m where
+class Monad m => ChPrinter m where
   -- | Just print it!
   mprint :: String -> m ()
   -- | Print it, except you are IO.
@@ -44,12 +44,12 @@
   mnomask :: String -> m ()
   mnomask = mprint
 
-instance MonadPrinter IO where
+instance ChPrinter IO where
   mprint = putStr
   mnoecho _ = return ()
   mflush = hFlush stdout
 
-instance Monad m => MonadPrinter (StateT String m) where
+instance Monad m => ChPrinter (StateT String m) where
   mprint s = modify (++s)
 
 -- | DeafT discards all output (much like >\/dev\/null in the shell)
@@ -68,7 +68,7 @@
 instance MonadIO m => MonadIO (DeafT m) where
   liftIO = lift . liftIO
 
-instance Monad m => MonadPrinter (DeafT m) where
+instance Monad m => ChPrinter (DeafT m) where
   mprint _ = return ()
 
 -- Definition of OutRedirT + instances
@@ -87,7 +87,7 @@
 instance MonadIO m => MonadIO (OutRedirT m) where
   liftIO = lift . liftIO
 
-instance MonadIO m => MonadPrinter (OutRedirT m) where
+instance MonadIO m => ChPrinter (OutRedirT m) where
   mprint s = OutRedir $ \h -> do liftIO $ hPutStr h s; return ((),h)
   mflush = OutRedir $ \h -> do liftIO $ hFlush h; return ((),h)
 
@@ -129,7 +129,7 @@
 instance MonadTrans RecorderT where
   lift m = Recorder $ \s -> do a <- m; return (a,s)
 
-instance Monad m => MonadPrinter (RecorderT m) where
+instance Monad m => ChPrinter (RecorderT m) where
   mprint s = Recorder $ \s' -> return ((),s:s')
 
 instance Monad m => Functor (RecorderT m) where
@@ -164,11 +164,11 @@
 runRecorderT = fmap (second Replayable) . flip runRecorderT' []
 
 -- | Line-terminating alternative to 'mprint'
-mprintLn :: MonadPrinter m => String -> m ()
+mprintLn :: ChPrinter m => String -> m ()
 mprintLn = mprint . (++"\n")
 
 -- | Line-terminating alternative to 'mnomask'
-mnomaskLn :: MonadPrinter m => String -> m ()
+mnomaskLn :: ChPrinter m => String -> m ()
 mnomaskLn = mnomask . (++"\n")
 
 -- Shell-like syntax
@@ -179,9 +179,9 @@
 -- | Class for all redirection targets.
 class RedirectionTarget t mt a r | t -> mt, t a -> r where
   -- | Overwriting redirection.
-  (.>.) :: (Functor m,MonadIO m,MonadPrinter (mt m)) => mt m a -> t -> m r
+  (.>.) :: (Functor m,MonadIO m,ChPrinter (mt m)) => mt m a -> t -> m r
   -- | Appending redirection.
-  (.>>.) :: (Functor m,MonadIO m,MonadPrinter (mt m)) => mt m a -> t -> m r
+  (.>>.) :: (Functor m,MonadIO m,ChPrinter (mt m)) => mt m a -> t -> m r
   (.>>.) = (.>.)
 instance RedirectionTarget DiscardO DeafT a a where
   m .>. _ = runDeafT m
@@ -190,3 +190,5 @@
 instance RedirectionTarget FilePath OutRedirT a a where
   m .>. fp = runOutRedirFT m fp WriteMode
   m .>>. fp = runOutRedirFT m fp AppendMode
+instance RedirectionTarget Handle OutRedirT a a where
+  m .>. fp = runOutRedirT m fp
diff --git a/Text/Chatty/Scanner.hs b/Text/Chatty/Scanner.hs
--- a/Text/Chatty/Scanner.hs
+++ b/Text/Chatty/Scanner.hs
@@ -32,7 +32,7 @@
 import System.IO
 
 -- | A typeclass for all monads that may read input.
-class Monad m => MonadScanner m where
+class Monad m => ChScanner m where
   -- | Read one single character
   mscan1 :: m Char
   -- | Lazily read all the input.
@@ -45,16 +45,16 @@
   -- | Input available yet?
   mready :: m Bool
 
--- MonadScanner instance for: IO
-instance MonadScanner IO where
+-- ChScanner instance for: IO
+instance ChScanner IO where
   mscan1 = getChar
   mscanL = getContents
   mscannable = fmap not isEOF
   mscanh = return $ Just stdin
   mready = hReady stdin
 
--- MonadScanner instance for: StateT String
-instance Monad m => MonadScanner (StateT String m) where
+-- ChScanner instance for: StateT String
+instance Monad m => ChScanner (StateT String m) where
   mscan1 = do
     c <- gets head
     modify tail
@@ -81,7 +81,7 @@
 instance Monad m => Functor (HereStringT m) where
   fmap f a = HereString $ \s -> do (a',s') <- runHereStringT a s; return (f a',s')
 
-instance Monad m => MonadScanner (HereStringT m) where
+instance Monad m => ChScanner (HereStringT m) where
   mscan1 = HereString $ \(s:ss) -> return (s,ss)
   mscanL = HereString $ \s -> return (s,[])
   mscannable = HereString $ \s -> return (not $ null s,s)
@@ -90,7 +90,7 @@
 instance MonadIO m => MonadIO (HereStringT m) where
   liftIO = lift . liftIO
 
-instance MonadFinalizer m => MonadFinalizer (HereStringT m) where
+instance ChFinalizer m => ChFinalizer (HereStringT m) where
   mqfh = lift . mqfh
   mfin = lift mfin
 
@@ -105,7 +105,7 @@
 instance MonadTrans QuietT where
   lift = Quiet
 
-instance Monad m => MonadScanner (QuietT m) where
+instance Monad m => ChScanner (QuietT m) where
   mscan1 = return undefined
   mscanL = return []
   mscannable = return False
@@ -130,7 +130,7 @@
 instance MonadIO m => MonadIO (InRedirT m) where
   liftIO = lift . liftIO
 
-instance MonadIO m => MonadScanner (InRedirT m) where
+instance MonadIO m => ChScanner (InRedirT m) where
   mscan1 = InRedir $ \h -> do c <- liftIO $ hGetChar h; return (c,h)
   mscanL = InRedir $ \h -> do s <- liftIO $ hGetContents h; return (s,h)
   mscannable = InRedir $ \h -> do b <- liftIO $ hIsEOF h; return (b,h)
@@ -140,7 +140,7 @@
 instance Monad m => Functor (InRedirT m) where
   fmap f a = InRedir $ \h -> do (a',h') <- runInRedirT' a h; return (f a',h')
 
-instance MonadFinalizer m => MonadFinalizer (InRedirT m) where
+instance ChFinalizer m => ChFinalizer (InRedirT m) where
   mqfh = lift . mqfh
   mfin = lift mfin
 
@@ -153,7 +153,7 @@
 runInRedir m h = withLazyIO $ runInRedirT m h
 
 -- | Run InRedirT with a filename
-runInRedirFT :: (Functor m,MonadIO m,MonadFinalizer m) => InRedirT m a -> FilePath -> m a
+runInRedirFT :: (Functor m,MonadIO m,ChFinalizer m) => InRedirT m a -> FilePath -> m a
 runInRedirFT m fp = do
   h <- liftIO $ openFile fp ReadMode
   a <- runInRedirT m h
@@ -166,7 +166,7 @@
 runInRedirF m fp = withLazyIO $ runInRedirFT m fp
 
 -- | Line-scanning alternative to mscan1/L
-mscanLn :: MonadScanner m => m String
+mscanLn :: ChScanner m => m String
 mscanLn = do
   h <- mscan1
   if h == '\n' then return ""
@@ -175,7 +175,7 @@
                  return (h:hs)
 
 -- | Scan a fixed number of chars
-mscanN :: MonadScanner m => Int -> m String
+mscanN :: ChScanner m => Int -> m String
 mscanN n
   | n > 0 = do
     b <- mscannable
@@ -192,14 +192,16 @@
 -- | Class for all primitive redirection sources.
 class RedirectionSource t mt a r | t -> mt, t a -> r where
   -- | Redirection
-  (.<.) :: (MonadFinalizer m,Functor m,MonadIO m,MonadScanner (mt m)) => mt m a -> t -> m a
+  (.<.) :: (ChFinalizer m,Functor m,MonadIO m,ChScanner (mt m)) => mt m a -> t -> m r
 instance RedirectionSource EmptyI QuietT a a where
   m .<. _ = runQuietT m
 instance RedirectionSource FilePath InRedirT a a where
   m .<. fp = runInRedirFT m fp
+instance RedirectionSource Handle InRedirT a a where
+  m .<. fp = runInRedirT m fp
 -- | Class for all Here-Documents
 class RedirectionHeredoc t mt a r | t -> mt, t a -> r where
   -- | Redirection
-  (.<<.) :: (Functor m,MonadScanner (mt m)) => mt m a -> t -> m a
+  (.<<.) :: (Functor m,ChScanner (mt m)) => mt m a -> t -> m r
 instance RedirectionHeredoc String HereStringT a a where
   m .<<. str = fmap fst $ runHereStringT m str
diff --git a/Text/Chatty/Scanner/Buffered.hs b/Text/Chatty/Scanner/Buffered.hs
--- a/Text/Chatty/Scanner/Buffered.hs
+++ b/Text/Chatty/Scanner/Buffered.hs
@@ -21,6 +21,7 @@
   along with Chatty. If not, see <http://www.gnu.org/licenses/>.
 -}
 
+-- | Provides a typeclass for buffered scanners as well as a buffering monad transformer.
 module Text.Chatty.Scanner.Buffered where
 
 import Control.Monad
@@ -29,19 +30,30 @@
 import Control.Monad.Trans.Class
 import Text.Chatty.Scanner
 
-class MonadScanner m => BufferedScanner m where
+-- | Typeclass for all buffered 'ChScanner's.
+class ChScanner m => ChBufferedScanner m where
+  -- | Scan the next character without removing it.
   mpeek1 :: m Char
+  -- | Prepend the given character to the scannable input.
   mprepend :: String -> m ()
 
-instance Monad m => BufferedScanner (StateT String m) where
+-- | Typeclass for all 'BufferedScanner's with support for pushing and popping.
+class ChBufferedScanner m => ChStackBufferedScanner m where
+  -- | Push the current input state to the stack.
+  mpush :: m ()
+  -- | Pop the previous input state from the stack.
+  mpop :: m ()
+
+instance Monad m => ChBufferedScanner (StateT String m) where
   mpeek1 = gets head
   mprepend s = modify (s++)
   
-instance Monad m => BufferedScanner (HereStringT m) where
+instance Monad m => ChBufferedScanner (HereStringT m) where
   mpeek1 = HereString $ \ss -> return (head ss, ss)
   mprepend s = HereString $ \ss -> return ((), s++ss)
 
-newtype ScannerBufferT m a = ScannerBuffer { runScannerBufferT :: String -> m (a,String) }
+-- | A buffering 'MonadScanner' transformer that lets you use 'mpeek1' and 'mprepend' everywhere.
+newtype ScannerBufferT m a = ScannerBuffer { runScannerBufferT :: [String] -> m (a,[String]) }
 
 instance Monad m => Monad (ScannerBufferT m) where
   return a = ScannerBuffer $ \s -> return (a,s)
@@ -53,17 +65,20 @@
 instance Monad m => Functor (ScannerBufferT m) where
   fmap = liftM
 
-instance MonadScanner m => MonadScanner (ScannerBufferT m) where
-  mscan1 = ScannerBuffer $ \ss -> (if null ss then do s <- mscan1; return (s,[]) else return (head ss,tail ss))
-  mscanL = ScannerBuffer $ \ss -> do l <- mscanL; return (ss++l, [])
-  mscannable = ScannerBuffer $ \ss -> (if null ss then do b <- mscannable; return (b,[]) else return (True,ss))
+instance ChScanner m => ChScanner (ScannerBufferT m) where
+  mscan1 = ScannerBuffer $ \(ss:sx) -> (if null ss then do s <- mscan1; return (s,[]:map (s:) sx) else return (head ss,tail ss:map (head ss:) sx))
+  mscanL = ScannerBuffer $ \(ss:sx) -> do l <- mscanL; return (ss++l, []:map (++l) sx)
+  mscannable = ScannerBuffer $ \(ss:sx) -> (if null ss then do b <- mscannable; return (b,[]:sx) else return (True,ss:sx))
   mscanh = return Nothing
-  mready = ScannerBuffer $ \ss -> (if null ss then do b <- mready; return (b,[]) else return (True,ss))
+  mready = ScannerBuffer $ \(ss:sx) -> (if null ss then do b <- mready; return (b,[]:sx) else return (True,ss:sx))
 
 instance MonadIO m => MonadIO (ScannerBufferT m) where
   liftIO = lift . liftIO
 
-instance MonadScanner m => BufferedScanner (ScannerBufferT m) where
-  mpeek1 = ScannerBuffer $ \ss -> (if null ss then do s <- mscan1; return (s,[s]) else return (head ss,ss))
-  mprepend s = ScannerBuffer $ \ss -> return ((),s++ss)
+instance ChScanner m => ChBufferedScanner (ScannerBufferT m) where
+  mpeek1 = ScannerBuffer $ \(ss:sx) -> (if null ss then do s <- mscan1; return (s,[s]:sx) else return (head ss,ss:sx))
+  mprepend s = ScannerBuffer $ \(ss:sx) -> return ((),(s++ss):sx)
 
+instance ChScanner m => ChStackBufferedScanner (ScannerBufferT m) where
+  mpush = ScannerBuffer $ \(ss:sx) -> return ((),ss:[]:sx)
+  mpop = ScannerBuffer $ \(_:sx) -> return ((),sx)
diff --git a/Text/Chatty/Typograph.hs b/Text/Chatty/Typograph.hs
deleted file mode 100644
--- a/Text/Chatty/Typograph.hs
+++ /dev/null
@@ -1,60 +0,0 @@
-{-# LANGUAGE ScopedTypeVariables #-}
-
-{-
-  This module is part of Chatty.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Chatty 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.
-
-  Chatty 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 Chatty. If not, see <http://www.gnu.org/licenses/>.
--}
-
-module Text.Chatty.Typograph where
-
-import Control.Monad
-import Control.Monad.Trans.Class
-import Data.Char
-import Text.Chatty.Interactor
-import Text.Chatty.Printer
-import Text.Chatty.Scanner
-import Text.Chatty.Scanner.Buffered
-
-simpleTypesetter :: (Functor m,MonadScanner m,MonadPrinter m) => Int -> m ()
-simpleTypesetter width = void $ runScannerBufferT (typeset width) ""
-  where scanw = mscannable >>= \b -> if not b then return [] else do
-          k <- mpeek1
-          if isSpace k then return [] else do
-            mscan1
-            ks <- scanw
-            return (k:ks)
-        skipw :: BufferedScanner m => m Int
-        skipw = mscannable >>= \b -> if not b then return 0 else do
-          k <- mpeek1
-          if not (isSpace k) then return 0 else do
-            mscan1
-            w <- skipw
-            return (w + if k == '\n' then 1 else 0)
-        tsetw i w
-          | length w < i = mprint (w ++ " ") >> typeset (i - 1 - length w)
-          | length w == i = mprintLn w >> typeset width
-          | length w > width && i == width = mprintLn (take i w) >> tsetw width (drop i w)
-          | otherwise = mprintLn "" >> tsetw width w
-        typeset i = mscannable >>= \b -> when b $ do
-          ls <- skipw
-          if ls > 0
-            then forM_ [1..ls] (const $ mprintLn "") >> typeset width
-            else do
-              w <- scanw
-              tsetw i w
diff --git a/chatty.cabal b/chatty.cabal
--- a/chatty.cabal
+++ b/chatty.cabal
@@ -10,13 +10,14 @@
 -- PVP summary:      +-+------- breaking API changes
 --                   | | +----- non-breaking API additions
 --                   | | | +--- code changes with no API change
-version:             0.5.5.1
+version:             0.6
 
 -- A short (one-line) description of the package.
-synopsis:            Some monad transformers and typeclasses to simplify I/O on a transformer stack.
+synopsis:            Some monad transformers and typeclasses for abstraction of global dependencies.
 
 -- A longer description of the package.
-description:         Some monad transformers and typeclasses for text in- and output on a function scope, including features like here-strings, file redirection, pipes and string expansion. Works best on a transformer stack.
+description:         Some monad transformers and typeclasses abstracting global dependencies, like Text in- and output (incl. here-strings, pipes, recorders and file-redirections on a per-function scope),
+                     process spawning, time and random number retrieval. Later also: Filesystem access, database access, authentication and privilege escalation (passing-through IO actions).
 
 -- The license under which the package is released.
 license:             AGPL-3
@@ -48,7 +49,7 @@
 
 library
   -- Modules exported by the library.
-  exposed-modules:     Text.Chatty.Expansion, System.Chatty.Commands, System.Chatty.Spawn, Text.Chatty.Printer, Text.Chatty.Finalizer, Text.Chatty.Templates, Text.Chatty.Scanner, Text.Chatty.Interactor, System.Chatty.Spawn.Overlay, System.Chatty.Spawn.Builtins, Text.Chatty.Interactor.Templates, System.Chatty.Misc, Text.Chatty.Extended.Printer, Text.Chatty.Extended.HTML, Text.Chatty.Extended.ANSI, Text.Chatty.Expansion.Vars, Text.Chatty.Expansion.History, Text.Chatty.Channel.Printer, Text.Chatty.Channel.Broadcast, Text.Chatty.Scanner.Buffered, Text.Chatty.Typograph, Text.Chatty.Parser.Nondeterministic, Text.Chatty.Parser
+  exposed-modules:     Text.Chatty.Expansion, System.Chatty.Commands, System.Chatty.Spawn, Text.Chatty.Printer, Text.Chatty.Finalizer, Text.Chatty.Templates, Text.Chatty.Scanner, Text.Chatty.Interactor, System.Chatty.Spawn.Overlay, System.Chatty.Spawn.Builtins, Text.Chatty.Interactor.Templates, System.Chatty.Misc, Text.Chatty.Extended.Printer, Text.Chatty.Extended.HTML, Text.Chatty.Extended.ANSI, Text.Chatty.Expansion.Vars, Text.Chatty.Expansion.History, Text.Chatty.Channel.Printer, Text.Chatty.Channel.Broadcast, Text.Chatty.Scanner.Buffered
   
   -- Modules included in this library but not exported.
   -- other-modules:       
