2 Commits

Author SHA1 Message Date
MasseR 2eb5304977 WIP ghcjs 2018-12-19 00:24:11 +02:00
MasseR 6455d51d0e stylish-haskell changes 2018-12-15 23:31:30 +02:00
5 changed files with 82 additions and 56 deletions
+19 -19
View File
@@ -1,27 +1,27 @@
{-# Language DataKinds #-} {-# LANGUAGE DataKinds #-}
{-# Language TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-}
{-# Language TypeOperators #-} {-# LANGUAGE FlexibleInstances #-}
{-# Language NoImplicitPrelude #-} {-# LANGUAGE MultiParamTypeClasses #-}
{-# Language MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-}
{-# Language OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# Language TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-}
{-# Language QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-}
{-# Language RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-}
{-# Language DeriveGeneric #-} {-# LANGUAGE TypeFamilies #-}
{-# Language FlexibleInstances #-} {-# LANGUAGE TypeOperators #-}
module API (API, handler) where module API (API, handler) where
import Servant import Servant
import Servant.HTML.Lucid (HTML) import Servant.HTML.Lucid (HTML)
import Types import Types
import View import View
import qualified API.Users as Users import qualified API.Books as Books
import qualified API.Channels as Channels import qualified API.Catalogue as Catalogue
import qualified API.Books as Books import qualified API.Channels as Channels
import qualified API.Catalogue as Catalogue import qualified API.Users as Users
data Index = Index data Index = Index
+33 -33
View File
@@ -10,8 +10,8 @@ let
miso = nixpkgs.fetchFromGitHub { miso = nixpkgs.fetchFromGitHub {
owner = "dmjio"; owner = "dmjio";
repo = "miso"; repo = "miso";
rev = "a9c4f0a3a6e7d87f9432dc6cf4b1d0c052bf7ef1"; rev = "630e823dd40a434b73124e12b229a79d9fefb01d";
sha256 = "1yq5y4vffslm6abnfnggp5m3k6vla6mzcwmhmm23l8yizsvdkwv2"; sha256 = "046gdp3ah2lsipfcy89rh20mn08xbhcgrj549v8zzy69j33xjm2l";
}; };
miso-jsaddle = super: if haskellPackages.ghc.isGhcjs or false then (super.callPackage (miso + "/miso-ghcjs.nix") {}) else (super.callPackage (miso + "/miso-ghc-jsaddle.nix") {}); miso-jsaddle = super: if haskellPackages.ghc.isGhcjs or false then (super.callPackage (miso + "/miso-ghcjs.nix") {}) else (super.callPackage (miso + "/miso-ghc-jsaddle.nix") {});
@@ -31,37 +31,37 @@ in
jsaddle-warp = nixpkgs.haskell.lib.dontCheck (super.callPackage (jsaddle + "/jsaddle-warp") {}); jsaddle-warp = nixpkgs.haskell.lib.dontCheck (super.callPackage (jsaddle + "/jsaddle-warp") {});
jsaddle = super.callPackage (jsaddle + "/jsaddle") {}; jsaddle = super.callPackage (jsaddle + "/jsaddle") {};
miso = miso-jsaddle super; miso = miso-jsaddle super;
doctest = null; # Not compilable with ghcjs # doctest = null; # Not compilable with ghcjs
comonad = dontCheck super.comonad; # comonad = dontCheck super.comonad;
Glob = dontCheck super.Glob; # Glob = dontCheck super.Glob;
SHA = dontCheck super.SHA; # SHA = dontCheck super.SHA;
iproute = dontCheck super.iproute; # iproute = dontCheck super.iproute;
semigroupoids = dontCheck super.semigroupoids; # semigroupoids = dontCheck super.semigroupoids;
wai-app-static = dontCheck super.wai-app-static; # wai-app-static = dontCheck super.wai-app-static;
attoparsec = dontCheck super.attoparsec; # attoparsec = dontCheck super.attoparsec;
http-date = dontCheck super.http-date; # http-date = dontCheck super.http-date;
lens = dontCheck super.lens; # lens = dontCheck super.lens;
unix-time = dontCheck super.unix-time; # unix-time = dontCheck super.unix-time;
http-types = dontCheck super.http-types; # http-types = dontCheck super.http-types;
servant = dontCheck super.servant; # servant = dontCheck super.servant;
servant-server = dontCheck super.servant-server; # servant-server = dontCheck super.servant-server;
servant-auth-docs = dontCheck super.servant-auth-docs; # servant-auth-docs = dontCheck super.servant-auth-docs;
lens-aeson = dontCheck super.lens-aeson; # lens-aeson = dontCheck super.lens-aeson;
word8 = dontCheck super.word8; # word8 = dontCheck super.word8;
http2 = dontCheck super.http2; # http2 = dontCheck super.http2;
wai-extra = dontCheck super.wai-extra; # wai-extra = dontCheck super.wai-extra;
pgp-wordlist = dontCheck super.pgp-wordlist; # pgp-wordlist = dontCheck super.pgp-wordlist;
prettyprinter = dontCheck super.prettyprinter; # prettyprinter = dontCheck super.prettyprinter;
unliftio = dontCheck super.unliftio; # unliftio = dontCheck super.unliftio;
prettyprinter-ansi-terminal = dontCheck super.prettyprinter-ansi-terminal; # prettyprinter-ansi-terminal = dontCheck super.prettyprinter-ansi-terminal;
distributive = dontCheck super.distributive; # distributive = dontCheck super.distributive;
genvalidity-property = dontCheck super.genvalidity-property; # genvalidity-property = dontCheck super.genvalidity-property;
genvalidity-hspec = dontCheck super.genvalidity-hspec; # genvalidity-hspec = dontCheck super.genvalidity-hspec;
genvalidity = dontCheck super.genvalidity; # genvalidity = dontCheck super.genvalidity;
megaparsec = dontCheck super.megaparsec; # megaparsec = dontCheck super.megaparsec;
ncurses = null; # ncurses = null;
haskeline = super.callHackage "haskeline" "0.7.4.2" {}; # haskeline = super.callHackage "haskeline" "0.7.4.2" {};
terminfo = super.callHackage "terminfo" "0.4.1.1" {}; # terminfo = super.callHackage "terminfo" "0.4.1.1" {};
}; };
tools = with haskellPackages; [ tools = with haskellPackages; [
ghcid ghcid
-1
View File
@@ -20,7 +20,6 @@ executable frontend
-- other-modules: -- other-modules:
-- other-extensions: -- other-extensions:
build-depends: base >=4.11 && <4.12 build-depends: base >=4.11 && <4.12
, common
, miso , miso
, jsaddle-warp , jsaddle-warp
, mtl , mtl
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"url": "https://github.com/nixos/nixpkgs.git", "url": "https://github.com/nixos/nixpkgs.git",
"rev": "e0d250e5cf6d179e1ccc775472d89718f61fcfd1", "rev": "4507926b80c6b8f73053775ffee17f6781c7e7c8",
"date": "2018-01-08T11:52:28+01:00", "date": "2018-01-08T11:52:28+01:00",
"sha256": "1iqpjz4czcpghbv924a5h4jvfmj6c8q6sl3b1z7blz3mi740aivs", "sha256": "068v9xh7d8klk62p2qwr76fyfqfh1bp08xc12x138g5q6pg6yfzb",
"fetchSubmodules": true "fetchSubmodules": true
} }
+28 -1
View File
@@ -2,12 +2,39 @@
let let
config = {
packageOverrides = pkgs: with pkgs.haskell.lib; with pkgs.lib; {
haskell = pkgs.haskell // {
packages = pkgs.haskell.packages // {
ghcjs84 = pkgs.haskell.packages.ghcjs84.override {
overrides = self: super: {
doctest = null;
directory-tree = dontCheck (super.directory-tree);
http-types = dontCheck (super.http-types);
tasty-quickcheck = dontCheck (super.tasty-quickcheck);
scientific = dontCheck (super.scientific);
servant = dontCheck (super.servant);
jsaddle-warp = super.callPackage ./jsaddle-warp-ghcjs.nix {};
ghc = overrideDerivation (super.ghc.override {
ghcjsSrc = pkgs.fetchgit {
url = "https://github.com/ghcjs/ghcjs.git";
rev = "dc190b1bb2453cfa484124e9f335ee3cad1492f7";
sha256 = "0dh52aj0f3700zfyrhisy44b6y9p1bsawwrmd5pllpdyw21zd9lw";
fetchSubmodules = true;
};
}) (drv: { patches = (drv.patches or []) ++ [ ./ghcjs.patch ]; });
};
};
};
};
};
};
pinnedVersion = nixpkgs.lib.importJSON ./nixpkgs-version.json; pinnedVersion = nixpkgs.lib.importJSON ./nixpkgs-version.json;
pinnedPkgs = import (nixpkgs.fetchFromGitHub { pinnedPkgs = import (nixpkgs.fetchFromGitHub {
owner = "NixOS"; owner = "NixOS";
repo = "nixpkgs"; repo = "nixpkgs";
inherit (pinnedVersion) rev sha256; inherit (pinnedVersion) rev sha256;
}) {}; }) { inherit config; };
inherit (pinnedPkgs) pkgs; inherit (pinnedPkgs) pkgs;
in in