ElmCast / elm-node

Elm server side support
149 stars 20 forks source link

run from elm-repl #8

Open joelmccracken opened 8 years ago

joelmccracken commented 8 years ago

There seems to be code explicitly forbidding running w/o a declared main module, which looks like the issue. However, I'm experimenting with this module; is there some way to do so within elm repl?

ajhager commented 8 years ago

I'm not sure how this would interact with elm-repl, even if I removed the need to declare a main module, but I am going to lift that restriction and see.

joelmccracken commented 8 years ago

So, when I removed the restrictions, things work OK, except tasks are returned/printed at the console, instead of being run. I'm not sure how to manually "run" a task, so I'm a little stuck for now.

ajhager commented 8 years ago

Awesome, I think I know how to fix that.

joelmccracken commented 8 years ago

Cool; so, it looks like this:

> (Process.exec "brew list --versions") `andThen` Console.log
{ tag = "AndThen", task = { tag = "Async", asyncFunction = <function> }, callback = <function> }
    : Task.Task String ()
joelmccracken commented 8 years ago

Any hints? I may try it myself

Sent from my iPhone

On Mar 3, 2016, at 6:22 PM, Joseph Hager notifications@github.com wrote:

Awesome, I think I know how to fix that.

— Reply to this email directly or view it on GitHub.