Commit Graph

35 Commits

Author SHA1 Message Date
Louis Dionne
9895803ede Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
Louis Dionne
474484eed0 [tests] Split Foldable MCD tests 2016-08-30 21:46:35 -07:00
Louis Dionne
23c3edc93b [NFC] Un-Doxygenize comments in non-header files 2016-02-04 11:07:41 -05:00
Louis Dionne
c41a5cb6be Update copyright notices for 2016 2016-01-01 14:54:06 -05:00
Louis Dionne
2f4bd71686 [Tests] Group the unit tests for Foldable and Sequence mcds 2015-06-14 12:51:37 -04:00
Louis Dionne
55c095ebbb [Foldable] Remove fold_right from the MCD
Also,
- Document the fact that the default `unpack` is inefficient
- Give a single implementation of `length` in terms of `unpack`
- Doxygen: product = see documentation

Fixes #108
2015-06-14 10:59:07 -04:00
Louis Dionne
bd4daea264 Use models<Concept, T> instead of models<Concept(T)>, and check data types at the top level 2015-03-07 21:27:46 -05:00
Louis Dionne
7c69ef7d98 [tests] Split the seq unit tests 2015-03-05 21:36:35 -05:00
Louis Dionne
647ad436b0 Reorganize the unit tests and increase the overall coverage. 2014-11-04 08:54:58 -05:00
Louis Dionne
b26406d649 Simplify the header hierarchy: too modular isn't good.
This essentially undo parts of 307d3d0. While it seemed a like good
idea to over-modularize type classes to reduce header dependencies, I
think it was a mistake. What 307d3d0 did was basically split each of
the components of a type class into a single header (typeclass/operators.hpp,
typeclass/mcd_1.hpp, typeclass/mcd_2.hpp, ...).

At first, it resolved many weird header dependency glitches. However, it
also made everything more complex; creating even easy type classes was
sometimes much longer than it should have been, and using type classes
was tricky because you had to know exactly what to include. It also went
against the idea of implicit type class instances being provided whenever
that's possible, which I think is a nice feature of the library. Being
dissatisfied with this, I opted for a simpler header organization with
a fwd/ directory that contains forward declaration headers, and everything
else in the same directory.

A possible objection to this change would be that you are now forced
to include sometimes more than what you strictly need when e.g. defining
an instance or using only some instance(s) of a data type. My answer to
this is that Hana is a really small library and the parsing is not
going to have a huge impact on overall compilation time. My bet is that
the time that will be saved by programmers with a simple header hierarchy
outweights the parsing time by far.
2014-10-25 09:47:05 -04:00
Louis Dionne
1280806839 Provide an instance of Foldable for Products. 2014-10-16 08:43:08 -04:00
Louis Dionne
919bc2f465 Move for_each to Foldable and optimize it with unpack 2014-08-28 12:53:33 -04:00
Louis Dionne
307d3d0ec8 Huge reorganization and refactoring.
- Split type class instances into separate files
- Instances provided automatically by a type class are actually MCDs
- Test each instance in a single file, not one file per method
- Refactor the operator system to fix the ADL-related bug.
2014-08-18 19:26:29 -04:00
Louis Dionne
f2de95a841 Use detail::injection instead of a std::tuple in the tests 2014-08-16 14:25:57 -04:00
Louis Dionne
af36f99f5d Foldable: add unpack_mcd 2014-08-06 18:17:47 -04:00
Louis Dionne
da8135ccec Foldable: flip the arguments of some methods 2014-08-05 19:52:44 -04:00
Louis Dionne
d132db0ebf Use finer grained assertions acknowledging Constants 2014-08-05 10:37:54 -04:00
Louis Dionne
888e84f4e5 Foldable: Remove lazy_foldr and lazy_foldl 2014-07-19 13:29:41 -04:00
Louis Dionne
74092b4bc9 Add the Searchable type class.
Remove any, all, none, find, elem and the *_of variants from Foldable
and move them into Searchable.
2014-07-19 11:44:34 -04:00
Louis Dionne
b3f9a3d09a Modularize Logical and remove nullary and_/or_ 2014-07-16 16:26:23 -04:00
Louis Dionne
674a889347 Modularize Foldable 2014-07-16 16:26:23 -04:00
Louis Dionne
a0945bc6de Reorganize Foldable unit tests. 2014-07-13 19:47:06 -04:00
Louis Dionne
ea37adf66b Core: rethink type classes 2014-06-23 15:37:29 -04:00
Louis Dionne
7b7bbd2290 Logical: add not_ 2014-06-21 12:39:19 -04:00
Louis Dionne
0a09ddaa97 Foldable: add the elem method 2014-06-20 21:35:58 -04:00
Louis Dionne
42bb091e71 Foldable: reduce the mcd, steal find from Iterable and improve tests 2014-06-18 13:37:34 -04:00
Louis Dionne
8cd1863896 Move length from Iterable to Foldable. 2014-06-04 22:19:42 -04:00
Louis Dionne
5b4d569962 Type: Add decltype_ and remove coupling. 2014-06-04 21:24:19 -04:00
Louis Dionne
c0b7a91e31 Move any, all and none to Foldable. 2014-06-03 12:28:05 -04:00
Louis Dionne
91689fe4f0 Make the header comment and license uniform. 2014-06-03 11:46:24 -04:00
Louis Dionne
4b61774472 Add lazy_foldr to Foldable. 2014-06-03 11:38:54 -04:00
Louis Dionne
cec5d4edf8 Add unpack and remove Functor from Range. 2014-05-31 14:55:11 -04:00
Louis Dionne
af94972fb2 Improve unit tests for maximum. 2014-05-25 20:29:38 -04:00
Louis Dionne
003b3ae4b9 Add count to Foldable. 2014-05-25 19:28:00 -04:00
Louis Dionne
e9d396f79d Split Foldable unit tests. 2014-05-20 18:46:56 -04:00