ats-pkg-3.4.0.8: A build tool for ATS

Safe HaskellNone
LanguageHaskell2010

Quaalude

Contents

Synopsis

Documentation

bool :: a -> a -> Bool -> a #

Case analysis for the Bool type. bool x y p evaluates to x when p is False, and evaluates to y when p is True.

This is equivalent to if p then y else x; that is, one can think of it as an if-then-else construct with its arguments reordered.

Examples

Expand

Basic usage:

>>> bool "foo" "bar" True
"bar"
>>> bool "foo" "bar" False
"foo"

Confirm that bool x y p and if p then y else x are equivalent:

>>> let p = True; x = "bar"; y = "foo"
>>> bool x y p == if p then y else x
True
>>> let p = False
>>> bool x y p == if p then y else x
True

Since: base-4.7.0.0

intersperse :: a -> [a] -> [a] #

The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example,

>>> intersperse ',' "abcde"
"a,b,c,d,e"

transpose :: [[a]] -> [[a]] #

The transpose function transposes the rows and columns of its argument. For example,

>>> transpose [[1,2,3],[4,5,6]]
[[1,4],[2,5],[3,6]]

If some of the rows are shorter than the following rows, their elements are skipped:

>>> transpose [[10,11],[20],[],[30,31,32]]
[[10,20,30],[11,31],[32]]

sortBy :: (a -> a -> Ordering) -> [a] -> [a] #

The sortBy function is the non-overloaded version of sort.

>>> sortBy (\(a,_) (b,_) -> compare a b) [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

void :: Functor f => f a -> f () #

void value discards or ignores the result of evaluation, such as the return value of an IO action.

Examples

Expand

Replace the contents of a Maybe Int with unit:

>>> void Nothing
Nothing
>>> void (Just 3)
Just ()

Replace the contents of an Either Int Int with unit, resulting in an Either Int '()':

>>> void (Left 8675309)
Left 8675309
>>> void (Right 8675309)
Right ()

Replace every element of a list with unit:

>>> void [1,2,3]
[(),(),()]

Replace the second element of a pair with unit:

>>> void (1,2)
(1,())

Discard the result of an IO action:

>>> mapM print [1,2]
1
2
[(),()]
>>> void $ mapM print [1,2]
1
2

unless :: Applicative f => Bool -> f () -> f () #

The reverse of when.

when :: Applicative f => Bool -> f () -> f () #

Conditional execution of Applicative expressions. For example,

when debug (putStrLn "Debugging")

will output the string Debugging if the Boolean value debug is True, and otherwise do nothing.

join :: Monad m => m (m a) -> m a #

The join function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.

Examples

Expand

A common use of join is to run an IO computation returned from an STM transaction, since STM transactions can't perform IO directly. Recall that

atomically :: STM a -> IO a

is used to run STM transactions atomically. So, by specializing the types of atomically and join to

atomically :: STM (IO b) -> IO (IO b)
join       :: IO (IO b)  -> IO b

we can compose them as

join . atomically :: STM (IO b) -> IO b

to run an STM transaction and the IO action it returns.

fold :: (Foldable t, Monoid m) => t m -> m #

Combine the elements of a structure using a monoid.

zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () #

zipWithM_ is the extension of zipWithM which ignores the final result.

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] #

The zipWithM function generalizes zipWith to arbitrary applicative functors.

filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #

This generalizes the list-based filter function.

encode :: Binary a => a -> ByteString #

Encode a value using binary serialisation to a lazy ByteString.

decode :: Binary a => ByteString -> a #

Decode a value from a lazy ByteString, reconstructing the original structure.

fromMaybe :: a -> Maybe a -> a #

The fromMaybe function takes a default value and and Maybe value. If the Maybe is Nothing, it returns the default values; otherwise, it returns the value contained in the Maybe.

Examples

Expand

Basic usage:

>>> fromMaybe "" (Just "Hello, World!")
"Hello, World!"
>>> fromMaybe "" Nothing
""

Read an integer from a string using readMaybe. If we fail to parse an integer, we want to return 0 by default:

>>> import Text.Read ( readMaybe )
>>> fromMaybe 0 (readMaybe "5")
5
>>> fromMaybe 0 (readMaybe "")
0

isNothing :: Maybe a -> Bool #

The isNothing function returns True iff its argument is Nothing.

Examples

Expand

Basic usage:

>>> isNothing (Just 3)
False
>>> isNothing (Just ())
False
>>> isNothing Nothing
True

Only the outer constructor is taken into consideration:

>>> isNothing (Just Nothing)
False

isPrefixOf :: Eq a => [a] -> [a] -> Bool #

The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.

>>> "Hello" `isPrefixOf` "Hello World!"
True
>>> "Hello" `isPrefixOf` "Wello Horld!"
False

isSuffixOf :: Eq a => [a] -> [a] -> Bool #

The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second. The second list must be finite.

>>> "ld!" `isSuffixOf` "Hello World!"
True
>>> "World" `isSuffixOf` "Hello World!"
False

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 #

on b u x y runs the binary function b on the results of applying unary function u to two arguments x and y. From the opposite perspective, it transforms two inputs and combines the outputs.

((+) `on` f) x y = f x + f y

Typical usage: sortBy (compare `on` fst).

Algebraic properties:

  • (*) `on` id = (*) -- (if (*) ∉ {⊥, const ⊥})
  • ((*) `on` f) `on` g = (*) `on` (f . g)
  • flip on f . flip on g = flip on (g . f)

(***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c') infixr 3 #

Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') infixr 3 #

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 #

Right-to-left composition of Kleisli arrows. (>=>), with the arguments flipped.

Note how this operator resembles function composition (.):

(.)   ::            (b ->   c) -> (a ->   b) -> a ->   c
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c

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

Flipped version of <$.

Examples

Expand

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")

Since: base-4.7.0.0

first :: Arrow a => a b c -> a (b, d) (c, d) #

Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.

second :: Arrow a => a b c -> a (d, b) (d, c) #

A mirror image of first.

The default definition may be overridden with a more efficient version if desired.

getEnv :: String -> IO String #

Computation getEnv var returns the value of the environment variable var. For the inverse, the setEnv function can be used.

This computation may fail with:

exitWith :: ExitCode -> IO a #

Computation exitWith code throws ExitCode code. Normally this terminates the program, returning code to the program's caller.

On program termination, the standard Handles stdout and stderr are flushed automatically; any other buffered Handles need to be flushed manually, otherwise the buffered data will be discarded.

A program that fails in any other way is treated as if it had called exitFailure. A program that terminates successfully without calling exitWith explicitly is treated as if it had called exitWith ExitSuccess.

As an ExitCode is not an IOException, exitWith bypasses the error handling in the IO monad and cannot be intercepted by catch from the Prelude. However it is a SomeException, and can be caught using the functions of Control.Exception. This means that cleanup computations added with bracket (from Control.Exception) are also executed properly on exitWith.

Note: in GHC, exitWith should be called from the main program thread in order to exit the process. When called from another thread, exitWith will throw an ExitException as normal, but the exception will not cause the process itself to exit.

showVersion :: Version -> String #

Provides one possible concrete representation for Version. For a version with versionBranch = [1,2,3] and versionTags = ["tag1","tag2"], the output will be 1.2.3-tag1-tag2.

traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () #

Map each element of a structure to an action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse.

nubSpecial :: Ord a => [[a]] -> [[a]] Source #

(<>) :: Semigroup a => a -> a -> a infixr 6 #

An associative operation.

data ExitCode #

Defines the exit codes that a program can return.

Constructors

ExitSuccess

indicates successful termination;

Instances
Eq ExitCode 
Instance details

Defined in GHC.IO.Exception

Ord ExitCode 
Instance details

Defined in GHC.IO.Exception

Read ExitCode 
Instance details

Defined in GHC.IO.Exception

Show ExitCode 
Instance details

Defined in GHC.IO.Exception

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

CmdResult ExitCode 
Instance details

Defined in Development.Shake.Command

Methods

cmdResult :: ([Result], [Result] -> ExitCode)

type Rep ExitCode 
Instance details

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)))

class Monad m => MonadIO (m :: Type -> Type) where #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a #

Lift a computation from the IO monad.

Instances
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a #

MonadIO Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

liftIO :: IO a -> Rules a #

MonadIO Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

liftIO :: IO a -> Action a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

liftIO :: IO a -> StateT s m a #

(Error e, MonadIO m) => MonadIO (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftIO :: IO a -> ErrorT e m a #

MonadIO (RAW k v ro rw) 
Instance details

Defined in Development.Shake.Internal.Core.Monad

Methods

liftIO :: IO a -> RAW k v ro rw a #

Miscellaneous

shouldWrite :: (MonadIO m, Binary a) => a -> FilePath -> m Bool Source #

System.Process.Ext reëxports

Data.Text.Lazy reëxports

data Text #

Instances
Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

FromDhall Text 
Instance details

Defined in Dhall

ToDhall Text 
Instance details

Defined in Dhall

Stream Text 
Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token Text :: Type #

type Tokens Text :: Type #

Pretty Text

(lazy Doc instance, identical to the strict version)

Instance details

Defined in Data.Text.Prettyprint.Doc.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

type Item Text 
Instance details

Defined in Data.Text.Lazy

type Item Text = Char
type Tokens Text 
Instance details

Defined in Text.Megaparsec.Stream

type Token Text 
Instance details

Defined in Text.Megaparsec.Stream

type Token Text = Char

pack :: String -> Text #

O(n) Convert a String into a Text.

Subject to fusion. Performs replacement on invalid scalar values.

unpack :: Text -> String #

O(n) Convert a Text into a String. Subject to fusion.

Control.Composition reëxports

biaxe :: (Traversable t, Applicative f) => t (a -> b -> f ()) -> a -> b -> f () #

(.*) :: (c -> d) -> (a -> b -> c) -> a -> b -> d infixr 8 #

As an example:

λ:> ((*2) .* (+)) 1 3 4
16

(.**) :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e infixr 8 #

thread :: Foldable t => t (a -> a) -> a -> a #

bisequence' :: (Traversable t, Applicative f) => t (a -> b -> f c) -> a -> b -> t (f c) #

Dhall reëxports

class FromDhall a #

Any value that implements FromDhall can be automatically decoded based on the inferred return type of input

>>> input auto "[1, 2, 3]" :: IO (Vector Natural)
[1,2,3]
>>> input auto "toMap { a = False, b = True }" :: IO (Map Text Bool)
fromList [("a",False),("b",True)]

This class auto-generates a default implementation for records that implement Generic. This does not auto-generate an instance for recursive types.

Instances
FromDhall Bool 
Instance details

Defined in Dhall

FromDhall Double 
Instance details

Defined in Dhall

FromDhall Integer 
Instance details

Defined in Dhall

FromDhall Natural 
Instance details

Defined in Dhall

FromDhall () 
Instance details

Defined in Dhall

FromDhall Scientific 
Instance details

Defined in Dhall

FromDhall Text 
Instance details

Defined in Dhall

FromDhall Text 
Instance details

Defined in Dhall

FromDhall Void 
Instance details

Defined in Dhall

FromDhall [Char] 
Instance details

Defined in Dhall

FromDhall a => FromDhall [a] 
Instance details

Defined in Dhall

FromDhall a => FromDhall (Maybe a) 
Instance details

Defined in Dhall

FromDhall a => FromDhall (Seq a) 
Instance details

Defined in Dhall

(FromDhall a, Ord a, Show a) => FromDhall (Set a)

Note that this instance will throw errors in the presence of duplicates in the list. To ignore duplicates, use setIgnoringDuplicates.

Instance details

Defined in Dhall

(Functor f, FromDhall (f (Result f))) => FromDhall (Fix f)

You can use this instance to marshal recursive types from Dhall to Haskell.

Here is an example use of this instance:

{-# LANGUAGE DeriveAnyClass     #-}
{-# LANGUAGE DeriveFoldable     #-}
{-# LANGUAGE DeriveFunctor      #-}
{-# LANGUAGE DeriveTraversable  #-}
{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE KindSignatures     #-}
{-# LANGUAGE QuasiQuotes        #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies       #-}
{-# LANGUAGE TemplateHaskell    #-}

import Data.Fix (Fix(..))
import Data.Text (Text)
import Dhall (FromDhall)
import GHC.Generics (Generic)
import Numeric.Natural (Natural)

import qualified Data.Fix                 as Fix
import qualified Data.Functor.Foldable    as Foldable
import qualified Data.Functor.Foldable.TH as TH
import qualified Dhall
import qualified NeatInterpolation

data Expr
    = Lit Natural
    | Add Expr Expr
    | Mul Expr Expr
    deriving (Show)

TH.makeBaseFunctor ''Expr

deriving instance Generic (ExprF a)
deriving instance FromDhall a => FromDhall (ExprF a)

example :: Text
example = [NeatInterpolation.text|
    \(Expr : Type)
->  let ExprF =
          < LitF :
              { _1 : Natural }
          | AddF :
              { _1 : Expr, _2 : Expr }
          | MulF :
              { _1 : Expr, _2 : Expr }
          >

    in      \(Fix : ExprF -> Expr)
        ->  let Lit = \(x : Natural) -> Fix (ExprF.LitF { _1 = x })

            let Add =
                      \(x : Expr)
                  ->  \(y : Expr)
                  ->  Fix (ExprF.AddF { _1 = x, _2 = y })

            let Mul =
                      \(x : Expr)
                  ->  \(y : Expr)
                  ->  Fix (ExprF.MulF { _1 = x, _2 = y })

            in  Add (Mul (Lit 3) (Lit 7)) (Add (Lit 1) (Lit 2))
|]

convert :: Fix ExprF -> Expr
convert = Fix.cata Foldable.embed

main :: IO ()
main = do
    x <- Dhall.input Dhall.auto example :: IO (Fix ExprF)

    print (convert x :: Expr)
Instance details

Defined in Dhall

FromDhall (f (Result f)) => FromDhall (Result f) 
Instance details

Defined in Dhall

Methods

autoWith :: InterpretOptions -> Decoder (Result f) #

FromDhall a => FromDhall (Vector a) 
Instance details

Defined in Dhall

(FromDhall a, Hashable a, Ord a, Show a) => FromDhall (HashSet a)

Note that this instance will throw errors in the presence of duplicates in the list. To ignore duplicates, use hashSetIgnoringDuplicates.

Instance details

Defined in Dhall

(ToDhall a, FromDhall b) => FromDhall (a -> b) 
Instance details

Defined in Dhall

Methods

autoWith :: InterpretOptions -> Decoder (a -> b) #

(FromDhall a, FromDhall b) => FromDhall (a, b) 
Instance details

Defined in Dhall

Methods

autoWith :: InterpretOptions -> Decoder (a, b) #

(Eq k, Hashable k, FromDhall k, FromDhall v) => FromDhall (HashMap k v) 
Instance details

Defined in Dhall

(Ord k, FromDhall k, FromDhall v) => FromDhall (Map k v) 
Instance details

Defined in Dhall

class ToDhall a #

This class is used by FromDhall instance for functions:

instance (ToDhall a, FromDhall b) => FromDhall (a -> b)

You can convert Dhall functions with "simple" inputs (i.e. instances of this class) into Haskell functions. This works by:

  • Marshaling the input to the Haskell function into a Dhall expression (i.e. x :: Expr Src Void)
  • Applying the Dhall function (i.e. f :: Expr Src Void) to the Dhall input (i.e. App f x)
  • Normalizing the syntax tree (i.e. normalize (App f x))
  • Marshaling the resulting Dhall expression back into a Haskell value
Instances
ToDhall Bool 
Instance details

Defined in Dhall

ToDhall Double 
Instance details

Defined in Dhall

ToDhall Int 
Instance details

Defined in Dhall

ToDhall Integer 
Instance details

Defined in Dhall

ToDhall Natural 
Instance details

Defined in Dhall

ToDhall Word
>>> embed inject (12 :: Word)
NaturalLit 12
Instance details

Defined in Dhall

ToDhall Word8
>>> embed inject (12 :: Word8)
NaturalLit 12
Instance details

Defined in Dhall

ToDhall Word16
>>> embed inject (12 :: Word16)
NaturalLit 12
Instance details

Defined in Dhall

ToDhall Word32
>>> embed inject (12 :: Word32)
NaturalLit 12
Instance details

Defined in Dhall

ToDhall Word64
>>> embed inject (12 :: Word64)
NaturalLit 12
Instance details

Defined in Dhall

ToDhall () 
Instance details

Defined in Dhall

ToDhall Scientific 
Instance details

Defined in Dhall

ToDhall Text 
Instance details

Defined in Dhall

ToDhall String 
Instance details

Defined in Dhall

ToDhall Text 
Instance details

Defined in Dhall

ToDhall Void 
Instance details

Defined in Dhall

ToDhall a => ToDhall [a] 
Instance details

Defined in Dhall

ToDhall a => ToDhall (Maybe a) 
Instance details

Defined in Dhall

ToDhall a => ToDhall (Seq a) 
Instance details

Defined in Dhall

ToDhall a => ToDhall (Set a)

Note that the ouput list will be sorted

>>> let x = Data.Set.fromList ["mom", "hi" :: Text]
>>> prettyExpr $ embed inject x
[ "hi", "mom" ]
Instance details

Defined in Dhall

ToDhall a => ToDhall (Vector a) 
Instance details

Defined in Dhall

ToDhall a => ToDhall (HashSet a)

Note that the ouput list may not be sorted

>>> let x = Data.HashSet.fromList ["hi", "mom" :: Text]
>>> prettyExpr $ embed inject x
[ "mom", "hi" ]
Instance details

Defined in Dhall

(ToDhall a, ToDhall b) => ToDhall (a, b) 
Instance details

Defined in Dhall

Methods

injectWith :: InterpretOptions -> Encoder (a, b) #

(ToDhall k, ToDhall v) => ToDhall (HashMap k v)

Embed a HashMap as a Prelude.Map.Type

>>> prettyExpr $ embed inject (HashMap.fromList [(1 :: Natural, True)])
[ { mapKey = 1, mapValue = True } ]
>>> prettyExpr $ embed inject (HashMap.fromList [] :: HashMap Natural Bool)
[] : List { mapKey : Natural, mapValue : Bool }
Instance details

Defined in Dhall

(ToDhall k, ToDhall v) => ToDhall (Map k v)

Embed a Map as a Prelude.Map.Type

>>> prettyExpr $ embed inject (Data.Map.fromList [(1 :: Natural, True)])
[ { mapKey = 1, mapValue = True } ]
>>> prettyExpr $ embed inject (Data.Map.fromList [] :: Data.Map.Map Natural Bool)
[] : List { mapKey : Natural, mapValue : Bool }
Instance details

Defined in Dhall

class Generic a #

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

A Generic instance must satisfy the following laws:

from . toid
to . fromid

Minimal complete definition

from, to

Instances
Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Generic Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Exp :: Type -> Type #

Methods

from :: Exp -> Rep Exp x #

to :: Rep Exp x -> Exp #

Generic Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Match :: Type -> Type #

Methods

from :: Match -> Rep Match x #

to :: Rep Match x -> Match #

Generic Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Clause :: Type -> Type #

Methods

from :: Clause -> Rep Clause x #

to :: Rep Clause x -> Clause #

Generic Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pat :: Type -> Type #

Methods

from :: Pat -> Rep Pat x #

to :: Rep Pat x -> Pat #

Generic Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Type :: Type -> Type #

Methods

from :: Type -> Rep Type x #

to :: Rep Type x -> Type #

Generic Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Dec :: Type -> Type #

Methods

from :: Dec -> Rep Dec x #

to :: Rep Dec x -> Dec #

Generic Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Generic FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FunDep :: Type -> Type #

Methods

from :: FunDep -> Rep FunDep x #

to :: Rep FunDep x -> FunDep #

Generic InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep InjectivityAnn :: Type -> Type #

Generic Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Overlap :: Type -> Type #

Methods

from :: Overlap -> Rep Overlap x #

to :: Rep Overlap x -> Overlap #

Generic () 
Instance details

Defined in GHC.Generics

Associated Types

type Rep () :: Type -> Type #

Methods

from :: () -> Rep () x #

to :: Rep () x -> () #

Generic Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Con :: Type -> Type #

Methods

from :: Con -> Rep Con x #

to :: Rep Con x -> Con #

Generic Void 
Instance details

Defined in Data.Void

Associated Types

type Rep Void :: Type -> Type #

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Generic Version 
Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type #

Methods

from :: All -> Rep All x #

to :: Rep All x -> All #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type #

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

Generic Fixity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic Associativity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Associativity :: Type -> Type #

Generic SourceUnpackedness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Generic SourceStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceStrictness :: Type -> Type #

Generic DecidedStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Generic Clock 
Instance details

Defined in System.Clock

Associated Types

type Rep Clock :: Type -> Type #

Methods

from :: Clock -> Rep Clock x #

to :: Rep Clock x -> Clock #

Generic TimeSpec 
Instance details

Defined in System.Clock

Associated Types

type Rep TimeSpec :: Type -> Type #

Methods

from :: TimeSpec -> Rep TimeSpec x #

to :: Rep TimeSpec x -> TimeSpec #

Generic DhallDouble 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep DhallDouble :: Type -> Type #

Generic Directory 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep Directory :: Type -> Type #

Generic File 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep File :: Type -> Type #

Methods

from :: File -> Rep File x #

to :: Rep File x -> File #

Generic FilePrefix 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep FilePrefix :: Type -> Type #

Generic Scheme 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep Scheme :: Type -> Type #

Methods

from :: Scheme -> Rep Scheme x #

to :: Rep Scheme x -> Scheme #

Generic URL 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep URL :: Type -> Type #

Methods

from :: URL -> Rep URL x #

to :: Rep URL x -> URL #

Generic ImportType 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep ImportType :: Type -> Type #

Generic ImportMode 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep ImportMode :: Type -> Type #

Generic ImportHashed 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep ImportHashed :: Type -> Type #

Generic Import 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep Import :: Type -> Type #

Methods

from :: Import -> Rep Import x #

to :: Rep Import x -> Import #

Generic Src 
Instance details

Defined in Dhall.Src

Associated Types

type Rep Src :: Type -> Type #

Methods

from :: Src -> Rep Src x #

to :: Rep Src x -> Src #

Generic Var 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep Var :: Type -> Type #

Methods

from :: Var -> Rep Var x #

to :: Rep Var x -> Var #

Generic Const 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep Const :: Type -> Type #

Methods

from :: Const -> Rep Const x #

to :: Rep Const x -> Const #

Generic SHA256Digest 
Instance details

Defined in Dhall.Crypto

Associated Types

type Rep SHA256Digest :: Type -> Type #

Generic Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Associated Types

type Rep Extension :: Type -> Type #

Generic ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang :: Type -> Type #

Generic Half 
Instance details

Defined in Numeric.Half

Associated Types

type Rep Half :: Type -> Type #

Methods

from :: Half -> Rep Half x #

to :: Rep Half x -> Half #

Generic URI 
Instance details

Defined in Network.URI

Associated Types

type Rep URI :: Type -> Type #

Methods

from :: URI -> Rep URI x #

to :: Rep URI x -> URI #

Generic InvalidPosException 
Instance details

Defined in Text.Megaparsec.Pos

Associated Types

type Rep InvalidPosException :: Type -> Type #

Generic SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Associated Types

type Rep SourcePos :: Type -> Type #

Generic Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: Type -> Type #

Methods

from :: Doc -> Rep Doc x #

to :: Rep Doc x -> Doc #

Generic TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep TextDetails :: Type -> Type #

Generic Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Style :: Type -> Type #

Methods

from :: Style -> Rep Style x #

to :: Rep Style x -> Style #

Generic Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Mode :: Type -> Type #

Methods

from :: Mode -> Rep Mode x #

to :: Rep Mode x -> Mode #

Generic WindowBits 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep WindowBits :: Type -> Type #

Generic ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModName :: Type -> Type #

Methods

from :: ModName -> Rep ModName x #

to :: Rep ModName x -> ModName #

Generic PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PkgName :: Type -> Type #

Methods

from :: PkgName -> Rep PkgName x #

to :: Rep PkgName x -> PkgName #

Generic Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Module :: Type -> Type #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

Generic OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep OccName :: Type -> Type #

Methods

from :: OccName -> Rep OccName x #

to :: Rep OccName x -> OccName #

Generic NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameFlavour :: Type -> Type #

Generic NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameSpace :: Type -> Type #

Generic Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Loc :: Type -> Type #

Methods

from :: Loc -> Rep Loc x #

to :: Rep Loc x -> Loc #

Generic Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Info :: Type -> Type #

Methods

from :: Info -> Rep Info x #

to :: Rep Info x -> Info #

Generic ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModuleInfo :: Type -> Type #

Generic Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FixityDirection :: Type -> Type #

Generic Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Lit :: Type -> Type #

Methods

from :: Lit -> Rep Lit x #

to :: Rep Lit x -> Lit #

Generic Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Body :: Type -> Type #

Methods

from :: Body -> Rep Body x #

to :: Rep Body x -> Body #

Generic Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Guard :: Type -> Type #

Methods

from :: Guard -> Rep Guard x #

to :: Rep Guard x -> Guard #

Generic Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Stmt :: Type -> Type #

Methods

from :: Stmt -> Rep Stmt x #

to :: Rep Stmt x -> Stmt #

Generic Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Generic DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivClause :: Type -> Type #

Generic DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivStrategy :: Type -> Type #

Generic TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TypeFamilyHead :: Type -> Type #

Generic TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TySynEqn :: Type -> Type #

Methods

from :: TySynEqn -> Rep TySynEqn x #

to :: Rep TySynEqn x -> TySynEqn #

Generic Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Foreign :: Type -> Type #

Methods

from :: Foreign -> Rep Foreign x #

to :: Rep Foreign x -> Foreign #

Generic Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Callconv :: Type -> Type #

Methods

from :: Callconv -> Rep Callconv x #

to :: Rep Callconv x -> Callconv #

Generic Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Safety :: Type -> Type #

Methods

from :: Safety -> Rep Safety x #

to :: Rep Safety x -> Safety #

Generic Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pragma :: Type -> Type #

Methods

from :: Pragma -> Rep Pragma x #

to :: Rep Pragma x -> Pragma #

Generic Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Inline :: Type -> Type #

Methods

from :: Inline -> Rep Inline x #

to :: Rep Inline x -> Inline #

Generic RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleMatch :: Type -> Type #

Generic Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Phases :: Type -> Type #

Methods

from :: Phases -> Rep Phases x #

to :: Rep Phases x -> Phases #

Generic RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleBndr :: Type -> Type #

Methods

from :: RuleBndr -> Rep RuleBndr x #

to :: Rep RuleBndr x -> RuleBndr #

Generic AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnTarget :: Type -> Type #

Generic SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Generic SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceStrictness :: Type -> Type #

Generic DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Generic Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bang :: Type -> Type #

Methods

from :: Bang -> Rep Bang x #

to :: Rep Bang x -> Bang #

Generic PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynDir :: Type -> Type #

Generic PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynArgs :: Type -> Type #

Generic TyVarBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TyVarBndr :: Type -> Type #

Generic FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FamilyResultSig :: Type -> Type #

Generic TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TyLit :: Type -> Type #

Methods

from :: TyLit -> Rep TyLit x #

to :: Rep TyLit x -> TyLit #

Generic Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Role :: Type -> Type #

Methods

from :: Role -> Rep Role x #

to :: Rep Role x -> Role #

Generic AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnLookup :: Type -> Type #

Generic Format 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep Format :: Type -> Type #

Methods

from :: Format -> Rep Format x #

to :: Rep Format x -> Format #

Generic Method 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep Method :: Type -> Type #

Methods

from :: Method -> Rep Method x #

to :: Rep Method x -> Method #

Generic CompressionLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep CompressionLevel :: Type -> Type #

Generic MemoryLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep MemoryLevel :: Type -> Type #

Generic CompressionStrategy 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep CompressionStrategy :: Type -> Type #

Generic [a] 
Instance details

Defined in GHC.Generics

Associated Types

type Rep [a] :: Type -> Type #

Methods

from :: [a] -> Rep [a] x #

to :: Rep [a] x -> [a] #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (Par1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Par1 p) :: Type -> Type #

Methods

from :: Par1 p -> Rep (Par1 p) x #

to :: Rep (Par1 p) x -> Par1 p #

Generic (Complex a) 
Instance details

Defined in Data.Complex

Associated Types

type Rep (Complex a) :: Type -> Type #

Methods

from :: Complex a -> Rep (Complex a) x #

to :: Rep (Complex a) x -> Complex a #

Generic (Min a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Min a) :: Type -> Type #

Methods

from :: Min a -> Rep (Min a) x #

to :: Rep (Min a) x -> Min a #

Generic (Max a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Max a) :: Type -> Type #

Methods

from :: Max a -> Rep (Max a) x #

to :: Rep (Max a) x -> Max a #

Generic (First a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type #

Generic (Option a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Option a) :: Type -> Type #

Methods

from :: Option a -> Rep (Option a) x #

to :: Rep (Option a) x -> Option a #

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type #

Methods

from :: Dual a -> Rep (Dual a) x #

to :: Rep (Dual a) x -> Dual a #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type #

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type #

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type #

Methods

from :: Product a -> Rep (Product a) x #

to :: Rep (Product a) x -> Product a #

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type #

Methods

from :: Down a -> Rep (Down a) x #

to :: Rep (Down a) x -> Down a #

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x #

to :: Rep (NonEmpty a) x -> NonEmpty a #

Generic (Tree a) 
Instance details

Defined in Data.Tree

Associated Types

type Rep (Tree a) :: Type -> Type #

Methods

from :: Tree a -> Rep (Tree a) x #

to :: Rep (Tree a) x -> Tree a #

Generic (FingerTree a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (FingerTree a) :: Type -> Type #

Methods

from :: FingerTree a -> Rep (FingerTree a) x #

to :: Rep (FingerTree a) x -> FingerTree a #

Generic (Digit a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Digit a) :: Type -> Type #

Methods

from :: Digit a -> Rep (Digit a) x #

to :: Rep (Digit a) x -> Digit a #

Generic (Node a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Node a) :: Type -> Type #

Methods

from :: Node a -> Rep (Node a) x #

to :: Rep (Node a) x -> Node a #

Generic (Elem a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Elem a) :: Type -> Type #

Methods

from :: Elem a -> Rep (Elem a) x #

to :: Rep (Elem a) x -> Elem a #

Generic (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewL a) :: Type -> Type #

Methods

from :: ViewL a -> Rep (ViewL a) x #

to :: Rep (ViewL a) x -> ViewL a #

Generic (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewR a) :: Type -> Type #

Methods

from :: ViewR a -> Rep (ViewR a) x #

to :: Rep (ViewR a) x -> ViewR a #

Generic (Fix f) 
Instance details

Defined in Data.Fix

Associated Types

type Rep (Fix f) :: Type -> Type #

Methods

from :: Fix f -> Rep (Fix f) x #

to :: Rep (Fix f) x -> Fix f #

Generic (Doc ann) 
Instance details

Defined in Data.Text.Prettyprint.Doc.Internal

Associated Types

type Rep (Doc ann) :: Type -> Type #

Methods

from :: Doc ann -> Rep (Doc ann) x #

to :: Rep (Doc ann) x -> Doc ann #

Generic (Set a) 
Instance details

Defined in Dhall.Set

Associated Types

type Rep (Set a) :: Type -> Type #

Methods

from :: Set a -> Rep (Set a) x #

to :: Rep (Set a) x -> Set a #

Generic (HistoriedResponse body) 
Instance details

Defined in Network.HTTP.Client

Associated Types

type Rep (HistoriedResponse body) :: Type -> Type #

Methods

from :: HistoriedResponse body -> Rep (HistoriedResponse body) x #

to :: Rep (HistoriedResponse body) x -> HistoriedResponse body #

Generic (ErrorItem t) 
Instance details

Defined in Text.Megaparsec.Error

Associated Types

type Rep (ErrorItem t) :: Type -> Type #

Methods

from :: ErrorItem t -> Rep (ErrorItem t) x #

to :: Rep (ErrorItem t) x -> ErrorItem t #

Generic (ErrorFancy e) 
Instance details

Defined in Text.Megaparsec.Error

Associated Types

type Rep (ErrorFancy e) :: Type -> Type #

Methods

from :: ErrorFancy e -> Rep (ErrorFancy e) x #

to :: Rep (ErrorFancy e) x -> ErrorFancy e #

Generic (PosState s) 
Instance details

Defined in Text.Megaparsec.State

Associated Types

type Rep (PosState s) :: Type -> Type #

Methods

from :: PosState s -> Rep (PosState s) x #

to :: Rep (PosState s) x -> PosState s #

Generic (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep (Doc a) :: Type -> Type #

Methods

from :: Doc a -> Rep (Doc a) x #

to :: Rep (Doc a) x -> Doc a #

Generic (SimpleDocStream ann) 
Instance details

Defined in Data.Text.Prettyprint.Doc.Internal

Associated Types

type Rep (SimpleDocStream ann) :: Type -> Type #

Methods

from :: SimpleDocStream ann -> Rep (SimpleDocStream ann) x #

to :: Rep (SimpleDocStream ann) x -> SimpleDocStream ann #

Generic (Keys a) 
Instance details

Defined in Dhall.Map

Associated Types

type Rep (Keys a) :: Type -> Type #

Methods

from :: Keys a -> Rep (Keys a) x #

to :: Rep (Keys a) x -> Keys a #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (V1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (V1 p) :: Type -> Type #

Methods

from :: V1 p -> Rep (V1 p) x #

to :: Rep (V1 p) x -> V1 p #

Generic (U1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (U1 p) :: Type -> Type #

Methods

from :: U1 p -> Rep (U1 p) x #

to :: Rep (U1 p) x -> U1 p #

Generic (a, b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b) :: Type -> Type #

Methods

from :: (a, b) -> Rep (a, b) x #

to :: Rep (a, b) x -> (a, b) #

Generic (Arg a b) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Arg a b) :: Type -> Type #

Methods

from :: Arg a b -> Rep (Arg a b) x #

to :: Rep (Arg a b) x -> Arg a b #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type #

Methods

from :: Proxy t -> Rep (Proxy t) x #

to :: Rep (Proxy t) x -> Proxy t #

Generic (Binding s a) 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep (Binding s a) :: Type -> Type #

Methods

from :: Binding s a -> Rep (Binding s a) x #

to :: Rep (Binding s a) x -> Binding s a #

Generic (Chunks s a) 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep (Chunks s a) :: Type -> Type #

Methods

from :: Chunks s a -> Rep (Chunks s a) x #

to :: Rep (Chunks s a) x -> Chunks s a #

Generic (Expr s a) 
Instance details

Defined in Dhall.Syntax

Associated Types

type Rep (Expr s a) :: Type -> Type #

Methods

from :: Expr s a -> Rep (Expr s a) x #

to :: Rep (Expr s a) x -> Expr s a #

Generic (Map k v) 
Instance details

Defined in Dhall.Map

Associated Types

type Rep (Map k v) :: Type -> Type #

Methods

from :: Map k v -> Rep (Map k v) x #

to :: Rep (Map k v) x -> Map k v #

Generic (ParseErrorBundle s e) 
Instance details

Defined in Text.Megaparsec.Error

Associated Types

type Rep (ParseErrorBundle s e) :: Type -> Type #

Generic (State s e) 
Instance details

Defined in Text.Megaparsec.State

Associated Types

type Rep (State s e) :: Type -> Type #

Methods

from :: State s e -> Rep (State s e) x #

to :: Rep (State s e) x -> State s e #

Generic (ParseError s e) 
Instance details

Defined in Text.Megaparsec.Error

Associated Types

type Rep (ParseError s e) :: Type -> Type #

Methods

from :: ParseError s e -> Rep (ParseError s e) x #

to :: Rep (ParseError s e) x -> ParseError s e #

Generic (Rec1 f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Rec1 f p) :: Type -> Type #

Methods

from :: Rec1 f p -> Rep (Rec1 f p) x #

to :: Rep (Rec1 f p) x -> Rec1 f p #

Generic (URec (Ptr ()) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec (Ptr ()) p) :: Type -> Type #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p #

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

Generic (a, b, c) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c) :: Type -> Type #

Methods

from :: (a, b, c) -> Rep (a, b, c) x #

to :: Rep (a, b, c) x -> (a, b, c) #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type #

Methods

from :: Ap f a -> Rep (Ap f a) x #

to :: Rep (Ap f a) x -> Ap f a #

Generic (Alt f a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type #

Methods

from :: Alt f a -> Rep (Alt f a) x #

to :: Rep (Alt f a) x -> Alt f a #

Generic (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Associated Types

type Rep (Join p a) :: Type -> Type #

Methods

from :: Join p a -> Rep (Join p a) x #

to :: Rep (Join p a) x -> Join p a #

Generic (Tagged s b) 
Instance details

Defined in Data.Tagged

Associated Types

type Rep (Tagged s b) :: Type -> Type #

Methods

from :: Tagged s b -> Rep (Tagged s b) x #

to :: Rep (Tagged s b) x -> Tagged s b #

Generic (K1 i c p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (K1 i c p) :: Type -> Type #

Methods

from :: K1 i c p -> Rep (K1 i c p) x #

to :: Rep (K1 i c p) x -> K1 i c p #

Generic ((f :+: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x #

to :: Rep ((f :+: g) p) x -> (f :+: g) p #

Generic ((f :*: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x #

to :: Rep ((f :*: g) p) x -> (f :*: g) p #

Generic (a, b, c, d) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d) :: Type -> Type #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x #

to :: Rep (a, b, c, d) x -> (a, b, c, d) #

Generic (Product f g a) 
Instance details

Defined in Data.Functor.Product

Associated Types

type Rep (Product f g a) :: Type -> Type #

Methods

from :: Product f g a -> Rep (Product f g a) x #

to :: Rep (Product f g a) x -> Product f g a #

Generic (Sum f g a) 
Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep (Sum f g a) :: Type -> Type #

Methods

from :: Sum f g a -> Rep (Sum f g a) x #

to :: Rep (Sum f g a) x -> Sum f g a #

Generic (M1 i c f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (M1 i c f p) :: Type -> Type #

Methods

from :: M1 i c f p -> Rep (M1 i c f p) x #

to :: Rep (M1 i c f p) x -> M1 i c f p #

Generic ((f :.: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x #

to :: Rep ((f :.: g) p) x -> (f :.: g) p #

Generic (a, b, c, d, e) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e) :: Type -> Type #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type #

Methods

from :: Compose f g a -> Rep (Compose f g a) x #

to :: Rep (Compose f g a) x -> Compose f g a #

Generic (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep (WrappedBifunctor p a b) :: Type -> Type #

Methods

from :: WrappedBifunctor p a b -> Rep (WrappedBifunctor p a b) x #

to :: Rep (WrappedBifunctor p a b) x -> WrappedBifunctor p a b #

Generic (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Associated Types

type Rep (Joker g a b) :: Type -> Type #

Methods

from :: Joker g a b -> Rep (Joker g a b) x #

to :: Rep (Joker g a b) x -> Joker g a b #

Generic (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep (Flip p a b) :: Type -> Type #

Methods

from :: Flip p a b -> Rep (Flip p a b) x #

to :: Rep (Flip p a b) x -> Flip p a b #

Generic (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep (Clown f a b) :: Type -> Type #

Methods

from :: Clown f a b -> Rep (Clown f a b) x #

to :: Rep (Clown f a b) x -> Clown f a b #

Generic (a, b, c, d, e, f) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) #

Generic (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep (Sum p q a b) :: Type -> Type #

Methods

from :: Sum p q a b -> Rep (Sum p q a b) x #

to :: Rep (Sum p q a b) x -> Sum p q a b #

Generic (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Associated Types

type Rep (Product f g a b) :: Type -> Type #

Methods

from :: Product f g a b -> Rep (Product f g a b) x #

to :: Rep (Product f g a b) x -> Product f g a b #

Generic (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) #

Generic (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep (Tannen f p a b) :: Type -> Type #

Methods

from :: Tannen f p a b -> Rep (Tannen f p a b) x #

to :: Rep (Tannen f p a b) x -> Tannen f p a b #

Generic (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Associated Types

type Rep (Biff p f g a b) :: Type -> Type #

Methods

from :: Biff p f g a b -> Rep (Biff p f g a b) x #

to :: Rep (Biff p f g a b) x -> Biff p f g a b #

class Binary t #

The Binary class provides put and get, methods to encode and decode a Haskell value to a lazy ByteString. It mirrors the Read and Show classes for textual representation of Haskell types, and is suitable for serialising Haskell values to disk, over the network.

For decoding and generating simple external binary formats (e.g. C structures), Binary may be used, but in general is not suitable for complex protocols. Instead use the PutM and Get primitives directly.

Instances of Binary should satisfy the following property:

decode . encode == id

That is, the get and put methods should be the inverse of each other. A range of instances are provided for basic Haskell types.

Instances
Binary Bool 
Instance details

Defined in Data.Binary.Class

Methods

put :: Bool -> Put #

get :: Get Bool #

putList :: [Bool] -> Put #

Binary Char 
Instance details

Defined in Data.Binary.Class

Methods

put :: Char -> Put #

get :: Get Char #

putList :: [Char] -> Put #

Binary Double 
Instance details

Defined in Data.Binary.Class

Methods

put :: Double -> Put #

get :: Get Double #

putList :: [Double] -> Put #

Binary Float 
Instance details

Defined in Data.Binary.Class

Methods

put :: Float -> Put #

get :: Get Float #

putList :: [Float] -> Put #

Binary Int 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int -> Put #

get :: Get Int #

putList :: [Int] -> Put #

Binary Int8 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int8 -> Put #

get :: Get Int8 #

putList :: [Int8] -> Put #

Binary Int16 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int16 -> Put #

get :: Get Int16 #

putList :: [Int16] -> Put #

Binary Int32 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int32 -> Put #

get :: Get Int32 #

putList :: [Int32] -> Put #

Binary Int64 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int64 -> Put #

get :: Get Int64 #

putList :: [Int64] -> Put #

Binary Integer 
Instance details

Defined in Data.Binary.Class

Methods

put :: Integer -> Put #

get :: Get Integer #

putList :: [Integer] -> Put #

Binary Natural

Since: 0.7.3.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Natural -> Put #

get :: Get Natural #

putList :: [Natural] -> Put #

Binary Ordering 
Instance details

Defined in Data.Binary.Class

Methods

put :: Ordering -> Put #

get :: Get Ordering #

putList :: [Ordering] -> Put #

Binary Word 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word -> Put #

get :: Get Word #

putList :: [Word] -> Put #

Binary Word8 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word8 -> Put #

get :: Get Word8 #

putList :: [Word8] -> Put #

Binary Word16 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word16 -> Put #

get :: Get Word16 #

putList :: [Word16] -> Put #

Binary Word32 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word32 -> Put #

get :: Get Word32 #

putList :: [Word32] -> Put #

Binary Word64 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word64 -> Put #

get :: Get Word64 #

putList :: [Word64] -> Put #

Binary RuntimeRep

@since 0.8.5.0. See

Instance details

Defined in Data.Binary.Class

Binary VecCount

@since 0.8.5.0. See

Instance details

Defined in Data.Binary.Class

Methods

put :: VecCount -> Put #

get :: Get VecCount #

putList :: [VecCount] -> Put #

Binary VecElem

@since 0.8.5.0. See

Instance details

Defined in Data.Binary.Class

Methods

put :: VecElem -> Put #

get :: Get VecElem #

putList :: [VecElem] -> Put #

Binary SomeTypeRep 
Instance details

Defined in Data.Binary.Class

Binary () 
Instance details

Defined in Data.Binary.Class

Methods

put :: () -> Put #

get :: Get () #

putList :: [()] -> Put #

Binary TyCon

@since 0.8.5.0. See

Instance details

Defined in Data.Binary.Class

Methods

put :: TyCon -> Put #

get :: Get TyCon #

putList :: [TyCon] -> Put #

Binary KindRep

@since 0.8.5.0. See

Instance details

Defined in Data.Binary.Class

Methods

put :: KindRep -> Put #

get :: Get KindRep #

putList :: [KindRep] -> Put #

Binary TypeLitSort

@since 0.8.5.0. See

Instance details

Defined in Data.Binary.Class

Binary ByteString 
Instance details

Defined in Data.Binary.Class

Binary ByteString 
Instance details

Defined in Data.Binary.Class

Binary Void

Since: 0.8.0.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Void -> Put #

get :: Get Void #

putList :: [Void] -> Put #

Binary Version

Since: 0.8.0.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Version -> Put #

get :: Get Version #

putList :: [Version] -> Put #

Binary All

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: All -> Put #

get :: Get All #

putList :: [All] -> Put #

Binary Any

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Any -> Put #

get :: Get Any #

putList :: [Any] -> Put #

Binary Fingerprint

Since: 0.7.6.0

Instance details

Defined in Data.Binary.Class

Binary ShortByteString 
Instance details

Defined in Data.Binary.Class

Binary IntSet 
Instance details

Defined in Data.Binary.Class

Methods

put :: IntSet -> Put #

get :: Get IntSet #

putList :: [IntSet] -> Put #

Binary FileQ 
Instance details

Defined in Development.Shake.Internal.Rules.File

Methods

put :: FileQ -> Put #

get :: Get FileQ #

putList :: [FileQ] -> Put #

Binary StepKey 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

put :: StepKey -> Put #

get :: Get StepKey #

putList :: [StepKey] -> Put #

Binary Root 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

put :: Root -> Put #

get :: Get Root #

putList :: [Root] -> Put #

Binary DoesDirectoryExistQ 
Instance details

Defined in Development.Shake.Internal.Rules.Directory

Methods

put :: DoesDirectoryExistQ -> Put #

get :: Get DoesDirectoryExistQ #

putList :: [DoesDirectoryExistQ] -> Put #

Binary DoesFileExistQ 
Instance details

Defined in Development.Shake.Internal.Rules.Directory

Methods

put :: DoesFileExistQ -> Put #

get :: Get DoesFileExistQ #

putList :: [DoesFileExistQ] -> Put #

Binary GetDirectoryContentsQ 
Instance details

Defined in Development.Shake.Internal.Rules.Directory

Methods

put :: GetDirectoryContentsQ -> Put #

get :: Get GetDirectoryContentsQ #

putList :: [GetDirectoryContentsQ] -> Put #

Binary GetDirectoryDirsQ 
Instance details

Defined in Development.Shake.Internal.Rules.Directory

Methods

put :: GetDirectoryDirsQ -> Put #

get :: Get GetDirectoryDirsQ #

putList :: [GetDirectoryDirsQ] -> Put #

Binary GetDirectoryFilesQ 
Instance details

Defined in Development.Shake.Internal.Rules.Directory

Methods

put :: GetDirectoryFilesQ -> Put #

get :: Get GetDirectoryFilesQ #

putList :: [GetDirectoryFilesQ] -> Put #

Binary GetEnvQ 
Instance details

Defined in Development.Shake.Internal.Rules.Directory

Methods

put :: GetEnvQ -> Put #

get :: Get GetEnvQ #

putList :: [GetEnvQ] -> Put #

Binary FilesQ 
Instance details

Defined in Development.Shake.Internal.Rules.Files

Methods

put :: FilesQ -> Put #

get :: Get FilesQ #

putList :: [FilesQ] -> Put #

Binary AlwaysRerunQ 
Instance details

Defined in Development.Shake.Internal.Rules.Rerun

Methods

put :: AlwaysRerunQ -> Put #

get :: Get AlwaysRerunQ #

putList :: [AlwaysRerunQ] -> Put #

Binary a => Binary [a] 
Instance details

Defined in Data.Binary.Class

Methods

put :: [a] -> Put #

get :: Get [a] #

putList :: [[a]] -> Put #

Binary a => Binary (Maybe a) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Maybe a -> Put #

get :: Get (Maybe a) #

putList :: [Maybe a] -> Put #

(Binary a, Integral a) => Binary (Ratio a) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Ratio a -> Put #

get :: Get (Ratio a) #

putList :: [Ratio a] -> Put #

Binary a => Binary (Complex a) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Complex a -> Put #

get :: Get (Complex a) #

putList :: [Complex a] -> Put #

Binary (Fixed a)

Since: 0.8.0.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Fixed a -> Put #

get :: Get (Fixed a) #

putList :: [Fixed a] -> Put #

Binary a => Binary (Min a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Min a -> Put #

get :: Get (Min a) #

putList :: [Min a] -> Put #

Binary a => Binary (Max a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Max a -> Put #

get :: Get (Max a) #

putList :: [Max a] -> Put #

Binary a => Binary (First a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: First a -> Put #

get :: Get (First a) #

putList :: [First a] -> Put #

Binary a => Binary (Last a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Last a -> Put #

get :: Get (Last a) #

putList :: [Last a] -> Put #

Binary m => Binary (WrappedMonoid m)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Binary a => Binary (Option a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Option a -> Put #

get :: Get (Option a) #

putList :: [Option a] -> Put #

Binary a => Binary (Identity a) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Identity a -> Put #

get :: Get (Identity a) #

putList :: [Identity a] -> Put #

Binary a => Binary (First a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: First a -> Put #

get :: Get (First a) #

putList :: [First a] -> Put #

Binary a => Binary (Last a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Last a -> Put #

get :: Get (Last a) #

putList :: [Last a] -> Put #

Binary a => Binary (Dual a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Dual a -> Put #

get :: Get (Dual a) #

putList :: [Dual a] -> Put #

Binary a => Binary (Sum a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Sum a -> Put #

get :: Get (Sum a) #

putList :: [Sum a] -> Put #

Binary a => Binary (Product a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Product a -> Put #

get :: Get (Product a) #

putList :: [Product a] -> Put #

Binary a => Binary (NonEmpty a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: NonEmpty a -> Put #

get :: Get (NonEmpty a) #

putList :: [NonEmpty a] -> Put #

Binary e => Binary (IntMap e) 
Instance details

Defined in Data.Binary.Class

Methods

put :: IntMap e -> Put #

get :: Get (IntMap e) #

putList :: [IntMap e] -> Put #

Binary e => Binary (Tree e) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Tree e -> Put #

get :: Get (Tree e) #

putList :: [Tree e] -> Put #

Binary e => Binary (Seq e) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Seq e -> Put #

get :: Get (Seq e) #

putList :: [Seq e] -> Put #

Binary a => Binary (Set a) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Set a -> Put #

get :: Get (Set a) #

putList :: [Set a] -> Put #

Binary answer => Binary (OracleA answer) 
Instance details

Defined in Development.Shake.Internal.Rules.Oracle

Methods

put :: OracleA answer -> Put #

get :: Get (OracleA answer) #

putList :: [OracleA answer] -> Put #

Binary question => Binary (OracleQ question) 
Instance details

Defined in Development.Shake.Internal.Rules.Oracle

Methods

put :: OracleQ question -> Put #

get :: Get (OracleQ question) #

putList :: [OracleQ question] -> Put #

(Binary a, Binary b) => Binary (Either a b) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Either a b -> Put #

get :: Get (Either a b) #

putList :: [Either a b] -> Put #

Typeable a => Binary (TypeRep a) 
Instance details

Defined in Data.Binary.Class

Methods

put :: TypeRep a -> Put #

get :: Get (TypeRep a) #

putList :: [TypeRep a] -> Put #

(Binary a, Binary b) => Binary (a, b) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b) -> Put #

get :: Get (a, b) #

putList :: [(a, b)] -> Put #

(Binary k, Binary e) => Binary (Map k e) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Map k e -> Put #

get :: Get (Map k e) #

putList :: [Map k e] -> Put #

(Binary i, Ix i, Binary e, IArray UArray e) => Binary (UArray i e) 
Instance details

Defined in Data.Binary.Class

Methods

put :: UArray i e -> Put #

get :: Get (UArray i e) #

putList :: [UArray i e] -> Put #

(Binary i, Ix i, Binary e) => Binary (Array i e) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Array i e -> Put #

get :: Get (Array i e) #

putList :: [Array i e] -> Put #

(Binary a, Binary b) => Binary (Arg a b)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Arg a b -> Put #

get :: Get (Arg a b) #

putList :: [Arg a b] -> Put #

(Binary a, Binary b, Binary c) => Binary (a, b, c) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b, c) -> Put #

get :: Get (a, b, c) #

putList :: [(a, b, c)] -> Put #

Binary (f a) => Binary (Alt f a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Alt f a -> Put #

get :: Get (Alt f a) #

putList :: [Alt f a] -> Put #

(Binary a, Binary b, Binary c, Binary d) => Binary (a, b, c, d) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b, c, d) -> Put #

get :: Get (a, b, c, d) #

putList :: [(a, b, c, d)] -> Put #

(Binary a, Binary b, Binary c, Binary d, Binary e) => Binary (a, b, c, d, e) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b, c, d, e) -> Put #

get :: Get (a, b, c, d, e) #

putList :: [(a, b, c, d, e)] -> Put #

(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f) => Binary (a, b, c, d, e, f) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b, c, d, e, f) -> Put #

get :: Get (a, b, c, d, e, f) #

putList :: [(a, b, c, d, e, f)] -> Put #

(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g) => Binary (a, b, c, d, e, f, g) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b, c, d, e, f, g) -> Put #

get :: Get (a, b, c, d, e, f, g) #

putList :: [(a, b, c, d, e, f, g)] -> Put #

(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h) => Binary (a, b, c, d, e, f, g, h) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b, c, d, e, f, g, h) -> Put #

get :: Get (a, b, c, d, e, f, g, h) #

putList :: [(a, b, c, d, e, f, g, h)] -> Put #

(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h, Binary i) => Binary (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b, c, d, e, f, g, h, i) -> Put #

get :: Get (a, b, c, d, e, f, g, h, i) #

putList :: [(a, b, c, d, e, f, g, h, i)] -> Put #

(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h, Binary i, Binary j) => Binary (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in Data.Binary.Class

Methods

put :: (a, b, c, d, e, f, g, h, i, j) -> Put #

get :: Get (a, b, c, d, e, f, g, h, i, j) #

putList :: [(a, b, c, d, e, f, g, h, i, j)] -> Put #

input #

Arguments

:: Decoder a

The decoder for the Dhall value

-> Text

The Dhall program

-> IO a

The decoded value in Haskell

Type-check and evaluate a Dhall program, decoding the result into Haskell

The first argument determines the type of value that you decode:

>>> input integer "+2"
2
>>> input (vector double) "[1.0, 2.0]"
[1.0,2.0]

Use auto to automatically select which type to decode based on the inferred return type:

>>> input auto "True" :: IO Bool
True

This uses the settings from defaultInputSettings.

auto :: FromDhall a => Decoder a #

Use the default options for interpreting a configuration file

auto = autoWith defaultInterpretOptions

detailed :: IO a -> IO a #

Use this to provide more detailed error messages

> input auto "True" :: IO Integer
 *** Exception: Error: Expression doesn't match annotation

 True : Integer

 (input):1:1
> detailed (input auto "True") :: IO Integer
 *** Exception: Error: Expression doesn't match annotation

 Explanation: You can annotate an expression with its type or kind using the
 ❰:❱ symbol, like this:


     ┌───────┐
     │ x : t │  ❰x❱ is an expression and ❰t❱ is the annotated type or kind of ❰x❱
     └───────┘

 The type checker verifies that the expression's type or kind matches the
 provided annotation

 For example, all of the following are valid annotations that the type checker
 accepts:


     ┌─────────────┐
     │ 1 : Natural │  ❰1❱ is an expression that has type ❰Natural❱, so the type
     └─────────────┘  checker accepts the annotation


     ┌───────────────────────┐
     │ Natural/even 2 : Bool │  ❰Natural/even 2❱ has type ❰Bool❱, so the type
     └───────────────────────┘  checker accepts the annotation


     ┌────────────────────┐
     │ List : Type → Type │  ❰List❱ is an expression that has kind ❰Type → Type❱,
     └────────────────────┘  so the type checker accepts the annotation


     ┌──────────────────┐
     │ List Text : Type │  ❰List Text❱ is an expression that has kind ❰Type❱, so
     └──────────────────┘  the type checker accepts the annotation


 However, the following annotations are not valid and the type checker will
 reject them:


     ┌──────────┐
     │ 1 : Text │  The type checker rejects this because ❰1❱ does not have type
     └──────────┘  ❰Text❱


     ┌─────────────┐
     │ List : Type │  ❰List❱ does not have kind ❰Type❱
     └─────────────┘


 You or the interpreter annotated this expression:

 ↳ True

 ... with this type or kind:

 ↳ Integer

 ... but the inferred type or kind of the expression is actually:

 ↳ Bool

 Some common reasons why you might get this error:

 ● The Haskell Dhall interpreter implicitly inserts a top-level annotation
   matching the expected type

   For example, if you run the following Haskell code:


     ┌───────────────────────────────┐
     │ >>> input auto "1" :: IO Text │
     └───────────────────────────────┘


   ... then the interpreter will actually type check the following annotated
   expression:


     ┌──────────┐
     │ 1 : Text │
     └──────────┘


   ... and then type-checking will fail

 ────────────────────────────────────────────────────────────────────────────────

 True : Integer

 (input):1:1

Shake reëxports

data Rules a #

Define a set of rules. Rules can be created with calls to functions such as %> or action. Rules are combined with either the Monoid instance, or (more commonly) the Monad instance and do notation. To define your own custom types of rule, see Development.Shake.Rule.

Instances
Monad Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

(>>=) :: Rules a -> (a -> Rules b) -> Rules b #

(>>) :: Rules a -> Rules b -> Rules b #

return :: a -> Rules a #

fail :: String -> Rules a #

Functor Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

fmap :: (a -> b) -> Rules a -> Rules b #

(<$) :: a -> Rules b -> Rules a #

MonadFix Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

mfix :: (a -> Rules a) -> Rules a #

MonadFail Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

fail :: String -> Rules a #

Applicative Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

pure :: a -> Rules a #

(<*>) :: Rules (a -> b) -> Rules a -> Rules b #

liftA2 :: (a -> b -> c) -> Rules a -> Rules b -> Rules c #

(*>) :: Rules a -> Rules b -> Rules b #

(<*) :: Rules a -> Rules b -> Rules a #

MonadIO Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

liftIO :: IO a -> Rules a #

Semigroup a => Semigroup (Rules a) 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

(<>) :: Rules a -> Rules a -> Rules a #

sconcat :: NonEmpty (Rules a) -> Rules a #

stimes :: Integral b => b -> Rules a -> Rules a #

(Semigroup a, Monoid a) => Monoid (Rules a) 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

mempty :: Rules a #

mappend :: Rules a -> Rules a -> Rules a #

mconcat :: [Rules a] -> Rules a #

data Action a #

The Action monad, use liftIO to raise IO actions into it, and need to execute files. Action values are used by addUserRule and action. The Action monad tracks the dependencies of a rule. To raise an exception call error, MonadFail or liftIO . throwIO.

Instances
Monad Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

(>>=) :: Action a -> (a -> Action b) -> Action b #

(>>) :: Action a -> Action b -> Action b #

return :: a -> Action a #

fail :: String -> Action a #

Functor Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

fmap :: (a -> b) -> Action a -> Action b #

(<$) :: a -> Action b -> Action a #

MonadFail Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

fail :: String -> Action a #

Applicative Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

pure :: a -> Action a #

(<*>) :: Action (a -> b) -> Action a -> Action b #

liftA2 :: (a -> b -> c) -> Action a -> Action b -> Action c #

(*>) :: Action a -> Action b -> Action b #

(<*) :: Action a -> Action b -> Action a #

MonadIO Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

liftIO :: IO a -> Action a #

MonadTempDir Action 
Instance details

Defined in Development.Shake.Command

Methods

runWithTempDir :: (FilePath -> Action a) -> Action a

Semigroup a => Semigroup (Action a) 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

(<>) :: Action a -> Action a -> Action a #

sconcat :: NonEmpty (Action a) -> Action a #

stimes :: Integral b => b -> Action a -> Action a #

Monoid a => Monoid (Action a) 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

mempty :: Action a #

mappend :: Action a -> Action a -> Action a #

mconcat :: [Action a] -> Action a #

CmdResult r => CmdArguments (Action r) 
Instance details

Defined in Development.Shake.Command

command :: (Partial, CmdResult r) => [CmdOption] -> String -> [String] -> Action r #

Execute a system command. Before running command make sure you need any files that are used by the command.

This function takes a list of options (often just [], see CmdOption for the available options), the name of the executable (either a full name, or a program on the $PATH) and a list of arguments. The result is often (), but can be a tuple containg any of Stdout, Stderr and Exit. Some examples:

command_ [] "gcc" ["-c","myfile.c"]                          -- compile a file, throwing an exception on failure
Exit c <- command [] "gcc" ["-c",myfile]                     -- run a command, recording the exit code
(Exit c, Stderr err) <- command [] "gcc" ["-c","myfile.c"]   -- run a command, recording the exit code and error output
Stdout out <- command [] "gcc" ["-MM","myfile.c"]            -- run a command, recording the output
command_ [Cwd "generated"] "gcc" ["-c",myfile]               -- run a command in a directory

Unless you retrieve the ExitCode using Exit, any ExitFailure will throw an error, including the Stderr in the exception message. If you capture the Stdout or Stderr, that stream will not be echoed to the console, unless you use the option EchoStdout or EchoStderr.

If you use command inside a do block and do not use the result, you may get a compile-time error about being unable to deduce CmdResult. To avoid this error, use command_.

By default the stderr stream will be captured for use in error messages, and also echoed. To only echo pass WithStderr False, which causes no streams to be captured by Shake, and certain programs (e.g. gcc) to detect they are running in a terminal.

command_ :: Partial -> [CmdOption] -> String -> [String] -> Action () #

A version of command where you do not require any results, used to avoid errors about being unable to deduce CmdResult.

(%>) :: Located -> FilePattern -> (FilePath -> Action ()) -> Rules () infix 1 #

Define a rule that matches a FilePattern, see ?== for the pattern rules. Patterns with no wildcards have higher priority than those with wildcards, and no file required by the system may be matched by more than one pattern at the same priority (see priority and alternatives to modify this behaviour). This function will create the directory for the result file, if necessary.

"*.asm.o" %> \out -> do
    let src = dropExtension out
    need [src]
    cmd "as" [src] "-o" [out]

To define a build system for multiple compiled languages, we recommend using .asm.o, .cpp.o, .hs.o, to indicate which language produces an object file. I.e., the file foo.cpp produces object file foo.cpp.o.

Note that matching is case-sensitive, even on Windows.

If the Action completes successfully the file is considered up-to-date, even if the file has not changed.

need :: Partial -> [FilePath] -> Action () #

Add a dependency on the file arguments, ensuring they are built before continuing. The file arguments may be built in parallel, in any order. This function is particularly necessary when calling cmd or command. As an example:

"//*.rot13" %> \out -> do
    let src = dropExtension out
    need [src]
    cmd "rot13" [src] "-o" [out]

Usually need [foo,bar] is preferable to need [foo] >> need [bar] as the former allows greater parallelism, while the latter requires foo to finish building before starting to build bar.

This function should not be called with wildcards (e.g. *.txt - use getDirectoryFiles to expand them), environment variables (e.g. $HOME - use getEnv to expand them) or directories (directories cannot be tracked directly - track files within the directory instead).

want :: Partial -> [FilePath] -> Rules () #

Require that the argument files are built by the rules, used to specify the target.

main = shake shakeOptions $ do
   want ["Main.exe"]
   ...

This program will build Main.exe, given sufficient rules. All arguments to all want calls may be built in parallel, in any order.

This function is defined in terms of action and need, use action if you need more complex targets than want allows.

shake :: ShakeOptions -> Rules () -> IO () #

Main entry point for running Shake build systems. For an example see the top of the module Development.Shake. Use ShakeOptions to specify how the system runs, and Rules to specify what to build. The function will throw an exception if the build fails.

To use command line flags to modify ShakeOptions see shakeArgs.

data Rebuild #

The current assumptions made by the build system, used by shakeRebuild. These options allow the end user to specify that any rules run are either to be treated as clean, or as dirty, regardless of what the build system thinks.

These assumptions only operate on files reached by the current action commands. Any other files in the database are left unchanged.

Constructors

RebuildNow

Assume these files are dirty and require rebuilding. for benchmarking rebuild speed and for rebuilding if untracked dependencies have changed. This flag is safe, but may cause more rebuilding than necessary.

RebuildNormal

Useful to reset the rebuild status to how it was before, equivalent to passing no Rebuild flags.

RebuildLater

This assumption is unsafe, and may lead to incorrect build results in this run. Assume these files are clean in this run, but test them normally in future runs.

Instances
Bounded Rebuild 
Instance details

Defined in Development.Shake.Internal.Options

Enum Rebuild 
Instance details

Defined in Development.Shake.Internal.Options

Eq Rebuild 
Instance details

Defined in Development.Shake.Internal.Options

Methods

(==) :: Rebuild -> Rebuild -> Bool #

(/=) :: Rebuild -> Rebuild -> Bool #

Data Rebuild 
Instance details

Defined in Development.Shake.Internal.Options

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Rebuild -> c Rebuild #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Rebuild #

toConstr :: Rebuild -> Constr #

dataTypeOf :: Rebuild -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Rebuild) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rebuild) #

gmapT :: (forall b. Data b => b -> b) -> Rebuild -> Rebuild #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rebuild -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rebuild -> r #

gmapQ :: (forall d. Data d => d -> u) -> Rebuild -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Rebuild -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Rebuild -> m Rebuild #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Rebuild -> m Rebuild #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Rebuild -> m Rebuild #

Ord Rebuild 
Instance details

Defined in Development.Shake.Internal.Options

Read Rebuild 
Instance details

Defined in Development.Shake.Internal.Options

Show Rebuild 
Instance details

Defined in Development.Shake.Internal.Options

(~>) :: Located -> String -> Action () -> Rules () infix 1 #

Infix operator alias for phony, for sake of consistency with normal rules.

cmd :: (Partial, CmdArguments args) => args :-> Action r #

Execute a system command. Before running cmd make sure you need any files that are used by the command.

  • String arguments are treated as a list of whitespace separated arguments.
  • [String] arguments are treated as a list of literal arguments.
  • CmdOption arguments are used as options.

Typically only string literals should be passed as String arguments. When using variables prefer [myvar] so that if myvar contains spaces they are properly escaped.

As some examples, here are some calls, and the resulting command string:

cmd_ "git log --pretty=" "oneline"           -- git log --pretty= oneline
cmd_ "git log --pretty=" ["oneline"]         -- git log --pretty= oneline
cmd_ "git log" ("--pretty=" ++ "oneline")    -- git log --pretty=oneline
cmd_ "git log" ("--pretty=" ++ "one line")   -- git log --pretty=one line
cmd_ "git log" ["--pretty=" ++ "one line"]   -- git log "--pretty=one line"

More examples, including return values, see this translation of the examples given for the command function:

cmd_ "gcc -c myfile.c"                                       -- compile a file, throwing an exception on failure
Exit c <- cmd "gcc -c" [myfile]                              -- run a command, recording the exit code
(Exit c, Stderr err) <- cmd "gcc -c myfile.c"                -- run a command, recording the exit code and error output
Stdout out <- cmd "gcc -MM myfile.c"                         -- run a command, recording the output
cmd (Cwd "generated") "gcc -c" [myfile] :: Action ()         -- run a command in a directory

If you use cmd inside a do block and do not use the result, you may get a compile-time error about being unable to deduce CmdResult. To avoid this error, use cmd_. If you enable OverloadedStrings or OverloadedLists you may have to give type signatures to the arguments, or use the more constrained command instead.

The cmd function can also be run in the IO monad, but then Traced is ignored and command lines are not echoed. As an example:

cmd (Cwd "generated") Shell "gcc -c myfile.c" :: IO ()

cmd_ :: (Partial, CmdArguments args, Unit args) => args :-> Action () #

See cmd. Same as cmd except with a unit result. cmd is to cmd_ as command is to command_.

data ShakeOptions #

Options to control the execution of Shake, usually specified by overriding fields in shakeOptions:

 shakeOptions{shakeThreads=4, shakeReport=["report.html"]}

The Data instance for this type reports the shakeProgress and shakeOutput fields as having the abstract type Hidden, because Data cannot be defined for functions or TypeReps.

Constructors

ShakeOptions 

Fields

  • shakeFiles :: FilePath

    Defaults to .shake. The directory used for storing Shake metadata files. All metadata files will be named shakeFiles/.shake.file-name, for some file-name. If the shakeFiles directory does not exist it will be created. If set to "/dev/null" then no shakeFiles are read or written (even on Windows).

  • shakeThreads :: Int

    Defaults to 1. Maximum number of rules to run in parallel, similar to make --jobs=N. For many build systems, a number equal to or slightly less than the number of physical processors works well. Use 0 to match the detected number of processors (when 0, getShakeOptions will return the number of threads used).

  • shakeVersion :: String

    Defaults to "1". The version number of your build rules. Change the version number to force a complete rebuild, such as when making significant changes to the rules that require a wipe. The version number should be set in the source code, and not passed on the command line.

  • shakeVerbosity :: Verbosity

    Defaults to Info. What level of messages should be printed out.

  • shakeStaunch :: Bool

    Defaults to False. Operate in staunch mode, where building continues even after errors, similar to make --keep-going.

  • shakeReport :: [FilePath]

    Defaults to []. Write a profiling report to a file, showing which rules rebuilt, why, and how much time they took. Useful for improving the speed of your build systems. If the file extension is .json it will write JSON data; if .js it will write Javascript; if .trace it will write trace events (load into about://tracing in Chrome); otherwise it will write HTML.

  • shakeLint :: Maybe Lint

    Defaults to Nothing. Perform sanity checks during building, see Lint for details.

  • shakeLintInside :: [FilePath]

    Directories in which the files will be tracked by the linter.

  • shakeLintIgnore :: [FilePattern]

    File patterns which are ignored from linter tracking, a bit like calling trackAllow in every rule.

  • shakeLintWatch :: [FilePattern]

    File patterns whose modification causes an error. Raises an error even if shakeLint is Nothing.

  • shakeCommandOptions :: [CmdOption]

    Defaults to []. Additional options to be passed to all command invocations.

  • shakeFlush :: Maybe Seconds

    Defaults to Just 10. How often to flush Shake metadata files in seconds, or Nothing to never flush explicitly. It is possible that on abnormal termination (not Haskell exceptions) any rules that completed in the last shakeFlush seconds will be lost.

  • shakeRebuild :: [(Rebuild, FilePattern)]

    What to rebuild

  • shakeAbbreviations :: [(String, String)]

    Defaults to []. A list of substrings that should be abbreviated in status messages, and their corresponding abbreviation. Commonly used to replace the long paths (e.g. .make/i586-linux-gcc/output) with an abbreviation (e.g. $OUT).

  • shakeStorageLog :: Bool

    Defaults to False. Write a message to shakeFiles/.shake.storage.log whenever a storage event happens which may impact on the current stored progress. Examples include database version number changes, database compaction or corrupt files.

  • shakeLineBuffering :: Bool

    Defaults to True. Change stdout and stderr to line buffering while running Shake.

  • shakeTimings :: Bool

    Defaults to False. Print timing information for each stage at the end.

  • shakeRunCommands :: Bool

    Default to True. Should you run command line actions, set to False to skip actions whose output streams and exit code are not used. Useful for profiling the non-command portion of the build system.

  • shakeChange :: Change

    Default to ChangeModtime. How to check if a file has changed, see Change for details.

  • shakeCreationCheck :: Bool

    Default to True. After running a rule to create a file, is it an error if the file does not exist. Provided for compatibility with make and ninja (which have ugly file creation semantics).

  • shakeLiveFiles :: [FilePath]

    Default to []. After the build system completes, write a list of all files which were live in that run, i.e. those which Shake checked were valid or rebuilt. Produces best answers if nothing rebuilds.

  • shakeVersionIgnore :: Bool

    Defaults to False. Ignore any differences in shakeVersion.

  • shakeColor :: Bool

    Defaults to False. Whether to colorize the output.

  • shakeShare :: Maybe FilePath

    Defaults to Nothing. Whether to use and store outputs in a shared directory.

  • shakeCloud :: [String]

    Defaults to []. Cloud servers to talk to forming a shared cache.

  • shakeSymlink :: Bool

    Defaults to False. Use symlinks for shakeShare if they are available. If this setting is True (even if symlinks are not available) then files will be made read-only to avoid inadvertantly poisoning the shared cache. Note the links are actually hard links, not symlinks.

  • shakeProgress :: IO Progress -> IO ()

    Defaults to no action. A function called when the build starts, allowing progress to be reported. The function is called on a separate thread, and that thread is killed when the build completes. For applications that want to display progress messages, progressSimple is often sufficient, but more advanced users should look at the Progress data type.

  • shakeOutput :: Verbosity -> String -> IO ()

    Defaults to writing using putStrLn. A function called to output messages from Shake, along with the Verbosity at which that message should be printed. This function will be called atomically from all other shakeOutput functions. The Verbosity will always be greater than or higher than shakeVerbosity.

  • shakeTrace :: String -> String -> Bool -> IO ()

    Defaults to doing nothing. Called for each call of traced, with the key, the command and True for starting, False for stopping.

  • shakeExtra :: HashMap TypeRep Dynamic

    This a map which can be used to store arbitrary extra information that a user may need when writing rules. The key of each entry must be the dynTypeRep of the value. Insert values using addShakeExtra and retrieve them using getShakeExtra. The correct way to use this field is to define a hidden newtype for the key, so that conflicts cannot occur.

Instances
Data ShakeOptions 
Instance details

Defined in Development.Shake.Internal.Options

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ShakeOptions -> c ShakeOptions #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ShakeOptions #

toConstr :: ShakeOptions -> Constr #

dataTypeOf :: ShakeOptions -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ShakeOptions) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ShakeOptions) #

gmapT :: (forall b. Data b => b -> b) -> ShakeOptions -> ShakeOptions #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ShakeOptions -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ShakeOptions -> r #

gmapQ :: (forall d. Data d => d -> u) -> ShakeOptions -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ShakeOptions -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ShakeOptions -> m ShakeOptions #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ShakeOptions -> m ShakeOptions #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ShakeOptions -> m ShakeOptions #

Show ShakeOptions 
Instance details

Defined in Development.Shake.Internal.Options

shakeOptions :: ShakeOptions #

The default set of ShakeOptions.

copyFile' :: Partial -> FilePath -> FilePath -> Action () #

copyFile' old new copies the existing file from old to new. The old file will be tracked as a dependency. Also creates the new directory if necessary.

data Change #

How should you determine if a file has changed, used by shakeChange. The most common values are ChangeModtime (the default, very fast, touch causes files to rebuild) and ChangeModtimeAndDigestInput (slightly slower, touch and switching git branches does not cause input files to rebuild).

Constructors

ChangeModtime

Compare equality of modification timestamps, a file has changed if its last modified time changes. A touch will force a rebuild. This mode is fast and usually sufficiently accurate, so is the default.

ChangeDigest

Compare equality of file contents digests, a file has changed if its digest changes. A touch will not force a rebuild. Use this mode if modification times on your file system are unreliable.

ChangeModtimeAndDigest

A file is rebuilt if both its modification time and digest have changed. For efficiency reasons, the modification time is checked first, and if that has changed, the digest is checked.

ChangeModtimeAndDigestInput

Use ChangeModtimeAndDigest for input/source files and ChangeModtime for output files. An input file is one which is a dependency but is not built by Shake as it has no matching rule and already exists on the file system.

ChangeModtimeOrDigest

A file is rebuilt if either its modification time or its digest has changed. A touch will force a rebuild, but even if a files modification time is reset afterwards, changes will also cause a rebuild.

Instances
Bounded Change 
Instance details

Defined in Development.Shake.Internal.Options

Enum Change 
Instance details

Defined in Development.Shake.Internal.Options

Eq Change 
Instance details

Defined in Development.Shake.Internal.Options

Methods

(==) :: Change -> Change -> Bool #

(/=) :: Change -> Change -> Bool #

Data Change 
Instance details

Defined in Development.Shake.Internal.Options

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Change -> c Change #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Change #

toConstr :: Change -> Constr #

dataTypeOf :: Change -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Change) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Change) #

gmapT :: (forall b. Data b => b -> b) -> Change -> Change #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Change -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Change -> r #

gmapQ :: (forall d. Data d => d -> u) -> Change -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Change -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Change -> m Change #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Change -> m Change #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Change -> m Change #

Ord Change 
Instance details

Defined in Development.Shake.Internal.Options

Read Change 
Instance details

Defined in Development.Shake.Internal.Options

Show Change 
Instance details

Defined in Development.Shake.Internal.Options

data Verbosity #

The verbosity data type, used by shakeVerbosity.

Constructors

Silent

Don't print any messages.

Error

Only print error messages.

Warn

Print errors and warnings.

Info

Print errors, warnings and # command-name (for file-name) when running a traced command.

Verbose

Print errors, warnings, full command lines when running a command or cmd command and status messages when starting a rule.

Diagnostic

Print messages for virtually everything (mostly for debugging).

Instances
Bounded Verbosity 
Instance details

Defined in Development.Shake.Internal.Options

Enum Verbosity 
Instance details

Defined in Development.Shake.Internal.Options

Eq Verbosity 
Instance details

Defined in Development.Shake.Internal.Options

Data Verbosity 
Instance details

Defined in Development.Shake.Internal.Options

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Verbosity -> c Verbosity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Verbosity #

toConstr :: Verbosity -> Constr #

dataTypeOf :: Verbosity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Verbosity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Verbosity) #

gmapT :: (forall b. Data b => b -> b) -> Verbosity -> Verbosity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Verbosity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Verbosity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Verbosity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Verbosity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity #

Ord Verbosity 
Instance details

Defined in Development.Shake.Internal.Options

Read Verbosity 
Instance details

Defined in Development.Shake.Internal.Options

Show Verbosity 
Instance details

Defined in Development.Shake.Internal.Options

removeFilesAfter :: FilePath -> [FilePattern] -> Action () #

Remove files, like removeFiles, but executed after the build completes successfully using runAfter. Useful for implementing clean actions that delete files Shake may have open for building, e.g. shakeFiles. Where possible, delete the files as a normal part of the build, e.g. using liftIO $ removeFiles dir pats.

data Lint #

Which lint checks to perform, used by shakeLint.

Constructors

LintBasic

The most basic form of linting. Checks that the current directory does not change and that results do not change after they are first written. Any calls to needed will assert that they do not cause a rule to be rebuilt.

LintFSATrace

Track which files are accessed by command line programs using fsatrace.

Instances
Bounded Lint 
Instance details

Defined in Development.Shake.Internal.Options

Enum Lint 
Instance details

Defined in Development.Shake.Internal.Options

Methods

succ :: Lint -> Lint #

pred :: Lint -> Lint #

toEnum :: Int -> Lint #

fromEnum :: Lint -> Int #

enumFrom :: Lint -> [Lint] #

enumFromThen :: Lint -> Lint -> [Lint] #

enumFromTo :: Lint -> Lint -> [Lint] #

enumFromThenTo :: Lint -> Lint -> Lint -> [Lint] #

Eq Lint 
Instance details

Defined in Development.Shake.Internal.Options

Methods

(==) :: Lint -> Lint -> Bool #

(/=) :: Lint -> Lint -> Bool #

Data Lint 
Instance details

Defined in Development.Shake.Internal.Options

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Lint -> c Lint #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Lint #

toConstr :: Lint -> Constr #

dataTypeOf :: Lint -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Lint) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Lint) #

gmapT :: (forall b. Data b => b -> b) -> Lint -> Lint #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Lint -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Lint -> r #

gmapQ :: (forall d. Data d => d -> u) -> Lint -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Lint -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Lint -> m Lint #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Lint -> m Lint #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Lint -> m Lint #

Ord Lint 
Instance details

Defined in Development.Shake.Internal.Options

Methods

compare :: Lint -> Lint -> Ordering #

(<) :: Lint -> Lint -> Bool #

(<=) :: Lint -> Lint -> Bool #

(>) :: Lint -> Lint -> Bool #

(>=) :: Lint -> Lint -> Bool #

max :: Lint -> Lint -> Lint #

min :: Lint -> Lint -> Lint #

Read Lint 
Instance details

Defined in Development.Shake.Internal.Options

Show Lint 
Instance details

Defined in Development.Shake.Internal.Options

Methods

showsPrec :: Int -> Lint -> ShowS #

show :: Lint -> String #

showList :: [Lint] -> ShowS #

takeBaseName :: FilePath -> String #

Get the base name, without an extension or path.

takeBaseName "/directory/file.ext" == "file"
takeBaseName "file/test.txt" == "test"
takeBaseName "dave.ext" == "dave"
takeBaseName "" == ""
takeBaseName "test" == "test"
takeBaseName (addTrailingPathSeparator x) == ""
takeBaseName "file/file.tar.gz" == "file.tar"

takeFileName :: FilePath -> FilePath #

Get the file name.

takeFileName "/directory/file.ext" == "file.ext"
takeFileName "test/" == ""
takeFileName x `isSuffixOf` x
takeFileName x == snd (splitFileName x)
Valid x => takeFileName (replaceFileName x "fred") == "fred"
Valid x => takeFileName (x </> "fred") == "fred"
Valid x => isRelative (takeFileName x)

takeDirectory :: FilePath -> FilePath #

Get the directory name, move up one level.

          takeDirectory "/directory/other.ext" == "/directory"
          takeDirectory x `isPrefixOf` x || takeDirectory x == "."
          takeDirectory "foo" == "."
          takeDirectory "/" == "/"
          takeDirectory "/foo" == "/"
          takeDirectory "/foo/bar/baz" == "/foo/bar"
          takeDirectory "/foo/bar/baz/" == "/foo/bar/baz"
          takeDirectory "foo/bar/baz" == "foo/bar"
Windows:  takeDirectory "foo\\bar" == "foo"
Windows:  takeDirectory "foo\\bar\\\\" == "foo\\bar"
Windows:  takeDirectory "C:\\" == "C:\\"

(-<.>) :: FilePath -> String -> FilePath infixr 7 #

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"

Network.HTTP.Client.TLS reëxports

tlsManagerSettings :: ManagerSettings #

Default TLS-enabled manager settings

newManager :: ManagerSettings -> IO Manager #

Create a Manager. The Manager will be shut down automatically via garbage collection.

Creating a new Manager is a relatively expensive operation, you are advised to share a single Manager between requests instead.

The first argument to this function is often defaultManagerSettings, though add-on libraries may provide a recommended replacement.

Since 0.1.0

parseRequest :: MonadThrow m => String -> m Request #

Convert a URL into a Request.

This function defaults some of the values in Request, such as setting method to GET and requestHeaders to [].

Since this function uses MonadThrow, the return monad can be anything that is an instance of MonadThrow, such as IO or Maybe.

You can place the request method at the beginning of the URL separated by a space, e.g.:

@@ parseRequest "POST http://httpbin.org/post" @@

Note that the request method must be provided as all capital letters.

A Request created by this function won't cause exceptions on non-2XX response status codes.

To create a request which throws on non-2XX status codes, see parseUrlThrow

Since: http-client-0.4.30

httpLbs :: Request -> Manager -> IO (Response ByteString) #

A convenience wrapper around withResponse which reads in the entire response body and immediately closes the connection. Note that this function performs fully strict I/O, and only uses a lazy ByteString in its response for memory efficiency. If you are anticipating a large response body, you are encouraged to use withResponse and brRead instead.

Since 0.1.0

data Response body #

A simple representation of the HTTP response.

Since 0.1.0

Instances
Functor Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fmap :: (a -> b) -> Response a -> Response b #

(<$) :: a -> Response b -> Response a #

Foldable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fold :: Monoid m => Response m -> m #

foldMap :: Monoid m => (a -> m) -> Response a -> m #

foldr :: (a -> b -> b) -> b -> Response a -> b #

foldr' :: (a -> b -> b) -> b -> Response a -> b #

foldl :: (b -> a -> b) -> b -> Response a -> b #

foldl' :: (b -> a -> b) -> b -> Response a -> b #

foldr1 :: (a -> a -> a) -> Response a -> a #

foldl1 :: (a -> a -> a) -> Response a -> a #

toList :: Response a -> [a] #

null :: Response a -> Bool #

length :: Response a -> Int #

elem :: Eq a => a -> Response a -> Bool #

maximum :: Ord a => Response a -> a #

minimum :: Ord a => Response a -> a #

sum :: Num a => Response a -> a #

product :: Num a => Response a -> a #

Traversable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

traverse :: Applicative f => (a -> f b) -> Response a -> f (Response b) #

sequenceA :: Applicative f => Response (f a) -> f (Response a) #

mapM :: Monad m => (a -> m b) -> Response a -> m (Response b) #

sequence :: Monad m => Response (m a) -> m (Response a) #

Eq body => Eq (Response body) 
Instance details

Defined in Network.HTTP.Client.Types

Methods

(==) :: Response body -> Response body -> Bool #

(/=) :: Response body -> Response body -> Bool #

Show body => Show (Response body) 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Response body -> ShowS #

show :: Response body -> String #

showList :: [Response body] -> ShowS #

data Request #

All information on how to connect to a host and what should be sent in the HTTP request.

If you simply wish to download from a URL, see parseRequest.

The constructor for this data type is not exposed. Instead, you should use either the defaultRequest value, or parseRequest to construct from a URL, and then use the records below to make modifications. This approach allows http-client to add configuration options without breaking backwards compatibility.

For example, to construct a POST request, you could do something like:

initReq <- parseRequest "http://www.example.com/path"
let req = initReq
            { method = "POST"
            }

For more information, please see http://www.yesodweb.com/book/settings-types.

Since 0.1.0

Instances
Show Request 
Instance details

Defined in Network.HTTP.Client.Types

System.FilePath reëxports

(</>) :: FilePath -> FilePath -> FilePath infixr 5 #

Combine two paths with a path separator. If the second path starts with a path separator or a drive letter, then it returns the second. The intention is that readFile (dir </> file) will access the same file as setCurrentDirectory dir; readFile file.

Posix:   "/directory" </> "file.ext" == "/directory/file.ext"
Windows: "/directory" </> "file.ext" == "/directory\\file.ext"
         "directory" </> "/file.ext" == "/file.ext"
Valid x => (takeDirectory x </> takeFileName x) `equalFilePath` x

Combined:

Posix:   "/" </> "test" == "/test"
Posix:   "home" </> "bob" == "home/bob"
Posix:   "x:" </> "foo" == "x:/foo"
Windows: "C:\\foo" </> "bar" == "C:\\foo\\bar"
Windows: "home" </> "bob" == "home\\bob"

Not combined:

Posix:   "home" </> "/bob" == "/bob"
Windows: "home" </> "C:\\bob" == "C:\\bob"

Not combined (tricky):

On Windows, if a filepath starts with a single slash, it is relative to the root of the current drive. In [1], this is (confusingly) referred to as an absolute path. The current behavior of </> is to never combine these forms.

Windows: "home" </> "/bob" == "/bob"
Windows: "home" </> "\\bob" == "\\bob"
Windows: "C:\\home" </> "\\bob" == "\\bob"

On Windows, from [1]: "If a file name begins with only a disk designator but not the backslash after the colon, it is interpreted as a relative path to the current directory on the drive with the specified letter." The current behavior of </> is to never combine these forms.

Windows: "D:\\foo" </> "C:bar" == "C:bar"
Windows: "C:\\foo" </> "C:bar" == "C:bar"

pathSeparator :: Char #

The character that separates directories. In the case where more than one character is possible, pathSeparator is the 'ideal' one.

Windows: pathSeparator == '\\'
Posix:   pathSeparator ==  '/'
isPathSeparator pathSeparator

ByteString reëxports

data ByteString #

A space-efficient representation of a Word8 vector, supporting many efficient operations.

A lazy ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Lazy.Char8 it can be interpreted as containing 8-bit characters.

Instances
Eq ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Data ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

Ord ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Read ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Show ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

IsString ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Binary ByteString 
Instance details

Defined in Data.Binary.Class

NFData ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

rnf :: ByteString -> () #

Stream ByteString 
Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token ByteString :: Type #

type Tokens ByteString :: Type #

CmdString ByteString 
Instance details

Defined in Development.Shake.Command

Methods

cmdString :: (Str, Str -> ByteString)

type Tokens ByteString 
Instance details

Defined in Text.Megaparsec.Stream

type Token ByteString 
Instance details

Defined in Text.Megaparsec.Stream

Helpers for pretty-printing

(<#>) :: Doc -> Doc -> Doc infixr 5 Source #

Same as Text.PrettyPrint.ANSI.Leijen's $, but doesn't clash with the prelude.

Text.PrettyPrint.ANSI.Leijen reëxports

(<+>) :: Doc -> Doc -> Doc infixr 6 #

The document (x <+> y) concatenates document x and y with a space in between. (infixr 6)

text :: String -> Doc #

The document (text s) contains the literal string s. The string shouldn't contain any newline ('\n') characters. If the string contains newline characters, the function string should be used.

punctuate :: Doc -> [Doc] -> [Doc] #

(punctuate p xs) concatenates all documents in xs with document p except for the last document.

someText = map text ["words","in","a","tuple"]
test     = parens (align (cat (punctuate comma someText)))

This is layed out on a page width of 20 as:

(words,in,a,tuple)

But when the page width is 15, it is layed out as:

(words,
 in,
 a,
 tuple)

(If you want put the commas in front of their elements instead of at the end, you should use tupled or, in general, encloseSep.)

dullred :: Doc -> Doc #

Displays a document with the dull red forecolor

linebreak :: Doc #

The linebreak document advances to the next line and indents to the current nesting level. Document linebreak behaves like empty if the line break is undone by group.

dullyellow :: Doc -> Doc #

Displays a document with the dull yellow forecolor

hardline :: Doc #

A linebreak that will never be flattened; it is guaranteed to render as a newline.

hang :: Int -> Doc -> Doc #

The hang combinator implements hanging indentation. The document (hang i x) renders document x with a nesting level set to the current column plus i. The following example uses hanging indentation for some text:

test  = hang 4 (fillSep (map text
        (words "the hang combinator indents these words !")))

Which lays out on a page with a width of 20 characters as:

the hang combinator
    indents these
    words !

The hang combinator is implemented as:

hang i x  = align (nest i x)

indent :: Int -> Doc -> Doc #

The document (indent i x) indents document x with i spaces.

test  = indent 4 (fillSep (map text
        (words "the indent combinator indents these words !")))

Which lays out with a page width of 20 as:

    the indent
    combinator
    indents these
    words !

putDoc :: Doc -> IO () #

The action (putDoc doc) pretty prints document doc to the standard output, with a page width of 80 characters and a ribbon width of 32 characters.

main :: IO ()
main = do{ putDoc (text "hello" <+> text "world") }

Which would output

hello world

Any ANSI colorisation in doc will be output.

class Pretty a where #

The member prettyList is only used to define the instance Pretty a => Pretty [a]. In normal circumstances only the pretty function is used.

Methods

pretty :: a -> Doc #

Instances
Pretty Bool 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Bool -> Doc #

prettyList :: [Bool] -> Doc #

Pretty Char 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Char -> Doc #

prettyList :: [Char] -> Doc #

Pretty Double 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Double -> Doc #

prettyList :: [Double] -> Doc #

Pretty Float 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Float -> Doc #

prettyList :: [Float] -> Doc #

Pretty Int 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Int -> Doc #

prettyList :: [Int] -> Doc #

Pretty Integer 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Integer -> Doc #

prettyList :: [Integer] -> Doc #

Pretty () 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: () -> Doc #

prettyList :: [()] -> Doc #

Pretty Doc 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Doc -> Doc #

prettyList :: [Doc] -> Doc #

Pretty a => Pretty [a] 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: [a] -> Doc #

prettyList :: [[a]] -> Doc #

Pretty a => Pretty (Maybe a) 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Maybe a -> Doc #

prettyList :: [Maybe a] -> Doc #

(Pretty a, Pretty b) => Pretty (a, b) 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: (a, b) -> Doc #

prettyList :: [(a, b)] -> Doc #

(Pretty a, Pretty b, Pretty c) => Pretty (a, b, c) 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: (a, b, c) -> Doc #

prettyList :: [(a, b, c)] -> Doc #

type Lens' s a = Lens s s a a #

This is a type alias for monomorphic lenses which don't change the type of the container (or of the value inside).

over :: ASetter s t a b -> (a -> b) -> s -> t #

over is a synonym for (%~).

Getting fmap in a roundabout way:

over mapped :: Functor f => (a -> b) -> f a -> f b
over mapped = fmap

Applying a function to both components of a pair:

over both :: (a -> b) -> (a, a) -> (b, b)
over both = \f t -> (f (fst t), f (snd t))

Using over _2 as a replacement for second:

>>> over _2 show (10,20)
(10,"20")

_Just :: Traversal (Maybe a) (Maybe a') a a' #

_Just targets the value contained in a Maybe, provided it's a Just.

See documentation for _Left (as these 2 are pretty similar). In particular, it can be used to write these:

  • Unsafely extracting a value from a Just:
   fromJust = (^?! _Just)
   
  • Checking whether a value is a Just:
   isJust = has _Just
   
  • Converting a Maybe to a list (empty or consisting of a single element):
   maybeToList = (^.. _Just)
   
  • Gathering all Justs in a list:
   catMaybes = (^.. each . _Just)
   

view :: Getting a s a -> s -> a #

view is a synonym for (^.):

>>> view _1 (1, 2)
1

The reason it's not in Lens.Micro is that view in lens has a more general signature:

view :: MonadReader s m => Getting a s a -> m a

So, you would be able to use this view with functions, but not in various reader monads. For most people this shouldn't be an issue; if it is for you, use view from microlens-mtl.

_1 :: Field1 s t a b => Lens s t a b #

Gives access to the 1st field of a tuple (up to 5-tuples).

Getting the 1st component:

>>> (1,2,3,4,5) ^. _1
1

Setting the 1st component:

>>> (1,2,3) & _1 .~ 10
(10,2,3)

Note that this lens is lazy, and can set fields even of undefined:

>>> set _1 10 undefined :: (Int, Int)
(10,*** Exception: Prelude.undefined

This is done to avoid violating a lens law stating that you can get back what you put:

>>> view _1 . set _1 10 $ (undefined :: (Int, Int))
10

The implementation (for 2-tuples) is:

_1 f t = (,) <$> f    (fst t)
             <*> pure (snd t)

or, alternatively,

_1 f ~(a,b) = (\a' -> (a',b)) <$> f a

(where ~ means a lazy pattern).

_2, _3, _4, and _5 are also available (see below).

_2 :: Field2 s t a b => Lens s t a b #

_4 :: Field4 s t a b => Lens s t a b #

each :: Each s t a b => Traversal s t a b #

each tries to be a universal Traversal – it behaves like traversed in most situations, but also adds support for e.g. tuples with same-typed values:

>>> (1,2) & each %~ succ
(2,3)
>>> ["x", "y", "z"] ^. each
"xyz"

However, note that each doesn't work on every instance of Traversable. If you have a Traversable which isn't supported by each, you can use traversed instead. Personally, I like using each instead of traversed whenever possible – it's shorter and more descriptive.

You can use each with these things:

each :: Traversal [a] [b] a b

each :: Traversal (Maybe a) (Maybe b) a b
each :: Traversal (Either a a) (Either b b) a b  -- since 0.4.11

each :: Traversal (a,a) (b,b) a b
each :: Traversal (a,a,a) (b,b,b) a b
each :: Traversal (a,a,a,a) (b,b,b,b) a b
each :: Traversal (a,a,a,a,a) (b,b,b,b,b) a b

each :: (RealFloat a, RealFloat b) => Traversal (Complex a) (Complex b) a b

You can also use each with types from array, bytestring, and containers by using microlens-ghc, or additionally with types from vector, text, and unordered-containers by using microlens-platform.

(&) :: a -> (a -> b) -> b infixl 1 #

& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $, which allows & to be nested in $.

>>> 5 & (+1) & show
"6"

Since: base-4.8.0.0

(%~) :: ASetter s t a b -> (a -> b) -> s -> t infixr 4 #

(%~) applies a function to the target; an alternative explanation is that it is an inverse of sets, which turns a setter into an ordinary function. mapped %~ reverse is the same thing as fmap reverse.

See over if you want a non-operator synonym.

Negating the 1st element of a pair:

>>> (1,2) & _1 %~ negate
(-1,2)

Turning all Lefts in a list to upper case:

>>> (mapped._Left.mapped %~ toUpper) [Left "foo", Right "bar"]
[Left "FOO",Right "bar"]