Hoogle Search

Within LTS Haskell 24.64 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. isValid :: FilePath -> Bool

    rio RIO.FilePath

    Is a FilePath valid, i.e. could you create a file like it? This function checks for invalid names, and invalid characters, but does not check if length limits are exceeded, as these are typically filesystem dependent.

    isValid "" == False
    isValid "\0" == False
    Posix:   isValid "/random_ path:*" == True
    Posix:   isValid x == not (null x)
    Windows: isValid "c:\\test" == True
    Windows: isValid "c:\\test:of_test" == False
    Windows: isValid "test*" == False
    Windows: isValid "c:\\test\\nul" == False
    Windows: isValid "c:\\test\\prn.txt" == False
    Windows: isValid "c:\\nul\\file" == False
    Windows: isValid "\\\\" == False
    Windows: isValid "\\\\\\foo" == False
    Windows: isValid "\\\\?\\D:file" == False
    Windows: isValid "foo\tbar" == False
    Windows: isValid "nul .txt" == False
    Windows: isValid " nul.txt" == True
    

  2. makeValid :: FilePath -> FilePath

    rio RIO.FilePath

    Take a FilePath and make it valid; does not change already valid FILEPATHs.

    isValid (makeValid x)
    isValid x ==> makeValid x == x
    makeValid "" == "_"
    makeValid "file\0name" == "file_name"
    Windows: makeValid "c:\\already\\/valid" == "c:\\already\\/valid"
    Windows: makeValid "c:\\test:of_test" == "c:\\test_of_test"
    Windows: makeValid "test*" == "test_"
    Windows: makeValid "c:\\test\\nul" == "c:\\test\\nul_"
    Windows: makeValid "c:\\test\\prn.txt" == "c:\\test\\prn_.txt"
    Windows: makeValid "c:\\test/prn.txt" == "c:\\test/prn_.txt"
    Windows: makeValid "c:\\nul\\file" == "c:\\nul_\\file"
    Windows: makeValid "\\\\\\foo" == "\\\\drive"
    Windows: makeValid "\\\\?\\D:file" == "\\\\?\\D:\\file"
    Windows: makeValid "nul .txt" == "nul _.txt"
    

  3. valid :: Ord k => Map k a -> Bool

    rio RIO.Map

    Test if the internal map structure is valid.

    valid (fromAscList [(3,"b"), (5,"a")]) == True
    valid (fromAscList [(5,"a"), (3,"b")]) == False
    

  4. void :: Functor f => f a -> f ()

    rio RIO.Prelude

    void value discards or ignores the result of evaluation, such as the return value of an IO action.

    Examples

    Replace the contents of a Maybe Int with unit:
    >>> void Nothing
    Nothing
    
    >>> void (Just 3)
    Just ()
    
    Replace the contents of an Either Int Int with unit, resulting in an Either Int ():
    >>> void (Left 8675309)
    Left 8675309
    
    >>> void (Right 8675309)
    Right ()
    
    Replace every element of a list with unit:
    >>> void [1,2,3]
    [(),(),()]
    
    Replace the second element of a pair with unit:
    >>> void (1,2)
    (1,())
    
    Discard the result of an IO action:
    >>> mapM print [1,2]
    1
    2
    [(),()]
    
    >>> void $ mapM print [1,2]
    1
    2
    

  5. class Semigroup a => Monoid a

    rio RIO.Prelude.Types

    The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:

    You can alternatively define mconcat instead of mempty, in which case the laws are: The method names refer to the monoid of lists under concatenation, but there are many other instances. Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of Monoid, e.g. Sum and Product. NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.

  6. data Void

    rio RIO.Prelude.Types

    Uninhabited data type

  7. runIdentity :: Identity a -> a

    rio RIO.Prelude.Types

    No documentation available.

  8. PathsInvalidInPath :: [FilePath] -> ProcessException

    rio RIO.Process

    No documentation available.

  9. valid :: Ord a => Set a -> Bool

    rio RIO.Set

    Test if the internal set structure is valid.

  10. Friday :: DayOfWeek

    rio RIO.Time

    No documentation available.

Page 461 of many | Previous | Next