Hoogle Search

Within LTS Haskell 24.42 (ghc-9.10.3)

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

  1. (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d

    composition Data.Composition

    Compose two functions. f .: g is similar to f . g except that g will be fed two arguments instead of one before handing its result to f. This function is defined as

    (f .: g) x y = f (g x y)
    
    Example usage:
    concatMap :: (a -> [b]) -> [a] -> [b]
    concatMap = concat .: map
    
    Notice how two arguments (the function and the list) will be given to map before the result is passed to concat. This is equivalent to:
    concatMap f xs = concat (map f xs)
    

  2. (.:.) :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e

    composition Data.Composition

    One compact pattern for composition operators is to "count the dots after the first one", which begins with the common .:, and proceeds by first appending another . and then replacing it with :

  3. (.::) :: (d -> e) -> (a1 -> a2 -> b -> c -> d) -> a1 -> a2 -> b -> c -> e

    composition Data.Composition

    No documentation available.

  4. (.::.) :: (d -> e) -> (a1 -> a2 -> a3 -> b -> c -> d) -> a1 -> a2 -> a3 -> b -> c -> e

    composition Data.Composition

    No documentation available.

  5. (.:::) :: (d -> e) -> (a1 -> a2 -> a3 -> a4 -> b -> c -> d) -> a1 -> a2 -> a3 -> a4 -> b -> c -> e

    composition Data.Composition

    No documentation available.

  6. (.:::.) :: (d -> e) -> (a1 -> a2 -> a3 -> a4 -> a5 -> b -> c -> d) -> a1 -> a2 -> a3 -> a4 -> a5 -> b -> c -> e

    composition Data.Composition

    No documentation available.

  7. (.::::) :: (d -> e) -> (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> b -> c -> d) -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> b -> c -> e

    composition Data.Composition

    No documentation available.

  8. (.::::.) :: (d -> e) -> (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> b -> c -> d) -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> b -> c -> e

    composition Data.Composition

    No documentation available.

  9. (%::) :: (Alternative f, Applicative f) => Lens' a b -> f (b -> b) -> f (a -> a)

    configuration-tools Configuration.Utils.CommandLine

    An operator for applying a setter to an option parser that yields a modification function. Example usage:

    data HttpURL = HttpURL
    { _auth ∷ !Auth
    , _domain ∷ !String
    }
    
    auth ∷ Functor f ⇒ (Auth → f Auth) → HttpURL → f HttpURL
    auth f s = (\u → s { _auth = u }) <$> f (_auth s)
    
    domain ∷ Functor f ⇒ (String → f String) → HttpURL → f HttpURL
    domain f s = (\u → s { _domain = u }) <$> f (_domain s)
    
    path ∷ Functor f ⇒ (String → f String) → HttpURL → f HttpURL
    path f s = (\u → s { _path = u }) <$> f (_path s)
    
    -- or with lenses and TemplateHaskell just:
    -- $(makeLenses ''HttpURL)
    
    pHttpURL ∷ MParser HttpURL
    pHttpURL = id
    <$< auth %:: pAuth
    <*< domain .:: strOption
    % long "domain"
    ⊕ short 'd'
    ⊕ help "HTTP domain"
    

  10. (.::) :: (Alternative f, Applicative f) => Lens' a b -> f b -> f (a -> a)

    configuration-tools Configuration.Utils.CommandLine

    An operator for applying a setter to an option parser that yields a value. Example usage:

    data Auth = Auth
    { _user ∷ !String
    , _pwd ∷ !String
    }
    
    user ∷ Functor f ⇒ (String → f String) → Auth → f Auth
    user f s = (\u → s { _user = u }) <$> f (_user s)
    
    pwd ∷ Functor f ⇒ (String → f String) → Auth → f Auth
    pwd f s = (\p → s { _pwd = p }) <$> f (_pwd s)
    
    -- or with lenses and TemplateHaskell just:
    -- $(makeLenses ''Auth)
    
    pAuth ∷ MParser Auth
    pAuth = id
    <$< user .:: strOption
    % long "user"
    ⊕ short 'u'
    ⊕ help "user name"
    <*< pwd .:: strOption
    % long "pwd"
    ⊕ help "password for user"
    

Page 95 of many | Previous | Next