Idris2Doc : System.UV.Raw.Pointer

System.UV.Raw.Pointer

(source)

Reexports

import public System.FFI
import public System.UV.Data.Pointer

Definitions

data Buf : Type
Totality: total
Visibility: export
data Loop : Type
Totality: total
Visibility: export
getString : Ptr Char -> String
  Convert a `Ptr Char` to an Idris string.

Note: Users must make sure that the given pointer points at a
zero-terminated byte array. As an alternative, consider converting
a `Ptr Bits8`.

Totality: total
Visibility: export
getStringMay : Ptr Char -> Maybe String
  Like `getString` but returns `Nothing` in case the given pointer is the
null pointer.

Totality: total
Visibility: export
data Async : Type
Totality: total
Visibility: export
data Check : Type
Totality: total
Visibility: export
Hint: 
CloseCB => Resource (Ptr Check)
data FsEvent : Type
Totality: total
Visibility: export
data FsPoll : Type
Totality: total
Visibility: export
data Handle : Type
Totality: total
Visibility: export
data Idle : Type
Totality: total
Visibility: export
Hint: 
CloseCB => Resource (Ptr Idle)
data Pipe : Type
Totality: total
Visibility: export
Hint: 
CloseCB => Resource (Ptr Pipe)
data Poll : Type
Totality: total
Visibility: export
data Prepare : Type
Totality: total
Visibility: export
Hint: 
CloseCB => Resource (Ptr Prepare)
data Process : Type
Totality: total
Visibility: export
data Stream : Type
Totality: total
Visibility: export
Hint: 
CloseCB => Resource (Ptr Stream)
data Tcp : Type
Totality: total
Visibility: export
Hint: 
CloseCB => Resource (Ptr Tcp)
data Timer : Type
Totality: total
Visibility: export
Hint: 
CloseCB => Resource (Ptr Timer)
data Tty : Type
Totality: total
Visibility: export
data Udp : Type
Totality: total
Visibility: export
data Signal : Type
Totality: total
Visibility: export
Hint: 
CloseCB => Resource (Ptr Signal)
data Req : Type
Totality: total
Visibility: export
data Connect : Type
Totality: total
Visibility: export
data Write : Type
Totality: total
Visibility: export
data Shutdown : Type
Totality: total
Visibility: export
data UpdSend : Type
Totality: total
Visibility: export
data Fs : Type
Totality: total
Visibility: export
data Work : Type
Totality: total
Visibility: export
data GetAddrInfo : Type
Totality: total
Visibility: export
Hint: 
Resource (Ptr GetAddrInfo)
data GetNameInfo : Type
Totality: total
Visibility: export
data AddrInfo : Type
Totality: total
Visibility: export
Hint: 
Resource (Ptr AddrInfo)
data SockAddr : Type
Totality: total
Visibility: export
data SockAddrIn : Type
Totality: total
Visibility: export
Hint: 
Resource (Ptr SockAddrIn)
data SockAddrIn6 : Type
Totality: total
Visibility: export
data PSize : Type -> Bits32 -> Type
  Proof that we have an associated size for a pointer type. This
allows us to allocate the correct amount of memory when we need a
new pointer of the given type (see `mallocPtr` and `mallocPtrs`).

Totality: total
Visibility: public export
Constructors:
ASYNC : PSize Async SZ_ASYNC
CHECK : PSize Check SZ_CHECK
FS_EVENT : PSize FsEvent SZ_FS_EVENT
FS_POLL : PSize FsPoll SZ_FS_POLL
HANDLE : PSize Handle SZ_HANDLE
IDLE : PSize Idle SZ_IDLE
NAMEDPIPE : PSize Pipe SZ_NAMED_PIPE
POLL : PSize Poll SZ_POLL
PREPARE : PSize Prepare SZ_PREPARE
PROCESS : PSize Process SZ_PROCESS
STREAM : PSize Stream SZ_STREAM
TCP : PSize Tcp SZ_TCP
TIMER : PSize Timer SZ_TIMER
TTY : PSize Tty SZ_TTY
UDP : PSize Udp SZ_UDP
SIGNAL : PSize Signal SZ_SIGNAL
REQ : PSize Req SZ_REQ
CONNECT : PSize Connect SZ_CONNECT
WRITE : PSize Write SZ_WRITE
SHUTDOWN : PSize Shutdown SZ_SHUTDOWN
FS : PSize Fs SZ_FS
WORK : PSize Work SZ_WORK
GETADDRINFO : PSize GetAddrInfo SZ_GETADDRINFO
GETNAMEINFO : PSize GetNameInfo SZ_GETNAMEINFO
ADDRINFO : PSize AddrInfo SZ_ADDRINFO
SOCKADDR : PSize SockAddr SZ_SOCKADDR
SOCKADDRIN : PSize SockAddrIn SZ_SOCKADDR_IN
SOCKADDRIN6 : PSize SockAddrIn6 SZ_SOCKADDR_IN6
BUF : PSize Buf SZ_BUF
LOOP : PSize Loop SZ_LOOP
BYTE : PSize Bits8 1
CHAR : PSize Char 1

Hint: 
Show (PSize a s)
mallocPtr : HasIO io => (0 a : Type) -> {auto 0 _ : PSize a s} -> io (Ptr a)
  Allocates a pointer for a type of a known pointer size.

Totality: total
Visibility: export
mallocPtrs : HasIO io => (0 a : Type) -> {auto 0 _ : PSize a s} -> Bits32 -> io (Ptr a)
  Allocates an array of pointers for a type of a known pointer size.

Totality: total
Visibility: export
freePtr : HasIO io => Ptr t -> io ()
  Frees a typed pointer.

Totality: total
Visibility: export
data PCast : Type -> Type -> Type
  Pointers to some types are subtypes of pointers to other types:
Their structure is laid out in such a way that they can be used
where the other pointer type is expected.

For instance, every libuv handle can be used where a `uv_handle_t`
(represented as `Ptr Handle` in Idris) is expected.

This data type is a proof of such a subtyping relation. Use `castPtr`
to safely convert pointers.

Totality: total
Visibility: public export
Constructors:
Self : PCast t t
AsyncHandle : PCast Async Handle
CheckHandle : PCast Check Handle
Fs_eventHandle : PCast FsEvent Handle
Fs_pollHandle : PCast FsPoll Handle
IdleHandle : PCast Idle Handle
NamedpipeHandle : PCast Pipe Handle
PollHandle : PCast Poll Handle
PrepareHandle : PCast Prepare Handle
ProcessHandle : PCast Process Handle
StreamHandle : PCast Stream Handle
TcpHandle : PCast Tcp Handle
TimerHandle : PCast Timer Handle
TtyHandle : PCast Tty Handle
UdpHandle : PCast Udp Handle
SignalHandle : PCast Signal Handle
StreamStream : PCast Stream Stream
TcpStream : PCast Tcp Stream
PipeStream : PCast Pipe Stream
TtyStream : PCast Tty Stream
IP4Addr : PCast SockAddrIn SockAddr
RevIP4Addr : PCast SockAddr SockAddrIn
IP6Addr : PCast SockAddrIn6 SockAddr
ConnectReq : PCast Connect Req
WriteReq : PCast Write Req
ShutdownReq : PCast Shutdown Req
UpdSendReq : PCast UpdSend Req
FsReq : PCast Fs Req
WorkReq : PCast Work Req
GetAddrInfoReq : PCast GetAddrInfo Req
GetNameInfoReq : PCast GetNameInfo Req
ByteChar : PCast Bits8 Char
CharByte : PCast Char Bits8
castPtr : {auto 0 _ : PCast s t} -> Ptr s -> Ptr t
Totality: total
Visibility: export
newBuffer : HasIO io => Bits32 -> io Buffer
Totality: total
Visibility: export
setBufLen : HasIO io => Ptr Buf -> Bits32 -> io ()
Totality: total
Visibility: export
getBufLen : HasIO io => Ptr Buf -> io Bits32
Totality: total
Visibility: export
setBufBase : HasIO io => Ptr Buf -> Ptr Bits8 -> io ()
Totality: total
Visibility: export
getBufBase : HasIO io => Ptr Buf -> io (Ptr Bits8)
Totality: total
Visibility: export
initBuf : HasIO io => Ptr Buf -> Ptr Bits8 -> Bits32 -> io ()
Totality: total
Visibility: export
freeBufBase : HasIO io => Ptr Buf -> io ()
  Frees the memory allocated for a `uv_buf_t`'s `base` field.

Totality: total
Visibility: export
copyToBuffer : HasIO io => Ptr Bits8 -> Buffer -> Bits32 -> io ()
  Copy the given number of bytes from a byte array to an Idris-managed
buffer.

Totality: total
Visibility: export
copyBufToBuffer : HasIO io => Ptr Buf -> Buffer -> Bits32 -> io ()
  Copy the given number of bytes from a byte array to an Idris-managed
buffer.

Totality: total
Visibility: export
copyFromBuffer : HasIO io => Buffer -> Bits32 -> Bits32 -> io (Ptr Bits8)
  Copy the given number of bytes an Idris-managed
buffer to a `Ptr Char`

Totality: total
Visibility: export