Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Please read the Dhall.Tutorial module, which contains a tutorial explaining how to use the language, the compiler, and this library
Synopsis
- data Encoder a = Encoder {}
- class ToDhall a where
- injectWith :: InputNormalizer -> Encoder a
- type Inject = ToDhall
- inject :: ToDhall a => Encoder a
- newtype RecordEncoder a = RecordEncoder (Map Text (Encoder a))
- recordEncoder :: RecordEncoder a -> Encoder a
- encodeField :: ToDhall a => Text -> RecordEncoder a
- encodeFieldWith :: Text -> Encoder a -> RecordEncoder a
- newtype UnionEncoder a = UnionEncoder (Product (Const (Map Text (Expr Src Void))) (Op (Text, Expr Src Void)) a)
- unionEncoder :: UnionEncoder a -> Encoder a
- encodeConstructor :: ToDhall a => Text -> UnionEncoder a
- encodeConstructorWith :: Text -> Encoder a -> UnionEncoder a
- (>|<) :: UnionEncoder a -> UnionEncoder b -> UnionEncoder (Either a b)
- class GenericToDhall f where
- genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder (f a))
- genericToDhall :: (Generic a, GenericToDhall (Rep a)) => Encoder a
- genericToDhallWith :: (Generic a, GenericToDhall (Rep a)) => InterpretOptions -> Encoder a
- genericToDhallWithInputNormalizer :: (Generic a, GenericToDhall (Rep a)) => InterpretOptions -> InputNormalizer -> Encoder a
- data InterpretOptions = InterpretOptions {}
- data SingletonConstructors
- defaultInterpretOptions :: InterpretOptions
- newtype InputNormalizer = InputNormalizer {}
- defaultInputNormalizer :: InputNormalizer
- data Result f
- (>$<) :: 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
General
An (Encoder a)
represents a way to marshal a value of type 'a'
from
Haskell into Dhall.
class ToDhall a where Source #
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
This class auto-generates a default implementation for types that
implement Generic
. This does not auto-generate an instance for recursive
types.
The default instance can be tweaked using genericToDhallWith
/genericToDhallWithInputNormalizer
and custom InterpretOptions
, or using
DerivingVia
and Codec
from Dhall.Deriving.
Nothing
injectWith :: InputNormalizer -> Encoder a Source #
default injectWith :: (Generic a, GenericToDhall (Rep a)) => InputNormalizer -> Encoder a Source #
Instances
inject :: ToDhall a => Encoder a Source #
Use the default input normalizer for injecting a value.
inject = injectWith defaultInputNormalizer
Building encoders
Records
newtype RecordEncoder a Source #
The RecordEncoder
divisible (contravariant) functor allows you to build
an Encoder
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 encoder has type Encoder
Project
, but we can't build that out of any
smaller encoders, as Encoder
s cannot be combined (they are only Contravariant
s).
However, we can use an RecordEncoder
to build an Encoder
for Project
:
>>>
:{
injectProject :: Encoder Project injectProject = recordEncoder ( adapt >$< encodeFieldWith "name" inject >*< encodeFieldWith "description" inject >*< encodeFieldWith "stars" inject ) where adapt (Project{..}) = (projectName, (projectDescription, projectStars)) :}
Or, since we are simply using the ToDhall
instance to inject each field, we could write
>>>
:{
injectProject :: Encoder Project injectProject = recordEncoder ( adapt >$< encodeField "name" >*< encodeField "description" >*< encodeField "stars" ) where adapt (Project{..}) = (projectName, (projectDescription, projectStars)) :}
RecordEncoder (Map Text (Encoder a)) |
Instances
Contravariant RecordEncoder Source # | |
Defined in Dhall.Marshal.Encode contramap :: (a' -> a) -> RecordEncoder a -> RecordEncoder a' # (>$) :: b -> RecordEncoder b -> RecordEncoder a # | |
Divisible RecordEncoder Source # | |
Defined in Dhall.Marshal.Encode divide :: (a -> (b, c)) -> RecordEncoder b -> RecordEncoder c -> RecordEncoder a # conquer :: RecordEncoder a # |
recordEncoder :: RecordEncoder a -> Encoder a Source #
Convert a RecordEncoder
into the equivalent Encoder
.
encodeField :: ToDhall a => Text -> RecordEncoder a Source #
Specify how to encode one field of a record using the default ToDhall
instance for that type.
encodeFieldWith :: Text -> Encoder a -> RecordEncoder a Source #
Specify how to encode one field of a record by supplying an explicit
Encoder
for that field.
Unions
newtype UnionEncoder a Source #
UnionEncoder
allows you to build an Encoder
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 : Text | Queued : Natural | Errored : Text >.Result "Finish successfully"
Our encoder has type Encoder
Status
, but we can't build that out of any
smaller encoders, as Encoder
s cannot be combined.
However, we can use an UnionEncoder
to build an Encoder
for Status
:
>>>
:{
injectStatus :: Encoder Status injectStatus = adapt >$< unionEncoder ( encodeConstructorWith "Queued" inject >|< encodeConstructorWith "Result" inject >|< encodeConstructorWith "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 ToDhall
instance to inject each branch, we could write
>>>
:{
injectStatus :: Encoder Status injectStatus = adapt >$< unionEncoder ( encodeConstructor "Queued" >|< encodeConstructor "Result" >|< encodeConstructor "Errored" ) where adapt (Queued n) = Left n adapt (Result t) = Right (Left t) adapt (Errored e) = Right (Right e) :}
Instances
Contravariant UnionEncoder Source # | |
Defined in Dhall.Marshal.Encode contramap :: (a' -> a) -> UnionEncoder a -> UnionEncoder a' # (>$) :: b -> UnionEncoder b -> UnionEncoder a # |
unionEncoder :: UnionEncoder a -> Encoder a Source #
Convert a UnionEncoder
into the equivalent Encoder
.
encodeConstructor :: ToDhall a => Text -> UnionEncoder a Source #
Specify how to encode an alternative by using the default ToDhall
instance
for that type.
encodeConstructorWith :: Text -> Encoder a -> UnionEncoder a Source #
Specify how to encode an alternative by providing an explicit Encoder
for that alternative.
(>|<) :: UnionEncoder a -> UnionEncoder b -> UnionEncoder (Either a b) infixr 5 Source #
Combines two UnionEncoder
values. See UnionEncoder
for usage
notes.
Ideally, this matches chosen
;
however, this allows UnionEncoder
to not need a Divisible
instance
itself (since no instance is possible).
Generic encoding
class GenericToDhall f where Source #
This is the underlying class that powers the FromDhall
class's support
for automatically deriving a generic implementation.
genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder (f a)) Source #
Instances
genericToDhall :: (Generic a, GenericToDhall (Rep a)) => Encoder a Source #
Use the default options for injecting a value, whose structure is determined generically.
This can be used when you want to use ToDhall
on types that you don't
want to define orphan instances for.
genericToDhallWith :: (Generic a, GenericToDhall (Rep a)) => InterpretOptions -> Encoder a Source #
Use custom options for injecting a value, whose structure is determined generically.
This can be used when you want to use ToDhall
on types that you don't
want to define orphan instances for.
genericToDhallWithInputNormalizer :: (Generic a, GenericToDhall (Rep a)) => InterpretOptions -> InputNormalizer -> Encoder a Source #
genericToDhallWithInputNormalizer
is like genericToDhallWith
, but
instead of using the defaultInputNormalizer
it expects an custom
InputNormalizer
.
data InterpretOptions Source #
Use these options to tweak how Dhall derives a generic implementation of
FromDhall
.
InterpretOptions | |
|
data SingletonConstructors Source #
This type specifies how to model a Haskell constructor with 1 field in Dhall
For example, consider the following Haskell datatype definition:
data Example = Foo { x :: Double } | Bar Double
Depending on which option you pick, the corresponding Dhall type could be:
< Foo : Double | Bar : Double > -- Bare
< Foo : { x : Double } | Bar : { _1 : Double } > -- Wrapped
< Foo : { x : Double } | Bar : Double > -- Smart
Bare | Never wrap the field in a record |
Wrapped | Always wrap the field in a record |
Smart | Only fields in a record if they are named |
Instances
ToSingletonConstructors a => ModifyOptions (SetSingletonConstructors a :: Type) Source # | |
Defined in Dhall.Deriving |
defaultInterpretOptions :: InterpretOptions Source #
Default interpret options for generics-based instances, which you can tweak or override, like this:
genericAutoWith (defaultInterpretOptions { fieldModifier = Data.Text.Lazy.dropWhile (== '_') })
Miscellaneous
newtype InputNormalizer Source #
This is only used by the FromDhall
instance for
functions in order to normalize the function input before marshaling the
input into a Dhall expression.
defaultInputNormalizer :: InputNormalizer Source #
Default normalization-related settings (no custom normalization)
This type is exactly the same as Fix
except with a different
FromDhall
instance. This intermediate type
simplifies the implementation of the inner loop for the
FromDhall
instance for Fix
.
Instances
(>$<) :: Contravariant f => (a -> b) -> f b -> f a infixl 4 #
This is an infix alias for contramap
.
Re-exports
Natural number
Invariant: numbers <= 0xffffffffffffffff use the NS
constructor
Instances
FromJSON Natural | |
FromJSONKey Natural | |
ToJSON Natural | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey Natural | |
Defined in Data.Aeson.Types.ToJSON | |
Data Natural | Since: base-4.8.0.0 |
Defined in Data.Data 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 # toConstr :: Natural -> Constr # 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 :: forall r r'. (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 # | |
Bits Natural | Since: base-4.8.0 |
Defined in GHC.Bits (.&.) :: Natural -> Natural -> Natural # (.|.) :: Natural -> Natural -> Natural # xor :: Natural -> Natural -> Natural # complement :: Natural -> Natural # shift :: Natural -> Int -> Natural # rotate :: Natural -> Int -> Natural # setBit :: Natural -> Int -> Natural # clearBit :: Natural -> Int -> Natural # complementBit :: Natural -> Int -> Natural # testBit :: Natural -> Int -> Bool # bitSizeMaybe :: Natural -> Maybe Int # shiftL :: Natural -> Int -> Natural # unsafeShiftL :: Natural -> Int -> Natural # shiftR :: Natural -> Int -> Natural # unsafeShiftR :: Natural -> Int -> Natural # rotateL :: Natural -> Int -> Natural # | |
Enum Natural | Since: base-4.8.0.0 |
Ix Natural | Since: base-4.8.0.0 |
Num Natural | Note that Since: base-4.8.0.0 |
Read Natural | Since: base-4.8.0.0 |
Integral Natural | Since: base-4.8.0.0 |
Defined in GHC.Real | |
Real Natural | Since: base-4.8.0.0 |
Defined in GHC.Real toRational :: Natural -> Rational # | |
Show Natural | Since: base-4.8.0.0 |
PrintfArg Natural | Since: base-4.8.0.0 |
Defined in Text.Printf formatArg :: Natural -> FieldFormatter # parseFormat :: Natural -> ModifierParser # | |
Subtractive Natural | |
Defined in Basement.Numerical.Subtractive type Difference Natural # | |
NFData Natural | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
FromDhall Natural Source # | |
Defined in Dhall.Marshal.Decode | |
ToDhall Natural Source # | |
Defined in Dhall.Marshal.Encode | |
Eq Natural | |
Ord Natural | |
Hashable Natural | |
Defined in Data.Hashable.Class | |
Pretty Natural | |
Defined in Prettyprinter.Internal | |
UniformRange Natural | |
Defined in System.Random.Internal | |
Serialise Natural | Since: serialise-0.2.0.0 |
KnownNat n => HasResolution (n :: Nat) | For example, |
Defined in Data.Fixed resolution :: p n -> Integer # | |
Lift Natural | |
type Difference Natural | |
Defined in Basement.Numerical.Subtractive | |
type Compare (a :: Natural) (b :: Natural) | |
Defined in Data.Type.Ord |
General-purpose finite sequences.
Instances
FromJSON1 Seq | |
ToJSON1 Seq | |
Defined in Data.Aeson.Types.ToJSON | |
MonadFix Seq | Since: containers-0.5.11 |
Defined in Data.Sequence.Internal | |
MonadZip Seq |
|
Foldable Seq | |
Defined in Data.Sequence.Internal fold :: Monoid m => Seq m -> m # foldMap :: Monoid m => (a -> m) -> Seq a -> 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 # | |
Eq1 Seq | Since: containers-0.5.9 |
Ord1 Seq | Since: containers-0.5.9 |
Defined in Data.Sequence.Internal | |
Read1 Seq | Since: containers-0.5.9 |
Defined in Data.Sequence.Internal | |
Show1 Seq | Since: containers-0.5.9 |
Traversable Seq | |
Alternative Seq | Since: containers-0.5.4 |
Applicative Seq | Since: containers-0.5.4 |
Functor Seq | |
Monad Seq | |
MonadPlus Seq | |
UnzipWith Seq | |
Defined in Data.Sequence.Internal unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b) | |
Hashable1 Seq | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
FoldableWithIndex Int Seq | |
FunctorWithIndex Int Seq | The position in the |
TraversableWithIndex Int Seq | |
FromJSON a => FromJSON (Seq a) | |
ToJSON a => ToJSON (Seq a) | |
Defined in Data.Aeson.Types.ToJSON | |
Data a => Data (Seq a) | |
Defined in Data.Sequence.Internal 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 :: forall r r'. (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) # | |
a ~ Char => IsString (Seq a) | Since: containers-0.5.7 |
Defined in Data.Sequence.Internal fromString :: String -> Seq a # | |
Monoid (Seq a) | |
Semigroup (Seq a) | Since: containers-0.5.7 |
IsList (Seq a) | |
Read a => Read (Seq a) | |
Show a => Show (Seq a) | |
NFData a => NFData (Seq a) | |
Defined in Data.Sequence.Internal | |
FromDhall a => FromDhall (Seq a) Source # | |
Defined in Dhall.Marshal.Decode | |
ToDhall a => ToDhall (Seq a) Source # | |
Defined in Dhall.Marshal.Encode injectWith :: InputNormalizer -> Encoder (Seq a) Source # | |
Eq a => Eq (Seq a) | |
Ord a => Ord (Seq a) | |
Hashable v => Hashable (Seq v) | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
Ord a => Stream (Seq a) | Since: megaparsec-9.0.0 |
Defined in Text.Megaparsec.Stream tokenToChunk :: Proxy (Seq a) -> Token (Seq a) -> Tokens (Seq a) # tokensToChunk :: Proxy (Seq a) -> [Token (Seq a)] -> Tokens (Seq a) # chunkToTokens :: Proxy (Seq a) -> Tokens (Seq a) -> [Token (Seq a)] # chunkLength :: Proxy (Seq a) -> Tokens (Seq a) -> Int # chunkEmpty :: Proxy (Seq a) -> Tokens (Seq a) -> Bool # take1_ :: Seq a -> Maybe (Token (Seq a), Seq a) # takeN_ :: Int -> Seq a -> Maybe (Tokens (Seq a), Seq a) # takeWhile_ :: (Token (Seq a) -> Bool) -> Seq a -> (Tokens (Seq a), Seq a) # | |
Serialise a => Serialise (Seq a) | Since: serialise-0.2.0.0 |
type Item (Seq a) | |
Defined in Data.Sequence.Internal | |
type Token (Seq a) | |
Defined in Text.Megaparsec.Stream | |
type Tokens (Seq a) | |
Defined in Text.Megaparsec.Stream |
A space efficient, packed, unboxed Unicode text type.
Instances
Boxed vectors, supporting efficient slicing.
Instances
FromJSON1 Vector | |
ToJSON1 Vector | |
Defined in Data.Aeson.Types.ToJSON 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 # | |
MonadFail Vector | Since: vector-0.12.1.0 |
Defined in Data.Vector | |
MonadFix Vector | This instance has the same semantics as the one for lists. Since: vector-0.12.2.0 |
Defined in Data.Vector | |
MonadZip Vector | |
Foldable Vector | |
Defined in Data.Vector fold :: Monoid m => Vector m -> m # foldMap :: Monoid m => (a -> m) -> Vector a -> 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 # minimum :: Ord a => Vector a -> a # | |
Eq1 Vector | |
Ord1 Vector | |
Defined in Data.Vector | |
Read1 Vector | |
Defined in Data.Vector | |
Show1 Vector | |
Traversable Vector | |
Alternative Vector | |
Applicative Vector | |
Functor Vector | |
Monad Vector | |
MonadPlus Vector | |
NFData1 Vector | Since: vector-0.12.1.0 |
Defined in Data.Vector | |
Vector Vector a | |
Defined in Data.Vector basicUnsafeFreeze :: Mutable Vector s a -> ST s (Vector a) # basicUnsafeThaw :: Vector a -> ST s (Mutable Vector s a) # basicLength :: Vector a -> Int # basicUnsafeSlice :: Int -> Int -> Vector a -> Vector a # basicUnsafeIndexM :: Vector a -> Int -> Box a # basicUnsafeCopy :: Mutable Vector s a -> Vector a -> ST s () # | |
FromJSON a => FromJSON (Vector a) | |
ToJSON a => ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON | |
Data a => Data (Vector a) | |
Defined in Data.Vector 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 :: forall r r'. (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) # | |
Monoid (Vector a) | |
Semigroup (Vector a) | |
IsList (Vector a) | |
Read a => Read (Vector a) | |
Show a => Show (Vector a) | |
NFData a => NFData (Vector a) | |
Defined in Data.Vector | |
FromDhall a => FromDhall (Vector a) Source # | |
Defined in Dhall.Marshal.Decode | |
ToDhall a => ToDhall (Vector a) Source # | |
Defined in Dhall.Marshal.Encode injectWith :: InputNormalizer -> Encoder (Vector a) Source # | |
Eq a => Eq (Vector a) | |
Ord a => Ord (Vector a) | |
Defined in Data.Vector | |
Serialise a => Serialise (Vector a) | Since: serialise-0.2.0.0 |
type Mutable Vector | |
Defined in Data.Vector | |
type Item (Vector a) | |
Defined in Data.Vector |
Representable types of kind *
.
This class is derivable in GHC with the DeriveGeneric
flag on.
A Generic
instance must satisfy the following laws:
from
.to
≡id
to
.from
≡id