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