language-kort-0.1.0.0: Parser and serializer for the Kort information language.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Kort.Types

Synopsis

Documentation

data Resource Source

A resource, either an actual Uid or a placeholder.

Constructors

Uid String

A resource Uid.

LGenerator String

A generator with a label. When generating Uids to fill the placeholders, generators with the same label get assigned the same Uid.

UGenerator

A unique generator. When generating Uids, it will get assigned its own unique Uid.

Instances

data Element Source

A statement element, i.e. a relation tuple member. Either a resource or a value with a literal and a type resource.

Instances

type Comment = String Source

Kort comment line.

data Statement Source

A tuple of arbitrary arity, which is a member of a given relation. Parameters:

  1. Identifier
  2. Relation
  3. Elements: subject, object, etc.

type Line = Either Comment Statement Source

A Kort line. Either a comment or an arbitrary-arity statement.

type Document = [Line] Source

A Kort document, represented as a list of lines. Note that in Kort the order of lines is semantically insignificant.

type ParseError = LexError Line Source

Returned when the parser fails.

type ParseResult = LexResult Line Source

Returned from the parser. Provides either the parsed line, or error information.

type UidMap = ([(String, String)], [String]) Source

A structure storing generated Uids for insertion to placeholders.