sessiontypes 0.1.0 → 0.1.1
raw patch · 6 files changed
+7/−9 lines, 6 files
Files
- ChangeLog +3/−0
- sessiontypes.cabal +1/−1
- src/Control/SessionTypes/Debug.hs +1/−1
- src/Control/SessionTypes/STTerm.hs +2/−2
- src/Control/SessionTypes/Types.hs +0/−1
- test/Test/Debug/Main.hs +0/−4
ChangeLog view
@@ -1,3 +1,6 @@+2017-10-11 Ferdinand van Walree 0.1.1+* Fixed Functor definition for STTerm+ 2017-09-29 Ferdinand van Walree 0.1.0 * Initial release.
sessiontypes.cabal view
@@ -1,5 +1,5 @@ name: sessiontypes-version: 0.1.0+version: 0.1.1 synopsis: Session types library description: This packages provides a deep embedded domain-specific language for writing session typed program. A session typed program is a program annotated with session types. A session type describes a communication protocol at the type-level.
src/Control/SessionTypes/Debug.hs view
@@ -192,7 +192,7 @@ O_Rec :: Output ('Cap (s ': ctx) s) b -> Output ('Cap ctx (R s)) b O_Var :: Output ('Cap (s ': ctx) s) b -> Output ('Cap (s ': ctx) V) b O_Weaken :: Output ('Cap ctx s) b -> Output ('Cap (t ': ctx) (Wk s)) b- O_Eps :: b -> Output ('Cap ctx Eps) b+ O_Eps :: b -> Output ('Cap '[] Eps) b O_Lift :: Output s b -> Output s b -- | Extracts all result values from a given `Output`
src/Control/SessionTypes/STTerm.hs view
@@ -110,8 +110,8 @@ return x = Ret x (Ret x) >>= f = f x -instance I.IxFunctor (STTerm m) where- fmap f (Send a r) = Send a (I.fmap f r)+instance Monad m => I.IxFunctor (STTerm m) where+ fmap f st = st I.>>= \a -> I.return $ f a instance Monad m => I.IxApplicative (STTerm m) where pure x = Ret x
src/Control/SessionTypes/Types.hs view
@@ -134,7 +134,6 @@ RemoveRecvST (Wk s) = Wk (RemoveRecvST s) RemoveRecvST s = s - -- | Type family for applying a constraint to types of kind `Type` in a session type. It may be applied to a capability. type family HasConstraint (c :: Type -> Constraint) s :: Constraint where HasConstraint c ('Cap ctx s) = (HasConstraintST c s, MapHasConstraint c ctx)
test/Test/Debug/Main.hs view
@@ -73,7 +73,3 @@ s `shouldBe` (O_Rec $ O_Sel1 $ O_Send "text.txt" $ O_Recv (Right "hello") $ O_Var $ O_Sel1 $ O_Send "doesnotexist.txt" $ O_Recv (Left "File does not exist") $ O_Lift $ O_Var $ O_Sel2 $ O_Sel1 $ O_Weaken $ O_Eps ["hello"])- - --