summaryrefslogtreecommitdiff
path: root/src/Erebos/Conversation/Class.hs
blob: 6a286516bdf7763b2db6f4eb33fa1231d1a2388e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Erebos.Conversation.Class (
    ConversationType(..),
) where

import Data.Text (Text)
import Data.Time.LocalTime
import Data.Typeable

import Erebos.Identity


class (Typeable conv, Typeable msg) => ConversationType conv msg | conv -> msg, msg -> conv where
    convMessageFrom :: msg -> ComposedIdentity
    convMessageTime :: msg -> ZonedTime
    convMessageText :: msg -> Maybe Text
    convMessageListSince :: Maybe conv -> conv -> [ ( msg, Bool ) ]