Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no output on command line #365

Closed
bentxt opened this issue Oct 14, 2017 · 1 comment
Closed

no output on command line #365

bentxt opened this issue Oct 14, 2017 · 1 comment
Labels

Comments

@bentxt
Copy link

bentxt commented Oct 14, 2017

there is no output 👍

$ cat t.glu

let prelude = import! "std/prelude.glu"
let io = import! "std/io.glu"

let run x : () -> IO () =
    io.println "gluon (:h for help, :q to quit)"
run

$ ./target/debug/gluon t.glu

@Marwes
Copy link
Member

Marwes commented Oct 14, 2017

Thanks for reporting! It appears that running files from the command line has regressed so that it no longer runs IO expressions. Fairly simple to fix but I will do some cleanup of the API being used as well.

Note that you actually have a bug in the example you posted. The run function must be called as well or else the IO action won't be executed (you only return the function run as it is currently).

let prelude = import! "std/prelude.glu"
let io = import! "std/io.glu"

let run x : () -> IO () =
    io.println "gluon (:h for help, :q to quit)"
run ()
 // ^ here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants