-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Prelude based on protolude for GHC 8 and beyond. -- -- A Prelude relpacement for GHC 8 with a focus on building applications -- with Lenses, Machines, and Applicatives. @package liblawless @version 0.17.3 module ByteString module Tree module Text module Set -- | A set of values a. data Set a :: * -> * -- | O(1). Create a singleton set. singleton :: a -> Set a module Parser -- | Network type library module Networking module Map -- | A Map from keys k to values a. data Map k a :: * -> * -> * -- | O(1). A map with a single element. -- --
-- singleton 1 'a' == fromList [(1, 'a')] -- size (singleton 1 'a') == 1 --singleton :: k -> a -> Map k a module Machine module Lawless module Text.IO readFile :: (MonadIO m) => AbsRelFile -> m Text writeFile :: (MonadIO m) => AbsRelFile -> Text -> m () appendFile :: (MonadIO m) => AbsRelFile -> Text -> m () hGetLine :: (MonadIO m) => Handle -> m Text hPutStr :: (MonadIO m) => Handle -> Text -> m () hPutStrLn :: (MonadIO m) => Handle -> Text -> m () getLine :: (MonadIO m) => m Text putStr :: (MonadIO m) => Text -> m () putStrLn :: (MonadIO m) => Text -> m () module Textual.SepList type SepList a = SepList' (NonEmpty a) sepList :: forall a. (Ord a, Binary a, Printable a) => a -> SepList a slItems :: Lens' (SepList' (NonEmpty a)) (NonEmpty a) instance Data.Foldable.Foldable Textual.SepList.SepList' instance GHC.Classes.Eq (Textual.SepList.SepList' (Data.List.NonEmpty.NonEmpty a)) instance GHC.Classes.Ord (Textual.SepList.SepList' (Data.List.NonEmpty.NonEmpty a)) instance Data.Semigroup.Semigroup (Textual.SepList.SepList' (Data.List.NonEmpty.NonEmpty a)) instance (GHC.Classes.Ord a, Data.Binary.Class.Binary a, Data.Textual.Printable a) => Data.Binary.Class.Binary (Textual.SepList.SepList' (Data.List.NonEmpty.NonEmpty a)) instance Data.Textual.Printable a => Data.Textual.Printable (Textual.SepList.SepList' (Data.List.NonEmpty.NonEmpty a)) instance Data.Textual.Printable a => GHC.Show.Show (Textual.SepList.SepList a) module Textual module Generics module Time data Time -- | The class of types which can be parsed given a UNIX-style time format -- string. class ParseTime t -- | Builds a time value from a parsed input string. If the input does not -- include all the information needed to construct a complete value, any -- missing parts should be taken from 1970-01-01 00:00:00 +0000 (which -- was a Thursday). In the absence of %C or %Y, century -- is 1969 - 2068. buildTime :: TimeLocale -> [(Char, String)] -> Maybe t class FormatTime t formatCharacter :: Char -> Maybe (TimeLocale -> Maybe NumericPadOption -> t -> String) _Time :: Iso' Time UTCTime day :: Lens' Time Day time :: Lens' Time DiffTime now :: IO Time instance Data.Binary.Class.Binary Time.Time instance Data.Textual.Printable Time.Time instance GHC.Generics.Generic Time.Time instance Data.Time.Format.FormatTime Time.Time instance Data.Time.Format.Parse.ParseTime Time.Time instance GHC.Classes.Ord Time.Time instance GHC.Classes.Eq Time.Time instance GHC.Show.Show Time.Time module Exception module Boomerang type TextsBoomerang a b = Boomerang TextsError [Text] a b (∘) :: forall (b :: k) (c :: k) (a :: k) (cat :: k -> k -> *). Category cat => cat b c -> cat a b -> cat a c infix 9 ∘ module Arbitrary instance Test.QuickCheck.Arbitrary.Arbitrary (Textual.SepList.SepList GHC.Types.Char) instance Test.QuickCheck.Arbitrary.Arbitrary Data.Text.Internal.Text instance Test.QuickCheck.Arbitrary.Arbitrary Data.Time.Calendar.Days.Day instance Test.QuickCheck.Arbitrary.Arbitrary Data.Time.Clock.Scale.DiffTime instance Test.QuickCheck.Arbitrary.Arbitrary Data.Time.Clock.UTC.UTCTime instance Test.QuickCheck.Arbitrary.Arbitrary Time.Time module Aeson lawlessJSONOptions :: Options lawlessToJSONEncoding :: forall a. (GToEncoding (Rep a), Generic a) => a -> Encoding lawlessParseJSON :: forall a. (GFromJSON (Rep a), Generic a) => Value -> Parser a module Path toString :: (AbsRel ar, FileDir fd) => Path ar fd -> String rootDir :: AbsDir currentDir :: RelDir emptyFile :: RelFile splitPath :: (AbsRel ar, FileOrDir fd) => Path os ar fd -> (Bool, [RelDir os], Maybe (RelFile os)) dropExtension :: FilePath os ar -> FilePath os ar dropExtensions :: FilePath os ar -> FilePath os ar dropFileName :: FilePath os ar -> DirPath os ar replaceExtension :: FilePath os ar -> String -> FilePath os ar replaceBaseName :: FilePath os ar -> String -> FilePath os ar replaceDirectory :: FilePath os ar1 -> DirPath os ar2 -> FilePath os ar2 replaceFileName :: FilePath os ar -> String -> FilePath os ar addExtension :: FilePath os ar -> String -> FilePath os ar combine :: DirPath os ar -> RelPath os fd -> Path os ar fd dropExtension :: FilePath os ar -> FilePath os ar dropExtensions :: FilePath os ar -> FilePath os ar dropFileName :: FilePath os ar -> DirPath os ar replaceExtension :: FilePath os ar -> String -> FilePath os ar replaceBaseName :: FilePath os ar -> String -> FilePath os ar replaceDirectory :: FilePath os ar1 -> DirPath os ar2 -> FilePath os ar2 replaceFileName :: FilePath os ar -> String -> FilePath os ar splitExtension :: FilePath os ar -> (FilePath os ar, String) splitExtensions :: FilePath os ar -> (FilePath os ar, String) splitFileName :: FilePath os ar -> (DirPath os ar, RelFile os) splitDirName :: DirPath os ar -> Maybe (DirPath os ar, RelDir os) takeBaseName :: FilePath os ar -> RelFile os takeDirectory :: FilePath os ar -> DirPath os ar takeSuperDirectory :: DirPath os ar -> Maybe (DirPath os ar) takeExtension :: FilePath os ar -> String takeExtensions :: FilePath os ar -> String takeFileName :: FilePath os ar -> RelFile os takeDirName :: DirPath os ar -> Maybe (RelDir os) mapFileName :: (String -> String) -> FilePath os ar -> FilePath os ar mapFileNameF :: Functor f => (String -> f String) -> FilePath os ar -> f (FilePath os ar) equalFilePath :: String -> String -> Bool joinPath :: FileDir fd => [String] -> RelPath os fd normalise :: System os => Path os ar fd -> Path os ar fd splitPath :: (AbsRel ar, FileOrDir fd) => Path os ar fd -> (Bool, [RelDir os], Maybe (RelFile os)) makeRelative :: (System os, FileDir fd) => AbsDir os -> AbsPath os fd -> RelPath os fd makeRelativeMaybe :: (System os, FileDir fd) => AbsDir os -> AbsPath os fd -> Maybe (RelPath os fd) makeAbsolute :: System os => AbsDir os -> RelPath os fd -> AbsPath os fd makeAbsoluteFromCwd :: System os => RelPath os fd -> IO (AbsPath os fd) dynamicMakeAbsolute :: System os => AbsDir os -> AbsRelPath os fd -> AbsPath os fd dynamicMakeAbsoluteFromCwd :: System os => AbsRelPath os fd -> IO (AbsPath os fd) genericMakeAbsolute :: (System os, AbsRel ar) => AbsDir os -> Path os ar fd -> AbsPath os fd genericMakeAbsoluteFromCwd :: (System os, AbsRel ar) => Path os ar fd -> IO (AbsPath os fd) pathMap :: FileDir fd => (String -> String) -> Path os ar fd -> Path os ar fd dirFromFile :: FilePath os ar -> DirPath os ar fileFromDir :: DirPath os ar -> Maybe (FilePath os ar) toFileDir :: FileDir fd => Path os ar fd -> FileDirPath os ar fromFileDir :: FileDir fd => FileDirPath os ar -> Maybe (Path os ar fd) fileFromFileDir :: FileDirPath os ar -> Maybe (FilePath os ar) dirFromFileDir :: FileDirPath os ar -> DirPath os ar isAbsolute :: AbsRel ar => Path os ar fd -> Bool isRelative :: AbsRel ar => Path os ar fd -> Bool isAbsoluteString :: String -> Bool isRelativeString :: String -> Bool hasAnExtension :: FilePath os ar -> Bool hasExtension :: String -> FilePath os ar -> Bool extSeparator :: Char searchPathSeparator :: Char isExtSeparator :: Char -> Bool isSearchPathSeparator :: Char -> Bool genericAddExtension :: FileDir fd => Path os ar fd -> String -> Path os ar fd genericDropExtension :: FileDir fd => Path os ar fd -> Path os ar fd genericDropExtensions :: FileDir fd => Path os ar fd -> Path os ar fd genericSplitExtension :: FileDir fd => Path os ar fd -> (Path os ar fd, String) genericSplitExtensions :: FileDir fd => Path os ar fd -> (Path os ar fd, String) genericTakeExtension :: FileDir fd => Path os ar fd -> String genericTakeExtensions :: FileDir fd => Path os ar fd -> String parse :: (AbsRel ar, FileDir fd) => String -> Either String (Path ar fd) toText :: (AbsRel ar, FileDir fd) => Path ar fd -> Text type AbsFile = AbsFile System type RelFile = RelFile System type AbsDir = AbsDir System type RelDir = RelDir System type AbsRelFile = AbsRelFile System type AbsRelDir = AbsRelDir System absFile :: (IsText t) => t -> AbsFile relFile :: (IsText t) => t -> RelFile absDir :: (IsText t) => t -> AbsDir relDir :: (IsText t) => t -> RelDir absRelFile :: (IsText t) => t -> AbsRelFile absRelDir :: (IsText t) => t -> AbsRelDir (>) :: DirPath os ar -> RelPath os fd -> Path os ar fd (<.>) :: FilePath os ar -> String -> FilePath os ar (<++>) :: FilePath os ar -> String -> FilePath os ar instance Data.Aeson.Types.Class.FromJSON System.Path.Posix.AbsFile instance Data.Aeson.Types.Class.ToJSON System.Path.Posix.AbsFile instance Data.Aeson.Types.Class.FromJSON System.Path.Posix.AbsDir instance Data.Aeson.Types.Class.ToJSON System.Path.Posix.AbsDir instance Data.Aeson.Types.Class.ToJSON System.Path.Posix.RelFile instance Data.Aeson.Types.Class.FromJSON System.Path.Posix.RelDir instance Data.Aeson.Types.Class.ToJSON System.Path.Posix.RelDir instance Data.Aeson.Types.Class.FromJSON System.Path.Posix.AbsRelDir instance Data.Aeson.Types.Class.ToJSON System.Path.Posix.AbsRelDir instance Data.Aeson.Types.Class.FromJSON System.Path.Posix.AbsRelFile instance Data.Aeson.Types.Class.ToJSON System.Path.Posix.AbsRelFile module IO putStr :: (MonadIO m, Printable p) => p -> m () putStrLn :: (MonadIO m, Printable p) => p -> m () managed :: (forall r. (a -> IO r) -> IO r) -> Managed a data Managed a :: * -> * class MonadIO m => MonadManaged (m :: * -> *) using :: Managed a -> m a runManaged :: Managed () -> IO () data TempFile tfPath :: Lens' TempFile AbsFile tfHandle :: Lens' TempFile Handle tempFile :: AbsDir -> RelFile -> Managed TempFile -- | Monads in which IO computations may be embedded. Any monad -- built by applying a sequence of monad transformers to the IO -- monad will be an instance of this class. -- -- Instances should satisfy the following laws, which state that -- liftIO is a transformer of monads: -- -- class Monad m => MonadIO (m :: * -> *) -- | Lift a computation from the IO monad. liftIO :: IO a -> m a -- | Lift a computation from the IO monad. liftIO :: MonadIO m => forall a. IO a -> m a -- | Computation hSeek hdl mode i sets the position of -- handle hdl depending on mode. The offset i -- is given in terms of 8-bit bytes. -- -- If hdl is block- or line-buffered, then seeking to a position -- which is not in the current buffer will first cause any items in the -- output buffer to be written to the device, and then cause the input -- buffer to be discarded. Some handles may not be seekable (see -- hIsSeekable), or only support a subset of the possible -- positioning operations (for instance, it may only be possible to seek -- to the end of a tape, or to a positive offset from the beginning or -- current position). It is not possible to set a negative I/O position, -- or for a physical file, an I/O position beyond the current -- end-of-file. -- -- This operation may fail with: -- --