hbro- Minimal extensible web-browser

Safe HaskellNone




Replacement for the traditional Prelude module. This module doesn't import any other Hbro.* module, so it can be safely imported from anywhere in the project.



class Describable a where

Like Show, for Text


describe :: a -> Text


Describable () 
Describable Config 
Describable KeyVal

Single characters are returned as is. For other keys, the corresponding keyName wrapped into <> is returned.

Describable KeyStroke 
Describable Modifier 
Describable ResourceAction 
Event e => Describable (Signal e) 
Describable (Modifier, KeyVal) 

type BaseIO m = (MonadBase IO m, MonadIO m)

Mix of MonadBase IO and MonadIO

type ControlIO m = (MonadBaseControl IO m, MonadIO m)

Mix of MonadBaseControl IO and MonadIO

Generic aliases/shortcuts

(|:) :: [a] -> a -> NonEmpty a

Build a NonEmpty from the right

(>:) :: a -> b -> (a, b) infix 0

Infix equivalent for (,)

io :: MonadIO m => IO a -> m a

Alias for liftIO

(>/>) :: MonadIO m => IO FilePath -> FilePath -> m FilePath

Like '(</>)' with first argument in IO to build platform-dependent paths.

abort :: MonadPlus m => m a

Alias for mzero

doNothing :: Monad m => m ()

Alias for return ()

Lens util

withM :: Profunctor p => Over p (WrappedMonad m) s t a b -> p a (m b) -> s -> m t

Alias for mapMOf

withM_ :: Monad m => Over (->) (WrappedMonad m) s t a a -> (a -> m ()) -> s -> m t

fwd :: Monad m => (a -> m ()) -> a -> m a