on master help sign in
Merge branch 'master' of github.com:mightybyte/servant-reflex
commit1c0ec5ed58801965a793d2a7c750ac91554fc2e6 authorGreg Hale <imalsogreg@gmail.com> dateSat 12 Mar 2016, 17:59 (11 years ago) parent19810f679d18aa
8 files changed+36−12
.gitmodules+3−3 build.sh+1−1 deps/reflex-platform+1 deps/try-reflex−1 exec/API.hs+25 overrides.nix+4−5 shell.sh+1−1 testserver/Main.hs+1−1
.gitmodules+3−3
@@ -1,9 +1,6 @@
11[submodule "deps/reflex-dom-contrib"]
22 path = deps/reflex-dom-contrib
33 url = git@github.com:reflex-frp/reflex-dom-contrib.git
4−[submodule "deps/try-reflex"]
5− path = deps/try-reflex
6− url = git@github.com:ryantrinkle/try-reflex.git
74[submodule "deps/servant"]
85 path = deps/servant
96 url = https://github.com/haskell-servant/servant.git
@@ -16,3 +13,6 @@
1613[submodule "deps/reflex"]
1714 path = deps/reflex
1815 url = https://github.com/ryantrinkle/reflex
16+[submodule "deps/reflex-platform"]
17+ path = deps/reflex-platform
18+ url = https://github.com/reflex-frp/reflex-platform.git
build.sh+1−1
@@ -1,3 +1,3 @@
11#!/bin/sh
22
3−deps/try-reflex/work-on ./overrides.nix ./. --run "cabal configure --ghcjs ; cabal build"
3+deps/reflex-platform/work-on ./overrides.nix ./. --run "cabal configure --ghcjs ; cabal build"
deps/reflex-platformnew file+1

Submodule changed.

deps/try-reflexdeleted−1

Submodule changed.

exec/API.hs+25
@@ -15,3 +15,28 @@ type API = "getunit" :> Get '[JSON] ()
1515 :<|> "double" :> ReqBody '[JSON] Double
1616 :> Post '[JSON] Double
1717 :<|> Raw
18+
19+type GET = Get '[JSON] ()
20+
21+-- Imported the comprehensive API example for testing.
22+-- https://github.com/haskell-servant/servant/blob/master/servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs
23+type ComprehensiveAPI =
24+ GET :<|>
25+ Get '[JSON] Int :<|>
26+ Capture "foo" Int :> GET :<|>
27+ Header "foo" Int :> GET :<|>
28+ HttpVersion :> GET :<|>
29+ IsSecure :> GET :<|>
30+ QueryParam "foo" Int :> GET :<|>
31+ QueryParams "foo" Int :> GET :<|>
32+ QueryFlag "foo" :> GET :<|>
33+-- Raw :<|>
34+ RemoteHost :> GET :<|>
35+ ReqBody '[JSON] Int :> GET :<|>
36+ Get '[JSON] (Headers '[Header "foo" Int] ()) :<|>
37+ "foo" :> GET :<|>
38+ Vault :> GET :<|>
39+ Verb 'POST 204 '[JSON] () :<|>
40+ Verb 'POST 204 '[JSON] Int
41+-- This one isn't in scope
42+-- :<|> WithNamedContext "foo" '[] GET
overrides.nix+4−5
@@ -1,11 +1,10 @@
1−{ try-reflex, ... }:
1+{ reflex-platform, ... }:
22let
33 pkgs = import <nixpkgs> {};
4− try-reflex = import deps/try-reflex {};
5−in try-reflex.ghcjs.override {
4+ reflex-platform = import deps/reflex-platform {};
5+in reflex-platform.ghcjs.override {
66 overrides = self: super: {
7− self.lens = pkgs.haskell.lib.dontCheck (self.lens);
87 reflex-dom-contrib = pkgs.haskell.lib.dontCheck (self.callPackage deps/reflex-dom-contrib {});
9− servant = self.callPackage (try-reflex.cabal2nixResult deps/servant/servant) {};
8+ servant = self.callPackage (reflex-platform.cabal2nixResult deps/servant/servant) {};
109 };
1110}
shell.sh+1−1
@@ -1,3 +1,3 @@
11#!/bin/sh
22
3−deps/try-reflex/work-on ./overrides.nix ./.
3+deps/reflex-platform/work-on ./overrides.nix ./.
testserver/Main.hs+1−1
@@ -65,7 +65,7 @@ test = serve testApi server
6565initApp :: SnapletInit App App
6666initApp = makeSnaplet "myapp" "example" Nothing $ do
6767 addRoutes [("", applicationToSnap test)
68−-- ,("", serveDirectory "static")
68+ ,("", serveDirectory "static")
6969 ]
7070 return App
7171