diff options
Diffstat (limited to 'Alpha.hs')
-rw-r--r-- | Alpha.hs | 51 |
1 files changed, 28 insertions, 23 deletions
@@ -1,4 +1,5 @@ {-# LANGUAGE NoImplicitPrelude #-} + -- | Commonly useful functions, a Prelude replacement. -- -- This is designed to be imported everywhere, unqualified (generally @@ -16,32 +17,35 @@ -- It seems unnecessarily different at first but it makes things easier -- to read quickly. module Alpha - ( - -- * Re-export Protolude - module X - -- * Applying - , (<|) - , (|>) - -- * Mapping - , (/>) - , (</) - , (<//) - -- * Text - , chomp - , lchomp - , joinWith - -- * Debugging tools - , say + ( -- * Re-export Protolude + module X, + + -- * Applying + (<|), + (|>), + + -- * Mapping + (/>), + (</), + (<//), + + -- * Text + chomp, + lchomp, + joinWith, + + -- * Debugging tools + say, ) 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 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 -- | Debugging printf say :: Text -> IO () @@ -61,6 +65,7 @@ say msg = putStrLn msg -- return value to the function on the left side. (<|) :: (a -> b) -> a -> b (<|) = ($) + infixr 0 <| -- | Reverse function application. Do the left side, then pass the |