From 54411662b96b3c8b849516fff2c769b25d0cba1c Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Sat, 22 Sep 2018 15:20:58 +0100 Subject: Adopt Erlang atom syntax --- src/Foreign.gleam | 4 ++-- src/List.gleam | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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(_, []) -- cgit v1.2.3