summaryrefslogtreecommitdiff
path: root/Alpha.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-12-04 11:16:25 -0500
committerBen Sima <ben@bsima.me>2020-12-05 07:55:13 -0500
commit330e4363d8abb509031d2c8c1a89dcc6f955e2c1 (patch)
tree915c8c50a7125bf6eb9e560f8d00a80592f41c77 /Alpha.hs
parent32f53350a3a3d701e9a1474e670a8454342adc40 (diff)
Renamespace Devalloc and Que
Move them under the Biz root so that we know they are specific to Biz stuff. Biz is for proprietary stuff that we own. I also had to refactor the bild namespace parsing code because it couldn't handle a namespace with 3 parts. I really need to get that namespace library written and tested.
Diffstat (limited to 'Alpha.hs')
-rw-r--r--Alpha.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Alpha.hs b/Alpha.hs
index f95d234..5e41649 100644
--- a/Alpha.hs
+++ b/Alpha.hs
@@ -42,6 +42,7 @@ module Alpha
-- * String
capitalize,
+ lowercase,
-- * Data Validation
require,
@@ -119,6 +120,8 @@ capitalize :: String -> String
capitalize [] = []
capitalize str = (Char.toUpper <| List.head str) : (Char.toLower </ List.tail str)
+lowercase str = [Char.toLower c | c <- str]
+
require :: Text -> Maybe a -> a
require _ (Just x) = x
require s Nothing = panic <| s <> " not found"