2-- Module : Streamly.Internal.Data.Stream.Step
3-- Copyright : (c) 2018 Composewell Technologies
4-- License : BSD-3-Clause
5-- Maintainer : streamly@composewell.com
6-- Stability : experimental
9module Streamly.Internal.Data.Stream.Step
16import Fusion.Plugin.Types (Fuse(..))
18-- | A stream is a succession of 'Step's. A 'Yield' produces a single value and
19-- the next state of the stream. 'Stop' indicates there are no more values in
21{-# ANN type Step Fuse #-}
22data Step s a = Yield a s | Skip s | Stop
24instance Functor (Step s) where
26 fmap f (Yield x s) = Yield (f x) s
27 fmap _ (Skip s) = Skip s
31fromPure :: Monad m => a -> s -> m (Step s a)
32fromPure a = return . Yield a
34skip :: Monad m => s -> m (Step s a)
37stop :: Monad m => m (Step s a)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list