Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): address visibility issues in docs #3643

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/language_concepts/01_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down Expand Up @@ -197,7 +197,7 @@
The field can be defined implicitly, by using the name of the elliptic curve usually associated to it - for instance bn254, bls12_381 - or explicitly by using the field (prime) order, in decimal or hexadecimal form.
As a result, it is possible to define multiple versions of a function with each version specialized for a different field attribute. This can be useful when a function requires different parameters depending on the underlying elliptic curve.

Example: we define the function `foo()` three times below. Once for the default Noir bn254 curve, once for the field $\mathbb F_{23}$, which will normally never be used by Noir, and once again for the bls12_381 curve.

Check warning on line 200 in docs/docs/language_concepts/01_functions.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mathbb)

```rust
#[field(bn254)]
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/language_concepts/07_mutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down Expand Up @@ -69,11 +69,11 @@

assert(res == y[0]);

let res2 = x * mysubmodule::N;

Check warning on line 72 in docs/docs/language_concepts/07_mutability.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mysubmodule)
assert(res != res2);
}

mod mysubmodule {

Check warning on line 76 in docs/docs/language_concepts/07_mutability.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mysubmodule)
use dep::std;

global N: Field = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ All parameters in a function must have a type and all types are known at compile
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down Expand Up @@ -69,11 +69,11 @@

assert(res == y[0]);

let res2 = x * mysubmodule::N;

Check warning on line 72 in docs/versioned_docs/version-v0.10.5/language_concepts/07_mutability.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mysubmodule)
assert(res != res2);
}

mod mysubmodule {

Check warning on line 76 in docs/versioned_docs/version-v0.10.5/language_concepts/07_mutability.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mysubmodule)
use dep::std;

global N: Field = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down Expand Up @@ -197,7 +197,7 @@
The field can be defined implicitly, by using the name of the elliptic curve usually associated to it - for instance bn254, bls12_381 - or explicitly by using the field (prime) order, in decimal or hexadecimal form.
As a result, it is possible to define multiple versions of a function with each version specialized for a different field attribute. This can be useful when a function requires different parameters depending on the underlying elliptic curve.

Example: we define the function `foo()` three times below. Once for the default Noir bn254 curve, once for the field $\mathbb F_{23}$, which will normally never be used by Noir, and once again for the bls12_381 curve.

Check warning on line 200 in docs/versioned_docs/version-v0.17.0/language_concepts/01_functions.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mathbb)

```rust
#[field(bn254)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down Expand Up @@ -69,11 +69,11 @@

assert(res == y[0]);

let res2 = x * mysubmodule::N;

Check warning on line 72 in docs/versioned_docs/version-v0.17.0/language_concepts/07_mutability.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mysubmodule)
assert(res != res2);
}

mod mysubmodule {

Check warning on line 76 in docs/versioned_docs/version-v0.17.0/language_concepts/07_mutability.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mysubmodule)
use dep::std;

global N: Field = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down Expand Up @@ -197,7 +197,7 @@
The field can be defined implicitly, by using the name of the elliptic curve usually associated to it - for instance bn254, bls12_381 - or explicitly by using the field (prime) order, in decimal or hexadecimal form.
As a result, it is possible to define multiple versions of a function with each version specialized for a different field attribute. This can be useful when a function requires different parameters depending on the underlying elliptic curve.

Example: we define the function `foo()` three times below. Once for the default Noir bn254 curve, once for the field $\mathbb F_{23}$, which will normally never be used by Noir, and once again for the bls12_381 curve.

Check warning on line 200 in docs/versioned_docs/version-v0.19.0/language_concepts/01_functions.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mathbb)

```rust
#[field(bn254)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down Expand Up @@ -69,7 +69,7 @@

assert(res == y[0]);

let res2 = x * mysubmodule::N;

Check warning on line 72 in docs/versioned_docs/version-v0.19.0/language_concepts/07_mutability.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mysubmodule)
assert(res != res2);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ All parameters in a function must have a type and all types are known at compile
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Note that mutability in noir is local and everything is passed by value, so if a
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ All parameters in a function must have a type and all types are known at compile
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Note that mutability in noir is local and everything is passed by value, so if a
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ All parameters in a function must have a type and all types are known at compile
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Note that mutability in noir is local and everything is passed by value, so if a
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ All parameters in a function must have a type and all types are known at compile
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Note that mutability in noir is local and everything is passed by value, so if a
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ All parameters in a function must have a type and all types are known at compile
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Note that mutability in noir is local and everything is passed by value, so if a
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ All parameters in a function must have a type and all types are known at compile
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Note that mutability in noir is local and everything is passed by value, so if a
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ All parameters in a function must have a type and all types are known at compile
is pre-pended with a colon and the parameter type. Multiple parameters are separated using a comma.

```rust
fn foo(x : Field, y : pub Field){}
fn foo(x : Field, y : Field){}
```

The return type of a function can be stated by using the `->` arrow notation. The function below
states that the foo function must return a `Field`. If the function returns no value, then the arrow
is omitted.

```rust
fn foo(x : Field, y : pub Field) -> Field {
fn foo(x : Field, y : Field) -> Field {
x + y
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Note that mutability in noir is local and everything is passed by value, so if a
mutates its parameters then the parent function will keep the old value of the parameters.

```rust
fn main() -> Field {
fn main() -> pub Field {
let x = 3;
helper(x);
x // x is still 3
Expand Down
Loading