Various
This commit is contained in:
parent
619bfaab5b
commit
1aa18db1c8
3 changed files with 82 additions and 1 deletions
39
servant-client-jsaddle/default.nix
Normal file
39
servant-client-jsaddle/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ mkDerivation, aeson, base, bytestring, case-insensitive
|
||||||
|
, containers, exceptions, hspec, hspec-discover, http-media
|
||||||
|
, http-types, jsaddle, jsaddle-dom, jsaddle-warp, monad-control
|
||||||
|
, mtl, QuickCheck, semigroupoids, servant, servant-client-core
|
||||||
|
, stdenv, string-conversions, text, transformers
|
||||||
|
, transformers-base, wai, wai-extra, warp
|
||||||
|
}:
|
||||||
|
mkDerivation {
|
||||||
|
pname = "servant-client-jsaddle";
|
||||||
|
version = "0.16";
|
||||||
|
src = ./.;
|
||||||
|
isLibrary = true;
|
||||||
|
isExecutable = true;
|
||||||
|
libraryHaskellDepends = [
|
||||||
|
base bytestring case-insensitive containers exceptions http-media
|
||||||
|
http-types jsaddle jsaddle-dom monad-control mtl semigroupoids
|
||||||
|
servant servant-client-core string-conversions text transformers
|
||||||
|
transformers-base
|
||||||
|
];
|
||||||
|
executableHaskellDepends = [
|
||||||
|
aeson base bytestring case-insensitive containers exceptions hspec
|
||||||
|
http-media http-types jsaddle jsaddle-dom jsaddle-warp
|
||||||
|
monad-control mtl QuickCheck semigroupoids servant
|
||||||
|
servant-client-core string-conversions text
|
||||||
|
transformers transformers-base wai wai-extra warp
|
||||||
|
];
|
||||||
|
executableToolDepends = [ hspec-discover ];
|
||||||
|
testHaskellDepends = [
|
||||||
|
aeson base bytestring case-insensitive containers exceptions hspec
|
||||||
|
http-media http-types jsaddle jsaddle-dom jsaddle-warp
|
||||||
|
monad-control mtl QuickCheck semigroupoids servant
|
||||||
|
servant-client-core string-conversions text
|
||||||
|
transformers transformers-base wai wai-extra warp
|
||||||
|
];
|
||||||
|
testToolDepends = [ hspec-discover ];
|
||||||
|
homepage = "http://haskell-servant.readthedocs.org/";
|
||||||
|
description = "automatic derivation of querying functions for servant webservices for jsaddle (GHCJS, GHC + WebKit, GHC + websockets, etc)";
|
||||||
|
license = stdenv.lib.licenses.bsd3;
|
||||||
|
}
|
|
@ -76,6 +76,47 @@ library
|
||||||
if impl(ghc >= 8.0)
|
if impl(ghc >= 8.0)
|
||||||
ghc-options: -Wno-redundant-constraints
|
ghc-options: -Wno-redundant-constraints
|
||||||
|
|
||||||
|
executable spec-test
|
||||||
|
type: exitcode-stdio-1.0
|
||||||
|
ghc-options: -Wall
|
||||||
|
default-language: Haskell2010
|
||||||
|
main-is: Main.hs
|
||||||
|
|
||||||
|
-- Dependencies inherited from the library. No need to specify bounds.
|
||||||
|
build-depends:
|
||||||
|
base
|
||||||
|
, aeson
|
||||||
|
, bytestring
|
||||||
|
, case-insensitive
|
||||||
|
, containers
|
||||||
|
, exceptions
|
||||||
|
, http-media
|
||||||
|
, http-types
|
||||||
|
, jsaddle
|
||||||
|
, jsaddle-warp
|
||||||
|
, jsaddle-dom
|
||||||
|
, monad-control
|
||||||
|
, mtl
|
||||||
|
, semigroupoids
|
||||||
|
, servant
|
||||||
|
, servant-client-core
|
||||||
|
, servant-client-jsaddle
|
||||||
|
, servant-server
|
||||||
|
, string-conversions
|
||||||
|
, text
|
||||||
|
, transformers
|
||||||
|
, transformers-base
|
||||||
|
, wai
|
||||||
|
, wai-extra
|
||||||
|
, warp
|
||||||
|
|
||||||
|
-- Additonal dependencies
|
||||||
|
build-depends:
|
||||||
|
hspec
|
||||||
|
, QuickCheck
|
||||||
|
|
||||||
|
build-tool-depends:
|
||||||
|
hspec-discover:hspec-discover >=2.4.4 && <2.5
|
||||||
|
|
||||||
test-suite spec
|
test-suite spec
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
|
|
|
@ -14,6 +14,7 @@ import qualified Data.ByteString as B
|
||||||
import Data.Proxy
|
import Data.Proxy
|
||||||
import Data.String
|
import Data.String
|
||||||
import Data.Word
|
import Data.Word
|
||||||
|
import Debug.Trace
|
||||||
import GHC.Generics
|
import GHC.Generics
|
||||||
import qualified JSDOM
|
import qualified JSDOM
|
||||||
import qualified JSDOM.Window as Window
|
import qualified JSDOM.Window as Window
|
||||||
|
@ -92,7 +93,7 @@ spec = do
|
||||||
, baseUrlPath = "/"
|
, baseUrlPath = "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
JW.run 3072 $ jsaddleFinally close $ do
|
JW.run portNr $ jsaddleFinally close $ do
|
||||||
liftIO $ threadDelay $ 1000 * 1000
|
liftIO $ threadDelay $ 1000 * 1000
|
||||||
-- a mix of valid utf-8 and non-utf8 bytes
|
-- a mix of valid utf-8 and non-utf8 bytes
|
||||||
let bytes = [0x01, 0xff, 0x02, 0xfe, 0x03, 0xfd, 0x00, 0x64, 0xc3, 0xbb, 0x68, 0xc3]
|
let bytes = [0x01, 0xff, 0x02, 0xfe, 0x03, 0xfd, 0x00, 0x64, 0xc3, 0xbb, 0x68, 0xc3]
|
||||||
|
|
Loading…
Reference in a new issue