-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A small prelude.
--   
--   A sensible set of defaults for writing custom Preludes.
@package protolude
@version 0.2

module Unsafe
unsafeHead :: [a] -> a
unsafeTail :: [a] -> [a]
unsafeInit :: [a] -> [a]
unsafeLast :: [a] -> a
unsafeFromJust :: Maybe a -> a
unsafeIndex :: [a] -> Int -> a
unsafeThrow :: Exception e => e -> a

module Protolude
($!) :: (a -> b) -> a -> b
infixr 0 $!
identity :: a -> a
map :: Functor f => (a -> b) -> f a -> f b
uncons :: [a] -> Maybe (a, [a])
unsnoc :: [x] -> Maybe ([x], x)
applyN :: Int -> (a -> a) -> a -> a
print :: (MonadIO m, Show a) => a -> m ()
throwIO :: (MonadIO m, Exception e) => e -> m a
throwTo :: (MonadIO m, Exception e) => ThreadId -> e -> m ()
foreach :: Functor f => f a -> (a -> b) -> f b

-- | Infix version of foreach.
--   
--   <tt><a>&amp;</a></tt> is to <a>&lt;$&gt;</a> what <a>&amp;</a> is to
--   <a>$</a>.
(<&>) :: Functor f => f a -> (a -> b) -> f b
infixl 4 <&>
show :: (Show a, StringConv String b) => a -> b

-- | Do nothing returning unit inside applicative.
pass :: Applicative f => f ()
guarded :: (Alternative f) => (a -> Bool) -> a -> f a
guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a)
type LText = Text
type LByteString = ByteString

-- | Lift an <a>IO</a> operation with 1 argument into another monad
liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b

-- | Lift an <a>IO</a> operation with 2 arguments into another monad
liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c
die :: Text -> IO a
