to update later

This commit is contained in:
Yann Esposito (Yogsototh) 2018-12-02 18:42:36 +01:00
parent 8443a01083
commit 1a502c7c7c
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
3 changed files with 20 additions and 15 deletions

View file

@ -2,7 +2,7 @@
--
-- see: https://github.com/sol/hpack
--
-- hash: 745ba9e49439490ae68f7ebc35693766acc2a95eb17b9494150582812aa83cef
-- hash: 1045a6f370c70bdbb8d4127fd57ab0a6d22abf83a1c9ce43b2543665b731e255
name: aggreact
version: 0.1.0.0
@ -41,6 +41,8 @@ library
aeson
, base >=4.8 && <5
, cereal
, cereal-text
, cereal-time
, containers
, ixset
, protolude

View file

@ -29,6 +29,8 @@ library:
dependencies:
- aeson
- cereal
- cereal-text
- cereal-time
- containers
- ixset
- servant

View file

@ -1,4 +1,5 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
@ -25,16 +26,20 @@ module Aggreact.Comments
, Comments
) where
import Protolude hiding (get, put)
import Protolude hiding (get, put)
import Data.Aeson (FromJSON, ToJSON)
import Data.IxSet ((@=))
import qualified Data.IxSet as IxSet
import Data.Serialize (Serialize (..))
import qualified Data.Text as Text
import Data.Time (UTCTime)
import Data.Tree (Tree (..))
import Data.Typeable (Typeable)
import Data.Aeson (FromJSON, ToJSON)
import Data.Char (isAlphaNum)
import Data.Data (Data (..))
import Data.IxSet ((@=))
import qualified Data.IxSet as IxSet
import Data.Serialize (Serialize (..))
import Data.Serialize.Text ()
import qualified Data.Text as Text
import Data.Time (UTCTime)
import Data.Time.Clock.Serialize ()
import Data.Tree (Tree (..))
import Data.Typeable (Typeable)
import Versioning.Base
@ -51,7 +56,6 @@ instance ( Serialize a
put i = put (IxSet.toList i)
get = fmap IxSet.fromList get
-- * Comment
newtype Id = Id Int64 deriving (Eq,Ord,Generic)
@ -75,9 +79,6 @@ deriving instance ToJSON Content
deriving instance Serialize Content
newtype Term = Term Text deriving (Eq,Ord,Generic)
deriving instance FromJSON Term
deriving instance ToJSON Term
deriving instance Serialize Term
data Comment v =
Comment
@ -86,7 +87,7 @@ data Comment v =
, created :: UTCTime
, content :: Content
, userid :: Since V0 v UserId
} deriving (Generic)
} deriving (Generic,Typeable,Data)
deriving instance FromJSON (Comment V0)
deriving instance ToJSON (Comment V0)