aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Letan <contact@thomasletan.fr>2017-05-04 08:26:29 +0200
committerThomas Letan <contact@thomasletan.fr>2017-05-04 08:26:29 +0200
commit06c891e8a01c90161322d18e9a5839c09de8a0d8 (patch)
treefdc707ff9323879541c0e8d81ab8853be8ac06d2
parentrelease: lkn-prelude-0.1.0 (diff)
release: lkn-prelude-0.1.1HEADmain
-rw-r--r--README.md6
-rw-r--r--lib/lkn/prelude.ex6
-rw-r--r--lib/lkn/prelude/option.ex4
-rw-r--r--mix.exs6
4 files changed, 11 insertions, 11 deletions
diff --git a/README.md b/README.md
index d859529..42eaf5c 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ use it.
## Guide
Every module of this package is in the `Lkn.Prelude` namespace to avoid name
-collision. If one want to adopt our opinionated point of view, all she has to do
+collision. If one wants to adopt our opinionated point of view, all she has to do
is to add the following line to her code:
```elixir
@@ -22,7 +22,7 @@ painlessly.
### Opaque data-structures and macro-based pattern matching
In Elixir, it is not rare to see the most common data structure defined as
-tuples. For instance, a computation that may or may not return a result will
+tuples. For instance, a computation that may or may not return a value will
effectively return `{ :ok, val } | :error`. As a consequence, the caller will
have to match the result:
@@ -38,7 +38,7 @@ end
From our perspective, it brings several issues. The main one is
inconsistency. Some code might return `{:ok, val}` in case of success where
other would return `{:some, val}`. Another is that it makes it harder to change
-the data structure implementation. For instance, what if one want to return a
+the data structure implementation. For instance, what if one wants to return a
structure rather than a tuple, in order to implement the `Enumerable` protocol?
This package takes another path. The data structure typespecs are opaque and the
diff --git a/lib/lkn/prelude.ex b/lib/lkn/prelude.ex
index 02665b2..1a448e5 100644
--- a/lib/lkn/prelude.ex
+++ b/lib/lkn/prelude.ex
@@ -23,7 +23,7 @@ defmodule Lkn.Prelude do
## Guide
Every module of this package is in the `Lkn.Prelude` namespace to
- avoid name collision. If one want to adopt our opinionated point of
+ avoid name collision. If one wants to adopt our opinionated point of
view, all she has to do is to add the following line to her code:
use Lkn.Prelude
@@ -37,7 +37,7 @@ defmodule Lkn.Prelude do
In Elixir, it is not rare to see the most common data structure
defined as tuples. For instance, a computation that may or may not
- return a result will effectively return `{ :ok, val } | :error`. As
+ return a value will effectively return `{ :ok, val } | :error`. As
a consequence, the caller will have to match the result:
case res do
@@ -51,7 +51,7 @@ defmodule Lkn.Prelude do
inconsistency. Some code might return `{:ok, val}` in case of
success where other would return `{:some, val}`. Another is that it
makes it harder to change the data structure implementation. For
- instance, what if one want to return a structure rather than a
+ instance, what if one wants to return a structure rather than a
tuple, in order to implement the `Enumerable` protocol?
This package takes another path. The data structure typespecs are
diff --git a/lib/lkn/prelude/option.ex b/lib/lkn/prelude/option.ex
index 17bc334..d3f0ec3 100644
--- a/lib/lkn/prelude/option.ex
+++ b/lib/lkn/prelude/option.ex
@@ -45,13 +45,13 @@ defmodule Lkn.Prelude.Option do
The result of a computation which could have returned something but
didn't.
"""
- @opaque nothing() :: :nothing
+ @type nothing() :: :nothing
@typedoc """
The result of a computation which could have failed to return
something but didn't.
"""
- @opaque some(x) :: {:some, x}
+ @type some(x) :: {:some, x}
@typedoc """
The result of a computation which could have failed or could have
diff --git a/mix.exs b/mix.exs
index e3a6e23..781aa24 100644
--- a/mix.exs
+++ b/mix.exs
@@ -5,14 +5,14 @@ defmodule LknPrelude.Mixfile do
[
app: :lkn_prelude,
name: "lkn-prelude",
- version: "0.1.0",
+ version: "0.1.1",
elixir: "~> 1.4",
deps: deps(),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
description: description(),
- source_url: "https://nest.pijul.com/lthms/lkn-prelude:lkn-prelude-0.1.0",
+ source_url: "https://nest.pijul.com/lthms/lkn-prelude:lkn-prelude-0.1.1",
package: package(),
test_coverage: [
tool: ExCoveralls
@@ -69,7 +69,7 @@ defmodule LknPrelude.Mixfile do
"GPL 3.0"
],
links: %{
- "Pijul Nest" => "https://nest.pijul.com/lthms/lkn-prelude:lkn-prelude-0.1.0",
+ "Pijul Nest" => "https://nest.pijul.com/lthms/lkn-prelude:lkn-prelude-0.1.1",
},
]
end