From 82acee877d70326311335876cd2dfe77134f8e82 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Fri, 29 Jun 2018 23:07:14 +0100 Subject: Sketch first class module --- src/Foreign.gleam | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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 -- cgit v1.2.3