diff options
author | lassulus <lass@aidsballs.de> | 2016-06-05 00:38:00 +0200 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2016-06-05 00:38:00 +0200 |
commit | baa20586b875e5b6bd600cf731f15d2251d05c95 (patch) | |
tree | 19ad3210a2b8485ac22d26f75b2e2493d3f61596 /krebs/4lib | |
parent | 231eda580b273d630fe10894d4ea46135c1f941d (diff) | |
parent | c1c645b545b960eb639fc6d41dfa35ee187ae164 (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/4lib')
-rw-r--r-- | krebs/4lib/types.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 56d1d55c3..66191d0b3 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -286,6 +286,19 @@ types // rec { }; }; + haskell.conid = mkOptionType { + name = "Haskell constructor identifier"; + check = x: + isString x && match "[[:upper:]][[:lower:]_[:upper:]0-9']*" x != null; + merge = mergeOneOption; + }; + + haskell.modid = mkOptionType { + name = "Haskell module identifier"; + check = x: isString x && all haskell.conid.check (splitString "." x); + merge = mergeOneOption; + }; + # RFC952, B. Lexical grammar, <hname> hostname = mkOptionType { name = "hostname"; |