fix some typos
This commit is contained in:
parent
d0d482b3cb
commit
1444c9328d
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
2. **Documentation**
|
2. **Documentation**
|
||||||
|
|
||||||
Any updates, typo fixes, or expansion of the documention is more than welcome. At the moment,
|
Any updates, typo fixes, or expansion of the documentation is more than welcome. At the moment,
|
||||||
we are using [nextra](https://nextra.site) to run https://github.com/aiken-lang/site.
|
we are using [nextra](https://nextra.site) to run https://github.com/aiken-lang/site.
|
||||||
That can be considered user level documentation but that is not strict. There is also doc comments in the Rust code, which can be considered strictly developer level documentation.
|
That can be considered user level documentation but that is not strict. There is also doc comments in the Rust code, which can be considered strictly developer level documentation.
|
||||||
|
|
||||||
|
@ -42,10 +42,10 @@
|
||||||
|
|
||||||
**Changelog**
|
**Changelog**
|
||||||
|
|
||||||
Please add an entry into [CHANGLOG.md](./CHANGELOG.md) when submitting changes. New entries should go into the `[next] YYYY-MM-DD` section. This let's us keep track of unreleased changes
|
Please add an entry into [CHANGELOG.md](./CHANGELOG.md) when submitting changes. New entries should go into the `[next] YYYY-MM-DD` section. This let's us keep track of unreleased changes
|
||||||
for use in release notes.
|
for use in release notes.
|
||||||
|
|
||||||
Once a release is ready `[next] YYYY-MM-DD` gets replaced with a verion number and a the release date `[0.0.0] 2009-01-03`. Usually the maintainers will handle the section renaming along with creating a new _empty_ `[next] YYYY-MM-DD` section at the top of the changelog.
|
Once a release is ready `[next] YYYY-MM-DD` gets replaced with a version number and a the release date `[0.0.0] 2009-01-03`. Usually the maintainers will handle the section renaming along with creating a new _empty_ `[next] YYYY-MM-DD` section at the top of the changelog.
|
||||||
|
|
||||||
Each release section will be further broken down into three sections named `Added`, `Changed`, and `Removed`. Please put the associated crate's name in **bold** followed by a `:` as a prefix to the new entry.
|
Each release section will be further broken down into three sections named `Added`, `Changed`, and `Removed`. Please put the associated crate's name in **bold** followed by a `:` as a prefix to the new entry.
|
||||||
|
|
||||||
|
|
|
@ -603,8 +603,8 @@ impl<'comments> Formatter<'comments> {
|
||||||
let count = expressions.len();
|
let count = expressions.len();
|
||||||
let mut documents = Vec::with_capacity(count * 2);
|
let mut documents = Vec::with_capacity(count * 2);
|
||||||
for (i, expression) in expressions.iter().enumerate() {
|
for (i, expression) in expressions.iter().enumerate() {
|
||||||
let preceeding_newline = self.pop_empty_lines(expression.start_byte_index());
|
let preceding_newline = self.pop_empty_lines(expression.start_byte_index());
|
||||||
if i != 0 && preceeding_newline {
|
if i != 0 && preceding_newline {
|
||||||
documents.push(lines(2));
|
documents.push(lines(2));
|
||||||
} else if i != 0 {
|
} else if i != 0 {
|
||||||
documents.push(lines(1));
|
documents.push(lines(1));
|
||||||
|
|
|
@ -61,9 +61,9 @@ mod test {
|
||||||
fn common_ancestor_equal_vecs() {
|
fn common_ancestor_equal_vecs() {
|
||||||
let ancestor = Scope(vec![1, 2, 3, 4, 5, 6]);
|
let ancestor = Scope(vec![1, 2, 3, 4, 5, 6]);
|
||||||
|
|
||||||
let decendant = Scope(vec![1, 2, 3, 4, 5, 6]);
|
let descendant = Scope(vec![1, 2, 3, 4, 5, 6]);
|
||||||
|
|
||||||
let result = ancestor.common_ancestor(&decendant);
|
let result = ancestor.common_ancestor(&descendant);
|
||||||
|
|
||||||
assert_eq!(result, Scope(vec![1, 2, 3, 4, 5, 6]))
|
assert_eq!(result, Scope(vec![1, 2, 3, 4, 5, 6]))
|
||||||
}
|
}
|
||||||
|
@ -72,9 +72,9 @@ mod test {
|
||||||
fn common_ancestor_equal_ancestor() {
|
fn common_ancestor_equal_ancestor() {
|
||||||
let ancestor = Scope(vec![1, 2, 3, 4]);
|
let ancestor = Scope(vec![1, 2, 3, 4]);
|
||||||
|
|
||||||
let decendant = Scope(vec![1, 2, 3, 4, 5, 6]);
|
let descendant = Scope(vec![1, 2, 3, 4, 5, 6]);
|
||||||
|
|
||||||
let result = ancestor.common_ancestor(&decendant);
|
let result = ancestor.common_ancestor(&descendant);
|
||||||
|
|
||||||
assert_eq!(result, Scope(vec![1, 2, 3, 4]));
|
assert_eq!(result, Scope(vec![1, 2, 3, 4]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ pub enum Pattern {
|
||||||
#[error("I found an unexpected type name.")]
|
#[error("I found an unexpected type name.")]
|
||||||
#[diagnostic(help("Try removing it!"))]
|
#[diagnostic(help("Try removing it!"))]
|
||||||
TypeIdent,
|
TypeIdent,
|
||||||
#[error("I found an unexpected indentifier.")]
|
#[error("I found an unexpected identifier.")]
|
||||||
#[diagnostic(help("Try removing it!"))]
|
#[diagnostic(help("Try removing it!"))]
|
||||||
TermIdent,
|
TermIdent,
|
||||||
#[error("I found an unexpected end of input.")]
|
#[error("I found an unexpected end of input.")]
|
||||||
|
|
|
@ -427,12 +427,12 @@ impl<'a> Environment<'a> {
|
||||||
match self
|
match self
|
||||||
.entity_usages
|
.entity_usages
|
||||||
.last_mut()
|
.last_mut()
|
||||||
.expect("Attempted to access non-existant entity usages scope")
|
.expect("Attempted to access non-existent entity usages scope")
|
||||||
.insert(name.to_string(), (kind, location, false))
|
.insert(name.to_string(), (kind, location, false))
|
||||||
{
|
{
|
||||||
// Private types can be shadowed by a constructor with the same name
|
// Private types can be shadowed by a constructor with the same name
|
||||||
//
|
//
|
||||||
// TODO: Improve this so that we can tell if an imported overriden
|
// TODO: Improve this so that we can tell if an imported overridden
|
||||||
// type is actually used or not by tracking whether usages apply to
|
// type is actually used or not by tracking whether usages apply to
|
||||||
// the value or type scope
|
// the value or type scope
|
||||||
Some((ImportedType | ImportedTypeAndConstructor | PrivateType, _, _)) => (),
|
Some((ImportedType | ImportedTypeAndConstructor | PrivateType, _, _)) => (),
|
||||||
|
|
|
@ -1560,7 +1560,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
|
||||||
Some(tail) => {
|
Some(tail) => {
|
||||||
let tail = self.infer(*tail)?;
|
let tail = self.infer(*tail)?;
|
||||||
|
|
||||||
// Ensure the tail has the same type as the preceeding elements
|
// Ensure the tail has the same type as the preceding elements
|
||||||
self.unify(tipo.clone(), tail.tipo(), location, false)?;
|
self.unify(tipo.clone(), tail.tipo(), location, false)?;
|
||||||
|
|
||||||
Some(Box::new(tail))
|
Some(Box::new(tail))
|
||||||
|
|
|
@ -20,7 +20,7 @@ use super::{
|
||||||
/// It keeps track of any type variables created. This is useful for:
|
/// It keeps track of any type variables created. This is useful for:
|
||||||
///
|
///
|
||||||
/// - Determining if a generic type variable should be made into an
|
/// - Determining if a generic type variable should be made into an
|
||||||
/// unbound type varable during type instantiation.
|
/// unbound type variable during type instantiation.
|
||||||
/// - Ensuring that the same type is constructed if the programmer
|
/// - Ensuring that the same type is constructed if the programmer
|
||||||
/// uses the same name for a type variable multiple times.
|
/// uses the same name for a type variable multiple times.
|
||||||
///
|
///
|
||||||
|
@ -146,7 +146,7 @@ impl Hydrator {
|
||||||
.get_type_constructor(module, name, *location)?
|
.get_type_constructor(module, name, *location)?
|
||||||
.clone();
|
.clone();
|
||||||
|
|
||||||
// Register the type constructor as being used if it is unqualifed.
|
// Register the type constructor as being used if it is unqualified.
|
||||||
// We do not track use of qualified type constructors as they may be
|
// We do not track use of qualified type constructors as they may be
|
||||||
// used in another module.
|
// used in another module.
|
||||||
if module.is_none() {
|
if module.is_none() {
|
||||||
|
|
|
@ -37,7 +37,7 @@ pub enum Error {
|
||||||
)]
|
)]
|
||||||
#[diagnostic(code("aiken::blueprint::address::parameterized"))]
|
#[diagnostic(code("aiken::blueprint::address::parameterized"))]
|
||||||
#[diagnostic(help(
|
#[diagnostic(help(
|
||||||
"I can only compute addresses of validators that are fully applied. For example, a {keyword_spend} validator must have exactly 3 arguments: a datum, a redeemer and a context. If it has more, they need to be provided beforehand and applied directly in the validator. Applying parameters change the validator's compiled code, and thus the address.\n\nThis is why I need you to apply parmeters first.",
|
"I can only compute addresses of validators that are fully applied. For example, a {keyword_spend} validator must have exactly 3 arguments: a datum, a redeemer and a context. If it has more, they need to be provided beforehand and applied directly in the validator. Applying parameters change the validator's compiled code, and thus the address.\n\nThis is why I need you to apply parameters first.",
|
||||||
keyword_spend = "spend".if_supports_color(Stdout, |s| s.purple())))]
|
keyword_spend = "spend".if_supports_color(Stdout, |s| s.purple())))]
|
||||||
ParameterizedValidator { n: usize },
|
ParameterizedValidator { n: usize },
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,7 +291,7 @@ impl Encoder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// Write out byte regardless of current buffer alignment.
|
/// Write out byte regardless of current buffer alignment.
|
||||||
/// Write most signifcant bits in remaining unused bits for the current byte,
|
/// Write most significant bits in remaining unused bits for the current byte,
|
||||||
/// then write out the remaining bits at the beginning of the next byte.
|
/// then write out the remaining bits at the beginning of the next byte.
|
||||||
fn byte_unaligned(&mut self, x: u8) {
|
fn byte_unaligned(&mut self, x: u8) {
|
||||||
let x_shift = self.current_byte | (x >> self.used_bits);
|
let x_shift = self.current_byte | (x >> self.used_bits);
|
||||||
|
|
|
@ -362,7 +362,7 @@ impl Machine {
|
||||||
let mut unspent_step_budget =
|
let mut unspent_step_budget =
|
||||||
self.costs.machine_costs.get(StepKind::try_from(i as u8)?);
|
self.costs.machine_costs.get(StepKind::try_from(i as u8)?);
|
||||||
|
|
||||||
unspent_step_budget.occurences(self.unbudgeted_steps[i] as i64);
|
unspent_step_budget.occurrences(self.unbudgeted_steps[i] as i64);
|
||||||
|
|
||||||
self.spend_budget(unspent_step_budget)?;
|
self.spend_budget(unspent_step_budget)?;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ pub struct ExBudget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ExBudget {
|
impl ExBudget {
|
||||||
pub fn occurences(&mut self, n: i64) {
|
pub fn occurrences(&mut self, n: i64) {
|
||||||
self.mem *= n;
|
self.mem *= n;
|
||||||
self.cpu *= n;
|
self.cpu *= n;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ pub fn eval_phase_two(
|
||||||
&remaining_budget,
|
&remaining_budget,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// The substraction is safe here as ex units counting is done during evaluation.
|
// The subtraction is safe here as ex units counting is done during evaluation.
|
||||||
// Redeemer would fail already if budget was negative.
|
// Redeemer would fail already if budget was negative.
|
||||||
remaining_budget.cpu -= redeemer.ex_units.steps as i64;
|
remaining_budget.cpu -= redeemer.ex_units.steps as i64;
|
||||||
remaining_budget.mem -= redeemer.ex_units.mem as i64;
|
remaining_budget.mem -= redeemer.ex_units.mem as i64;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// An opaque `Dict`. The type is opaque because the module maintains some
|
/// An opaque `Dict`. The type is opaque because the module maintains some
|
||||||
/// invariant, namely: there's only one occurence of a given key in the dictionnary.
|
/// invariant, namely: there's only one occurrence of a given key in the dictionary.
|
||||||
pub opaque type Dict<key, value> {
|
pub opaque type Dict<key, value> {
|
||||||
inner: List<(ByteArray, value)>,
|
inner: List<(ByteArray, value)>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
fn substract(x, y) {
|
fn subtract(x, y) {
|
||||||
x - y
|
x - y
|
||||||
}
|
}
|
||||||
|
|
||||||
test flip_1() {
|
test flip_1() {
|
||||||
flip(substract)(3, 2) == -1
|
flip(subtract)(3, 2) == -1
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ export default function App({ validators }: AppProps) {
|
||||||
|
|
||||||
const success = await lucid!.awaitTx(txHash);
|
const success = await lucid!.awaitTx(txHash);
|
||||||
|
|
||||||
// Wait a little bit longer so ExhuastedUTxOError doesn't happen
|
// Wait a little bit longer so ExhaustedUTxOError doesn't happen
|
||||||
// in the next Tx
|
// in the next Tx
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setWaitingLockTx(false);
|
setWaitingLockTx(false);
|
|
@ -1,7 +1,7 @@
|
||||||
import { Head } from "$fresh/runtime.ts";
|
import { Head } from "$fresh/runtime.ts";
|
||||||
import { Handlers, PageProps } from "$fresh/server.ts";
|
import { Handlers, PageProps } from "$fresh/server.ts";
|
||||||
|
|
||||||
import App from "~/islands/App.tsx";
|
import Oneshot from "~/islands/Oneshot.tsx";
|
||||||
|
|
||||||
import { readValidators, Validators } from "~/utils.ts";
|
import { readValidators, Validators } from "~/utils.ts";
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ export default function Home({ data }: PageProps<Data>) {
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<App validators={validators} />
|
<Oneshot validators={validators} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue