AsyncRattus 0.2.0.1 → 0.2.0.2
raw patch · 4 files changed
+22/−5 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- AsyncRattus.cabal +1/−1
- CHANGELOG.md +7/−0
- src/AsyncRattus/Plugin/Utils.hs +5/−2
- src/AsyncRattus/Signal.hs +9/−2
AsyncRattus.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: AsyncRattus-version: 0.2.0.1+version: 0.2.0.2 category: FRP synopsis: An asynchronous modal FRP language description:
CHANGELOG.md view
@@ -1,3 +1,10 @@+# 0.2.0.2++- Fix strictness/stable checker: It now recognises `Word8/16/32/64` and+ `Int8/16/32/64` as strict and stable.+- Fix documentation for signal combinators `trigger` and+ `triggerAwait`.+ # 0.2.0.1 Fix bug in elaboration of delay, adv, select
src/AsyncRattus/Plugin/Utils.hs view
@@ -175,8 +175,11 @@ isRattModule :: FastString -> Bool isRattModule = (`Set.member` rattModules) +ghcModules :: Set FastString+ghcModules = Set.fromList ["GHC.Types","GHC.Word","GHC.Int"]+ isGhcModule :: FastString -> Bool-isGhcModule = (== "GHC.Types")+isGhcModule = (`Set.member` ghcModules) getNameModule :: NamedThing a => a -> Maybe (FastString, FastString) getNameModule v = do@@ -187,7 +190,7 @@ -- | The set of stable built-in types. ghcStableTypes :: Set FastString-ghcStableTypes = Set.fromList ["Word","Int","Bool","Float","Double","Char", "IO"]+ghcStableTypes = Set.fromList ["Word", "Word8", "Word16","Word32", "Word64","Int","Int8","Int16","Int32","Int64","Bool","Float","Double","Char", "IO"] isGhcStableType :: FastString -> Bool isGhcStableType = (`Set.member` ghcStableTypes)
src/AsyncRattus/Signal.hs view
@@ -120,8 +120,8 @@ -- -- Example: ----- > xs: 1 2 3 2--- > ys: 1 0 5 2+-- > xs: 1 0 5 2+-- > ys: 1 2 3 2 -- > -- > zipWith (box (+)) xs ys: 2 3 4 3 8 4 -- > trigger (box (+)) xy ys: 2 3 8 4@@ -131,6 +131,13 @@ return (box (unbox f a b ::: unbox s)) -- | This function is similar to 'trigger' but takes a delayed signal -- (type @O (Sig a)@) as an argument instead of a signal (@Sig a@).+--+-- Example:+--+-- > xs: 1 0 5 2+-- > ys: 1 2 3 2+-- >+-- > trigger (box (+)) xy ys: 2 3 8 4 triggerAwait :: Stable b => Box (a -> b -> c) -> O (Sig a) -> Sig b -> IO (Box (O (Sig c))) triggerAwait f as bs = mkBoxSig <$> mkInput (box SigMaybe `mapO` (trig f as bs)) where trig :: Stable b => Box (a -> b -> c) -> O (Sig a) -> Sig b -> O (Sig (Maybe' c))