homepage: https://github.com/patrickt/fused-effects-th
changelog-type: markdown
hash: dedf58426c7dd8e20848ee8e2b03c800b33999bd46aee925ec74c0a9a5a364b9
test-bench-deps:
  base: '>=4.9 && <4.15'
  tasty-hunit: '>=0.10'
  fused-effects: ^>=1.1
  tasty: ^>=1.3
  template-haskell: '>=2.12 && <2.17'
  fused-effects-th: -any
maintainer: Patrick Thomson <patrickt@github.com>
synopsis: Template Haskell helpers for fused-effects.
changelog: |
  # Changelog

  `fused-effects-th` uses [PVP Versioning][1].
  The changelog is available [on GitHub][2].

  ## 0.0.0.0

  * Initially created.

  [1]: https://pvp.haskell.org
  [2]: https://github.com/patrickt/fused-effects-th/releases
basic-deps:
  base: '>=4.9 && <4.15'
  fused-effects: ^>=1.1
  template-haskell: '>=2.12 && <2.17'
all-versions:
- 0.1.0.0
author: Patrick Thomson
latest: 0.1.0.0
description-type: markdown
description: |
  # fused-effects-th

  [![GitHub CI](https://github.com/fused-effects/fused-effects-th/workflows/CI/badge.svg)](https://github.com/fused-effects/fused-effects-th/actions)
  [![Hackage](https://img.shields.io/hackage/v/fused-effects-th.svg?logo=haskell)](https://hackage.haskell.org/package/fused-effects-th)
  [![BSD-3-Clause license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](LICENSE)

  This package provides Template Haskell helpers for fused-effects. The `makeSmartConstructors` splice, given the name of a GADT defining an effect, iterates through the possible constructors and generates functions that construct effects using `send`. That is to say, given the standard `State` type:

  ``` haskell
  data State s m k where
    Get :: State s m s
    Put :: s -> State s m ()
  ```

  calling `makeSmartConstructors ''State` generates the following code (cleaned up a little from the native Template Haskell output):

  ``` haskell
  get ::
    forall s sig m
    Has (State s) sig m =>
    m s
  get = send Get
  {-# INLINEABLE get #-}
   put ::
    forall s sig m.
    Has (State s) sig m =>
    s ->
    m ()
  put a = send (Put a)
  {-# INLINEABLE put #-}
  ```

  Bug reports are welcome on the [issue tracker](https://github.com/fused-effects/fused-effects-th/issues).
license-name: BSD-3-Clause

Update from Hackage at 2020-07-19T16:49:24Z
Update from Hackage at 2020-07-19T16:49:24Z
