Skip to content

Commit

Permalink
Add support for dunai 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
blackheaven committed Oct 5, 2023
1 parent 59efe9f commit 7f6a500
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 19 deletions.
42 changes: 30 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rhine-bayes/rhine-bayes.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ library
build-depends: base >= 4.11 && < 4.18
, transformers >= 0.5
, rhine == 1.0
, dunai ^>= 0.9
, dunai >= 0.9 && < 0.12
, log-domain >= 0.12
, monad-bayes >= 1.1.0
hs-source-dirs: src
Expand Down
2 changes: 1 addition & 1 deletion rhine-gloss/rhine-gloss.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ library
build-depends: base >= 4.14 && < 4.18
, transformers >= 0.5
, rhine == 1.0
, dunai ^>= 0.9
, dunai >= 0.9 && < 0.12
, gloss >= 1.12
, mmorph >= 1.1
, monad-schedule >= 0.1
Expand Down
2 changes: 1 addition & 1 deletion rhine-terminal/rhine-terminal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ library
, exceptions >= 0.10.4
, transformers >= 0.5
, rhine == 1.0
, dunai ^>= 0.9
, dunai >= 0.9 && < 0.12
, terminal >= 0.2.0.0
, time >= 1.9.3
, monad-schedule >= 0.1.2
Expand Down
5 changes: 2 additions & 3 deletions rhine/rhine.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,15 @@ library

-- Other library packages from which modules are imported.
build-depends:
, dunai ^>= 0.9
, dunai >= 0.9 && < 0.12
, transformers >= 0.5
, time >= 1.8
, free >= 5.1
, containers >= 0.5
, deepseq >= 1.4
, random >= 1.1
, MonadRandom >= 0.5
-- Remove version pin when https://github.com/ivanperez-keera/dunai/issues/298 is resolved:
, simple-affine-space == 0.1.1
, simple-affine-space ^>= 0.2.1
, time-domain
, monad-schedule >= 0.1.2

Expand Down
1 change: 1 addition & 0 deletions rhine/src/FRP/Rhine/ClSF/Core.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE Arrows #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}

{- |
Expand Down
11 changes: 10 additions & 1 deletion rhine/src/FRP/Rhine/ClSF/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Control.Monad.Trans.Reader (ask, asks)

-- dunai
import Control.Monad.Trans.MSF.Reader (readerS)
import Data.MonadicStreamFunction.Instances.Num ()
import Data.MonadicStreamFunction.Instances.VectorSpace ()

-- simple-affine-space
Expand Down Expand Up @@ -195,6 +196,7 @@ derivative = derivativeFrom zeroVector
-}
threePointDerivativeFrom ::
( Monad m
, Num s
, VectorSpace v s
, s ~ Diff td
) =>
Expand All @@ -211,6 +213,7 @@ threePointDerivativeFrom v0 = proc v -> do
-}
threePointDerivative ::
( Monad m
, Num s
, VectorSpace v s
, s ~ Diff td
) =>
Expand All @@ -229,6 +232,7 @@ threePointDerivative = threePointDerivativeFrom zeroVector
-}
weightedAverageFrom ::
( Monad m
, Fractional s
, VectorSpace v s
, s ~ Diff td
) =>
Expand Down Expand Up @@ -281,6 +285,7 @@ average = averageFrom zeroVector
-}
averageLinFrom ::
( Monad m
, Fractional s
, VectorSpace v s
, s ~ Diff td
) =>
Expand All @@ -298,6 +303,7 @@ averageLinFrom v0 t = proc v -> do
-- | Linearised version of 'average'.
averageLin ::
( Monad m
, Fractional s
, VectorSpace v s
, s ~ Diff td
) =>
Expand All @@ -322,8 +328,9 @@ lowPass = average
-- | Filters out frequencies below @1 / (2 * pi * t)@.
highPass ::
( Monad m
, VectorSpace v s
, Eq s
, Floating s
, VectorSpace v s
, s ~ Diff td
) =>
-- | The time constant @t@
Expand All @@ -334,6 +341,7 @@ highPass t = clId ^-^ lowPass t
-- | Filters out frequencies other than @1 / (2 * pi * t)@.
bandPass ::
( Monad m
, Eq s
, VectorSpace v s
, Floating s
, s ~ Diff td
Expand All @@ -346,6 +354,7 @@ bandPass t = lowPass t >>> highPass t
-- | Filters out the frequency @1 / (2 * pi * t)@.
bandStop ::
( Monad m
, Eq s
, VectorSpace v s
, Floating s
, s ~ Diff td
Expand Down
2 changes: 2 additions & 0 deletions rhine/src/FRP/Rhine/ResamplingBuffer/Interpolation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import FRP.Rhine.ResamplingBuffer.Util
-- | A simple linear interpolation based on the last calculated position and velocity.
linear ::
( Monad m
, Num s
, Clock m cl1
, Clock m cl2
, VectorSpace v s
Expand Down Expand Up @@ -90,6 +91,7 @@ sinc windowSize =
-}
cubic ::
( Monad m
, Fractional s
, VectorSpace v s
, Floating v
, Eq v
Expand Down

0 comments on commit 7f6a500

Please sign in to comment.