-- Initial remote-monad.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/
name: remote-monad
version: 0.2
synopsis: An parametrizable Remote Monad, and parametrizable Applicative Functor
description:
An implementation of the concepts behind Remote Monads. There is support for various bundling strategies.
.
@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
.
module Main where
.
import Control.Natural (nat, (#))
import Control.Remote.Monad
import Control.Remote.Monad.Packet.Weak
.
data Command :: * where
  Say :: String -> Command
.
data Procedure :: * -> * where
  Temperature :: Procedure Int
.
say :: String -> RemoteMonad Command Procedure ()
say s = command (Say s)
.
temperature :: RemoteMonad Command Procedure Int
temperature = procedure Temperature
.
runWP :: WeakPacket Command Procedure a -> IO a
runWP (Command (Say s)) = print s
runWP (Procedure Temperature) = return 42
.
send :: RemoteMonad Command Procedure a -> IO a
send = run $ runMonad $ nat runWP
.
main = send $ do
  say "Howdy doodly do"
  say "How about a muffin?"
  t <- temperature
  say (show t ++ "F")
@
license: BSD3
license-file: LICENSE
author: Andy Gill, Justin Dawson
maintainer: andygill@ku.edu
copyright: (c) 2016 The University of Kansas
category: Control
build-type: Simple
tested-with: GHC == 7.10.3
cabal-version: >=1.10
source-repository head
type: git
location: git://github.com/ku-fpg/remote-monad
library
exposed-modules:
Control.Remote.Monad.Packet.Applicative
Control.Remote.Monad.Packet.Strong
Control.Remote.Monad.Packet.Weak
Control.Remote.Applicative
Control.Remote.Monad
other-modules:
Control.Remote.Monad.Packet.Transport
Control.Remote.Monad.Types
other-extensions: GADTs, RankNTypes, ScopedTypeVariables
build-depends: base >=4.7 && < 5
, natural-transformation >= 0.3.1 && < 0.4
, transformers >= 0.4 && < 0.6
hs-source-dirs: src
default-language: Haskell2010
test-suite remote-monad-example
type: exitcode-stdio-1.0
main-is: Main.hs
build-depends: base >= 4.7 && < 5
, natural-transformation >= 0.3.1 && < 0.4
, remote-monad == 0.2
hs-source-dirs: examples
default-language: Haskell2010
ghc-options: -Wall
test-suite remote-monad-properties
type: exitcode-stdio-1.0
main-is: Test.hs
build-depends: base >= 4.7 && < 5
, containers >= 0.1 && < 0.6
, natural-transformation >= 0.3.1 && < 0.4
, remote-monad == 0.2
, QuickCheck == 2.8.*
, quickcheck-instances >= 0.1 && < 0.4
, tasty >= 0.8 && < 0.12
, tasty-quickcheck >= 0.8 && < 0.9
hs-source-dirs: tests
default-language: Haskell2010
ghc-options: -Wall