on c19392f help sign in
elk/src/Elm/Utils.hs
36 lines 592 B history raw
1{-# OPTIONS_GHC -Wall #-}
2module Elm.Utils
3 ( (|>), (<|)
4 , drawCycle
5 , nearbyNames
6 , Entry(..)
7 , parseEntry
8 )
9 where
12import Parse.Repl (Entry(..), parseEntry)
13import Reporting.Helpers (drawCycle, nearbyNames)
17-- PIPES
20{-| Forward function application `x |> f == f x`. This function is useful
21for avoiding parenthesis and writing code in a more natural way.
22-}
23(|>) :: a -> (a -> b) -> b
24x |> f = f x
27{-| Backward function application `f <| x == f x`. This function is useful for
28avoiding parenthesis.
29-}
30(<|) :: (a -> b) -> a -> b
31f <| x = f x
34infixr 0 <|
35infixl 0 |>