Browse Source

Reduce boilerplate, update dependencies, release 0.1.0.1

tags/v0.1.0.1^0
Peter J. Jones 2 months ago
parent
commit
ac28f0a8a4
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
4 changed files with 9 additions and 14 deletions
  1. 1
    1
      LICENSE
  2. 3
    8
      src/Main.hs
  3. 4
    4
      wschat.cabal
  4. 1
    1
      wschat.nix

+ 1
- 1
LICENSE View File

@@ -1,4 +1,4 @@
1
-Copyright (c) 2018, Peter Jones <pjones@devalot.com>
1
+Copyright (c) 2018-2019 Peter Jones <pjones@devalot.com>
2 2
 All rights reserved.
3 3
 
4 4
 Redistribution and use in source and binary forms, with or without

+ 3
- 8
src/Main.hs View File

@@ -1,3 +1,4 @@
1
+{-# LANGUAGE DeriveAnyClass    #-}
1 2
 {-# LANGUAGE DeriveGeneric     #-}
2 3
 {-# LANGUAGE OverloadedStrings #-}
3 4
 
@@ -73,20 +74,14 @@ data Message = Message
73 74
   , content :: Text
74 75
     -- ^ The content of the message.
75 76
 
76
-  } deriving Generic
77
-
78
-instance FromJSON Message
79
-instance ToJSON Message
77
+  } deriving(Generic, FromJSON, ToJSON)
80 78
 
81 79
 --------------------------------------------------------------------------------
82 80
 -- | Error messages that can be sent to clients.
83 81
 data Error = Error
84 82
   { error :: Text
85 83
     -- ^ The error message.
86
-  } deriving Generic
87
-
88
-instance FromJSON Error
89
-instance ToJSON Error
84
+  } deriving(Generic, FromJSON, ToJSON)
90 85
 
91 86
 --------------------------------------------------------------------------------
92 87
 main :: IO ()

+ 4
- 4
wschat.cabal View File

@@ -1,12 +1,12 @@
1 1
 name:           wschat
2
-version:        0.1.0.0
2
+version:        0.1.0.1
3 3
 synopsis:       Simple WebSocket chat server
4 4
 description:    Extremely simple and limited WebSocket chat server.
5 5
 license:        BSD2
6 6
 license-file:   LICENSE
7 7
 author:         Peter Jones <pjones@devalot.com>
8 8
 maintainer:     Peter Jones <pjones@devalot.com>
9
-copyright:      Copyright (c) 2018 Peter J. Jones
9
+copyright:      Copyright (c) 2018-2019 Peter J. Jones
10 10
 category:       Web
11 11
 build-type:     Simple
12 12
 cabal-version:  >=2.0
@@ -21,12 +21,12 @@ executable wschat
21 21
   ghc-options: -Wall -threaded -O2 -rtsopts "-with-rtsopts=-N"
22 22
 
23 23
   build-depends: base                  >= 4.11 && < 5
24
-               , aeson                ^>= 1.3
24
+               , aeson                 >= 1.3  && < 1.5
25 25
                , concurrent-supply    ^>= 0.1
26 26
                , directory             >= 1.3
27 27
                , filepath              >= 1.0
28 28
                , http-types           ^>= 0.12
29
-               , stm                  ^>= 2.4
29
+               , stm                   >= 2.4  && < 2.6
30 30
                , text                 ^>= 1.2
31 31
                , unordered-containers ^>= 0.2
32 32
                , wai                  ^>= 3.2

+ 1
- 1
wschat.nix View File

@@ -4,7 +4,7 @@
4 4
 }:
5 5
 mkDerivation {
6 6
   pname = "wschat";
7
-  version = "0.1.0.0";
7
+  version = "0.1.0.1";
8 8
   src = ./.;
9 9
   isLibrary = false;
10 10
   isExecutable = true;

Loading…
Cancel
Save