Haste and nodejs: file system access?

79 views
Skip to first unread message

Brian Jaress

unread,
Apr 18, 2015, 6:03:35 PM4/18/15
to haste-c...@googlegroups.com

If a program is compiled with Haste and run on nodejs, can it read and write files on the file system?

I tried searching the documentation for the answer, but couldn’t find it.

Anton Ekblad

unread,
Apr 20, 2015, 9:32:00 AM4/20/15
to haste-c...@googlegroups.com
I'm afraid Haste doesn't integrate at all with node.js at the moment since it seems to me that you'd be better off compiling any server parts with vanilla GHC.

Do you have any particular reason for wanting to do this with Haste/node.js instead? Is there some significant use case I've missed here?

/Anton

Brian Jaress

unread,
Apr 20, 2015, 12:47:21 PM4/20/15
to Anton Ekblad, haste-c...@googlegroups.com
Shucks. I was hoping that since node.js is mentioned as being used for
the test suite, there would be support for running code that way.

The use case is distributing command-line applications that use the
network and the file system but aren't web servers and never touch a
browser.

Different binaries are a bit of a pain for everyone, and a lot of people
seem more willing to install an interpreter than a compiler in order to
run a program (and more people seem to have node.js already installed).
For users who don't know or care about Haskell, it's more of a barrier
than it might sound like.
Reply all
Reply to author
Forward
0 new messages