
  where
    res = runEpsilonNFA enfa $ L.map (\x -> (D.Input x)) is
    accept' Nothing = False
    accept' (Just f) = L.any (\s -> elem s (f^.goalState)) (f^.currState)

{-
- Convert Epsilon-NFA -> DFA
-}

type ENFARule a b = Rule a b
type DFARule a b = D.Rule (Set a) b
genDFARule'
accept :: (Eq a) => EpsilonNFA a b -> [b] -> Bool
accept enfa is = accept' res
  where
    res = runEpsilonNFA enfa $ L.map (\x -> (D.Input x)) is
    accept' Nothing = False
    accept' (Just f) = L.any (\s -> elem s (f^.goalState)) (f^.currState)

{-
- Convert Epsilon-NFA -> DFA
-}
accept enfa is = accept' res
  where
    res = runEpsilonNFA enfa $ L.map (\x -> (D.Input x)) is
    accept' Nothing = False
    accept' (Just f) = L.any (\s -> elem s (f^.goalState)) (f^.currState)

{-
- Convert Epsilon-NFA -> DFA
-}