Skip to content

Commit

Permalink
lib/types: make pattern of strMatching accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjobeki committed Oct 22, 2024
1 parent d2dfc1a commit d2207de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/types.nix
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,10 @@ rec {
descriptionClass = "noun";
check = x: str.check x && builtins.match pattern x != null;
inherit (str) merge;
functor = defaultFunctor "strMatching" // {
payload = pattern;
binOp = lhs: rhs: if lhs == rhs then lhs else null;
};
};

# Merge multiple definitions by concatenating them (with the given
Expand Down

0 comments on commit d2207de

Please sign in to comment.