fs-effectful
Safe HaskellNone
LanguageGHC2021

Effectful.FileSystem.HandleRW.Static

Synopsis

Effect

data HandleRW (a :: Type -> Type) b Source #

Static effect for reading a handle.

Since: 0.1

Instances

Instances details
type DispatchOf HandleRW Source # 
Instance details

Defined in Effectful.FileSystem.HandleRW.Static

data StaticRep HandleRW Source # 
Instance details

Defined in Effectful.FileSystem.HandleRW.Static

openBinaryFile :: forall (es :: [Effect]). (HandleRW :> es, HasCallStack) => OsPath -> Eff es (Handle 'HandleModeReadWrite) Source #

Opens a file in ReadWrite mode.

Since: 0.1

withBinaryFile :: forall (es :: [Effect]) a. (HandleRW :> es, HasCallStack) => OsPath -> (Handle 'HandleModeReadWrite -> Eff es a) -> Eff es a Source #

Opens a file in ReadWrite mode.

Since: 0.1

Handlers

runHandleRW :: forall (es :: [Effect]) a. (HasCallStack, IOE :> es) => Eff (HandleRW ': es) a -> Eff es a Source #

Runs HandleRW in IO.

Since: 0.1

Reexports

data ByteString #

A space-efficient representation of a Word8 vector, supporting many efficient operations.

A ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Char8 it can be interpreted as containing 8-bit characters.

Instances

Instances details
NFData ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

rnf :: ByteString -> () #

Monoid ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

Semigroup ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

Data ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

IsString ByteString #

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal.Type

IsList ByteString #

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal.Type

Associated Types

type Item ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Read ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

Show ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

Eq ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

Ord ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

Lift ByteString #

Since: bytestring-0.11.2.0

Instance details

Defined in Data.ByteString.Internal.Type

Methods

lift :: Quote m => ByteString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => ByteString -> Code m ByteString #

type Item ByteString # 
Instance details

Defined in Data.ByteString.Internal.Type

data Handle (p :: HandleMode) Source #

Wrapper for file handles that includes an index for the mode.

Since: 0.1

Instances

Instances details
HasField "unHandle" (Handle p :: Type) Handle Source #

Since: 0.1

Instance details

Defined in Effectful.FileSystem.Handle.Internal

Methods

getField :: Handle p -> Handle #

HasField "unLockedHandle" (LockedHandle p :: Type) (Handle p :: Type) Source #

Since: 0.1

Instance details

Defined in Effectful.FileSystem.Handle.Internal

Methods

getField :: LockedHandle p -> Handle p #

(k ~ A_Getter, a ~ Handle, b ~ Handle) => LabelOptic "unHandle" k (Handle p) (Handle p) a b Source #

Since: 0.1

Instance details

Defined in Effectful.FileSystem.Handle.Internal

Methods

labelOptic :: Optic k NoIx (Handle p) (Handle p) a b Source #

data HandleMode Source #

Possible handle modes.

Since: 0.1

Constructors

HandleModeReadWrite

Since: 0.1

type OsPath = OsString #

Type representing filenames/pathnames.

This type doesn't add any guarantees over OsString.