-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Top (typed oriented protocol) API -- -- See the online tutorial. @package top @version 0.2 module Repo.Types -- | A repository of absolute types data Repo Repo :: (AbsRef -> IO (Maybe AbsADT)) -> (AbsADT -> IO ()) -> IO () -> Repo [get] :: Repo -> AbsRef -> IO (Maybe AbsADT) [put] :: Repo -> AbsADT -> IO () [close] :: Repo -> IO () -- | Transient in-memory implementation of a repository of absolute types module Repo.Memory -- | Returns a new repository memRepo :: IO Repo -- | A persistent repository for absolute types, based on acid-state module Repo.DB newtype DBState DBState :: AbsEnv -> DBState wholeDB :: DB -> IO DBState openDB :: FilePath -> IO DB closeDB :: AcidState st -> IO () getDB :: DB -> AbsRef -> IO (Maybe AbsADT) putDB :: DB -> AbsRef -> AbsADT -> IO () instance Data.SafeCopy.SafeCopy.SafeCopy Repo.DB.DBState instance Data.SafeCopy.SafeCopy.SafeCopy a0 => Data.SafeCopy.SafeCopy.SafeCopy (ZM.Type.NonEmptyList.NonEmptyList a0) instance (Data.SafeCopy.SafeCopy.SafeCopy name0, Data.SafeCopy.SafeCopy.SafeCopy consName0, Data.SafeCopy.SafeCopy.SafeCopy ref0) => Data.SafeCopy.SafeCopy.SafeCopy (Data.Model.Types.ADT name0 consName0 ref0) instance Data.SafeCopy.SafeCopy.SafeCopy r0 => Data.SafeCopy.SafeCopy.SafeCopy (ZM.Types.ADTRef r0) instance (Data.SafeCopy.SafeCopy.SafeCopy name0, Data.SafeCopy.SafeCopy.SafeCopy ref0) => Data.SafeCopy.SafeCopy.SafeCopy (Data.Model.Types.ConTree name0 ref0) instance Data.SafeCopy.SafeCopy.SafeCopy ZM.Types.AbsRef instance Data.SafeCopy.SafeCopy.SafeCopy a0 => Data.SafeCopy.SafeCopy.SafeCopy (ZM.Types.SHAKE128_48 a0) instance Data.SafeCopy.SafeCopy.SafeCopy a0 => Data.SafeCopy.SafeCopy.SafeCopy (ZM.Types.SHA3_256_6 a0) instance Data.SafeCopy.SafeCopy.SafeCopy ZM.Types.UnicodeLetterOrNumberOrLine instance Data.SafeCopy.SafeCopy.SafeCopy ZM.Types.UnicodeLetter instance Data.SafeCopy.SafeCopy.SafeCopy ZM.Types.UnicodeSymbol instance Data.SafeCopy.SafeCopy.SafeCopy ZM.Types.Identifier instance Data.SafeCopy.SafeCopy.SafeCopy ref0 => Data.SafeCopy.SafeCopy.SafeCopy (Data.Model.Types.Type ref0) instance Data.Acid.Common.IsAcidic Repo.DB.DBState instance Data.SafeCopy.SafeCopy.SafeCopy Repo.DB.Whole instance Data.Acid.Core.Method Repo.DB.Whole instance Data.Acid.Common.QueryEvent Repo.DB.Whole instance Data.SafeCopy.SafeCopy.SafeCopy Repo.DB.Insert instance Data.Acid.Core.Method Repo.DB.Insert instance Data.Acid.Common.UpdateEvent Repo.DB.Insert instance Data.SafeCopy.SafeCopy.SafeCopy Repo.DB.GetByRef instance Data.Acid.Core.Method Repo.DB.GetByRef instance Data.Acid.Common.QueryEvent Repo.DB.GetByRef instance GHC.Show.Show Repo.DB.DBState -- | Persistent on-disk implementation of a repository of ZM types module Repo.Disk dbRepo :: FilePath -> IO Repo module Network.Top.Util -- | Strict try, deepseqs the returned value strictTry :: NFData a => IO a -> IO (Either SomeException a) -- | Similar to catch, but returns an Either result which is -- (Right a) if no exception of type e was -- raised, or (Left ex) if an exception of type -- e was raised and its value is ex. If any other type -- of exception is raised than it will be propogated up to the next -- enclosing exception handler. -- --
--   try a = catch (Right `liftM` a) (return . Left)
--   
try :: Exception e => IO a -> IO (Either e a) -- | Like try but with returned exception fixed to -- SomeException tryE :: IO a -> IO (Either SomeException a) -- | forceE == either error id forceE :: Either String c -> c -- | The SomeException type is the root of the exception type -- hierarchy. When an exception of type e is thrown, behind the -- scenes it is encapsulated in a SomeException. data SomeException :: * -- | Convert milliseconds to microseconds (μs) milliseconds :: Num a => a -> a -- | Convert seconds to microseconds (μs) seconds :: Num a => a -> a -- | Convert minutes to microseconds (μs) minutes :: Num c => c -> c -- | Run an IO op with a timeout withTimeout :: Int -> IO a -> IO (Either String a) -- | Spawn an asynchronous action in a separate thread. async :: IO a -> IO (Async a) -- | Cancel an asynchronous action by throwing the ThreadKilled -- exception to it, and waiting for the Async thread to quit. Has -- no effect if the Async has already completed. -- --
--   cancel a = throwTo (asyncThreadId a) ThreadKilled <* waitCatch a
--   
-- -- Note that cancel will not terminate until the thread the -- Async refers to has terminated. This means that cancel -- will block for as long said thread blocks when receiving an -- asynchronous exception. -- -- For example, it could block if: -- -- cancel :: Async a -> IO () -- | Suspends the current thread for a given number of microseconds (GHC -- only). -- -- There is no guarantee that the thread will be rescheduled promptly -- when the delay has expired, but the thread will never continue to run -- earlier than specified. threadDelay :: Int -> IO () -- | Lift a computation from the IO monad. liftIO :: MonadIO m => forall a. IO a -> m a -- | forever act repeats the action infinitely. forever :: Applicative f => f a -> f b -- | Conditional execution of Applicative expressions. For example, -- --
--   when debug (putStrLn "Debugging")
--   
-- -- will output the string Debugging if the Boolean value -- debug is True, and otherwise do nothing. when :: Applicative f => Bool -> f () -> f () -- | The reverse of when. unless :: Applicative f => Bool -> f () -> f () -- | Log multiple messages at DEBUG level dbg :: MonadIO m => [String] -> m () -- | Log multiple messages at WARNING level warn :: MonadIO m => [String] -> m () -- | Log multiple messages at INFO level info :: MonadIO m => [String] -> m () -- | Log multiple messages at ERROR level err :: MonadIO m => [String] -> m () -- | Log a message at DEBUG level dbgS :: String -> IO () -- | Setup the global logging level logLevel :: Priority -> IO () logLevelOut :: Priority -> Handle -> IO () -- | Convert an Either to a Maybe eitherToMaybe :: Either t a -> Maybe a -- | Utilities module Data.Pattern.Util collectErrors :: [Either String b] -> Either String [b] stringType :: Type AbsRef charType :: Type AbsRef word8Type :: Type AbsRef word16Type :: Type AbsRef word32Type :: Type AbsRef word64Type :: Type AbsRef wordType :: Type AbsRef int8Type :: Type AbsRef int16Type :: Type AbsRef int32Type :: Type AbsRef int64Type :: Type AbsRef intType :: Type AbsRef integerType :: Type AbsRef floatType :: Type AbsRef doubleType :: Type AbsRef -- | Pattern related types module Data.Pattern.Types -- | A matcher is a predicate defined over the binary representation of a -- value type Matcher = ByteString -> Bool -- | A routing protocol specified by a pattern and a type. -- -- Once a connection is established, clients: -- -- newtype ByPattern a ByPattern :: Pattern -> ByPattern a -- | A Pattern is just a list of matches, values are represented by their -- Flat binary serialisation type Pattern = [Match [Bit]] -- | Match either a flattened value of any value of a given type data Match v -- | Match the specified value MatchValue :: v -> Match v -- | Match any value of the given type (wildcard) MatchAny :: (Type AbsRef) -> Match v -- | A Bit data Bit :: * V0 :: Bit V1 :: Bit -- | Optimise a Pattern by concatenating adjacent value matches optPattern :: Pattern -> Pattern -- | Internal pattern representation type IPattern = Pat PRef -- | Pattern representation used for internal processing data Pat v -- | A constructor PCon :: String -> [Pat v] -> Pat v -- | Name of the constructor (e.g. True) [pConsName] :: Pat v -> String -- | Constructor parameters [pConsParameters] :: Pat v -> [Pat v] -- | A primitive value (for example PRef) PName :: v -> Pat v -- | Literals and variables data PRef PInt :: Integer -> PRef PRat :: Rational -> PRef PChar :: Char -> PRef PString :: String -> PRef PWild :: PRef PVar :: String -> PRef instance GHC.Show.Show Data.Pattern.Types.PRef instance GHC.Classes.Ord Data.Pattern.Types.PRef instance GHC.Classes.Eq Data.Pattern.Types.PRef instance GHC.Show.Show v => GHC.Show.Show (Data.Pattern.Types.Pat v) instance GHC.Classes.Ord v => GHC.Classes.Ord (Data.Pattern.Types.Pat v) instance GHC.Classes.Eq v => GHC.Classes.Eq (Data.Pattern.Types.Pat v) instance Data.Flat.Class.Flat (Data.Pattern.Types.ByPattern a) instance GHC.Generics.Generic (Data.Pattern.Types.ByPattern a) instance GHC.Show.Show (Data.Pattern.Types.ByPattern a) instance GHC.Classes.Ord (Data.Pattern.Types.ByPattern a) instance GHC.Classes.Eq (Data.Pattern.Types.ByPattern a) instance GHC.Base.Functor Data.Pattern.Types.Match instance Data.Flat.Class.Flat v => Data.Flat.Class.Flat (Data.Pattern.Types.Match v) instance GHC.Generics.Generic (Data.Pattern.Types.Match v) instance GHC.Classes.Ord v => GHC.Classes.Ord (Data.Pattern.Types.Match v) instance GHC.Classes.Eq v => GHC.Classes.Eq (Data.Pattern.Types.Match v) instance GHC.Show.Show v => GHC.Show.Show (Data.Pattern.Types.Match v) instance Data.Model.Class.Model a => Data.Model.Class.Model (Data.Pattern.Types.ByPattern a) instance Data.Model.Class.Model v => Data.Model.Class.Model (Data.Pattern.Types.Match v) module Network.Top.Types -- | Top's access point configuration newtype Config Config :: WebSocketAddress IP4Address -> Config [accessPoint] :: Config -> WebSocketAddress IP4Address -- | Return Top's access point IP cfgIP :: Config -> String -- | Return Top's access point Port cfgPort :: Config -> Int -- | Return Top's access point Path cfgPath :: Config -> String -- | The default value for this type. def :: Default a => a -- | A routing protocol specified by a pattern and a type. -- -- Once a connection is established, clients: -- -- newtype ByPattern a ByPattern :: Pattern -> ByPattern a -- | A routing protocol specified by a type. -- -- Once a connection is established, clients: -- -- data ByType a ByType :: ByType a -- | Return the value of the ByType router identifier for the given type byTypeRouter :: Type AbsRef -> TypedBLOB -- | A routing protocol to receive all messages. -- -- The ByAny type parameter indicates the type of the messages exchanged -- on the channel (usually:TypedBLOB). -- -- Once a connection is established, clients: -- -- data ByAny a ByAny :: ByAny a -- | Shortcut to specify byAny :: ByAny TypedBLOB -- | Echo protocol: any value sent in is returned verbatim to the sender -- (useful for testing purposes) Client can specify if received messages -- should be logged (for debugging purposes) data Echo a Echo :: Bool -> Echo a [echoDebug] :: Echo a -> Bool -- | An application that connects to a channel of type a and eventually -- returns an IO r type App a r = Connection a -> IO r -- | A typed bidirectional connection/channel data Connection a Connection :: IO a -> (a -> IO ()) -> IO () -> Connection a -- | Block read till a value is received [input] :: Connection a -> IO a -- | Block write till a value is sent [output] :: Connection a -> a -> IO () -- | Close the connection [close] :: Connection a -> IO () -- | Return a value received on the connection or Nothing if no value is -- received in the specified number of seconds -- -- NOTE: In case of timeout, the connection will be closed. inputWithTimeout :: Int -> Connection a -> IO (Maybe a) -- | An application that connects to a WebSocket channel of type a and -- eventually returns an IO r type WSApp r = App ByteString r -- | A WebSocket connection type WSConnection = Connection ByteString -- | CHATS binary identifier chatsProtocol :: ByteString -- | CHATS textual identifier chatsProtocolT :: Text type WSChannelResult = ChannelSelectionResult (WebSocketAddress IP4Address) -- | The value returned by an access point, after receiving a routing -- channel setup request. data ChannelSelectionResult addr -- | The channel has been permanently setup to the requested protocol Success :: ChannelSelectionResult addr -- | The access point is unable or unwilling to open a connection with the -- requested routing protocol Failure :: String -> ChannelSelectionResult addr [reason] :: ChannelSelectionResult addr -> String -- | User should retry with the same transport protocol at the indicated -- address RetryAt :: addr -> ChannelSelectionResult addr -- | The full address of a WebSocket endpoint data WebSocketAddress ip WebSocketAddress :: Bool -> SocketAddress ip -> String -> WebSocketAddress ip -- | True if the connection is wss (secure), False if is ws [secure] :: WebSocketAddress ip -> Bool -- | Host endpoint, example: SocketAddress (DNSAddress "quid2.net") -- (HostPort 80) [host] :: WebSocketAddress ip -> SocketAddress ip -- | Path to the WebSocket access point, example: "/ws" [path] :: WebSocketAddress ip -> String -- | The address of a network socket data SocketAddress ip SocketAddress :: HostAddress ip -> HostPort -> SocketAddress ip [socketAddress] :: SocketAddress ip -> HostAddress ip [socketPort] :: SocketAddress ip -> HostPort -- | An IP4 address data IP4Address IP4Address :: Word8 -> Word8 -> Word8 -> Word8 -> IP4Address -- | An IP6 address data IP6Address -- | A host address, either an IP or a DNS domain data HostAddress ip IPAddress :: ip -> HostAddress ip DNSAddress :: String -> HostAddress ip instance Data.Model.Class.Model Network.Top.Types.IP6Address instance Data.Flat.Class.Flat Network.Top.Types.IP6Address instance GHC.Generics.Generic Network.Top.Types.IP6Address instance GHC.Show.Show Network.Top.Types.IP6Address instance GHC.Classes.Ord Network.Top.Types.IP6Address instance GHC.Classes.Eq Network.Top.Types.IP6Address instance Data.Model.Class.Model Network.Top.Types.IP4Address instance Data.Flat.Class.Flat Network.Top.Types.IP4Address instance GHC.Generics.Generic Network.Top.Types.IP4Address instance GHC.Show.Show Network.Top.Types.IP4Address instance GHC.Classes.Ord Network.Top.Types.IP4Address instance GHC.Classes.Eq Network.Top.Types.IP4Address instance Data.Flat.Class.Flat ip => Data.Flat.Class.Flat (Network.Top.Types.WebSocketAddress ip) instance GHC.Generics.Generic (Network.Top.Types.WebSocketAddress ip) instance GHC.Show.Show ip => GHC.Show.Show (Network.Top.Types.WebSocketAddress ip) instance GHC.Classes.Ord ip => GHC.Classes.Ord (Network.Top.Types.WebSocketAddress ip) instance GHC.Classes.Eq ip => GHC.Classes.Eq (Network.Top.Types.WebSocketAddress ip) instance Data.Flat.Class.Flat ip => Data.Flat.Class.Flat (Network.Top.Types.SocketAddress ip) instance GHC.Generics.Generic (Network.Top.Types.SocketAddress ip) instance GHC.Show.Show ip => GHC.Show.Show (Network.Top.Types.SocketAddress ip) instance GHC.Classes.Ord ip => GHC.Classes.Ord (Network.Top.Types.SocketAddress ip) instance GHC.Classes.Eq ip => GHC.Classes.Eq (Network.Top.Types.SocketAddress ip) instance Data.Flat.Class.Flat ip => Data.Flat.Class.Flat (Network.Top.Types.HostAddress ip) instance GHC.Generics.Generic (Network.Top.Types.HostAddress ip) instance GHC.Show.Show ip => GHC.Show.Show (Network.Top.Types.HostAddress ip) instance GHC.Classes.Ord ip => GHC.Classes.Ord (Network.Top.Types.HostAddress ip) instance GHC.Classes.Eq ip => GHC.Classes.Eq (Network.Top.Types.HostAddress ip) instance Data.Model.Class.Model Network.Top.Types.HostPort instance Data.Flat.Class.Flat Network.Top.Types.HostPort instance GHC.Generics.Generic Network.Top.Types.HostPort instance GHC.Show.Show Network.Top.Types.HostPort instance GHC.Classes.Ord Network.Top.Types.HostPort instance GHC.Classes.Eq Network.Top.Types.HostPort instance Data.Flat.Class.Flat addr => Data.Flat.Class.Flat (Network.Top.Types.ChannelSelectionResult addr) instance GHC.Generics.Generic (Network.Top.Types.ChannelSelectionResult addr) instance GHC.Show.Show addr => GHC.Show.Show (Network.Top.Types.ChannelSelectionResult addr) instance GHC.Classes.Ord addr => GHC.Classes.Ord (Network.Top.Types.ChannelSelectionResult addr) instance GHC.Classes.Eq addr => GHC.Classes.Eq (Network.Top.Types.ChannelSelectionResult addr) instance Data.Flat.Class.Flat (Network.Top.Types.ByAny a) instance GHC.Generics.Generic (Network.Top.Types.ByAny a) instance GHC.Show.Show (Network.Top.Types.ByAny a) instance GHC.Classes.Ord (Network.Top.Types.ByAny a) instance GHC.Classes.Eq (Network.Top.Types.ByAny a) instance Data.Flat.Class.Flat (Network.Top.Types.ByType a) instance GHC.Generics.Generic (Network.Top.Types.ByType a) instance GHC.Show.Show (Network.Top.Types.ByType a) instance GHC.Classes.Ord (Network.Top.Types.ByType a) instance GHC.Classes.Eq (Network.Top.Types.ByType a) instance Data.Flat.Class.Flat (Network.Top.Types.Echo a) instance GHC.Generics.Generic (Network.Top.Types.Echo a) instance GHC.Show.Show (Network.Top.Types.Echo a) instance GHC.Classes.Ord (Network.Top.Types.Echo a) instance GHC.Classes.Eq (Network.Top.Types.Echo a) instance Language.Haskell.TH.Syntax.Lift a => Language.Haskell.TH.Syntax.Lift (Data.Pattern.Types.Pat a) instance Language.Haskell.TH.Syntax.Lift Data.Pattern.Types.PRef instance Data.Default.Class.Default Network.Top.Types.Config instance Data.Model.Class.Model a => Data.Model.Class.Model (Network.Top.Types.Echo a) instance Data.Model.Class.Model a => Data.Model.Class.Model (Network.Top.Types.ByType a) instance Data.Model.Class.Model a => Data.Model.Class.Model (Network.Top.Types.ByAny a) instance Data.Model.Class.Model a => Data.Model.Class.Model (Network.Top.Types.ChannelSelectionResult a) instance Data.Model.Class.Model ip => Data.Model.Class.Model (Network.Top.Types.WebSocketAddress ip) instance Data.Model.Class.Model ip => Data.Model.Class.Model (Network.Top.Types.SocketAddress ip) instance Data.Model.Class.Model ip => Data.Model.Class.Model (Network.Top.Types.HostAddress ip) instance Text.PrettyPrint.HughesPJClass.Pretty Network.Top.Types.IP4Address instance Text.PrettyPrint.HughesPJClass.Pretty ip => Text.PrettyPrint.HughesPJClass.Pretty (Network.Top.Types.HostAddress ip) -- | Access Top connections as Pipes module Network.Top.Pipes -- | Receive values from a typed connection, terminate when connection is -- closed pipeIn :: (Show a, MonadIO m, Flat a) => Connection a -> Producer a m () -- | Send values on a typed connection, terminate when connection is closed pipeOut :: (Show a, MonadIO m, Flat a) => Connection a -> Consumer a m () -- | Run a self-contained Effect, converting it back to the base -- monad runEffect :: Monad m => Effect m r -> m r -- | Pipe composition, analogous to the Unix pipe operator -- --
--   (>->) :: Monad m => Producer b m r -> Consumer b   m r -> Effect       m r
--   (>->) :: Monad m => Producer b m r -> Pipe     b c m r -> Producer   c m r
--   (>->) :: Monad m => Pipe   a b m r -> Consumer b   m r -> Consumer a   m r
--   (>->) :: Monad m => Pipe   a b m r -> Pipe     b c m r -> Pipe     a c m r
--   
-- -- The following diagrams show the flow of information: -- --
--      +-----------+     +-----------+                 +-------------+
--      |           |     |           |                 |             |
--      |           |     |           |                 |             |
--   a ==>    f    ==> b ==>    g    ==> c     =     a ==>  f >-> g  ==> c
--      |           |     |           |                 |             |
--      |     |     |     |     |     |                 |      |      |
--      +-----|-----+     +-----|-----+                 +------|------+
--            v                 v                              v
--            r                 r                              r
--   
-- -- For a more complete diagram including bidirectional flow, see -- Pipes.Core#pull-diagram. (>->) :: Monad m => Proxy a' a () b m r -> Proxy () b c' c m r -> Proxy a' a c' c m r infixl 7 >-> -- | Produce a value -- --
--   yield :: Monad m => a -> Pipe x a m ()
--   
yield :: Monad m => a -> Producer' a m () -- | (for p body) loops over p replacing each -- yield with body. -- --
--   for :: Monad m => Producer b m r -> (b -> Effect       m ()) -> Effect       m r
--   for :: Monad m => Producer b m r -> (b -> Producer   c m ()) -> Producer   c m r
--   for :: Monad m => Pipe   x b m r -> (b -> Consumer x   m ()) -> Consumer x   m r
--   for :: Monad m => Pipe   x b m r -> (b -> Pipe     x c m ()) -> Pipe     x c m r
--   
-- -- The following diagrams show the flow of information: -- --
--                                 .--->   b
--                                /        |
--      +-----------+            /   +-----|-----+                 +---------------+
--      |           |           /    |     v     |                 |               |
--      |           |          /     |           |                 |               |
--   x ==>    p    ==> b   ---'   x ==>   body  ==> c     =     x ==> for p body  ==> c
--      |           |                |           |                 |               |
--      |     |     |                |     |     |                 |       |       |
--      +-----|-----+                +-----|-----+                 +-------|-------+
--            v                            v                               v
--            r                            ()                              r
--   
-- -- For a more complete diagram including bidirectional flow, see -- Pipes.Core#respond-diagram. for :: Monad m => Proxy x' x b' b m a' -> (b -> Proxy x' x c' c m b') -> Proxy x' x c' c m a' -- | Consume a value -- --
--   await :: Monad m => Pipe a y m a
--   
await :: Monad m => Consumer' a m a -- | Lift a computation from the argument monad to the constructed monad. lift :: MonadTrans t => forall (m :: * -> *) a. Monad m => m a -> t m a -- | WebSockets Connection (with GHCJS native support) module Network.Top.WebSockets -- | Run a WebSockets Application, keep connection alive. -- -- Automatically close sockets on WSApp exit runWSApp :: Config -> WSApp a -> IO a -- | Run processed connected to Top module Network.Top.Run -- | Permanently connect an application to a typed channel. |Restart -- application in case of network or application failure. |NOTE: does not -- provide a way to preserve application's state runAppForever :: (Model (router a), Flat (router a), Show (router a), Flat a, Show a) => Config -> router a -> App a r -> IO r -- | Connect an application to a typed channel. runApp :: (Model (router a), Flat (router a), Show (router a), Flat a, Show a) => Config -> router a -> App a r -> IO r -- | Connect an application to a typed channel runAppWith :: Config -> TypedBLOB -> App ByteString r -> IO r -- | Permanently register and retrieve absolute type definitions module Network.Top.Repo -- | A (simplistic) protocol to permanently store and retrieve ADT -- definitions. data RepoProtocol -- | Permanently record an absolute type Record :: AbsADT -> RepoProtocol -- | Retrieve the absolute type Solve :: AbsRef -> RepoProtocol -- | Return the absolute type identified by an absolute reference Solved :: AbsRef -> AbsADT -> RepoProtocol -- | Request the list of all known data types AskDataTypes :: RepoProtocol -- | Return the list of all known data types KnownDataTypes :: [(AbsRef, AbsADT)] -> RepoProtocol -- | Permanently record an ADT definition recordType :: Model a => Config -> Proxy a -> IO () -- | Retrieve the full type model for the given absolute type from Top's -- RepoProtocol channel, using the given Repo as a cache solveType :: Repo -> Config -> AbsType -> IO (Either RepoError AbsTypeModel) -- | Retrieve all known data types knownTypes :: Config -> IO (Either String [(AbsRef, AbsADT)]) instance Data.Model.Class.Model Network.Top.Repo.RepoProtocol instance Data.Flat.Class.Flat Network.Top.Repo.RepoProtocol instance GHC.Generics.Generic Network.Top.Repo.RepoProtocol instance GHC.Show.Show Network.Top.Repo.RepoProtocol instance GHC.Classes.Ord Network.Top.Repo.RepoProtocol instance GHC.Classes.Eq Network.Top.Repo.RepoProtocol -- | Convert an Haskell pattern to the corresponding ByPattern -- channel identifier module Data.Pattern.Transform -- | Convert an Haskell pattern to the corresponding ByPattern -- channel identifier or throw an error if conversion fails byPattern :: forall a. Model a => IPattern -> ByPattern a -- | Convert an Haskell pattern to the corresponding ByPattern -- channel identifier byPattern_ :: forall a. Model a => IPattern -> Either String (ByPattern a) -- | Convert a Template Haskell pattern to a Pattern module Data.Pattern.TH -- | Template Haskell function to convert an Haskell pattern to an -- IPattern -- --
--   patternQ [p|_|] :: IO IPattern
--   PName PWild
--   
patternQ :: Quasi m => Q Pat -> m IPattern patternE :: Q Pat -> Q Exp -- | Patterns (for ByPattern channels) module Data.Pattern module Network.Top