From c25390646bf9289dbba78a6d54f7e9a71fda3dc2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 28 Nov 2020 19:20:57 -0500 Subject: Use weekly branch names in pie, and small refactors --- Alpha.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Alpha.hs') diff --git a/Alpha.hs b/Alpha.hs index 556f8df..f95d234 100644 --- a/Alpha.hs +++ b/Alpha.hs @@ -43,6 +43,9 @@ module Alpha -- * String capitalize, + -- * Data Validation + require, + -- * Debugging tools say, ) @@ -115,3 +118,7 @@ instance CanSnakeCase Text where capitalize :: String -> String capitalize [] = [] capitalize str = (Char.toUpper <| List.head str) : (Char.toLower Maybe a -> a +require _ (Just x) = x +require s Nothing = panic <| s <> " not found" -- cgit v1.2.3