1-- | This module defines 'PostBuild', which indicates that an action will be
2-- notified when it, and any action it's a part of, has finished executing.
4{-# LANGUAGE DataKinds #-}
5{-# LANGUAGE FlexibleInstances #-}
6{-# LANGUAGE FunctionalDependencies #-}
7{-# LANGUAGE MultiParamTypeClasses #-}
8{-# LANGUAGE ScopedTypeVariables #-}
9{-# LANGUAGE TypeFamilies #-}
10{-# LANGUAGE TypeOperators #-}
11{-# LANGUAGE UndecidableInstances #-}
12#ifdef USE_REFLEX_OPTIMIZER
13{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
15module Reflex.PostBuild.Class
21import Control.Monad.Reader
22import Control.Monad.State
23import qualified Control.Monad.State.Strict as Strict
25-- | 'PostBuild' represents an action that is notified via an 'Event' when it
26-- has finished executing. Note that the specific definition of "finished" is
27-- determined by the instance of 'PostBuild', but the intent is to allow
28-- 'Behavior's and 'Dynamic's to be safely sampled, regardless of where they
29-- were created, when the post-build 'Event' fires. The post-build 'Event' will
30-- fire exactly once for an given action.
31class (Reflex t, Monad m) => PostBuild t m | m -> t where
32 -- | Retrieve the post-build 'Event' for this action.
33 getPostBuild :: m (Event t ())
35instance PostBuild t m => PostBuild t (ReaderT r m) where
36 getPostBuild = lift getPostBuild
38instance PostBuild t m => PostBuild t (StateT s m) where
39 getPostBuild = lift getPostBuild
41instance PostBuild t m => PostBuild t (Strict.StateT s m) where
42 getPostBuild = lift getPostBuild
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