shithub: MicroHs

ref: e2ca4b93e4deb4d3c390caf5de467430925dffa3
dir: /tests/Infix.hs/

View raw version
module Infix(main) where
import Prelude

infix 1 ===
infixl 2 +++
infixr 3 &&&

(===) :: Int -> Int -> Bool
x === y = x == y+1

(+++) :: Int -> Int -> Int
a +++ b = a + b + 1

(&&&) :: Int -> Int -> Int
a &&& b = a * (b + 1)

main :: IO ()
main = do
  putStrLn $ show $ 2 +++ 3 &&& 4 === 17