aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/elna/boot/symbol.h8
-rw-r--r--include/elna/boot/type_check.h15
2 files changed, 9 insertions, 14 deletions
diff --git a/include/elna/boot/symbol.h b/include/elna/boot/symbol.h
index 31d5c45..705cb29 100644
--- a/include/elna/boot/symbol.h
+++ b/include/elna/boot/symbol.h
@@ -225,10 +225,10 @@ namespace elna::boot
/**
* Type parameter of a generic declaration.
*
- * It denotes an unknown pointer type chosen at instantiation, so it is
- * usable wherever a pointer is, and erases to a pointer in the backend.
- * Each declaration gets fresh parameters; two parameters spelled alike in
- * different declarations never compare equal.
+ * It denotes an unknown opaque type chosen at instantiation, so it is
+ * usable only behind a pointer (^T), and ^T erases to a pointer in the
+ * backend. Each declaration gets fresh parameters; two parameters spelled
+ * alike in different declarations never compare equal.
*/
struct parameter_type
{
diff --git a/include/elna/boot/type_check.h b/include/elna/boot/type_check.h
index 5e4f792..5a2d7f1 100644
--- a/include/elna/boot/type_check.h
+++ b/include/elna/boot/type_check.h
@@ -177,10 +177,6 @@ namespace elna::boot
{
std::string parameter;
};
- struct argument_not_pointer
- {
- type actual;
- };
struct argument_not_scalar
{
type actual;
@@ -200,7 +196,7 @@ namespace elna::boot
};
using payload_type = std::variant<not_generic, unused_parameter,
- argument_not_pointer, argument_not_scalar, constant_argument,
+ argument_not_scalar, constant_argument,
uninferrable_parameter, shape_mismatch>;
generic_error(const source_position position, const std::string& generic_name,
@@ -216,14 +212,13 @@ namespace elna::boot
/**
* What a generic declaration accepts as a type argument.
*
- * An erased generic takes a pointer, because that is what its single
- * compiled body knows how to move. A builtin has no body to erase, so it
- * takes whatever it can load or store, and only a reading one tolerates a
- * constant.
+ * An erased generic takes an opaque pointee, because it is only used
+ * behind a pointer. A builtin has no body to erase, so it takes whatever
+ * it can load or store, and only a reading one tolerates a constant.
*/
enum class argument_rule
{
- pointer,
+ opaque,
scalar,
mutable_scalar
};