Commit Graph

101 Commits

Author SHA1 Message Date
Sandy Maguire
e1a500f02b Release polysemy-1.2.2.0 2019-10-22 19:40:43 +02:00
Sandy Maguire
ac6d7b3121 Release polysemy-1.2.1.0 2019-09-15 21:42:33 +02:00
Sandy Maguire
825dfd6859 Release polysemy-1.2.0.1 2019-09-15 21:40:31 +02:00
KingoftheHomeless
4a5f2ce92a
Add Final Effect (#217)
* Add Final Effect

* Changes per review, Final at top-level, doc changes

* Update Changelog

* Final touches to Final

* Revert change to stack.yaml
2019-08-30 22:38:53 +02:00
Sandy Maguire
83084f7eda Release polysemy 1.1.0.0 2019-08-15 14:30:06 -07:00
KingoftheHomeless
d7d3d4bb4f Add AtomicState and atomic interpreters for Output/Writer (#206)
* Add AtomicState and atomic interpreters for Output/Writer

* Fixed a word in docs, moved test functions around

* Remove runWriterIORef and runWriterTVar
2019-08-15 14:23:06 -07:00
KingoftheHomeless
26a6d2e474 Add Fail effect (#199)
* Add Fail effect

* Add inlining to Fail interpreters, make Fail newtype

* Hide visibility of Polysemy.Fixpoint.bomb, fix changelog

* Revert "Hide visibility of Polysemy.Fixpoint.bomb, fix changelog"

This reverts commit 5b043ed215.

* Move Polysemy.Internal.Fail to Polysemy.Fail.Type. Fixed inconsistency in docs
2019-08-06 09:07:54 -04:00
KingoftheHomeless
4dc09e719b Improve semantics of Fixpoint (#187)
* Improve semantics of Fixpoint

* Add tests for Fixpoint, update docs

* Made the error test more rigorous

* Added references in the docs for 'runFixpoint'
2019-07-27 16:11:11 -04:00
Sandy Maguire
f2ca91d57d Release polysemy-1.0.0.0 2019-07-24 10:45:42 -04:00
Dmitrii Kovanikov
011530bba1 [#180] Use type-errors-pretty package (#182)
Resolves #180
2019-07-20 08:48:42 -04:00
Georgi Lyubenov
48b6768ad4 Rename Lift to Embed (#161)
* Move Polysemy.Internal.Lift to Polysemy.Lift.Type

* Add Polysemy.Lift module and runLift interpreter

* Add a Sandy reminder

* Add explicit foralls and split type signature

* Fix import spacing, for there is no "qualified"

* Implement runIO in terms of runLift

* Rename Lift -> Embed

* Replace sendM with embed

* Add a Sandy todo for embed version

* Rename runEmbed and related runEmbedded (from IO)

* runEmbedded -> runEmbeddedInIO
* runEmbed -> runEmbedded

* Update cabal
2019-07-11 11:02:26 -04:00
Sandy Maguire
f93e6d9111 Release polysemy-0.7.0.0 2019-07-08 10:19:25 -04:00
KingoftheHomeless
0d22cdaba0 Add Pass to Writer, replacing Censor. Fix semantics of listen (#169)
* Added Pass to Writer, replacing Censor. Fixed semantics of listen

* Swap order of elements in the Pass tuple

* Sometimes I'm bad! Fixed compile error.
2019-07-08 09:59:33 -04:00
Sandy Maguire
faaf1e3a96
Don't use Loopbreaker until GHC 8.7+ (#164)
Turns out haddocks have been broken forever, but because of haskell/cabal#5977 we never noticed. This PR fixes CI so it breaks (see 6f915b6), and then fixes it by changing the GHC versions under which we're allowed to use loopbreaker. Fixes #160
2019-07-07 11:27:18 -04:00
Sandy Maguire
082ed39e85 Release polysemy-0.6.0.0 2019-07-04 22:05:51 -04:00
Sandy Maguire
9e586eaeab
Redefine Type.Errors directly in polysemy (#153)
Fixes #152
2019-07-04 16:09:36 -04:00
Sandy Maguire
482de98afe
Use type-errors for our type errors! (#144)
This PR has farmed out the type error machinery out to my new package https://github.com/isovector/type-errors. It's much nicer to work with, and a big red diff!
2019-07-03 16:05:51 -04:00
TheMatten
8bbd9dc7d6 Use new, separate loopbreaker library for inlining (#145)
* Remove explicit loopbreakers, enable plugin

* Use uploaded version of `loopbreaker`

* Fix span of macro

* Disable plugin on GHC <8.6

* Add comment about use of plugin

* Separate unrelated conditions
2019-07-01 02:13:37 -04:00
Sandy Maguire
8bd297fe49 Release polysemy 0.5.1.0 2019-06-28 16:19:33 -04:00
Sandy Maguire
01df83c6b7 Merge branch 'master' of github.com:isovector/polysemy 2019-06-27 00:37:16 -04:00
Sandy Maguire
4d360445ed Release polysemy 0.5.0.1 2019-06-27 00:36:43 -04:00
Sandy Maguire
e4b711a1ed
Fix intercept not hoisting itself into embedded computations (#134)
Fixes #133
2019-06-27 00:35:52 -04:00
Sandy Maguire
008a152097 hpack or cabal (or both) is a janky POS 2019-06-26 00:43:10 -04:00
Sandy Maguire
a2e39776ce Release polysemy 0.5.0.0 2019-06-26 00:29:26 -04:00
Sandy Maguire
8f3a4bcf19
Async effect (#129)
Here's an Async effect that does exactly what you'd expect.

Fixes #80
2019-06-26 00:01:12 -04:00
Sandy Maguire
2654d35066
Forklift interpretations (#128)
This PR provides a single function withLowerToIO, which runs a desired Sem r effect all the way down to IO, without needing to know the natural transformation beforehand. It does it by running the desired code in a new thread, and shipping all of the unhandled effects back to the main thread. The main thread turns into an event loop for the duration of the withLowerToIO block.
2019-06-25 23:46:54 -04:00
Sandy Maguire
29216ceb69
Improve CI coverage -- now on GHC 8.4! (#39) 2019-06-19 17:25:37 -04:00
Sandy Maguire
c3d3cc24f8
Stop using stack in Travis (#121)
The travis cache appears to be broken (probably due to the nightly stack?), but it just means CI takes like half an hour now. Since I already build on stack, I'm pretty sure it's fine --- also this will give a sanity check against accidentally breaking cabal build plans.

This improves CI times from ~30 minutes down to ~2.
2019-06-18 12:36:38 -04:00
Sandy Maguire
78d0c4905a
Split out effect lib (#83)
This PR teases apart the reusable pieces of the current TH machinery. Doing so allows us to build other TH abstractions in polysemy --- such as an RPC effect.
2019-06-18 12:23:27 -04:00
Sandy Maguire
6ffb4fd282
Remove Effect class (#118)
This thing was a vestige of the bad old days when you had to write
*instances* of classes things in Polysemy. It was a terrible experience,
and so we don't do that anymore. As a result, the only two instances of
`Effect` were for `Union` and `Yo` --- so I just inlined them.
2019-06-17 15:16:28 -04:00
Sandy Maguire
6c1a6575bb Add kind synonyms for effects and effect rows
Fixes #116
2019-06-17 12:47:58 -04:00
Sandy Maguire
bba49aaeb8
Don't emit the FirstOrder error for unknown effects (#115)
This PR introduces the FCF machinery that will give us more control over writing type-level functions. It defines an IfStuck a b c tyfam that will leave b around if a is stuck, otherwise it will fcf-evaluate c. Everything is polykinded so we can stack these things together to make big logic chains to emit specific variables depending on what exactly is stuck.
2019-06-16 17:14:36 -04:00
Sandy Maguire
0a1ce2b837 Add hspec-discover to package build-tools
Fixes #111
2019-06-15 20:12:18 -04:00
Sandy Maguire
82f86add29
Custom type error testing (#113)
This PR adds doctests allowing us to write tests for the custom type errors. Having this stuff reified in the test suite means we can iterate on the implementations and give much better QA.
2019-06-15 20:04:11 -04:00
Sandy Maguire
e960ce1877 Release polysemy 0.4.0.0 2019-06-12 09:40:08 -04:00
Sandy Maguire
b7f2922c3a
Better Resource bracketing (#87) 2019-06-12 09:36:08 -04:00
Sandy Maguire
eff97914f7 Release polysemy 0.3.0.1 2019-06-09 00:22:50 -04:00
Sandy Maguire
c937132caa Release polysemy 0.3.0.0 2019-06-01 23:43:41 -04:00
Sandy Maguire
cd074a4bd4
Move Random to polysemy-zoo (#78)
* Move Random to zoo

* Changelog
2019-06-01 18:42:12 -04:00
Sandy Maguire
601cbe8630 Release polysemy 0.2.2.0 2019-05-31 00:10:52 -04:00
Sandy Maguire
63b1f4257f
GetInspectorT (#71)
* Evacuation wip

* Two other uses of weave

* Evacuator -> Inspector

* Inspector test
2019-05-31 00:06:46 -04:00
Sandy Maguire
ad42c75fcf Release polysemy 0.2.1.0 2019-05-27 01:16:14 -04:00
Sandy Maguire
f2de66ac52 Release version 0.2.0.0 2019-05-23 03:53:07 -04:00
Sandy Maguire
a20994abab
Fix broken higher order effects (#58)
* Fix a serious bug in interpretH and friends

* Spec to prove reader works now
2019-05-23 03:49:26 -04:00
Sandy Maguire
71001dc049 Split out fundep part of plugin 2019-05-19 23:02:08 -04:00
Sandy Maguire
76d5f1953e
Release 0.1.2.1 (#51) 2019-05-18 11:42:14 -04:00
Sandy Maguire
2cfd3692f2 Let plugin know when to improve performance 2019-05-16 15:26:18 -04:00
Sandy Maguire
fadd603d59 Release 0.1.2 2019-04-26 12:18:44 -04:00
Sandy Maguire
cb1aba83ee add runBatchOutput 2019-04-20 06:57:56 -04:00
Sandy Maguire
3b1bf8e4af runIO instance 2019-04-14 15:01:16 -04:00
Sandy Maguire
a03eb2c1cf upload cabal file 2019-04-10 17:23:24 -04:00