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

Commit

Permalink
move some more types; remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rawhat committed Oct 29, 2023
1 parent 79231bd commit 3b03ae6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 69 deletions.
8 changes: 4 additions & 4 deletions src/rappel/evaluator.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ pub fn start() -> Subject(Message) {
subj
}

type Token

type ParseResult

type EvalResult {
Value(Dynamic, BindingStruct)
}
Expand Down Expand Up @@ -170,6 +166,10 @@ pub fn resolve_import(str: String) -> List(#(String, String)) {
]
}

type Token

type ParseResult

@external(erlang, "rappel_ffi", "scan_string")
fn scan_string(str: Charlist) -> Result(List(Token), #(Dynamic, Dynamic))

Expand Down
6 changes: 0 additions & 6 deletions src/rappel/generator.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,6 @@ fn generate_pattern(pattern: Pattern) -> GenerateResult {
}
}
}
// let joined_arguments =
// arguments
// |> list.map(fn(arg) {
// })
// |> string.join(", ")
// "{" <> constructor_name <> ", " <> joined_arguments <> "}"
}

fn generate_fn_parameter(param: FnParameter) -> String {
Expand Down
59 changes: 0 additions & 59 deletions src/rappel/lsp/client.gleam
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//// REQUEST
//// RESPONSE

import gleam/dynamic.{Dynamic}
import gleam/int
import gleam/json
Expand All @@ -9,62 +6,6 @@ import gleam/option.{Option}
import gleam/result
import gleam/string

// interface Message {
// jsonrpc: string;
// }
// interface RequestMessage extends Message {
//
// /**
// * The request id.
// */
// id: integer | string;
//
// /**
// * The method to be invoked.
// */
// method: string;
//
// /**
// * The method's params.
// */
// params?: array | object;
// }

// interface ResponseMessage extends Message {
// /**
// * The request id.
// */
// id: integer | string | null;
//
// /**
// * The result of a request. This member is REQUIRED on success.
// * This member MUST NOT exist if there was an error invoking the method.
// */
// result?: string | number | boolean | array | object | null;
//
// /**
// * The error object in case a request fails.
// */
// error?: ResponseError;
// }
// interface ResponseError {
// /**
// * A number indicating the error type that occurred.
// */
// code: integer;
//
// /**
// * A string providing a short description of the error.
// */
// message: string;
//
// /**
// * A primitive or structured value that contains additional
// * information about the error. Can be omitted.
// */
// data?: string | number | boolean | array | object | null;
// }

// TODO: make this a proper ADT
pub type Request {
Request(id: Int, method: String, params: Map(String, Dynamic))
Expand Down

0 comments on commit 3b03ae6

Please sign in to comment.