ekmett / machines

Networks of composable stream transducers
Other
339 stars 46 forks source link

Adding MealyT type and associated classes, instances and functions #85

Closed sordina closed 7 years ago

sordina commented 7 years ago

Hi Machines Makers and Maintainers,

I've added a MealyM newtype to address the Mealy part of #51.

I know that there are some missing instances and specialised definitions, but I was hoping that it could provide a starting point to figure out what needed to be done before something like this could be merged into Machines. I'm happy to attempt undertaking the work to get this up to scratch. Just let me know what needs to be done!

There was talk about potentially creating a MealyT transformer, but I'm not sure how to get started on that, and if that has to happen instead of a simpler contribution like MealyM.

Let me know your thoughts.

ekmett commented 7 years ago

This really should be called MealyT.

YoEight commented 7 years ago

Please also address the following issue:

Configuring machines-0.6.1...
Building machines-0.6.1...
Preprocessing library machines-0.6.1...
src/Data/Machine/MealyM.hs:2:14:
    Unsupported extension: ApplicativeDo

Because of this, your patch doesn't build on GHC version prior to 8.0.1

Thanks for your time.

sordina commented 7 years ago

Thanks for the feedback everyone. I'll make those fixes.

YoEight commented 7 years ago

Ok so looks good to me. I think we can you can squash all your commit into one with proper description. Then I will merge it.

sordina commented 7 years ago

@YoEight Okay, I've rebased and pushed. Just waiting on the checks now.

YoEight commented 7 years ago

Thanks for your work !