Hoogle Search
Within LTS Haskell 24.20 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
(
-<.> ) :: FilePath -> String -> FilePathrio RIO.FilePath Remove the current extension and add another, equivalent to replaceExtension.
"/directory/path.txt" -<.> "ext" == "/directory/path.ext" "/directory/path.txt" -<.> ".ext" == "/directory/path.ext" "foo.o" -<.> "c" == "foo.c"
(
<.> ) :: FilePath -> String -> FilePathrio RIO.FilePath Add an extension, even if there is already one there, equivalent to addExtension.
"/directory/path" <.> "ext" == "/directory/path.ext" "/directory/path" <.> ".ext" == "/directory/path.ext"
(
*. ) :: forall (v :: Type -> Type) n . (Functor v, Num n) => n -> Point v n -> Point v ndiagrams-lib Diagrams.Points Scale a point by a scalar. Specialized version of (*^).
(
<. ) :: Indexable i p => (Indexed i s t -> r) -> ((a -> b) -> s -> t) -> p a b -> rdiagrams-lib Diagrams.Prelude Compose an Indexed function with a non-indexed function. Mnemonically, the < points to the indexing we want to preserve.
>>> let nestedMap = (fmap Map.fromList . Map.fromList) [(1, [(10, "one,ten"), (20, "one,twenty")]), (2, [(30, "two,thirty"), (40,"two,forty")])] >>> nestedMap^..(itraversed<.itraversed).withIndex [(1,"one,ten"),(1,"one,twenty"),(2,"two,thirty"),(2,"two,forty")]
(
<.= ) :: MonadState s m => ASetter s s a b -> b -> m bdiagrams-lib Diagrams.Prelude Set with pass-through This is useful for chaining assignment without round-tripping through your Monad stack.
do x <- _2 <.= ninety_nine_bottles_of_beer_on_the_wall
If you do not need a copy of the intermediate result, then using l .= d will avoid unused binding warnings.(<.=) :: MonadState s m => Setter s s a b -> b -> m b (<.=) :: MonadState s m => Iso s s a b -> b -> m b (<.=) :: MonadState s m => Lens s s a b -> b -> m b (<.=) :: MonadState s m => Traversal s s a b -> b -> m b
(
<.~ ) :: ASetter s t a b -> b -> s -> (b, t)diagrams-lib Diagrams.Prelude Set with pass-through. This is mostly present for consistency, but may be useful for chaining assignments. If you do not need a copy of the intermediate result, then using l .~ t directly is a good idea.
>>> (a,b) & _1 <.~ c (c,(c,b))
>>> ("good","morning","vietnam") & _3 <.~ "world" ("world",("good","morning","world"))>>> (42,Map.fromList [("goodnight","gracie")]) & _2.at "hello" <.~ Just "world" (Just "world",(42,fromList [("goodnight","gracie"),("hello","world")]))(<.~) :: Setter s t a b -> b -> s -> (b, t) (<.~) :: Iso s t a b -> b -> s -> (b, t) (<.~) :: Lens s t a b -> b -> s -> (b, t) (<.~) :: Traversal s t a b -> b -> s -> (b, t)
(
<<.= ) :: MonadState s m => LensLike ((,) a) s s a b -> b -> m adiagrams-lib Diagrams.Prelude Replace the target of a Lens into your Monad's state with a user supplied value and return the old value that was replaced. When applied to a Traversal, this will return a monoidal summary of all of the old values present. When you do not need the result of the operation, (.=) is more flexible.
(<<.=) :: MonadState s m => Lens' s a -> a -> m a (<<.=) :: MonadState s m => Iso' s a -> a -> m a (<<.=) :: (MonadState s m, Monoid a) => Traversal' s a -> a -> m a
(
<<.~ ) :: LensLike ((,) a) s t a b -> b -> s -> (a, t)diagrams-lib Diagrams.Prelude Replace the target of a Lens, but return the old value. When you do not need the old value, (.~) is more flexible.
(<<.~) :: Lens s t a b -> b -> s -> (a, t) (<<.~) :: Iso s t a b -> b -> s -> (a, t) (<<.~) :: Monoid a => Traversal s t a b -> b -> s -> (a, t)
(
^. ) :: s -> Getting a s a -> adiagrams-lib Diagrams.Prelude View the value pointed to by a Getter or Lens or the result of folding over all the results of a Fold or Traversal that points at a monoidal values. This is the same operation as view with the arguments flipped. The fixity and semantics are such that subsequent field accesses can be performed with (.).
>>> (a,b)^._2 b
>>> ("hello","world")^._2 "world">>> import Data.Complex >>> ((0, 1 :+ 2), 3)^._1._2.to magnitude 2.23606797749979
(^.) :: s -> Getter s a -> a (^.) :: Monoid m => s -> Fold s m -> m (^.) :: s -> Iso' s a -> a (^.) :: s -> Lens' s a -> a (^.) :: Monoid m => s -> Traversal' s m -> m
(
^.. ) :: s -> Getting (Endo [a]) s a -> [a]diagrams-lib Diagrams.Prelude A convenient infix (flipped) version of toListOf.
>>> [[1,2],[3]]^..id [[[1,2],[3]]] >>> [[1,2],[3]]^..traverse [[1,2],[3]] >>> [[1,2],[3]]^..traverse.traverse [1,2,3]
>>> (1,2)^..both [1,2]
toList xs ≡ xs ^.. folded (^..) ≡ flip toListOf
(^..) :: s -> Getter s a -> a :: s -> Fold s a -> a :: s -> Lens' s a -> a :: s -> Iso' s a -> a :: s -> Traversal' s a -> a :: s -> Prism' s a -> [a]