aboutsummaryrefslogtreecommitdiff
path: root/src/any.gleam
blob: 884a436b82b4b2d9782b775c134918f2d9ee1036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// `Any` data is data that we don"t know the type of yet.
// We likely get data like this from interop with Erlang, or from
// IO with the outside world.
//
pub external type Any;

// Convert any Gleam data into `Any` data.
//
pub external fn from(a) -> Any = "gleam__stdlib" "identity";

// 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 fn unsafeCoerce(a) -> b = "gleam__stdlib" "identity";