Skip to content

Commit

Permalink
Merge branch 'release-0.14.7'. Refs #289.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanperez-keera committed Feb 9, 2024
2 parents ea668ec + 7b0c67d commit efa243c
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ env:

# Note: the distinction between `before_install` and `install` is not important.
before_install:
# We remove the pgdg.list file because it's there to add the postgresql
# repository, and we don't need it. Leaving it in causes problems with Ubuntu
# Bionic (the distro is no longer supported by postgresql).
- sudo rm /etc/apt/sources.list.d/pgdg.list

- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install --yes libcwiid-dev libsdl1.2-dev
Expand Down
3 changes: 3 additions & 0 deletions yampa-test/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-02-09 Ivan Perez <[email protected]>
* Version bump (0.14.7) (#289).

2023-12-07 Ivan Perez <[email protected]>
* Version bump (0.14.6) (#282).

Expand Down
4 changes: 2 additions & 2 deletions yampa-test/yampa-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cabal-version: >= 1.10
build-type: Simple

name: yampa-test
version: 0.14.6
version: 0.14.7
author: Ivan Perez
maintainer: [email protected]
homepage: http://github.com/ivanperez-keera/Yampa
Expand Down Expand Up @@ -84,7 +84,7 @@ library
base >= 4 && < 5
, normaldistribution >= 1.1.0.1 && < 1.2
, QuickCheck >= 2.12 && < 2.15
, Yampa >= 0.14.6 && < 0.15
, Yampa >= 0.14.7 && < 0.15

default-language:
Haskell2010
Expand Down
8 changes: 8 additions & 0 deletions yampa/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2024-02-09 Ivan Perez <[email protected]>
* Version bump (0.14.7) (#289).
* Remove postgresql repo before installation in CI script (#284).
* Simplify definition of FRP.Yampa.Event.joinE (#285).
* Simplify definition of FRP.Yampa.EventS.isJustEdge (#286).
* Simplify definition of FRP.Yampa.Task.isEdge (#287).
* Remove redundant imports from examples (#288).

2023-12-07 Ivan Perez <[email protected]>
* Version bump (0.14.6) (#282).
* Document HTML + WebAssembly backend in README (#34).
Expand Down
29 changes: 27 additions & 2 deletions yampa/Yampa.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cabal-version: >= 1.10
build-type: Simple

name: Yampa
version: 0.14.6
version: 0.14.7
author: Henrik Nilsson, Antony Courtney
maintainer: Ivan Perez ([email protected])
homepage: https://github.com/ivanperez-keera/Yampa/
Expand Down Expand Up @@ -72,6 +72,24 @@ flag examples
default: False
manual: True

-- WARNING: The following flag exposes Yampa's core. You should avoid using
-- this at all. The only reason to expose it is that we are using Yampa for
-- research, and many extensions require that we expose the constructors. No
-- released project should depend on this. In general, you should always
-- install Yampa with this flag disabled.
flag expose-core
description:
You can enable exposing some of Yampa's core constructs using
-fexpose-core.
.
Enabling this is an unsupported configuration, but it may be useful if you
are building an extension of Yampa for research and do not wish to fork
Yampa completely.
.
No released project should ever depend on this.
default: False
manual: True


library
exposed-modules:
Expand All @@ -95,7 +113,6 @@ library
other-modules:
-- Auxiliary (commonly used) types
FRP.Yampa.Diagnostics
FRP.Yampa.InternalCore

build-depends:
base < 6
Expand All @@ -117,6 +134,14 @@ library
build-depends:
fail == 4.9.*

if flag(expose-core)
exposed-modules:
FRP.Yampa.InternalCore
else
other-modules:
FRP.Yampa.InternalCore


test-suite hlint
type:
exitcode-stdio-1.0
Expand Down
2 changes: 0 additions & 2 deletions yampa/examples/yampa-game/MainBouncingBox.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{-# LANGUAGE Arrows #-}
import Data.IORef
import Debug.Trace
import FRP.Yampa as Yampa
import Graphics.UI.SDL as SDL

Expand Down
1 change: 0 additions & 1 deletion yampa/examples/yampa-game/MainCircleMouse.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE Arrows #-}
import Data.IORef
import Debug.Trace
import FRP.Yampa as Yampa
import Graphics.UI.SDL as SDL

Expand Down
1 change: 0 additions & 1 deletion yampa/examples/yampa-game/MainWiimote.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import Control.Monad
import Data.IORef
import Data.Maybe
import Debug.Trace
import FRP.Yampa as Yampa
import Graphics.UI.SDL as SDL
import System.CWiid
Expand Down
3 changes: 1 addition & 2 deletions yampa/src/FRP/Yampa/Event.hs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,8 @@ catEvents eas = case [ a | Event a <- eas ] of
-- Applicative-based definition:
-- joinE = liftA2 (,)
joinE :: Event a -> Event b -> Event (a, b)
joinE NoEvent _ = NoEvent
joinE _ NoEvent = NoEvent
joinE (Event l) (Event r) = Event (l, r)
joinE _ _ = NoEvent

-- | Split event carrying pairs into two events.
splitE :: Event (a, b) -> (Event a, Event b)
Expand Down
4 changes: 1 addition & 3 deletions yampa/src/FRP/Yampa/EventS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,8 @@ edgeTag a = edge >>> arr (`tag` a)
edgeJust :: SF (Maybe a) (Event a)
edgeJust = edgeBy isJustEdge (Just undefined)
where
isJustEdge Nothing Nothing = Nothing
isJustEdge Nothing ma@(Just _) = ma
isJustEdge (Just _) (Just _) = Nothing
isJustEdge (Just _) Nothing = Nothing
isJustEdge _ _ = Nothing

-- | Edge detector parameterized on the edge detection function and initial
-- state, i.e., the previous input sample. The first argument to the edge
Expand Down
6 changes: 2 additions & 4 deletions yampa/src/FRP/Yampa/Task.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@ taskToSF tk = runTask tk
"Task terminated!"))
&&& edgeBy isEdge (Left undefined))
where
isEdge (Left _) (Left _) = Nothing
isEdge (Left _) (Right c) = Just c
isEdge (Right _) (Right _) = Nothing
isEdge (Right _) (Left _) = Nothing
isEdge (Left _) (Right c) = Just c
isEdge _ _ = Nothing

-- * Functor, Applicative and Monad instance

Expand Down

0 comments on commit efa243c

Please sign in to comment.