aboutsummaryrefslogtreecommitdiff
path: root/gen/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2019-11-24 22:13:34 +0000
committerLouis Pilfold <louis@lpil.uk>2019-11-25 11:22:45 +0000
commit69b0e8e1abb78db55cbdbd8db3ba4fe75b743e60 (patch)
tree47eec11c69fecb4033b33bd0987992e51b41f49c /gen/src
parent09bd0a89dd80500d99589646a738c45c9537091a (diff)
downloadgleam_stdlib-69b0e8e1abb78db55cbdbd8db3ba4fe75b743e60.tar.gz
gleam_stdlib-69b0e8e1abb78db55cbdbd8db3ba4fe75b743e60.zip
Update for Gleam v0.5
Diffstat (limited to 'gen/src')
-rw-r--r--gen/src/gleam@any.erl5
-rw-r--r--gen/src/gleam@pair.erl20
-rw-r--r--gen/src/gleam@triple.erl16
3 files changed, 11 insertions, 30 deletions
diff --git a/gen/src/gleam@any.erl b/gen/src/gleam@any.erl
index 9f2a8e6..2cedd83 100644
--- a/gen/src/gleam@any.erl
+++ b/gen/src/gleam@any.erl
@@ -1,7 +1,7 @@
-module(gleam@any).
-compile(no_auto_import).
--export([from/1, unsafe_coerce/1, string/1, int/1, float/1, atom/1, bool/1, thunk/1, list/2, pair/1, field/2]).
+-export([from/1, unsafe_coerce/1, string/1, int/1, float/1, atom/1, bool/1, thunk/1, list/2, field/2]).
from(A) ->
gleam_stdlib:identity(A).
@@ -36,8 +36,5 @@ list(Any, DecoderType) ->
fun(Capture1) -> gleam@list:traverse(Capture1, DecoderType) end
).
-pair(A) ->
- gleam_stdlib:decode_pair(A).
-
field(A, B) ->
gleam_stdlib:decode_field(A, B).
diff --git a/gen/src/gleam@pair.erl b/gen/src/gleam@pair.erl
index 0f8e8be..3c07918 100644
--- a/gen/src/gleam@pair.erl
+++ b/gen/src/gleam@pair.erl
@@ -3,22 +3,22 @@
-export([first/1, second/1, swap/1, map_first/2, map_second/2]).
-first(Tup) ->
- {A, _} = Tup,
+first(Pair) ->
+ {A, _} = Pair,
A.
-second(Tup) ->
- {_, A} = Tup,
+second(Pair) ->
+ {_, A} = Pair,
A.
-swap(Tup) ->
- {A, B} = Tup,
+swap(Pair) ->
+ {A, B} = Pair,
{B, A}.
-map_first(Tup, Fun) ->
- {A, B} = Tup,
+map_first(Pair, Fun) ->
+ {A, B} = Pair,
{Fun(A), B}.
-map_second(Tup, Fun) ->
- {A, B} = Tup,
+map_second(Pair, Fun) ->
+ {A, B} = Pair,
{A, Fun(B)}.
diff --git a/gen/src/gleam@triple.erl b/gen/src/gleam@triple.erl
deleted file mode 100644
index 62a32da..0000000
--- a/gen/src/gleam@triple.erl
+++ /dev/null
@@ -1,16 +0,0 @@
--module(gleam@triple).
--compile(no_auto_import).
-
--export([first/1, second/1, third/1]).
-
-first(Trip) ->
- {A, _, _} = Trip,
- A.
-
-second(Trip) ->
- {_, A, _} = Trip,
- A.
-
-third(Trip) ->
- {_, _, A} = Trip,
- A.