toml

Not on Stackage, so not searched.
This module reexports all functionality of the tomland package. It's recommended to import this module qualified, like this:
import Toml (TomlCodec, (.=))
import qualified Toml
Simple TomlCodec for a Haskell value, that can be decoded from TOML or encoded as TOML, could be written in the following way:
data User = User
{ userName :: Text
, userAge  :: Int
}

userCodec :: TomlCodec User
userCodec = User
<$> Toml.text "name" .= userName
<*> Toml.int  "age"  .= userAge
A value of such type will look in TOML like this:
name = Alice
age  = 27
For more detailed examples see README.md in the repository: For the details of the library implementation see blog post:
Type of TOML AST. This is intermediate representation of TOML parsed from text.
Represents TOML configuration value. For example, if we have the following TOML file:
server.port        = 8080
server.codes       = [ 5, 10, 42 ]
server.description = "This is production server."

[mail]
host = "smtp.gmail.com"
send-if-inactive = false

[[user]]
id = 42

[[user]]
name = "Foo Bar"
corresponding TOML looks like:
TOML
{ tomlPairs = fromList
[ ( "server" :| [ "port" ] , Integer 8080)
, ( "server" :| [ "codes" ] , Array [ Integer 5 , Integer 10 , Integer 42])
, ( "server" :| [ "description" ] , Text "This is production server.")
]
, tomlTables = fromList
[ ( "mail"
, Leaf ( "mail" :| [] )
( TOML
{ tomlPairs = fromList
[ ( "host" :| [] , Text "smtp.gmail.com")
, ( "send-if-inactive" :| [] , Bool False)
]
, tomlTables = fromList []
, tomlTableArrays = fromList []
}
)
)
]
, tomlTableArrays = fromList
[ ( "user" :| []
, TOML
{ tomlPairs = fromList [( "id" :| [] , Integer 42)]
, tomlTables = fromList []
, tomlTableArrays = fromList []
} :|
[ TOML
{ tomlPairs = fromList [( "name" :| [] , Text "Foo Bar")]
, tomlTables = fromList []
, tomlTableArrays = fromList []
}
]
)
]
}
This is the high-level interface to the toml-parser library. It enables parsing, printing, and conversion into and out of application-specific representations. This parser implements TOML 1.0.0 https://toml.io/en/v1.0.0 as carefully as possible. Use Toml.Schema to implement functions mapping between TOML values and your application types. Use Toml.Syntax and Toml.Semantics for low-level TOML syntax processing and semantic validation. Most applications will not need to use these modules directly unless the application is about TOML itself. The types and functions of this package are parameterized over an annotation type in order to allow applications to provide detailed feedback messages tracked back to specific source locations in an original TOML file. While the default annotation is a simple file position, some applications might upgrade this annotation to track multiple file names or synthetically generated sources. Other applications won't need source location and can replace annotations with a simple unit type.
Bidirectional TOML serialization Implementation of bidirectional TOML serialization. Simple codecs look like this:
data User = User
{ userName :: Text
, userAge  :: Int
}

userCodec :: TomlCodec User
userCodec = User
<$> Toml.text "name" .= userName
<*> Toml.int  "age"  .= userAge
The following blog post has more details about library design:
Parser for the full content of the .toml file.
Difference of two TOMLs. Returns elements of the first TOML that are not existing in the second one.
TOML 1.0.0 parser TOML parser using generated lexers and parsers with careful attention to the TOML 1.0.0 semantics for defining tables.
TOML format parser compliant with v1.0.0. See README.md for more details.
Alternative parser for TOML values produced by the toml-reader package. Package defines a set of parser combinators that allows analyzing arbitrary TOML structures. Includes formatted errors that keep track of where in the original TOML file a value came from.
Not on Stackage, so not searched. Command-line tool to check syntax of TOML files
Not on Stackage, so not searched. toml-parser test drivers
BiMap specialized to TOML error.
Type of errors for TOML BiMap.
Type of exception for converting from TOML to user custom data type.
Options to configure various parameters of generic encoding. Specifically: