Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data SuccFail a
- parsef :: Read a => String -> String -> String -> SuccFail a
- parseInt :: String -> String -> SuccFail Int
- parseDouble :: String -> String -> SuccFail Double
- parseVerbatim :: String -> String -> SuccFail String
- par :: String -> [String] -> String
- putCatsLn :: [String] -> IO ()
- putCatLn :: [String] -> IO ()
- info :: Show t => t -> IO ()
- fake :: String -> IO ()
- stub :: String -> IO ()
- errcat :: [String] -> a
- errcats :: [String] -> a
- map2 :: (a -> b) -> [[a]] -> [[b]]
- mapM2 :: Monad m => (a -> m b) -> [[a]] -> m [[b]]
- adjustAList :: Eq k => k -> (v -> v) -> [(k, v)] -> [(k, v)]
- adjustAListM :: (Eq k, Monad m) => k -> (v -> m v) -> [(k, v)] -> m [(k, v)]
- insertLastLast :: [[a]] -> a -> [[a]]
- insertLast :: [a] -> a -> [a]
Documentation
Parser Utilities
String Utilities
par :: String -> [String] -> String Source
Enclose in parentheses, like a Lisp function call. Example: par "foo" ["x", "y"] = "(foo x y)"
Error Reporting
errcats :: [String] -> a Source
Signal an error using a list of strings to be concatenated with spaces between (unwords).
List Utilities
adjustAList :: Eq k => k -> (v -> v) -> [(k, v)] -> [(k, v)] Source
Update a value at a given key by applying a function. Similar to Data.Map.adjust.
adjustAListM :: (Eq k, Monad m) => k -> (v -> m v) -> [(k, v)] -> m [(k, v)] Source
Monadic generalization of adjustAList
insertLastLast :: [[a]] -> a -> [[a]] Source
Insert an item into a list of lists of items, making it the last element in the last sublist
insertLast :: [a] -> a -> [a] Source
Insert an item in a list of items, making it the last element