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. firstDayOfWeekOnAfter :: DayOfWeek -> Day -> Day

    time Data.Time.Calendar

    The first day-of-week on or after some day

  2. first1Of :: Getting (First a) s a -> s -> a

    lens Control.Lens.Combinators

    Retrieve the First entry of a Fold1 or Traversal1 or the result from a Getter or Lens.

    >>> first1Of traverse1 (1 :| [2..10])
    1
    
    >>> first1Of both1 (1,2)
    1
    
    Note: this is different from ^..
    >>> first1Of traverse1 ([1,2] :| [[3,4],[5,6]])
    [1,2]
    
    >>> ([1,2] :| [[3,4],[5,6]]) ^. traverse1
    [1,2,3,4,5,6]
    
    first1Of :: Getter s a      -> s -> a
    first1Of :: Fold1 s a       -> s -> a
    first1Of :: Lens' s a       -> s -> a
    first1Of :: Iso' s a        -> s -> a
    first1Of :: Traversal1' s a -> s -> a
    

  3. firstOf :: Getting (Leftmost a) s a -> s -> Maybe a

    lens Control.Lens.Combinators

    Retrieve the First entry of a Fold or Traversal or retrieve Just the result from a Getter or Lens. The answer is computed in a manner that leaks space less than preview or ^?' and gives you back access to the outermost Just constructor more quickly, but does so in a way that builds an intermediate structure, and thus may have worse constant factors. This also means that it can not be used in any MonadReader, but must instead have s passed as its last argument, unlike preview. Note: this could been named headOf.

    >>> firstOf traverse [1..10]
    Just 1
    
    >>> firstOf both (1,2)
    Just 1
    
    >>> firstOf ignored ()
    Nothing
    
    firstOf :: Getter s a     -> s -> Maybe a
    firstOf :: Fold s a       -> s -> Maybe a
    firstOf :: Lens' s a      -> s -> Maybe a
    firstOf :: Iso' s a       -> s -> Maybe a
    firstOf :: Traversal' s a -> s -> Maybe a
    

  4. firsting :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b x y . (Bifunctor f, Bifunctor g) => AnIso s t a b -> Iso (f s x) (g t y) (f a x) (g b y)

    lens Control.Lens.Combinators

    Lift an Iso into the first argument of a Bifunctor.

    firsting :: Bifunctor p => Iso s t a b -> Iso (p s x) (p t y) (p a x) (p b y)
    firsting :: Bifunctor p => Iso' s a -> Iso' (p s x) (p a x)
    

  5. first1Of :: Getting (First a) s a -> s -> a

    lens Control.Lens.Fold

    Retrieve the First entry of a Fold1 or Traversal1 or the result from a Getter or Lens.

    >>> first1Of traverse1 (1 :| [2..10])
    1
    
    >>> first1Of both1 (1,2)
    1
    
    Note: this is different from ^..
    >>> first1Of traverse1 ([1,2] :| [[3,4],[5,6]])
    [1,2]
    
    >>> ([1,2] :| [[3,4],[5,6]]) ^. traverse1
    [1,2,3,4,5,6]
    
    first1Of :: Getter s a      -> s -> a
    first1Of :: Fold1 s a       -> s -> a
    first1Of :: Lens' s a       -> s -> a
    first1Of :: Iso' s a        -> s -> a
    first1Of :: Traversal1' s a -> s -> a
    

  6. firstOf :: Getting (Leftmost a) s a -> s -> Maybe a

    lens Control.Lens.Fold

    Retrieve the First entry of a Fold or Traversal or retrieve Just the result from a Getter or Lens. The answer is computed in a manner that leaks space less than preview or ^?' and gives you back access to the outermost Just constructor more quickly, but does so in a way that builds an intermediate structure, and thus may have worse constant factors. This also means that it can not be used in any MonadReader, but must instead have s passed as its last argument, unlike preview. Note: this could been named headOf.

    >>> firstOf traverse [1..10]
    Just 1
    
    >>> firstOf both (1,2)
    Just 1
    
    >>> firstOf ignored ()
    Nothing
    
    firstOf :: Getter s a     -> s -> Maybe a
    firstOf :: Fold s a       -> s -> Maybe a
    firstOf :: Lens' s a      -> s -> Maybe a
    firstOf :: Iso' s a       -> s -> Maybe a
    firstOf :: Traversal' s a -> s -> Maybe a
    

  7. firsting :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b x y . (Bifunctor f, Bifunctor g) => AnIso s t a b -> Iso (f s x) (g t y) (f a x) (g b y)

    lens Control.Lens.Iso

    Lift an Iso into the first argument of a Bifunctor.

    firsting :: Bifunctor p => Iso s t a b -> Iso (p s x) (p t y) (p a x) (p b y)
    firsting :: Bifunctor p => Iso' s a -> Iso' (p s x) (p a x)
    

  8. first' :: Strong p => p a b -> p (a, c) (b, c)

    profunctors Data.Profunctor

    Laws:

    first'dimap swap swap . second'
    lmap fstrmap fst . first'
    lmap (second' f) . first'rmap (second' f) . first'
    first' . first'dimap assoc unassoc . first' where
    assoc ((a,b),c) = (a,(b,c))
    unassoc (a,(b,c)) = ((a,b),c)
    

  9. firstRep :: Representable p => p a b -> p (a, c) (b, c)

    profunctors Data.Profunctor.Rep

    Default definition for first' given that p is Representable.

  10. first' :: Strong p => p a b -> p (a, c) (b, c)

    profunctors Data.Profunctor.Strong

    Laws:

    first'dimap swap swap . second'
    lmap fstrmap fst . first'
    lmap (second' f) . first'rmap (second' f) . first'
    first' . first'dimap assoc unassoc . first' where
    assoc ((a,b),c) = (a,(b,c))
    unassoc (a,(b,c)) = ((a,b),c)
    

Page 15 of many | Previous | Next