summaryrefslogtreecommitdiff
path: root/Alpha.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-04-15 10:06:24 -0700
committerBen Sima <ben@bsima.me>2020-04-15 10:07:02 -0700
commitafa9d701538b9e56622a0bfdf8e04aa358c9cd82 (patch)
treedee95c3955b3fe3d11e80d89823660d28eee0587 /Alpha.hs
parentf4b8c0df041b063c0b47d2ec6c818a9c202fd833 (diff)
Reformatting
Now I'm using ormolu instead of brittany for Haskell formatting now. Figured I should just make all of these big changes at once.
Diffstat (limited to 'Alpha.hs')
-rw-r--r--Alpha.hs51
1 files changed, 28 insertions, 23 deletions
diff --git a/Alpha.hs b/Alpha.hs
index fe5c9df..8f823da 100644
--- a/Alpha.hs
+++ b/Alpha.hs
@@ -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