Skip to content

Commit

Permalink
Remove KBot Kind Signature
Browse files Browse the repository at this point in the history
  • Loading branch information
solomon-b committed Dec 11, 2022
1 parent 4aa9918 commit 394fade
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions chat-bots/src/Data/Chat/Bot.hs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

module Data.Chat.Bot
( -- * Bot
Bot (..),
KBot,
invmapBot,
mapMaybeBot,
pureStatelessBot,
Expand Down Expand Up @@ -41,7 +39,6 @@ import Control.Applicative (asum)
import Data.Foldable (asum)
#endif
import Data.Functor ((<&>))
import Data.Kind
import Data.Profunctor
import Data.Profunctor.Traversing
import Data.Text qualified as T
Expand All @@ -50,8 +47,6 @@ import System.FilePath

--------------------------------------------------------------------------------

type KBot = (Type -> Type) -> Type -> Type -> Type -> Type

-- | A 'Bot' maps from some input type 'i' and a state 's' to an
-- output type 'o' and a state 's'
newtype Bot m s i o = Bot {runBot :: s -> i -> ListT m (o, s)}
Expand Down
6 changes: 3 additions & 3 deletions chat-bots/src/Data/Chat/Bot/Context.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ import Data.Profunctor (second')
import Data.Text (Text)
import Data.Text qualified as Text
import Network.Matrix.Client
import Data.Kind (Type)

--------------------------------------------------------------------------------

type RoomAware :: KBot -> KBot
type RoomAware bot m s i o = bot m s (RoomID, i) (RoomID, o)
type RoomAware bot (m :: Type -> Type) s i o = bot m s (RoomID, i) (RoomID, o)

-- | Make a bot "room aware" by tensoring its input and output with a 'RoomID'.
--
Expand All @@ -51,7 +51,7 @@ mkRoomAware = second'

--------------------------------------------------------------------------------

type UserAware bot m s i o = bot m s (UserID, i) (UserID, o)
type UserAware bot (m :: Type -> Type) s i o = bot m s (UserID, i) (UserID, o)

-- | Make a bot "user aware" by tensoring its input and output with a 'UserID'.
--
Expand Down

0 comments on commit 394fade

Please sign in to comment.