A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
I was following the first steps of docs/project-development.rst. However, the try-reflex script either gives outdated advice or does not work properly for me:
You are now in a shell with access to the Reflex functional reactive programming engine.
To run a simple app:
$ ghc -dynamic -XOverloadedStrings -e 'import Reflex.Dom' -e 'mainWidget $ text "Hello, world!"'
Running exactly that command gives
<no location info>: error:
Could not find module `Reflex.Dom'
It is not a module in the current program, or in any known package.
I was following the first steps of docs/project-development.rst. However, the
try-reflex
script either gives outdated advice or does not work properly for me:Running exactly that command gives
which is not surprising,
given that
``` $ ghc-pkg list /nix/store/26k0ndap2lmh08l9x3ah8yhmbkzm5qj3-ghc-8.10.7/lib/ghc-8.10.7/package.conf.d Cabal-3.2.1.0 array-0.5.4.0 base-4.14.3.0 binary-0.8.8.0 bytestring-0.10.12.0 containers-0.6.5.1 deepseq-1.4.4.0 directory-1.3.6.0 exceptions-0.10.4 filepath-1.4.2.1 ghc-8.10.7 ghc-boot-8.10.7 ghc-boot-th-8.10.7 ghc-compact-0.1.0.0 ghc-heap-8.10.7 ghc-prim-0.6.1 ghci-8.10.7 haskeline-0.8.2 hpc-0.6.1.0 integer-gmp-1.0.3.0 libiserv-8.10.7 mtl-2.2.2 parsec-3.1.14.0 pretty-1.1.3.6 process-1.6.13.2 rts-1.0.1 stm-2.5.0.1 template-haskell-2.16.0.0 terminfo-0.4.1.4 text-1.2.4.1 time-1.9.3 transformers-0.5.6.2 unix-2.7.2.2 xhtml-3000.2.2.1 ```ghc-pkg list
has nothing onreflex
at all!(However,
``` $ ghcjs-pkg list /nix/store/nf35hr9yk3wxha3ki78x7klkw7429n8x-ghcjs-8.10.7-with-packages/lib/ghcjs-8.10.7/package.conf.d Cabal-3.2.1.0 MemoTrie-0.6.10 OneTuple-0.3.1 QuickCheck-2.14.2 StateVar-1.2.1 adjunctions-4.4 aeson-2.1.1.0 array-0.5.4.0 assoc-1.0.2 attoparsec-0.14.4 (z-attoparsec-z-attoparsec-internal-0.14.4) base-4.14.3.0 base-compat-0.11.2 base-compat-batteries-0.11.2 base-orphans-0.8.7 base64-bytestring-1.1.0.0 bifunctors-5.5.11 bimap-0.4.0 binary-0.8.8.0 blaze-builder-0.4.2.1 bytestring-0.10.12.0 call-stack-0.3.0 case-insensitive-1.2.1.0 commutative-semigroups-0.1.0.0 comonad-5.0.8 constraints-0.13 constraints-extras-0.4.0.0 containers-0.6.5.1 contravariant-1.5.3 data-default-0.7.1.1 data-default-class-0.1.2.0 data-default-instances-containers-0.0.1 data-default-instances-dlist-0.0.1 data-default-instances-old-locale-0.0.1 data-fix-0.3.2 deepseq-1.4.4.0 dependent-map-0.4.0.0 dependent-sum-0.7.2.0 dependent-sum-template-0.1.2.0 directory-1.3.6.0 distributive-0.6.2.1 dlist-0.8.0.8 exception-transformers-0.4.0.9 exceptions-0.10.4 fail-4.9.0.0 file-embed-0.0.13.0 filepath-1.4.2.1 free-5.1.5 generically-0.1 (ghc-8.10.7) ghc-boot-8.10.7 ghc-boot-th-8.10.7 ghc-compact-0.1.0.0 ghc-heap-8.10.7 ghc-prim-0.6.1 ghci-8.10.7 ghcjs-base-0.2.0.3 ghcjs-dom-0.9.4.0 ghcjs-dom-jsffi-0.9.4.0 ghcjs-prim-0.1.1.0 ghcjs-th-0.1.0.0 hashable-1.3.5.0 haskell-src-exts-1.23.1 haskell-src-meta-0.8.7 indexed-traversable-0.1.2 indexed-traversable-instances-0.1 integer-gmp-1.0.3.0 integer-logarithms-1.0.3.1 invariant-0.5.4 jsaddle-0.9.8.2 kan-extensions-5.2.2 keycode-0.2.2 lens-4.19.2 mmorph-1.1.5 monad-control-1.0.2.3 monoidal-containers-0.6.3.0 mtl-2.2.2 network-uri-2.6.4.1 newtype-0.2.2.0 newtype-generics-0.6 old-locale-1.0.0.7 parallel-3.2.2.0 parsec-3.1.14.0 patch-0.0.8.2 pretty-1.1.3.6 prim-uniq-0.2 primitive-0.7.1.0 process-1.6.13.2 profunctors-5.5.2 random-1.1 ref-tf-0.5 reflection-2.1.6 reflex-0.9.1.0 reflex-dom-0.6.1.1 reflex-dom-core-0.8.0.0 reflex-todomvc-0.1 rts-1.0 safe-0.3.19 scientific-0.3.7.0 semialign-1.2.0.1 semigroupoids-5.3.5 semigroups-0.19.1 some-1.0.4 splitmix-0.1.0.3 stm-2.5.0.0 strict-0.4.0.1 syb-0.7.2.1 tagged-0.8.6.1 template-haskell-2.16.0.0 text-1.2.4.1 text-short-0.1.5 th-abstraction-0.4.3.0 th-compat-0.1.2 th-expand-syns-0.4.8.0 th-lift-0.8.2 th-lift-instances-0.1.18 th-orphans-0.13.11 th-reify-many-0.1.9 these-1.1.1.1 time-1.9.3 time-compat-1.9.6.1 transformers-0.5.6.2 transformers-base-0.4.5.2 transformers-compat-0.6.6 type-equality-1 unbounded-delays-0.1.1.1 unix-2.7.2.2 unordered-containers-0.2.13.0 uuid-types-1.0.5 vector-0.12.3.1 void-0.7.3 witherable-0.4.2 zenc-0.1.1 ```ghcjs
setup seems to be fine and the suggestedhello.hs
toy example works.)I am on ArchLinux with
nix 2.16.1
from the extra-repo, usingreflex-platform v1.1.0.0
.