----------------------------------------------------------------------------- -- | -- Module : Data.Bool -- Copyright : (c) 2020-2021 EMQ Technologies Co., Ltd. -- License : BSD-style (see the LICENSE file) -- -- Maintainer : Feng Lee, feng@emqx.io -- Yang M, yangm@emqx.io -- Stability : experimental -- Portability : portable -- -- The Boolean datatype. -- ----------------------------------------------------------------------------- module Data.Bool where -- | An alias for `Boolean` type. type Bool = Boolean infixr 3 and as && infixr 2 or as || and :: Bool -> Bool -> Bool and true true = true and _ _ = false or :: Bool -> Bool -> Bool or false false = false or _ _ = true not :: Bool -> Bool not true = false not false = true -- | An alias for `true', which is used for guards. otherwise :: Bool otherwise = true