From 1d66f31e19755609eac095a97f56acf35d391710 Mon Sep 17 00:00:00 2001 From: Kharec Date: Mon, 9 Mar 2026 22:04:15 +0100 Subject: [PATCH] refactor: pub things for testing purposes --- src/simple_repl.gleam | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simple_repl.gleam b/src/simple_repl.gleam index 04d14b7..530f8b2 100644 --- a/src/simple_repl.gleam +++ b/src/simple_repl.gleam @@ -12,7 +12,7 @@ fn get_line(prompt: String) -> String @external(erlang, "erlang", "halt") fn halt(code: Int) -> Nil -type Command { +pub type Command { Command(name: String, description: String, run: fn(List(Command)) -> Nil) } @@ -41,7 +41,7 @@ fn exit(_cmds: List(Command)) -> Nil { halt(0) } -fn build_commands() -> List(Command) { +pub fn build_commands() -> List(Command) { [ Command("clean", "delete history", clean), Command("help", "show this help", help), @@ -50,7 +50,7 @@ fn build_commands() -> List(Command) { ] } -fn commands_dict( +pub fn commands_dict( cmds: List(Command), ) -> dict.Dict(String, fn(List(Command)) -> Nil) { list.fold(cmds, dict.new(), fn(acc, cmd) {