transient-haskell / transient

A full stack, reactive architecture for general purpose programming. Algebraic and monadically composable primitives for concurrency, parallelism, event handling, transactions, multithreading, Web, and distributed computing with complete de-inversion of control (No callbacks, no blocking, pure state)
MIT License
630 stars 28 forks source link

First pass of refactor #58

Closed rahulmutt closed 7 years ago

rahulmutt commented 7 years ago
  1. Changed the Transient monad to a newtype to avoid boxing overhead.

  2. Added DEBUG CPP constant and debug flag to enable usage of (!>)

    • To build with debugging enabled,
      stack build --flag transient:debug
  3. Used Record extensions to make the code clearer wherever possible.

  4. Replaced the Loggable a class with a constraint type synonym.

    • Equivalent to what's required an removes one layer of dictionary overhead.
  5. Made spacing/identation consistent as much as possible.

  6. Collected all the Transient instances in once place so that they're easier to find.

I've only done the top section of Transient.Internals. As I get more time I'll do the rest of the module as well.

harendra-kumar commented 7 years ago

Good stuff! I took a cursory look at the changes and they look good to me. @agocorona we should get the refactoring changes merged and out of the way ASAP so that they do not languish otherwise they require a lot of effort to get them back in shape.

@rahulmutt, how much more stuff do you have pending? I am experimenting with making transient work well with transformers, I would like to rebase only after you are done.

rahulmutt commented 7 years ago

@harendra-kumar I don't have any more pending. You can go ahead with your changes after this is merged.