Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. type (f :: Type -> Type) $ a = f a

    data-effects-core Control.Effect

    Type-level infix applcation for functors.

  2. ($) :: (a -> b) -> a -> b

    mixed-types-num Numeric.MixedTypes.PreludeHiding

    ($) is the function application operator. Applying ($) to a function f and an argument x gives the same result as applying f to x directly. The definition is akin to this:

    ($) :: (a -> b) -> a -> b
    ($) f x = f x
    
    This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b. On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell. The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:
    expr = min 5 1 + 5
    expr = ((min 5) 1) + 5
    
    ($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:
    expr = min 5 $ 1 + 5
    expr = (min 5) (1 + 5)
    

    Examples

    A common use cases of ($) is to avoid parentheses in complex expressions. For example, instead of using nested parentheses in the following Haskell function:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum (mapMaybe readMaybe (words s))
    
    we can deploy the function application operator:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum $ mapMaybe readMaybe $ words s
    
    ($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:
    applyFive :: [Int]
    applyFive = map ($ 5) [(+1), (2^)]
    >>> [6, 32]
    

    Technical Remark (Representation Polymorphism)

    ($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:
    fastMod :: Int -> Int -> Int
    fastMod (I# x) (I# m) = I# $ remInt# x m
    

  3. ($) :: (a -> b) -> a -> b

    LambdaHack Game.LambdaHack.Core.Prelude

    ($) is the function application operator. Applying ($) to a function f and an argument x gives the same result as applying f to x directly. The definition is akin to this:

    ($) :: (a -> b) -> a -> b
    ($) f x = f x
    
    This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b. On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell. The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:
    expr = min 5 1 + 5
    expr = ((min 5) 1) + 5
    
    ($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:
    expr = min 5 $ 1 + 5
    expr = (min 5) (1 + 5)
    

    Examples

    A common use cases of ($) is to avoid parentheses in complex expressions. For example, instead of using nested parentheses in the following Haskell function:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum (mapMaybe readMaybe (words s))
    
    we can deploy the function application operator:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum $ mapMaybe readMaybe $ words s
    
    ($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:
    applyFive :: [Int]
    applyFive = map ($ 5) [(+1), (2^)]
    >>> [6, 32]
    

    Technical Remark (Representation Polymorphism)

    ($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:
    fastMod :: Int -> Int -> Int
    fastMod (I# x) (I# m) = I# $ remInt# x m
    

  4. ($) :: (a -> b) -> a -> b

    cabal-install-solver Distribution.Solver.Compat.Prelude

    ($) is the function application operator. Applying ($) to a function f and an argument x gives the same result as applying f to x directly. The definition is akin to this:

    ($) :: (a -> b) -> a -> b
    ($) f x = f x
    
    This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b. On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell. The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:
    expr = min 5 1 + 5
    expr = ((min 5) 1) + 5
    
    ($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:
    expr = min 5 $ 1 + 5
    expr = (min 5) (1 + 5)
    

    Examples

    A common use cases of ($) is to avoid parentheses in complex expressions. For example, instead of using nested parentheses in the following Haskell function:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum (mapMaybe readMaybe (words s))
    
    we can deploy the function application operator:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum $ mapMaybe readMaybe $ words s
    
    ($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:
    applyFive :: [Int]
    applyFive = map ($ 5) [(+1), (2^)]
    >>> [6, 32]
    

    Technical Remark (Representation Polymorphism)

    ($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:
    fastMod :: Int -> Int -> Int
    fastMod (I# x) (I# m) = I# $ remInt# x m
    

  5. type (f :: Type -> Type) $ a = f a

    heftia Control.Monad.Hefty

    Type-level infix applcation for functors.

  6. type (f :: Type -> Type) $ a = f a

    heftia Control.Monad.Hefty

    Type-level infix applcation for functors.

  7. ($) :: (a -> b) -> a -> b

    ihaskell IHaskellPrelude

    ($) is the function application operator. Applying ($) to a function f and an argument x gives the same result as applying f to x directly. The definition is akin to this:

    ($) :: (a -> b) -> a -> b
    ($) f x = f x
    
    This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b. On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell. The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:
    expr = min 5 1 + 5
    expr = ((min 5) 1) + 5
    
    ($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:
    expr = min 5 $ 1 + 5
    expr = (min 5) (1 + 5)
    

    Examples

    A common use cases of ($) is to avoid parentheses in complex expressions. For example, instead of using nested parentheses in the following Haskell function:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum (mapMaybe readMaybe (words s))
    
    we can deploy the function application operator:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum $ mapMaybe readMaybe $ words s
    
    ($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:
    applyFive :: [Int]
    applyFive = map ($ 5) [(+1), (2^)]
    >>> [6, 32]
    

    Technical Remark (Representation Polymorphism)

    ($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:
    fastMod :: Int -> Int -> Int
    fastMod (I# x) (I# m) = I# $ remInt# x m
    

  8. ($) :: (a -> b) -> a -> b

    incipit-base Incipit.Base

    ($) is the function application operator. Applying ($) to a function f and an argument x gives the same result as applying f to x directly. The definition is akin to this:

    ($) :: (a -> b) -> a -> b
    ($) f x = f x
    
    This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b. On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell. The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:
    expr = min 5 1 + 5
    expr = ((min 5) 1) + 5
    
    ($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:
    expr = min 5 $ 1 + 5
    expr = (min 5) (1 + 5)
    

    Examples

    A common use cases of ($) is to avoid parentheses in complex expressions. For example, instead of using nested parentheses in the following Haskell function:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum (mapMaybe readMaybe (words s))
    
    we can deploy the function application operator:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum $ mapMaybe readMaybe $ words s
    
    ($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:
    applyFive :: [Int]
    applyFive = map ($ 5) [(+1), (2^)]
    >>> [6, 32]
    

    Technical Remark (Representation Polymorphism)

    ($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:
    fastMod :: Int -> Int -> Int
    fastMod (I# x) (I# m) = I# $ remInt# x m
    

  9. ($) :: (a -> b) -> a -> b

    clash-prelude Clash.HaskellPrelude

    ($) is the function application operator. Applying ($) to a function f and an argument x gives the same result as applying f to x directly. The definition is akin to this:

    ($) :: (a -> b) -> a -> b
    ($) f x = f x
    
    This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b. On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell. The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:
    expr = min 5 1 + 5
    expr = ((min 5) 1) + 5
    
    ($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:
    expr = min 5 $ 1 + 5
    expr = (min 5) (1 + 5)
    

    Examples

    A common use cases of ($) is to avoid parentheses in complex expressions. For example, instead of using nested parentheses in the following Haskell function:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum (mapMaybe readMaybe (words s))
    
    we can deploy the function application operator:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum $ mapMaybe readMaybe $ words s
    
    ($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:
    applyFive :: [Int]
    applyFive = map ($ 5) [(+1), (2^)]
    >>> [6, 32]
    

    Technical Remark (Representation Polymorphism)

    ($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:
    fastMod :: Int -> Int -> Int
    fastMod (I# x) (I# m) = I# $ remInt# x m
    

  10. ($) :: (a -> b) -> a -> b

    dimensional Numeric.Units.Dimensional.Prelude

    ($) is the function application operator. Applying ($) to a function f and an argument x gives the same result as applying f to x directly. The definition is akin to this:

    ($) :: (a -> b) -> a -> b
    ($) f x = f x
    
    This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b. On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell. The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:
    expr = min 5 1 + 5
    expr = ((min 5) 1) + 5
    
    ($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:
    expr = min 5 $ 1 + 5
    expr = (min 5) (1 + 5)
    

    Examples

    A common use cases of ($) is to avoid parentheses in complex expressions. For example, instead of using nested parentheses in the following Haskell function:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum (mapMaybe readMaybe (words s))
    
    we can deploy the function application operator:
    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum $ mapMaybe readMaybe $ words s
    
    ($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:
    applyFive :: [Int]
    applyFive = map ($ 5) [(+1), (2^)]
    >>> [6, 32]
    

    Technical Remark (Representation Polymorphism)

    ($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:
    fastMod :: Int -> Int -> Int
    fastMod (I# x) (I# m) = I# $ remInt# x m
    

Page 4 of many | Previous | Next