Skip to content

Commit

Permalink
Fix haddocks
Browse files Browse the repository at this point in the history
  • Loading branch information
turion committed May 13, 2024
1 parent 1991995 commit b7c3b41
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 18 deletions.
2 changes: 0 additions & 2 deletions automaton/src/Data/Automaton.hs
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,6 @@ traverseS = traverse'
traverseS_ :: (Monad m, Traversable f) => Automaton m a b -> Automaton m (f a) ()
traverseS_ automaton = traverse' automaton >>> arr (const ())

-- FIXME separate issue to generalise to something from recursion schemes?

{- | Launch arbitrarily many copies of the automaton in parallel.
* The copies of the automaton are launched on demand as the input lists grow.
Expand Down
1 change: 1 addition & 0 deletions automaton/src/Data/Automaton/Trans/Except.hs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ automaton = safely $ do
e <- try someAutomaton
once $ \input -> putStrLn $ "Whoops, something happened when receiving input " ++ show input ++ ": " ++ show e ++ ", but I'll continue now."
safe fallbackAutomaton
@
-}
safely :: (Monad m) => AutomatonExcept a b m Void -> Automaton m a b
safely = Automaton . StreamExcept.safely . getAutomatonExcept
Expand Down
2 changes: 1 addition & 1 deletion automaton/src/Data/Automaton/Trans/RWS.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{- | This module combines the wrapping and running functions for the 'Reader',
'Writer' and 'State' monad layers in a single layer.
It is based on the _strict_ 'RWS' monad 'Control.Monad.Trans.RWS.Strict',
It is based on the /strict/ 'RWS' monad 'Control.Monad.Trans.RWS.Strict',
so when combining it with other modules such as @mtl@'s, the strict version
has to be included, i.e. 'Control.Monad.RWS.Strict' instead of
'Control.Monad.RWS' or 'Control.Monad.RWS.Lazy'.
Expand Down
2 changes: 1 addition & 1 deletion automaton/src/Data/Automaton/Trans/State.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
A global state can be hidden by an automaton by making it an internal state.
This module is based on the _strict_ state monad 'Control.Monad.Trans.State.Strict',
This module is based on the /strict/ state monad 'Control.Monad.Trans.State.Strict',
so when combining it with other modules such as @mtl@'s,
the strict version has to be included, i.e. 'Control.Monad.State.Strict'
instead of 'Control.Monad.State' or 'Control.Monad.State.Lazy'.
Expand Down
2 changes: 1 addition & 1 deletion automaton/src/Data/Automaton/Trans/Writer.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{- | An 'Automaton' with a 'WriterT' layer outputs an extra monoid value on every step.
It is based on the _strict_ writer monad 'Control.Monad.Trans.Writer.Strict',
It is based on the /strict/ writer monad 'Control.Monad.Trans.Writer.Strict',
so when combining it with other modules such as @mtl@'s,
the strict version has to be included, i.e. 'Control.Monad.Writer.Strict'
instead of 'Control.Monad.Writer' or 'Control.Monad.Writer.Lazy'.
Expand Down
2 changes: 1 addition & 1 deletion automaton/src/Data/Stream.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ An stream defined thusly will typically hang and/or leak memory, trying to build
It is nevertheless possible to define streams recursively, but one needs to first identify the recursive definition of its /state type/.
Then for the greatest generality, 'fixStream' and 'fixStream'' can be used, and some special cases are covered by functions
such as 'fixA', 'parallely', 'many' and 'some'.
such as 'fixA', 'Data.Automaton.parallely', 'many' and 'some'.
-}
data StreamT m a = forall s.
StreamT
Expand Down
4 changes: 2 additions & 2 deletions automaton/src/Data/Stream/Except.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import Data.Stream.Optimized qualified as StreamOptimized

{- | A stream that can terminate with an exception.
In @automaton@, such streams mainly serve as a vehicle to bring control flow to 'AutomatonExcept'
In @automaton@, such streams mainly serve as a vehicle to bring control flow to 'Data.Automaton.Trans.Except.AutomatonExcept'
(which is based on 'StreamExcept'), and the docs there apply here as well.
'StreamExcept' is not only a 'Monad', it also has more efficient 'Selective', 'Applicative', and 'Functor' interfaces.
-}
data StreamExcept a m e
= -- | When using '>>=', this encoding needs to be used.
= -- | When using '>>=', this encoding will be used.
FinalExcept (Final (ExceptT e m) a)
| -- | This is usually the faster encoding, as it can be optimized by GHC.
InitialExcept (OptimizedStreamT (ExceptT e m) a)
Expand Down
4 changes: 2 additions & 2 deletions automaton/src/Data/Stream/Optimized.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}

{- | An optimization layer on 'Data.Stream'.
{- | An optimization layer on "Data.Stream".
Since both variants are semantically the same, not the full API of 'Data.Stream' is replicated here.
Since both variants are semantically the same, not the full API of "Data.Stream" is replicated here.
-}
module Data.Stream.Optimized where

Expand Down
4 changes: 2 additions & 2 deletions rhine/src/FRP/Rhine/ClSF/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import FRP.Rhine.Clock

-- * Clocked signal functions and behaviours

{- | A (synchronous, clocked) monadic stream function
{- | A (synchronous, clocked) automaton
with the additional side effect of being time-aware,
that is, reading the current 'TimeInfo' of the clock @cl@.
-}
Expand Down Expand Up @@ -92,7 +92,7 @@ liftClSFAndClock ::
ClSF (t m) (LiftClock m t cl) a b
liftClSFAndClock = hoistClSFAndClock lift

{- | A monadic stream function without dependency on time
{- | An automaton without dependency on time
is a 'ClSF' for any clock.
-}
timeless :: (Monad m) => Automaton m a b -> ClSF m cl a b
Expand Down
2 changes: 1 addition & 1 deletion rhine/src/FRP/Rhine/Clock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ rescaledClockToM RescaledClock {..} =
}

{- | Instead of a mere function as morphism of time domains,
we can transform one time domain into the other with a monadic stream function.
we can transform one time domain into the other with an automaton.
-}
data RescaledClockS m cl time tag = RescaledClockS
{ unscaledClockS :: cl
Expand Down
6 changes: 3 additions & 3 deletions rhine/src/FRP/Rhine/Reactimation/ClockErasure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import FRP.Rhine.Clock.Util
import FRP.Rhine.ResamplingBuffer
import FRP.Rhine.SN

{- | Run a clocked signal function as a monadic stream function,
{- | Run a clocked signal function as an automaton,
accepting the timestamps and tags as explicit inputs.
-}
eraseClockClSF ::
Expand All @@ -39,7 +39,7 @@ eraseClockClSF proxy initialTime clsf = proc (time, tag, a) -> do
runReaderS clsf -< (timeInfo, a)
{-# INLINE eraseClockClSF #-}

{- | Run a signal network as a monadic stream function.
{- | Run a signal network as an automaton.
Depending on the incoming clock,
input data may need to be provided,
Expand Down Expand Up @@ -134,7 +134,7 @@ eraseClockSN initialTime (FirstResampling sn buf) =
returnA -< (,) <$> bMaybe <*> join dMaybe
{-# INLINE eraseClockSN #-}

{- | Translate a resampling buffer into a monadic stream function.
{- | Translate a resampling buffer into an automaton.
The input decides whether the buffer is to accept input or has to produce output.
(In the latter case, only time information is provided.)
Expand Down
2 changes: 1 addition & 1 deletion rhine/src/FRP/Rhine/SN.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The type parameters are:
* 'b': The output type. Output arrives at the rate @Out cl@.
-}
data SN m cl a b where
-- | A synchronous monadic stream function is the basic building block.
-- | A synchronous automaton is the basic building block.
-- For such an 'SN', data enters and leaves the system at the same rate as it is processed.
Synchronous ::
( cl ~ In cl, cl ~ Out cl) =>
Expand Down
2 changes: 1 addition & 1 deletion rhine/src/FRP/Rhine/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ that is, the 'Rhine' is "closed",
then it is a standalone reactive program
that can be run with the function 'flow'.
Otherwise, one can start the clock and the signal network jointly as a monadic stream function,
Otherwise, one can start the clock and the signal network jointly as an automaton,
using 'eraseClock'.
-}
data Rhine m cl a b = Rhine
Expand Down

0 comments on commit b7c3b41

Please sign in to comment.