reflex-frp / reflex-platform

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.
https://reflex-frp.org
BSD 3-Clause "New" or "Revised" License
723 stars 164 forks source link

Conditional blocks broken for version checks under ghcjs #549

Open alexfmpe opened 5 years ago

alexfmpe commented 5 years ago

Checkout https://github.com/alexfmpe/reflex-project-skeleton/commit/c84153369f2abdd576100c0d7605d5d480454faf and run ./reproduce-bug

It seems this conditional isn't being processed properly when under ghcjs. I managed to build by cloning singleton-bool locally and changing

-if impl(ghc >=7.8)
+if impl(ghc >=7.8) || impl(ghcjs >=7.8) 

I have cabal2nix 2.1.4 on my environment and it seems to handle all cases properly, as long as the compiler version is also passed in. That is, cabal2nix --compiler ghcjs-8.6 --shell . > shell.nix yields the expected output but cabal2nix --compiler ghcjs --shell . > shell.nix does not.

alexfmpe commented 4 years ago

Still present in latest reflex-platform develop. Oddly this only happens when there is an override in the project, even though the cabal version is always 0.1.5