File tree 1 file changed +7
-1
lines changed
stbx-core/src/Statebox/Core 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
module Statebox.Core.Execution where
2
2
3
3
import Prelude
4
- import Data.Array (index , (..))
4
+ import Data.Array (index , (..), filter )
5
5
import Data.ArrayMultiset (ArrayMultiset )
6
6
import Data.Maybe (Maybe (..))
7
7
import Data.Newtype (unwrap )
@@ -158,6 +158,12 @@ transitionIds s = transitionIdsUpToAndIncluding (GluedTransitionId $ (transition
158
158
159
159
-- ------------------------------------------------------------------------------
160
160
161
+ -- TODO add 'glued' to name?
162
+ enabledTransitionIds :: StbxObj -> Array GluedTransitionId
163
+ enabledTransitionIds s = filter (enabled s <<< unwrap) (transitionIds s)
164
+
165
+ -- ------------------------------------------------------------------------------
166
+
161
167
-- What is called 'firing' here is really static info about a glued transition.
162
168
163
169
-- TODO Is it inefficient not to cache these?
You can’t perform that action at this time.
0 commit comments