diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-21 16:14:26 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-21 16:14:26 +0200 |
commit | d3f6fdc3ea71386c2b9a9cd5a686455dbee3e60e (patch) | |
tree | b62e4748b8e058a5ab4122accf6b33e15bdd9b49 /edit-lens/src/Control/FST.lhs | |
parent | eb599b2394e62842423cc0bbee2432a9cae95f4b (diff) | |
download | incremental-dfsts-d3f6fdc3ea71386c2b9a9cd5a686455dbee3e60e.tar incremental-dfsts-d3f6fdc3ea71386c2b9a9cd5a686455dbee3e60e.tar.gz incremental-dfsts-d3f6fdc3ea71386c2b9a9cd5a686455dbee3e60e.tar.bz2 incremental-dfsts-d3f6fdc3ea71386c2b9a9cd5a686455dbee3e60e.tar.xz incremental-dfsts-d3f6fdc3ea71386c2b9a9cd5a686455dbee3e60e.zip |
Introduce FSTs & Generalize input/output
`toFST` is currently invalid
Diffstat (limited to 'edit-lens/src/Control/FST.lhs')
-rw-r--r-- | edit-lens/src/Control/FST.lhs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/edit-lens/src/Control/FST.lhs b/edit-lens/src/Control/FST.lhs new file mode 100644 index 0000000..d3c8ca9 --- /dev/null +++ b/edit-lens/src/Control/FST.lhs | |||
@@ -0,0 +1,24 @@ | |||
1 | \begin{code} | ||
2 | |||
3 | {-| | ||
4 | Description: Finite state transducers with epsilon-transitions | ||
5 | -} | ||
6 | module Control.FST | ||
7 | ( FST(..) | ||
8 | ) where | ||
9 | |||
10 | import Data.Map.Strict (Map) | ||
11 | import qualified Data.Map.Strict as Map | ||
12 | |||
13 | import Data.Set (Set) | ||
14 | |||
15 | import Data.Sequence (Seq) | ||
16 | |||
17 | import Control.Lens.TH | ||
18 | |||
19 | data FST state input output = FST | ||
20 | { stInitial :: state | ||
21 | , stTransition :: Map (state, Maybe input) (Set (state, Maybe output)) | ||
22 | , stAccept :: Set state | ||
23 | } | ||
24 | \end{code} | ||