Safe Haskell | Safe-Infered |
---|
- completeInList :: String -> (String -> Maybe String) -> [String] -> EditorM String
- completeInList' :: String -> (String -> Maybe String) -> [String] -> EditorM String
- completeInListCustomShow :: (String -> String) -> String -> (String -> Maybe String) -> [String] -> EditorM String
- commonPrefix :: Eq a => [[a]] -> [a]
- prefixMatch :: String -> String -> Maybe String
- infixMatch :: String -> String -> Maybe String
- containsMatch' :: Bool -> String -> String -> Maybe String
- containsMatch :: String -> String -> Maybe String
- containsMatchCaseInsensitive :: String -> String -> Maybe String
- mkIsPrefixOf :: Bool -> String -> String -> Bool
Documentation
completeInList :: String -> (String -> Maybe String) -> [String] -> EditorM StringSource
Complete a string given a user input string, a matching function and a list of possibilites. Matching function should return the part of the string that matches the user string.
completeInListCustomShow :: (String -> String) -> String -> (String -> Maybe String) -> [String] -> EditorM StringSource
Same as completeInList
, but maps showFunction
on possible matches when printing
commonPrefix :: Eq a => [[a]] -> [a]Source
Return the longest common prefix of a set of lists.
P(xs) === all (isPrefixOf (commonPrefix xs)) xs length s > length (commonPrefix xs) --> not (all (isPrefixOf s) xs)
prefixMatch :: String -> String -> Maybe StringSource
Prefix matching function, for use with completeInList
infixMatch :: String -> String -> Maybe StringSource
Infix matching function, for use with completeInList