Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- decodeDirectory :: (FromJSON a, MonadIO io) => FilePath -> io (Either String a)
- data ModifiedWhileReading
Documentation
decodeDirectory :: (FromJSON a, MonadIO io) => FilePath -> io (Either String a) Source #
Takes a directory and decodes it using a
instance.
Each entry in the directory becomes a key, and the contents become
the corresponding value.FromJSON
- Directories are recursed into.
- Files ending in
.json
are decoded as JSON values. - Everything else is assumed to be a valid unicode string.
This function can throw IO exceptions as well as a
exception if the modification time changes during processing.ModifiedWhileReading
data ModifiedWhileReading Source #
Instances
Show ModifiedWhileReading Source # | |
Defined in Data.JSON.Directory showsPrec :: Int -> ModifiedWhileReading -> ShowS # show :: ModifiedWhileReading -> String # showList :: [ModifiedWhileReading] -> ShowS # | |
Exception ModifiedWhileReading Source # | |
Defined in Data.JSON.Directory |