Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Safe, total functions.
Synopsis
- class SafeList v where
- type SafeListElem v
- headMay :: v -> Maybe (SafeListElem v)
- lastMay :: v -> Maybe (SafeListElem v)
- headOr :: SafeListElem v -> v -> SafeListElem v
- lastOr :: SafeListElem v -> v -> SafeListElem v
- minimumMay :: v -> Maybe (SafeListElem v)
- maximumMay :: v -> Maybe (SafeListElem v)
- minimumOr :: SafeListElem v -> v -> SafeListElem v
- maximumOr :: SafeListElem v -> v -> SafeListElem v
Documentation
Safelist
type SafeListElem v #
headMay :: v -> Maybe (SafeListElem v) #
lastMay :: v -> Maybe (SafeListElem v) #
headOr :: SafeListElem v -> v -> SafeListElem v #
lastOr :: SafeListElem v -> v -> SafeListElem v #
minimumMay :: v -> Maybe (SafeListElem v) #
maximumMay :: v -> Maybe (SafeListElem v) #
minimumOr :: SafeListElem v -> v -> SafeListElem v #
maximumOr :: SafeListElem v -> v -> SafeListElem v #
Instances
Ord a => SafeList (Vector a) # | Tests
|
Defined in Data.SafeList type SafeListElem (Vector a) # headMay :: Vector a -> Maybe (SafeListElem (Vector a)) # lastMay :: Vector a -> Maybe (SafeListElem (Vector a)) # headOr :: SafeListElem (Vector a) -> Vector a -> SafeListElem (Vector a) # lastOr :: SafeListElem (Vector a) -> Vector a -> SafeListElem (Vector a) # minimumMay :: Vector a -> Maybe (SafeListElem (Vector a)) # maximumMay :: Vector a -> Maybe (SafeListElem (Vector a)) # minimumOr :: SafeListElem (Vector a) -> Vector a -> SafeListElem (Vector a) # maximumOr :: SafeListElem (Vector a) -> Vector a -> SafeListElem (Vector a) # | |
(Unbox a, Ord a) => SafeList (Vector a) # | The implementation is same as the one for |
Defined in Data.SafeList type SafeListElem (Vector a) # headMay :: Vector a -> Maybe (SafeListElem (Vector a)) # lastMay :: Vector a -> Maybe (SafeListElem (Vector a)) # headOr :: SafeListElem (Vector a) -> Vector a -> SafeListElem (Vector a) # lastOr :: SafeListElem (Vector a) -> Vector a -> SafeListElem (Vector a) # minimumMay :: Vector a -> Maybe (SafeListElem (Vector a)) # maximumMay :: Vector a -> Maybe (SafeListElem (Vector a)) # minimumOr :: SafeListElem (Vector a) -> Vector a -> SafeListElem (Vector a) # maximumOr :: SafeListElem (Vector a) -> Vector a -> SafeListElem (Vector a) # | |
Ord a => SafeList [a] # | Tests
|
Defined in Data.SafeList type SafeListElem [a] # headMay :: [a] -> Maybe (SafeListElem [a]) # lastMay :: [a] -> Maybe (SafeListElem [a]) # headOr :: SafeListElem [a] -> [a] -> SafeListElem [a] # lastOr :: SafeListElem [a] -> [a] -> SafeListElem [a] # minimumMay :: [a] -> Maybe (SafeListElem [a]) # maximumMay :: [a] -> Maybe (SafeListElem [a]) # minimumOr :: SafeListElem [a] -> [a] -> SafeListElem [a] # maximumOr :: SafeListElem [a] -> [a] -> SafeListElem [a] # |