diff --git a/README.md b/README.md index 6cc9f15..a0c1b78 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ See the [project page][project] for full documentation. Simply add `enum.h` to your project — that's it. -Then, include it, and use the `ENUM` macro. Your compiler will generate the rich -enums that are missing from standard C++. +Then, include it, and use the `BETTER_ENUM` macro. Your compiler will generate +the rich enums that are missing from standard C++. ## Additional features @@ -61,12 +61,12 @@ enums that are missing from standard C++. ## Limitations -The biggest limitation is that the `ENUM` macro can't be used inside a class. -This seems [difficult to remove][nested]. There is a workaround with `typedef` -(or C++11 `using`): +The biggest limitation is that the `BETTER_ENUM` macro can't be used inside a +class. This seems [difficult to remove][nested]. There is a workaround with +`typedef` (or C++11 `using`): ```cpp -ENUM(UniquePrefix_Color, uint8_t, Red, Green, Blue) +BETTER_ENUM(UniquePrefix_Color, uint8_t, Red, Green, Blue) struct triplet { typedef UniquePrefix_Color Color; @@ -76,7 +76,7 @@ struct triplet { triplet::Color color; ``` -You can, however, use `ENUM` inside a namespace. +You can, however, use `BETTER_ENUM` inside a namespace. [nested]: http://aantron.github.io/better-enums/DesignDecisionsFAQ.html#NoEnumInsideClass diff --git a/doc/ApiReference.md b/doc/ApiReference.md index d216667..09bade4 100644 --- a/doc/ApiReference.md +++ b/doc/ApiReference.md @@ -7,7 +7,7 @@ $internal_toc The declaration #include - ENUM(Enum, underlying_type, A, B, C, ...) + BETTER_ENUM(Enum, underlying_type, A, B, C, ...) generates a new class type `Enum` which is notionally similar to the type created by this $cxx11 declaration: @@ -20,29 +20,29 @@ That is, `Enum` is a scoped enumerated type with constants `Enum::A`, `Enum::B`, `Enum::C`, and so on, with memory representation the same as `underlying_type`. It is possible to supply initializers for any of the constants: - ENUM(Enum, underlying_type, A = 1, B = constant_expression, C = A, ...) + BETTER_ENUM(Enum, underlying_type, A = 1, B = constant_expression, C = A, ...) The initializers have the same meaning and constraints as in a built-in `enum` or `enum class` declaration. --- -The principal differences between the types declared by the `ENUM` macro and -`enum class` are: +The principal differences between the types declared by the `BETTER_ENUM` macro +and `enum class` are: - - `ENUM` is available for $cxx98 + - `BETTER_ENUM` is available for $cxx98 [compilers](${prefix}CompilerSupport.html) supporting `__VA_ARGS__` — all major compilers — while `enum class` is restricted to $cxx11, - - the `ENUM` type is implicitly convertible to integral types, though this can - be [disabled](${prefix}OptInFeatures.html#StrictConversions) when using - $cxx11, and - - the `ENUM` type supports a set of reflective operations, detailed in the - rest of this reference. + - the `BETTER_ENUM` type is implicitly convertible to integral types, though + this can be [disabled](${prefix}OptInFeatures.html#StrictConversions) when + using $cxx11, and + - the `BETTER_ENUM` type supports a set of reflective operations, detailed in + the rest of this reference. --- -The types produced by the `ENUM` macro are called *Better Enums* in the rest of -this reference. +The types produced by the `BETTER_ENUM` macro are called *Better Enums* in the +rest of this reference. Better Enums are similar to their underlying type for the purposes of argument passing. This means that they typically fit into a machine word, and should be @@ -66,7 +66,7 @@ section. The rest of this reference uses the following declaration as a running example: - ENUM(Enum, int, A, B, C) + BETTER_ENUM(Enum, int, A, B, C) @@ -78,8 +78,8 @@ rest of the documentation. #### typedef _enumerated -An internal type used to declare constants. The `ENUM` macro generates something -similar to +An internal type used to declare constants. The `BETTER_ENUM` macro generates +something similar to ~~~comment struct Enum { diff --git a/doc/DesignDecisionsFAQ.md b/doc/DesignDecisionsFAQ.md index 232285f..84808e3 100644 --- a/doc/DesignDecisionsFAQ.md +++ b/doc/DesignDecisionsFAQ.md @@ -29,7 +29,7 @@ constants declared by the user. I chose to prefix members with underscores to lessen the chances of collision. For example, take `_valid`, and suppose it was `valid` instead. That would make this enum impossible: - ENUM(Status, char, valid, invalid) + BETTER_ENUM(Status, char, valid, invalid) because the constant `Status::valid` would clash with the member `Status::valid`. @@ -67,7 +67,7 @@ initializers as built-in enums. So, I am trying to keep even this one macro out of the user's way. I wouldn't accept any change that involved turning the declaration into a preprocessor sequence or tuple, i.e. something like - ENUM(Channel, int, (Red)(Green)((Blue)(5))) + BETTER_ENUM(Channel, int, (Red)(Green)((Blue)(5))) even if it promised extra capabilities. @@ -88,10 +88,10 @@ This is due to an interaction between linkage and `constexpr`. arrays can be declared in namespace scope, in class scope, or in function scope, but they also need to be defined somewhere. - If `ENUM` is to be usable in both namespace and class scope, it already can't - assume that it can declare arrays in namespace scope, since if `ENUM` is used - in a class, its entire expansion will be enclosed in the declaration of that - class. + If `BETTER_ENUM` is to be usable in both namespace and class scope, it + already can't assume that it can declare arrays in namespace scope, since if + `BETTER_ENUM` is used in a class, its entire expansion will be enclosed in + the declaration of that class. That leaves class scope and function scope. If the arrays are declared in class scope, there needs to be a separate definition of them in some @@ -120,7 +120,7 @@ $cxx98. A Better Enum value is an "object," whose memory representation is the same as its underlying type. For example, - ENUM(Channel, int, Red, Green, Blue) + BETTER_ENUM(Channel, int, Red, Green, Blue) expands to something like @@ -136,7 +136,7 @@ There is an alternative interpretation, in which the Better Enums library generates enum traits instead, i.e. the generated arrays and members sit alongside built-in enums instead of wrapping them: - ENUM(Channel, int, Red, Green, Blue) + BETTER_ENUM(Channel, int, Red, Green, Blue) generates @@ -251,7 +251,7 @@ Enum is simply an index, then getting its string representation is simply indexing an array, rather than some kind of data structure lookup. // Representations 0, 1, 2, 3 instead of 1, 2, 3, 1. - ENUM(Kind, int, A = 1, B, C, D = A) + BETTER_ENUM(Kind, int, A = 1, B, C, D = A) Choosing this approach has serious drawbacks. diff --git a/doc/ExtendingLimits.md b/doc/ExtendingLimits.md index a990250..c7fa3e1 100644 --- a/doc/ExtendingLimits.md +++ b/doc/ExtendingLimits.md @@ -1,8 +1,8 @@ ## Extending limits -The `ENUM` macro makes heavy use of the preprocessor, and some of the internal -macros have size limits. There are two: on the number of constants you can -declare, and on the maximum length of a constant name under very specific +The `BETTER_ENUM` macro makes heavy use of the preprocessor, and some of the +internal macros have size limits. There are two: on the number of constants you +can declare, and on the maximum length of a constant name under very specific conditions. If you run into either one, you can extend the limit by following the instructions on this page. diff --git a/doc/GeneralUnderlyingTypes.md b/doc/GeneralUnderlyingTypes.md index f1bf89c..9aa4e96 100644 --- a/doc/GeneralUnderlyingTypes.md +++ b/doc/GeneralUnderlyingTypes.md @@ -19,8 +19,9 @@ Doing this enables the following usage: // The enum. - ENUM(Color, html_color, - darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954) + BETTER_ENUM(Color, html_color, + darksalmon = 0xc47451, purplemimosa = 0x9e7bff, + slimegreen = 0xbce954) @@ -72,9 +73,10 @@ chosen integral type: }; // The enum. - ENUM(Color, html_color, - darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954, - celeste = html_color(0x50, 0xeb, 0xec)) + BETTER_ENUM(Color, html_color, + darksalmon = 0xc47451, purplemimosa = 0x9e7bff, + slimegreen = 0xbce954, + celeste = html_color(0x50, 0xeb, 0xec)) This is not possible at all in $cxx98, however. @@ -84,7 +86,8 @@ You don't have to use initializers. For example, as long as your example type `file_descriptor` knows how to deal with the values, you can have the compiler generate them in sequence: - ENUM(FD, file_descriptor, STDIN, STDOUT, STDERR, SomePipeYourDaemonHas, ...) + BETTER_ENUM(FD, file_descriptor, + STDIN, STDOUT, STDERR, SomePipeYourDaemonHas, ...) SAMPLE diff --git a/doc/OptInFeatures.md b/doc/OptInFeatures.md index 9710b78..f98dbd2 100644 --- a/doc/OptInFeatures.md +++ b/doc/OptInFeatures.md @@ -22,7 +22,8 @@ slow enums to get the same penalty as including `iostream` — but it is a steep penalty nonetheless. I don't think most people need this feature most of the time, so it's too high a price to pay. If I improve compilation times to the point where compile-time name trimming can be the default, I will simply -redefine `SLOW_ENUM` as `ENUM` and deprecate it, so your code will still work. +redefine `SLOW_ENUM` as `BETTER_ENUM` and deprecate it, so your code will still +work. ### Strict conversions diff --git a/doc/demo/101-special-values.md b/doc/demo/101-special-values.md index 9611bd2..7c7eeca 100644 --- a/doc/demo/101-special-values.md +++ b/doc/demo/101-special-values.md @@ -46,10 +46,10 @@ A macro allows us to override the invalid value by specializing the template: Now, we can declare enums like these: - ENUM(Channel, int, Red, Green, Blue, Invalid) + BETTER_ENUM(Channel, int, Red, Green, Blue, Invalid) // Invalid is the invalid value by default - ENUM(Compression, int, Undefined, None, Huffman) + BETTER_ENUM(Compression, int, Undefined, None, Huffman) OVERRIDE_INVALID(Compression, Undefined) and use them: @@ -100,7 +100,7 @@ And, as before, the usage: And, if you do - ENUM(Answer, int, Yes, No, Invalid) + BETTER_ENUM(Answer, int, Yes, No, Invalid) // OVERRIDE_DEFAULT(Answer, Invalid) you will get a helpful compile-time error saying diff --git a/doc/demo/102-any-underlying.md b/doc/demo/102-any-underlying.md index 870a74a..3ea68c6 100644 --- a/doc/demo/102-any-underlying.md +++ b/doc/demo/102-any-underlying.md @@ -55,8 +55,9 @@ current version. // The enum itself. - ENUM(Color, html_color, - darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954) + BETTER_ENUM(Color, html_color, + darksalmon = 0xc47451, purplemimosa = 0x9e7bff, + slimegreen = 0xbce954) Now, we can do: @@ -122,9 +123,10 @@ struct integral_mapping { This allows: ~~~comment -ENUM(BetterColor, better_html_color, - darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954, - celeste = better_html_color(0x50, 0xeb, 0xec)) +BETTER_ENUM(BetterColor, better_html_color, + darksalmon = 0xc47451, purplemimosa = 0x9e7bff, + slimegreen = 0xbce954, + celeste = better_html_color(0x50, 0xeb, 0xec)) ~~~ If you can't edit your literal type to add this converting operator, or don't @@ -142,7 +144,8 @@ Of course, as long as the values are valid, you can let the compiler enumerate your type as in a regular enum, by omitting initializers: ~~~comment -ENUM(FD, file_descriptor, STDIN, STDOUT, STDERR, SomePipeYourDaemonHas, ...) +BETTER_ENUM(FD, file_descriptor, + STDIN, STDOUT, STDERR, SomePipeYourDaemonHas, ...) ~~~ Here, `FD::STDIN` maps to the integral representation 0, `STDOUT` to 1, and so diff --git a/doc/demo/103-bitset.md b/doc/demo/103-bitset.md index 357b02f..6069793 100644 --- a/doc/demo/103-bitset.md +++ b/doc/demo/103-bitset.md @@ -38,10 +38,10 @@ Now, we can have bit sets that are wide enough to hold whatever range we declared. We just declare enums, and the numeric values of their constants will be bit indices. The rest is straightforward. - ENUM(EFLAGS, int, - Carry, Parity = 2, Adjust = 4, Zero, Sign, Trap, Interrupt, Direction, - Overflow, NestedTask = 14, Resume = 16, V8086, AlignmentCheck, - CPUIDPresent = 21) + BETTER_ENUM(EFLAGS, int, + Carry, Parity = 2, Adjust = 4, Zero, Sign, Trap, Interrupt, Direction, + Overflow, NestedTask = 14, Resume = 16, V8086, AlignmentCheck, + CPUIDPresent = 21) int main() { diff --git a/doc/demo/104-quine.md b/doc/demo/104-quine.md index ae64482..10ded79 100644 --- a/doc/demo/104-quine.md +++ b/doc/demo/104-quine.md @@ -8,7 +8,7 @@ buffer for the definition at compile time. Ok, so it's not really a quine, because we won't be writing all the code needed to generate the definition to the buffer as well. And, there are better ways to dump the definition than shown here. You could simply define a macro that -expands to an `ENUM` declaration and also stringizes it. +expands to an `BETTER_ENUM` declaration and also stringizes it. But that's not the point here. The point of this page is to show some of the reflective capabilities of Better Enums, so you can adapt them for cases where a @@ -37,8 +37,8 @@ since we will be calling `_to_string`. Let's make sure it's enabled by defining Now, let's declare some enums to dump later: - ENUM(Channel, int, Red, Green, Blue) - ENUM(Depth, int, TrueColor = 1, HighColor = 0) + BETTER_ENUM(Channel, int, Red, Green, Blue) + BETTER_ENUM(Depth, int, TrueColor = 1, HighColor = 0) @@ -102,7 +102,7 @@ the whole enum: constexpr size_t declaration_length() { return - string_length("ENUM(") + string_length("BETTER_ENUM(") + string_length(Enum::_name()) + string_length(", int") + constants_length() @@ -129,7 +129,7 @@ so that we can do a sanity check on it. { size_t offset = 0; - offset += std::sprintf(buffer, "ENUM(%s, int", Enum::_name()); + offset += std::sprintf(buffer, "BETTER_ENUM(%s, int", Enum::_name()); for (Enum value : Enum::_values()) { offset += @@ -166,8 +166,8 @@ Now, we can write and run this code. It prints: ~~~comment -ENUM(Channel, int, Red = 0, Green = 1, Blue = 2) -ENUM(Depth, int, TrueColor = 1, HighColor = 0) +BETTER_ENUM(Channel, int, Red = 0, Green = 1, Blue = 2) +BETTER_ENUM(Depth, int, TrueColor = 1, HighColor = 0) ~~~ %% description = Have a Better Enum print its own definition. Shows how to diff --git a/doc/demo/105-c++17-reflection.md b/doc/demo/105-c++17-reflection.md index 3f58c4a..779a25a 100644 --- a/doc/demo/105-c++17-reflection.md +++ b/doc/demo/105-c++17-reflection.md @@ -48,8 +48,8 @@ The optional Better Enums header file [`extra/better-enums/n4428.h`][header] implements this interface, though with two necessary differences. 1. The interface is only available for Better Enums, i.e. enums declared through - the `ENUM` macro. This is because the macro is what generates the information - necessary for reflection. + the `BETTER_ENUM` macro. This is because the macro is what generates the + information necessary for reflection. 2. The type of `identifier` is `const char*`, not the ${cxx17} proposed `string_literal`. @@ -70,7 +70,7 @@ So, with that out of the way, we can do a little test. Let's assume that Let's declare an enum: - ENUM(Channel, char, Red = 1, Green, Blue) + BETTER_ENUM(Channel, char, Red = 1, Green, Blue) ...and try N4428: @@ -120,9 +120,10 @@ The reason for the `#define` in the code above is that there is one quirk: the interface above is available only for Better Enums for which [compile-time name trimming][slow-enum] is enabled, i.e. those declared when `BETTER_ENUMS_CONSTEXPR_TO_STRING` was defined, or declared with the `SLOW_ENUM` -variant of `ENUM`. As mentioned on the linked page, the reason compile-time name -trimming is not the default is that, while still pretty fast, it is four times -slower than program-startup-time name trimming. The latter is the default. +variant of `BETTER_ENUM`. As mentioned on the linked page, the reason +compile-time name trimming is not the default is that, while still pretty fast, +it is four times slower than program-startup-time name trimming. The latter is +the default. Despite the above, a variation on the interface is available for enums without compile-time name trimming: @@ -158,7 +159,7 @@ function, and you have to access it through `get_alt`. ~~~comment // Without compile-time name trimming. -ENUM(Depth, int, HighColor, TrueColor) +BETTER_ENUM(Depth, int, HighColor, TrueColor) int main() { diff --git a/doc/index.md b/doc/index.md index e0a8596..3c3d68c 100644 --- a/doc/index.md +++ b/doc/index.md @@ -29,7 +29,7 @@ compilation
#include <enum.h>
 
-ENUM(Channel, int, Red = 1, Green, Blue)
+BETTER_ENUM(Channel, int, Red = 1, Green, Blue)
 
 
 Channel     c = Channel::_from_string("Red");
diff --git a/doc/tutorial/1-hello-world.md b/doc/tutorial/1-hello-world.md
index a7b915d..5b80e33 100644
--- a/doc/tutorial/1-hello-world.md
+++ b/doc/tutorial/1-hello-world.md
@@ -5,7 +5,7 @@ Download enum.h, then compile this program:
     #include 
     #include "enum.h"
 
-    ENUM(Word, int, Hello, World)
+    BETTER_ENUM(Word, int, Hello, World)
 
     int main()
     {
diff --git a/doc/tutorial/2-conversions.md b/doc/tutorial/2-conversions.md
index 47be581..b0fb2ca 100644
--- a/doc/tutorial/2-conversions.md
+++ b/doc/tutorial/2-conversions.md
@@ -7,7 +7,7 @@ Let's begin by including `enum.h` and declaring our enum:
 
     #include 
 
-    ENUM(Channel, int, Cyan = 1, Magenta, Yellow, Black)
+    BETTER_ENUM(Channel, int, Cyan = 1, Magenta, Yellow, Black)
 
 We now have an `int`-sized enum with four constants.
 
diff --git a/doc/tutorial/3-iterate.md b/doc/tutorial/3-iterate.md
index 66db78a..b09e9c4 100644
--- a/doc/tutorial/3-iterate.md
+++ b/doc/tutorial/3-iterate.md
@@ -6,7 +6,7 @@ example, this:
     #include 
     #include 
 
-    ENUM(Channel, int, Red, Green = 2, Blue)
+    BETTER_ENUM(Channel, int, Red, Green = 2, Blue)
 
     int main()
     {
diff --git a/doc/tutorial/4-switch.md b/doc/tutorial/4-switch.md
index d6808be..3b87f47 100644
--- a/doc/tutorial/4-switch.md
+++ b/doc/tutorial/4-switch.md
@@ -5,7 +5,7 @@ A Better Enum can be used directly in a `switch` statement:
     #include 
     #include 
 
-    ENUM(Channel, int, Red, Green, Blue)
+    BETTER_ENUM(Channel, int, Red, Green, Blue)
 
     int main()
     {
diff --git a/doc/tutorial/5-map.md b/doc/tutorial/5-map.md
index 2fa4619..dd8f4c7 100644
--- a/doc/tutorial/5-map.md
+++ b/doc/tutorial/5-map.md
@@ -26,7 +26,7 @@ practical use.
     #include 
     #include <enum.h>
 
-    ENUM(Channel, int, Red, Green, Blue)
+    BETTER_ENUM(Channel, int, Red, Green, Blue)
 
 We will create a map from this function:
 
diff --git a/doc/tutorial/6-iostreams.md b/doc/tutorial/6-iostreams.md
index 5f53cf4..7acdaac 100644
--- a/doc/tutorial/6-iostreams.md
+++ b/doc/tutorial/6-iostreams.md
@@ -7,7 +7,7 @@ operators:
     #include 
     #include 
 
-    ENUM(Channel, int, Red, Green, Blue)
+    BETTER_ENUM(Channel, int, Red, Green, Blue)
 
     int main()
     {
diff --git a/doc/tutorial/7-safety.md b/doc/tutorial/7-safety.md
index ada4f1b..ef0f17f 100644
--- a/doc/tutorial/7-safety.md
+++ b/doc/tutorial/7-safety.md
@@ -12,7 +12,7 @@ You have probably noticed by now that Better Enums are scoped: when you declare
     #include 
     #include 
 
-    ENUM(Channel, int, Red = 1, Green, Blue)
+    BETTER_ENUM(Channel, int, Red = 1, Green, Blue)
 
 you don't get names such as `Red` in the global namespace. Instead, you get
 `Channel`, and `Red` is accessible as `Channel::Red`. This is no big deal in
@@ -20,7 +20,7 @@ $cxx11, which has `enum class`. In $cxx98, however, this typically requires
 effort. Better Enums brings scope uniformly to both variants. So, despite the
 above declaration, you can safely declare
 
-    ENUM(Node, char, Red, Black)
+    BETTER_ENUM(Node, char, Red, Black)
 
 and everything will work as expected.
 
diff --git a/doc/tutorial/8-representation.md b/doc/tutorial/8-representation.md
index d973959..2dd69a1 100644
--- a/doc/tutorial/8-representation.md
+++ b/doc/tutorial/8-representation.md
@@ -7,7 +7,7 @@ will declare a more unusual enum than the ones we have seen.
     #include 
     #include 
 
-    ENUM(ContentType, short,
+    BETTER_ENUM(ContentType, short,
          CompressedVideo = 5, PCM = 8, Subtitles = 17, Comment = 44)
 
 This is for a hypothetical multimedia container file format. Perhaps the files
diff --git a/doc/tutorial/9-constexpr.md b/doc/tutorial/9-constexpr.md
index bd9fbcf..56158d1 100644
--- a/doc/tutorial/9-constexpr.md
+++ b/doc/tutorial/9-constexpr.md
@@ -15,7 +15,7 @@ get an idea of what can be done. Here, you will see the basics.
 
     #include 
 
-    ENUM(Channel, int, Red = 1, Green = 2, Blue = 3)
+    BETTER_ENUM(Channel, int, Red = 1, Green = 2, Blue = 3)
 
     constexpr Channel      channel = Channel::_from_integral(2);
     constexpr int          value = channel._to_integral();
diff --git a/enum.h b/enum.h
index 11500d9..66856f4 100644
--- a/enum.h
+++ b/enum.h
@@ -1146,7 +1146,7 @@ BETTER_ENUMS__CONSTEXPR inline bool operator >=(const Enum &a, const Enum &b)  \
 
 // Top-level macros.
 
-#define ENUM(Enum, Underlying, ...)                                            \
+#define BETTER_ENUM(Enum, Underlying, ...)                                     \
     BETTER_ENUMS__ID(BETTER_ENUMS__TYPE(                                       \
         BETTER_ENUMS__CXX11_UNDERLYING_TYPE,                                   \
         BETTER_ENUMS__DEFAULT_SWITCH_TYPE,                                     \
@@ -1172,7 +1172,7 @@ BETTER_ENUMS__CONSTEXPR inline bool operator >=(const Enum &a, const Enum &b)  \
 
 #else
 
-#define ENUM(Enum, Underlying, ...)                                            \
+#define BETTER_ENUM(Enum, Underlying, ...)                                     \
     BETTER_ENUMS__ID(BETTER_ENUMS__TYPE(                                       \
         BETTER_ENUMS__CXX98_UNDERLYING_TYPE,                                   \
         BETTER_ENUMS__DEFAULT_SWITCH_TYPE,                                     \
diff --git a/example/1-hello-world.cc b/example/1-hello-world.cc
index d93f1b1..fce663c 100644
--- a/example/1-hello-world.cc
+++ b/example/1-hello-world.cc
@@ -7,7 +7,7 @@
 #include 
 #include "enum.h"
 
-ENUM(Word, int, Hello, World)
+BETTER_ENUM(Word, int, Hello, World)
 
 int main()
 {
diff --git a/example/101-special-values.cc b/example/101-special-values.cc
index da40e3d..3881a1b 100644
--- a/example/101-special-values.cc
+++ b/example/101-special-values.cc
@@ -44,10 +44,10 @@ constexpr Enum invalid_impl() { return Enum::Value; }
 
 // Now, we can declare enums like these:
 
-ENUM(Channel, int, Red, Green, Blue, Invalid)
+BETTER_ENUM(Channel, int, Red, Green, Blue, Invalid)
 // Invalid is the invalid value by default
 
-ENUM(Compression, int, Undefined, None, Huffman)
+BETTER_ENUM(Compression, int, Undefined, None, Huffman)
 OVERRIDE_INVALID(Compression, Undefined)
 
 // and use them:
@@ -98,7 +98,7 @@ static_assert(default_impl() == +Compression::None, "");
 
 // And, if you do
 
-ENUM(Answer, int, Yes, No, Invalid)
+BETTER_ENUM(Answer, int, Yes, No, Invalid)
 // OVERRIDE_DEFAULT(Answer, Invalid)
 
 // you will get a helpful compile-time error saying Answer: default cannot equal
diff --git a/example/102-any-underlying.cc b/example/102-any-underlying.cc
index cd15932..ffe4d5c 100644
--- a/example/102-any-underlying.cc
+++ b/example/102-any-underlying.cc
@@ -57,8 +57,9 @@ struct integral_mapping {
 
 
 // The enum itself.
-ENUM(Color, html_color,
-     darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954)
+BETTER_ENUM(Color, html_color,
+            darksalmon = 0xc47451, purplemimosa = 0x9e7bff,
+            slimegreen = 0xbce954)
 
 // Now, we can do:
 
@@ -121,9 +122,10 @@ int main()
 //
 // This allows:
 //
-// ENUM(BetterColor, better_html_color,
-//      darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954,
-//      celeste = better_html_color(0x50, 0xeb, 0xec))
+// BETTER_ENUM(BetterColor, better_html_color,
+//             darksalmon = 0xc47451, purplemimosa = 0x9e7bff,
+//             slimegreen = 0xbce954,
+//             celeste = better_html_color(0x50, 0xeb, 0xec))
 //
 // If you can't edit your literal type to add this converting operator, or don't
 // want to for type safety reasons, you can achieve a similar effect by
@@ -132,14 +134,15 @@ int main()
 // U is for declarations only.
 //
 // Constructors in initializers require C++11. Also, g++ doesn't support this
-// before g++5.
+// before 5.1.
 //
 // Letting the compiler enumerate your type
 //
 // Of course, as long as the values are valid, you can let the compiler
 // enumerate your type as in a regular enum, by omitting initializers:
 //
-// ENUM(FD, file_descriptor, STDIN, STDOUT, STDERR, SomePipeYourDaemonHas, ...)
+// BETTER_ENUM(FD, file_descriptor,
+//                     STDIN, STDOUT, STDERR, SomePipeYourDaemonHas, ...)
 //
 // Here, FD::STDIN maps to the integral representation 0, STDOUT to 1, and so
 // on.
diff --git a/example/103-bitset.cc b/example/103-bitset.cc
index b6fa584..b6476cf 100644
--- a/example/103-bitset.cc
+++ b/example/103-bitset.cc
@@ -38,10 +38,10 @@ using EnumSet = std::bitset()._to_integral() + 1>;
 // declared. We just declare enums, and the numeric values of their constants
 // will be bit indices. The rest is straightforward.
 
-ENUM(EFLAGS, int,
-     Carry, Parity = 2, Adjust = 4, Zero, Sign, Trap, Interrupt, Direction,
-     Overflow, NestedTask = 14, Resume = 16, V8086, AlignmentCheck,
-     CPUIDPresent = 21)
+BETTER_ENUM(EFLAGS, int,
+            Carry, Parity = 2, Adjust = 4, Zero, Sign, Trap, Interrupt, Direction,
+            Overflow, NestedTask = 14, Resume = 16, V8086, AlignmentCheck,
+            CPUIDPresent = 21)
 
 int main()
 {
diff --git a/example/104-quine.cc b/example/104-quine.cc
index 6257e37..dc809bb 100644
--- a/example/104-quine.cc
+++ b/example/104-quine.cc
@@ -10,7 +10,7 @@
 // Ok, so it's not really a quine, because we won't be writing all the code
 // needed to generate the definition to the buffer as well. And, there are
 // better ways to dump the definition than shown here. You could simply define a
-// macro that expands to an ENUM declaration and also stringizes it.
+// macro that expands to an BETTER_ENUM declaration and also stringizes it.
 //
 // But that's not the point here. The point of this page is to show some of the
 // reflective capabilities of Better Enums, so you can adapt them for cases
@@ -34,8 +34,8 @@
 
 // Now, let's declare some enums to dump later:
 
-ENUM(Channel, int, Red, Green, Blue)
-ENUM(Depth, int, TrueColor = 1, HighColor = 0)
+BETTER_ENUM(Channel, int, Red, Green, Blue)
+BETTER_ENUM(Depth, int, TrueColor = 1, HighColor = 0)
 
 
 
@@ -99,7 +99,7 @@ template 
 constexpr size_t declaration_length()
 {
     return
-        string_length("ENUM(")
+        string_length("BETTER_ENUM(")
         + string_length(Enum::_name())
         + string_length(", int")
         + constants_length()
@@ -127,7 +127,7 @@ size_t format(char *buffer)
 {
     size_t  offset = 0;
 
-    offset += std::sprintf(buffer, "ENUM(%s, int", Enum::_name());
+    offset += std::sprintf(buffer, "BETTER_ENUM(%s, int", Enum::_name());
 
     for (Enum value : Enum::_values()) {
         offset +=
@@ -163,5 +163,5 @@ int main()
 
 // It prints:
 //
-// ENUM(Channel, int, Red = 0, Green = 1, Blue = 2)
-// ENUM(Depth, int, TrueColor = 1, HighColor = 0)
+// BETTER_ENUM(Channel, int, Red = 0, Green = 1, Blue = 2)
+// BETTER_ENUM(Depth, int, TrueColor = 1, HighColor = 0)
diff --git a/example/105-c++17-reflection.cc b/example/105-c++17-reflection.cc
index b45eb1b..49b487f 100644
--- a/example/105-c++17-reflection.cc
+++ b/example/105-c++17-reflection.cc
@@ -2,6 +2,8 @@
 
 // C++17 reflection proposal
 //
+// You can try this demo live online.
+//
 // Better Enums can be used to implement the enums portion of the C++17
 // reflection proposal N4428 in C++11. N4428 proposes the following traits
 // interface:
@@ -42,9 +44,9 @@
 // this interface, though with two necessary differences.
 //
 //   1. The interface is only available for Better Enums, i.e. enums declared
-//      through the ENUM macro. This is because the macro is what generates the
-//      information necessary for reflection.
-//   2. The type of identifier is const char*, not the ${cxx17}-proposed
+//      through the BETTER_ENUM macro. This is because the macro is what
+//      generates the information necessary for reflection.
+//   2. The type of identifier is const char*, not the ${cxx17} proposed
 //      string_literal.
 //
 // Demo
@@ -63,7 +65,7 @@
 
 // Let's declare an enum:
 
-ENUM(Channel, char, Red = 1, Green, Blue)
+BETTER_ENUM(Channel, char, Red = 1, Green, Blue)
 
 // ...and try N4428:
 
@@ -111,10 +113,10 @@ int main()
 // interface above is available only for Better Enums for which compile-time
 // name trimming is enabled, i.e. those declared when
 // BETTER_ENUMS_CONSTEXPR_TO_STRING was defined, or declared with the SLOW_ENUM
-// variant of ENUM. As mentioned on the linked page, the reason compile-time
-// name trimming is not the default is that, while still pretty fast, it is four
-// times slower than program-startup-time name trimming. The latter is the
-// default.
+// variant of BETTER_ENUM. As mentioned on the linked page, the reason
+// compile-time name trimming is not the default is that, while still pretty
+// fast, it is four times slower than program-startup-time name trimming. The
+// latter is the default.
 //
 // Despite the above, a variation on the interface is available for enums
 // without compile-time name trimming:
@@ -147,7 +149,7 @@ int main()
 // function, and you have to access it through get_alt.
 //
 // // Without compile-time name trimming.
-// ENUM(Depth, int, HighColor, TrueColor)
+// BETTER_ENUM(Depth, int, HighColor, TrueColor)
 //
 // int main()
 // {
diff --git a/example/2-conversions.cc b/example/2-conversions.cc
index 337980b..4356059 100644
--- a/example/2-conversions.cc
+++ b/example/2-conversions.cc
@@ -9,7 +9,7 @@
 
 #include 
 
-ENUM(Channel, int, Cyan = 1, Magenta, Yellow, Black)
+BETTER_ENUM(Channel, int, Cyan = 1, Magenta, Yellow, Black)
 
 // We now have an int-sized enum with four constants.
 //
diff --git a/example/3-iterate.cc b/example/3-iterate.cc
index d41c2d5..9aa5bc6 100644
--- a/example/3-iterate.cc
+++ b/example/3-iterate.cc
@@ -8,7 +8,7 @@
 #include 
 #include 
 
-ENUM(Channel, int, Red, Green = 2, Blue)
+BETTER_ENUM(Channel, int, Red, Green = 2, Blue)
 
 int main()
 {
diff --git a/example/4-switch.cc b/example/4-switch.cc
index a59728a..8adb7b3 100644
--- a/example/4-switch.cc
+++ b/example/4-switch.cc
@@ -7,7 +7,7 @@
 #include 
 #include 
 
-ENUM(Channel, int, Red, Green, Blue)
+BETTER_ENUM(Channel, int, Red, Green, Blue)
 
 int main()
 {
diff --git a/example/5-map.cc b/example/5-map.cc
index 4588e86..3f0728a 100644
--- a/example/5-map.cc
+++ b/example/5-map.cc
@@ -28,7 +28,7 @@
 #include 
 #include 
 
-ENUM(Channel, int, Red, Green, Blue)
+BETTER_ENUM(Channel, int, Red, Green, Blue)
 
 // We will create a map from this function:
 
diff --git a/example/6-iostreams.cc b/example/6-iostreams.cc
index 0904843..2eebccb 100644
--- a/example/6-iostreams.cc
+++ b/example/6-iostreams.cc
@@ -9,7 +9,7 @@
 #include 
 #include 
 
-ENUM(Channel, int, Red, Green, Blue)
+BETTER_ENUM(Channel, int, Red, Green, Blue)
 
 int main()
 {
diff --git a/example/7-safety.cc b/example/7-safety.cc
index 31bcd55..53c16b5 100644
--- a/example/7-safety.cc
+++ b/example/7-safety.cc
@@ -13,7 +13,7 @@
 #include 
 #include 
 
-ENUM(Channel, int, Red = 1, Green, Blue)
+BETTER_ENUM(Channel, int, Red = 1, Green, Blue)
 
 // you don't get names such as Red in the global namespace. Instead, you get
 // Channel, and Red is accessible as Channel::Red. This is no big deal in C++11,
@@ -21,7 +21,7 @@ ENUM(Channel, int, Red = 1, Green, Blue)
 // Better Enums brings scope uniformly to both variants. So, despite the above
 // declaration, you can safely declare
 
-ENUM(Node, char, Red, Black)
+BETTER_ENUM(Node, char, Red, Black)
 
 // and everything will work as expected.
 
diff --git a/example/8-representation.cc b/example/8-representation.cc
index b04b9cf..63bca8d 100644
--- a/example/8-representation.cc
+++ b/example/8-representation.cc
@@ -9,7 +9,7 @@
 #include 
 #include 
 
-ENUM(ContentType, short,
+BETTER_ENUM(ContentType, short,
      CompressedVideo = 5, PCM = 8, Subtitles = 17, Comment = 44)
 
 // This is for a hypothetical multimedia container file format. Perhaps the
diff --git a/example/9-constexpr.cc b/example/9-constexpr.cc
index 00c4ac8..8c488b8 100644
--- a/example/9-constexpr.cc
+++ b/example/9-constexpr.cc
@@ -17,7 +17,7 @@
 
 #include 
 
-ENUM(Channel, int, Red = 1, Green = 2, Blue = 3)
+BETTER_ENUM(Channel, int, Red = 1, Green = 2, Blue = 3)
 
 constexpr Channel      channel = Channel::_from_integral(2);
 constexpr int          value = channel._to_integral();
diff --git a/test/cxxtest/general.h b/test/cxxtest/general.h
index cd7c274..35350a2 100644
--- a/test/cxxtest/general.h
+++ b/test/cxxtest/general.h
@@ -12,15 +12,15 @@
 
 
 
-ENUM(Channel, short, Red, Green, Blue)
-ENUM(Depth, short, HighColor = 40, TrueColor = 20)
-ENUM(Compression, short, None, Huffman, Default = Huffman)
+BETTER_ENUM(Channel, short, Red, Green, Blue)
+BETTER_ENUM(Depth, short, HighColor = 40, TrueColor = 20)
+BETTER_ENUM(Compression, short, None, Huffman, Default = Huffman)
 
 
 
 namespace test {
 
-ENUM(Namespaced, short, One, Two)
+BETTER_ENUM(Namespaced, short, One, Two)
 
 }
 
@@ -300,7 +300,7 @@ class EnumTests : public CxxTest::TestSuite {
 
 
 
-ENUM(InternalNameCollisions, int,
-     EnumClassForSwitchStatements, PutNamesInThisScopeAlso,
-     force_initialization, value_array, raw_names, name_storage, name_array,
-     initialized, the_raw_names, the_name_array)
+BETTER_ENUM(InternalNameCollisions, int,
+            EnumClassForSwitchStatements, PutNamesInThisScopeAlso,
+            force_initialization, value_array, raw_names, name_storage,
+            name_array, initialized, the_raw_names, the_name_array)
diff --git a/test/cxxtest/stream.h b/test/cxxtest/stream.h
index 18b2df8..c24b632 100644
--- a/test/cxxtest/stream.h
+++ b/test/cxxtest/stream.h
@@ -4,7 +4,7 @@
 
 
 
-ENUM(Compiler, int, GCC, Clang, MSVC)
+BETTER_ENUM(Compiler, int, GCC, Clang, MSVC)
 
 
 
diff --git a/test/cxxtest/underlying.h b/test/cxxtest/underlying.h
index 42fa5cd..900d4a6 100644
--- a/test/cxxtest/underlying.h
+++ b/test/cxxtest/underlying.h
@@ -36,8 +36,9 @@ struct integral_mapping {
 
 }
 
-ENUM(HtmlColor1, html_color_1,
-     darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954)
+BETTER_ENUM(HtmlColor1, html_color_1,
+            darksalmon = 0xc47451, purplemimosa = 0x9e7bff,
+            slimegreen = 0xbce954)
 
 
 
@@ -75,12 +76,13 @@ struct html_color_2 {
 #endif
 
 #ifdef SUPPORT_INITIALIZER
-ENUM(HtmlColor2, html_color_2,
-     darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954,
-     celeste = html_color_2(0x50, 0xeb, 0xec))
+BETTER_ENUM(HtmlColor2, html_color_2,
+            darksalmon = 0xc47451, purplemimosa = 0x9e7bff,
+            slimegreen = 0xbce954, celeste = html_color_2(0x50, 0xeb, 0xec))
 #else
-ENUM(HtmlColor2, html_color_2,
-     darksalmon = 0xc47451, purplemimosa = 0x9e7bff, slimegreen = 0xbce954)
+BETTER_ENUM(HtmlColor2, html_color_2,
+            darksalmon = 0xc47451, purplemimosa = 0x9e7bff,
+            slimegreen = 0xbce954)
 #endif
 
 
diff --git a/test/expect/104-quine b/test/expect/104-quine
index 437eca3..d5c54ac 100644
--- a/test/expect/104-quine
+++ b/test/expect/104-quine
@@ -1,2 +1,2 @@
-ENUM(Channel, int, Red = 0, Green = 1, Blue = 2)
-ENUM(Depth, int, TrueColor = 1, HighColor = 0)
+BETTER_ENUM(Channel, int, Red = 0, Green = 1, Blue = 2)
+BETTER_ENUM(Depth, int, TrueColor = 1, HighColor = 0)
diff --git a/test/linking/shared.h b/test/linking/shared.h
index 5c93cae..0d3c642 100644
--- a/test/linking/shared.h
+++ b/test/linking/shared.h
@@ -3,6 +3,6 @@
 
 #include 
 
-ENUM(Channel, int, Red, Green, Blue)
+BETTER_ENUM(Channel, int, Red, Green, Blue)
 
 #endif // #ifndef _SHARED_H_
diff --git a/test/performance/4-declare_enums.cc b/test/performance/4-declare_enums.cc
index 400e291..73cd4c6 100644
--- a/test/performance/4-declare_enums.cc
+++ b/test/performance/4-declare_enums.cc
@@ -1,219 +1,223 @@
 #include 
 
-ENUM(Channel, int,
-     Red, Green, Blue, Cyan, Magenta, Yellow, Black, Hue, Saturation, Value)
+BETTER_ENUM(Channel, int,
+            Red, Green, Blue, Cyan, Magenta, Yellow, Black, Hue, Saturation,
+            Value)
 
-ENUM(Direction, int,
-     North, East, South, West, NorthEast, SouthEast, SouthWest, NorthWest,
-     NorthNorthEast, EastNorthEast, EastSouthEast, SouthSouthEast,
-     SouthSouthWest, WestSouthWest, WestNorthWest, NorthNorthWest)
+BETTER_ENUM(Direction, int,
+            North, East, South, West, NorthEast, SouthEast, SouthWest,
+            NorthWest, NorthNorthEast, EastNorthEast, EastSouthEast,
+            SouthSouthEast, SouthSouthWest, WestSouthWest, WestNorthWest,
+            NorthNorthWest)
 
-ENUM(ASTNode, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(State, int,
-     Attacking, Defending, Searching, Pursuing, Hungry, Fleeing, Confused,
-     Healing, Stunned)
+BETTER_ENUM(State, int,
+            Attacking, Defending, Searching, Pursuing, Hungry, Fleeing,
+            Confused, Healing, Stunned)
 
-ENUM(APIMethod, int,
-     ReadPost, WritePost, PollPost, ReadImage, WriteImage, PollImage, ReadKey,
-     WriteKey, PollKey, ReadUser, WriteUser, PollUser, ReadOrganization,
-     WriteOrganization, PollOrganization, ReadGroup, WriteGroup, PollGroup,
-     ReadProject, WriteProject, PollProject, ReadComment, WriteComment,
-     PollComment, ReadPermission, WritePermission, PollPermission, ReadOwner,
-     WriteOwner, PollOwner, ReadProposal, WriteProposal, PollProposal,
-     ReadHistory, WriteHistory, PollHistory)
+BETTER_ENUM(APIMethod, int,
+            ReadPost, WritePost, PollPost, ReadImage, WriteImage, PollImage,
+            ReadKey, WriteKey, PollKey, ReadUser, WriteUser, PollUser,
+            ReadOrganization, WriteOrganization, PollOrganization, ReadGroup,
+            WriteGroup, PollGroup, ReadProject, WriteProject, PollProject,
+            ReadComment, WriteComment, PollComment, ReadPermission,
+            WritePermission, PollPermission, ReadOwner, WriteOwner, PollOwner,
+            ReadProposal, WriteProposal, PollProposal, ReadHistory,
+            WriteHistory, PollHistory)
 
-ENUM(Lipsum, int,
-     Lorem, ipsum, dolor, sit, amet, consectetur, adipiscing, elit, Vivamus,
-     libero, massa, tincidunt, at, ex, nec, porta, malesuada, arcu, Nullam,
-     lectus, nibh, dictum, eget, convallis, ac, feugiat, felis, Suspendisse,
-     quis, purus, vel, lacus, cursus, tristique, Donec, augue, tortor, luctus,
-     a, sed, mattis, in, quam, Cras, vitae, euismod, Cum, sociis, natoque,
-     penatibus, et, magnis, dis, parturient)
+BETTER_ENUM(Lipsum, int,
+            Lorem, ipsum, dolor, sit, amet, consectetur, adipiscing, elit,
+            Vivamus, libero, massa, tincidunt, at, ex, nec, porta, malesuada,
+            arcu, Nullam, lectus, nibh, dictum, eget, convallis, ac, feugiat,
+            felis, Suspendisse, quis, purus, vel, lacus, cursus, tristique,
+            Donec, augue, tortor, luctus, a, sed, mattis, in, quam, Cras, vitae,
+            euismod, Cum, sociis, natoque, penatibus, et, magnis, dis,
+            parturient)
 
-ENUM(ASTNode0, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode0, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode1, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode1, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode2, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode2, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode3, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode3, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode4, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode4, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode5, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode5, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode6, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode6, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode7, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode7, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode8, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode8, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode9, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode9, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode10, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode10, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode11, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode11, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode12, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode12, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode13, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode13, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode14, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode14, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode15, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode15, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode16, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode16, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode17, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode17, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode18, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode18, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode19, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode19, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode20, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode20, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode21, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode21, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode22, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode22, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode23, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode23, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode24, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode24, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode25, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode25, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode26, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode26, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode27, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode27, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode28, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode28, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
-ENUM(ASTNode29, int,
-     IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
-     BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
-     CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
-     BasicType, ArrowType, VariantTypeConstant)
+BETTER_ENUM(ASTNode29, int,
+            IntegerLiteral, StringLiteral, CharacterLiteral, Variable,
+            UnaryOperation, BinaryOperation, ApplicationExpression, Abstraction,
+            LetBinding, CaseExpression, Pattern, Signature, Module, Functor,
+            TypeVariable, BasicType, ArrowType, VariantTypeConstant)
 
 int main()
 {