Idris2/libs/prelude/Prelude/Ops.idr
observant 1e6e125190
Add pipeline operators (#3284)
* Add pipeline operators

* Fix tests

* Change fixity, add tests

* [ fix ] silence actual fixity

---------

Co-authored-by: itmuckel <18561536+itmuckel@users.noreply.github.com>
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
2024-06-06 10:59:30 +01:00

32 lines
591 B
Idris

module Prelude.Ops
-- Numerical operators
export infix 6 ==, /=, <, <=, >, >=
export infixl 8 +, -
export infixl 9 *, /
-- Boolean operators
export infixr 5 &&
export infixr 4 ||
-- List and String operators
export infixr 7 ::, ++
export infixl 7 :<
-- Equivalence
export infix 0 <=>
-- Functor/Applicative/Monad/Algebra operators
export infixl 1 >>=, =<<, >>, >=>, <=<, <&>
export infixr 2 <|>
export infixl 3 <*>, *>, <*
export infixr 4 <$>, $>, <$
export infixl 8 <+>
-- Utility operators
export infixr 9 ., .:
export infixr 0 $, <|
export infixl 0 |>
export infixl 9 `div`, `mod`