Matej Kollar
f21080d0ca
Over-engineering?
2017-03-03 17:13:40 +01:00
Matej Kollar
ce1e579100
Rename Teletype in examples to Console
2017-03-03 16:23:51 +01:00
Matej Kollar
c3548460a2
Update Main example
...
Also make Teletype example more useful
(= show how to make evaluators more composable).
2017-03-03 16:05:52 +01:00
Matej Kollar
fd1d406dbe
Capitalization effect example
...
Purpose of this effect is to create very simple example that would
be easy to compose in a very obvious way.
2017-03-03 16:05:52 +01:00
Tomas Janousek
2affe8b612
Fix HLint suggestions
2017-03-02 21:40:27 +01:00
Tomas Janousek
d72412caac
Enable HLint on Travis
2017-03-02 21:40:27 +01:00
Tomas Janousek
13a2adfb67
Use NoImplicitPrelude to avoid some CPP in bench/Core.hs
2017-03-02 21:40:27 +01:00
Tomas Janousek
810a137ac4
Drop duplicate changelog entry
2017-03-02 21:31:22 +01:00
Peter Trško
9767126b88
Correct link name pointing to Eff1.hs
2017-03-02 20:23:38 +01:00
Matej Kollar
adb48d5921
Issue #11 Separate and rename NonDetEff
2017-02-17 16:19:24 +01:00
Peter Trsko
e210f8dad3
Portability: GHC specific language extensions.
...
Resolves #12
2017-02-12 12:34:31 +01:00
Peter Trško
3ba9638021
Corrected links to badges (cont.)
...
Some links weren't updated in previous commit.
2017-02-12 00:35:26 +01:00
Peter Trško
8a990fe40c
Correcting value of allow_failures
2017-02-12 00:17:59 +01:00
Peter Trško
ae3d347f3a
Bumped version to 0.3.0.0
...
Addresses #9
2017-02-12 00:08:31 +01:00
Peter Trško
0aa0dac642
Turning on -fwarn-{implicit-prelude,missing-import-lists}
...
There is a small potential for a breaking change, since Data.OpenUnion
no longer re-exports Functor class. Anyway, what was that about?
2017-02-12 00:04:44 +01:00
Peter Trško
721cb9c834
Noting that this package works on GHC 8.0.2
2017-02-12 00:01:32 +01:00
Peter Trško
1e3a4621f8
Corrected links to GitHub repository
2017-02-12 00:01:00 +01:00
Peter Trško
749b6160dc
Build on GHC 8.0.2 and head
2017-02-11 23:38:54 +01:00
Peter Trško
5bdf49c676
Corrected links to badges
...
Some of the links are invalid at the moment, since we aren't on Hackage,
yet.
2017-02-11 23:20:57 +01:00
Peter Trško
36bb813d4d
Benchmark of one MTL.State.get for comparison
2017-02-11 08:55:34 +01:00
Peter Trško
a872d81981
Coding style and documentation for runNat{,S}
2017-02-11 08:55:34 +01:00
Tomas Janousek
5eaff723a0
Fix gitlab refs in changelog
...
gitlab really does have separate number series for merge requests and
issues.
2017-02-06 12:28:32 +01:00
Peter Trško
3652b210e7
Renamed modules Data.Open.Union.*
to Data.OpenUnion.*
...
Each hierarchical part of module name should be significant, in its own
right. In case of Data.Open.Union the Open part doesn't make much sense
on its own.
Resolves #8
2017-02-02 21:31:24 +01:00
Peter Trško
cc20303e0e
Updated changelog regarding #4 and #7
2017-02-02 20:53:37 +01:00
Peter Trško
92d2a90a05
Coding style
2017-02-02 20:27:30 +01:00
Peter Trsko
4769e9f50b
Using NoImplicitPrelude language extension
...
This allows us to reduce CPP usage to actuall differences between
versions of libraries.
Addresses #6
2017-02-02 20:27:30 +01:00
Peter Trsko
751199afa9
Code cleanup; coding style
2017-02-02 20:27:30 +01:00
Peter Trsko
4ce0bfb6be
Generated .gitignore using GitHub snippets
2017-02-02 20:27:30 +01:00
Peter Trsko
7c1c7437e9
Relaxed type signature of asks function
...
It's previous type signature:
asks :: (e -> a) -> Eff '[Reader e] a
Was very restrictive, therefore, its usage was limited to very few
effect stacks. New type signature:
asks :: Member (Reader e) effs => (e -> a) -> Eff effs a
Is much more liberal, and allows us to use `asks` in all the places we
would have to use something like `f <$> ask`.
Resolves #7
2017-02-02 20:13:27 +01:00
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