| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Bluefin.System.IO
Description
A safer interface to System.IO.Handle
Synopsis
- data Handle (e :: Effects)
- withFile :: forall (e1 :: Effects) (es :: Effects) r. e1 :> es => IOE e1 -> FilePath -> IOMode -> (forall (e :: Effects). Handle e -> Eff (e :& es) r) -> Eff es r
- hPutChar :: forall (e :: Effects) (es :: Effects). e :> es => Handle e -> Char -> Eff es ()
- hPutStr :: forall (e :: Effects) (es :: Effects). e :> es => Handle e -> String -> Eff es ()
- hPutStrLn :: forall (e :: Effects) (es :: Effects). e :> es => Handle e -> String -> Eff es ()
- hGetLine :: forall (e :: Effects) (es :: Effects). e :> es => Handle e -> Eff es String
- hIsEOF :: forall (e :: Effects) (es :: Effects). e :> es => Handle e -> Eff es Bool
- hFlush :: forall (e :: Effects) (es :: Effects). e :> es => Handle e -> Eff es ()
- unsafeWithHandle :: forall (e1 :: Effects) (es :: Effects) r. e1 :> es => Handle e1 -> (Handle -> IO r) -> Eff es r
Handle
Instances
| Handle Handle | |
Defined in Bluefin.Internal.System.IO Methods handleImpl :: HandleD Handle # | |
| e :> es => OneWayCoercible (Handle e :: Type) (Handle es :: Type) | |
Defined in Bluefin.Internal.System.IO Methods oneWayCoercibleImpl :: OneWayCoercibleD (Handle e) (Handle es) # | |
Handlers
Effectful operations
Unsafe
unsafeWithHandle :: forall (e1 :: Effects) (es :: Effects) r. e1 :> es => Handle e1 -> (Handle -> IO r) -> Eff es r #
If there's a System.IO.Handle-using function you need that
isn't included here then you can open an
issue to
request it be added. In the meantime you can define it yourself with unsafeWithHandle.