Skip to content

Commit 31a417e

Browse files
authored
Clarify you need to include some standard library functions/modules (#522)
1 parent 179b5e1 commit 31a417e

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

docs/sophia_features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -858,8 +858,8 @@ it.
858858

859859
There is a builtin type `string`, which can be seen as an array of bytes.
860860
Strings can be compared for equality (`==`, `!=`), used as keys in maps and
861-
records, and used in builtin functions `String.length`, `String.concat` and
862-
the hash functions described below.
861+
records, and used in standard library functions `String.length`,
862+
`String.concat`, etc, and the hash functions described below.
863863

864864
Please refer to the `String` [library documentation](sophia_stdlib.md#string).
865865

docs/sophia_stdlib.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,8 @@ These need to be explicitly included (with `.aes` suffix)
10771077

10781078
### AENSCompat
10791079

1080+
Note: to use `AENSCompat` functions you need to `include "AENSCompat.aes"`
1081+
10801082
#### pointee\_to\_V2
10811083
```
10821084
AENSCompat.pointee_to_V2(p : AENS.pointee) : AENSv2.pointee
@@ -1094,6 +1096,8 @@ Translate new pointee format to old, `DataPt` can't be translated, so `None` is
10941096

10951097
### BLS12\_381
10961098

1099+
Note: to use `BLS12\_381` functions you need to `include "BLS12\_381.aes"`
1100+
10971101
#### Types
10981102

10991103
##### fr
@@ -1325,6 +1329,8 @@ Perform the final exponentiation step of pairing for a `gt` value.
13251329

13261330
Functional combinators.
13271331

1332+
Note: to use `Func` functions you need to `include "Func.aes"`
1333+
13281334
#### id
13291335
```
13301336
Func.id(x : 'a) : 'a
@@ -1475,6 +1481,8 @@ language provides checkers to prevent unintended usage of them. Therefore the ty
14751481
**will** allow that and the results of such comparison will be unspecified.
14761482
You should use [lt](#lt), [geq](#geq), [eq](#eq) etc instead.
14771483

1484+
Note: to use `Frac` functions you need to `include "Frac.aes"`
1485+
14781486
#### Types
14791487

14801488
##### frac
@@ -1688,6 +1696,8 @@ this function to verify the input.
16881696

16891697
This module contains common operations on lists like constructing, querying, traversing etc.
16901698

1699+
Note: to use `List` functions you need to `include "List.aes"`
1700+
16911701
#### is_empty
16921702
```
16931703
List.is_empty(l : list('a)) : bool
@@ -2035,6 +2045,8 @@ Equivalent to [zip](#zip) with `[0..length(l)]`, but slightly faster.
20352045

20362046
Common operations on `option` types and lists of `option`s.
20372047

2048+
Note: to use `Option` functions you need to `include "Option.aes"`
2049+
20382050
#### is_none
20392051
```
20402052
Option.is_none(o : option('a)) : bool
@@ -2220,6 +2232,8 @@ Same as [choose](#choose), but chooses from a list insted of two arguments.
22202232

22212233
Common operations on 2-tuples.
22222234

2235+
Note: to use `Pair` functions you need to `include "Pair.aes"`
2236+
22232237
#### fst
22242238
```
22252239
Pair.fst(t : ('a * 'b)) : 'a
@@ -2270,6 +2284,8 @@ Swaps elements.
22702284

22712285
### <a name='set-stdlib'>Set</a>
22722286

2287+
Note: to use `Set` functions you need to `include "Set.aes"`
2288+
22732289
#### Types
22742290

22752291
```
@@ -2395,6 +2411,8 @@ Returns the union of all the sets in the given list
23952411

23962412
Operations on the `string` type. A `string` is a UTF-8 encoded byte array.
23972413

2414+
Note: to use `String` functions you need to `include "String.aes"`
2415+
23982416
#### length
23992417
`length(s : string) : int`
24002418

@@ -2518,6 +2536,8 @@ Computes the Blake2B hash of the string.
25182536

25192537
### Triple
25202538

2539+
Note: to use `Triple` functions you need to `include "Triple.aes"`
2540+
25212541
#### fst
25222542
```
25232543
Triple.fst(t : ('a * 'b * 'c)) : 'a

0 commit comments

Comments
 (0)