GHCJS - Nix

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

TheMatten

Is there some (prebuilt) recent GHCJS package available through Nix?

Torsten Schmits

I assume mine might come from the reflex cache, if it's not in main

TheMatten

Hmm - so I'm in try-reflex nix-shell and I'm trying to compile purescript with cabal.config set up to snapshot it normally uses with stack, and I'm getting this curious error:

Data/Conduit/Attoparsec.hs:108:19: error:
    * The constructor `TI.Text' should have 1 argument, but has been given 3
    * In the pattern: TI.Text arr1 off1 len1
      In an equation for `stripFromEnd':
          stripFromEnd (TI.Text arr1 off1 len1) (TI.Text _ _ len2)
            = TI.text arr1 off1 (len1 - len2)
      In the instance declaration for `AttoparsecInput TI.Text'
    |
108 |     stripFromEnd (TI.Text arr1 off1 len1) (TI.Text _ _ len2) =
    |
TheMatten

I'm yet to find version of Data.Text.Internal which exposes Text constructor with one argument... (it seems to use 1.2.3.0)

TheMatten

Oooooh - isn't GHCJS using patched version of text? :sweat_smile:

TheMatten

It is - and patching conduit-extra solved the problem :big_smile:

Sridhar Ratnakumar

You are compiling purescript in ghcjs? To provide in browser compiler?

TheMatten

Though CLI in console without filesystem is not very useful, so I'll need to put together some simple UI :big_smile: