libcspm-1.0.0: A library providing a parser, type checker and evaluator for CSPM.

Safe HaskellSafe-Inferred



Various miscellaneous functions utility functions.



thenCmp :: Ordering -> Ordering -> OrderingSource

Given two orderings, returns the second if the first is EQ and returns the first otherwise.

expandPathIO :: String -> IO StringSource

Given a file path, if the first character is a ~ then expands the ~ to the users' home directory.

trim :: String -> StringSource

Remove whitespace from the beginning and end of a string.

cartProduct :: [[a]] -> [[a]]Source

Compute the Cartesian product of a list of lists.