mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 21:57:38 +03:00
17 lines
327 B
Forth
17 lines
327 B
Forth
|
module Readline
|
||
|
open System
|
||
|
open Mono.Terminal
|
||
|
|
||
|
type Mode =
|
||
|
| Terminal
|
||
|
| Raw
|
||
|
|
||
|
let read prompt = function
|
||
|
| Terminal
|
||
|
-> let editor = LineEditor("Mal")
|
||
|
editor.Edit(prompt, "")
|
||
|
| Raw
|
||
|
-> Console.Write(prompt)
|
||
|
Console.Out.Flush()
|
||
|
Console.ReadLine()
|