From 36021097e17ab1cfa971564cb70128d704e88f2d Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 19 Oct 2020 17:04:16 -0400 Subject: Remove $ from Alpha --- Alpha.hs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Alpha.hs') diff --git a/Alpha.hs b/Alpha.hs index 934cc31..e19f9be 100644 --- a/Alpha.hs +++ b/Alpha.hs @@ -46,13 +46,11 @@ module Alpha ) where -import Data.Function ((&)) -import Data.Functor ((<&>)) import Data.String import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.Lazy as LazyText -import Protolude as X +import Protolude as X hiding (($), (&)) -- | Debugging printf say :: Text -> IO () @@ -60,7 +58,7 @@ say = putText -- | Alias for map, fmap, <$> ( (a -> b) -> f a -> f b -( b) -> a -> b -(<|) = ($) +f <| g = f (g) infixr 0 <| -- | Reverse function application. Do the left side, then pass the -- return value to the function on the right side. (|>) :: a -> (a -> b) -> b -(|>) = (&) +f |> g = g (f) -- | Alias for <&>. Can be read as "and then". Basically does into a -- functor, does some computation, then returns the same kind of -- functor. Could also be defined as `f >>= return . g` (/>) :: Functor f => f a -> (a -> b) -> f b -(/>) = (<&>) +f /> g = fmap g f -- | Removes newlines from text. chomp :: Text -> Text -- cgit v1.2.3