| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Dhall
Description
Please read the Dhall.Tutorial module, which contains a tutorial explaining how to use the language, the compiler, and this library
Synopsis
- input :: Type a -> Text -> IO a
- inputWithSettings :: InputSettings -> Type a -> Text -> IO a
- inputFile :: Type a -> FilePath -> IO a
- inputFileWithSettings :: EvaluateSettings -> Type a -> FilePath -> IO a
- inputExpr :: Text -> IO (Expr Src X)
- inputExprWithSettings :: InputSettings -> Text -> IO (Expr Src X)
- rootDirectory :: Functor f => LensLike' f InputSettings FilePath
- sourceName :: Functor f => LensLike' f InputSettings FilePath
- startingContext :: (Functor f, HasEvaluateSettings s) => LensLike' f s (Context (Expr Src X))
- normalizer :: (Functor f, HasEvaluateSettings s) => LensLike' f s (Maybe (ReifiedNormalizer X))
- standardVersion :: (Functor f, HasEvaluateSettings s) => LensLike' f s StandardVersion
- defaultInputSettings :: InputSettings
- data InputSettings
- defaultEvaluateSettings :: EvaluateSettings
- data EvaluateSettings
- class HasEvaluateSettings s
- detailed :: IO a -> IO a
- data Type a = Type {}
- newtype RecordType a = RecordType (Product (Const (Map Text (Expr Src X))) (Compose ((->) (Expr Src X)) Maybe) a)
- newtype UnionType a = UnionType (Compose (Map Text) Type a)
- data InputType a = InputType {}
- class Interpret a where
- autoWith :: InterpretOptions -> Type a
- data InvalidType s a = InvalidType {
- invalidTypeExpected :: Expr s a
- invalidTypeExpression :: Expr s a
- auto :: Interpret a => Type a
- genericAuto :: (Generic a, GenericInterpret (Rep a)) => Type a
- data InterpretOptions = InterpretOptions {
- fieldModifier :: Text -> Text
- constructorModifier :: Text -> Text
- inputNormalizer :: ReifiedNormalizer X
- defaultInterpretOptions :: InterpretOptions
- bool :: Type Bool
- natural :: Type Natural
- integer :: Type Integer
- scientific :: Type Scientific
- double :: Type Double
- lazyText :: Type Text
- strictText :: Type Text
- maybe :: Type a -> Type (Maybe a)
- sequence :: Type a -> Type (Seq a)
- list :: Type a -> Type [a]
- vector :: Type a -> Type (Vector a)
- unit :: Type ()
- string :: Type String
- pair :: Type a -> Type b -> Type (a, b)
- record :: RecordType a -> Type a
- field :: Text -> Type a -> RecordType a
- union :: UnionType a -> Type a
- constructor :: Text -> Type a -> UnionType a
- class GenericInterpret f where
- genericAutoWith :: InterpretOptions -> State Int (Type (f a))
- class GenericInject f where
- genericInjectWith :: InterpretOptions -> State Int (InputType (f a))
- class Inject a where
- injectWith :: InterpretOptions -> InputType a
- inject :: Inject a => InputType a
- genericInject :: (Generic a, GenericInject (Rep a)) => InputType a
- newtype RecordInputType a = RecordInputType (Map Text (InputType a))
- inputFieldWith :: Text -> InputType a -> RecordInputType a
- inputField :: Inject a => Text -> RecordInputType a
- inputRecord :: RecordInputType a -> InputType a
- newtype UnionInputType a = UnionInputType (Product (Const (Map Text (Expr Src X))) (Op (Text, Expr Src X)) a)
- inputConstructorWith :: Text -> InputType a -> UnionInputType a
- inputConstructor :: Inject a => Text -> UnionInputType a
- inputUnion :: UnionInputType a -> InputType a
- (>|<) :: UnionInputType a -> UnionInputType b -> UnionInputType (Either a b)
- rawInput :: Alternative f => Type a -> Expr s X -> f a
- (>$<) :: Contravariant f => (a -> b) -> f b -> f a
- (>*<) :: Divisible f => f a -> f b -> f (a, b)
- data Natural
- data Seq a
- data Text
- data Vector a
- class Generic a
Input
Arguments
| :: Type a | The type of value to decode from Dhall to Haskell |
| -> 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 BoolTrue
This uses the settings from defaultInputSettings.
Arguments
| :: InputSettings | |
| -> Type a | The type of value to decode from Dhall to Haskell |
| -> Text | The Dhall program |
| -> IO a | The decoded value in Haskell |
Extend input with a root directory to resolve imports relative
to, a file to mention in errors as the source, a custom typing
context, and a custom normalization process.
Since: 1.16
Arguments
| :: Type a | The type of value to decode from Dhall to Haskell |
| -> FilePath | The path to the Dhall program. |
| -> IO a | The decoded value in Haskell. |
Type-check and evaluate a Dhall program that is read from the file-system.
This uses the settings from defaultEvaluateSettings.
Since: 1.16
inputFileWithSettings Source #
Arguments
| :: EvaluateSettings | |
| -> Type a | The type of value to decode from Dhall to Haskell |
| -> FilePath | The path to the Dhall program. |
| -> IO a | The decoded value in Haskell. |
Extend inputFile with a custom typing context and a custom
normalization process.
Since: 1.16
Similar to input, but without interpreting the Dhall Expr into a Haskell
type.
Uses the settings from defaultInputSettings.
inputExprWithSettings Source #
Arguments
| :: InputSettings | |
| -> Text | The Dhall program |
| -> IO (Expr Src X) | The fully normalized AST |
Extend inputExpr with a root directory to resolve imports relative
to, a file to mention in errors as the source, a custom typing
context, and a custom normalization process.
Since: 1.16
rootDirectory :: Functor f => LensLike' f InputSettings FilePath Source #
Access the directory to resolve imports relative to.
Since: 1.16
sourceName :: Functor f => LensLike' f InputSettings FilePath Source #
Access the name of the source to report locations from; this is only used in error messages, so it's okay if this is a best guess or something symbolic.
Since: 1.16
startingContext :: (Functor f, HasEvaluateSettings s) => LensLike' f s (Context (Expr Src X)) Source #
Access the starting context used for evaluation and type-checking.
Since: 1.16
normalizer :: (Functor f, HasEvaluateSettings s) => LensLike' f s (Maybe (ReifiedNormalizer X)) Source #
Access the custom normalizer.
Since: 1.16
standardVersion :: (Functor f, HasEvaluateSettings s) => LensLike' f s StandardVersion Source #
Access the standard version (used primarily when encoding or decoding Dhall expressions to and from a binary representation)
Since: 1.17
defaultInputSettings :: InputSettings Source #
Default input settings: resolves imports relative to . (the
current working directory), report errors as coming from (input),
and default evaluation settings from defaultEvaluateSettings.
Since: 1.16
data InputSettings Source #
Since: 1.16
Instances
| HasEvaluateSettings InputSettings Source # | |
Defined in Dhall Methods evaluateSettings :: Functor f => LensLike' f InputSettings EvaluateSettings | |
defaultEvaluateSettings :: EvaluateSettings Source #
Default evaluation settings: no extra entries in the initial context, and no special normalizer behaviour.
Since: 1.16
data EvaluateSettings Source #
Since: 1.16
Instances
| HasEvaluateSettings EvaluateSettings Source # | |
Defined in Dhall Methods evaluateSettings :: Functor f => LensLike' f EvaluateSettings EvaluateSettings | |
class HasEvaluateSettings s Source #
Since: 1.16
Minimal complete definition
evaluateSettings
Instances
| HasEvaluateSettings EvaluateSettings Source # | |
Defined in Dhall Methods evaluateSettings :: Functor f => LensLike' f EvaluateSettings EvaluateSettings | |
| HasEvaluateSettings InputSettings Source # | |
Defined in Dhall Methods evaluateSettings :: Functor f => LensLike' f InputSettings EvaluateSettings | |
detailed :: IO a -> IO a Source #
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:1Types
A (Type a) represents a way to marshal a value of type 'a' from Dhall
into Haskell
You can produce Types either explicitly:
example :: Type (Vector Text) example = vector text
... or implicitly using auto:
example :: Type (Vector Text) example = auto
You can consume Types using the input function:
input :: Type a -> Text -> IO a
Constructors
| Type | |
newtype RecordType a Source #
The RecordType applicative functor allows you to build a Type parser
from a Dhall record.
For example, let's take the following Haskell data type:
>>>:{data Project = Project { projectName :: Text , projectDescription :: Text , projectStars :: Natural } :}
And assume that we have the following Dhall record that we would like to
parse as a Project:
{ name =
"dhall-haskell"
, description =
"A configuration language guaranteed to terminate"
, stars =
289
}Our parser has type Type Project, but we can't build that out of any
smaller parsers, as Types cannot be combined (they are only Functors).
However, we can use a RecordType to build a Type for Project:
>>>:{project :: Type Project project = record ( Project <$> field "name" strictText <*> field "description" strictText <*> field "stars" natural ) :}
Constructors
| RecordType (Product (Const (Map Text (Expr Src X))) (Compose ((->) (Expr Src X)) Maybe) a) |
Instances
| Functor RecordType Source # | |
Defined in Dhall | |
| Applicative RecordType Source # | |
Defined in Dhall Methods pure :: a -> RecordType a (<*>) :: RecordType (a -> b) -> RecordType a -> RecordType b liftA2 :: (a -> b -> c) -> RecordType a -> RecordType b -> RecordType c (*>) :: RecordType a -> RecordType b -> RecordType b (<*) :: RecordType a -> RecordType b -> RecordType a | |
The UnionType monoid allows you to build a Type parser
from a Dhall union
For example, let's take the following Haskell data type:
>>>:{data Status = Queued Natural | Result Text | Errored Text :}
And assume that we have the following Dhall union that we would like to
parse as a Status:
< Result = "Finish succesfully" | Queued : Natural | Errored : Text >
Our parser has type Type Status, but we can't build that out of any
smaller parsers, as Types cannot be combined (they are only Functors).
However, we can use a UnionType to build a Type for Status:
>>>:{status :: Type Status status = union ( ( Queued <$> constructor "Queued" natural ) <> ( Result <$> constructor "Result" strictText ) <> ( Errored <$> constructor "Errored" strictText ) ) :}
An (InputType a) represents a way to marshal a value of type 'a' from
Haskell into Dhall
Constructors
| InputType | |
class Interpret a where Source #
Any value that implements Interpret can be automatically decoded based on
the inferred return type of input
>>>input auto "[1, 2, 3]" :: IO (Vector Natural)[1,2,3]
This class auto-generates a default implementation for records that
implement Generic. This does not auto-generate an instance for recursive
types.
Minimal complete definition
Nothing
Methods
autoWith :: InterpretOptions -> Type a Source #
autoWith :: (Generic a, GenericInterpret (Rep a)) => InterpretOptions -> Type a Source #
Instances
| Interpret Bool Source # | |
| Interpret Double Source # | |
| Interpret Integer Source # | |
| Interpret Natural Source # | |
| Interpret Text Source # | |
| Interpret Text Source # | |
| Interpret Scientific Source # | |
| Interpret [Char] Source # | |
| Interpret a => Interpret [a] Source # | |
| Interpret a => Interpret (Maybe a) Source # | |
| Interpret a => Interpret (Seq a) Source # | |
| Interpret a => Interpret (Vector a) Source # | |
| (Inject a, Interpret b) => Interpret (a -> b) Source # | |
| (Interpret a, Interpret b) => Interpret (a, b) Source # | |
data InvalidType s a Source #
Every Type must obey the contract that if an expression's type matches the
the expected type then the extract function must succeed. If not, then
this exception is thrown
This exception indicates that an invalid Type was provided to the input
function
Constructors
| InvalidType | |
Fields
| |
Instances
| (Pretty s, Pretty a, Typeable s, Typeable a) => Show (InvalidType s a) Source # | |
Defined in Dhall Methods showsPrec :: Int -> InvalidType s a -> ShowS show :: InvalidType s a -> String showList :: [InvalidType s a] -> ShowS | |
| (Pretty s, Pretty a, Typeable s, Typeable a) => Exception (InvalidType s a) Source # | |
Defined in Dhall Methods toException :: InvalidType s a -> SomeException fromException :: SomeException -> Maybe (InvalidType s a) displayException :: InvalidType s a -> String | |
auto :: Interpret a => Type a Source #
Use the default options for interpreting a configuration file
auto = autoWith defaultInterpretOptions
genericAuto :: (Generic a, GenericInterpret (Rep a)) => Type a Source #
genericAuto is the default implementation for auto if you derive
Interpret. The difference is that you can use genericAuto without
having to explicitly provide an Interpret instance for a type as long as
the type derives Generic
data InterpretOptions Source #
Use these options to tweak how Dhall derives a generic implementation of
Interpret
Constructors
| InterpretOptions | |
Fields
| |
defaultInterpretOptions :: InterpretOptions Source #
Default interpret options, which you can tweak or override, like this:
autoWith
(defaultInterpretOptions { fieldModifier = Data.Text.Lazy.dropWhile (== '_') })scientific :: Type Scientific Source #
Decode a Scientific
>>>input scientific "1e100"1.0e100
sequence :: Type a -> Type (Seq a) Source #
Decode a Seq
>>>input (sequence natural) "[1, 2, 3]"fromList [1,2,3]
vector :: Type a -> Type (Vector a) Source #
Decode a Vector
>>>input (vector natural) "[1, 2, 3]"[1,2,3]
Decode () from an empty record.
>>>input unit "{=}" -- GHC doesn't print the result if it is ()
pair :: Type a -> Type b -> Type (a, b) Source #
Given a pair of Types, decode a tuple-record into their pairing.
>>>input (pair natural bool) "{ _1 = 42, _2 = False }"(42,False)
record :: RecordType a -> Type a Source #
Run a RecordType parser to build a Type parser.
class GenericInterpret f where Source #
This is the underlying class that powers the Interpret class's support
for automatically deriving a generic implementation
Methods
genericAutoWith :: InterpretOptions -> State Int (Type (f a)) Source #
Instances
| GenericInterpret (V1 :: Type -> Type) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type0 (V1 a)) Source # | |
| GenericInterpret (U1 :: Type -> Type) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type0 (U1 a)) Source # | |
| (Constructor c, GenericInterpret f, GenericInterpret (g :+: h)) => GenericInterpret (M1 C c f :+: (g :+: h)) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type ((M1 C c f :+: (g :+: h)) a)) Source # | |
| (Constructor c1, Constructor c2, GenericInterpret f1, GenericInterpret f2) => GenericInterpret (M1 C c1 f1 :+: M1 C c2 f2) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type ((M1 C c1 f1 :+: M1 C c2 f2) a)) Source # | |
| (GenericInterpret (f :+: g), GenericInterpret (h :+: i)) => GenericInterpret ((f :+: g) :+: (h :+: i)) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type (((f :+: g) :+: (h :+: i)) a)) Source # | |
| (Constructor c, GenericInterpret (f :+: g), GenericInterpret h) => GenericInterpret ((f :+: g) :+: M1 C c h) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type (((f :+: g) :+: M1 C c h) a)) Source # | |
| (GenericInterpret f, GenericInterpret g) => GenericInterpret (f :*: g) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type ((f :*: g) a)) Source # | |
| GenericInterpret f => GenericInterpret (M1 D d f) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type (M1 D d f a)) Source # | |
| GenericInterpret f => GenericInterpret (M1 C c f) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type (M1 C c f a)) Source # | |
| (Selector s, Interpret a) => GenericInterpret (M1 S s (K1 i a :: Type -> Type)) Source # | |
Defined in Dhall Methods genericAutoWith :: InterpretOptions -> State Int (Type0 (M1 S s (K1 i a) a0)) Source # | |
class GenericInject f where Source #
This is the underlying class that powers the Interpret class's support
for automatically deriving a generic implementation
Methods
genericInjectWith :: InterpretOptions -> State Int (InputType (f a)) Source #
Instances
| GenericInject (U1 :: Type -> Type) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType (U1 a)) Source # | |
| (Constructor c, GenericInject f, GenericInject (g :+: h)) => GenericInject (M1 C c f :+: (g :+: h)) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType ((M1 C c f :+: (g :+: h)) a)) Source # | |
| (Constructor c1, Constructor c2, GenericInject f1, GenericInject f2) => GenericInject (M1 C c1 f1 :+: M1 C c2 f2) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType ((M1 C c1 f1 :+: M1 C c2 f2) a)) Source # | |
| (GenericInject (f :+: g), GenericInject (h :+: i)) => GenericInject ((f :+: g) :+: (h :+: i)) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType (((f :+: g) :+: (h :+: i)) a)) Source # | |
| (Constructor c, GenericInject (f :+: g), GenericInject h) => GenericInject ((f :+: g) :+: M1 C c h) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType (((f :+: g) :+: M1 C c h) a)) Source # | |
| (GenericInject f, GenericInject g) => GenericInject (f :*: g) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType ((f :*: g) a)) Source # | |
| GenericInject f => GenericInject (M1 D d f) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType (M1 D d f a)) Source # | |
| GenericInject f => GenericInject (M1 C c f) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType (M1 C c f a)) Source # | |
| (Selector s, Inject a) => GenericInject (M1 S s (K1 i a :: Type -> Type)) Source # | |
Defined in Dhall Methods genericInjectWith :: InterpretOptions -> State Int (InputType (M1 S s (K1 i a) a0)) Source # | |
This class is used by Interpret instance for functions:
instance (Inject a, Interpret b) => Interpret (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 X) - Applying the Dhall function (i.e.
f :: Expr Src X) 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
Minimal complete definition
Nothing
Methods
injectWith :: InterpretOptions -> InputType a Source #
injectWith :: (Generic a, GenericInject (Rep a)) => InterpretOptions -> InputType a Source #
Instances
inject :: Inject a => InputType a Source #
Use the default options for injecting a value
inject = inject defaultInterpretOptions
genericInject :: (Generic a, GenericInject (Rep a)) => InputType a Source #
Use the default options for injecting a value, whose structure is determined generically.
This can be used when you want to use Inject on types that you don't
want to define orphan instances for.
newtype RecordInputType a Source #
Constructors
| RecordInputType (Map Text (InputType a)) |
Instances
| Contravariant RecordInputType Source # | |
Defined in Dhall Methods contramap :: (a -> b) -> RecordInputType b -> RecordInputType a (>$) :: b -> RecordInputType b -> RecordInputType a | |
| Divisible RecordInputType Source # | |
Defined in Dhall Methods divide :: (a -> (b, c)) -> RecordInputType b -> RecordInputType c -> RecordInputType a conquer :: RecordInputType a | |
inputFieldWith :: Text -> InputType a -> RecordInputType a Source #
inputField :: Inject a => Text -> RecordInputType a Source #
inputRecord :: RecordInputType a -> InputType a Source #
newtype UnionInputType a Source #
The UnionInputType monoid allows you to build
an InputType injector for a Dhall record.
For example, let's take the following Haskell data type:
>>>:{data Status = Queued Natural | Result Text | Errored Text :}
And assume that we have the following Dhall union that we would like to
parse as a Status:
< Result = "Finish succesfully" | Queued : Natural | Errored : Text >
Our injector has type InputType Status, but we can't build that out of any
smaller injectors, as InputTypes cannot be combined.
However, we can use an UnionInputType to build an InputType for Status:
>>>:{injectStatus :: InputType Status injectStatus = adapt >$< inputUnion ( inputConstructorWith "Queued" inject >|< inputConstructorWith "Result" inject >|< inputConstructorWith "Errored" inject ) where adapt (Queued n) = Left n adapt (Result t) = Right (Left t) adapt (Errored e) = Right (Right e) :}
Or, since we are simply using the Inject instance to inject each branch, we could write
>>>:{injectStatus :: InputType Status injectStatus = adapt >$< inputUnion ( inputConstructor "Queued" >|< inputConstructor "Result" >|< inputConstructor "Errored" ) where adapt (Queued n) = Left n adapt (Result t) = Right (Left t) adapt (Errored e) = Right (Right e) :}
Instances
| Contravariant UnionInputType Source # | |
Defined in Dhall Methods contramap :: (a -> b) -> UnionInputType b -> UnionInputType a (>$) :: b -> UnionInputType b -> UnionInputType a | |
inputConstructorWith :: Text -> InputType a -> UnionInputType a Source #
inputConstructor :: Inject a => Text -> UnionInputType a Source #
inputUnion :: UnionInputType a -> InputType a Source #
(>|<) :: UnionInputType a -> UnionInputType b -> UnionInputType (Either a b) infixr 5 Source #
Combines two UnionInputType values. See UnionInputType for usage
notes.
Ideally, this matches chosen;
however, this allows UnionInputType to not need a Divisible instance
itself (since no instance is possible).
Miscellaneous
Arguments
| :: Alternative f | |
| => Type a | The type of value to decode from Dhall to Haskell |
| -> Expr s X | a closed form Dhall program, which evaluates to the expected type |
| -> f a | The decoded value in Haskell |
Use this function to extract Haskell values directly from Dhall AST.
The intended use case is to allow easy extraction of Dhall values for
making the function normalizeWith easier to use.
For other use cases, use input from Dhall module. It will give you
a much better user experience.
(>*<) :: Divisible f => f a -> f b -> f (a, b) infixr 5 Source #
The RecordInputType divisible (contravariant) functor allows you to build
an InputType injector for a Dhall record.
For example, let's take the following Haskell data type:
>>>:{data Project = Project { projectName :: Text , projectDescription :: Text , projectStars :: Natural } :}
And assume that we have the following Dhall record that we would like to
parse as a Project:
{ name =
"dhall-haskell"
, description =
"A configuration language guaranteed to terminate"
, stars =
289
}Our injector has type InputType Project, but we can't build that out of any
smaller injectors, as InputTypes cannot be combined (they are only Contravariants).
However, we can use an InputRecordType to build an InputType for Project:
>>>:{injectProject :: InputType Project injectProject = inputRecord ( adapt >$< inputFieldWith "name" inject >*< inputFieldWith "description" inject >*< inputFieldWith "stars" inject ) where adapt (Project{..}) = (projectName, (projectDescription, projectStars)) :}
Or, since we are simply using the Inject instance to inject each field, we could write
>>>:{injectProject :: InputType Project injectProject = inputRecord ( adapt >$< inputField "name" >*< inputField "description" >*< inputField "stars" ) where adapt (Project{..}) = (projectName, (projectDescription, projectStars)) :}
Infix divided
Re-exports
Instances
| Enum Natural | |
Defined in GHC.Enum | |
| Eq Natural | |
| Integral Natural | |
Defined in GHC.Real | |
| Data Natural | |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural dataTypeOf :: Natural -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Natural) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural | |
| Num Natural | |
| Ord Natural | |
| Read Natural | |
| Real Natural | |
Defined in GHC.Real Methods toRational :: Natural -> Rational | |
| Show Natural | |
| Ix Natural | |
| Lift Natural | |
Defined in Language.Haskell.TH.Syntax | |
| PrintfArg Natural | |
Defined in Text.Printf | |
| Pretty Natural | |
Defined in Data.Text.Prettyprint.Doc.Internal | |
| Hashable Natural | |
Defined in Data.Hashable.Class | |
| Subtractive Natural | |
| Serialise Natural | |
Defined in Codec.Serialise.Class | |
| Inject Natural Source # | |
Defined in Dhall Methods injectWith :: InterpretOptions -> InputType Natural Source # | |
| Interpret Natural Source # | |
| FromJSON Natural | |
Defined in Data.Aeson.Types.FromJSON | |
| FromJSONKey Natural | |
Defined in Data.Aeson.Types.FromJSON | |
| ToJSON Natural | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding :: Natural -> Encoding toJSONList :: [Natural] -> Value toEncodingList :: [Natural] -> Encoding | |
| ToJSONKey Natural | |
Defined in Data.Aeson.Types.ToJSON | |
| type Difference Natural | |
Defined in Basement.Numerical.Subtractive | |
Instances
| Monad Seq | |
| Functor Seq | |
| MonadFix Seq | |
Defined in Data.Sequence.Internal | |
| Applicative Seq | |
| Foldable Seq | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => Seq m -> m foldMap :: Monoid m => (a -> m) -> Seq a -> m foldr :: (a -> b -> b) -> b -> Seq a -> b foldr' :: (a -> b -> b) -> b -> Seq a -> b foldl :: (b -> a -> b) -> b -> Seq a -> b foldl' :: (b -> a -> b) -> b -> Seq a -> b foldr1 :: (a -> a -> a) -> Seq a -> a foldl1 :: (a -> a -> a) -> Seq a -> a elem :: Eq a => a -> Seq a -> Bool maximum :: Ord a => Seq a -> a | |
| Traversable Seq | |
| MonadPlus Seq | |
| Alternative Seq | |
| Eq1 Seq | |
Defined in Data.Sequence.Internal | |
| Ord1 Seq | |
Defined in Data.Sequence.Internal Methods liftCompare :: (a -> b -> Ordering) -> Seq a -> Seq b -> Ordering | |
| Read1 Seq | |
Defined in Data.Sequence.Internal Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Seq a) liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Seq a] liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Seq a) liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Seq a] | |
| Show1 Seq | |
Defined in Data.Sequence.Internal Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Seq a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Seq a] -> ShowS | |
| MonadZip Seq | |
| UnzipWith Seq | |
Defined in Data.Sequence.Internal Methods unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b) | |
| FromJSON1 Seq | |
Defined in Data.Aeson.Types.FromJSON Methods liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Seq a) liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Seq a] | |
| ToJSON1 Seq | |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON :: (a -> Value) -> ([a] -> Value) -> Seq a -> Value liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Seq a] -> Value liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Seq a -> Encoding liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Seq a] -> Encoding | |
| IsList (Seq a) | |
| Eq a => Eq (Seq a) | |
| Data a => Data (Seq a) | |
Defined in Data.Sequence.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seq a -> c (Seq a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) dataTypeOf :: Seq a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) | |
| Ord a => Ord (Seq a) | |
| Read a => Read (Seq a) | |
Defined in Data.Sequence.Internal | |
| Show a => Show (Seq a) | |
| a ~ Char => IsString (Seq a) | |
Defined in Data.Sequence.Internal Methods fromString :: String -> Seq a | |
| Semigroup (Seq a) | |
| Monoid (Seq a) | |
| NFData a => NFData (Seq a) | |
Defined in Data.Sequence.Internal | |
| Serialise a => Serialise (Seq a) | |
Defined in Codec.Serialise.Class | |
| Inject a => Inject (Seq a) Source # | |
Defined in Dhall Methods injectWith :: InterpretOptions -> InputType (Seq a) Source # | |
| Interpret a => Interpret (Seq a) Source # | |
| FromJSON a => FromJSON (Seq a) | |
Defined in Data.Aeson.Types.FromJSON | |
| ToJSON a => ToJSON (Seq a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding :: Seq a -> Encoding toJSONList :: [Seq a] -> Value toEncodingList :: [Seq a] -> Encoding | |
| type Item (Seq a) | |
Defined in Data.Sequence.Internal type Item (Seq a) = a | |
Instances
| Pretty Text | |
Defined in Data.Text.Prettyprint.Doc.Internal | |
| Stream Text | |
Defined in Text.Megaparsec.Stream Methods tokenToChunk :: Proxy Text -> Token Text -> Tokens Text tokensToChunk :: Proxy Text -> [Token Text] -> Tokens Text chunkToTokens :: Proxy Text -> Tokens Text -> [Token Text] chunkLength :: Proxy Text -> Tokens Text -> Int chunkEmpty :: Proxy Text -> Tokens Text -> Bool take1_ :: Text -> Maybe (Token Text, Text) takeN_ :: Int -> Text -> Maybe (Tokens Text, Text) takeWhile_ :: (Token Text -> Bool) -> Text -> (Tokens Text, Text) showTokens :: Proxy Text -> NonEmpty (Token Text) -> String reachOffset :: Int -> PosState Text -> (SourcePos, String, PosState Text) reachOffsetNoLine :: Int -> PosState Text -> (SourcePos, PosState Text) | |
| Hashable Text | |
Defined in Data.Hashable.Class | |
| Chunk Text | |
Defined in Data.Attoparsec.Internal.Types Associated Types type ChunkElem Text :: Type Methods pappendChunk :: State Text -> Text -> State Text atBufferEnd :: Text -> State Text -> Pos bufferElemAt :: Text -> Pos -> State Text -> Maybe (ChunkElem Text, Int) chunkElemToChar :: Text -> ChunkElem Text -> Char | |
| FoldCase Text | |
Defined in Data.CaseInsensitive.Internal | |
| Serialise Text | |
Defined in Codec.Serialise.Class | |
| Inject Text Source # | |
Defined in Dhall Methods | |
| Interpret Text Source # | |
| FromJSON Text | |
Defined in Data.Aeson.Types.FromJSON | |
| FromJSONKey Text | |
Defined in Data.Aeson.Types.FromJSON | |
| KeyValue Object | |
Defined in Data.Aeson.Types.ToJSON | |
| KeyValue Pair | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding :: Text -> Encoding toJSONList :: [Text] -> Value toEncodingList :: [Text] -> Encoding | |
| ToJSONKey Text | |
Defined in Data.Aeson.Types.ToJSON | |
| MonadParsec Void Text Parser | |
Defined in Dhall.Parser.Combinators Methods failure :: Maybe (ErrorItem (Token Text)) -> Set (ErrorItem (Token Text)) -> Parser a fancyFailure :: Set (ErrorFancy Void) -> Parser a label :: String -> Parser a -> Parser a hidden :: Parser a -> Parser a lookAhead :: Parser a -> Parser a notFollowedBy :: Parser a -> Parser () withRecovery :: (ParseError Text Void -> Parser a) -> Parser a -> Parser a observing :: Parser a -> Parser (Either (ParseError Text Void) a) token :: (Token Text -> Maybe a) -> Set (ErrorItem (Token Text)) -> Parser a tokens :: (Tokens Text -> Tokens Text -> Bool) -> Tokens Text -> Parser (Tokens Text) takeWhileP :: Maybe String -> (Token Text -> Bool) -> Parser (Tokens Text) takeWhile1P :: Maybe String -> (Token Text -> Bool) -> Parser (Tokens Text) takeP :: Maybe String -> Int -> Parser (Tokens Text) getParserState :: Parser (State Text) updateParserState :: (State Text -> State Text) -> Parser () | |
| Monad m => Stream Text m Char | |
Defined in Text.Parsec.Prim | |
| FromPairs Value (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON Methods fromPairs :: DList Pair -> Value | |
| v ~ Value => KeyValuePair v (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON Methods pair :: String -> v -> DList Pair | |
| type Item Text | |
| type Token Text | |
Defined in Text.Megaparsec.Stream type Token Text = Char | |
| type Tokens Text | |
Defined in Text.Megaparsec.Stream | |
| type State Text | |
Defined in Data.Attoparsec.Internal.Types type State Text = Buffer | |
| type ChunkElem Text | |
Defined in Data.Attoparsec.Internal.Types type ChunkElem Text = Char | |
Instances
| Monad Vector | |
| Functor Vector | |
| MonadFail Vector | |
Defined in Data.Vector | |
| Applicative Vector | |
| Foldable Vector | |
Defined in Data.Vector Methods fold :: Monoid m => Vector m -> m foldMap :: Monoid m => (a -> m) -> Vector a -> m foldr :: (a -> b -> b) -> b -> Vector a -> b foldr' :: (a -> b -> b) -> b -> Vector a -> b foldl :: (b -> a -> b) -> b -> Vector a -> b foldl' :: (b -> a -> b) -> b -> Vector a -> b foldr1 :: (a -> a -> a) -> Vector a -> a foldl1 :: (a -> a -> a) -> Vector a -> a elem :: Eq a => a -> Vector a -> Bool maximum :: Ord a => Vector a -> a | |
| Traversable Vector | |
| MonadPlus Vector | |
| Alternative Vector | |
| Eq1 Vector | |
Defined in Data.Vector | |
| Ord1 Vector | |
Defined in Data.Vector Methods liftCompare :: (a -> b -> Ordering) -> Vector a -> Vector b -> Ordering | |
| Read1 Vector | |
Defined in Data.Vector Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Vector a) liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Vector a] liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Vector a) liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Vector a] | |
| Show1 Vector | |
Defined in Data.Vector Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Vector a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Vector a] -> ShowS | |
| MonadZip Vector | |
| NFData1 Vector | |
Defined in Data.Vector | |
| FromJSON1 Vector | |
Defined in Data.Aeson.Types.FromJSON Methods liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Vector a) liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Vector a] | |
| ToJSON1 Vector | |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON :: (a -> Value) -> ([a] -> Value) -> Vector a -> Value liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Vector a] -> Value liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Vector a -> Encoding liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Vector a] -> Encoding | |
| Vector Vector a | |
Defined in Data.Vector Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) a -> m (Vector a) basicUnsafeThaw :: PrimMonad m => Vector a -> m (Mutable Vector (PrimState m) a) basicLength :: Vector a -> Int basicUnsafeSlice :: Int -> Int -> Vector a -> Vector a basicUnsafeIndexM :: Monad m => Vector a -> Int -> m a basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) a -> Vector a -> m () | |
| IsList (Vector a) | |
| Eq a => Eq (Vector a) | |
| Data a => Data (Vector a) | |
Defined in Data.Vector Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) toConstr :: Vector a -> Constr dataTypeOf :: Vector a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) | |
| Ord a => Ord (Vector a) | |
| Read a => Read (Vector a) | |
Defined in Data.Vector | |
| Show a => Show (Vector a) | |
| Semigroup (Vector a) | |
| Monoid (Vector a) | |
| NFData a => NFData (Vector a) | |
Defined in Data.Vector | |
| Serialise a => Serialise (Vector a) | |
Defined in Codec.Serialise.Class Methods encode :: Vector a -> Encoding decode :: Decoder s (Vector a) encodeList :: [Vector a] -> Encoding decodeList :: Decoder s [Vector a] | |
| Inject a => Inject (Vector a) Source # | |
Defined in Dhall Methods injectWith :: InterpretOptions -> InputType (Vector a) Source # | |
| Interpret a => Interpret (Vector a) Source # | |
| FromJSON a => FromJSON (Vector a) | |
Defined in Data.Aeson.Types.FromJSON | |
| ToJSON a => ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding :: Vector a -> Encoding toJSONList :: [Vector a] -> Value toEncodingList :: [Vector a] -> Encoding | |
| type Mutable Vector | |
Defined in Data.Vector type Mutable Vector = MVector | |
| type Item (Vector a) | |
Defined in Data.Vector type Item (Vector a) = a | |
Minimal complete definition
from, to
Instances
| Generic Bool | |
Defined in GHC.Generics Associated Types type Rep Bool :: Type -> Type | |
| Generic Ordering | |
Defined in GHC.Generics Associated Types type Rep Ordering :: Type -> Type | |
| Generic Exp | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Exp :: Type -> Type | |
| Generic Match | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Match :: Type -> Type | |
| Generic Clause | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Clause :: Type -> Type | |
| Generic Pat | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Pat :: Type -> Type | |
| Generic Type | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Type :: Type -> Type | |
| Generic Dec | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Dec :: Type -> Type | |
| Generic Name | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Name :: Type -> Type | |
| Generic FunDep | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep FunDep :: Type -> Type | |
| Generic InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep InjectivityAnn :: Type -> Type | |
| Generic Overlap | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Overlap :: Type -> Type | |
| Generic () | |
Defined in GHC.Generics Associated Types type Rep () :: Type -> Type | |
| Generic Import Source # | |
| Generic Var Source # | |
| Generic Const Source # | |
| Generic All | |
Defined in Data.Semigroup.Internal Associated Types type Rep All :: Type -> Type | |
| Generic Any | |
Defined in Data.Semigroup.Internal Associated Types type Rep Any :: Type -> Type | |
| Generic Associativity | |
Defined in GHC.Generics Associated Types type Rep Associativity :: Type -> Type | |
| Generic DecidedStrictness | |
Defined in GHC.Generics Associated Types type Rep DecidedStrictness :: Type -> Type | |
| Generic Fixity | |
Defined in GHC.Generics Associated Types type Rep Fixity :: Type -> Type | |
| Generic SourceStrictness | |
Defined in GHC.Generics Associated Types type Rep SourceStrictness :: Type -> Type | |
| Generic SourceUnpackedness | |
Defined in GHC.Generics Associated Types type Rep SourceUnpackedness :: Type -> Type | |
| Generic Version | |
Defined in Data.Version Associated Types type Rep Version :: Type -> Type | |
| Generic Void | |
| Generic ExitCode | |
Defined in GHC.IO.Exception Associated Types type Rep ExitCode :: Type -> Type | |
| Generic InvalidPosException | |
Defined in Text.Megaparsec.Pos Associated Types type Rep InvalidPosException :: Type -> Type | |
| Generic SourcePos | |
Defined in Text.Megaparsec.Pos Associated Types type Rep SourcePos :: Type -> Type | |
| Generic Src Source # | |
| Generic ForeignSrcLang | |
Defined in GHC.ForeignSrcLang.Type Associated Types type Rep ForeignSrcLang :: Type -> Type | |
| Generic Extension | |
Defined in GHC.LanguageExtensions.Type Associated Types type Rep Extension :: Type -> Type | |
| Generic URI | |
Defined in Network.URI Associated Types type Rep URI :: Type -> Type | |
| Generic URIAuth | |
Defined in Network.URI Associated Types type Rep URIAuth :: Type -> Type | |
| Generic NameFlavour | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep NameFlavour :: Type -> Type | |
| Generic AnnLookup | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep AnnLookup :: Type -> Type | |
| Generic AnnTarget | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep AnnTarget :: Type -> Type | |
| Generic Bang | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Bang :: Type -> Type | |
| Generic Body | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Body :: Type -> Type | |
| Generic Callconv | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Callconv :: Type -> Type | |
| Generic Con | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Con :: Type -> Type | |
| Generic DecidedStrictness | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep DecidedStrictness :: Type -> Type | |
| Generic DerivClause | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep DerivClause :: Type -> Type | |
| Generic DerivStrategy | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep DerivStrategy :: Type -> Type | |
| Generic FamilyResultSig | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep FamilyResultSig :: Type -> Type | |
| Generic Fixity | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Fixity :: Type -> Type | |
| Generic FixityDirection | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep FixityDirection :: Type -> Type | |
| Generic Foreign | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Foreign :: Type -> Type | |
| Generic Guard | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Guard :: Type -> Type | |
| Generic Info | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Info :: Type -> Type | |
| Generic Inline | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Inline :: Type -> Type | |
| Generic Lit | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Lit :: Type -> Type | |
| Generic Loc | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Loc :: Type -> Type | |
| Generic ModName | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep ModName :: Type -> Type | |
| Generic Module | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Module :: Type -> Type | |
| Generic ModuleInfo | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep ModuleInfo :: Type -> Type | |
| Generic NameSpace | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep NameSpace :: Type -> Type | |
| Generic OccName | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep OccName :: Type -> Type | |
| Generic PatSynArgs | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep PatSynArgs :: Type -> Type | |
| Generic PatSynDir | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep PatSynDir :: Type -> Type | |
| Generic Phases | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Phases :: Type -> Type | |
| Generic PkgName | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep PkgName :: Type -> Type | |
| Generic Pragma | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Pragma :: Type -> Type | |
| Generic Range | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Range :: Type -> Type | |
| Generic Role | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Role :: Type -> Type | |
| Generic RuleBndr | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep RuleBndr :: Type -> Type | |
| Generic RuleMatch | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep RuleMatch :: Type -> Type | |
| Generic Safety | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Safety :: Type -> Type | |
| Generic SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep SourceStrictness :: Type -> Type | |
| Generic SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep SourceUnpackedness :: Type -> Type | |
| Generic Stmt | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep Stmt :: Type -> Type | |
| Generic TyLit | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep TyLit :: Type -> Type | |
| Generic TySynEqn | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep TySynEqn :: Type -> Type | |
| Generic TyVarBndr | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep TyVarBndr :: Type -> Type | |
| Generic TypeFamilyHead | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep TypeFamilyHead :: Type -> Type | |
| Generic ImportHashed Source # | |
Defined in Dhall.Core Associated Types type Rep ImportHashed :: Type -> Type | |
| Generic ImportMode Source # | |
Defined in Dhall.Core Associated Types type Rep ImportMode :: Type -> Type | |
| Generic ImportType Source # | |
Defined in Dhall.Core Associated Types type Rep ImportType :: Type -> Type | |
| Generic URL Source # | |
| Generic Scheme Source # | |
| Generic FilePrefix Source # | |
Defined in Dhall.Core Associated Types type Rep FilePrefix :: Type -> Type | |
| Generic File Source # | |
| Generic Directory Source # | |
| Generic CompressionLevel | |
Defined in Codec.Compression.Zlib.Stream Associated Types type Rep CompressionLevel :: Type -> Type | |
| Generic CompressionStrategy | |
Defined in Codec.Compression.Zlib.Stream Associated Types type Rep CompressionStrategy :: Type -> Type | |
| Generic Format | |
Defined in Codec.Compression.Zlib.Stream Associated Types type Rep Format :: Type -> Type | |
| Generic MemoryLevel | |
Defined in Codec.Compression.Zlib.Stream Associated Types type Rep MemoryLevel :: Type -> Type | |
| Generic Method | |
Defined in Codec.Compression.Zlib.Stream Associated Types type Rep Method :: Type -> Type | |
| Generic WindowBits | |
Defined in Codec.Compression.Zlib.Stream Associated Types type Rep WindowBits :: Type -> Type | |
| Generic Half | |
Defined in Numeric.Half Associated Types type Rep Half :: Type -> Type | |
| Generic Mode | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Associated Types type Rep Mode :: Type -> Type | |
| Generic Style | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Associated Types type Rep Style :: Type -> Type | |
| Generic TextDetails | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Associated Types type Rep TextDetails :: Type -> Type | |
| Generic Doc | |
Defined in Text.PrettyPrint.HughesPJ Associated Types type Rep Doc :: Type -> Type | |
| Generic Value | |
Defined in Data.Aeson.Types.Internal Associated Types type Rep Value :: Type -> Type | |
| Generic [a] | |
Defined in GHC.Generics Associated Types type Rep [a] :: Type -> Type | |
| Generic (Maybe a) | |
Defined in GHC.Generics Associated Types type Rep (Maybe a) :: Type -> Type | |
| Generic (Par1 p) | |
Defined in GHC.Generics Associated Types type Rep (Par1 p) :: Type -> Type | |
| Generic (NonEmpty a) | |
Defined in GHC.Generics Associated Types type Rep (NonEmpty a) :: Type -> Type | |
| Generic (ZipList a) | |
Defined in Control.Applicative Associated Types type Rep (ZipList a) :: Type -> Type | |
| Generic (Identity a) | |
Defined in Data.Functor.Identity Associated Types type Rep (Identity a) :: Type -> Type | |
| Generic (Down a) | |
Defined in GHC.Generics Associated Types type Rep (Down a) :: Type -> Type | |
| Generic (Dual a) | |
Defined in Data.Semigroup.Internal Associated Types type Rep (Dual a) :: Type -> Type | |
| Generic (First a) | |
Defined in Data.Monoid Associated Types type Rep (First a) :: Type -> Type | |
| Generic (Last a) | |
Defined in Data.Monoid Associated Types type Rep (Last a) :: Type -> Type | |
| Generic (Product a) | |
Defined in Data.Semigroup.Internal Associated Types type Rep (Product a) :: Type -> Type | |
| Generic (Sum a) | |
Defined in Data.Semigroup.Internal Associated Types type Rep (Sum a) :: Type -> Type | |
| Generic (Endo a) | |
Defined in Data.Semigroup.Internal Associated Types type Rep (Endo a) :: Type -> Type | |
| Generic (First a) | |
Defined in Data.Semigroup Associated Types type Rep (First a) :: Type -> Type | |
| Generic (Last a) | |
Defined in Data.Semigroup Associated Types type Rep (Last a) :: Type -> Type | |
| Generic (Max a) | |
Defined in Data.Semigroup Associated Types type Rep (Max a) :: Type -> Type | |
| Generic (Min a) | |
Defined in Data.Semigroup Associated Types type Rep (Min a) :: Type -> Type | |
| Generic (Option a) | |
Defined in Data.Semigroup Associated Types type Rep (Option a) :: Type -> Type | |
| Generic (WrappedMonoid m) | |
Defined in Data.Semigroup Associated Types type Rep (WrappedMonoid m) :: Type -> Type | |
| Generic (Complex a) | |
Defined in Data.Complex Associated Types type Rep (Complex a) :: Type -> Type | |
| Generic (Doc ann) | |
Defined in Data.Text.Prettyprint.Doc.Internal Associated Types type Rep (Doc ann) :: Type -> Type | |
| Generic (SimpleDocStream ann) | |
Defined in Data.Text.Prettyprint.Doc.Internal Associated Types type Rep (SimpleDocStream ann) :: Type -> Type | |
| Generic (ViewL a) | |
Defined in Data.Sequence.Internal Associated Types type Rep (ViewL a) :: Type -> Type | |
| Generic (ViewR a) | |
Defined in Data.Sequence.Internal Associated Types type Rep (ViewR a) :: Type -> Type | |
| Generic (Digit a) | |
Defined in Data.Sequence.Internal Associated Types type Rep (Digit a) :: Type -> Type | |
| Generic (Elem a) | |
Defined in Data.Sequence.Internal Associated Types type Rep (Elem a) :: Type -> Type | |
| Generic (FingerTree a) | |
Defined in Data.Sequence.Internal Associated Types type Rep (FingerTree a) :: Type -> Type | |
| Generic (Node a) | |
Defined in Data.Sequence.Internal Associated Types type Rep (Node a) :: Type -> Type | |
| Generic (Set a) Source # | |
| Generic (ErrorFancy e) | |
Defined in Text.Megaparsec.Error Associated Types type Rep (ErrorFancy e) :: Type -> Type | |
| Generic (ErrorItem t) | |
Defined in Text.Megaparsec.Error Associated Types type Rep (ErrorItem t) :: Type -> Type | |
| Generic (PosState s) | |
Defined in Text.Megaparsec.State Associated Types type Rep (PosState s) :: Type -> Type | |
| Generic (State s) | |
Defined in Text.Megaparsec.State Associated Types type Rep (State s) :: Type -> Type | |
| Generic (Tree a) | |
| Generic (HistoriedResponse body) | |
Defined in Network.HTTP.Client Associated Types type Rep (HistoriedResponse body) :: Type -> Type | |
| Generic (Doc a) | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Associated Types type Rep (Doc a) :: Type -> Type | |
| Generic (Either a b) | |
Defined in GHC.Generics Associated Types type Rep (Either a b) :: Type -> Type | |
| Generic (V1 p) | |
Defined in GHC.Generics Associated Types type Rep (V1 p) :: Type -> Type | |
| Generic (U1 p) | |
Defined in GHC.Generics Associated Types type Rep (U1 p) :: Type -> Type | |
| Generic (a, b) | |
Defined in GHC.Generics Associated Types type Rep (a, b) :: Type -> Type | |
| Generic (Expr s a) Source # | |
| Generic (WrappedMonad m a) | |
Defined in Control.Applicative Associated Types type Rep (WrappedMonad m a) :: Type -> Type | |
| Generic (Proxy t) | |
Defined in GHC.Generics Associated Types type Rep (Proxy t) :: Type -> Type | |
| Generic (Arg a b) | |
Defined in Data.Semigroup Associated Types type Rep (Arg a b) :: Type -> Type | |
| Generic (ParseError s e) | |
Defined in Text.Megaparsec.Error Associated Types type Rep (ParseError s e) :: Type -> Type | |
| Generic (ParseErrorBundle s e) | |
Defined in Text.Megaparsec.Error Associated Types type Rep (ParseErrorBundle s e) :: Type -> Type | |
| Generic (Chunks s a) Source # | |
| Generic (Binding s a) Source # | |
| Generic (Rec1 f p) | |
Defined in GHC.Generics Associated Types type Rep (Rec1 f p) :: Type -> Type | |
| Generic (URec (Ptr ()) p) | |
Defined in GHC.Generics Associated Types type Rep (URec (Ptr ()) p) :: Type -> Type | |
| Generic (URec Char p) | |
Defined in GHC.Generics Associated Types type Rep (URec Char p) :: Type -> Type | |
| Generic (URec Double p) | |
Defined in GHC.Generics Associated Types type Rep (URec Double p) :: Type -> Type | |
| Generic (URec Float p) | |
Defined in GHC.Generics Associated Types type Rep (URec Float p) :: Type -> Type | |
| Generic (URec Int p) | |
Defined in GHC.Generics Associated Types type Rep (URec Int p) :: Type -> Type | |
| Generic (URec Word p) | |
Defined in GHC.Generics Associated Types type Rep (URec Word p) :: Type -> Type | |
| Generic (a, b, c) | |
Defined in GHC.Generics Associated Types type Rep (a, b, c) :: Type -> Type | |
| Generic (WrappedArrow a b c) | |
Defined in Control.Applicative Associated Types type Rep (WrappedArrow a b c) :: Type -> Type | |
| Generic (Const a b) | |
Defined in Data.Functor.Const Associated Types type Rep (Const a b) :: Type -> Type | |
| Generic (Alt f a) | |
Defined in Data.Semigroup.Internal Associated Types type Rep (Alt f a) :: Type -> Type | |
| Generic (Ap f a) | |
Defined in Data.Monoid Associated Types type Rep (Ap f a) :: Type -> Type | |
| Generic (Tagged s b) | |
Defined in Data.Tagged Associated Types type Rep (Tagged s b) :: Type -> Type | |
| Generic (K1 i c p) | |
Defined in GHC.Generics Associated Types type Rep (K1 i c p) :: Type -> Type | |
| Generic ((f :+: g) p) | |
Defined in GHC.Generics Associated Types type Rep ((f :+: g) p) :: Type -> Type | |
| Generic ((f :*: g) p) | |
Defined in GHC.Generics Associated Types type Rep ((f :*: g) p) :: Type -> Type | |
| Generic (a, b, c, d) | |
Defined in GHC.Generics Associated Types type Rep (a, b, c, d) :: Type -> Type | |
| Generic (Product f g a) | |
Defined in Data.Functor.Product Associated Types type Rep (Product f g a) :: Type -> Type | |
| Generic (Sum f g a) | |
Defined in Data.Functor.Sum Associated Types type Rep (Sum f g a) :: Type -> Type | |
| Generic (M1 i c f p) | |
Defined in GHC.Generics Associated Types type Rep (M1 i c f p) :: Type -> Type | |
| Generic ((f :.: g) p) | |
Defined in GHC.Generics Associated Types type Rep ((f :.: g) p) :: Type -> Type | |
| Generic (a, b, c, d, e) | |
Defined in GHC.Generics Associated Types type Rep (a, b, c, d, e) :: Type -> Type | |
| Generic (Compose f g a) | |
Defined in Data.Functor.Compose Associated Types type Rep (Compose f g a) :: Type -> Type | |
| Generic (Clown f a b) | |
Defined in Data.Bifunctor.Clown Associated Types type Rep (Clown f a b) :: Type -> Type | |
| Generic (Joker g a b) | |
Defined in Data.Bifunctor.Joker Associated Types type Rep (Joker g a b) :: Type -> Type | |
| Generic (a, b, c, d, e, f) | |
Defined in GHC.Generics Associated Types type Rep (a, b, c, d, e, f) :: Type -> Type | |
| Generic (Product f g a b) | |
Defined in Data.Bifunctor.Product Associated Types type Rep (Product f g a b) :: Type -> Type | |
| Generic (Sum p q a b) | |
Defined in Data.Bifunctor.Sum Associated Types type Rep (Sum p q a b) :: Type -> Type | |
| Generic (a, b, c, d, e, f, g) | |
Defined in GHC.Generics Associated Types type Rep (a, b, c, d, e, f, g) :: Type -> Type | |
| Generic (Tannen f p a b) | |
Defined in Data.Bifunctor.Tannen Associated Types type Rep (Tannen f p a b) :: Type -> Type | |
| Generic (Biff p f g a b) | |
Defined in Data.Bifunctor.Biff Associated Types type Rep (Biff p f g a b) :: Type -> Type | |