summaryrefslogtreecommitdiff
path: root/edit-lens/src/Control/FST.lhs
blob: d3c8ca92af93c5c7aaccbf7f0e61b3b157549468 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
\begin{code}

{-|
Description: Finite state transducers with epsilon-transitions
-}
module Control.FST
  ( FST(..)
  ) where

import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map

import Data.Set (Set)

import Data.Sequence (Seq)

import Control.Lens.TH

data FST state input output = FST
  { stInitial :: state
  , stTransition :: Map (state, Maybe input) (Set (state, Maybe output))
  , stAccept :: Set state
  }
\end{code}