Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype Resource = Resource ByteString
- res :: String -> Resource
- data RealNum
- sig :: RealNum -> Integer
- expo :: RealNum -> Integer
- realnum :: Integer -> Integer -> RealNum
- 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]
- generateUid :: IO Resource
Documentation
A Smaoin resource identifier, also known as a Uid.
A resource in Smaoin is some idea or object in the broad sense, which can be described using statements, and be related to other resources.
Arbitrary precision real number.
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.
realnum :: Integer -> Integer -> RealNum Source
Create a RealNum
. 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 ratios).
A Smaoin number can be represented as a real number or as a ratio.
A Smaoin value, i.e. an entity with predefined meaning and traits. The type can be specified statically through a dedicated data constructor, or generically as a resource.
A Smaoin entity. It is the atomic concept in Smaoin: Everything is an entity. An entity can be described (resource) or predefined (value).
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.