Safe Haskell | None |
---|---|
Language | Haskell2010 |
Text.Toml.Types
- type Table = HashMap Text Node
- emptyTable :: Table
- type VTArray = Vector Table
- type VArray = Vector Node
- data Node
- data Explicitness
- isExplicit :: Explicitness -> Bool
- insert :: Explicitness -> ([Text], Node) -> Table -> Parsec Text (Set [Text]) Table
- class ToJSON a where
- class ToBsJSON a where
Documentation
emptyTable :: Table Source #
Contruct an empty Table
.
type VArray = Vector Node Source #
A "value" array that may contain zero or more Node
s, implemented using a Vector
.
Constructors
VTable !Table | |
VTArray !VTArray | |
VString !Text | |
VInteger !Int64 | |
VFloat !Double | |
VBoolean !Bool | |
VDatetime !UTCTime | |
VArray !VArray |
Instances
Eq Node Source # | |
Show Node Source # | |
ToJSON Node Source # |
|
ToBsJSON Node Source # |
As seen in this function, BurntSushi's JSON encoding explicitly specifies the types of the values. |
data Explicitness Source #
To mark whether or not a Table
has been explicitly defined.
See: https://github.com/toml-lang/toml/issues/376
Instances
isExplicit :: Explicitness -> Bool Source #
Convenience function to get a boolean value.
Instances
ToJSON Bool | |
ToJSON Char | |
ToJSON Double | |
ToJSON Float | |
ToJSON Int | |
ToJSON Int8 | |
ToJSON Int16 | |
ToJSON Int32 | |
ToJSON Int64 | |
ToJSON Integer | |
ToJSON Ordering | |
ToJSON Word | |
ToJSON Word8 | |
ToJSON Word16 | |
ToJSON Word32 | |
ToJSON Word64 | |
ToJSON () | |
ToJSON Natural | |
ToJSON Version | |
ToJSON IntSet | |
ToJSON LocalTime | |
ToJSON ZonedTime | |
ToJSON TimeOfDay | |
ToJSON UTCTime | |
ToJSON NominalDiffTime | |
ToJSON Day | |
ToJSON Value | |
ToJSON DotNetTime | |
ToJSON Text | |
ToJSON Scientific | |
ToJSON Number | |
ToJSON Text | |
ToJSON Node # |
|
ToJSON a => ToJSON [a] | |
ToJSON a => ToJSON (Maybe a) | |
(ToJSON a, Integral a) => ToJSON (Ratio a) | |
ToJSON a => ToJSON (Identity a) | |
ToJSON a => ToJSON (Min a) | |
ToJSON a => ToJSON (Max a) | |
ToJSON a => ToJSON (First a) | |
ToJSON a => ToJSON (Last a) | |
ToJSON a => ToJSON (WrappedMonoid a) | |
ToJSON a => ToJSON (Option a) | |
ToJSON a => ToJSON (NonEmpty a) | |
HasResolution a => ToJSON (Fixed a) | |
ToJSON a => ToJSON (Dual a) | |
ToJSON a => ToJSON (First a) | |
ToJSON a => ToJSON (Last a) | |
ToJSON a => ToJSON (IntMap a) | |
ToJSON v => ToJSON (Tree v) | |
ToJSON a => ToJSON (Seq a) | |
ToJSON a => ToJSON (Set a) | |
ToJSON a => ToJSON (Vector a) | |
(Vector Vector a, ToJSON a) => ToJSON (Vector a) | |
(Storable a, ToJSON a) => ToJSON (Vector a) | |
(Prim a, ToJSON a) => ToJSON (Vector a) | |
ToJSON a => ToJSON (HashSet a) | |
ToJSON a => ToJSON (DList a) | |
(ToJSON a, ToJSON b) => ToJSON (Either a b) | |
(ToJSON a, ToJSON b) => ToJSON (a, b) | |
ToJSON (Proxy k a) | |
(ToJSON v, ToJSONKey k) => ToJSON (Map k v) | |
(ToJSON v, ToJSONKey k) => ToJSON (HashMap k v) | |
(ToJSON a, ToJSON b, ToJSON c) => ToJSON (a, b, c) | |
ToJSON a => ToJSON (Const k a b) | |
ToJSON b => ToJSON (Tagged k a b) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON (a, b, c, d) | |
(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Sum * f g a) | |
(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Product * f g a) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON (a, b, c, d, e) | |
(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Compose * * f g a) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON (a, b, c, d, e, f) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) => ToJSON (a, b, c, d, e, f, g) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) => ToJSON (a, b, c, d, e, f, g, h) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) => ToJSON (a, b, c, d, e, f, g, h, i) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) => ToJSON (a, b, c, d, e, f, g, h, i, j) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) => ToJSON (a, b, c, d, e, f, g, h, i, j, k) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
class ToBsJSON a where Source #
Type class for conversion to BurntSushi-style JSON.
BurntSushi has made a language agnostic test suite available that
this library uses. This test suit expects that values are encoded
as JSON objects with a 'type' and a value
member.
Minimal complete definition
Instances
ToBsJSON Node Source # |
As seen in this function, BurntSushi's JSON encoding explicitly specifies the types of the values. |
ToBsJSON a => ToBsJSON (Vector a) Source # | |
ToBsJSON v => ToBsJSON (HashMap Text v) Source # | Provide a |