After we recently added support for a Elm project template to IHP, there's now also a new
--purescript-halogen flag you can pass when creating a new IHP project.
--purescript-halogen flag to the
ihp-new command to do the initial project setup needed for purescript:
$ ihp-new --purescript-halogen my-new-ps-project
If you already have used ihp-new before: You likely need to update the ihp-new command before the purescript flag is working. Run
nix-env -f https://ihp.digitallyinduced.com/ihp-new.tar.gz -i ihp-new to update it.
This will generate a new IHP project, install PureScript and wire it up in your
Layout.hs. You'll be greeted with the usual welcome page - but with a small addition
PureScript + Halogen is working!.
You can now start hacking on your PureScript project. All the .purs files are located in the
halogen directory. Open
halogen/Main.purs and start hacking! :)
There's also a new PureScript Guide in the IHP documentation.