summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTonyMorris <>2019-07-14 06:22:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-07-14 06:22:00 (GMT)
commitb779b9e763149fb27af6d51eb401eda49e0b3d08 (patch)
tree9410ad432a5915e03a3cc94f1282afa0579c5d4a
parent823d3d0d878135d8f7f6897e554ed64bc5753e96 (diff)
version 0.0.100.0.10
-rw-r--r--Setup.hs2
-rw-r--r--Setup.lhs44
-rw-r--r--changelog.md5
-rw-r--r--src/Data/Aviation/Stratux/Websockets.hs2
-rw-r--r--stratux-websockets.cabal36
-rw-r--r--test/doctests.hs32
6 files changed, 13 insertions, 108 deletions
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
index 0000000..9a994af
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/Setup.lhs b/Setup.lhs
deleted file mode 100644
index 0832aa5..0000000
--- a/Setup.lhs
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env runhaskell
-\begin{code}
-{-# OPTIONS_GHC -Wall #-}
-module Main (main) where
-
-import Data.List ( nub )
-import Data.Version ( showVersion )
-import Distribution.Package ( PackageName(PackageName), PackageId, InstalledPackageId, packageVersion, packageName )
-import Distribution.PackageDescription ( PackageDescription(), TestSuite(..) )
-import Distribution.Simple ( defaultMainWithHooks, UserHooks(..), simpleUserHooks )
-import Distribution.Simple.Utils ( rewriteFile, createDirectoryIfMissingVerbose )
-import Distribution.Simple.BuildPaths ( autogenModulesDir )
-import Distribution.Simple.Setup ( BuildFlags(buildVerbosity), fromFlag )
-import Distribution.Simple.LocalBuildInfo ( withLibLBI, withTestLBI, LocalBuildInfo(), ComponentLocalBuildInfo(componentPackageDeps) )
-import Distribution.Verbosity ( Verbosity )
-import System.FilePath ( (</>) )
-
-main :: IO ()
-main = defaultMainWithHooks simpleUserHooks
- { buildHook = \pkg lbi hooks flags -> do
- generateBuildModule (fromFlag (buildVerbosity flags)) pkg lbi
- buildHook simpleUserHooks pkg lbi hooks flags
- }
-
-generateBuildModule :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO ()
-generateBuildModule verbosity pkg lbi = do
- let dir = autogenModulesDir lbi
- createDirectoryIfMissingVerbose verbosity True dir
- withLibLBI pkg lbi $ \_ libcfg -> do
- withTestLBI pkg lbi $ \suite suitecfg -> do
- rewriteFile (dir </> "Build_" ++ testName suite ++ ".hs") $ unlines
- [ "module Build_" ++ testName suite ++ " where"
- , "deps :: [String]"
- , "deps = " ++ (show $ formatdeps (testDeps libcfg suitecfg))
- ]
- where
- formatdeps = map (formatone . snd)
- formatone p = case packageName p of
- PackageName n -> n ++ "-" ++ showVersion (packageVersion p)
-
-testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [(InstalledPackageId, PackageId)]
-testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys
-
-\end{code}
diff --git a/changelog.md b/changelog.md
index 33e6256..981b4b9 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,8 @@
+0.0.9
+
+* Use aeson-1.0.
+* Add nix build.
+
0.0.8
* No significant changes.
diff --git a/src/Data/Aviation/Stratux/Websockets.hs b/src/Data/Aviation/Stratux/Websockets.hs
index 4028477..4ee8969 100644
--- a/src/Data/Aviation/Stratux/Websockets.hs
+++ b/src/Data/Aviation/Stratux/Websockets.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+
module Data.Aviation.Stratux.Websockets(
WSConnectionIO
, decodeWith
diff --git a/stratux-websockets.cabal b/stratux-websockets.cabal
index 09ccc90..91140b7 100644
--- a/stratux-websockets.cabal
+++ b/stratux-websockets.cabal
@@ -1,5 +1,5 @@
name: stratux-websockets
-version: 0.0.9
+version: 0.0.10
license: BSD3
license-file: LICENCE
author: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>
@@ -11,23 +11,20 @@ description: A library for using websockets with stratux <http://stratux.
homepage: https://github.com/tonymorris/stratux-websockets
bug-reports: https://github.com/tonymorris/stratux-websockets/issues
cabal-version: >= 1.10
-build-type: Custom
+build-type: Simple
extra-source-files: changelog.md
source-repository head
type: git
location: git@github.com:tonymorris/stratux-websockets.git
-flag small_base
- description: Choose the new, split-up base package.
-
library
default-language:
Haskell2010
build-depends:
- base < 5 && >= 4
- , stratux-types >= 0.0.9 && < 0.1
+ base >= 4 && < 6
+ , stratux-types >= 0.0.10 && < 0.1
, websockets >= 0.9 && < 1.0
, transformers >= 0.4 && < 1.0
, aeson >= 1.0 && < 1.1
@@ -46,28 +43,3 @@ library
exposed-modules:
Data.Aviation.Stratux.Websockets
-
-test-suite doctests
- type:
- exitcode-stdio-1.0
-
- main-is:
- doctests.hs
-
- default-language:
- Haskell2010
-
- build-depends:
- base < 5 && >= 3
- , doctest >= 0.9.7
- , filepath >= 1.3
- , directory >= 1.1
- , QuickCheck >= 2.0
- , template-haskell >= 2.8
-
- ghc-options:
- -Wall
- -threaded
-
- hs-source-dirs:
- test
diff --git a/test/doctests.hs b/test/doctests.hs
deleted file mode 100644
index 6f6b78c..0000000
--- a/test/doctests.hs
+++ /dev/null
@@ -1,32 +0,0 @@
-module Main where
-
-import Build_doctests (deps)
-import Control.Applicative
-import Control.Monad
-import Data.List
-import System.Directory
-import System.FilePath
-import Test.DocTest
-
-main ::
- IO ()
-main =
- getSources >>= \sources -> doctest $
- "-isrc"
- : "-idist/build/autogen"
- : "-optP-include"
- : "-optPdist/build/autogen/cabal_macros.h"
- : "-hide-all-packages"
- : map ("-package="++) deps ++ sources
-
-getSources :: IO [FilePath]
-getSources = filter (isSuffixOf ".hs") <$> go "src"
- where
- go dir = do
- (dirs, files) <- getFilesAndDirectories dir
- (files ++) . concat <$> mapM go dirs
-
-getFilesAndDirectories :: FilePath -> IO ([FilePath], [FilePath])
-getFilesAndDirectories dir = do
- c <- map (dir </>) . filter (`notElem` ["..", "."]) <$> getDirectoryContents dir
- (,) <$> filterM doesDirectoryExist c <*> filterM doesFileExist c