Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Turtle
Contents
Description
See Turtle.Tutorial to learn how to use this library or Turtle.Prelude for a quick-start guide.
Here is the recommended way to import this library:
{-# LANGUAGE OverloadedStrings #-} import Turtle import Prelude hiding (FilePath)
This module re-exports the rest of the library and also re-exports useful
modules from base
:
Turtle.Format provides type-safe string formatting
Turtle.Pattern provides Pattern
s, which are like more powerful regular
expressions
Turtle.Shell provides a Shell
abstraction for building streaming,
exception-safe pipelines
Turtle.Prelude provides a library of Unix-like utilities to get you started with basic shell-like programming within Haskell
Control.Applicative provides two classes:
Applicative
, which works withFold
,Pattern
,Managed
, andShell
Alternative
, which works withPattern
andShell
Control.Monad provides two classes:
Control.Monad.IO.Class provides one class:
Data.Monoid provides one class:
Control.Monad.Managed.Safe provides Managed
resources
Additionally, you might also want to import the following modules qualified:
- Options.Applicative from
optparse-applicative
for command-line option parsing - Control.Foldl (for predefined folds)
- Control.Foldl.Text (for
Text
-specific folds) - Data.Text (for
Text
-manipulation utilities) - Data.Text.IO (for reading and writing
Text
)
Synopsis
- module Turtle.Format
- module Turtle.Pattern
- module Turtle.Options
- module Turtle.Shell
- module Turtle.Line
- module Turtle.Prelude
- class Functor f => Applicative (f :: Type -> Type) where
- class Applicative f => Alternative (f :: Type -> Type) where
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- optional :: Alternative f => f a -> f (Maybe a)
- class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where
- join :: Monad m => m (m a) -> m a
- msum :: (Foldable t, MonadPlus m) => t (m a) -> m a
- void :: Functor f => f a -> f ()
- when :: Applicative f => Bool -> f () -> f ()
- (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
- (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- replicateM_ :: Applicative m => Int -> m a -> m ()
- unless :: Applicative f => Bool -> f () -> f ()
- forever :: Applicative f => f a -> f b
- mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
- guard :: Alternative f => Bool -> f ()
- class Monad m => MonadIO (m :: Type -> Type) where
- liftIO :: IO a -> m a
- class Semigroup a => Monoid a where
- (<>) :: Semigroup a => a -> a -> a
- data Managed a
- managed :: MonadManaged m => (forall r. (a -> IO r) -> IO r) -> m a
- with :: Managed a -> (a -> IO r) -> IO r
- runManaged :: Managed () -> IO ()
- type FilePath = String
- (</>) :: FilePath -> FilePath -> FilePath
- (<.>) :: FilePath -> String -> FilePath
- dropExtension :: FilePath -> FilePath
- hasExtension :: FilePath -> Bool
- isAbsolute :: FilePath -> Bool
- isRelative :: FilePath -> Bool
- directory :: FilePath -> FilePath
- stripPrefix :: FilePath -> FilePath -> Maybe FilePath
- root :: FilePath -> FilePath
- parent :: FilePath -> FilePath
- filename :: FilePath -> FilePath
- dirname :: FilePath -> FilePath
- basename :: FilePath -> String
- absolute :: FilePath -> Bool
- relative :: FilePath -> Bool
- commonPrefix :: [FilePath] -> FilePath
- collapse :: FilePath -> FilePath
- splitDirectories :: FilePath -> [FilePath]
- extension :: FilePath -> Maybe String
- splitExtension :: FilePath -> (String, Maybe String)
- splitExtensions :: FilePath -> (String, [String])
- toText :: FilePath -> Either Text Text
- fromText :: Text -> FilePath
- encodeString :: FilePath -> String
- decodeString :: String -> FilePath
- data Fold a b = Fold (x -> a -> x) x (x -> b)
- data FoldM (m :: Type -> Type) a b = FoldM (x -> a -> m x) (m x) (x -> m b)
- data Text
- data UTCTime
- data NominalDiffTime
- data Handle
- data ExitCode
- = ExitSuccess
- | ExitFailure Int
- class IsString a where
- fromString :: String -> a
- (&) :: a -> (a -> b) -> b
- (<&>) :: Functor f => f a -> (a -> b) -> f b
Modules
module Turtle.Format
module Turtle.Pattern
module Turtle.Options
module Turtle.Shell
module Turtle.Line
module Turtle.Prelude
class Functor f => Applicative (f :: Type -> Type) where #
Instances
Applicative Concurrently | |
Defined in Control.Concurrent.Async Methods pure :: a -> Concurrently a # (<*>) :: Concurrently (a -> b) -> Concurrently a -> Concurrently b # liftA2 :: (a -> b -> c) -> Concurrently a -> Concurrently b -> Concurrently c # (*>) :: Concurrently a -> Concurrently b -> Concurrently b # (<*) :: Concurrently a -> Concurrently b -> Concurrently a # | |
Applicative ZipList | |
Applicative Complex | |
Applicative First | |
Applicative Last | |
Applicative Down | |
Applicative First | |
Applicative Last | |
Applicative Max | |
Applicative Min | |
Applicative Dual | |
Applicative Product | |
Applicative Sum | |
Applicative NonEmpty | |
Applicative STM | |
Applicative Par1 | |
Applicative P | |
Applicative ReadP | |
Applicative ReadPrec | |
Applicative Seq | |
Applicative Tree | |
Applicative IO | |
Applicative Managed | |
Applicative Optional | |
Applicative Parser | |
Applicative ParserM | |
Applicative ParserResult | |
Defined in Options.Applicative.Types Methods pure :: a -> ParserResult a # (<*>) :: ParserResult (a -> b) -> ParserResult a -> ParserResult b # liftA2 :: (a -> b -> c) -> ParserResult a -> ParserResult b -> ParserResult c # (*>) :: ParserResult a -> ParserResult b -> ParserResult b # (<*) :: ParserResult a -> ParserResult b -> ParserResult a # | |
Applicative ReadM | |
Applicative Q | |
Applicative Pattern # | |
Applicative Shell # | |
Applicative Stream | |
Applicative Maybe | |
Applicative Solo | |
Applicative List | |
Monad m => Applicative (WrappedMonad m) | |
Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a # | |
Arrow a => Applicative (ArrowMonad a) | |
Defined in Control.Arrow Methods pure :: a0 -> ArrowMonad a a0 # (<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b # liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c # (*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b # (<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 # | |
Applicative (Either e) | |
Applicative (Proxy :: Type -> Type) | |
Applicative (U1 :: Type -> Type) | |
Applicative (Fold a) | |
Applicative f => Applicative (Lift f) | |
(Functor m, Monad m) => Applicative (MaybeT m) | |
Monoid a => Applicative ((,) a) | |
Arrow a => Applicative (WrappedArrow a b) | |
Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # | |
Applicative m => Applicative (Kleisli m a) | |
Defined in Control.Arrow | |
Monoid m => Applicative (Const m :: Type -> Type) | |
Applicative f => Applicative (Ap f) | |
Applicative f => Applicative (Alt f) | |
(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f) | |
Defined in GHC.Generics Methods pure :: a -> Generically1 f a # (<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b # liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c # (*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b # (<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a # | |
Applicative f => Applicative (Rec1 f) | |
Biapplicative p => Applicative (Join p) | |
(Applicative f, Monad f) => Applicative (WhenMissing f x) | |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMissing f x a # (<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b # liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c # (*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b # (<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a # | |
Applicative m => Applicative (FoldM m a) | |
Applicative (Tagged s) | |
Applicative f => Applicative (Backwards f) | |
Defined in Control.Applicative.Backwards | |
(Monoid w, Functor m, Monad m) => Applicative (AccumT w m) | |
Defined in Control.Monad.Trans.Accum | |
(Functor m, Monad m) => Applicative (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
Applicative m => Applicative (IdentityT m) | |
Defined in Control.Monad.Trans.Identity | |
Applicative m => Applicative (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
(Functor m, Monad m) => Applicative (SelectT r m) | |
Defined in Control.Monad.Trans.Select | |
(Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Lazy | |
(Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict | |
(Functor m, Monad m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.CPS | |
(Monoid w, Applicative m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Lazy | |
(Monoid w, Applicative m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Strict | |
Monoid a => Applicative (Constant a :: Type -> Type) | |
Defined in Data.Functor.Constant | |
Applicative f => Applicative (Reverse f) | |
(Monoid a, Monoid b) => Applicative ((,,) a b) | |
(Applicative f, Applicative g) => Applicative (Product f g) | |
Defined in Data.Functor.Product | |
(Applicative f, Applicative g) => Applicative (f :*: g) | |
Monoid c => Applicative (K1 i c :: Type -> Type) | |
(Monad f, Applicative f) => Applicative (WhenMatched f x y) | |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMatched f x y a # (<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b # liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c # (*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b # (<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a # | |
(Applicative f, Monad f) => Applicative (WhenMissing f k x) | |
Defined in Data.Map.Internal Methods pure :: a -> WhenMissing f k x a # (<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b # liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c # (*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b # (<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a # | |
Applicative (ContT r m) | |
Defined in Control.Monad.Trans.Cont | |
(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) | |
Defined in GHC.Base | |
Applicative ((->) r) | |
(Applicative f, Applicative g) => Applicative (Compose f g) | |
Defined in Data.Functor.Compose | |
(Applicative f, Applicative g) => Applicative (f :.: g) | |
Applicative f => Applicative (M1 i c f) | |
(Monad f, Applicative f) => Applicative (WhenMatched f k x y) | |
Defined in Data.Map.Internal Methods pure :: a -> WhenMatched f k x y a # (<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b # liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c # (*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b # (<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a # | |
(Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.CPS | |
(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Lazy | |
(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Strict |
class Applicative f => Alternative (f :: Type -> Type) where #
Instances
optional :: Alternative f => f a -> f (Maybe a) #
class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #
Minimal complete definition
Nothing
Instances
when :: Applicative f => Bool -> f () -> f () #
replicateM_ :: Applicative m => Int -> m a -> m () #
unless :: Applicative f => Bool -> f () -> f () #
forever :: Applicative f => f a -> f b #
guard :: Alternative f => Bool -> f () #
class Monad m => MonadIO (m :: Type -> Type) where #
Instances
class Semigroup a => Monoid a where #
Instances
Monoid ByteArray | |
Monoid All | |
Monoid Any | |
Monoid ByteString | |
Defined in Data.ByteString.Internal.Type Methods mempty :: ByteString # mappend :: ByteString -> ByteString -> ByteString # mconcat :: [ByteString] -> ByteString # | |
Monoid ByteString | |
Monoid ShortByteString | |
Monoid IntSet | |
Monoid OsString | |
Monoid PosixString | |
Monoid WindowsString | |
Monoid Ordering | |
Monoid PrefsMod | |
Monoid Completer | |
Monoid ParseError | |
Defined in Options.Applicative.Types Methods mempty :: ParseError # mappend :: ParseError -> ParseError -> ParseError # mconcat :: [ParseError] -> ParseError # | |
Monoid Doc | |
Monoid AnsiStyle |
|
Monoid Line # | |
Monoid () | |
(Semigroup a, Monoid a) => Monoid (Concurrently a) | Since: async-2.1.0 |
Defined in Control.Concurrent.Async Methods mempty :: Concurrently a # mappend :: Concurrently a -> Concurrently a -> Concurrently a # mconcat :: [Concurrently a] -> Concurrently a # | |
Monoid (First a) | |
Monoid (Last a) | |
Monoid a => Monoid (Down a) | |
(Ord a, Bounded a) => Monoid (Max a) | |
(Ord a, Bounded a) => Monoid (Min a) | |
Monoid m => Monoid (WrappedMonoid m) | |
Monoid a => Monoid (Dual a) | |
Monoid (Endo a) | |
Num a => Monoid (Product a) | |
Num a => Monoid (Sum a) | |
Monoid a => Monoid (STM a) | |
(Generic a, Monoid (Rep a ())) => Monoid (Generically a) | |
Monoid p => Monoid (Par1 p) | |
Monoid (IntMap a) | |
Monoid (Seq a) | |
Monoid (MergeSet a) | |
Ord a => Monoid (Set a) | |
Monoid a => Monoid (IO a) | |
Monoid a => Monoid (Managed a) | |
Monoid a => Monoid (Optional a) | |
Monoid (InfoMod a) | |
Monoid (DefaultProp a) | |
Defined in Options.Applicative.Builder.Internal Methods mempty :: DefaultProp a # mappend :: DefaultProp a -> DefaultProp a -> DefaultProp a # mconcat :: [DefaultProp a] -> DefaultProp a # | |
Monoid (Doc a) | |
Monoid (Doc ann) |
|
Monoid a => Monoid (Q a) | |
Monoid a => Monoid (Pattern a) # | |
Monoid a => Monoid (Shell a) # | |
(Hashable a, Eq a) => Monoid (HashSet a) | \(O(n+m)\) To obtain good performance, the smaller set must be presented as the first argument. Examples
|
Semigroup a => Monoid (Maybe a) | |
Monoid a => Monoid (a) | |
Monoid [a] | |
Monoid (Proxy s) | |
Monoid (U1 p) | |
Ord k => Monoid (Map k v) | |
Monad m => Monoid (EndoM m a) | |
Monoid b => Monoid (Fold a b) | |
Monoid (Mod f a) | |
(Eq k, Hashable k) => Monoid (HashMap k v) | If a key occurs in both maps, the mapping from the first will be the mapping in the result. Examples
|
(Monoid a, Monoid b) => Monoid (a, b) | |
Monoid b => Monoid (a -> b) | |
Monoid a => Monoid (Const a b) | |
(Applicative f, Monoid a) => Monoid (Ap f a) | |
Alternative f => Monoid (Alt f a) | |
Monoid (f p) => Monoid (Rec1 f p) | |
(Monoid b, Monad m) => Monoid (FoldM m a b) | |
(Semigroup a, Monoid a) => Monoid (Tagged s a) | |
Monoid a => Monoid (Constant a b) | |
(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) | |
(Monoid (f a), Monoid (g a)) => Monoid (Product f g a) | |
(Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p) | |
Monoid c => Monoid (K1 i c p) | |
(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) | |
Monoid (f (g a)) => Monoid (Compose f g a) | |
Monoid (f (g p)) => Monoid ((f :.: g) p) | |
Monoid (f p) => Monoid (M1 i c f p) | |
(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) | |
A managed resource that you acquire using with
Instances
MonadFail Managed | |
Defined in Control.Monad.Managed | |
MonadIO Managed | |
Defined in Control.Monad.Managed | |
Applicative Managed | |
Functor Managed | |
Monad Managed | |
MonadManaged Managed | |
Defined in Control.Monad.Managed | |
Monoid a => Monoid (Managed a) | |
Semigroup a => Semigroup (Managed a) | |
Floating a => Floating (Managed a) | |
Defined in Control.Monad.Managed Methods sqrt :: Managed a -> Managed a (**) :: Managed a -> Managed a -> Managed a logBase :: Managed a -> Managed a -> Managed a asin :: Managed a -> Managed a acos :: Managed a -> Managed a atan :: Managed a -> Managed a sinh :: Managed a -> Managed a cosh :: Managed a -> Managed a tanh :: Managed a -> Managed a asinh :: Managed a -> Managed a acosh :: Managed a -> Managed a atanh :: Managed a -> Managed a log1p :: Managed a -> Managed a expm1 :: Managed a -> Managed a | |
Num a => Num (Managed a) | |
Fractional a => Fractional (Managed a) | |
Defined in Control.Monad.Managed |
managed :: MonadManaged m => (forall r. (a -> IO r) -> IO r) -> m a #
Build a Managed
value
with :: Managed a -> (a -> IO r) -> IO r #
Acquire a Managed
value
This is a potentially unsafe function since it allows a resource to escape
its scope. For example, you might use Managed
to safely acquire a
file handle, like this:
import qualified System.IO as IO example :: Managed Handle example = managed (IO.withFile "foo.txt" IO.ReadMode)
... and if you never used the with
function then you would never run the
risk of accessing the Handle
after the file was closed. However, if you
use with
then you can incorrectly access the handle after the handle is
closed, like this:
bad :: IO () bad = do handle <- with example return IO.hPutStrLn handle "bar" -- This will fail because the handle is closed
... so only use with
if you know what you are doing and you're returning
a value that is not a resource being managed.
runManaged :: Managed () -> IO () #
Run a Managed
computation, enforcing that no acquired resources leak
dropExtension :: FilePath -> FilePath #
hasExtension :: FilePath -> Bool #
isAbsolute :: FilePath -> Bool #
isRelative :: FilePath -> Bool #
stripPrefix :: FilePath -> FilePath -> Maybe FilePath #
Remove a prefix from a path
absolute :: FilePath -> Bool #
Deprecated: Use System.FilePath.isAbsolute instead
Test whether a path is absolute
relative :: FilePath -> Bool #
Deprecated: Use System.FilePath.isRelative instead
Test whether a path is relative
commonPrefix :: [FilePath] -> FilePath #
Find the greatest common prefix between a list of FilePath
s
splitDirectories :: FilePath -> [FilePath] #
Split a FilePath
into its components
extension :: FilePath -> Maybe String #
Get a FilePath
's last extension, or Nothing
if it has no extension
splitExtension :: FilePath -> (String, Maybe String) #
Split a FilePath
on its extension
splitExtensions :: FilePath -> (String, [String]) #
Split a FilePath
on its extensions
encodeString :: FilePath -> String #
Deprecated: Use id instead
Convert a FilePath
to a String
decodeString :: String -> FilePath #
Deprecated: Use id instead
Convert a String
to a FilePath
Efficient representation of a left fold that preserves the fold's step function, initial accumulator, and extraction function
This allows the Applicative
instance to assemble derived folds that
traverse the container only once
A 'Fold
a b' processes elements of type a and results in a
value of type b.
Constructors
Fold (x -> a -> x) x (x -> b) |
|
Instances
Choice Fold | |
Costrong Fold | |
Profunctor Fold | |
Defined in Control.Foldl | |
Cosieve Fold List | |
Defined in Control.Foldl | |
Semigroupoid Fold | |
Applicative (Fold a) | |
Functor (Fold a) | |
Comonad (Fold a) | |
Extend (Fold a) | |
Monoid b => Monoid (Fold a b) | |
Semigroup b => Semigroup (Fold a b) | |
Floating b => Floating (Fold a b) | |
Num b => Num (Fold a b) | |
Fractional b => Fractional (Fold a b) | |
Defined in Control.Foldl |
data FoldM (m :: Type -> Type) a b #
Like Fold
, but monadic.
A 'FoldM
m a b' processes elements of type a and
results in a monadic value of type m b.
Constructors
FoldM (x -> a -> m x) (m x) (x -> m b) |
|
Instances
Functor m => Profunctor (FoldM m) | |
Defined in Control.Foldl Methods dimap :: (a -> b) -> (c -> d) -> FoldM m b c -> FoldM m a d # lmap :: (a -> b) -> FoldM m b c -> FoldM m a c # rmap :: (b -> c) -> FoldM m a b -> FoldM m a c # (#.) :: forall a b c q. Coercible c b => q b c -> FoldM m a b -> FoldM m a c # (.#) :: forall a b c q. Coercible b a => FoldM m b c -> q a b -> FoldM m a c # | |
Applicative m => Applicative (FoldM m a) | |
Functor m => Functor (FoldM m a) | |
Monad m => Extend (FoldM m a) | |
(Monoid b, Monad m) => Monoid (FoldM m a b) | |
(Semigroup b, Monad m) => Semigroup (FoldM m a b) | |
(Monad m, Floating b) => Floating (FoldM m a b) | |
Defined in Control.Foldl Methods exp :: FoldM m a b -> FoldM m a b log :: FoldM m a b -> FoldM m a b sqrt :: FoldM m a b -> FoldM m a b (**) :: FoldM m a b -> FoldM m a b -> FoldM m a b logBase :: FoldM m a b -> FoldM m a b -> FoldM m a b sin :: FoldM m a b -> FoldM m a b cos :: FoldM m a b -> FoldM m a b tan :: FoldM m a b -> FoldM m a b asin :: FoldM m a b -> FoldM m a b acos :: FoldM m a b -> FoldM m a b atan :: FoldM m a b -> FoldM m a b sinh :: FoldM m a b -> FoldM m a b cosh :: FoldM m a b -> FoldM m a b tanh :: FoldM m a b -> FoldM m a b asinh :: FoldM m a b -> FoldM m a b acosh :: FoldM m a b -> FoldM m a b atanh :: FoldM m a b -> FoldM m a b log1p :: FoldM m a b -> FoldM m a b expm1 :: FoldM m a b -> FoldM m a b | |
(Monad m, Num b) => Num (FoldM m a b) | |
Defined in Control.Foldl | |
(Monad m, Fractional b) => Fractional (FoldM m a b) | |
Defined in Control.Foldl |
Instances
Hashable Text | |
Defined in Data.Hashable.Class | |
Pretty Text | Automatically converts all newlines to
Note that
Manually use |
Defined in Prettyprinter.Internal | |
type Item Text | |
Instances
Data UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime dataTypeOf :: UTCTime -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime | |
NFData UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
Eq UTCTime | |
Ord UTCTime | |
data NominalDiffTime #
Instances
Constructors
ExitSuccess | |
ExitFailure Int |
Instances
Exception ExitCode | |
Defined in GHC.IO.Exception Methods toException :: ExitCode -> SomeException fromException :: SomeException -> Maybe ExitCode displayException :: ExitCode -> String | |
Generic ExitCode | |
Read ExitCode | |
Defined in GHC.IO.Exception | |
Show ExitCode | |
NFData ExitCode | |
Defined in Control.DeepSeq | |
Eq ExitCode | |
Ord ExitCode | |
type Rep ExitCode | |
Defined in GHC.IO.Exception type Rep ExitCode = D1 ('MetaData "ExitCode" "GHC.IO.Exception" "base" 'False) (C1 ('MetaCons "ExitSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExitFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) |
Methods
fromString :: String -> a #
Instances
IsString ByteString | |
Defined in Data.ByteString.Internal.Type Methods fromString :: String -> ByteString # | |
IsString ByteString | |
Defined in Data.ByteString.Lazy.Internal Methods fromString :: String -> ByteString # | |
IsString ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods fromString :: String -> ShortByteString # | |
IsString Doc | |
Defined in Text.PrettyPrint.HughesPJ Methods fromString :: String -> Doc # | |
IsString CmdSpec | |
Defined in System.Process.Common Methods fromString :: String -> CmdSpec # | |
IsString Line # | |
Defined in Turtle.Line Methods fromString :: String -> Line # | |
IsString ArgName # | |
Defined in Turtle.Options Methods fromString :: String -> ArgName # | |
IsString CommandName # | |
Defined in Turtle.Options Methods fromString :: String -> CommandName # | |
IsString Description # | |
Defined in Turtle.Options Methods fromString :: String -> Description # | |
IsString HelpMessage # | |
Defined in Turtle.Options Methods fromString :: String -> HelpMessage # | |
IsString a => IsString (Identity a) | |
Defined in Data.String Methods fromString :: String -> Identity a # | |
a ~ Char => IsString (Seq a) | |
Defined in Data.Sequence.Internal Methods fromString :: String -> Seq a # | |
(IsString a, Hashable a) => IsString (Hashed a) | |
Defined in Data.Hashable.Class Methods fromString :: String -> Hashed a # | |
IsString a => IsString (Optional a) | |
Defined in Data.Optional Methods fromString :: String -> Optional a # | |
IsString (Doc a) | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Methods fromString :: String -> Doc a # | |
IsString (Doc ann) |
This instance uses the |
Defined in Prettyprinter.Internal Methods fromString :: String -> Doc ann # | |
a ~ Text => IsString (Pattern a) # | |
Defined in Turtle.Pattern Methods fromString :: String -> Pattern a # | |
IsString a => IsString (Shell a) # | |
Defined in Turtle.Shell Methods fromString :: String -> Shell a # | |
a ~ Char => IsString [a] | |
Defined in Data.String Methods fromString :: String -> [a] # | |
a ~ b => IsString (Format a b) # | |
Defined in Turtle.Format Methods fromString :: String -> Format a b # | |
IsString a => IsString (Const a b) | |
Defined in Data.String Methods fromString :: String -> Const a b # | |
IsString a => IsString (Tagged s a) | |
Defined in Data.Tagged Methods fromString :: String -> Tagged s a # |