{-# LANGUAGE NoImplicitPrelude #-}

-- | This module provides a first-class version
-- of the "Data.Text.Lazy" module.
module ModularPrelude.Module.LText
  ( -- * Module interface
    LTextModule (..)
    -- * Module contents
  , LTextImplements (..)
  ) where


import ModularPrelude hiding (empty)
import qualified Data.Text.Lazy as LText
import qualified Data.Text.Lazy.IO as LText
import qualified Filesystem.Path.CurrentOS as FilePath


data LTextModule = LText
  { LTextModule -> (Char -> Char) -> LText -> LText
map       :: (Char -> Char) -> LText -> LText
  , LTextModule -> (Char -> LText) -> LText -> LText
concatMap :: (Char -> LText) -> LText -> LText
  , LTextModule -> (Char -> Bool) -> LText -> LText
filter    :: (Char -> Bool) -> LText -> LText
  , LTextModule -> LText -> Int64
length    :: LText -> Int64
  , LTextModule -> Char -> LText
singleton :: Char -> LText
  , LTextModule -> LText -> Bool
null      :: LText -> Bool
  , LTextModule -> [Char] -> LText
pack      :: [Char] -> LText
  , LTextModule -> LText -> [Char]
unpack    :: LText -> [Char]
  , LTextModule -> LText
empty     :: LText
  , LTextModule -> FilePath -> IO LText
readFile  :: FilePath -> IO LText
  , LTextModule -> FilePath -> LText -> IO ()
writeFile :: FilePath -> LText -> IO ()
  , LTextModule -> (Char -> Bool) -> LText -> (LText, LText)
break     :: (Char -> Bool) -> LText -> (LText, LText)
  , LTextModule -> (Char -> Bool) -> LText -> (LText, LText)
span      :: (Char -> Bool) -> LText -> (LText, LText)
  , LTextModule -> (Char -> Bool) -> LText -> LText
dropWhile :: (Char -> Bool) -> LText -> LText
  , LTextModule -> (Char -> Bool) -> LText -> LText
takeWhile :: (Char -> Bool) -> LText -> LText
  , LTextModule -> (Char -> Bool) -> LText -> Bool
any       :: (Char -> Bool) -> LText -> Bool
  , LTextModule -> (Char -> Bool) -> LText -> Bool
all       :: (Char -> Bool) -> LText -> Bool
  , LTextModule -> Int64 -> LText -> (LText, LText)
splitAt   :: Int64 -> LText -> (LText, LText)
  }


class LTextImplements interface where
  _Data_Text_Lazy_ :: interface

instance LTextImplements LTextModule where
  _Data_Text_Lazy_ :: LTextModule
_Data_Text_Lazy_ = LText
    { map :: (Char -> Char) -> LText -> LText
map       = (Char -> Char) -> LText -> LText
LText.map
    , concatMap :: (Char -> LText) -> LText -> LText
concatMap = (Char -> LText) -> LText -> LText
LText.concatMap
    , filter :: (Char -> Bool) -> LText -> LText
filter    = (Char -> Bool) -> LText -> LText
LText.filter
    , length :: LText -> Int64
length    = LText -> Int64
LText.length
    , singleton :: Char -> LText
singleton = Char -> LText
LText.singleton
    , null :: LText -> Bool
null      = LText -> Bool
LText.null
    , pack :: [Char] -> LText
pack      = [Char] -> LText
LText.pack
    , unpack :: LText -> [Char]
unpack    = LText -> [Char]
LText.unpack
    , empty :: LText
empty     = LText
LText.empty
    , readFile :: FilePath -> IO LText
readFile  = [Char] -> IO LText
LText.readFile ([Char] -> IO LText)
-> (FilePath -> [Char]) -> FilePath -> IO LText
forall b c a. (b -> c) -> (a -> b) -> a -> c
forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. FilePath -> [Char]
FilePath.encodeString
    , writeFile :: FilePath -> LText -> IO ()
writeFile = [Char] -> LText -> IO ()
LText.writeFile ([Char] -> LText -> IO ())
-> (FilePath -> [Char]) -> FilePath -> LText -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. FilePath -> [Char]
FilePath.encodeString
    , break :: (Char -> Bool) -> LText -> (LText, LText)
break     = (Char -> Bool) -> LText -> (LText, LText)
LText.break
    , span :: (Char -> Bool) -> LText -> (LText, LText)
span      = (Char -> Bool) -> LText -> (LText, LText)
LText.span
    , dropWhile :: (Char -> Bool) -> LText -> LText
dropWhile = (Char -> Bool) -> LText -> LText
LText.dropWhile
    , takeWhile :: (Char -> Bool) -> LText -> LText
takeWhile = (Char -> Bool) -> LText -> LText
LText.takeWhile
    , any :: (Char -> Bool) -> LText -> Bool
any       = (Char -> Bool) -> LText -> Bool
LText.any
    , all :: (Char -> Bool) -> LText -> Bool
all       = (Char -> Bool) -> LText -> Bool
LText.all
    , splitAt :: Int64 -> LText -> (LText, LText)
splitAt   = Int64 -> LText -> (LText, LText)
LText.splitAt
    }


instance Default LTextModule where
  def :: LTextModule
def = LTextModule
forall interface. LTextImplements interface => interface
_Data_Text_Lazy_