reflex-frp / reflex

Interactive programs without callbacks or side-effects. Functional Reactive Programming (FRP) uses composable events and time-varying values to describe interactive systems as pure functions. Just like other pure functional code, functional reactive code is easier to get right on the first try, maintain, and reuse.
https://reflex-frp.org
BSD 3-Clause "New" or "Revised" License
1.07k stars 150 forks source link

Please consider joining stackage #26

Closed nomeata closed 5 years ago

nomeata commented 9 years ago

Hi Ryan,

this is a standard request of mine with projects I use, or which I add to Debian:

Please consider adding your package to Stackage. Essentially, this gives you free QA and early feedback when something breaks, i.e. before your users notice. It does not require you to use Stackage or stack yourself. See http://www.stackage.org/authors for details.

Greetings, Joachim

ryantrinkle commented 9 years ago

PR submitted: https://github.com/fpco/stackage/pull/796

Cypher1 commented 7 years ago

Can this be reopened. I also use stack for my Haskell based work and as currently Nix OS isn't supported by Reflex. This leaves only try-reflex as a way to run / build code in reflex and I don't like that it takes over my command line (and breaks all my tab-completion/zsh features).

Thanks

3noch commented 7 years ago

currently Nix OS isn't supported by Reflex.

@Cypher1 I'm not sure what you mean by this. Do you mean that up-to-date reflex is not in nixpkgs.haskellPackages? Or that stack doesn't work on NixOS (without nix integration)?

I actually use stack with its nix integration on NixOS (and macOS actually). It works quite well when used that way.

Cypher1 commented 7 years ago

Hmm. Perhaps I've misunderstood this issue https://github.com/reflex-frp/reflex/issues/27

Is there a guide to setting up Nix & Stack somewhere, I've found a few repos with that setup but they are all horribly out of date and so no longer build on current stack installs.

3noch commented 7 years ago

@Cypher1 I have a goal to document this better, but here's what I have as an example:

You can create default.nix with cabal2nix.

shell.nix

{ useGhc          ? true
, reflex-platform ? import ./reflex-platform {}
}:
let

  haskellPkgs = if useGhc then reflex-platform.ghc else reflex-platform.ghcjs;

  # Add development tools to the dependency tree
  # when working with GHC in the shell.
  devTools = if !useGhc then [] else [
    haskellPkgs.intero
    haskellPkgs.hlint_2_0_9
    haskellPkgs.stylish-haskell
  ];

  drv = import ./default.nix { inherit common; };

  drvWithDevTools = pkgs.haskell.lib.overrideCabal drv (
    { buildDepends ? [], ...}: {
      buildDepends = buildDepends ++ devTools;
    }
  );

in reflex-platform.workOn haskellPkgs drvWithDevTools

stack.nix

nix:
  enable: true
  packages: []
  shell-file: shell.nix

resolver: ghc-8.0.2
system-ghc: true
packages:
  - '.'
Cypher1 commented 7 years ago

Thanks! I'll try it out