demonstration of purescript-native-cpp repl
# Install Git
# Install Haskell Stack
# Install psc-package
# Install purescript native cpp transpiler 'pscpp'
# from [email protected]:andyarvanitis/purescript-native.git
# build 'purs' purescript compiler from
# [email protected]:freylax/purescript.git
# this adds the native backend to the purs repl command
# check out this repo
git clone [email protected]:freylax/purescript-native-repl.git
cd purescript-native-repl
# fetch the ffi
git submodule init
git submodule update
# Install the PureScript dependencies.
psc-package install
# in the Makefile check that PURS points to the path of the new build 'purs'
#
# generate the cpp sources and trigger compilation,
# this will not succeed because the PSCI module
# which will be generated by purs repl is not there,
# but anyway you will see what is going on.
make debug
# now launch the repl
# this will hide the compilation output
make repl
> import Prelude
> 1 + 2
# This will build the executable and call it
# which will display the result.