Commit Graph

85 Commits

Author SHA1 Message Date
Peter Trsko
766e4e03ab Enhanced docs, and applied coding style to Reader 2017-02-02 20:10:29 +01:00
Peter Trsko
eb9ec89ec7 Making HLint happy
Partly addresses #6
2017-02-02 20:10:29 +01:00
Peter Trsko
a9867e270a Disable HLint on Travis by passing -f-test-hlint to cabal
Problem is with `haskell-src-exts` package, which refuses to be
installed. This will need to be addressed later, but it's not a critical
issue.
2017-02-02 20:07:33 +01:00
Peter Trsko
6b1fb624e5 Run HLint as a test-suite
Addresses #5
2017-02-02 20:07:32 +01:00
Peter Trsko
9d464986d1 Do cabal check only with newer cabal-install 2017-02-02 20:07:32 +01:00
Peter Trsko
252c183469 Renaming to freer-effects; updating copyright and package description
Addresses #4
2017-02-02 20:06:51 +01:00
Tomas Janousek
52340b7e56 Update changelog 2017-01-29 11:20:16 +01:00
Peter Trško
c5d13db140 Using NoImplicitPrelude in State module
This should help us resolve issues with various versions of base
packages more easily.

Reason for doing it now is that base bundled with GHC 7.8.4 doesn't
export (<$>) in Prelude.
2017-01-29 10:56:46 +01:00
Peter Trško
ba69fc856d Merge pull request #1 from IxpertaSolutions/evalstate-execstate
Added evalState and execState
2017-01-29 10:44:28 +01:00
Tomas Janousek
0555539cd0 Rearrange imports in bench/Core.hs 2017-01-28 15:42:44 +01:00
Tomas Janousek
85d6c14b03 Use MIN_VERSION_package macros instead of __GLASGOW_HASKELL__
It maybe sort of works for base but for mtl it's downright wrong.
2017-01-28 15:42:44 +01:00
Tomas Janousek
ec219be680 Speed up benchmark 2017-01-28 15:42:44 +01:00
Tomas Janousek
d160c85ea5 Fix build failure in bench/Core.hs 2017-01-28 15:42:44 +01:00
Tomas Janousek
dd943e6ae0 Fix GHC 7.8 and 7.10 compatibility again 2017-01-28 15:11:37 +01:00
Tomas Janousek
bf588dcd06 Add README badges 2017-01-28 14:44:50 +01:00
Tomas Janousek
019a7467d9 Add .travis.yml 2017-01-28 14:38:55 +01:00
Tomas Janousek
ed556f85ad Fix randomly failing "Multiple readers work" test
Comparing floating points using (==) is a bad idea. I don't see how this
could possible have ever worked. :-/
2017-01-28 12:57:31 +01:00
Tomas Janousek
958dbe0262 Expose data constructors of all included effects
I've seen people use unsafeCoerce to write their own interpreter for the
State effect. Ugh. :-)

d27099c8ee/src/Control/Monad/Freer/State/Extra.hs (L95)
2017-01-28 12:37:50 +01:00
Tomas Janousek
82734c04dd Add runNatS convenience function
`runNatS` is to `runNat` as `handleRelayS` is to `handleRelay`.
2017-01-28 12:14:50 +01:00
Tomas Janousek
84022b9103 Match coding style of runNat with the rest of the codebase
This is really minor but the next commit adds a `runNatS` function that
would require a 5-var forall and that's starting to be really confusing,
making people think why it's there.
2017-01-28 12:14:17 +01:00
Tomas Janousek
8060429c52 Fix "Could not deduce: effs ~ (r : rs)" errors
Commit 4260466929 added the "r has at
least two elements" constraint to the `Member' t r ('S n)` instance but
`Member t effs` with a general (unknown) effs isn't enough to deduce
that effs is non-empty, so this doesn't typecheck:

    f :: Eff (IO ': effs) () -> Eff effs ()
    f = undefined

    g :: (Member Maybe effs) => Eff effs ()
    g = undefined

    h :: (Member Maybe effs) => Eff effs ()
    h = f g

GHC complains that it could not deduce: `effs ~ (r : rs)` arising from
the use of `g`. It can be worked around by using this instead:

    h :: (Member Maybe (e ': es)) => Eff (e ': es) ()
    h = f g

but I don't think this is a good user experience, and it's a regression
from 0.2.3.0 that would normally require a major version bump to 0.3 as
it breaks existing code. Therefore a fix should go in quickly and should
get into lts-7 asap.

This commit adds the "effs is non-empty" constraint to `Member t effs`
so the above typechecks again.
2017-01-28 12:12:24 +01:00
Tomas Janousek
674dd1b5ec README/changelog/cabal cleanup 2017-01-28 12:11:58 +01:00
Sam Quinn
f0045d9d6c Added evalState and execState 2017-01-21 10:36:50 -06:00
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