for function for #19

This commit is contained in:
Stephen Diehl
2016-09-14 09:47:47 +01:00
parent e14e1e3613
commit 36b56ad3a2
+4
View File
@@ -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 #-}