Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
move bare types down with external
Browse files Browse the repository at this point in the history
  • Loading branch information
rawhat committed Oct 29, 2023
1 parent d4b50f6 commit 79231bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/rappel/environment.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ pub fn resolve_import(
map.get(environment.import_map, label)
}

pub type BindingStruct

pub fn merge_bindings(env: Environment, bindings: BindingStruct) -> Environment {
bindings
|> list_bindings
Expand All @@ -66,6 +64,8 @@ pub fn merge_bindings(env: Environment, bindings: BindingStruct) -> Environment
|> fn(new_bindings) { set_bindings(env, new_bindings) }
}

pub type BindingStruct

@external(erlang, "erl_eval", "new_bindings")
fn new_bindings() -> BindingStruct

Expand Down
4 changes: 2 additions & 2 deletions src/rappel/lsp.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ type Opts {
StderrToStdout
}

pub type Port

// NOTE: don't do this
fn port_pid(port: Port) -> Pid {
let info = port_info(port)
Expand Down Expand Up @@ -212,6 +210,8 @@ fn port_os_pid(port: Port) -> Int {
dynamic.unsafe_coerce(value)
}

pub type Port

@external(erlang, "erlang", "open_port")
fn open_port(command: #(Atom, String), opts: List(Opts)) -> Port

Expand Down

0 comments on commit 79231bd

Please sign in to comment.