diff --git a/README.md b/README.md index a93cbad..6f37dfc 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/constants.md b/constants.md index 6193789..bdd0c8c 100644 --- a/constants.md +++ b/constants.md @@ -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. ``` diff --git a/definitions.md b/definitions.md index e83008b..3474229 100644 --- a/definitions.md +++ b/definitions.md @@ -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] is ``` -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 diff --git a/effects.md b/effects.md index 1222ff6..f24438c 100644 --- a/effects.md +++ b/effects.md @@ -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. diff --git a/expressions.md b/expressions.md index 181fef4..35a8c50 100644 --- a/expressions.md +++ b/expressions.md @@ -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 then else 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. ``` diff --git a/functions.md b/functions.md index a4fd549..3e5565f 100644 --- a/functions.md +++ b/functions.md @@ -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) diff --git a/namespaces.md b/namespaces.md index 5ec4d42..88d2f80 100644 --- a/namespaces.md +++ b/namespaces.md @@ -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. diff --git a/records.md b/records.md index 714bbae..f3cf0a8 100644 --- a/records.md +++ b/records.md @@ -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. diff --git a/tuples.md b/tuples.md index 8bab6a9..f0f0e91 100644 --- a/tuples.md +++ b/tuples.md @@ -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 diff --git a/types.md b/types.md index f7c66cf..765fa31 100644 --- a/types.md +++ b/types.md @@ -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): ```