Marco Perone
ca4d6826ad
StateMachine is a costrong profunctor
...
implement that by showing that `StateMachine a b` is isomorhpic to `NonEmpty a -> b`
Also:
- remove singleVertexTopology and use trivialTopology instead
- simplify Demote condition
- generalize trivialTopology for any possible state
2023-02-27 17:05:45 +01:00
Marco Perone
f8306d2a4f
implement unrestrictedMachine
...
add example of an unrestricted machine with boolean state
2023-01-26 18:16:23 +01:00
Marco Perone
e07f6d0834
complete unfinished sentence
2023-01-26 17:42:40 +01:00
Marco Perone
4611d98259
Improve Parallel and Alternative implementations
...
Co-authored-by: Alex <alexei.drake@tweag.io>
2023-01-26 17:42:40 +01:00
Marco Perone
93fabb304c
add Parallel and Alternative constructors
2023-01-26 17:42:40 +01:00
Marco Perone
dce575e4cf
check with examples that run is working properly
2023-01-26 17:19:21 +01:00
Marco Perone
863db1da64
pass initial state as argument to example machines
2023-01-26 17:19:21 +01:00
Marco Perone
952dba9c73
run a state machine
...
consume an input to get an output and a new machine
2023-01-26 17:19:21 +01:00
Marco Perone
f049b7f719
StateMachine is an instance of Category
2023-01-26 16:57:52 +01:00
Alexei Drake
786f81bfcb
add utility to open haddock docs in the browser
2023-01-26 14:48:54 +01:00
Marco Perone
0f7034e625
Describe choice
...
Co-authored-by: Alex <alexei.drake@tweag.io>
2023-01-26 14:36:24 +01:00
Marco Perone
c97e7bf21e
state machines have an instance of Choice
2023-01-26 14:36:24 +01:00
Marco Perone
91462083ad
Machines without trivial transitions are not considered
2023-01-26 12:11:29 +01:00
Marco Perone
5c456bf059
Improve wording on identity transitions decision log
...
Co-authored-by: Alex <alexei.drake@tweag.io>
2023-01-26 12:11:29 +01:00
Marco Perone
4d0905e1ea
remove constraint saying that every transition needs to be allowed
2023-01-26 12:11:29 +01:00
Marco Perone
c606edee64
always allow the identity transition
2023-01-26 12:11:29 +01:00
Marco Perone
b64705820f
explore using gadts for AllowedTransition definition
2023-01-26 12:11:29 +01:00
Marco Perone
125135a8ff
remove --color option from tests
...
it is not understood by doctests
2023-01-16 17:39:09 +01:00
Marco Perone
8981b1bba4
rename to crem
2023-01-16 17:06:09 +01:00
Alexei Drake
7ae0e80ae4
small readability refactor
2023-01-13 16:52:25 +01:00
Marco Perone
330169d75c
use multiline strings in flake
...
Co-authored-by: Alex <alexei.drake@tweag.io>
2023-01-13 16:52:25 +01:00
Marco Perone
3e035d9845
use builtins instead of inputs.nixpkgs.lib
...
Co-authored-by: Alex <alexei.drake@tweag.io>
2023-01-13 16:52:25 +01:00
Marco Perone
fc977fcf0e
avoid duplicate events in watch
...
also fix broken doctests first run
2023-01-13 16:52:25 +01:00
Marco Perone
def3010822
read project source files from nix/haskell-source.nix
2023-01-13 16:52:25 +01:00
Marco Perone
502a38c9d1
use inotify-tools instead of fd and entr
2023-01-13 16:52:25 +01:00
Alexei Drake
e238243e13
fix doctest build by setting correct package path
2023-01-13 16:19:04 +01:00
Marco Perone
00f14c0202
state explicitly that we run doctests in the test suite
2023-01-13 16:19:04 +01:00
Marco Perone
b1e34a7ba7
Improve wording on doctest decision log
...
Co-authored-by: Alex <alexei.drake@tweag.io>
2023-01-13 16:19:04 +01:00
Marco Perone
7999a60a43
use single-line Haddock comments
2023-01-13 16:19:04 +01:00
Marco Perone
b9a99914cc
run doctests as part of cabal test
2023-01-13 16:19:04 +01:00
Alexei Drake
58d3f1ba69
ignore all Nix-created result links (e.g. result-doc)
2023-01-12 15:37:44 +01:00
Alexei Drake
29014aa0eb
prevent the auto-generated module Paths_pkgname from being built
2023-01-12 15:37:44 +01:00
Alexei Drake
e2d2d4d6b8
always use the latest hpack regardless of GHC version
2023-01-12 15:37:44 +01:00
Alexei Drake
7d9bb6f4a3
add CI workflow
2023-01-12 15:37:44 +01:00
Alex
456dc8161d
introduce GHC version checks for unsupported features ( #9 )
2023-01-12 15:29:50 +01:00
Marco Perone
6fcfc118d4
create a command to rerun tests at every file change
...
refactor the watch utility to take any command
2023-01-12 09:25:06 +01:00
Marco Perone
88b0b86214
add an example for product graph
2023-01-11 12:08:18 +01:00
Marco Perone
5e82980d2e
refactor a bit of nix so that we can use wingman on ghc 9.0
2023-01-11 12:07:57 +01:00
Marco Perone
441cb5149e
A state machine is a strong profuctor
2023-01-10 17:57:18 +01:00
Marco Perone
ca55a14e6a
A StateMachine is a profunctor
2023-01-10 17:42:41 +01:00
Marco Perone
75fd22d4c9
define composition of state machines
2023-01-10 16:42:13 +01:00
Marco Perone
088077963a
Start defining a compositional state machine
2023-01-10 12:36:08 +01:00
Marco Perone
07c22a94f4
Factor Topology out of BaseMachine
2023-01-10 12:35:35 +01:00
Marco Perone
739f466589
Render a base state machine
...
Add tests
Remove Mk from constructors
2023-01-09 17:53:36 +01:00
Marco Perone
24c4870359
define basic examples
2023-01-05 18:01:15 +01:00
Marco Perone
7b85891dc3
complete definition of state machine
2023-01-05 18:00:07 +01:00
Marco Perone
c8d8f51160
define tentative fourmolu configuration
2023-01-05 17:59:04 +01:00
Marco Perone
f1ccb6ebae
provide links for GHC extensions documentation
2023-01-05 11:09:29 +01:00
Marco Perone
6c7e7922a0
define Topology for a state machine
2023-01-05 11:09:07 +01:00
Marco Perone
a15084d558
initial setup
2023-01-04 17:33:08 +01:00