Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- type Resource = ByteString
- data RealNum = RealNum Integer Integer
- type Rational = Ratio Integer
- data Number
- data Value
- data Entity
- data Statement = Statement Resource Resource Resource Entity
- data ObjectSection = ObjectSection Entity Resource
- data PredicateSection = PredicateSection Resource [ObjectSection]
- data StatementBlock = StatementBlock Resource [PredicateSection]
Documentation
type Resource = ByteString 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.
A Smaoin number can be represented as a real number or as a ratio.
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.