* Add AtomicState and atomic interpreters for Output/Writer
* Fixed a word in docs, moved test functions around
* Remove runWriterIORef and runWriterTVar
* 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
* Improve semantics of Fixpoint
* Add tests for Fixpoint, update docs
* Made the error test more rigorous
* Added references in the docs for 'runFixpoint'
* 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
* 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
* 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.
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
This function now transforms an Output o into Output [o], which only outputs elements once the specified number of o's have been collected. The only exception is the last element which contains the rest (if any).
This PR changes the plugin so it will notice an insoluble constraint of the form Sem r a ~ Foo, and mark that r takes part in a genuine type error. The plugin will then provide a bogus evidence term for IfStuck (IndexOf r _) _ _, which prevents the AmbiguousSend error message from firing.
runEmbedded lets you interpret a `Lift m` via some `forall x. m x -> IO
x` by pretending all the other polysemy actions are in IO and using its
MonadIO instance.
When emitting messages for ambiguous sends: use `IfStuck` on `r` to
determine if we can compose it. This means `r` is in one of three
states, stuck, cons or nil. We want to wrap it in parentheses iff it's
a cons.
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!
* 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
This shuffles around the error messages so they are only connected to code generated via makeSem. This means that badly-typed interpreters will no longer set off the eager error messages!