From ee06770742861bda1adb243ce49d464b2ac9193e Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 11:00:42 +0100 Subject: [PATCH] ``pass`` function, fixes #25 . --- src/Protolude.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 2ac666b97..4740ee295 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -19,6 +19,7 @@ module Protolude ( throwTo, foreach, show, + pass, LText, LByteString, @@ -397,6 +398,9 @@ throwTo tid e = liftIO (Control.Exception.throwTo tid e) foreach :: Functor f => f a -> (a -> b) -> f b foreach = flip fmap +pass :: Applicative f => f () +pass = pure () + show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> Text #-}