From edd76d28786fef7fe30e84af4c6fbf17db09ddcd Mon Sep 17 00:00:00 2001 From: radrow Date: Thu, 27 Feb 2020 13:49:47 +0100 Subject: [PATCH] Format fix --- docs/sophia.md | 44 +++++++++++++++++++++---------------------- docs/sophia_stdlib.md | 38 ++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/docs/sophia.md b/docs/sophia.md index b05cbc0..a5a7b54 100644 --- a/docs/sophia.md +++ b/docs/sophia.md @@ -224,28 +224,28 @@ so even cyclic includes should be working without any special tinkering. ### Types Sophia has the following types: -| Type | Description | Example | | -| ---------- | ------------------------------- | -------: | | -| int | A 2-complement integer | ```-1``` | | -| address | Aeternity address, 32 bytes | ```Call.origin``` | | -| bool | A Boolean | ```true``` | | -| bits | A bit field | ```Bits.none``` | | -| bytes(n) | A byte array with `n` bytes | ```#fedcba9876543210``` | | -| string | An array of bytes | ```"Foo"``` | | -| list | A homogeneous immutable singly linked list. | ```[1, 2, 3]``` | | -| ('a, 'b) => 'c | A function. Parentheses can be skipped if there is only one argument | ```(x : int, y : int) => x + y``` | | -| tuple | An ordered heterogeneous array | ```(42, "Foo", true)``` | | -| record | An immutable key value store with fixed key names and typed values | ``` record balance = { owner: address, value: int } ``` | | -| map | An immutable key value store with dynamic mapping of keys of one type to values of one type | ```type accounts = map(string, address)``` | | -| option('a) | An optional value either None or Some('a) | ```Some(42)``` | | -| state | A user defined type holding the contract state | ```record state = { owner: address, magic_key: bytes(4) }``` | | -| event | An append only list of blockchain events (or log entries) | ```datatype event = EventX(indexed int, string)``` | | -| hash | A 32-byte hash - equivalent to `bytes(32)` | | | -| signature | A signature - equivalent to `bytes(64)` | | | -| Chain.ttl | Time-to-live (fixed height or relative to current block) | ```FixedTTL(1050)``` ```RelativeTTL(50)``` | | -| oracle('a, 'b) | And oracle answering questions of type 'a with answers of type 'b | ```Oracle.register(acct, qfee, ttl)``` | | -| oracle_query('a, 'b) | A specific oracle query | ```Oracle.query(o, q, qfee, qttl, rttl)``` | | -| contract | A user defined, typed, contract address | ```function call_remote(r : RemoteContract) = r.fun()``` | | +| Type | Description | Example | +|----------------------|---------------------------------------------------------------------------------------------|--------------------------------------------------------------| +| int | A 2-complement integer | ```-1``` | +| address | Aeternity address, 32 bytes | ```Call.origin``` | +| bool | A Boolean | ```true``` | +| bits | A bit field | ```Bits.none``` | +| bytes(n) | A byte array with `n` bytes | ```#fedcba9876543210``` | +| string | An array of bytes | ```"Foo"``` | +| list | A homogeneous immutable singly linked list. | ```[1, 2, 3]``` | +| ('a, 'b) => 'c | A function. Parentheses can be skipped if there is only one argument | ```(x : int, y : int) => x + y``` | +| tuple | An ordered heterogeneous array | ```(42, "Foo", true)``` | +| record | An immutable key value store with fixed key names and typed values | ``` record balance = { owner: address, value: int } ``` | +| map | An immutable key value store with dynamic mapping of keys of one type to values of one type | ```type accounts = map(string, address)``` | +| option('a) | An optional value either None or Some('a) | ```Some(42)``` | +| state | A user defined type holding the contract state | ```record state = { owner: address, magic_key: bytes(4) }``` | +| event | An append only list of blockchain events (or log entries) | ```datatype event = EventX(indexed int, string)``` | +| hash | A 32-byte hash - equivalent to `bytes(32)` | | +| signature | A signature - equivalent to `bytes(64)` | | +| Chain.ttl | Time-to-live (fixed height or relative to current block) | ```FixedTTL(1050)``` ```RelativeTTL(50)``` | +| oracle('a, 'b) | And oracle answering questions of type 'a with answers of type 'b | ```Oracle.register(acct, qfee, ttl)``` | +| oracle_query('a, 'b) | A specific oracle query | ```Oracle.query(o, q, qfee, qttl, rttl)``` | +| contract | A user defined, typed, contract address | ```function call_remote(r : RemoteContract) = r.fun()``` | ### Literals | Type | Constant/Literal example(s) | diff --git a/docs/sophia_stdlib.md b/docs/sophia_stdlib.md index d2d3107..a9b3679 100644 --- a/docs/sophia_stdlib.md +++ b/docs/sophia_stdlib.md @@ -13,25 +13,25 @@ aeternity/protocol repo in contracts/sophia.md file. Thanks! Sophia language offers standard library that consists of following namespaces: -- [Bits](##Bits) -- [String](##String) -- [Bytes](##Bytes) -- [Int](##Int) -- [Map](##Map) -- [Address](##Address) -- [Crypto](##Crypto) -- [Auth](##Auth) -- [Oracle](##Oracle) -- [AENS](##AENS) -- [Contract](##Contract) -- [Call](##Call) -- [Chain](##Chain) -- [List](##List) -- [Option](##Option) -- [Func](##Func) -- [Pair](##Pair) -- [Triple](##Triple) -- [BLS12_381](##BLS12_381) +- [Bits](#Bits) +- [String](#String) +- [Bytes](#Bytes) +- [Int](#Int) +- [Map](#Map) +- [Address](#Address) +- [Crypto](#Crypto) +- [Auth](#Auth) +- [Oracle](#Oracle) +- [AENS](#AENS) +- [Contract](#Contract) +- [Call](#Call) +- [Chain](#Chain) +- [List](#List) +- [Option](#Option) +- [Func](#Func) +- [Pair](#Pair) +- [Triple](#Triple) +- [BLS12_381](#BLS12_381) # Builtin namespaces