Commit Graph

370 Commits

Author SHA1 Message Date
Georgi Lyubenov
378b7b11bf Depend on newer loopbreaker (#235) (#257) 2019-10-18 10:14:44 +01:00
Georgi Lyubenov
ee2956fa7f Depend on newer type-errors-pretty (#235) (#255) 2019-10-18 10:14:27 +01:00
Georgi Lyubenov
73099a1fb5 Depend on newer unagi-chan (#235) (#256) 2019-10-18 10:14:05 +01:00
Georgi Lyubenov
874e194629 Add a convenience atomicGets (#250)
* Add a convenience atomicGets

* Remove confusing comment
2019-10-11 10:18:30 +02:00
Sandy Maguire
b0a54f3bfa Run core-lint on the plugin tests 2019-10-09 14:51:03 +02:00
Sandy Maguire
a86aec37fb
Revert "Let plugin solve stuck type rows + bug fixes in interpreter mode (#245)" (#249)
This reverts commit 7a009f70b6.
2019-10-09 14:35:07 +02:00
Sandy Maguire
7a009f70b6
Let plugin solve stuck type rows + bug fixes in interpreter mode (#245)
In interpreter mode, the plugin used to see rows like State (Identity a) ': State a ': r, with an action in State a, and then incorrectly unify that thing with the first thing in the list State (Identity a). As a result, we'd ask for Identity a ~ a, which is infinite, and things would go wrong.

Now we instead collect all of the unifications we'd like to do, and only emit the most specific one, as measured by number of type constructors in it. This will now only emit a State (Identity a) ~ State (Identity s), and then unify the state we're looking for, plus the a ~ s that solves the other state action.

But the next problem is that we can't determine IndexOf in the row above, because a is a type variable, and so IndexOf is stuck, even though we know IndexOf that_row (State a) ~ 'S 'Z. So the plugin now also solves "stuck" IndexOfs of that form.

All of this means we can now happily introduce local effects that have type variables, for effects that are already known to be present in the row. And somehow it just works! Amazing!
2019-10-09 14:07:46 +02:00
Sophie Taylor
557ce0d261 Add sequenceConcurrently to Async module (#248)
* Add `sequenceConcurrently` to Async module

* Expose `sequenceConcurrently` from module
2019-10-09 09:16:27 +02:00
Sandy Maguire
ac6d7b3121 Release polysemy-1.2.1.0 2019-09-15 21:42:33 +02:00
Sandy Maguire
d759dd7be8 Merge branch 'master' of github.com:isovector/polysemy 2019-09-15 21:40:50 +02:00
Sandy Maguire
825dfd6859 Release polysemy-1.2.0.1 2019-09-15 21:40:31 +02:00
Armando Santos
7e4297e5aa Add type synonym 'InterpreterFor' and documentation (#224)
* Add type synonym 'InterpreterFor' and documentation

* Apply suggested changes

* Revert indentation.
2019-09-07 18:37:35 +02:00
Sandy Maguire
4ca15a22e5 Release polysemy-plugin-0.2.3.0 2019-09-04 11:19:39 -07:00
Sandy Maguire
a49680d54b Release polysemy-1.2.0.0 2019-09-04 11:18:40 -07:00
Sandy Maguire
6b9c8485df Sinces 2019-09-04 11:17:24 -07:00
KingoftheHomeless
7bda143878
polysemy-plugin: Reject ununifiable effect candidates early (#221)
* polysemy-plugin: Reject ununifiable effect candidates early

* Bump version, update changelog, expand tests
2019-09-04 17:11:01 +02:00
Dieter Houthooft
3fe084d4ed Add tutorial link in README.md (#222) 2019-09-04 07:36:41 -07:00
KingoftheHomeless
d1faef0be6
Fix mistakes in Final, add atomic/StateToIO (#218)
* Fix for mistakes in Final that slipped through the cracks.

* Add @sinces, atomic/StateToIO

* Update changelog
2019-09-02 06:45:53 +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
KingoftheHomeless
baa83700c3
Add subsume operation, expose raiseUnder/2/3 (#215)
* Add subsume operation, expose raiseUnder/2/3

* Fix new docs of raiseUnder, rearrange type vars in prj
2019-08-27 07:25:47 +02:00
KingoftheHomeless
205785c84e
Improve choice of functorial state for runNonDet (#210) 2019-08-22 19:50:29 +02:00
unknown
ccac856cd3 Revised comments about NonDetState in light of discoveries 2019-08-22 18:24:06 +02:00
unknown
6653cc6d31 Removed insignificant hyperlinks 2019-08-19 23:47:44 +02:00
unknown
affd736e41 Improve choice of functorial state for runNonDet 2019-08-17 16:38:36 +02:00
KingoftheHomeless
a93fb0e809 Add modify' to changelog (#208) 2019-08-15 22:26:57 -07:00
KingoftheHomeless
e950deb4ab Update changelog (#207) 2019-08-15 22:13:57 -07: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
Pepe García
a34efc142b add DataKinds to the checkExtensions list (#204)
* add DataKinds to the checkExtensions list

* return newline
2019-08-07 07:43:35 -04: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
e4ad26105c Hide visibility of Polysemy.Fixpoint.bomb, fix changelog (#202) 2019-08-06 09:06:27 -04:00
KingoftheHomeless
5a28c435ec Add right-associative variants of runOutputMonoid and runWriter (#203)
* Add right-associative variants of runOutputMonoid and runWriter

* Fix bug in runWriterAssocR
2019-08-06 09:05:28 -04:00
KingoftheHomeless
829e3202fc Have AsyncSpec use locks instead of sleeps (#197) 2019-08-02 20:18:48 -04:00
Jason
39189d935e Fix typo in outputToTrace documentation (#198)
Fixes https://github.com/polysemy-research/polysemy/issues/189
2019-08-01 11:28:30 -04:00
KingoftheHomeless
5930ddf138 Fix strictness semantics of State and Writer (#194)
* Fix strictness semantics of State and Writer

* Made tests more rigorous

* Fixed inconsistency between Writer/Output tests

* Add more tests to cover the discrepancy between run and runM

* Use strict fmap to be on the safe side
2019-07-31 08:49:36 -04:00
Connor James
51b777b3bb Add runOutputSem interpreter (#191) 2019-07-27 16:23:08 -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
Kit Langton
93fc63ce8c Update README.md with Lift -> Embed renaming. (#190)
Update README.md with `Lift` -> `Embed` renaming.
2019-07-27 20:53:35 +02:00
KingoftheHomeless
752369b071 Simplified Forklift machinery (#186) 2019-07-24 11:40:19 -04:00
Sandy Maguire
f2ca91d57d Release polysemy-1.0.0.0 2019-07-24 10:45:42 -04:00
TheMatten
d803c81054 Document change in semantics based on order of interpreters (#181)
* Polysemy.Internal: document change in semantics based on order of interpreters

* Polysemy.Internal: use new 'evalState' instead of mapping 'runState' in example

* Polysemy.Internal, DoctestSpec: properly support doctest

* Polysemy.Internal: small corrections
2019-07-24 09:50:56 -04:00
Jack Henahan
c53357ca92 Add performance instructions to README (#185) 2019-07-24 08:35:44 -04:00
Dmitrii Kovanikov
011530bba1 [#180] Use type-errors-pretty package (#182)
Resolves #180
2019-07-20 08:48:42 -04:00
KingoftheHomeless
8b1f6d3deb Added nonDetToError (#179) 2019-07-18 20:50:22 -04:00
KingoftheHomeless
8812d0a6b9 Removed redundant constraint from ignoreTrace (#178) 2019-07-16 16:24:56 -04:00
Sandy Maguire
de1607ea1b
Rename everything and its grandmother (#175) 2019-07-15 12:40:42 -04:00
KingoftheHomeless
d12adcd780 Make NonDet Higher-Order (#174)
* Higher-Order NonDet and runNonDetMaybe

* Fixed docs

* Fixed a word in AlternativeSpec docs

* Fixed tests and wrong documentation
2019-07-15 11:53:18 -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
TheMatten
9bfb486769
Merge pull request #171 from TheMatten/th-ambiguous-names
Fix ambiguously looking variables in smart constructors, refactor Polysemy.Internal.TH.Common
2019-07-09 20:01:10 +02:00
TheMatten
94b5dfe08e Remove unused error 2019-07-09 07:45:06 +02:00