sort package:dhall

Sort the keys of a Map, forgetting the original ordering
sort (sort x) = sort x
>>> sort (fromList [("B",1),("A",2)])
fromList [("A",2),("B",1)]
Sort the set elements, forgetting their original ordering.
>>> sort (fromList [2, 1]) == fromList [1, 2]
True
Utility used to censor Text by replacing all characters with a space
Check if the keys of a Map are already sorted
isSorted (sort m) = True
>>> isSorted (fromList [("B",1),("A",2)])  -- Sortedness is based only on keys
False

>>> isSorted (fromList [("A",2),("B",1)])
True
Parse the Sort built-in This corresponds to the Sort rule from the official grammar
>>> isSorted (fromList [2, 1])
False

>>> isSorted (fromList [1, 2])
True