lib/types: make pattern of strMatching accessible

This commit is contained in:
Johannes Kirschbauer 2024-10-22 13:34:20 +02:00
parent d2dfc1ac21
commit ad7b2f3438
No known key found for this signature in database

View File

@ -443,6 +443,11 @@ rec {
descriptionClass = "noun";
check = x: str.check x && builtins.match pattern x != null;
inherit (str) merge;
functor = defaultFunctor "strMatching" // {
type = payload: strMatching payload.pattern;
payload = { inherit pattern; };
binOp = lhs: rhs: if lhs == rhs then lhs else null;
};
};
# Merge multiple definitions by concatenating them (with the given