smaoin-0.1.0.0: Utilities for the Smaoin semantic information model.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Smaoin

Synopsis

Documentation

data RealNum Source

Arbitrary precision real number. The first argument is the significand, and the second is an exponent. RealNum s e represents the number s * 10^e. This representation allows to precisely encode any real number expressed in Idan (excluding rational numbers expressed as fractions).

While RealNum is an instance of Num, the implementation isn't intended for general math use, and is probably much simpler than what the scientific Haskell packages provide. However, it is certainly suitable for basic manipulations.

Constructors

RealNum Integer Integer 

Instances

type Rational = Ratio Integer

Arbitrary-precision rational numbers, represented as a ratio of two Integer values. A rational number may be constructed using the % operator.

data Number Source

A Smaoin number can be represented as a real number or as a ratio.

data Statement Source

Statements can be grouped in lists and containers to form simple in-memory datastores, query results and so on.

Parameters are: Identifier, subject, predicate, object.

data PredicateSection Source

A predicate section is meant to be attached to a subject. It describes it through one or more statements. It expresses predicate-object-identifier triples. But instead of repeating predicates, it gives each predicate its own set of object-identifier pairs.

Parameters: Predicate; Objects and identifiers.

data StatementBlock Source

A statement block describes a single subject, by expressing one or more statements which share that subject. The predicate sections contain the predicates, objects and identifiers. With the subject attached, they form statements. Statement blocks can be grouped in lists and countainers to form simple in-memory datastores, query results and so on.

Parameters: 1) Subject; 2) Predicates, objects, identifiers.