(module linenoise (linenoise history-add set-history-length! save-history-to-file load-history-from-file) (import chicken scheme) (import foreign) (foreign-declare "#include \"linenoise-src.c\"") (define history-add (foreign-lambda int linenoiseHistoryAdd c-string)) (define set-history-length! (foreign-lambda int linenoiseHistorySetMaxLen int)) (define load-history-from-file (foreign-lambda int linenoiseHistoryLoad c-string)) (define save-history-to-file (foreign-lambda int linenoiseHistorySave c-string)) (define linenoise (foreign-lambda c-string linenoise c-string)))