aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2018-06-29 23:07:14 +0100
committerLouis Pilfold <louis@lpil.uk>2018-07-04 01:07:00 +0100
commit82acee877d70326311335876cd2dfe77134f8e82 (patch)
tree6d52a96730c82177bd8b40582225497c56ca04a5
parent31bea4c96bc2c412ad415c2ea16537364f920c1d (diff)
downloadgleam_stdlib-82acee877d70326311335876cd2dfe77134f8e82.tar.gz
gleam_stdlib-82acee877d70326311335876cd2dfe77134f8e82.zip
Sketch first class module
-rw-r--r--src/Foreign.gleam8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Foreign.gleam b/src/Foreign.gleam
index f364bcf..25741d7 100644
--- a/src/Foreign.gleam
+++ b/src/Foreign.gleam
@@ -11,3 +11,11 @@ doc """
Convert any Gleam data into Foreign data.
"""
external new : |a| -> Foreign = :gleam_native.identity
+
+doc """
+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.
+"""
+external unsafeCoerce : |a| -> b = :gleam_native.identity