Browse Source

Reduce boilerplate, update dependencies, release 0.1.0.1

tags/v0.1.0.1^0
Peter J. Jones 4 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 @@
Copyright (c) 2018, Peter Jones <pjones@devalot.com>
Copyright (c) 2018-2019 Peter Jones <pjones@devalot.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without

+ 3
- 8
src/Main.hs View File

@@ -1,3 +1,4 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}

@@ -73,20 +74,14 @@ data Message = Message
, content :: Text
-- ^ The content of the message.

} deriving Generic

instance FromJSON Message
instance ToJSON Message
} deriving(Generic, FromJSON, ToJSON)

--------------------------------------------------------------------------------
-- | Error messages that can be sent to clients.
data Error = Error
{ error :: Text
-- ^ The error message.
} deriving Generic

instance FromJSON Error
instance ToJSON Error
} deriving(Generic, FromJSON, ToJSON)

--------------------------------------------------------------------------------
main :: IO ()

+ 4
- 4
wschat.cabal View File

@@ -1,12 +1,12 @@
name: wschat
version: 0.1.0.0
version: 0.1.0.1
synopsis: Simple WebSocket chat server
description: Extremely simple and limited WebSocket chat server.
license: BSD2
license-file: LICENSE
author: Peter Jones <pjones@devalot.com>
maintainer: Peter Jones <pjones@devalot.com>
copyright: Copyright (c) 2018 Peter J. Jones
copyright: Copyright (c) 2018-2019 Peter J. Jones
category: Web
build-type: Simple
cabal-version: >=2.0
@@ -21,12 +21,12 @@ executable wschat
ghc-options: -Wall -threaded -O2 -rtsopts "-with-rtsopts=-N"

build-depends: base >= 4.11 && < 5
, aeson ^>= 1.3
, aeson >= 1.3 && < 1.5
, concurrent-supply ^>= 0.1
, directory >= 1.3
, filepath >= 1.0
, http-types ^>= 0.12
, stm ^>= 2.4
, stm >= 2.4 && < 2.6
, text ^>= 1.2
, unordered-containers ^>= 0.2
, wai ^>= 3.2

+ 1
- 1
wschat.nix View File

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

Loading…
Cancel
Save