Commit Graph

148 Commits

Author SHA1 Message Date
Louis Dionne
17d2ce584c [Integral] Rename to IntegralConstant and improve the API 2015-02-10 20:03:49 -05:00
Louis Dionne
88549c004c [IntegralConstant] Remove the concept 2015-02-10 19:18:40 -05:00
Louis Dionne
dab93cc263 [Comparable] Update docs, split methods and more
- Use == for cross-type EqualityComparable data types
- Remove the not_equal mcd
2015-02-10 19:18:40 -05:00
Louis Dionne
d6ef326e94 [Product] Split methods, refactor doc and add Orderable instance 2015-02-08 10:43:12 -05:00
Louis Dionne
4654c6786a Split instances for foreign types 2014-12-06 16:30:16 -05:00
Louis Dionne
8d4b34f6c2 Do not use variable templates for one, zero & al.
This is because using variable templates limits the objects to being
constexpr, or to not being constexpr (but then initializing the object
becomes an issue).

This is also a step towards being compilable by GCC 4.9, but that only
would not justify the change.
2014-11-30 20:42:29 -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
d042abda97 Automatically test including individual headers. 2014-11-12 11:22:53 -05:00
Louis Dionne
515ade7cf6 Split Fusion adapters. 2014-11-12 11:22:52 -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
049046478e Move ASSERT macros out of the details 2014-11-04 09:43:44 -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
e70e06c831 Add support for std::ratio. 2014-10-20 11:50:43 -04:00
Louis Dionne
b09096c11f Split ext/ integral constants into different files. 2014-10-17 16:31:16 -04:00
Louis Dionne
4ff5485bd3 Remove workarounds for now-fixed libc++ #19616 2014-10-08 19:31:28 -04:00
Louis Dionne
2d10fb461a Use minimal includes in unit tests. 2014-09-01 18:14:55 -04:00
Louis Dionne
26af39f3d9 Flip the arguments of several methods.
Flipped:
- traverse
- fmap, adjust, fill, replace
- drop_while, drop_until
- take_while, take_until
2014-08-29 10:24:19 -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
cbeb6ae983 Core: add the make function 2014-08-25 12:33:49 -04:00
Louis Dionne
be808cca69 Re-add unit tests for Fusion adaptors 2014-08-25 12:33:48 -04:00
Louis Dionne
084fe9582d Re-add MPL vector. 2014-08-18 19:26:29 -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
a67c592a1f Fusion: instantiate Searchable 2014-08-10 16:46:09 -04:00
Louis Dionne
1d986e4c04 Refactor the unit tests and examples
In particular, merge some unit tests and examples to reduce compilation
times.
2014-08-10 15:42:03 -04:00
Louis Dionne
356ee03483 Refactor the unit tests and remove some minimal instances 2014-08-09 17:49:16 -04:00
Louis Dionne
da8135ccec Foldable: flip the arguments of some methods 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
f5bc67709e Add master headers for ext/ components 2014-08-05 14:01:46 -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
8c683c6e08 Adapt MPL IntegralConstants with Constant. 2014-07-30 19:00:06 -04:00
Louis Dionne
8a8ff797ab Split Core into subdirectories to reduce dependencies. 2014-07-30 11:15:26 -04:00
Louis Dionne
f66871ec2c MPLVector: Document and instantiate List. 2014-07-29 15:44:45 -04:00
Louis Dionne
61576fc1ae Functor: improve laws and check them widely 2014-07-19 15:08:58 -04:00
Louis Dionne
2eb9867ec5 Comparable: Check laws widely 2014-07-16 17:12:19 -04:00
Louis Dionne
7e8f109d7f Modularize List and add a minimal instance 2014-07-16 16:26:23 -04:00
Louis Dionne
20814674c0 Modularize Monad 2014-07-16 16:26:22 -04:00
Louis Dionne
83bd276b3e Modularize Functor 2014-07-16 16:26:22 -04:00
Louis Dionne
86c0d427a0 StdIntegerSequence: improve the Comparable instance. 2014-07-15 10:05:30 -04:00
Louis Dionne
8a3efe60fe StdTuple: Add note about redundant Applicative instance. 2014-07-14 20:45:14 -04:00
Louis Dionne
3889cbe0b8 ext/boost/fusion: use Boost.Fusion algorithms whenever possible. 2014-07-12 15:15:49 -04:00
Louis Dionne
53a4d872db Adapt boost::tuple. 2014-07-08 11:03:16 -04:00
Louis Dionne
6aa9c3e3c8 Add tests for Fusion tuple. 2014-07-08 10:17:33 -04:00
Louis Dionne
13b330fa41 Move mpl and fusion from ext/ to ext/boost/ 2014-07-08 10:13:02 -04:00
Louis Dionne
eecdf93453 Adapt non-associative ForwardSequences from Boost.Fusion. 2014-07-07 18:17:36 -04:00
Louis Dionne
5a2de2073e Reorganize and rename the adapted/ folder. 2014-07-07 12:42:20 -04:00