Louis Dionne
97f27661cb
[Tests] Split the unit tests for std::ratio and Either, and reduce hungry tests
2015-03-11 11:46:19 -04:00
Louis Dionne
5433debbf8
[Map] Split unit tests and remove usage of lambda
2015-03-10 09:30:07 -04:00
Louis Dionne
53b50c835b
[Tuple] Fix ambiguous overload of transform
2015-03-10 09:30:07 -04:00
Louis Dionne
39079fa95a
[Foldable] Add monadic folds
2015-03-10 09:30:07 -04:00
Louis Dionne
656b57e80b
[ext/utility] Add traits::declval
2015-03-10 09:30:07 -04:00
Louis Dionne
aecb7dcdef
Make sure Metafunctions are as SFINAE-friendly as possible
2015-03-10 09:30:06 -04:00
Louis Dionne
ea601ddf60
[Maybe] Add the sfinae utility
2015-03-10 09:30:06 -04:00
Louis Dionne
d10f8ec2ca
[CMake] Fix failing CMake when Boost is not found
2015-03-08 15:08:13 -04:00
Louis Dionne
6c076555a5
[ext/] Fix std::integer_sequence and mpl::vector failing tests
2015-03-08 11:56:27 -04:00
Louis Dionne
47dc4c7180
[String] Split the unit tests for Orderable and Comparable
2015-03-07 22:41:39 -05:00
Louis Dionne
8a73a3208e
[Map] Add make<Map> and remove map(...)
2015-03-07 21:28:07 -05: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
d525c20397
[Detail] Add an helper to compute tuple cartesian products
2015-03-07 12:09:02 -05:00
Louis Dionne
76ac948742
[Tracked] Do not output to std::cerr: too much output
2015-03-06 00:16:42 -05:00
Louis Dionne
90dd47d5f1
Less tests for sandbox::LambdaTuple; the whole thing takes too long
2015-03-05 21:50:54 -05:00
Louis Dionne
7c69ef7d98
[tests] Split the seq unit tests
2015-03-05 21:36:35 -05:00
Louis Dionne
4b44e867e1
[ext/] Add an experimental adapter for std::vector
2015-03-05 20:00:21 -05:00
Louis Dionne
d47bbdb876
[test::Tracked] Make it assignable
2015-03-05 19:44:25 -05:00
Louis Dionne
5216569ef2
[Tests] Split more unit tests
2015-03-05 16:57:37 -05:00
Louis Dionne
bb30d0e076
[ADL] Additional tests to make sure tuple_t and type handle ADL properly
2015-03-05 15:44:51 -05:00
Louis Dionne
cc76ebbba2
[IntegralDomain] Use rem instead of mod, and change laws so it's consistent with %
2015-03-05 12:25:50 -05:00
Louis Dionne
911e264884
[laws/Constant] Test both forms of hana::value
2015-03-05 11:46:00 -05:00
Louis Dionne
815a897ac2
[CMake] Create header inclusion test files only when they don't exist
2015-03-05 10:43:16 -05:00
Louis Dionne
479f5ef991
[Tests] Split more unit tests
2015-03-05 10:34:15 -05:00
Louis Dionne
b229a60e25
Refactor the automatic law checking to make it more modular
2015-03-05 09:35:06 -05:00
Louis Dionne
9388fe52eb
[CMake + Config] Successfully compile on Clang 3.5 and improve diagnostics
...
Also disable fusion's adapters tests, which are currently broken
2015-03-05 09:35:06 -05:00
Louis Dionne
5dcd26a5be
[MinimalProduct] Fix a bug where first and second would cause double move
2015-03-05 09:35:06 -05:00
Louis Dionne
47084ad4e0
[Tests] Fix failing test.seq.sequence.monad_plus_mcd
2015-03-04 17:48:53 -05:00
Louis Dionne
c239b5c035
Fix bugs where we read from non-constexpr variables
2015-03-04 16:57:38 -05:00
Louis Dionne
c93a250d87
[Constant] Make value
a nullary method depending only on the type
2015-03-04 16:36:40 -05:00
Louis Dionne
065b910128
Update copyright year.
2015-03-03 14:16:50 -05:00
Louis Dionne
f017c4493a
[Searchable] Swap {all,any,none} and their _of variant for consistency with the STL
2015-03-03 13:51:37 -05:00
Louis Dionne
da5c1a1ef1
[Ext] Re-add the old type_traits integration
2015-03-02 16:13:55 -05:00
Louis Dionne
87145a4a7f
[IntegralConstant] Use nested hana::datatype so we can inherit them
2015-03-02 09:16:59 -05:00
Louis Dionne
dd86906e2d
[Tuple] Make sure _tuple is default constructible when its elements are
2015-02-28 11:35:33 -05:00
Louis Dionne
7e2bcdfee0
[ext/mpl] MPL vectors are not Sequences anymore
2015-02-27 11:34:21 -05:00
Louis Dionne
689ab952f8
[Orderable, Comparable] Add signatures and partially appliable methods
2015-02-25 12:39:05 -05:00
Louis Dionne
aa6eac6c3d
[Config] Move BOOST_HANA_CONSTEXPR_LAMBDA to config.hpp
2015-02-25 10:20:12 -05:00
Louis Dionne
33cba2dea8
[MplVector] Fix broken include in unit test
2015-02-25 09:19:59 -05:00
Louis Dionne
c13f660ecc
[MonadPlus] Add signatures and rename nil to empty
2015-02-25 09:19:58 -05:00
Louis Dionne
771a5e39d7
[Range] Implement efficient lookup and elem methods
2015-02-24 19:54:21 -05:00
Louis Dionne
edd086423e
[Tuple] Replace tuple(...) by make<Tuple>(...) in the docs
2015-02-24 18:15:24 -05:00
Louis Dionne
6d8e5b61a0
[Functional/Placeholder] Refactor test and add a missing include
2015-02-24 14:03:14 -05:00
Louis Dionne
ffd4cba716
Two-step definition for _tuple_t and _type
2015-02-23 21:46:43 -05:00
Louis Dionne
e7e9391147
[Iterable] Remove operator[] overload for const&&
2015-02-23 21:46:43 -05:00
Louis Dionne
2a8b52cf17
[Type] decltype(type<T>)
should inherit from _type<T>
2015-02-23 19:34:48 -05:00
Louis Dionne
df97a4dfc1
[Set] Add a model of Foldable
2015-02-23 15:04:45 -05:00
Louis Dionne
4e387cc2ff
[Functional] Change the implementation of arg<n> so it can perfect forward.
2015-02-23 08:09:04 -05:00
Louis Dionne
0db2edff55
[test::numeric] Fix a bug with operators
2015-02-22 16:50:01 -05:00
Louis Dionne
3e78af4bcb
[Tuple] Use make<Tuple>(...) instead of tuple(...)
2015-02-22 16:50:01 -05:00
Louis Dionne
0e197829ca
[Sandbox] Remove old mcd graph experiment
2015-02-22 16:50:00 -05:00
Louis Dionne
7dad374f1f
[Tuple] Fix a nasty double-move in flatten
2015-02-22 16:50:00 -05:00
Louis Dionne
8c6bdb3a3f
[Tuple] Fix a bug in transform with tuple_t
2015-02-22 14:55:36 -05:00
Louis Dionne
f772374179
[Searchable] Add a model for builtin arrays.
2015-02-22 14:55:36 -05:00
Louis Dionne
f64a130985
[Comparable] Test operators automatically
2015-02-22 14:55:35 -05:00
Louis Dionne
d120513366
Rename cons to prepend and snoc to append
2015-02-22 14:55:35 -05:00
Louis Dionne
62ede37419
Rename fmap to transform
2015-02-22 14:55:35 -05:00
Louis Dionne
0323eb185d
[Test] Move record_macros.cpp and remove unused builtin.hpp
2015-02-22 14:55:35 -05:00
Louis Dionne
7ceadaae67
[Tuple] Add examples and slightly improve tests
2015-02-22 14:55:35 -05:00
Louis Dionne
734f89190c
[Core] Refactor the operator system
2015-02-20 11:05:44 -05:00
Louis Dionne
f0c66b31f8
Remove outdated core/ tests and reorganize tests
2015-02-20 11:05:44 -05:00
Louis Dionne
5464f58131
[Sandbox] Remove outdated experiments
2015-02-20 11:05:44 -05:00
Louis Dionne
f31bb617d5
[Tuple] Implement an efficient sort for tuple_c
s
2015-02-20 11:05:44 -05:00
Louis Dionne
9604c9a9f6
Replace List by Sequence
2015-02-20 11:05:43 -05:00
Louis Dionne
eda87ce328
[Monad] Add Monad::ap_impl to simplify modelling Applicative
2015-02-17 15:11:23 -05:00
Louis Dionne
272ffa7900
Add the MonadPlus concept
2015-02-17 15:11:07 -05:00
Louis Dionne
964851bb76
[Foldable] Split tests and remove now useless foreign tests
2015-02-17 00:56:11 -05:00
Louis Dionne
02c9c47510
Remove TypeList and IntegerList
2015-02-15 12:38:04 -05:00
Louis Dionne
15a5a03953
[Bool] Make bool_<...> an alias to integral_constant<bool, ...>.
2015-02-15 11:27:20 -05:00
Louis Dionne
9693a7c2e3
[test::CNumeric] Remove unused mcds
2015-02-15 10:42:52 -05:00
Louis Dionne
5ba0de6bfc
[Orderable] Check for total ordering in the unit tests
2015-02-15 10:42:52 -05:00
Louis Dionne
737f20a5bb
[models] Implement models for each concept; no need to explicitly specialize it
2015-02-15 10:31:12 -05:00
Louis Dionne
337167bbb3
[Traversable] Refactor documentation and split methods
2015-02-15 09:08:02 -05:00
Louis Dionne
681116f0db
[Iterable] Refactor documentation and split methods
2015-02-15 09:08:02 -05:00
Louis Dionne
8e744413be
[Record] Refactor documentation and split methods
2015-02-13 12:00:14 -05:00
Louis Dionne
e4d75ef25a
[Foldable] Refactor documentation and split methods
2015-02-12 11:58:39 -05:00
Louis Dionne
c5f20a51d2
[Searchable] Split methods and refactor documentation
2015-02-12 10:10:38 -05:00
Louis Dionne
f99a35fba6
[Monad] Refactor documentation and split methods
2015-02-11 11:15:16 -05:00
Louis Dionne
dbf7445a3c
[Applicative] Refactor the documentation and split methods
2015-02-11 10:37:01 -05:00
Louis Dionne
8a3e5f794d
[Functor] Refactor documentation and split methods
2015-02-10 20:34:41 -05:00
Louis Dionne
9c32ebe263
[Detail] Remove detail::n_times, which is replaced by int_<i>.times
2015-02-10 20:03:49 -05:00
Louis Dionne
17d2ce584c
[Integral] Rename to IntegralConstant and improve the API
2015-02-10 20:03:49 -05:00
Louis Dionne
5dd70cbf3a
[String] Remove the Constant model and document why
2015-02-10 19:18:40 -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
9ddad3dc22
[Orderable] Split completely
2015-02-10 18:04:30 -05:00
Louis Dionne
c2b51f3780
[Logical] Split completely
2015-02-10 18:04:30 -05:00
Louis Dionne
1d3aaa93c4
[Monoid up to IntDomain] Refactor the documentation and split the methods
2015-02-10 18:03:42 -05:00
Louis Dionne
a06100c268
[Enumerable] Refactor the documentation and split the methods
2015-02-10 18:03:19 -05:00
Louis Dionne
04985812f8
[Range] Specify what happens when from
and to
have different underlying types
2015-02-10 18:03:19 -05:00
Louis Dionne
0ac6753f27
[Constant] Update the Constant concept and its models
...
- Provide a conversion to the underlying data type
- Provide a common data type when it makes sense
- Remove Constant::instance and Constant::mcd
- Split the methods of all the models
- Make sure all models provide a nested value_type
- Make sure all models provide conversions whenever possible
2015-02-10 18:03:19 -05:00
Louis Dionne
c0690e3747
[CMake] Do not generate header-inclusion tests for ext/boost/* when Boost is not found
2015-02-10 18:03:19 -05:00
Louis Dionne
2604c9eb53
[Detail] Add the CanonicalConstant helper
2015-02-10 18:03:18 -05:00
Louis Dionne
61d59eff57
[Core] Refactor the conversion system, hana::common and add hana::default
2015-02-10 18:02:32 -05:00
Louis Dionne
50dc7506ff
[Functional] Make the placeholder-based operators SFINAE-friendly
2015-02-08 10:51:00 -05:00
Louis Dionne
d6ef326e94
[Product] Split methods, refactor doc and add Orderable instance
2015-02-08 10:43:12 -05:00
Louis Dionne
d5076888fb
[Type] Split methods and refactor the documentation
2015-02-08 09:22:39 -05:00
Louis Dionne
4892c4ad42
[Tuple] Add tuple_t and tuple_c to ease the transition to split methods
2015-02-08 09:22:39 -05:00
Louis Dionne
507aaa033d
[String] Split methods and refactor
2015-02-08 09:22:39 -05:00
Louis Dionne
3947f264c1
[Maybe] Split methods and refactor documentation.
2015-02-08 09:22:39 -05:00
Louis Dionne
245819eb71
[Either] Split methods and refactor documentation
2015-02-08 09:22:39 -05:00
Louis Dionne
9dd3391130
[CMake] Fix typo: CMAKE_CURRENT_LIST_DIRECTORY => CMAKE_CURRENT_LIST_DIR
2015-02-06 18:01:40 -05:00
Louis Dionne
ee648c2bda
[Core] Fix issue with when_valid
2015-02-04 23:02:04 -05:00
Louis Dionne
6d6c9ce923
Remove unused minimal_list.hpp file
2015-01-17 15:45:39 -05:00
Louis Dionne
6f267bd37b
Add detail::generate_integer_sequence
.
2015-01-13 15:49:30 -05:00
Louis Dionne
e8b470aa18
Improve the MCD graph experiment
2015-01-12 15:56:18 -05:00
Louis Dionne
4654c6786a
Split instances for foreign types
2014-12-06 16:30:16 -05:00
Louis Dionne
0371952337
Make while_
part of Logical
2014-12-06 16:30:14 -05:00
Louis Dionne
21bdeb39ae
Only enable operators where needed with test::Seq.
2014-12-01 17:09:43 -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
51912d8661
Add detail::while_
and detail::until
.
2014-11-29 12:17:25 -05:00
Louis Dionne
e043d1c046
Fix bug when returning a dangling reference from always
.
...
Fixes #15 .
2014-11-23 10:04:50 -05:00
Louis Dionne
8845b2a0c1
Use common
to provide inter data type instances.
2014-11-17 10:05:58 -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
12bb5b1fa4
Core: refactor convert
2014-11-17 09:13:36 -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
1d075a6679
List: improve unit tests
2014-11-10 22:29:22 -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
e0e2501931
List: add the remove_at method
2014-11-08 12:32:51 -05:00
Louis Dionne
19b5cd44cf
Improve unit tests for detail::create
2014-11-07 21:33:24 -05:00
Louis Dionne
584c16a746
Work around Clang bugs to make the String compile.
2014-11-07 21:33:23 -05:00
Louis Dionne
0ef90fbf39
Type: add a unary operator+ turning lvalues into rvalues.
...
Fixes #11
2014-11-07 20:31:26 -05:00
Louis Dionne
7b7bda5998
Experiment with adding operators to Types.
2014-11-07 20:31:26 -05:00
Louis Dionne
29995f62ee
Work around bugs in Clang 3.5.
2014-11-07 20:31:26 -05:00
Louis Dionne
b9472015d1
Add the overload utility to Functional
2014-11-07 20:31:26 -05:00
Louis Dionne
da8fb2b486
Add laws to Enumerable.
2014-11-07 19:46:25 -05:00
Louis Dionne
0f0c2c4430
Replace when<is_valid<...>> by when_valid<...>
2014-11-07 15:41:10 -05:00
Louis Dionne
98a39c1204
Remove superfluous #define BOOST_PP_VARIADICS 1.
2014-11-07 10:57:48 -05:00
Louis Dionne
6e86e1f319
Searchable: add some laws
2014-11-05 13:32:45 -05:00
Louis Dionne
049046478e
Move ASSERT macros out of the details
2014-11-04 09:43:44 -05:00
Louis Dionne
1e8726f394
Make the tuple implementation constexpr-friendly.
...
- Move the lambda-based tuple to the sandbox
- Use the multiple inheritance based tuple instead
2014-11-04 09:02:31 -05:00
Louis Dionne
57087cd249
Functional: make lockstep's syntax like demux's
2014-11-04 08:54:59 -05:00
Louis Dionne
647ad436b0
Reorganize the unit tests and increase the overall coverage.
2014-11-04 08:54:58 -05:00
Louis Dionne
217e1d2b46
Add BOOST_HANA_ASSERT.
2014-11-03 10:22:19 -05:00
Louis Dionne
f33c23b67e
Add an alternative tuple implementation using multiple inheritance.
2014-11-03 10:22:19 -05:00
Louis Dionne
d188e19938
Make functional utilities constexpr friendly
2014-10-28 14:38:49 -04:00
Louis Dionne
8590ce9376
Add detail::reverse_partial
2014-10-28 14:38:49 -04:00
Louis Dionne
ce06df1a68
Make test::numeric constexpr-friendly.
2014-10-28 14:22:59 -04:00
Louis Dionne
c37916cdd4
Make variadic folds function objects.
2014-10-28 14:22:59 -04:00
Louis Dionne
f6af15fe31
Update fix's test
2014-10-28 14:22:59 -04:00
Louis Dionne
a6310a046d
Simplify the closure type
2014-10-28 14:22:58 -04:00
Louis Dionne
629b487d4c
Add the detail::create utility.
2014-10-28 13:51:05 -04:00
Louis Dionne
ca821c9455
Move Searchable::list_mcd to Searchable::iterable_mcd.
2014-10-27 17:27:54 -04:00
Louis Dionne
eddece8d00
Use the nested hana struct to define enabled operators.
2014-10-27 16:31:03 -04:00
Louis Dionne
cc8455dd65
Use the nested hana struct to instantiate unary type classes.
2014-10-27 16:14:02 -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
a9743f3dde
Add the Ring::power method.
2014-10-27 14:59:20 -04:00
Louis Dionne
087f48010d
Fix typo in test::CNumeric.
2014-10-27 14:59:20 -04:00
Louis Dionne
c2541c3713
Add detail::closure based on multiple-inheritance
2014-10-25 14:34:31 -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
a74bb80490
Type: clean up and remove misplaced functionality
...
The ability to construct objects of a type T by calling the type<T>
object was removed; make<T> should be used instead.
2014-10-22 12:27:33 -04:00
Louis Dionne
e6c16a1394
Add more laws to Functor.
2014-10-22 10:43:16 -04:00
Louis Dionne
806b941603
Instantiate Searchable and Iterable with String.
2014-10-21 23:53:28 -04:00
Louis Dionne
e70e06c831
Add support for std::ratio.
2014-10-20 11:50:43 -04:00
Louis Dionne
ac528b81ba
Add the insert function to Set.
2014-10-17 18:29:50 -04:00
Louis Dionne
b09096c11f
Split ext/ integral constants into different files.
2014-10-17 16:31:16 -04:00
Louis Dionne
653d083eb0
Instantiate Foldable and Orderable with String.
2014-10-17 10:23:31 -04:00
Louis Dionne
f4276a5dcf
Remove outdated operator_ experiment.
2014-10-17 09:31:01 -04:00
Louis Dionne
716ff897cc
Add the Enumerable type class.
2014-10-16 20:52:29 -04:00
Louis Dionne
d496ec6bbc
Change the syntax of demux
.
2014-10-16 19:32:09 -04:00
Louis Dionne
f0d9e9b9bb
Add the intersperse method to List.
2014-10-16 16:56:39 -04:00
Louis Dionne
1280806839
Provide an instance of Foldable for Products.
2014-10-16 08:43:08 -04:00
Louis Dionne
177a7f11f3
Add an overload utility to the sandbox.
2014-10-14 17:38:56 -04:00
Louis Dionne
4335c4915c
Move list/free/convert.hpp to list/convert.hpp
2014-10-11 16:04:12 -04:00
Louis Dionne
002320cdf6
Add variadic take and variadic split_at.
2014-10-11 15:58:04 -04:00
Louis Dionne
88579de954
Allow folding move-only rvalue Records by constraining accessors.
2014-10-11 14:26:39 -04:00
Louis Dionne
5c0755b496
Fix bugs where we default initialized lambdas.
2014-10-08 20:46:10 -04:00
Louis Dionne
4ff5485bd3
Remove workarounds for now-fixed libc++ #19616
2014-10-08 19:31:28 -04:00
Louis Dionne
241671ef0e
Add perfect forwarding in some functional utilities
2014-10-05 15:14:22 -04:00
Louis Dionne
7338838d46
Allow template types with multiple arguments in BOOST_HANA_DEFINE_RECORD.
2014-10-05 01:30:37 -04:00
Louis Dionne
0c1dd29224
Improve some conversion operators.
...
- Add perfect forwarding
- Allow Maps and Sets to be created from Foldables instead of Lists
2014-10-04 22:58:39 -04:00
Louis Dionne
1104f76d48
Add perfect forwarding in some places in Tuple
2014-10-04 20:13:14 -04:00
Louis Dionne
a7b28bddd8
Add more perfect forwarding and do some refactoring.
2014-10-02 21:05:01 -04:00
Louis Dionne
e7b48ee23c
Use compile-time strings as keys in records
2014-09-30 10:42:55 -04:00
Louis Dionne
c184a742fb
Add compile-time strings
2014-09-30 10:23:45 -04:00
Louis Dionne
d06cd559ba
Add the times method to Integrals
2014-09-29 16:31:59 -04:00
Louis Dionne
539ed83248
Fix a dangling reference bug in functional/id.
2014-09-29 11:15:00 -04:00
Louis Dionne
a434f561d4
Add perfect forwarding in variadic folds and for_each.
2014-09-26 15:29:36 -04:00
Louis Dionne
a44e9b8d17
Benchmark a different way of reversing a parameter pack.
2014-09-22 11:13:28 -04:00
Louis Dionne
a7525b71e3
Fixes #8
2014-09-16 19:41:06 -04:00
Louis Dionne
18fef19050
List: add the repeat method
2014-09-11 08:22:12 -07:00
Louis Dionne
2689a3733f
Add compile-time strings
2014-09-10 17:54:11 -07:00
Louis Dionne
9fbf074c55
Record: refactor macros to make them more user-friendly
2014-09-09 13:01:11 -07:00
Louis Dionne
a6d4511684
Record: Allow the intrusive macro to be used inside a function.
2014-09-09 10:43:25 -07:00
Louis Dionne
1b021fcd89
Record: Allow instantiating with macros.
2014-09-09 10:32:04 -07:00
Louis Dionne
3bb1bb9c6b
Allow instantiating unary type classes from a data type.
2014-09-08 22:39:10 -07:00
Louis Dionne
f272196bdc
Sandbox: Add a Rose-tree
2014-09-07 08:22:08 -07:00
Louis Dionne
0065ced91d
Add operator[] for Tuple and Range.
2014-09-05 17:02:50 -04:00
Louis Dionne
7a3dd8ae8a
Example: Add the homogeneous Matrix example for CppCon.
2014-09-04 09:30:12 -04:00
Louis Dionne
3da09cc73e
Core: is_a also allows checking for data types
2014-09-03 09:21:59 -04:00
Louis Dionne
943c59c0a1
Refactor benchmarks.
2014-09-02 13:21:51 -04:00
Louis Dionne
2d10fb461a
Use minimal includes in unit tests.
2014-09-01 18:14:55 -04:00
Louis Dionne
980cda48ef
Detail: add variadic::drop_into
2014-09-01 10:02:45 -04:00
Louis Dionne
118ca61066
Range: optimize the Foldable instance and fix includes
2014-08-31 20:27:23 -04:00
Louis Dionne
faef709431
Minor improvements:
...
- Test that detail::variadic::at can handle const objects
- Add perfect forwarding in functional/id
- Sandbox: experiment with a std compatible tuple
2014-08-31 10:16:03 -04:00
Louis Dionne
af0e2444ed
Set: fix the Comparable instance so it works with runtime keys
2014-08-30 14:25:56 -04:00
Louis Dionne
fadb7a2af0
Core: document how operators work.
2014-08-29 11:18:26 -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
d6b765f794
Add variadic::reverse_apply
2014-08-28 10:47:35 -04:00
Louis Dionne
4df525ffa1
Sandbox: improve graph-based method resolution
2014-08-28 10:32:16 -04:00
Louis Dionne
7fc29e4a3c
Sandbox: experiment with autonomous methods
2014-08-27 10:33:07 -04:00
Louis Dionne
00642be684
Add the Either
data type.
2014-08-26 15:09:51 -04:00
Louis Dionne
81a242c1f1
Replace into
by make
in the List type class.
2014-08-25 16:48:02 -04:00
Louis Dionne
cbeb6ae983
Core: add the make function
2014-08-25 12:33:49 -04:00
Louis Dionne
04c3fffbd8
Foreign: instantiate Foldable for builtin arrays
2014-08-25 12:33:48 -04:00
Louis Dionne
7cc729bd05
List: add the slice method
2014-08-25 12:33:48 -04:00
Louis Dionne
22783efc1b
Sandbox: add experimental optimized tuple
2014-08-25 12:33:48 -04:00
Louis Dionne
ae8442482d
Do not bring operators in the hana namespace automatically.
...
This caused an issue with types defined in the hana namespace and
type class instances for foreign types. For example, doing
`Integral{} == Integral{}` would hit the recursion depth limit
because `Integral` was defined in `boost::hana`, so ADL found
`boost::hana::operators::operator==` and we recursed in the foreign
instance for `Comparable`.
2014-08-25 12:33:48 -04:00
Louis Dionne
c4e4313c8e
Remove the Foreign data type.
...
The Foreign data type made stuff like `to<int>` become
`to<Foreign<int>>`, which is not as clean.
2014-08-25 12:33:48 -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
3692a7bb81
Add the IntegralConstant type class
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
7894be3e2f
Searchable: add the subset
method
2014-08-16 14:25:58 -04:00
Louis Dionne
a6b978064b
Uncover a bug with ADL-enabled operators
2014-08-16 14:25:57 -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
4c13c21f91
Add the IntegralDomain type class
2014-08-10 12:57:37 -04:00
Louis Dionne
f61ec22e11
Remove the Identity functor, which is now detail::Identity
2014-08-09 17:52:39 -04:00
Louis Dionne
356ee03483
Refactor the unit tests and remove some minimal instances
2014-08-09 17:49:16 -04:00
Louis Dionne
cb9be38cf1
Add the Ring type class.
2014-08-09 09:45:33 -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
e71fedf457
Sandbox: remove outdated assert experiment
2014-08-07 18:05:19 -04:00
Louis Dionne
3d5acb2080
Remove old scattered operations on variadics
2014-08-07 17:56:30 -04:00
Louis Dionne
fecf7309d1
Add the Group type class
2014-08-07 17:01:22 -04:00
Louis Dionne
6c10ce440c
Add the Identity functor.
2014-08-07 16:51:50 -04:00
Louis Dionne
b46db0bdc0
Add the Monoid type class
2014-08-07 16:51:49 -04:00
Louis Dionne
4a3f458f71
TypeList: use Foldable::unpack_mcd
2014-08-06 22:27:53 -04:00
Louis Dionne
af36f99f5d
Foldable: add unpack_mcd
2014-08-06 18:17:47 -04:00
Louis Dionne
c7af842ea5
Detail: refactor variadic folds and at
2014-08-06 17:59:24 -04:00
Louis Dionne
82bc4a38da
List: add span
, group
and group_by
2014-08-06 11:08:10 -04:00
Louis Dionne
2f16a364af
Comparable: add the comparing
helper function
2014-08-06 11:08:10 -04:00
Louis Dionne
64e160f9ab
Searchable: add the in
utility function
2014-08-06 08:38:45 -04:00
Louis Dionne
2fb2b097c7
Sandbox: remove tuple implementation (posted to comp.lang.c++.moderated)
2014-08-06 00:24:10 -04:00
Louis Dionne
1d031b4556
Functional: add infix
and use it to implement on
2014-08-05 22:49:18 -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
da8135ccec
Foldable: flip the arguments of some methods
2014-08-05 19:52:44 -04:00
Louis Dionne
2900faec86
List: flip the order of 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
a7b38d3fff
Range: add the range_c constructor
2014-08-05 14:44:02 -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
bf5eb10c46
Sandbox: remove old Logical experiment.
2014-08-05 10:36:54 -04:00
Louis Dionne
b2e8017de8
Integral: make equivalent to a corresponding std::integral_constant
2014-08-04 18:44:38 -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
8c683c6e08
Adapt MPL IntegralConstants with Constant.
2014-07-30 19:00:06 -04:00
Louis Dionne
c6f0420145
Functional: pimp the documentation
2014-07-30 15:21:39 -04:00
Louis Dionne
3488fe71cb
Rename groups to avoid clashes when doing references
2014-07-30 11:23:38 -04:00
Louis Dionne
8a8ff797ab
Split Core into subdirectories to reduce dependencies.
2014-07-30 11:15:26 -04:00
Louis Dionne
6c852e957e
Make Constant a type class
2014-07-30 08:55:07 -04:00
Louis Dionne
f66871ec2c
MPLVector: Document and instantiate List.
2014-07-29 15:44:45 -04:00
Louis Dionne
a5ea16fb35
Sandbox: remove the worksheet and gitignore it.
2014-07-29 13:17:29 -04:00
Louis Dionne
aaf8897cb8
Searchable: rename find_mcd
to mcd
2014-07-29 10:14:01 -04:00
Louis Dionne
36edeacbc8
Maybe: refactor the documentation and add only_when
2014-07-29 10:09:06 -04:00
Louis Dionne
9199f53ae2
Reintroduce foldl optimizations for TypeList.
2014-07-29 01:26:18 -04:00
Louis Dionne
41d6b75bc2
Add the product Type class and make Pair a simple data type
2014-07-28 18:35:57 -04:00
Louis Dionne
993fc4d4e2
Sandbox: add only_when
2014-07-27 16:57:38 -04:00
Louis Dionne
9ca69bca71
Type: revert commit making metafunction & al SFINAE friendly
2014-07-27 16:57:37 -04:00
Louis Dionne
d9c1d44992
Type: make metafunction
and friends SFINAE friendly
2014-07-27 16:57:37 -04:00
Louis Dionne
14f890b4b2
Iterable: refactor docs and make FoldableInstance a detail of implementation
2014-07-27 16:57:36 -04:00
Louis Dionne
dab794edb1
Orderable: Refactor docs and add the ordering
utility
2014-07-27 16:57:36 -04:00
Louis Dionne
1b4cfc9191
List: add the unzip
method
2014-07-24 14:16:09 -04:00
Louis Dionne
0fb8990a13
List: add the unfoldr
and unfoldl
methods
2014-07-24 13:24:45 -04:00
Louis Dionne
96458f7c47
Sandbox: add list_of experiment
2014-07-24 11:50:52 -04:00
Louis Dionne
3e75ad9159
Integral: Allow comparison and ordering with any arithmetic type
2014-07-24 11:34:10 -04:00
Louis Dionne
c42aeba92c
Monad: add the tap
method
2014-07-24 10:15:06 -04:00
Louis Dionne
a0133f546e
Monad: replace >> by |
2014-07-24 09:43:16 -04:00
Louis Dionne
a0acbacc84
Monad: add the then
method to sequence monadic actions
2014-07-24 09:26:20 -04:00
Louis Dionne
7d5243a312
Type: fix bug in construction and force explicit use of intializer_list
2014-07-24 08:48:38 -04:00
Louis Dionne
95d227cd57
Lazy: allow calls of the form lazy(f)().
2014-07-23 20:43:34 -04:00
Louis Dionne
310b44666d
Comparable: make objects of different data types compare uneual by default
2014-07-23 20:11:00 -04:00
Louis Dionne
0da52c6c72
Clear the worksheet that was accidentally committed with changes.
2014-07-23 09:20:59 -04:00
Louis Dionne
89a9a110e7
CMake: Handle dependencies on Boost properly
2014-07-23 07:22:49 -04:00
Louis Dionne
aacfbfebde
Tutorial: write the preface, introduction and quick start
2014-07-22 13:49:15 -04:00
Louis Dionne
c816fbe112
Remove almost all dependencies on the standard library.
2014-07-21 21:07:14 -04:00
Louis Dionne
aba2bae382
Record: Fix ordering issues by using a list of pairs instead of a map
2014-07-21 15:47:12 -04:00
Louis Dionne
d0a83b8d30
Functional: Allow 2 arguments or more in compose
2014-07-21 14:57:19 -04:00
Louis Dionne
3ead270cc0
Add the Record type class to adapt user defined types.
2014-07-21 13:53:27 -04:00
Louis Dionne
63904e198e
Sandbox: Add AssociativeUDT -> Map conversions
2014-07-21 12:15:44 -04:00
Louis Dionne
6c9823e176
Add the Constant data type.
2014-07-21 11:58:23 -04:00
Louis Dionne
15af56943a
Core: Workaround Clang bug in is_a and is_an
2014-07-21 10:45:21 -04:00
Louis Dionne
1452a253ee
Sandbox: Experiment with user-defined types
2014-07-21 09:45:02 -04:00
Louis Dionne
6d150cf5ee
List: add scanr, scanl, scanr1 and scanl1
2014-07-20 14:25:10 -04:00
Louis Dionne
ddeaf6a2bc
Remove incorrect TODO item
2014-07-19 19:01:56 -04:00
Louis Dionne
3ccf6f4d62
Searchable: rename find_key to lookup
2014-07-19 18:58:14 -04:00
Louis Dionne
5a00d66ad6
Add the Set data type.
2014-07-19 18:24:39 -04:00
Louis Dionne
97386dfb59
Add the Map data type.
2014-07-19 17:17:14 -04:00
Louis Dionne
61576fc1ae
Functor: improve laws and check them widely
2014-07-19 15:08:58 -04:00
Louis Dionne
120410868e
Searchable: add the find_key method
2014-07-19 13:42:46 -04:00
Louis Dionne
888e84f4e5
Foldable: Remove lazy_foldr and lazy_foldl
2014-07-19 13:29:41 -04:00
Louis Dionne
e051255009
List: instantiate Searchable
2014-07-19 11:44:34 -04:00
Louis Dionne
aaea302ea9
Maybe: instantiate Searchable
2014-07-19 11:44:34 -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
0010b72a2e
Sandbox: add SearchableSet
2014-07-18 14:50:55 -04:00
Louis Dionne
1d2bda9ef1
Fix ambiguities when defining stuff in the operators namespace
2014-07-17 18:30:40 -04:00
Louis Dionne
e95882b790
Start moving the sandbox out of detail/
2014-07-17 16:19:38 -04:00
Louis Dionne
3a7944a6de
Check laws for Orderable
2014-07-17 12:00:30 -04:00
Louis Dionne
114d8d9ed0
test/list/datatype -> test/list/instance for consistency with test/pair/instance
2014-07-16 17:14:29 -04:00
Louis Dionne
2eb9867ec5
Comparable: Check laws widely
2014-07-16 17:12:19 -04:00
Louis Dionne
b6e46748df
Add missing foldable_instance includes.
2014-07-16 16:26:23 -04:00
Louis Dionne
7e8f109d7f
Modularize List and add a minimal instance
2014-07-16 16:26:23 -04:00
Louis Dionne
408a5c7db5
Modularize Pair
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
674a889347
Modularize Foldable
2014-07-16 16:26:23 -04:00
Louis Dionne
8492b8eea4
Modularize Orderable
2014-07-16 16:26:22 -04:00
Louis Dionne
3c5aa0aceb
Modularize Traversable
2014-07-16 16:26:22 -04:00
Louis Dionne
20814674c0
Modularize Monad
2014-07-16 16:26:22 -04:00
Louis Dionne
489353c0cc
Modularize Applicative
2014-07-16 16:26:22 -04:00
Louis Dionne
83bd276b3e
Modularize Functor
2014-07-16 16:26:22 -04:00
Louis Dionne
c8e8d88753
Modularize Comparable
2014-07-16 16:26:22 -04:00
Louis Dionne
3da2af3ba2
Core: Add test with parametric data type + predicated instance
2014-07-16 16:26:21 -04:00
Louis Dionne
5d68bcdf45
Iterable: Remove the provided Comparable instance
2014-07-15 10:30:50 -04:00
Louis Dionne
c5e3352180
Core: workaround an assertion in Clang with to
being a lambda
2014-07-15 10:28:44 -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
b19c801958
Lazy: refactor and make lazy
more intuitive.
2014-07-14 20:45:14 -04:00
Louis Dionne
bfc71e548c
Functional: make sure curry<N> is idempotent.
2014-07-14 20:45:14 -04:00
Louis Dionne
41c80e1d44
Applicative: make ap variadic.
2014-07-14 20:45:14 -04:00
Louis Dionne
de2959db74
Monad: add >> operator as an equivalent to bind.
2014-07-14 20:45:06 -04:00
Louis Dionne
40a3ef71c0
Add the Traversable type class.
2014-07-14 10:40:45 -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
87224fba92
Reorganize Monad unit tests.
2014-07-13 19:47:07 -04:00
Louis Dionne
f998098500
Reorganize Iterable unit tests.
2014-07-13 19:47:07 -04:00
Louis Dionne
e0a981d58a
Reorganize Functor unit tests.
2014-07-13 19:47:06 -04:00
Louis Dionne
a0945bc6de
Reorganize Foldable unit tests.
2014-07-13 19:47:06 -04:00
Louis Dionne
cb69c60031
Reorganize Comparable unit tests.
2014-07-13 19:47:06 -04:00
Louis Dionne
cf531e560e
List: use a more efficient right fold.
2014-07-13 11:42:03 -04:00
Louis Dionne
3248004409
Move the Lazy data type from the sandbox to the library.
2014-07-12 18:11:27 -04:00
Louis Dionne
3889cbe0b8
ext/boost/fusion: use Boost.Fusion algorithms whenever possible.
2014-07-12 15:15:49 -04:00
Louis Dionne
76bd4fb2fa
sandbox: add Any to strong datatypes.
2014-07-12 11:59:58 -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
41eefb2d29
Remove meaningless or redundant (implied) todos.
2014-07-07 21:33:07 -04:00
Louis Dionne
48bb45394f
Type: add a not-too-dirty way to optimize metafunction classes.
2014-07-07 21:33:06 -04:00
Louis Dionne
573c863c49
Type: make metafunction, metafunction_class and template_ valid metafunction classes.
2014-07-07 20:05:11 -04:00
Louis Dionne
eecdf93453
Adapt non-associative ForwardSequences from Boost.Fusion.
2014-07-07 18:17:36 -04:00
Louis Dionne
63e392bde2
Sandbox: prototype for better law checking.
2014-07-07 15:48:30 -04:00
Louis Dionne
7c6d9dd5bc
Iterable: add the for_each method
2014-07-07 15:45:31 -04:00
Louis Dionne
0db5c33548
Add laws for Comparable.
2014-07-07 13:56:51 -04:00
Louis Dionne
5a2de2073e
Reorganize and rename the adapted/ folder.
2014-07-07 12:42:20 -04:00
Louis Dionne
9bcf7a8f01
Sandbox: explore strong data types.
2014-07-07 11:34:24 -04:00
Louis Dionne
7cb6678d7a
Adapt mpl::vector.
2014-07-07 10:20:13 -04:00
Louis Dionne
55a4964434
Adapt mpl::list.
2014-07-07 10:06:17 -04:00
Louis Dionne
9f94924134
Plug the benchmarks with CMake.
2014-07-06 14:59:59 -04:00
Louis Dionne
b89821bed4
Sandbox: Add a Lazy datatype which is a Monad.
2014-07-02 15:43:32 -04:00
Louis Dionne
ad60989660
Sandbox: add a basic Set data structure
2014-07-02 13:41:22 -04:00
Louis Dionne
ffbbfc3528
Sandbox: rename Map to HashMap and create a naive Map
2014-07-02 13:10:56 -04:00
Louis Dionne
5efa23003f
Rename join to flatten.
2014-07-01 22:04:56 -04:00
Louis Dionne
faf609157a
Remove circular dependencies.
2014-07-01 20:41:04 -04:00
Louis Dionne
ddc0587689
Iterable: remove comparison between arbitrary Iterables
2014-07-01 18:01:42 -04:00
Louis Dionne
70a6c913b7
Type: refactor the interface
2014-07-01 17:32:32 -04:00
Louis Dionne
39c9b1b8e2
Add the bool.hpp header.
2014-07-01 16:45:12 -04:00
Louis Dionne
96a2bb0a7f
Core: allow instances to be explicitly disabled
2014-07-01 10:51:42 -04:00
Louis Dionne
2ad7b11509
Sandbox: prototype for finer-grained operator ADL-enabling
2014-06-30 18:08:51 -04:00
Louis Dionne
6a984f3d52
Integral: Remove redundant operators
2014-06-30 16:21:08 -04:00
Louis Dionne
a98850aea3
Sandbox: Remove obsolete Comparable experiments.
2014-06-30 16:21:08 -04:00
Louis Dionne
b845aa71b8
Orderable: add a default instance
2014-06-30 16:21:08 -04:00
Louis Dionne
fb0f102c11
StdArray: use equal instead of == in tests
2014-06-30 15:04:06 -04:00
Louis Dionne
85877825f8
Replace defaults for Comparable by a smarter predicated instance.
2014-06-30 14:22:42 -04:00
Louis Dionne
2f73b6b620
Sandbox: think about ways to provide defaults for Comparable
2014-06-30 12:41:09 -04:00
Louis Dionne
1ab0174907
Use named operators consistently.
2014-06-30 10:17:22 -04:00
Louis Dionne
c255a2f418
Integral: instantiate Orderable
2014-06-29 15:57:33 -04:00
Louis Dionne
8fcad90c09
Add the Orderable type class.
2014-06-26 15:17:09 -04:00
Louis Dionne
1cc9387998
Add detail::wrap.
2014-06-26 12:51:26 -04:00
Louis Dionne
de4864134e
StdArray: instantiate List
2014-06-26 12:34:37 -04:00
Louis Dionne
9ce785234c
List: instantiate Comparable
2014-06-26 12:15:34 -04:00
Louis Dionne
71be3a9949
Remove the foldable_from_iterable horror.
2014-06-26 11:40:55 -04:00
Louis Dionne
7fb0ea1226
Move integral bug-related unit tests to their subdirectory.
2014-06-26 11:29:04 -04:00
Louis Dionne
44aa641599
List: remove list_t and list_c
2014-06-26 11:01:44 -04:00
Louis Dionne
08de7a9e27
Promote List to a type class.
2014-06-26 01:29:05 -04:00
Louis Dionne
541ad8b341
Maybe: instantiate Foldable
2014-06-26 01:12:37 -04:00
Louis Dionne
379f30d981
Core: fix problems with typeclass specialization
2014-06-25 23:55:29 -04:00
Louis Dionne
65796aeb6e
CMake: Automatically discover unit tests and examples.
2014-06-25 23:36:14 -04:00
Louis Dionne
52eead977e
Adapt std::pair and instantiate Pair with it.
2014-06-24 21:33:08 -04:00
Louis Dionne
16d4ea0930
Add the Pair type class and data type.
2014-06-24 21:28:20 -04:00
Louis Dionne
229b3422eb
sandbox: add tuple experiment
2014-06-24 17:15:03 -04:00
Louis Dionne
1a41064f04
Functor: add fill
2014-06-24 13:38:54 -04:00
Louis Dionne
ea37adf66b
Core: rethink type classes
2014-06-23 15:37:29 -04:00
Louis Dionne
5ba2f9abb9
Applicative: rename unit to lift
2014-06-22 10:51:53 -04:00
Louis Dionne
159dbaecf6
Type: improve support for different metafunctions and rename lift
2014-06-22 10:31:10 -04:00
Louis Dionne
fa98685327
Move unit from Monad to Applicative and remove pure.
2014-06-21 19:29:28 -04:00
Louis Dionne
7440fd0c5e
Applicative: add Maybe and StdTuple instances
2014-06-21 18:56:33 -04:00
Louis Dionne
585c0b8e76
Add the Applicative type class.
2014-06-21 18:16:56 -04:00
Louis Dionne
09fc489963
sandbox: add an implementation of repeat
2014-06-21 15:10:06 -04:00
Louis Dionne
9a140f885a
Use elem instead of ad-hoc lambda in permutations test.
2014-06-21 14:22:46 -04:00
Louis Dionne
dfed9d39e7
Type: add lift and remove trait.hpp header
2014-06-21 14:09:08 -04:00
Louis Dionne
86a2c7e888
sandbox: remove obsolete dispatch experiment
2014-06-21 12:41:22 -04:00
Louis Dionne
7b7bbd2290
Logical: add not_
2014-06-21 12:39:19 -04:00
Louis Dionne
13e3bf02f6
Core: fix bug with datatype and inheritance
2014-06-21 11:28:15 -04:00
Louis Dionne
56f74519fe
Functor: add replace and adjust
2014-06-20 22:54:46 -04:00
Louis Dionne
0a09ddaa97
Foldable: add the elem method
2014-06-20 21:35:58 -04:00
Louis Dionne
2c1bb3a607
sandbox: add a naive and incomplete map implementation
2014-06-20 20:53:33 -04:00
Louis Dionne
2a784b2a78
Core: make sure instantiates works with complimentary type classes
2014-06-20 15:04:39 -04:00
Louis Dionne
3f8198601c
Adapt std::list.
2014-06-20 15:02:50 -04:00
Louis Dionne
09b2fff78e
Make StdTuple a Monad.
2014-06-19 16:13:18 -04:00
Louis Dionne
56a8a50de2
sandbox: add lazy
2014-06-19 15:33:00 -04:00
Louis Dionne
c7a7aa4c89
Core: add is_a and instantiates
2014-06-19 12:19:51 -04:00
Louis Dionne
6cfe3ac1b9
Functional: add function call and array subscript to placeholders
2014-06-19 11:56:24 -04:00
Louis Dionne
fa005d87e6
sandbox: add matrix multiplication and determinant
2014-06-18 23:38:10 -04:00
Louis Dionne
7e32f59837
core: Add conversion between data types
2014-06-18 20:23:53 -04:00
Louis Dionne
9e06246a67
Comparable: add unit tests for the mcds
2014-06-18 16:51:48 -04:00
Louis Dionne
848ee2a978
Maybe: minor refactoring
2014-06-18 16:35:55 -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
Louis Dionne
42bb091e71
Foldable: reduce the mcd, steal find from Iterable and improve tests
2014-06-18 13:37:34 -04:00
Louis Dionne
390cc968a3
Integral: make integral<T, n> equivalent to true_ for n >= 1 in a boolean context
2014-06-18 12:22:21 -04:00
Louis Dionne
db9a37c6e4
Monad: test the minimal complete definitions
2014-06-18 10:36:55 -04:00
Louis Dionne
b185b652d7
Type: minor refactoring
2014-06-18 10:24:20 -04:00
Louis Dionne
874c28eade
Functional: refactor to reduce coupling
2014-06-18 10:06:19 -04:00
Louis Dionne
d41e17b12b
Type: make type<> more compiler-friendly
2014-06-16 08:45:27 -04:00
Louis Dionne
ee9681f7aa
Minor ungrouped improvements and bug fixes.
2014-06-16 08:17:08 -04:00
Louis Dionne
199248bda1
sandbox: add a naive Matrix
2014-06-15 18:03:51 -04:00
Louis Dionne
a75d73cd90
sandbox: add is_valid
2014-06-15 15:48:49 -04:00
Louis Dionne
10a050c854
Logical: add conservative eval_if
2014-06-15 15:13:57 -04:00
Louis Dionne
90c9e64755
List: allow 0 arguments in zip_with and sort methods in (mostly) alphabetical order
2014-06-15 11:00:33 -04:00
Louis Dionne
56baf71826
sandbox: remove TODOs in array
2014-06-15 10:18:14 -04:00
Louis Dionne
2496259cb6
sandbox: ongoing attempt to improve if_
2014-06-14 17:21:10 -04:00
Louis Dionne
8e1d12171a
Make Logical a type class
2014-06-14 12:49:06 -04:00
Louis Dionne
92342e0402
Integral: harmonize with std::integral_constant
2014-06-13 23:30:04 -04:00
Louis Dionne
77c925d239
Add examples in Foldable and add the sizeof_ method
2014-06-13 22:16:12 -04:00
Louis Dionne
28e54f6ee9
List: reimplement partition, document sort_by and add permutations
2014-06-13 20:24:14 -04:00
Louis Dionne
2d0f6014e6
sandbox: add old constexpr rational code
2014-06-12 22:32:25 -04:00
Louis Dionne
c1d9ff5529
doc: document instances
2014-06-12 20:36:21 -04:00
Louis Dionne
488ebc24f8
Iterable: test comparison with heterogeneous data types
2014-06-12 16:51:45 -04:00
Louis Dionne
5a74795687
sandbox: add experiment with sfinae -> Maybe
2014-06-12 14:37:11 -04:00
Louis Dionne
d951c3b594
core: document and test the type class instantiation system
2014-06-12 13:33:38 -04:00
Louis Dionne
e93f1eb4e0
Range: make the implementation less naive
2014-06-12 13:33:38 -04:00
Louis Dionne
beca8ade95
Iterable: use the new dispatching system
2014-06-12 09:00:11 -04:00
Louis Dionne
ec10170b57
Use the new dispatching system with Foldable and Functor.
2014-06-12 07:02:24 -04:00
Louis Dionne
9b1cdd81b9
Comparable: update the dispatching system
2014-06-11 16:43:10 -04:00
Louis Dionne
1d81e02944
Fix a bug with c-style variadics in at_index and improve arg<>
2014-06-10 15:12:49 -04:00
Louis Dionne
809101956b
Type: add construction capabilities
2014-06-09 18:22:33 -04:00
Louis Dionne
d572e3b094
functional: consider making compose variadic
2014-06-09 18:22:33 -04:00
Louis Dionne
293b066ea4
TypeList: fix the ADL-related bug
2014-06-09 13:19:20 -04:00
Louis Dionne
ee6c805ca8
Type: decouple library from its internal representation
2014-06-09 10:39:05 -04:00
Louis Dionne
2567066828
Type: documentation and decoupling
2014-06-08 16:41:52 -04:00
Louis Dionne
4a013fa8cf
sandbox: Another attempt to dispatching for Comparable
2014-06-08 13:52:50 -04:00
Louis Dionne
71a70764e8
maybe: documentation and API improvements
2014-06-07 17:32:34 -04:00
Louis Dionne
d5368c05b4
sandbox: prototype a more flexible dispatching system
2014-06-07 16:36:46 -04:00
Louis Dionne
8984517166
Sandbox: add a (maybe) more clever assert
2014-06-06 11:32:45 -04:00
Louis Dionne
415b5c6906
List: fix a bug in head; don't use c-style variadics
2014-06-05 22:55:19 -04:00
Louis Dionne
d4d82639f5
List: documentation and examples
2014-06-05 22:47:39 -04:00
Louis Dionne
aea42f9d18
Integral: Fix a bug with negative literals.
2014-06-05 22:45:55 -04:00
Louis Dionne
b694f5e465
Integral: Strip cv-qualifiers of the integral type.
2014-06-05 21:17:06 -04:00
Louis Dionne
80d115e017
Sandbox: add a linked list, std::array and std::string
2014-06-05 16:24:14 -04:00
Louis Dionne
b35531430b
Sandbox: add operator_
2014-06-05 03:34:19 -04:00
Louis Dionne
e86b9d3f4a
Sandbox: add a possible infix operator implementation
2014-06-05 03:34:12 -04:00
Louis Dionne
b1f9527f83
Add a sandbox directory to test stuff.
2014-06-05 00:05:45 -04:00
Louis Dionne
8cd1863896
Move length from Iterable to Foldable.
2014-06-04 22:19:42 -04:00
Louis Dionne
a902435c76
CMake: put enable_testing() in the top level CMakeLists
2014-06-04 21:24:31 -04:00
Louis Dionne
61f0770b44
Integral: refactoring, documentation and decoupling
2014-06-04 21:24:31 -04:00
Louis Dionne
5b4d569962
Type: Add decltype_ and remove coupling.
2014-06-04 21:24:19 -04:00
Louis Dionne
a1ab4fab6b
Functional: add fbind
2014-06-04 11:54:09 -04:00
Louis Dionne
178b25476d
Functional: add arg<n>
2014-06-04 11:29:08 -04:00
Louis Dionne
806981bbcf
Functional: remove argwise, add on and lockstep
2014-06-04 11:29:00 -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
b090b57ee4
Use CTest for examples as well as unit tests.
2014-06-02 21:52:27 -04:00
Louis Dionne
f5da7770f3
Test a workaround for ADL problems in type
.
2014-06-02 21:52:27 -04:00
Louis Dionne
6215e82a01
Improve type traits and partially document Integral.
2014-06-02 21:49:36 -04:00
Louis Dionne
1cebe9821d
Document the Functional module.
2014-06-02 21:49:35 -04:00
Louis Dionne
b0ebffce2f
Check Monad laws.
2014-06-01 12:18:51 -04:00
Louis Dionne
49c4417626
Add a genuine minimal Iterable.
2014-06-01 10:35:19 -04:00
Louis Dionne
e77dab7c55
Generalize curry.
2014-06-01 10:03:07 -04:00
Louis Dionne
7b70a24d2b
Add user-defined literal for integral constants.
2014-05-31 15:36:02 -04:00
Louis Dionne
cec5d4edf8
Add unpack and remove Functor from Range.
2014-05-31 14:55:11 -04:00
Louis Dionne
7562f8cecf
Add argwise to functional.
2014-05-31 14:41:34 -04:00
Louis Dionne
418b8941ad
Test Functor laws and modify Type's fmap.
2014-05-31 10:40:21 -04:00
Louis Dionne
decb1a4d8c
Add curry<n> to functional.
2014-05-27 15:46:52 -04:00
Louis Dionne
3d9480855e
Make Typelist a transparent optimization.
2014-05-27 15:07:01 -04:00
Louis Dionne
3bb00967ef
Make Maybe a Monad.
2014-05-27 14:12:11 -04:00
Louis Dionne
09274a9ea3
Make List a Monad.
2014-05-27 11:12:05 -04:00
Louis Dionne
5f616bb4f5
Add the Monad typeclass and make Type a Monad.
2014-05-27 11:01:20 -04:00
Louis Dionne
49672fd986
Introduce datatypes for dispatching.
2014-05-27 10:52:53 -04:00
Louis Dionne
eda7ea303a
Add a more efficient at_index algorithm.
2014-05-26 14:21:29 -04:00
Louis Dionne
d85eb7ccb2
Add init to List and implement length better.
2014-05-26 12:32:38 -04:00
Louis Dionne
6086633003
Add sort and partition.
2014-05-26 11:27:05 -04:00
Louis Dionne
12273221e1
Add placeholders in functional/.
2014-05-26 10:07:27 -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
c611dcfd73
Allow runtime bool conditions in if_.
2014-05-25 19:24:06 -04:00
Louis Dionne
f1694b3f4c
Add find and drop_until to Iterable.
2014-05-25 18:45:10 -04:00
Louis Dionne
93f11124a7
Add the Maybe datatype.
2014-05-25 18:36:43 -04:00
Louis Dionne
24b907db66
Add drop_while to Iterable.
2014-05-25 17:33:41 -04:00
Louis Dionne
d2f725f6fe
Add Typelist; an optimized List for types.
2014-05-25 11:06:18 -04:00
Louis Dionne
316f6a14ec
Optimize foldl for lifted computations.
2014-05-25 09:51:41 -04:00
Louis Dionne
05593b652c
Redefine lift as an equivalence of categories.
...
This allows us to mechanically translate most type traits, which is
a good hint that we've found a way to merge type computation with
value computation. The problematic type traits will be tackled later.
2014-05-24 19:06:41 -04:00
Louis Dionne
5d57f6808d
Use homemade integer_sequence in Range.
2014-05-24 15:41:55 -04:00
Louis Dionne
fd567bd8b1
Add homemade integer_sequence.
...
<utility> is way too large to include just for that.
2014-05-24 15:41:46 -04:00