packages feed

MicroHs-0.17.4.0 / lib / Data / Function.hs

-- Copyright 2023 Lennart Augustsson-- See LICENSE file for full license.module Data.Function(module Data.Function) whereimport qualified Prelude()              -- do not import Preludeimport Primitivesimport Data.Bool_Type--import Data.Tupleinfixr 0 $($) :: forall a b . (a -> b) -> a -> b($) f x = f xinfixr 0 $!($!) :: forall a b . (a -> b) -> a -> b($!) f x = x `primSeq` f xinfixr 9 .(.) :: forall a b c . (b -> c) -> (a -> b) -> (a -> c)(.) f g x = f (g x)id :: forall a . a -> aid x = xconst :: forall a b . a -> b -> aconst x _ = xflip :: forall a b c . (b -> a -> c) -> a -> b -> cflip f a b = f b afix :: forall a . (a -> a) -> afix = primFixinfixl 0 `on`on :: forall a b c . (a -> a -> b) -> (c -> a) -> (c -> c -> b)on op sel x y = op (sel x) (sel y)asTypeOf :: forall a . a -> a -> aasTypeOf = constinfixr 0 `seq`seq :: forall a b . a -> b -> bseq = primSequntil :: forall a . (a -> Bool) -> (a -> a) -> a -> auntil p f = rec  where    rec x = if p x then x else rec (f x)infixl 1 &(&) :: forall a b . a -> (a -> b) -> b(&) x f = f xapplyWhen :: forall a . Bool -> (a -> a) -> a -> aapplyWhen True  f x = f xapplyWhen False _ x = x