Running pre-commit for the first time.

This commit is contained in:
Pat Garrity 2024-01-24 22:52:27 -06:00
parent c7aa5e19a9
commit 5854408466
Signed by: pfm
GPG key ID: 5CA5D21BAB7F3A76
10 changed files with 22 additions and 22 deletions

View file

@ -7,7 +7,7 @@ To start reading, please use the [Table of Contents](./table-of-contents.md)
## What is Ava?
Ava is a programming language research project that is in the design and
specification phase. There is no grammar, parser, compiler, or way to use any
Ava is a programming language research project that is in the design and
specification phase. There is no grammar, parser, compiler, or way to use any
Ava code. Ava is a way to get ideas out of my head, challenged, and further
explored.

View file

@ -1,7 +1,7 @@
# Constants
_Constants_ are definitions which provide a name and explicit type for some
[value](values.md). The `const` keyword (definition type) is used to define a
[value](values.md). The `const` keyword (definition type) is used to define a
constant.
```

View file

@ -1,6 +1,6 @@
# Definitions
_Definitions_ are Ava constructs that may live at the top level within some
_Definitions_ are Ava constructs that may live at the top level within some
namespace. [Functions](functions.md) in particular may _also_ live within type
class (and instance) definitions.
@ -12,7 +12,7 @@ All definitions adhere to the following syntax:
[export] <definition type> <name> <description> is <body>
```
Each definition type ultimately controls the description and body. All
Each definition type ultimately controls the description and body. All
definition names adhere to standard [Name](names.md) rules.
## Supported Definition Types

View file

@ -3,6 +3,6 @@
## The Effect Type
The type `IO[E, A]` represents an effect which will produce `A` when executed,
and may fail with an error of type `E`. There exists a type
and may fail with an error of type `E`. There exists a type
`type Task[A] = IO[Nothing, A]` that represents effects that cannot fail with an
error.

View file

@ -5,7 +5,7 @@ that will produce a _value_ when evaluated.
## Syntax
Most non-[Definition](definitions.md) code is considered an expression.
Most non-[Definition](definitions.md) code is considered an expression.
Expressions include:
- Literals
@ -32,7 +32,7 @@ if <boolean expr> then <expr> else <expr>
TODO: This is incomplete
The `do/yield` expression allows for imperative composition of monadic
The `do/yield` expression allows for imperative composition of monadic
expressions.
```

View file

@ -1,7 +1,7 @@
# Functions
TODO: Scala syntax? Haskell syntax? Implications? How do we specify names for
parameters? Do we want to do that? How do function arguments, tuples, and
parameters? Do we want to do that? How do function arguments, tuples, and
records all relate to one another? Are they all just the same? How do we talk
about curried functions? Is that supported? Is there some other mechanism?
@ -27,7 +27,7 @@ example { x: 1, y: 2 }
```
```
fn map[F[*], A, B]: (F[A]) => (A => B) => F[B] is
fn map[F[*], A, B]: (F[A]) => (A => B) => F[B] is
(fa) (f) => fa f
map(list)(x => x + 1)

View file

@ -27,7 +27,7 @@ separated by the `.` character.
## Reserved Names
Any namespaces provided with a particular Ava distribution are considered
Any namespaces provided with a particular Ava distribution are considered
_reserved_. This means that, for example, the following namespaces cannot be
used:
@ -55,11 +55,11 @@ scope.
### Syntax
Each import is a single, fully-qualified name. Imported names MAY be mapped to
some alternative name. An import may refer to a specific namespace or it may
some alternative name. An import may refer to a specific namespace or it may
refer to some specific definition within a namespace.
TODO: Account for type classes. How can we easily import instances? One option
is to NOT do this. Ever. Just resolve EVERY possible `instance` during
is to NOT do this. Ever. Just resolve EVERY possible `instance` during
compilation and make them available within the scope of the program. Global.
Very strict one-instance-per-thing side-effect, but could be useful.

View file

@ -1,7 +1,7 @@
# Records
Records may be defined. Each record contains one or more named fields. Note that
records are just [tuples](tuples.md) with named fields. In many ways, the two
records are just [tuples](tuples.md) with named fields. In many ways, the two
can be interchanged.
```
@ -45,7 +45,7 @@ let foo2 := Foo(x := "foo", y := 1)
## Copying Data
Copy syntax allows any record to be duplicated, with any fields explicitly
Copy syntax allows any record to be duplicated, with any fields explicitly
overridden by some value:
```
@ -97,5 +97,5 @@ let foo: Foo := some_tuple
## Destructuring Records
Records can be _destructured_ via [pattern matching](pattern-matching.md)
Records can be _destructured_ via [pattern matching](pattern-matching.md)
capabilities. This can take two possible forms.

View file

@ -15,7 +15,7 @@ let w := ("foo", 1, true, 3.14)
## Type of a Standard Tuple
Consider the tuple `("foo", 1, true, 3.14)`. It has type
Consider the tuple `("foo", 1, true, 3.14)`. It has type
`(String, Int32, Boolean, Float64)`.
## The Empty Tuple
@ -25,7 +25,7 @@ typically used as a token to indicate side-effects with no other useful output.
## Accessing Tuple Members
Each tuple member is _indexed_ and can be directly accessed via a property of
Each tuple member is _indexed_ and can be directly accessed via a property of
that index:
```
@ -54,7 +54,7 @@ let (x, y, z) := w
```
let w := ("foo", 1, true)
let z :=
let z :=
match w
case ("foo", _, x) => x
case _ => false

View file

@ -9,8 +9,8 @@
## The Ava Type System
Ava is based on a static type system with support for higher-kinded types. Ava
does not support inheritence. Ava _does_ support sum types
([Enumerations](enumerations.md)) and _does_ support
does not support inheritence. Ava _does_ support sum types
([Enumerations](enumerations.md)) and _does_ support
[type classes](type-classes.md).
## The Nothing Type
@ -22,7 +22,7 @@ example, `Either[Nothing, String]` satisfies `Either[Int32, String]`.
## Type Definitions
Types may directly, at the top level, be defined in terms of some
Types may directly, at the top level, be defined in terms of some
[type constructor](#type-constructors):
```