Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. ($>) :: Functor f => f a -> b -> f b

    semigroupoids Data.Functor.Apply

    Flipped version of <$.

    Examples

    Replace the contents of a Maybe Int with a constant String:
    >>> Nothing $> "foo"
    Nothing
    
    >>> Just 90210 $> "foo"
    Just "foo"
    
    Replace the contents of an Either Int Int with a constant String, resulting in an Either Int String:
    >>> Left 8675309 $> "foo"
    Left 8675309
    
    >>> Right 8675309 $> "foo"
    Right "foo"
    
    Replace each element of a list with a constant String:
    >>> [1,2,3] $> "foo"
    ["foo","foo","foo"]
    
    Replace the second element of a pair with a constant String:
    >>> (1,2) $> "foo"
    (1,"foo")
    

  2. ($>) :: Functor f => f a -> b -> f b

    semigroupoids Data.Functor.Bind

    Flipped version of <$.

    Examples

    Replace the contents of a Maybe Int with a constant String:
    >>> Nothing $> "foo"
    Nothing
    
    >>> Just 90210 $> "foo"
    Just "foo"
    
    Replace the contents of an Either Int Int with a constant String, resulting in an Either Int String:
    >>> Left 8675309 $> "foo"
    Left 8675309
    
    >>> Right 8675309 $> "foo"
    Right "foo"
    
    Replace each element of a list with a constant String:
    >>> [1,2,3] $> "foo"
    ["foo","foo","foo"]
    
    Replace the second element of a pair with a constant String:
    >>> (1,2) $> "foo"
    (1,"foo")
    

  3. ($>) :: Functor f => f a -> b -> f b

    base-compat Data.Functor.Compat

    Flipped version of <$.

    Examples

    Replace the contents of a Maybe Int with a constant String:
    >>> Nothing $> "foo"
    Nothing
    
    >>> Just 90210 $> "foo"
    Just "foo"
    
    Replace the contents of an Either Int Int with a constant String, resulting in an Either Int String:
    >>> Left 8675309 $> "foo"
    Left 8675309
    
    >>> Right 8675309 $> "foo"
    Right "foo"
    
    Replace each element of a list with a constant String:
    >>> [1,2,3] $> "foo"
    ["foo","foo","foo"]
    
    Replace the second element of a pair with a constant String:
    >>> (1,2) $> "foo"
    (1,"foo")
    

  4. ($>) :: Functor f => f a -> b -> f b

    comonad Control.Comonad

    Flipped version of <$.

    Examples

    Replace the contents of a Maybe Int with a constant String:
    >>> Nothing $> "foo"
    Nothing
    
    >>> Just 90210 $> "foo"
    Just "foo"
    
    Replace the contents of an Either Int Int with a constant String, resulting in an Either Int String:
    >>> Left 8675309 $> "foo"
    Left 8675309
    
    >>> Right 8675309 $> "foo"
    Right "foo"
    
    Replace each element of a list with a constant String:
    >>> [1,2,3] $> "foo"
    ["foo","foo","foo"]
    
    Replace the second element of a pair with a constant String:
    >>> (1,2) $> "foo"
    (1,"foo")
    

  5. ($$$) :: JsRender doc => doc -> doc -> doc

    ghc GHC.JS.Ppr

    Concatenate with an optional newline

  6. ($!) :: (a -> b) -> a -> b

    ghc GHC.Prelude.Basic

    No documentation available.

  7. ($$) :: IsDoc doc => doc -> doc -> doc

    ghc GHC.Utils.Outputable

    Join two docs together vertically. If there is no vertical overlap it "dovetails" the two onto one line.

  8. ($+$) :: SDoc -> SDoc -> SDoc

    ghc GHC.Utils.Outputable

    Join two SDoc together vertically

  9. ($$) :: Doc -> Doc -> Doc

    ghc GHC.Utils.Ppr

    Above, except that if the last line of the first argument stops at least one position before the first line of the second begins, these two lines are overlapped. For example:

    text "hi" $$ nest 5 (text "there")
    
    lays out as
    hi   there
    
    rather than
    hi
    there
    
    $$ is associative, with identity empty, and also satisfies
    • (x $$ y) <> z = x $$ (y <> z), if y non-empty.

  10. ($+$) :: Doc -> Doc -> Doc

    ghc GHC.Utils.Ppr

    Above, with no overlapping. $+$ is associative, with identity empty.

Page 9 of many | Previous | Next