-
Notifications
You must be signed in to change notification settings - Fork 22
Extend automaton #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Extend automaton #381
Conversation
2a0fe0f to
4314a9e
Compare
| {-# LANGUAGE DeriveFunctor #-} | ||
| {-# LANGUAGE DerivingVia #-} | ||
|
|
||
| module Data.Automaton.Filter where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haddock some motivation
|
|
||
| -- FIXME some basic unit tests | ||
|
|
||
| newtype FilterAutomaton m f a b = FilterAutomaton {getFilterAutomaton :: Automaton m a (f b)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haddock typical example types for f like lists, nonempty lists, Maybe, trees
ad571a9 to
71111a0
Compare
ec91d9b to
9cbd803
Compare
| @f@ can also be a type that allows multiple positions, such as a list. | ||
| -} | ||
| newtype FilterAutomaton m f a b = FilterAutomaton | ||
| { getFilterAutomaton :: Automaton m a (f b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Semialign and Align instances
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And Witherable?
9cbd803 to
2c0a2d5
Compare
2c0a2d5 to
149cf4e
Compare
149cf4e to
7df54f6
Compare
| {-# LANGUAGE DeriveFunctor #-} | ||
| {-# LANGUAGE DerivingVia #-} | ||
|
|
||
| module Data.Automaton.Filter where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I should implement this for Stream first, and then pull through to Automaton
7df54f6 to
0cc32d0
Compare
0cc32d0 to
bfd1fab
Compare
Several extra functions that should be useful in
automaton