Commit Graph

212 Commits

Author SHA1 Message Date
Allele Dev
ce81c61670
fix: GHC 7.8 and 7.10 compatibility 2016-11-25 02:21:34 -07:00
Allele Dev
0f553b2b99
release: 0.2.4.0 2016-11-24 23:46:19 -07:00
Allele Dev
3b6172714d Merge branch 'master' into 'master'
Miscellany

I can split these commits out into separate merge requests if you'd prefer.

See merge request !11
2016-11-25 06:38:37 +00:00
Eric Easley
2396075525 Add runNat convenience function 2016-11-16 09:44:45 -08:00
Eric Easley
0e8a6da11a Make Union a Functor 2016-11-16 09:44:36 -08:00
Eric Easley
4e1d228ba7 Don't rely on internals in example 2016-11-16 09:11:22 -08:00
Eric Easley
4260466929 Add extract for safely extracting final element from union 2016-11-15 23:01:37 -08:00
Eric Easley
d5393e72aa Make Union visible in through an Internal module 2016-11-15 19:23:19 -08:00
Allele Dev
4db284765f Merge branch 'name-change' into 'master'
fix: deadname issue, update copyright

See merge request !10
2016-11-15 02:44:34 +00:00
Allele Dev
995e2d69bd
fix: deadname issue, update copyright 2016-11-14 19:43:47 -07:00
Allele Dev
db5e7a2c06 Merge branch 'rename-examples' into 'master'
Rename examples binary to the less generic freer-examples to avoid name collisio…

…ns when installed globally.

See merge request !9
2016-11-13 22:32:38 +00:00
Lana Black
11cfda77ae Rename examples binary to the less generic freer-examples to avoid name collisions when installed globally. 2016-11-12 12:15:42 +00:00
Allele Dev
3e2fcd3ef0 Merge branch 'topic/seven_eight' into 'master'
CPP around differences in 7.8 vs 7.10



See merge request !7
2016-09-07 08:41:59 +00:00
Allele Dev
a2914d7eef
add: GHC 8 support 2016-06-25 15:08:34 -04:00
Tim McGilchrist
a8f9b354a7 CPP around differences in 7.8 vs 7.10 2016-04-21 11:05:08 +10:00
Allele Dev
ba71d26a16 Merge branch 'topic/remove_asks' into 'master'
Remove asks from examples.



See merge request !6
2016-04-21 00:50:24 +00:00
Tim McGilchrist
e1107cb059 Remove asks from examples. 2016-04-21 08:58:47 +10:00
Allele Dev
f332bc71b0 Merge branch 'fix-tests' into 'master'
Fix tests: Add Tests.Coroutine to cabal file

Addresses #5 

See merge request !5
2016-04-17 02:36:16 +00:00
Allele Dev
d09e9e5075
ensure Tests.Coroutine is included 2016-04-16 21:34:33 -05:00
Allele Dev
3ba79b765b
prevent stack.yaml from being checked in 2016-04-16 21:33:09 -05:00
Allele Dev
d8770d1a20
rm: stack.yaml - should be generated by user 2016-04-16 21:32:38 -05:00
Allele Dev
fe8b456f04 Merge branch 'topic/asks' into 'master'
Add asks function same as Control.Monad.Reader.



See merge request !4
2016-04-17 02:30:42 +00:00
Allele Dev
62f201e673 Merge branch 'topic/reader_examples' into 'master'
Haddock examples for Reader effects.

Simple examples that mirror those in Control.Monad.Reader.

See merge request !3
2016-04-17 02:29:51 +00:00
Tim McGilchrist
f711144f83 Add asks function same as Control.Monad.Reader. 2016-04-14 09:40:57 +10:00
Tim McGilchrist
3e24046cef Haddock examples for Reader effects. 2016-04-14 09:21:49 +10:00
Allele Dev
41d43f07ce
correct repo location 2016-04-06 15:30:00 -05:00
Allele Dev
c40cdc7e9b
Merge branch 'master' of gitlab.com:queertypes/freer 2016-04-06 15:28:17 -05:00
Allele Dev
36fb6d62bc Merge branch 'master' into 'master'
Various improvements and fixes.

* Fixed `ifte` and made the `nonDetEffTests` better.
* Fixed `runC` for the `Yield` effect.
* Added a `runM` handler for running an arbitrary monad (if it's the only effect left to handle).
* Added a `modify` function for the State effect.
* Removed the `ProxyState` type wasn't necessary in favor of `Data.Proxy`.
* Made the `Writer` effect work with arbitrary monoids instead of just lists.

See merge request !2
2016-03-07 12:00:50 +00:00
ElvishJerricco
972a747806 Merge branches 'runC', 'nonDetEff', 'writerMonoid', 'stateProxy' and 'runM' 2016-03-03 11:39:08 -05:00
ElvishJerricco
e362e9f508 Simple Coroutine test 2016-03-03 10:56:02 -05:00
ElvishJerricco
ae929c9d31 Fixed runC in Coroutine.hs 2016-03-03 10:56:02 -05:00
ElvishJerricco
b1798dc0e2 Improved nonDetEffTests with testProperty 2016-03-03 10:29:13 -05:00
ElvishJerricco
a7f7be7973 Fixed nonDetEffTests
The problem was the definition of `ifte`. It reported `el` if `th` was
`const mzero`.
2016-03-03 10:29:13 -05:00
ElvishJerricco
0846542b7d Made writer work with arbitrary Monoids, not just lists 2016-03-03 10:28:06 -05:00
ElvishJerricco
1eaf97ada5 Added modify function for State effect 2016-03-03 10:27:31 -05:00
ElvishJerricco
323bd8113f Use Data.Proxy instead of ProxyState 2016-03-03 10:25:45 -05:00
ElvishJerricco
18379332a6 Added runM for running arbitrary monads as final effects 2016-03-02 05:49:30 -05:00
Allele Dev
9ea4a4e837 add: Members, for type list effects 2016-02-25 19:59:18 -06:00
Allele Dev
a2b5208eea Merge branch 'master' into 'master'
Added Members Constraint

The Members type family (closed) takes two type-level lists, m and r,
as parameters. m contains the effect labels which should be members of
r. The resulting type is a constraint requiring that all elements of m
be members of r.

This simplifies constraints that require multiple members of the same
effect list. For example.

    ioState :: (Member IO r, Member (State Int) r) => Eff r ()

becomes

    ioState :: Members '[IO, State Int] r => Eff r ()

Furthermore, it allows apps to easily define their typical effect
constraints alongside the typical runtime effect.

    type AppEffs = '[State Int, Writer String, IO]

    type AppConstraint r = Members AppEffs r

    type RunApp = Eff AppEffs

See merge request !1
2016-02-26 00:50:42 +00:00
Will Fancher
86a8212cd8 Added Members Constraint
The Members type family (closed) takes two type-level lists, m and r,
as parameters. m contains the effect labels which should be members of
r. The resulting type is a constraint requiring that all elements of m
be members of r.

This simplifies constraints that require multiple members of the same
effect list. For example.

ioState :: (Member IO r, Member (State Int) r) => Eff r ()

becomes

ioState :: Members '[IO, State Int] r => Eff r ()

Furthermore, it allows apps to easily define their typical effect
constraints alongside the typical runtime effect.

type AppEffs = '[State Int, Writer String, IO]
type AppConstraint r = Members AppEffs r
type RunApp = Eff AppEffs
2016-02-07 06:37:45 -05:00
Allele Dev
72c19abc4f flesh out example 2016-02-01 21:47:14 +00:00
Alej Cabrera
d62a40947b release(0.2.2.2): fix Open.Union 2015-09-14 02:29:11 -05:00
Alej Cabrera
dc2be626b6 fix(Union): revert GHC.TypeLits; overlaps insts 2015-09-14 02:27:58 -05:00
Alej Cabrera
95bc74803b release(0.2.2.1): documentation 2015-09-14 02:08:03 -05:00
Alej Cabrera
b67831581f docs: fix build 2015-09-14 02:07:26 -05:00
Alej Cabrera
f77650b0c7 fix: build - Y -> Status 2015-09-14 02:02:36 -05:00
Alej Cabrera
ca9be3ed22 docs: add module level documentation 2015-09-14 02:01:22 -05:00
Alej Cabrera
e0886b0f79 Open.Union: use GHC.TypeLits.Nat 2015-09-14 00:36:58 -05:00
Alej Cabrera
826c39e17e add: bench support 2015-09-13 04:51:27 -05:00
Alej Cabrera
4342365bcf style(tests): address hlint suggestions 2015-09-13 00:17:28 -05:00