2
0
mirror of https://github.com/boostorg/hana.git synced 2026-01-24 05:52:14 +00:00
Commit Graph

50 Commits

Author SHA1 Message Date
Louis Dionne
4ca25ba1b4 [Core] Refactor 2015-02-04 18:10:17 -05:00
Louis Dionne
ba3942a858 [Integral] Remove traces 2015-02-01 21:02:18 -05:00
Louis Dionne
b7a88bb496 [Core] Replace is_a by models 2015-01-17 15:45:46 -05:00
Louis Dionne
999d5998c1 [Core] Remove obsolete examples and test files 2015-01-17 15:45:46 -05:00
Louis Dionne
ad3c8f6645 [Foldable] Split methods 2015-01-17 15:45:45 -05:00
Louis Dionne
d973dbfcc6 [Comparable] Use the improved MCD graph 2015-01-17 15:45:40 -05:00
Louis Dionne
9974e419fd [Comparable] Split methods 2015-01-17 15:45:40 -05:00
Louis Dionne
4654c6786a Split instances for foreign types 2014-12-06 16:30:16 -05:00
Louis Dionne
4009555990 Refactor and improve IntegralConstant
- Add mandatory lossless conversions between instances
- implement `common` properly
2014-11-17 09:13:48 -05:00
Louis Dionne
f4e9062d89 Core: add the common utility 2014-11-17 09:13:48 -05:00
Louis Dionne
8756e81977 Add boost/hana/config.hpp and BOOST_HANA_*_CHECK macros. 2014-11-10 17:52:33 -05:00
Louis Dionne
0f0c2c4430 Replace when<is_valid<...>> by when_valid<...> 2014-11-07 15:41:10 -05:00
Louis Dionne
049046478e Move ASSERT macros out of the details 2014-11-04 09:43:44 -05:00
Louis Dionne
eddece8d00 Use the nested hana struct to define enabled operators. 2014-10-27 16:31:03 -04:00
Louis Dionne
220d92ed82 Use a nested hana struct to customize stuff inside user defined objects. 2014-10-27 15:24:14 -04: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
a7b28bddd8 Add more perfect forwarding and do some refactoring. 2014-10-02 21:05:01 -04:00
Louis Dionne
3147d9b5d5 Refactor and fix broken examples. 2014-08-25 12:33:49 -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
2b76377f91 Core: replace when_valid by when + is_valid 2014-08-07 22:38:54 -04:00
Louis Dionne
4df8c27cbb Finer grained use of operators 2014-08-07 21:05:38 -04:00
Louis Dionne
b6cef58ca1 Core: add are to make it prettier when there are many data types. 2014-08-05 19:52:44 -04:00
Louis Dionne
b4cfc58e72 Searchable: flip the order of the arguments of the methods 2014-08-05 16:46:56 -04:00
Louis Dionne
f992faa91e Remove std::list adaptor; Iterable requires a Constant is_empty. 2014-08-05 12:14:40 -04:00
Louis Dionne
d132db0ebf Use finer grained assertions acknowledging Constants 2014-08-05 10:37:54 -04:00
Louis Dionne
c85db2c4d2 Tutorial: make examples compilable 2014-07-31 15:09:34 -04:00
Louis Dionne
e9dfdeb57b Core: merge instantiates into is_a for the same functionality 2014-07-31 13:00:57 -04:00
Louis Dionne
b61dfc00a6 Core: document header structure and use when<> in datatype<> 2014-07-31 11:41:42 -04:00
Louis Dionne
8a8ff797ab Split Core into subdirectories to reduce dependencies. 2014-07-30 11:15:26 -04:00
Louis Dionne
7e8f109d7f Modularize List and add a minimal instance 2014-07-16 16:26:23 -04:00
Louis Dionne
b3f9a3d09a Modularize Logical and remove nullary and_/or_ 2014-07-16 16:26:23 -04:00
Louis Dionne
b0b7b09736 Modularize Iterable 2014-07-16 16:26:23 -04:00
Louis Dionne
20814674c0 Modularize Monad 2014-07-16 16:26:22 -04:00
Louis Dionne
c8e8d88753 Modularize Comparable 2014-07-16 16:26:22 -04:00
Louis Dionne
a316800bea convert.cpp example: Add missing Comparable mcd 2014-07-15 11:33:49 -04:00
Louis Dionne
a5cab82de8 Core: make default_instance dependent on the type class arguments 2014-07-13 22:38:52 -04:00
Louis Dionne
49d9b40fc1 Core: Allow parametric data types and predicated instances to cohabit. 2014-07-13 22:06:49 -04:00
Louis Dionne
d65d47ba28 Core: use BOOST_HANA_TYPECLASS macro to create type classes. 2014-07-13 19:49:24 -04:00
Louis Dionne
5a2de2073e Reorganize and rename the adapted/ folder. 2014-07-07 12:42:20 -04:00
Louis Dionne
39c9b1b8e2 Add the bool.hpp header. 2014-07-01 16:45:12 -04:00
Louis Dionne
ae8c12ce17 Remove useless include. 2014-07-01 10:58:01 -04:00
Louis Dionne
96a2bb0a7f Core: allow instances to be explicitly disabled 2014-07-01 10:51:42 -04:00
Louis Dionne
85877825f8 Replace defaults for Comparable by a smarter predicated instance. 2014-06-30 14:22:42 -04:00
Louis Dionne
fb75a6da25 Fix TODO in example/core/typeclass 2014-06-26 13:48:28 -04:00
Louis Dionne
379f30d981 Core: fix problems with typeclass specialization 2014-06-25 23:55:29 -04:00
Louis Dionne
ea37adf66b Core: rethink type classes 2014-06-23 15:37:29 -04:00
Louis Dionne
09b2fff78e Make StdTuple a Monad. 2014-06-19 16:13:18 -04:00
Louis Dionne
c7a7aa4c89 Core: add is_a and instantiates 2014-06-19 12:19:51 -04:00
Louis Dionne
7e32f59837 core: Add conversion between data types 2014-06-18 20:23:53 -04:00
Louis Dionne
4043adb494 Core: document and don't require core.hpp for instance and defaults 2014-06-18 16:13:54 -04:00