about summary refs log tree commit diff
path: root/src/Utils.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-28T17·46+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-28T17·47+0100
commit90a521c78f036e024454df39c3e3cd1180c90a74 (patch)
treebebdcc69bf9e525595d868829060fe05ae8e75b2 /src/Utils.hs
parent191205acaca88a059a824a2e5e22ab559293a3f1 (diff)
Create Utils module for (|>) operator
For the past 3-4 Haskell projects on which I've worked, I've tried to habituate
the usage of the (&) operator, but I find that -- as petty as it may sound -- I
don't like the way that it looks, and I end up avoiding using it as a result.

This time around, I'm aliasing it to (|>) (i.e. Elixir style), and I'm hoping to
use it more.
Diffstat (limited to 'src/Utils.hs')
-rw-r--r--src/Utils.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Utils.hs b/src/Utils.hs
new file mode 100644
index 000000000000..78ee93ec95de
--- /dev/null
+++ b/src/Utils.hs
@@ -0,0 +1,8 @@
+--------------------------------------------------------------------------------
+module Utils where
+--------------------------------------------------------------------------------
+import Data.Function ((&))
+--------------------------------------------------------------------------------
+
+-- | Prefer this operator to the ampersand for stylistic reasons.
+(|>) = (&)