1
1
mirror of https://github.com/coot/free-category.git synced 2024-11-23 00:56:58 +03:00
Commit Graph

63 Commits

Author SHA1 Message Date
Marcin Szamotulski
ad561f3bd1
Just commit texts raports 2019-09-01 14:20:33 +02:00
Marcin Szamotulski
c28e07f47f
Added links to benchmarks to the readme file 2019-09-01 14:20:33 +02:00
Marcin Szamotulski
238f95cb4d
Renamed Cat -> CatL, CatR -> Cat
This way it is more obvious which of the categories is the fastest.
I might remove `CatR` later.
2019-09-01 14:20:29 +02:00
Marcin Szamotulski
716a6ab428
Export lengthListTr 2019-09-01 14:20:08 +02:00
Marcin Szamotulski
61a5e8e79c
Export ListTr from Control.Category.Free
Also improve documentation.
2019-09-01 14:20:08 +02:00
Marcin Szamotulski
5eb3fbd101
criterion benchmarks 2019-09-01 14:19:59 +02:00
Marcin Szamotulski
6657824470 CatR - optimised version of Cat
This data structure is optimised for morphisms build with a right fold,
e.g. `(.)` and `foldr`.  The optimisations were visible with `-O1` and
`-O2`; with no optimisations (`-O0`), this data structure performs wors
than `Cat` or `ListTr`.
2019-09-01 12:09:39 +00:00
Marcin Szamotulski
5864b3ad7f Optimisations of 'Cat'
Adding INLINE pragmas, optimising order of pattern matches.
2019-09-01 12:09:39 +00:00
Marcin Szamotulski
3b9c127ff8 Adding ViewL to Free.Internal export list 2019-09-01 12:09:39 +00:00
Marcin Szamotulski
be5cfdc552 Optimise internal Queue
Queue contains three 'ListTr', only the middle one, which holds reverse
values, should be forced to weak normal form.  Otherwise the queue will
not be as performant as designed.  A performance gain was measured.

Adding INLINE pragmas had a significant improvemnt in performance of the
queue.
2019-09-01 12:09:39 +00:00
Marcin Szamotulski
166dfc8947 Added hoistQ: Queue is an endo-functor on the category of categories 2019-09-01 12:09:39 +00:00
Marcin Szamotulski
c77fa194f5 Show instances for ListTr and Queue (with QuantifiedConstraints) 2019-09-01 12:09:39 +00:00
Marcin Szamotulski
d4966a6108 Fixed a bug in 'uncons'
Make `Queue.uncons` perserve `Queue` invariant.
2019-09-01 12:09:39 +00:00
Marcin Szamotulski
cd58b91419 Stylish edits 2019-09-01 12:09:39 +00:00
Marcin Szamotulski
df0d3e4528 hoistOp - Op is an endo-functor of category of categories 2019-09-01 12:09:39 +00:00
Marcin Szamotulski
559f9fb404
README.md - some edits 2019-08-31 12:40:00 +02:00
Marcin Szamotulski
97cfd5c551 Updated README and CHANGELOG files 2019-08-31 10:35:21 +00:00
Marcin Szamotulski
1f20714c0a Added semigroup and monoid instances
Arr anc A are categories, and thus every endo-morphism object is
a monoid.
2019-08-31 10:35:21 +00:00
Marcin Szamotulski
08ee2a979b Free Arrows - various changes
Added:
* arrArr
* mapArr
* foldArr

Renamed:
* (:.:) as Cons (not exported)

Exported:
* Added Arr, Prod
2019-08-31 10:35:21 +00:00
Marcin Szamotulski
3746ef5d29 Efficient free arrow data type 2019-08-31 10:35:21 +00:00
Marcin Szamotulski
d88b444cfe Free.Internal - remove (:.:) constructor 2019-08-31 10:35:21 +00:00
Marcin Szamotulski
fd9dba5509 arrCat and mapCat
Renamed arrow to arrCat, since 'arrCat' is very like 'arr' for 'Arrows'.
'mapCat' is a smart constructor.
2019-08-31 10:35:21 +00:00
Marcin Szamotulski
ed310d4af7 Export Cat Id constructor
At times it is useful to be more explicit than
`id :: Category c => c a a`
2019-08-31 10:35:21 +00:00
Marcin Szamotulski
81df8c4abc Remove default-extensions from the cabal file
Add show-extensions haddock option.
2019-08-31 10:35:21 +00:00
Marcin Szamotulski
b1f3bda123 Move type aligned real time queues to an internal module 2019-08-31 10:35:21 +00:00
Marcin Szamotulski
4d0011df04
Updated README.md file 2019-08-31 10:19:44 +02:00
Marcin Szamotulski
20d61b2355
Efficient representation of a free category (#5)
* Efficient representation of free category

Using type aligned real time queues (Okasaki, 'Purely Functional Data
Structures') to represent catanable type allign lists (free categories).

Composition is O(1) and right fold is O(n), where n is number of
transitions.

* Bump version to 0.0.3

Make it compile on ghc802.

* Updated CI configuration
2019-08-31 08:12:21 +00:00
Marcin Szamotulski
ecc808dc7d
Stylistic changes 2019-08-24 10:28:08 +02:00
Marcin Szamotulski
875dcd99e9
Updated cabal file 2019-03-12 20:05:03 +00:00
Gabor Greif
2cdbb82c09 Proofreading (#3)
@ggreif thanks for proofreading!
2019-01-26 11:20:29 +01:00
Marcin Szamotulski
4ce35b64d8
Updated README.md and ChangeLog.md 2019-01-26 11:00:56 +01:00
Marcin Szamotulski
bb0e91b631
Rename: EffCategory, FreeEffCat 2019-01-26 10:53:06 +01:00
Marcin Szamotulski
7efa4c4430
Use callCabal2nix 2019-01-08 22:07:22 +01:00
Marcin Szamotulski
2cc5f7ac38
Install cachix from cachix.org 2019-01-06 15:38:40 +01:00
Marcin Szamotulski
02f90c2f63
Use nixox-18.09 in cricleci 2019-01-06 13:06:21 +01:00
Marcin Szamotulski
255d16547d
travis: ghc-862 2018-12-16 23:12:16 +01:00
Marcin Szamotulski
3159b1216e
nix: ghc802 build
Fix nixpkgs depending on ghc version.
2018-12-16 23:12:15 +01:00
Marcin Szamotulski
74492388fa
Update README 2018-12-16 23:12:15 +01:00
Marcin Szamotulski
20fdc8d189
Updated nix (ghc-8.6.2) 2018-12-16 23:12:15 +01:00
Marcin Szamotulski
786cb93890
LoginStateMachine example 2018-12-16 23:12:15 +01:00
Marcin Szamotulski
62d0bbe4fe
Lifting (#2)
* Initial LoginStateMachine implementation

* Nicer interface

* Lifting instance for (->) and Identity, liftKleisli function

* Added Control.Category.Lifting to free-algebras

* Reoder Lifting module

* Fixed haddoc documentation

* examples.cabal - base version

* reconfigure circle-ci

* Fixed error in GHC-8.6.1
2018-12-10 19:59:39 +01:00
Marcin Szamotulski
34d9b45c07
circleci: cachix-push command parameter 2018-11-11 13:18:14 +01:00
Marcin Szamotulski
d1c5c3ef80
Fixed typo in nix/nixpkgs.nix file 2018-11-11 13:15:03 +01:00
Marcin Szamotulski
2aa4d66f23
Added circleci config file 2018-11-11 12:51:26 +01:00
Marcin Szamotulski
adbb6c3550
Initial version 2018-11-03 17:52:30 +01:00
Marcin Szamotulski
f72b2e503f Updated free-algebras dependency 2018-10-27 12:26:44 +00:00
Marcin Szamotulski
3fdd610608 Free Arrow 2018-10-27 12:26:44 +00:00
Marcin Szamotulski
794e7397cb
ArrowZero and ArrowChoice instances 2018-10-24 10:33:04 +02:00
Marcin Szamotulski
93eafd738f
Added Arrow instances 2018-10-24 10:33:04 +02:00
Marcin Szamotulski
99771692da
Updated README and documentation 2018-10-23 22:15:11 +02:00