Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
a miniaml set of
Synopsis
- type WatchOpType = (Path Abs Dir, FilePath -> ErrIO (), [Glob])
- newtype Glob = Glob Text
- unGlob :: Glob -> Text
- multipleWatches :: [WatchOpType] -> ErrIO [ThreadId]
- twichDefault4ssg :: Options
- makeWatch :: a -> b -> c -> (a, b, c)
- startWatch2 :: (Show [Text], Show (Path Abs Dir)) => WatchOpType -> ErrIO ()
- setTwichAddModifyDelete :: (FilePath -> ErrIO ()) -> Dep -> Dep
- runErrorRepl :: Show a => a -> IO ()
- watchMain :: [WatchOpType] -> ErrIO () -> ErrIO ()
- forkIO :: IO () -> IO ThreadId
- killThread :: ThreadId -> IO ()
Documentation
multipleWatches :: [WatchOpType] -> ErrIO [ThreadId] Source #
startWatch2 :: (Show [Text], Show (Path Abs Dir)) => WatchOpType -> ErrIO () Source #
start watching for a set of files (glob patterns) in one directory essentially producing lines in the minimal twitch example with a single operation
runErrorRepl :: Show a => a -> IO () Source #
forkIO :: IO () -> IO ThreadId #
Creates a new thread to run the IO
computation passed as the
first argument, and returns the ThreadId
of the newly created
thread.
The new thread will be a lightweight, unbound thread. Foreign calls
made by this thread are not guaranteed to be made by any particular OS
thread; if you need foreign calls to be made by a particular OS
thread, then use forkOS
instead.
The new thread inherits the masked state of the parent (see
mask
).
The newly created thread has an exception handler that discards the
exceptions BlockedIndefinitelyOnMVar
, BlockedIndefinitelyOnSTM
, and
ThreadKilled
, and passes all other exceptions to the uncaught
exception handler.
killThread :: ThreadId -> IO () #
killThread
raises the ThreadKilled
exception in the given
thread (GHC only).
killThread tid = throwTo tid ThreadKilled