for function for #19
This commit is contained in:
@@ -17,6 +17,7 @@ module Protolude (
|
||||
print,
|
||||
throwIO,
|
||||
throwTo,
|
||||
foreach,
|
||||
show,
|
||||
|
||||
LText,
|
||||
@@ -393,6 +394,9 @@ throwIO = liftIO . Control.Exception.throwIO
|
||||
throwTo :: (X.MonadIO m, Exception e) => ThreadId -> e -> m ()
|
||||
throwTo tid e = liftIO (Control.Exception.throwTo tid e)
|
||||
|
||||
foreach :: Functor f => f a -> (a -> b) -> f b
|
||||
foreach = flip fmap
|
||||
|
||||
show :: (Show a, StringConv String b) => a -> b
|
||||
show x = toS (PBase.show x)
|
||||
{-# SPECIALIZE show :: Show a => a -> Text #-}
|
||||
|
||||
Reference in New Issue
Block a user