aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2018-09-22 15:20:58 +0100
committerLouis Pilfold <louis@lpil.uk>2018-09-22 15:20:58 +0100
commit54411662b96b3c8b849516fff2c769b25d0cba1c (patch)
tree7bed4658d58d73b3a16e0977ccf5379f2d6215da /src
parent7a4c12fe36a631acf9c46b41babacf8f9d044d42 (diff)
downloadgleam_stdlib-54411662b96b3c8b849516fff2c769b25d0cba1c.tar.gz
gleam_stdlib-54411662b96b3c8b849516fff2c769b25d0cba1c.zip
Adopt Erlang atom syntax
Diffstat (limited to 'src')
-rw-r--r--src/Foreign.gleam4
-rw-r--r--src/List.gleam4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Foreign.gleam b/src/Foreign.gleam
index 66ff936..b050e86 100644
--- a/src/Foreign.gleam
+++ b/src/Foreign.gleam
@@ -11,7 +11,7 @@ pub external type Foreign
doc """
Convert any Gleam data into Foreign data.
"""
-pub external fn new(a) { Foreign } = :"Gleam.Foreign" :identity
+pub external fn new(a) { Foreign } = 'Gleam.Foreign' 'identity'
doc """
Unsafely cast any type into any other type.o
@@ -19,7 +19,7 @@ Unsafely cast any type into any other type.o
This is an escape hatch for the type system that may be useful when wrapping
native Erlang APIs. It is to be used as a last measure only.
"""
-pub external unsafeCoerce : fn(a) { b } = :"Gleam.Foreign" :identity
+pub external fn unsafeCoerce(a) { b } = 'Gleam.Foreign' 'identity'
fn identity(x) {
x
diff --git a/src/List.gleam b/src/List.gleam
index 2388591..833301b 100644
--- a/src/List.gleam
+++ b/src/List.gleam
@@ -7,7 +7,7 @@ pub type Err =
// Using the Erlang C BIF implementation.
//
-external length : fn(List(a)) { Int } = :erlang :length
+external fn length(List(a)) { Int } = 'erlang' 'length'
test length {
length([]) |> Assert.equal(_, 0)
@@ -18,7 +18,7 @@ test length {
// Using the Erlang C BIF implementation.
//
-pub external fn reverse(List(a)) { List(a) } = :erlang :reverse
+pub external fn reverse(List(a)) { List(a) } = 'erlang' 'reverse'
test reverse {
length([]) |> Assert.equal(_, [])