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

[QUESTION] Is it possible to use Effects in PIO? #10

Open
NickSeagull opened this issue Oct 24, 2017 · 0 comments
Open

[QUESTION] Is it possible to use Effects in PIO? #10

NickSeagull opened this issue Oct 24, 2017 · 0 comments

Comments

@NickSeagull
Copy link

Hello, thanks for taking the time to make this project 😄

I was wondering if there was a way of having a run : Eff a b -> PIO a function that acts the same as the run from the official Idris Prelude.

I'm currently trying to compile the following code, but I'm not able to make it typecheck:

foo : Eff () [SYSTEM, STDIO]
foo = do
  x <- getArgs
  putStrLn "Hello"

main : PIO ()
main = run foo

I get the following error:

When checking argument env to function Effects.run:
        Type mismatch between
                Env m [] (Type of [])
        and
                Env (IO' (MkFFI PyTypes String String)) [SYSTEM, STDIO] (Expected type)

        Specifically:
                Type mismatch between
                        []
                and
                        [SYSTEM, STDIO]

Any ideas?

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

No branches or pull requests

1 participant