diff --git a/docs/array/docs/docs/Data.Buffer.Core.html b/docs/array/docs/docs/Data.Buffer.Core.html index c49b861c3..f5603d476 100644 --- a/docs/array/docs/docs/Data.Buffer.Core.html +++ b/docs/array/docs/docs/Data.Buffer.Core.html @@ -61,4 +61,4 @@ -

Data.Buffer.Core

(source)

Reexports

importpublic Data.Fin
importpublic Data.Nat

Definitions

prim__getByte : Buffer->Bits32->Bits8
prim__setByte : Buffer->Bits32->Bits8->PrimIO ()
prim__newBuf : Bits32->PrimIOBuffer
prim__getString : Buffer->Bits32->Bits32->String
prim__fromString : String->Buffer
prim__copy : Buffer->Bits32->Bits32->Buffer->Bits32->PrimIO ()
recordIBuffer : Nat->Type
  An immutable byte array of size `n`.

Totality: total
Visibility: export
Constructor: 
IB : Buffer->IBuffern

Projection: 
.buf : IBuffern->Buffer
at : IBuffern->Finn->Bits8
  Safely access a value in an byte array at the given position.

Totality: total
Visibility: export
take : (0m : Nat) ->IBuffern-> {auto0_ : LTEmn} ->IBufferm
  We can wrap a prefix of a byte array in O(1) simply by giving it
a new size index.

Note: If you only need a small portion of a potentially large
byte array the rest of which you no longer need, consider to
releasing the large byte array from memory by invoking `force`.

Totality: total
Visibility: export
fromString : (s : String) ->IBuffer (cast (stringByteLengths))
  Convert an UTF-8 string to a buffer

Totality: total
Visibility: export
toString : IBuffern-> (off : Nat) -> (len : Nat) -> {auto0_ : LTE (off+len) n} ->String
  Convert a section of a byte array to an UTF-8 string.

Totality: total
Visibility: export
unsafeGetBuffer : IBuffern->Buffer
  Extracts the inner buffer held by a byte array without copying.

This allows us to write efficiently write the data to a file
without copying it first. This is a highly unsafe operation,
and client code must make sure never ever to mutate the buffer!

Totality: total
Visibility: export
unsafeMakeBuffer : Buffer->IBufferk
  Wrapps a bare mutable buffer in an `IBuffer`.

Client code is responsible to make sure the original buffer is no longer
used.

Totality: total
Visibility: export
dataMBuffer' : RTag->Nat->Type
  A mutable byte array.

Totality: total
Visibility: export
Constructor: 
MB : Buffer->MBuffer'tn

Hint: 
InIO (MBuffer'RIOn)
0MBuffer : Nat->Type
  Convenience alias for `MBuffer' RPure`

Totality: total
Visibility: public export
0IOBuffer : Nat->Type
  Convenience alias for `MBuffer' RIO`

Totality: total
Visibility: public export
newMBuffer : (n : Nat) -> (1_ : T1rs) ->A1rs (MBuffern)
  Creates a new mutable bound to linear computation `s`.

Totality: total
Visibility: export
bufferIO : (n : Nat) ->a->F1 [World] (IOBuffern)
  Creates a new mutable buffer in `T1 [Wrold]`

Totality: total
Visibility: export
newIOBuffer : HasIOio=> (n : Nat) ->io (IOBuffern)
  Creates a new mutable buffer in `IO`.

Totality: total
Visibility: export
set : (r : MBuffer'tn) -> {auto0_ : Resrrs} ->Finn->Bits8->F1'rs
  Safely write a value to a mutable byte vector.

Totality: total
Visibility: export
get : (r : MBuffer'tn) -> {auto0_ : Resrrs} ->Finn->F1rsBits8
  Safely read a value from a mutable byte array.

Totality: total
Visibility: export
modify : (r : MBuffer'tn) -> {auto0_ : Resrrs} ->Finn-> (Bits8->Bits8) ->F1'rs
  Safely modify a value in a mutable byte array.

Totality: total
Visibility: export
release : (0r : MBuffern) -> {auto0p : Resrrs} ->C1'rs (Droprsp)
  Release a byte array.

Afterwards, it can no longer be use with the given linear token.

Totality: total
Visibility: export
0WithMBuffer : Nat->Type->Type
Totality: total
Visibility: public export
0FromMBuffer : Nat->Type->Type
Totality: total
Visibility: public export
create : (n : Nat) ->FromMBufferna->a
  Allocate and potentially freeze a mutable byte array in a linear context.

Note: In case you don't need to freeze the array in the end, using `alloc`
might be more convenient.

Totality: total
Visibility: export
alloc : (n : Nat) ->WithMBufferna->a
  Allocate, use, and release a mutable byte array in a linear computation.

Note: In case you want to freeze the buffer and return it in the
result, use `create`.

Totality: total
Visibility: export
copy : IBufferm-> (srcOffset : Nat) -> (dstOffset : Nat) -> (len : Nat) -> {auto0_ : LTE (srcOffset+len) m} -> {auto0_ : LTE (dstOffset+len) n} -> (r : MBuffern) -> {auto0_ : Resrrs} ->F1'rs
Totality: total
Visibility: export
thaw : IBuffern->FromMBuffernb->b
  Copy the content of an immutable buffer to a new buffer.

Totality: total
Visibility: export
freezeLTE : {auto0_ : LTEmn} -> (r : MBuffern) -> {auto0p : Resrrs} -> (0m : Nat) -> (1_ : T1rs) ->R1 (Droprsp) (IBufferm)
  Wrap a mutable buffer in an `IBuffer` without copying.

In order to make this safe, the associated linear token has to
be discarded.

It is safe to only use a prefix of a properly constructed array,
therefore we are free to give the resulting array a smaller size.
Most of the time, we'd like to use the whole buffer, in which case
we can just use `freezeBufAt`.

Totality: total
Visibility: export
freeze : (r : MBuffern) -> {auto0p : Resrrs} -> (1_ : T1rs) ->R1 (Droprsp) (IBuffern)
Totality: total
Visibility: export
toIO : (r : MBuffern) -> {auto0p : Resrrs} -> (1_ : T1rs) ->R1 (Droprsp) (IOBuffer)
  Release a mutable linear buffer to `IO`, thus making it freely
shareable.

Totality: total
Visibility: export
readIBuffer : HasIOio=>Nat->File->io (EitherFileError (n : Nat**IBuffern))
  Read up to `n` bytes from a file into an immutable buffer.

Totality: total
Visibility: export
writeIBuffer : HasIOio=>File-> (offset : Nat) -> (len : Nat) ->IBuffern-> {auto0_ : LTE (offset+len) n} ->io (Either (FileError, Int) ())
  Write up to `len` bytes from a buffer to a file, starting
at the given offset.

Totality: total
Visibility: export
writeMBuffer : HasIOio=>File-> (offset : Nat) -> (len : Nat) -> {auto0_ : LTE (offset+len) n} -> (r : MBuffern) -> {auto0p : Resrrs} ->T1rs->R1 (Droprsp) (io (Either (FileError, Int) ()))
  Write up to `len` bytes from a buffer to a file, starting
at the given offset.

Totality: total
Visibility: export
+

Data.Buffer.Core

(source)

Reexports

importpublic Data.Fin
importpublic Data.Nat

Definitions

prim__getByte : Buffer->Bits32->Bits8
prim__setByte : Buffer->Bits32->Bits8->PrimIO ()
prim__newBuf : Bits32->PrimIOBuffer
prim__getString : Buffer->Bits32->Bits32->String
prim__fromString : String->Buffer
prim__copy : Buffer->Bits32->Bits32->Buffer->Bits32->PrimIO ()
recordIBuffer : Nat->Type
  An immutable byte array of size `n`.

Totality: total
Visibility: export
Constructor: 
IB : Buffer->IBuffern

Projection: 
.buf : IBuffern->Buffer
at : IBuffern->Finn->Bits8
  Safely access a value in an byte array at the given position.

Totality: total
Visibility: export
take : (0m : Nat) ->IBuffern-> {auto0_ : LTEmn} ->IBufferm
  We can wrap a prefix of a byte array in O(1) simply by giving it
a new size index.

Note: If you only need a small portion of a potentially large
byte array the rest of which you no longer need, consider to
releasing the large byte array from memory by invoking `force`.

Totality: total
Visibility: export
fromString : (s : String) ->IBuffer (cast (stringByteLengths))
  Convert an UTF-8 string to a buffer

Totality: total
Visibility: export
toString : IBuffern-> (off : Nat) -> (len : Nat) -> {auto0_ : LTE (off+len) n} ->String
  Convert a section of a byte array to an UTF-8 string.

Totality: total
Visibility: export
unsafeGetBuffer : IBuffern->Buffer
  Extracts the inner buffer held by a byte array without copying.

This allows us to write efficiently write the data to a file
without copying it first. This is a highly unsafe operation,
and client code must make sure never ever to mutate the buffer!

Totality: total
Visibility: export
unsafeMakeBuffer : Buffer->IBufferk
  Wrapps a bare mutable buffer in an `IBuffer`.

Client code is responsible to make sure the original buffer is no longer
used.

Totality: total
Visibility: export
dataMBuffer' : RTag->Nat->Type
  A mutable byte array.

Totality: total
Visibility: export
Constructor: 
MB : Buffer->MBuffer'tn

Hint: 
InIO (MBuffer'RIOn)
0MBuffer : Nat->Type
  Convenience alias for `MBuffer' RPure`

Totality: total
Visibility: public export
0IOBuffer : Nat->Type
  Convenience alias for `MBuffer' RIO`

Totality: total
Visibility: public export
newMBuffer : (n : Nat) -> (1_ : T1rs) ->A1rs (MBuffern)
  Creates a new mutable bound to linear computation `s`.

Totality: total
Visibility: export
bufferIO : (n : Nat) ->a->F1 [World] (IOBuffern)
  Creates a new mutable buffer in `T1 [Wrold]`

Totality: total
Visibility: export
newIOBuffer : HasIOio=> (n : Nat) ->io (IOBuffern)
  Creates a new mutable buffer in `IO`.

Totality: total
Visibility: export
set : (r : MBuffer'tn) -> {auto0_ : Resrrs} ->Finn->Bits8->F1'rs
  Safely write a value to a mutable byte vector.

Totality: total
Visibility: export
get : (r : MBuffer'tn) -> {auto0_ : Resrrs} ->Finn->F1rsBits8
  Safely read a value from a mutable byte array.

Totality: total
Visibility: export
modify : (r : MBuffer'tn) -> {auto0_ : Resrrs} ->Finn-> (Bits8->Bits8) ->F1'rs
  Safely modify a value in a mutable byte array.

Totality: total
Visibility: export
release : (0r : MBuffern) -> {auto0p : Resrrs} ->C1'rs (Droprsp)
  Release a byte array.

Afterwards, it can no longer be use with the given linear token.

Totality: total
Visibility: export
bufString : (r : MBuffer'tn) -> {auto0_ : Resrrs} -> (m : Nat) -> {auto0_ : LTEmn} ->F1rsString
  Extracts a string from a (possibly partially) filled byte array.

Totality: total
Visibility: export
0WithMBuffer : Nat->Type->Type
Totality: total
Visibility: public export
0FromMBuffer : Nat->Type->Type
Totality: total
Visibility: public export
create : (n : Nat) ->FromMBufferna->a
  Allocate and potentially freeze a mutable byte array in a linear context.

Note: In case you don't need to freeze the array in the end, using `alloc`
might be more convenient.

Totality: total
Visibility: export
alloc : (n : Nat) ->WithMBufferna->a
  Allocate, use, and release a mutable byte array in a linear computation.

Note: In case you want to freeze the buffer and return it in the
result, use `create`.

Totality: total
Visibility: export
copy : IBufferm-> (srcOffset : Nat) -> (dstOffset : Nat) -> (len : Nat) -> {auto0_ : LTE (srcOffset+len) m} -> {auto0_ : LTE (dstOffset+len) n} -> (r : MBuffern) -> {auto0_ : Resrrs} ->F1'rs
Totality: total
Visibility: export
thaw : IBuffern->FromMBuffernb->b
  Copy the content of an immutable buffer to a new buffer.

Totality: total
Visibility: export
freezeLTE : {auto0_ : LTEmn} -> (r : MBuffern) -> {auto0p : Resrrs} -> (0m : Nat) -> (1_ : T1rs) ->R1 (Droprsp) (IBufferm)
  Wrap a mutable buffer in an `IBuffer` without copying.

In order to make this safe, the associated linear token has to
be discarded.

It is safe to only use a prefix of a properly constructed array,
therefore we are free to give the resulting array a smaller size.
Most of the time, we'd like to use the whole buffer, in which case
we can just use `freezeBufAt`.

Totality: total
Visibility: export
freeze : (r : MBuffern) -> {auto0p : Resrrs} -> (1_ : T1rs) ->R1 (Droprsp) (IBuffern)
Totality: total
Visibility: export
toIO : (r : MBuffern) -> {auto0p : Resrrs} -> (1_ : T1rs) ->R1 (Droprsp) (IOBuffer)
  Release a mutable linear buffer to `IO`, thus making it freely
shareable.

Totality: total
Visibility: export
readIBuffer : HasIOio=>Nat->File->io (EitherFileError (n : Nat**IBuffern))
  Read up to `n` bytes from a file into an immutable buffer.

Totality: total
Visibility: export
writeIBuffer : HasIOio=>File-> (offset : Nat) -> (len : Nat) ->IBuffern-> {auto0_ : LTE (offset+len) n} ->io (Either (FileError, Int) ())
  Write up to `len` bytes from a buffer to a file, starting
at the given offset.

Totality: total
Visibility: export
writeMBuffer : HasIOio=>File-> (offset : Nat) -> (len : Nat) -> {auto0_ : LTE (offset+len) n} -> (r : MBuffern) -> {auto0p : Resrrs} ->T1rs->R1 (Droprsp) (io (Either (FileError, Int) ()))
  Write up to `len` bytes from a buffer to a file, starting
at the given offset.

Totality: total
Visibility: export
diff --git a/docs/array/docs/docs/Data.Buffer.Core.src.html b/docs/array/docs/docs/Data.Buffer.Core.src.html index 8c8c973df..68d112bd4 100644 --- a/docs/array/docs/docs/Data.Buffer.Core.src.html +++ b/docs/array/docs/docs/Data.Buffer.Core.src.html @@ -289,145 +289,155 @@
168 | release : (0 r : MBuffer n) -> (0 p : Res r rs) => C1' rs (Drop rs p)
169 | release _ = unsafeRelease p
170 |
-
171 | --------------------------------------------------------------------------------
-
172 | -- Allocating Byte Vectors
-
173 | --------------------------------------------------------------------------------
-
174 |
-
175 | public export
-
176 | 0 WithMBuffer : Nat -> (a : Type) -> Type
-
177 | WithMBuffer n a = (r : MBuffer n) -> F1 [r] a
-
178 |
-
179 | public export
-
180 | 0 FromMBuffer : Nat -> (a : Type) -> Type
-
181 | FromMBuffer n a = (r : MBuffer n) -> C1 [r] [] a
-
182 |
-
183 | ||| Allocate and potentially freeze a mutable byte array in a linear context.
-
184 | |||
-
185 | ||| Note: In case you don't need to freeze the array in the end, using `alloc`
-
186 | |||       might be more convenient.
-
187 | export
-
188 | create : (n : Nat) -> (fun : FromMBuffer n a) -> a
-
189 | create n f = run1 $ \t => let A r t := newMBuffer n t in f r t
-
190 |
-
191 | ||| Allocate, use, and release a mutable byte array in a linear computation.
-
192 | |||
-
193 | ||| Note: In case you want to freeze the buffer and return it in the
-
194 | |||       result, use `create`.
-
195 | export
-
196 | alloc : (n : Nat) -> (fun : WithMBuffer n a) -> a
-
197 | alloc n f =
-
198 |   create n $ \r,t =>
-
199 |     let v # t := f r t
-
200 |         _ # t := release r t
-
201 |      in v # t
-
202 |
-
203 | --------------------------------------------------------------------------------
-
204 | -- Utilities
-
205 | --------------------------------------------------------------------------------
-
206 |
-
207 | export %noinline
-
208 | copy :
-
209 |      IBuffer m
-
210 |   -> (srcOffset,dstOffset : Nat)
-
211 |   -> (len : Nat)
-
212 |   -> {auto 0 p1 : LTE (srcOffset + len) m}
-
213 |   -> {auto 0 p2 : LTE (dstOffset + len) n}
-
214 |   -> (r         : MBuffer n)
-
215 |   -> {auto 0 p  : Res r rs}
-
216 |   -> F1' rs
-
217 | copy (IB src) srcOffset dstOffset len (MB dst) =
-
218 |   ffi (prim__copy src (cast srcOffset) (cast len) dst (cast dstOffset))
-
219 |
-
220 | ||| Copy the content of an immutable buffer to a new buffer.
-
221 | export
-
222 | thaw : {n : _} -> IBuffer n -> (fun : FromMBuffer n b) -> b
-
223 | thaw src f =
-
224 |   create n $ \r,t =>
-
225 |     let _ # t := copy src 0 0 n @{reflexive} @{reflexive} r t
-
226 |      in f r t
-
227 |
-
228 | ||| Wrap a mutable buffer in an `IBuffer` without copying.
-
229 | |||
-
230 | ||| In order to make this safe, the associated linear token has to
-
231 | ||| be discarded.
-
232 | |||
-
233 | ||| It is safe to only use a prefix of a properly constructed array,
-
234 | ||| therefore we are free to give the resulting array a smaller size.
-
235 | ||| Most of the time, we'd like to use the whole buffer, in which case
-
236 | ||| we can just use `freezeBufAt`.
-
237 | export %inline
-
238 | freezeLTE :
-
239 |      {auto 0 _ : LTE m n}
-
240 |   -> (r        : MBuffer n)
-
241 |   -> {auto 0 p : Res r rs}
-
242 |   -> (0 m : Nat)
-
243 |   -> (1 t : T1 rs)
-
244 |   -> R1 (Drop rs p) (IBuffer m)
-
245 | freezeLTE (MB buf) _ t = let _ # t := unsafeRelease p t in IB buf # t
-
246 |
+
171 | ||| Extracts a string from a (possibly partially) filled byte array.
+
172 | export %inline
+
173 | bufString :
+
174 |      (r : MBuffer' t n)
+
175 |   -> {auto 0 p : Res r rs}
+
176 |   -> (m : Nat)
+
177 |   -> {auto 0 lte : LTE m n}
+
178 |   -> F1 rs String
+
179 | bufString (MB buf) m t = prim__getString buf 0 (cast m) # t
+
180 |
+
181 | --------------------------------------------------------------------------------
+
182 | -- Allocating Byte Vectors
+
183 | --------------------------------------------------------------------------------
+
184 |
+
185 | public export
+
186 | 0 WithMBuffer : Nat -> (a : Type) -> Type
+
187 | WithMBuffer n a = (r : MBuffer n) -> F1 [r] a
+
188 |
+
189 | public export
+
190 | 0 FromMBuffer : Nat -> (a : Type) -> Type
+
191 | FromMBuffer n a = (r : MBuffer n) -> C1 [r] [] a
+
192 |
+
193 | ||| Allocate and potentially freeze a mutable byte array in a linear context.
+
194 | |||
+
195 | ||| Note: In case you don't need to freeze the array in the end, using `alloc`
+
196 | |||       might be more convenient.
+
197 | export
+
198 | create : (n : Nat) -> (fun : FromMBuffer n a) -> a
+
199 | create n f = run1 $ \t => let A r t := newMBuffer n t in f r t
+
200 |
+
201 | ||| Allocate, use, and release a mutable byte array in a linear computation.
+
202 | |||
+
203 | ||| Note: In case you want to freeze the buffer and return it in the
+
204 | |||       result, use `create`.
+
205 | export
+
206 | alloc : (n : Nat) -> (fun : WithMBuffer n a) -> a
+
207 | alloc n f =
+
208 |   create n $ \r,t =>
+
209 |     let v # t := f r t
+
210 |         _ # t := release r t
+
211 |      in v # t
+
212 |
+
213 | --------------------------------------------------------------------------------
+
214 | -- Utilities
+
215 | --------------------------------------------------------------------------------
+
216 |
+
217 | export %noinline
+
218 | copy :
+
219 |      IBuffer m
+
220 |   -> (srcOffset,dstOffset : Nat)
+
221 |   -> (len : Nat)
+
222 |   -> {auto 0 p1 : LTE (srcOffset + len) m}
+
223 |   -> {auto 0 p2 : LTE (dstOffset + len) n}
+
224 |   -> (r         : MBuffer n)
+
225 |   -> {auto 0 p  : Res r rs}
+
226 |   -> F1' rs
+
227 | copy (IB src) srcOffset dstOffset len (MB dst) =
+
228 |   ffi (prim__copy src (cast srcOffset) (cast len) dst (cast dstOffset))
+
229 |
+
230 | ||| Copy the content of an immutable buffer to a new buffer.
+
231 | export
+
232 | thaw : {n : _} -> IBuffer n -> (fun : FromMBuffer n b) -> b
+
233 | thaw src f =
+
234 |   create n $ \r,t =>
+
235 |     let _ # t := copy src 0 0 n @{reflexive} @{reflexive} r t
+
236 |      in f r t
+
237 |
+
238 | ||| Wrap a mutable buffer in an `IBuffer` without copying.
+
239 | |||
+
240 | ||| In order to make this safe, the associated linear token has to
+
241 | ||| be discarded.
+
242 | |||
+
243 | ||| It is safe to only use a prefix of a properly constructed array,
+
244 | ||| therefore we are free to give the resulting array a smaller size.
+
245 | ||| Most of the time, we'd like to use the whole buffer, in which case
+
246 | ||| we can just use `freezeBufAt`.
247 | export %inline
-
248 | freeze :
-
249 |      (r : MBuffer n)
-
250 |   -> {auto 0 p : Res r rs}
-
251 |   -> (1 t : T1 rs)
-
252 |   -> R1 (Drop rs p) (IBuffer n)
-
253 | freeze r = freezeLTE @{reflexive} r n
-
254 |
-
255 | ||| Release a mutable linear buffer to `IO`, thus making it freely
-
256 | ||| shareable.
+
248 | freezeLTE :
+
249 |      {auto 0 _ : LTE m n}
+
250 |   -> (r        : MBuffer n)
+
251 |   -> {auto 0 p : Res r rs}
+
252 |   -> (0 m : Nat)
+
253 |   -> (1 t : T1 rs)
+
254 |   -> R1 (Drop rs p) (IBuffer m)
+
255 | freezeLTE (MB buf) _ t = let _ # t := unsafeRelease p t in IB buf # t
+
256 |
257 | export %inline
-
258 | toIO :
+
258 | freeze :
259 |      (r : MBuffer n)
260 |   -> {auto 0 p : Res r rs}
261 |   -> (1 t : T1 rs)
-
262 |   -> R1 (Drop rs p) (IO Buffer)
-
263 | toIO (MB buf) t = let _ # t := unsafeRelease p t in pure buf # t
+
262 |   -> R1 (Drop rs p) (IBuffer n)
+
263 | freeze r = freezeLTE @{reflexive} r n
264 |
-
265 | --------------------------------------------------------------------------------
-
266 | --          Reading and Writing Files
-
267 | --------------------------------------------------------------------------------
-
268 |
-
269 | ||| Read up to `n` bytes from a file into an immutable buffer.
-
270 | export
-
271 | readIBuffer :
-
272 |      {auto has : HasIO io}
-
273 |   -> Nat
-
274 |   -> File
-
275 |   -> io (Either FileError (n ** IBuffer n))
-
276 | readIBuffer max f = do
-
277 |   buf <- primIO (prim__newBuf (cast max))
-
278 |   Right r <- readBufferData f buf 0 (cast max) | Left x => pure (Left x)
-
279 |   if r >= 0
-
280 |      then pure (Right (cast r ** IB buf))
-
281 |      else pure (Left FileReadError)
-
282 |
-
283 | ||| Write up to `len` bytes from a buffer to a file, starting
-
284 | ||| at the given offset.
-
285 | export
-
286 | writeIBuffer :
-
287 |      {auto has : HasIO io}
-
288 |   -> File
-
289 |   -> (offset,len : Nat)
-
290 |   -> IBuffer n
-
291 |   -> {auto 0 prf : LTE (offset + len) n}
-
292 |   -> io (Either (FileError,Int) ())
-
293 | writeIBuffer h o s (IB buf) = writeBufferData h buf (cast o) (cast s)
-
294 |
-
295 | ||| Write up to `len` bytes from a buffer to a file, starting
-
296 | ||| at the given offset.
-
297 | export
-
298 | writeMBuffer :
-
299 |      {auto has : HasIO io}
-
300 |   -> File
-
301 |   -> (offset,len : Nat)
-
302 |   -> {auto 0 prf : LTE (offset + len) n}
-
303 |   -> (r : MBuffer n)
-
304 |   -> {auto 0 p : Res r rs}
-
305 |   -> T1 rs
-
306 |   -> R1 (Drop rs p) (io (Either (FileError,Int) ()))
-
307 | writeMBuffer h o s (MB b) t =
-
308 |   let _ # t := unsafeRelease p t in writeBufferData h b (cast o) (cast s) # t
-
309 |
+
265 | ||| Release a mutable linear buffer to `IO`, thus making it freely
+
266 | ||| shareable.
+
267 | export %inline
+
268 | toIO :
+
269 |      (r : MBuffer n)
+
270 |   -> {auto 0 p : Res r rs}
+
271 |   -> (1 t : T1 rs)
+
272 |   -> R1 (Drop rs p) (IO Buffer)
+
273 | toIO (MB buf) t = let _ # t := unsafeRelease p t in pure buf # t
+
274 |
+
275 | --------------------------------------------------------------------------------
+
276 | --          Reading and Writing Files
+
277 | --------------------------------------------------------------------------------
+
278 |
+
279 | ||| Read up to `n` bytes from a file into an immutable buffer.
+
280 | export
+
281 | readIBuffer :
+
282 |      {auto has : HasIO io}
+
283 |   -> Nat
+
284 |   -> File
+
285 |   -> io (Either FileError (n ** IBuffer n))
+
286 | readIBuffer max f = do
+
287 |   buf <- primIO (prim__newBuf (cast max))
+
288 |   Right r <- readBufferData f buf 0 (cast max) | Left x => pure (Left x)
+
289 |   if r >= 0
+
290 |      then pure (Right (cast r ** IB buf))
+
291 |      else pure (Left FileReadError)
+
292 |
+
293 | ||| Write up to `len` bytes from a buffer to a file, starting
+
294 | ||| at the given offset.
+
295 | export
+
296 | writeIBuffer :
+
297 |      {auto has : HasIO io}
+
298 |   -> File
+
299 |   -> (offset,len : Nat)
+
300 |   -> IBuffer n
+
301 |   -> {auto 0 prf : LTE (offset + len) n}
+
302 |   -> io (Either (FileError,Int) ())
+
303 | writeIBuffer h o s (IB buf) = writeBufferData h buf (cast o) (cast s)
+
304 |
+
305 | ||| Write up to `len` bytes from a buffer to a file, starting
+
306 | ||| at the given offset.
+
307 | export
+
308 | writeMBuffer :
+
309 |      {auto has : HasIO io}
+
310 |   -> File
+
311 |   -> (offset,len : Nat)
+
312 |   -> {auto 0 prf : LTE (offset + len) n}
+
313 |   -> (r : MBuffer n)
+
314 |   -> {auto 0 p : Res r rs}
+
315 |   -> T1 rs
+
316 |   -> R1 (Drop rs p) (io (Either (FileError,Int) ()))
+
317 | writeMBuffer h o s (MB b) t =
+
318 |   let _ # t := unsafeRelease p t in writeBufferData h b (cast o) (cast s) # t
+
319 |
diff --git a/docs/chem/docs/docs/Chem.Rings.html b/docs/chem/docs/docs/Chem.Rings.html index 7687fd08c..59c6b9c6c 100644 --- a/docs/chem/docs/docs/Chem.Rings.html +++ b/docs/chem/docs/docs/Chem.Rings.html @@ -61,4 +61,4 @@ -

Chem.Rings

(source)

Definitions

recordRing : Nat->Type
Totality: total
Visibility: public export
Constructor: 
R : Integer->Ringk

Projection: 
.value : Ringk->Integer

Hints:
Eq (Ringk)
Monoid (Ringk)
Semigroup (Ringk)
Show (Ringk)
.value : Ringk->Integer
Totality: total
Visibility: public export
value : Ringk->Integer
Totality: total
Visibility: public export
popCountInteger : Integer->Nat
Totality: total
Visibility: export
ringSize : Ringk->Nat
Totality: total
Visibility: export
inRing : Fink->Ringk->Bool
Totality: total
Visibility: export
members : Ringk->List (Fink)
Totality: total
Visibility: export
rings : IGraphken->List (Bool, Ringk)
Totality: total
Visibility: export
+

Chem.Rings

(source)

Definitions

recordRing : Nat->Type
Totality: total
Visibility: public export
Constructor: 
R : Integer->Ringk

Projection: 
.value : Ringk->Integer

Hints:
Eq (Ringk)
Monoid (Ringk)
Semigroup (Ringk)
Show (Ringk)
.value : Ringk->Integer
Totality: total
Visibility: public export
value : Ringk->Integer
Totality: total
Visibility: public export
popCountInteger : Integer->Nat
Totality: total
Visibility: export
ringSize : Ringk->Nat
Totality: total
Visibility: export
inRing : Fink->Ringk->Bool
Totality: total
Visibility: export
members : Ringk->List (Fink)
Totality: total
Visibility: export
rings : IGraphken->List (Bool, Ringk)
Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Chem.Types.html b/docs/chem/docs/docs/Chem.Types.html index f416efecd..55e2bd247 100644 --- a/docs/chem/docs/docs/Chem.Types.html +++ b/docs/chem/docs/docs/Chem.Types.html @@ -61,4 +61,4 @@ -

Chem.Types

(source)

Reexports

importpublic Data.List.Quantifiers.Extra
importpublic Data.Refined
importpublic Data.Refined.Bits16
importpublic Data.Refined.Bits8
importpublic Data.Refined.Int8

Definitions

0IsAtomicNr : Bits8->Type
  Proof that a number is in the range [1,118]

Totality: total
Visibility: public export
recordAtomicNr : Type
  A refined integer in the range [1,118]

Totality: total
Visibility: public export
Constructor: 
MkAtomicNr : (value : Bits8) -> {auto0_ : IsAtomicNrvalue} ->AtomicNr

Projections:
0.prf : ({rec:0} : AtomicNr) ->IsAtomicNr (value{rec:0})
.value : AtomicNr->Bits8

Hints:
EqAtomicNr
OrdAtomicNr
ShowAtomicNr
.value : AtomicNr->Bits8
Totality: total
Visibility: public export
value : AtomicNr->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : AtomicNr) ->IsAtomicNr (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : AtomicNr) ->IsAtomicNr (value{rec:0})
Totality: total
Visibility: public export
recordMassNr : Type
Totality: total
Visibility: public export
Constructor: 
MkMassNr : (value : Bits16) -> {auto0_ : FromTo1511value} ->MassNr

Projections:
0.prf : ({rec:0} : MassNr) ->FromTo1511 (value{rec:0})
.value : MassNr->Bits16

Hints:
EqMassNr
InterpolationMassNr
OrdMassNr
ShowMassNr
.value : MassNr->Bits16
Totality: total
Visibility: public export
value : MassNr->Bits16
Totality: total
Visibility: public export
0.prf : ({rec:0} : MassNr) ->FromTo1511 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : MassNr) ->FromTo1511 (value{rec:0})
Totality: total
Visibility: public export
MinAbundanceValue : Double
Totality: total
Visibility: public export
IsAbundance : Double->Bool
Totality: total
Visibility: public export
recordAbundance : Type
Totality: total
Visibility: public export
Constructor: 
MkAbundance : (value : Double) -> {auto0_ : HoldsIsAbundancevalue} ->Abundance

Projections:
0.prf : ({rec:0} : Abundance) ->HoldsIsAbundance (value{rec:0})
.value : Abundance->Double

Hints:
EqAbundance
InterpolationAbundance
MonoidAbundance
OrdAbundance
SemigroupAbundance
ShowAbundance
.value : Abundance->Double
Totality: total
Visibility: public export
value : Abundance->Double
Totality: total
Visibility: public export
0.prf : ({rec:0} : Abundance) ->HoldsIsAbundance (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : Abundance) ->HoldsIsAbundance (value{rec:0})
Totality: total
Visibility: public export
multAbundance : Abundance->Abundance->Abundance
Totality: total
Visibility: public export
MaxMolecularMass : Double
  Molecular mass in g/mol

The total mass of ordinary matter of the universe is assumed to be
approximately 1.5 * 10^50 kg, so we probably shouldn't exceed that by too
much.

Totality: total
Visibility: public export
IsMolecularMass : Double->Bool
Totality: total
Visibility: public export
recordMolecularMass : Type
  Molecular mass (or molecular weight) in g/mol

Totality: total
Visibility: public export
Constructor: 
MkMolecularMass : (value : Double) -> {auto0_ : HoldsIsMolecularMassvalue} ->MolecularMass

Projections:
0.prf : ({rec:0} : MolecularMass) ->HoldsIsMolecularMass (value{rec:0})
.value : MolecularMass->Double

Hints:
CastMolecularMassMolarMass
CastMolarMassMolecularMass
EqMolecularMass
InterpolationMolecularMass
MonoidMolecularMass
OrdMolecularMass
SemigroupMolecularMass
ShowMolecularMass
.value : MolecularMass->Double
Totality: total
Visibility: public export
value : MolecularMass->Double
Totality: total
Visibility: public export
0.prf : ({rec:0} : MolecularMass) ->HoldsIsMolecularMass (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : MolecularMass) ->HoldsIsMolecularMass (value{rec:0})
Totality: total
Visibility: public export
addMolecularMass : MolecularMass->MolecularMass->MolecularMass
Totality: total
Visibility: public export
multMolecularMass : Nat->MolecularMass->MolecularMass
Totality: total
Visibility: public export
recordMolarMass : Type
  Molar mass in Da

Totality: total
Visibility: public export
Constructor: 
MkMolarMass : (value : Double) -> {auto0_ : HoldsIsMolecularMassvalue} ->MolarMass

Projections:
0.prf : ({rec:0} : MolarMass) ->HoldsIsMolecularMass (value{rec:0})
.value : MolarMass->Double

Hints:
CastMolecularMassMolarMass
CastMolarMassMolecularMass
EqMolarMass
InterpolationMolarMass
MonoidMolarMass
OrdMolarMass
SemigroupMolarMass
ShowMolarMass
.value : MolarMass->Double
Totality: total
Visibility: public export
value : MolarMass->Double
Totality: total
Visibility: public export
0.prf : ({rec:0} : MolarMass) ->HoldsIsMolecularMass (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : MolarMass) ->HoldsIsMolecularMass (value{rec:0})
Totality: total
Visibility: public export
molarMass : Double->MolarMass
Totality: total
Visibility: export
addMolarMass : MolarMass->MolarMass->MolarMass
Totality: total
Visibility: export
interfaceHasMolarMass : Type->Type
Parameters: a
Methods:
mass : a->MolarMass
  Extract the molecular mass of an element or isotope.
In case of an element, this returns the average molar mass
in case of an isotope, it's the same as `exactMass`.
exactMass : a->MolarMass
  Extract the exact molecular mass of an element or isotope.
In case of an `Elem`, this returns the exact mass of the most
abundant isotope.

Implementations:
HasMolarMassElem
HasMolarMassIsotope
HasMolarMassAromIsotope
mass : HasMolarMassa=>a->MolarMass
  Extract the molecular mass of an element or isotope.
In case of an element, this returns the average molar mass
in case of an isotope, it's the same as `exactMass`.

Totality: total
Visibility: public export
exactMass : HasMolarMassa=>a->MolarMass
  Extract the exact molecular mass of an element or isotope.
In case of an `Elem`, this returns the exact mass of the most
abundant isotope.

Totality: total
Visibility: public export
multByAbundance : Abundance->MolarMass->MolarMass
Totality: total
Visibility: export
recordCharge : Type
Totality: total
Visibility: public export
Constructor: 
MkCharge : (value : Int8) -> {auto0_ : FromTo-1515value} ->Charge

Projections:
0.prf : ({rec:0} : Charge) ->FromTo-1515 (value{rec:0})
.value : Charge->Int8

Hints:
EqCharge
InterpolationCharge
OrdCharge
ShowCharge
.value : Charge->Int8
Totality: total
Visibility: public export
value : Charge->Int8
Totality: total
Visibility: public export
0.prf : ({rec:0} : Charge) ->FromTo-1515 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : Charge) ->FromTo-1515 (value{rec:0})
Totality: total
Visibility: public export
incCharge : Charge->Charge
  Increase a charge value by one.

Returns the unmodified input if it is already the maximal valid value.

Totality: total
Visibility: export
decCharge : Charge->Charge
  Decrease a charge value by one.

Returns the unmodified input if it is already the minimal valid value.

Totality: total
Visibility: export
recordHCount : Type
Totality: total
Visibility: public export
Constructor: 
MkHCount : (value : Bits8) -> {auto0_ : value<10} ->HCount

Projections:
0.prf : ({rec:0} : HCount) ->value{rec:0}<10
.value : HCount->Bits8

Hints:
CasteElem=>Cast (AtomecprHCounttchl) Formula
EqHCount
HasMolecularMassHCount
InterpolationHCount
OrdHCount
ShowHCount
.value : HCount->Bits8
Totality: total
Visibility: public export
value : HCount->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : HCount) ->value{rec:0}<10
Totality: total
Visibility: public export
0prf : ({rec:0} : HCount) ->value{rec:0}<10
Totality: total
Visibility: public export
dataNoH : Type
  Placeholder for atoms without implicit hydrogens.

We can use this instead of `Unit` (`()`), to signal that an atom
does not have any implicit hydrogens, as oppsed to the implicit
H-count not having been determined yet.

For instance, we can have an implementation of
`Cast (Atom Elem c p r NoH t ch l) Formula`, because here we
do not have to add any implicit hydrogens to such an atom,
while no such implementation should be written for
`Cast (Atom Elem c p r () t ch l) Formula`, because in this case,
the `Unit` tag implies that implicit hydrogens have not been
determined yet.

Totality: total
Visibility: public export
Constructor: 
HasNoH : NoH

Hints:
CasteElem=>Cast (AtomecprNoHtchl) Formula
EqNoH
HasMolecularMassNoH
OrdNoH
ShowNoH
dataRadical : Type
  Type of radical if any.

Totality: total
Visibility: public export
Constructors:
NoRadical : Radical
Singlet : Radical
Doublet : Radical
Triplet : Radical

Hints:
EqRadical
OrdRadical
ShowRadical
dataHybridization : Type
  Kinds of hybridization

Totality: total
Visibility: public export
Constructors:
None : Hybridization
Planar : Hybridization
S : Hybridization
SP : Hybridization
SP2 : Hybridization
SP3 : Hybridization
SP3D1 : Hybridization
SP3D2 : Hybridization
Tetrahedral : Hybridization
Octahedral : Hybridization

Hints:
EqHybridization
FiniteHybridization
OrdHybridization
ShowHybridization
dataBondOrder : Type
Totality: total
Visibility: public export
Constructors:
Single : BondOrder
Dbl : BondOrder
Triple : BondOrder

Hints:
CastSmilesBondBondOrder
CastMolBondBondOrder
CastBondOrderMolBond
CastaBondOrder=>Cast (AromBonda) BondOrder
EqBondOrder
InterpolationBondOrder
OrdBondOrder
ShowBondOrder
0ChemRes : ListType->Type->Type
Totality: total
Visibility: public export
+

Chem.Types

(source)

Reexports

importpublic Data.List.Quantifiers.Extra
importpublic Data.Refined
importpublic Data.Refined.Bits16
importpublic Data.Refined.Bits8
importpublic Data.Refined.Int8

Definitions

0IsAtomicNr : Bits8->Type
  Proof that a number is in the range [1,118]

Totality: total
Visibility: public export
recordAtomicNr : Type
  A refined integer in the range [1,118]

Totality: total
Visibility: public export
Constructor: 
MkAtomicNr : (value : Bits8) -> {auto0_ : IsAtomicNrvalue} ->AtomicNr

Projections:
0.prf : ({rec:0} : AtomicNr) ->IsAtomicNr (value{rec:0})
.value : AtomicNr->Bits8

Hints:
EqAtomicNr
OrdAtomicNr
ShowAtomicNr
.value : AtomicNr->Bits8
Totality: total
Visibility: public export
value : AtomicNr->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : AtomicNr) ->IsAtomicNr (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : AtomicNr) ->IsAtomicNr (value{rec:0})
Totality: total
Visibility: public export
recordMassNr : Type
Totality: total
Visibility: public export
Constructor: 
MkMassNr : (value : Bits16) -> {auto0_ : FromTo1511value} ->MassNr

Projections:
0.prf : ({rec:0} : MassNr) ->FromTo1511 (value{rec:0})
.value : MassNr->Bits16

Hints:
EqMassNr
InterpolationMassNr
OrdMassNr
ShowMassNr
.value : MassNr->Bits16
Totality: total
Visibility: public export
value : MassNr->Bits16
Totality: total
Visibility: public export
0.prf : ({rec:0} : MassNr) ->FromTo1511 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : MassNr) ->FromTo1511 (value{rec:0})
Totality: total
Visibility: public export
MinAbundanceValue : Double
Totality: total
Visibility: public export
IsAbundance : Double->Bool
Totality: total
Visibility: public export
recordAbundance : Type
Totality: total
Visibility: public export
Constructor: 
MkAbundance : (value : Double) -> {auto0_ : HoldsIsAbundancevalue} ->Abundance

Projections:
0.prf : ({rec:0} : Abundance) ->HoldsIsAbundance (value{rec:0})
.value : Abundance->Double

Hints:
EqAbundance
InterpolationAbundance
MonoidAbundance
OrdAbundance
SemigroupAbundance
ShowAbundance
.value : Abundance->Double
Totality: total
Visibility: public export
value : Abundance->Double
Totality: total
Visibility: public export
0.prf : ({rec:0} : Abundance) ->HoldsIsAbundance (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : Abundance) ->HoldsIsAbundance (value{rec:0})
Totality: total
Visibility: public export
multAbundance : Abundance->Abundance->Abundance
Totality: total
Visibility: public export
MaxMolecularMass : Double
  Molecular mass in g/mol

The total mass of ordinary matter of the universe is assumed to be
approximately 1.5 * 10^50 kg, so we probably shouldn't exceed that by too
much.

Totality: total
Visibility: public export
IsMolecularMass : Double->Bool
Totality: total
Visibility: public export
recordMolecularMass : Type
  Molecular mass (or molecular weight) in g/mol

Totality: total
Visibility: public export
Constructor: 
MkMolecularMass : (value : Double) -> {auto0_ : HoldsIsMolecularMassvalue} ->MolecularMass

Projections:
0.prf : ({rec:0} : MolecularMass) ->HoldsIsMolecularMass (value{rec:0})
.value : MolecularMass->Double

Hints:
CastMolecularMassMolarMass
CastMolarMassMolecularMass
EqMolecularMass
InterpolationMolecularMass
MonoidMolecularMass
OrdMolecularMass
SemigroupMolecularMass
ShowMolecularMass
.value : MolecularMass->Double
Totality: total
Visibility: public export
value : MolecularMass->Double
Totality: total
Visibility: public export
0.prf : ({rec:0} : MolecularMass) ->HoldsIsMolecularMass (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : MolecularMass) ->HoldsIsMolecularMass (value{rec:0})
Totality: total
Visibility: public export
addMolecularMass : MolecularMass->MolecularMass->MolecularMass
Totality: total
Visibility: public export
multMolecularMass : Nat->MolecularMass->MolecularMass
Totality: total
Visibility: public export
recordMolarMass : Type
  Molar mass in Da

Totality: total
Visibility: public export
Constructor: 
MkMolarMass : (value : Double) -> {auto0_ : HoldsIsMolecularMassvalue} ->MolarMass

Projections:
0.prf : ({rec:0} : MolarMass) ->HoldsIsMolecularMass (value{rec:0})
.value : MolarMass->Double

Hints:
CastMolecularMassMolarMass
CastMolarMassMolecularMass
EqMolarMass
InterpolationMolarMass
MonoidMolarMass
OrdMolarMass
SemigroupMolarMass
ShowMolarMass
.value : MolarMass->Double
Totality: total
Visibility: public export
value : MolarMass->Double
Totality: total
Visibility: public export
0.prf : ({rec:0} : MolarMass) ->HoldsIsMolecularMass (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : MolarMass) ->HoldsIsMolecularMass (value{rec:0})
Totality: total
Visibility: public export
molarMass : Double->MolarMass
Totality: total
Visibility: export
addMolarMass : MolarMass->MolarMass->MolarMass
Totality: total
Visibility: export
interfaceHasMolarMass : Type->Type
Parameters: a
Methods:
mass : a->MolarMass
  Extract the molecular mass of an element or isotope.
In case of an element, this returns the average molar mass
in case of an isotope, it's the same as `exactMass`.
exactMass : a->MolarMass
  Extract the exact molecular mass of an element or isotope.
In case of an `Elem`, this returns the exact mass of the most
abundant isotope.

Implementations:
HasMolarMassElem
HasMolarMassIsotope
HasMolarMassAromIsotope
mass : HasMolarMassa=>a->MolarMass
  Extract the molecular mass of an element or isotope.
In case of an element, this returns the average molar mass
in case of an isotope, it's the same as `exactMass`.

Totality: total
Visibility: public export
exactMass : HasMolarMassa=>a->MolarMass
  Extract the exact molecular mass of an element or isotope.
In case of an `Elem`, this returns the exact mass of the most
abundant isotope.

Totality: total
Visibility: public export
multByAbundance : Abundance->MolarMass->MolarMass
Totality: total
Visibility: export
recordCharge : Type
Totality: total
Visibility: public export
Constructor: 
MkCharge : (value : Int8) -> {auto0_ : FromTo-1515value} ->Charge

Projections:
0.prf : ({rec:0} : Charge) ->FromTo-1515 (value{rec:0})
.value : Charge->Int8

Hints:
EqCharge
InterpolationCharge
OrdCharge
ShowCharge
.value : Charge->Int8
Totality: total
Visibility: public export
value : Charge->Int8
Totality: total
Visibility: public export
0.prf : ({rec:0} : Charge) ->FromTo-1515 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : Charge) ->FromTo-1515 (value{rec:0})
Totality: total
Visibility: public export
incCharge : Charge->Charge
  Increase a charge value by one.

Returns the unmodified input if it is already the maximal valid value.

Totality: total
Visibility: export
decCharge : Charge->Charge
  Decrease a charge value by one.

Returns the unmodified input if it is already the minimal valid value.

Totality: total
Visibility: export
recordHCount : Type
Totality: total
Visibility: public export
Constructor: 
MkHCount : (value : Bits8) -> {auto0_ : value<10} ->HCount

Projections:
0.prf : ({rec:0} : HCount) ->value{rec:0}<10
.value : HCount->Bits8

Hints:
CasteElem=>Cast (AtomecprHCounttchl) Formula
EqHCount
HasMolecularMassHCount
InterpolationHCount
OrdHCount
ShowHCount
.value : HCount->Bits8
Totality: total
Visibility: public export
value : HCount->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : HCount) ->value{rec:0}<10
Totality: total
Visibility: public export
0prf : ({rec:0} : HCount) ->value{rec:0}<10
Totality: total
Visibility: public export
dataNoH : Type
  Placeholder for atoms without implicit hydrogens.

We can use this instead of `Unit` (`()`), to signal that an atom
does not have any implicit hydrogens, as oppsed to the implicit
H-count not having been determined yet.

For instance, we can have an implementation of
`Cast (Atom Elem c p r NoH t ch l) Formula`, because here we
do not have to add any implicit hydrogens to such an atom,
while no such implementation should be written for
`Cast (Atom Elem c p r () t ch l) Formula`, because in this case,
the `Unit` tag implies that implicit hydrogens have not been
determined yet.

Totality: total
Visibility: public export
Constructor: 
HasNoH : NoH

Hints:
CasteElem=>Cast (AtomecprNoHtchl) Formula
EqNoH
HasMolecularMassNoH
OrdNoH
ShowNoH
dataRadical : Type
  Type of radical if any.

Totality: total
Visibility: public export
Constructors:
NoRadical : Radical
Singlet : Radical
Doublet : Radical
Triplet : Radical

Hints:
EqRadical
OrdRadical
ShowRadical
dataHybridization : Type
  Kinds of hybridization

Totality: total
Visibility: public export
Constructors:
None : Hybridization
Planar : Hybridization
S : Hybridization
SP : Hybridization
SP2 : Hybridization
SP3 : Hybridization
SP3D1 : Hybridization
SP3D2 : Hybridization
Tetrahedral : Hybridization
Octahedral : Hybridization

Hints:
EqHybridization
FiniteHybridization
OrdHybridization
ShowHybridization
dataBondOrder : Type
Totality: total
Visibility: public export
Constructors:
Single : BondOrder
Dbl : BondOrder
Triple : BondOrder

Hints:
CastSmilesBondBondOrder
CastMolBondBondOrder
CastBondOrderMolBond
CastaBondOrder=>Cast (AromBonda) BondOrder
EqBondOrder
InterpolationBondOrder
OrdBondOrder
ShowBondOrder
0ChemRes : ListType->Type->Type
Totality: total
Visibility: public export
diff --git a/docs/chem/docs/docs/Geom.Angle.html b/docs/chem/docs/docs/Geom.Angle.html index 8f0e08945..463ebb3fb 100644 --- a/docs/chem/docs/docs/Geom.Angle.html +++ b/docs/chem/docs/docs/Geom.Angle.html @@ -61,4 +61,4 @@ -

Geom.Angle

(source)

Definitions

TwoPi : Double
Totality: total
Visibility: export
normalize : Double->Double
  Convert a floating point number to an angle
in the interval [0, 2 * pi).

Totality: total
Visibility: export
recordAngle : Type
  A normalized angle in the range [0,2 * pi).

Totality: total
Visibility: public export
Constructor: 
A : (value : Double) -> (0org : Double) -> {auto0_ : value=normalizeorg} ->Angle

Projections:
0.org : Angle->Double
  The original floating point number from which the angle
was created.
0.prf : ({rec:0} : Angle) ->value{rec:0}=normalize (org{rec:0})
  Proof that we did not forget the normalization step.
.value : Angle->Double
  The normalized value

Hints:
EqAngle
OrdAngle
ShowAngle
.value : Angle->Double
  The normalized value

Totality: total
Visibility: public export
value : Angle->Double
  The normalized value

Totality: total
Visibility: public export
0.org : Angle->Double
  The original floating point number from which the angle
was created.

Totality: total
Visibility: public export
0org : Angle->Double
  The original floating point number from which the angle
was created.

Totality: total
Visibility: public export
0.prf : ({rec:0} : Angle) ->value{rec:0}=normalize (org{rec:0})
  Proof that we did not forget the normalization step.

Totality: total
Visibility: public export
0prf : ({rec:0} : Angle) ->value{rec:0}=normalize (org{rec:0})
  Proof that we did not forget the normalization step.

Totality: total
Visibility: public export
angle : Double->Angle
  Convenience constructor for angles.

It is safe to invoke `A` directly, but one has to deal
with the proofing stuff.

Totality: total
Visibility: export
halfPi : Angle
Totality: total
Visibility: export
twoThirdPi : Angle
Totality: total
Visibility: export
threeHalfPi : Angle
Totality: total
Visibility: export
pi : Angle
Totality: total
Visibility: export
zero : Angle
Totality: total
Visibility: export
delta : Angle->Angle->Angle
  Returns the absolute distance between two angles

Totality: total
Visibility: export
closestAngle : Angle->ListAngle->MaybeAngle
  From a list of angles, returns the one closest to the given angle

Totality: total
Visibility: export
(+) : Angle->Angle->Angle
  Addition of two angles

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 8
negate : Negty=>ty->ty
  The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.

Totality: total
Visibility: public export
Fixity Declaration: prefix operator, level 10
(-) : Angle->Angle->Angle
  Difference between two angles

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 8
prefix operator, level 10
negate : Angle->Angle
  The inverse of an angle so that `x + negate x == 0`
(modulo rounding errors).

Totality: total
Visibility: export
Fixity Declaration: prefix operator, level 10
(*) : Double->Angle->Angle
  Multiplication of an angle with a constant factor

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 9
toDegree : Angle->Double
  Convert and angle to centigrees

Totality: total
Visibility: export
fromDegree : Double->Angle
  Convert an angle in centigrees to one in radians

Totality: total
Visibility: export
bisector : Angle->Angle->Angle
  Angle bisector counterclockwise

Totality: total
Visibility: export
largestBisector : ListAngle->Angle
Totality: total
Visibility: export
+

Geom.Angle

(source)

Definitions

TwoPi : Double
Totality: total
Visibility: export
normalize : Double->Double
  Convert a floating point number to an angle
in the interval [0, 2 * pi).

Totality: total
Visibility: export
recordAngle : Type
  A normalized angle in the range [0,2 * pi).

Totality: total
Visibility: public export
Constructor: 
A : (value : Double) -> (0org : Double) -> {auto0_ : value=normalizeorg} ->Angle

Projections:
0.org : Angle->Double
  The original floating point number from which the angle
was created.
0.prf : ({rec:0} : Angle) ->value{rec:0}=normalize (org{rec:0})
  Proof that we did not forget the normalization step.
.value : Angle->Double
  The normalized value

Hints:
EqAngle
OrdAngle
ShowAngle
.value : Angle->Double
  The normalized value

Totality: total
Visibility: public export
value : Angle->Double
  The normalized value

Totality: total
Visibility: public export
0.org : Angle->Double
  The original floating point number from which the angle
was created.

Totality: total
Visibility: public export
0org : Angle->Double
  The original floating point number from which the angle
was created.

Totality: total
Visibility: public export
0.prf : ({rec:0} : Angle) ->value{rec:0}=normalize (org{rec:0})
  Proof that we did not forget the normalization step.

Totality: total
Visibility: public export
0prf : ({rec:0} : Angle) ->value{rec:0}=normalize (org{rec:0})
  Proof that we did not forget the normalization step.

Totality: total
Visibility: public export
angle : Double->Angle
  Convenience constructor for angles.

It is safe to invoke `A` directly, but one has to deal
with the proofing stuff.

Totality: total
Visibility: export
halfPi : Angle
Totality: total
Visibility: export
twoThirdPi : Angle
Totality: total
Visibility: export
threeHalfPi : Angle
Totality: total
Visibility: export
pi : Angle
Totality: total
Visibility: export
zero : Angle
Totality: total
Visibility: export
delta : Angle->Angle->Angle
  Returns the absolute distance between two angles

Totality: total
Visibility: export
closestAngle : Angle->ListAngle->MaybeAngle
  From a list of angles, returns the one closest to the given angle

Totality: total
Visibility: export
(+) : Angle->Angle->Angle
  Addition of two angles

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 8
negate : Negty=>ty->ty
  The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.

Totality: total
Visibility: public export
Fixity Declaration: prefix operator, level 10
(-) : Angle->Angle->Angle
  Difference between two angles

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 8
prefix operator, level 10
negate : Angle->Angle
  The inverse of an angle so that `x + negate x == 0`
(modulo rounding errors).

Totality: total
Visibility: export
Fixity Declaration: prefix operator, level 10
(*) : Double->Angle->Angle
  Multiplication of an angle with a constant factor

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 9
toDegree : Angle->Double
  Convert and angle to centigrees

Totality: total
Visibility: export
fromDegree : Double->Angle
  Convert an angle in centigrees to one in radians

Totality: total
Visibility: export
bisector : Angle->Angle->Angle
  Angle bisector counterclockwise

Totality: total
Visibility: export
largestBisector : ListAngle->Angle
Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Geom.Bounds.html b/docs/chem/docs/docs/Geom.Bounds.html index 4cf3f6bd6..826519eca 100644 --- a/docs/chem/docs/docs/Geom.Bounds.html +++ b/docs/chem/docs/docs/Geom.Bounds.html @@ -61,4 +61,4 @@ -

Geom.Bounds

(source)

Definitions

dataBounds : Type
  Bounds along one axis in an affine space

Totality: total
Visibility: export
Constructors:
Empty : Bounds
  Bounds without extent. Contains no points.
Rng : Double->Double->Bounds
  Concrete bounds.

Hints:
MonoidBounds
SemigroupBounds
empty : Bounds
  The empty bounds.

Totality: total
Visibility: export
val : Double->Bounds
  A single point on an axis.

Totality: total
Visibility: export
range : Double->Double->Bounds
  the range between two points on a line

Totality: total
Visibility: export
expand : Bounds->Bounds->Bounds
  Return the smallest `Bounds` containing all points in both
argument bounds.

Totality: total
Visibility: export
inBounds1D : Double->Bounds->Bool
  Checks if a value is within the given bounds.

Totality: total
Visibility: export
middle : Bounds->MaybeDouble
  Computes the middle (center) of a range. Returns `Nothing` if the `Bounds`
are empty.

Totality: total
Visibility: export
width : Bounds->Double
  Computes the width of some bounds. Returns `0` if the `Bounds` are empty

Totality: total
Visibility: export
halfWidth : Bounds->Double
  Computes half of the width of some bounds.
Returns `0` if the `Bounds` are empty

Totality: total
Visibility: export
recordBounds2D : AffineTransformation->Type
  Bounds in two dimensions.

Totality: total
Visibility: public export
Constructor: 
BS : Bounds->Bounds->Bounds2Dt

Projections:
.x : Bounds2Dt->Bounds
.y : Bounds2Dt->Bounds

Hints:
Bounded (Bounds2Dt)
Monoid (Bounds2Dt)
Semigroup (Bounds2Dt)
.x : Bounds2Dt->Bounds
Totality: total
Visibility: public export
x : Bounds2Dt->Bounds
Totality: total
Visibility: public export
.y : Bounds2Dt->Bounds
Totality: total
Visibility: public export
y : Bounds2Dt->Bounds
Totality: total
Visibility: public export
width : Bounds2Dt->Double
Totality: total
Visibility: export
height : Bounds2Dt->Double
Totality: total
Visibility: export
inBounds : Pointt->Bounds2Dt->Bool
  Checks, if the point is in within some bounds in its affine space
by two points.

Totality: total
Visibility: export
corners : Bounds2Dt->Maybe (Pointt, Pointt)
  Return the corners of a bounding rectangle (if any)

Totality: total
Visibility: export
interfaceBounded : Type->Type
Parameters: a
Constructor: 
BD

Methods:
btrans : AffineTransformation
bounds : a->Bounds2Dbtrans

Implementations:
Bounded (Bounds2Dt)
Foldablef=>Boundeda=>Bounded (fa)
GetPointa=>Boundeda
btrans : Boundeda=>AffineTransformation
Totality: total
Visibility: public export
bounds : {auto__con : Boundeda} ->a->Bounds2Dbtrans
Totality: total
Visibility: public export
convertBounds : Bounds2Ds->Bounds2Dt
Totality: total
Visibility: export
center : {autob : Boundeda} ->a->Pointbtrans
  Calculates the center in a collection of bounded values.

Returns the origin in case of an object with empty bounds.

Totality: total
Visibility: export
inRectangle : Pointt->Pointt->Pointt->Bool
  Checks, if the point is in or on the line of a rectangel defined
by two points.

Totality: total
Visibility: export
distanceToLineSegment : Pointt->Pointt->Pointt->Double
  Computes the distance of a point `p` from the line segment
between points `pl1` and `pl2`.

Totality: total
Visibility: export
+

Geom.Bounds

(source)

Definitions

dataBounds : Type
  Bounds along one axis in an affine space

Totality: total
Visibility: export
Constructors:
Empty : Bounds
  Bounds without extent. Contains no points.
Rng : Double->Double->Bounds
  Concrete bounds.

Hints:
MonoidBounds
SemigroupBounds
empty : Bounds
  The empty bounds.

Totality: total
Visibility: export
val : Double->Bounds
  A single point on an axis.

Totality: total
Visibility: export
range : Double->Double->Bounds
  the range between two points on a line

Totality: total
Visibility: export
expand : Bounds->Bounds->Bounds
  Return the smallest `Bounds` containing all points in both
argument bounds.

Totality: total
Visibility: export
inBounds1D : Double->Bounds->Bool
  Checks if a value is within the given bounds.

Totality: total
Visibility: export
middle : Bounds->MaybeDouble
  Computes the middle (center) of a range. Returns `Nothing` if the `Bounds`
are empty.

Totality: total
Visibility: export
width : Bounds->Double
  Computes the width of some bounds. Returns `0` if the `Bounds` are empty

Totality: total
Visibility: export
halfWidth : Bounds->Double
  Computes half of the width of some bounds.
Returns `0` if the `Bounds` are empty

Totality: total
Visibility: export
recordBounds2D : AffineTransformation->Type
  Bounds in two dimensions.

Totality: total
Visibility: public export
Constructor: 
BS : Bounds->Bounds->Bounds2Dt

Projections:
.x : Bounds2Dt->Bounds
.y : Bounds2Dt->Bounds

Hints:
Bounded (Bounds2Dt)
Monoid (Bounds2Dt)
Semigroup (Bounds2Dt)
.x : Bounds2Dt->Bounds
Totality: total
Visibility: public export
x : Bounds2Dt->Bounds
Totality: total
Visibility: public export
.y : Bounds2Dt->Bounds
Totality: total
Visibility: public export
y : Bounds2Dt->Bounds
Totality: total
Visibility: public export
width : Bounds2Dt->Double
Totality: total
Visibility: export
height : Bounds2Dt->Double
Totality: total
Visibility: export
inBounds : Pointt->Bounds2Dt->Bool
  Checks, if the point is in within some bounds in its affine space
by two points.

Totality: total
Visibility: export
corners : Bounds2Dt->Maybe (Pointt, Pointt)
  Return the corners of a bounding rectangle (if any)

Totality: total
Visibility: export
interfaceBounded : Type->Type
Parameters: a
Constructor: 
BD

Methods:
btrans : AffineTransformation
bounds : a->Bounds2Dbtrans

Implementations:
Bounded (Bounds2Dt)
Foldablef=>Boundeda=>Bounded (fa)
GetPointa=>Boundeda
btrans : Boundeda=>AffineTransformation
Totality: total
Visibility: public export
bounds : {auto__con : Boundeda} ->a->Bounds2Dbtrans
Totality: total
Visibility: public export
convertBounds : Bounds2Ds->Bounds2Dt
Totality: total
Visibility: export
center : {autob : Boundeda} ->a->Pointbtrans
  Calculates the center in a collection of bounded values.

Returns the origin in case of an object with empty bounds.

Totality: total
Visibility: export
inRectangle : Pointt->Pointt->Pointt->Bool
  Checks, if the point is in or on the line of a rectangel defined
by two points.

Totality: total
Visibility: export
distanceToLineSegment : Pointt->Pointt->Pointt->Double
  Computes the distance of a point `p` from the line segment
between points `pl1` and `pl2`.

Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Geom.Point.html b/docs/chem/docs/docs/Geom.Point.html index db2e0ed9e..8f88386db 100644 --- a/docs/chem/docs/docs/Geom.Point.html +++ b/docs/chem/docs/docs/Geom.Point.html @@ -61,4 +61,4 @@ -

Geom.Point

(source)

Definitions

recordAffineTransformation : Type
  An affine transformation is a linear transformation (currently, a rotation
or scaling) followed by a translation in the new coordinate system.

We use affine transformations to keep track of the coordinate system
we are currently in. In the UI, if a user zooms in or moves the canvas,
the coordinates we get from the UI must be adjusted by reversing these
transformations in order to get the correct canvas coordinates. These
need then again be adjusted (by a scaling factor) to get the coordinates
of the molecule.

In order to make sure these transformations and adjustments are not
forgotten, we index all `Point`s we work with the the affine transformation
of the coordinate system they come from. Via function `convert`, points
from one coordinate system can be converted to the corresponding points in
another one.

Totality: total
Visibility: public export
Constructor: 
AT : LinearTransformation->VectorId->AffineTransformation

Projections:
.transform : AffineTransformation->LinearTransformation
.translate : AffineTransformation->VectorId

Hints:
Bounded (Bounds2Dt)
Cast (Points) (Pointt)
Eq (Pointt)
GetPoint (Pointt)
ModPoint (Pointt)
Monoid (Bounds2Dt)
MonoidAffineTransformation
Ord (Pointt)
Semigroup (Bounds2Dt)
SemigroupAffineTransformation
Show (Pointt)
.transform : AffineTransformation->LinearTransformation
Totality: total
Visibility: public export
transform : AffineTransformation->LinearTransformation
Totality: total
Visibility: public export
.translate : AffineTransformation->VectorId
Totality: total
Visibility: public export
translate : AffineTransformation->VectorId
Totality: total
Visibility: public export
Id : AffineTransformation
  The identity transformation

Totality: total
Visibility: public export
scaling : Scale->AffineTransformation
  An affine transformation consisting only of a scaling by the given factor.

Totality: total
Visibility: export
inverse : AffineTransformation->AffineTransformation
  Computes the inverse of an affine transformation so that
`t <+> inverse t` is the identity (`Id`; modulo rounding errors)

Totality: total
Visibility: export
translate : VectorId->AffineTransformation
  Creates an affine transformation corresponding to a translation
by the given vector.

Totality: total
Visibility: export
recordPoint : AffineTransformation->Type
  A point in an affine space such as the user interface or the
coordinate system of the molecule.

Unlike `Vector`, a `Point` is somewhat of an abstract entity.
We can compute a vector for connecting two points, but we cannot
add two points together (that does not make sense). Likewise, the
difference between two points results in the vector connecting
the two.

A point is indexed by the `AffineTransformation` corresponding to its
coordinate system. See @AffineTransformation for some more details.

Totality: total
Visibility: public export
Constructor: 
P : Double->Double->Pointt

Projections:
.x : Pointt->Double
.y : Pointt->Double

Hints:
Cast (Points) (Pointt)
Eq (Pointt)
GetPoint (Pointt)
ModPoint (Pointt)
Ord (Pointt)
Show (Pointt)
.x : Pointt->Double
Totality: total
Visibility: public export
x : Pointt->Double
Totality: total
Visibility: public export
.y : Pointt->Double
Totality: total
Visibility: public export
y : Pointt->Double
Totality: total
Visibility: public export
origin : Pointt
  The origin at `(0,0)`.

Totality: total
Visibility: export
negate : Negty=>ty->ty
  The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.

Totality: total
Visibility: public export
Fixity Declaration: prefix operator, level 10
(-) : Pointt->Pointt->Vector (t.transform)
  The difference between two points is the vector connecting
the points.

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 8
prefix operator, level 10
convert : Points->Pointt
  Convert a point from one affine space to its image in another
affine space.

Totality: total
Visibility: export
interfaceGetPoint : Type->Type
  Interface for converting a value to a point in the affine space
represented by transformation `t`.

Parameters: a
Methods:
gtrans : AffineTransformation
point : a->Pointgtrans

Implementations:
GetPoint (Vect3Coordinate)
GetPointMolAtom
GetPointMolAtomAT
GetPoint (Pointt)
gtrans : GetPointa=>AffineTransformation
Totality: total
Visibility: public export
point : {auto__con : GetPointa} ->a->Pointgtrans
Totality: total
Visibility: public export
interfaceModPoint : Type->Type
  Interface for modification of a value `a` by modifying its points in the
affine space.

Parameters: a
Methods:
mtrans : AffineTransformation
modPoint : (Pointmtrans->Pointmtrans) ->a->a

Implementations:
ModPoint (Vect3Coordinate)
ModPointMolAtom
ModPointMolAtomAT
ModPointa=>ModPoint (Graphba)
ModPointa=>ModPoint (IGraphkba)
ModPoint (Pointt)
mtrans : ModPointa=>AffineTransformation
Totality: total
Visibility: public export
modPoint : {auto__con : ModPointa} -> (Pointmtrans->Pointmtrans) ->a->a
Totality: total
Visibility: public export
setPoint : {autom : ModPointa} ->Pointmtrans->a->a
  Places an object at a new point in space.

Totality: total
Visibility: export
pointId : GetPointa=>a->PointId
  Return the coordinates of a point in the reference affine space.

Totality: total
Visibility: export
translate : {autom : ModPointa} ->Vector (transformmtrans) ->a->a
  Translate an object in 2D space by the given vector.

Totality: total
Visibility: export
scale : ModPointa=>Scale->a->a
  Scale an object in 2D space by the given factor.

Totality: total
Visibility: export
rotateAt : {autom : ModPointa} ->Pointmtrans->Angle->a->a
  Rotates an object by the given angle around the given poin

Totality: total
Visibility: export
rotate : ModPointa=>Angle->a->a
  Rotates an object by the given angle around the origin

Totality: total
Visibility: export
distance : GetPointa=>a->a->Double
  Calculate the distance between two objects.

Totality: total
Visibility: export
distanceFromZero : GetPointa=>a->Double
  Calculate the distance of an object from zero.

Totality: total
Visibility: export
near : GetPointa=>a->a->Double->Bool
  Checks, if two objects are no further apart than `delta`.

Totality: total
Visibility: export
apply : Matrix->Pointt->Pointt
  Transform a point by applying a transformation patrix.

Totality: total
Visibility: export
perpendicularPoint : Pointk->Pointk->Double->Bool->Pointk
  Calculates a perpendicual point to the line from the first line point
with a certain distance. The `positive` flag is to choose the direction
from the line (positive -> right top, negative -> left bottom).

Totality: total
Visibility: export
intersect : Pointt->Pointt->Pointt->Pointt->Maybe (Pointt)
  Tries to compute the intersection of two lines
from points p11 to p12 and p21 to p22.

This tries to solve the following system of equations:

(I) : `x11 + r * (x12 - x11) = x21 + s * (x22 - x21)`
(II) : `y11 + r * (y12 - y11) = y21 + s * (y22 - y21)`

Totality: total
Visibility: export
distanceToLine : Pointt->Pointt->Pointt->MaybeDouble
  Computes the distance of a point `p` from a line defined
by two of its points (`pl1` and `pl2`).

Totality: total
Visibility: export
+

Geom.Point

(source)

Definitions

recordAffineTransformation : Type
  An affine transformation is a linear transformation (currently, a rotation
or scaling) followed by a translation in the new coordinate system.

We use affine transformations to keep track of the coordinate system
we are currently in. In the UI, if a user zooms in or moves the canvas,
the coordinates we get from the UI must be adjusted by reversing these
transformations in order to get the correct canvas coordinates. These
need then again be adjusted (by a scaling factor) to get the coordinates
of the molecule.

In order to make sure these transformations and adjustments are not
forgotten, we index all `Point`s we work with the the affine transformation
of the coordinate system they come from. Via function `convert`, points
from one coordinate system can be converted to the corresponding points in
another one.

Totality: total
Visibility: public export
Constructor: 
AT : LinearTransformation->VectorId->AffineTransformation

Projections:
.transform : AffineTransformation->LinearTransformation
.translate : AffineTransformation->VectorId

Hints:
Bounded (Bounds2Dt)
Cast (Points) (Pointt)
Eq (Pointt)
GetPoint (Pointt)
ModPoint (Pointt)
Monoid (Bounds2Dt)
MonoidAffineTransformation
Ord (Pointt)
Semigroup (Bounds2Dt)
SemigroupAffineTransformation
Show (Pointt)
.transform : AffineTransformation->LinearTransformation
Totality: total
Visibility: public export
transform : AffineTransformation->LinearTransformation
Totality: total
Visibility: public export
.translate : AffineTransformation->VectorId
Totality: total
Visibility: public export
translate : AffineTransformation->VectorId
Totality: total
Visibility: public export
Id : AffineTransformation
  The identity transformation

Totality: total
Visibility: public export
scaling : Scale->AffineTransformation
  An affine transformation consisting only of a scaling by the given factor.

Totality: total
Visibility: export
inverse : AffineTransformation->AffineTransformation
  Computes the inverse of an affine transformation so that
`t <+> inverse t` is the identity (`Id`; modulo rounding errors)

Totality: total
Visibility: export
translate : VectorId->AffineTransformation
  Creates an affine transformation corresponding to a translation
by the given vector.

Totality: total
Visibility: export
recordPoint : AffineTransformation->Type
  A point in an affine space such as the user interface or the
coordinate system of the molecule.

Unlike `Vector`, a `Point` is somewhat of an abstract entity.
We can compute a vector for connecting two points, but we cannot
add two points together (that does not make sense). Likewise, the
difference between two points results in the vector connecting
the two.

A point is indexed by the `AffineTransformation` corresponding to its
coordinate system. See @AffineTransformation for some more details.

Totality: total
Visibility: public export
Constructor: 
P : Double->Double->Pointt

Projections:
.x : Pointt->Double
.y : Pointt->Double

Hints:
Cast (Points) (Pointt)
Eq (Pointt)
GetPoint (Pointt)
ModPoint (Pointt)
Ord (Pointt)
Show (Pointt)
.x : Pointt->Double
Totality: total
Visibility: public export
x : Pointt->Double
Totality: total
Visibility: public export
.y : Pointt->Double
Totality: total
Visibility: public export
y : Pointt->Double
Totality: total
Visibility: public export
origin : Pointt
  The origin at `(0,0)`.

Totality: total
Visibility: export
negate : Negty=>ty->ty
  The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.

Totality: total
Visibility: public export
Fixity Declaration: prefix operator, level 10
(-) : Pointt->Pointt->Vector (t.transform)
  The difference between two points is the vector connecting
the points.

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 8
prefix operator, level 10
convert : Points->Pointt
  Convert a point from one affine space to its image in another
affine space.

Totality: total
Visibility: export
interfaceGetPoint : Type->Type
  Interface for converting a value to a point in the affine space
represented by transformation `t`.

Parameters: a
Methods:
gtrans : AffineTransformation
point : a->Pointgtrans

Implementations:
GetPoint (Vect3Coordinate)
GetPointMolAtom
GetPointMolAtomAT
GetPoint (Pointt)
gtrans : GetPointa=>AffineTransformation
Totality: total
Visibility: public export
point : {auto__con : GetPointa} ->a->Pointgtrans
Totality: total
Visibility: public export
interfaceModPoint : Type->Type
  Interface for modification of a value `a` by modifying its points in the
affine space.

Parameters: a
Methods:
mtrans : AffineTransformation
modPoint : (Pointmtrans->Pointmtrans) ->a->a

Implementations:
ModPoint (Vect3Coordinate)
ModPointMolAtom
ModPointMolAtomAT
ModPointa=>ModPoint (Graphba)
ModPointa=>ModPoint (IGraphkba)
ModPoint (Pointt)
mtrans : ModPointa=>AffineTransformation
Totality: total
Visibility: public export
modPoint : {auto__con : ModPointa} -> (Pointmtrans->Pointmtrans) ->a->a
Totality: total
Visibility: public export
setPoint : {autom : ModPointa} ->Pointmtrans->a->a
  Places an object at a new point in space.

Totality: total
Visibility: export
pointId : GetPointa=>a->PointId
  Return the coordinates of a point in the reference affine space.

Totality: total
Visibility: export
translate : {autom : ModPointa} ->Vector (transformmtrans) ->a->a
  Translate an object in 2D space by the given vector.

Totality: total
Visibility: export
scale : ModPointa=>Scale->a->a
  Scale an object in 2D space by the given factor.

Totality: total
Visibility: export
rotateAt : {autom : ModPointa} ->Pointmtrans->Angle->a->a
  Rotates an object by the given angle around the given poin

Totality: total
Visibility: export
rotate : ModPointa=>Angle->a->a
  Rotates an object by the given angle around the origin

Totality: total
Visibility: export
distance : GetPointa=>a->a->Double
  Calculate the distance between two objects.

Totality: total
Visibility: export
distanceFromZero : GetPointa=>a->Double
  Calculate the distance of an object from zero.

Totality: total
Visibility: export
near : GetPointa=>a->a->Double->Bool
  Checks, if two objects are no further apart than `delta`.

Totality: total
Visibility: export
apply : Matrix->Pointt->Pointt
  Transform a point by applying a transformation patrix.

Totality: total
Visibility: export
perpendicularPoint : Pointk->Pointk->Double->Bool->Pointk
  Calculates a perpendicual point to the line from the first line point
with a certain distance. The `positive` flag is to choose the direction
from the line (positive -> right top, negative -> left bottom).

Totality: total
Visibility: export
intersect : Pointt->Pointt->Pointt->Pointt->Maybe (Pointt)
  Tries to compute the intersection of two lines
from points p11 to p12 and p21 to p22.

This tries to solve the following system of equations:

(I) : `x11 + r * (x12 - x11) = x21 + s * (x22 - x21)`
(II) : `y11 + r * (y12 - y11) = y21 + s * (y22 - y21)`

Totality: total
Visibility: export
distanceToLine : Pointt->Pointt->Pointt->MaybeDouble
  Computes the distance of a point `p` from a line defined
by two of its points (`pl1` and `pl2`).

Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Geom.Scale.html b/docs/chem/docs/docs/Geom.Scale.html index 8679b85fd..f927794b3 100644 --- a/docs/chem/docs/docs/Geom.Scale.html +++ b/docs/chem/docs/docs/Geom.Scale.html @@ -61,4 +61,4 @@ -

Geom.Scale

(source)

Definitions

ValidScale : Double->Bool
  Scaling factor in the range [1.0e-6,1.0e6].

Totality: total
Visibility: public export
recordScale : Type
  A scaling factor

Totality: total
Visibility: public export
Constructor: 
S : (value : Double) -> {auto0_ : HoldsValidScalevalue} ->Scale

Projections:
0.prf : ({rec:0} : Scale) ->HoldsValidScale (value{rec:0})
.value : Scale->Double

Hints:
EqScale
OrdScale
ShowScale
.value : Scale->Double
Totality: total
Visibility: public export
value : Scale->Double
Totality: total
Visibility: public export
0.prf : ({rec:0} : Scale) ->HoldsValidScale (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : Scale) ->HoldsValidScale (value{rec:0})
Totality: total
Visibility: public export
scale : Double->Scale
  Safely convert a floating point number to a `Scale`

Totality: total
Visibility: export
inverse : Scale->Scale
  Invert the scaling factor so that `x * inverse x == 1`
(modulo rounding errors).

Totality: total
Visibility: export
(*) : Scale->Scale->Scale
  Multiply two scaling factors.

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 9
(/) : Scale->Scale->Scale
  Divide a scaling factor by another one

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 9
+

Geom.Scale

(source)

Definitions

ValidScale : Double->Bool
  Scaling factor in the range [1.0e-6,1.0e6].

Totality: total
Visibility: public export
recordScale : Type
  A scaling factor

Totality: total
Visibility: public export
Constructor: 
S : (value : Double) -> {auto0_ : HoldsValidScalevalue} ->Scale

Projections:
0.prf : ({rec:0} : Scale) ->HoldsValidScale (value{rec:0})
.value : Scale->Double

Hints:
EqScale
OrdScale
ShowScale
.value : Scale->Double
Totality: total
Visibility: public export
value : Scale->Double
Totality: total
Visibility: public export
0.prf : ({rec:0} : Scale) ->HoldsValidScale (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : Scale) ->HoldsValidScale (value{rec:0})
Totality: total
Visibility: public export
scale : Double->Scale
  Safely convert a floating point number to a `Scale`

Totality: total
Visibility: export
inverse : Scale->Scale
  Invert the scaling factor so that `x * inverse x == 1`
(modulo rounding errors).

Totality: total
Visibility: export
(*) : Scale->Scale->Scale
  Multiply two scaling factors.

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 9
(/) : Scale->Scale->Scale
  Divide a scaling factor by another one

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 9
diff --git a/docs/chem/docs/docs/Geom.Vector.html b/docs/chem/docs/docs/Geom.Vector.html index f5f96262e..7711bad14 100644 --- a/docs/chem/docs/docs/Geom.Vector.html +++ b/docs/chem/docs/docs/Geom.Vector.html @@ -61,4 +61,4 @@ -

Geom.Vector

(source)

Definitions

solveQuadratic : Double->Double->Double->Maybe (Double, Double)
  Tries to find solutions to the quadratic equation
`ax^2 + bx + c = 0`.

Totality: total
Visibility: export
recordLinearTransformation : Type
  A linear transformation in a two-dimensional vector space
is a sequence of scalings and rotations.

By not using a matrix here we make sure that a transformation
is invertible, without the risk of a division by zero.
This might be a performance issue, but only if we create large
trees of wild mixtures of linear transformations. However,
in a UI we often work with sequences of the same type of
transformations such as a sequence of scalings or a sequence of
rotations. These are merged automatically in the `Semigroup`
implementation.

Totality: total
Visibility: public export
Constructor: 
LT : Scale->Angle->LinearTransformation

Projections:
.rotate : LinearTransformation->Angle
.scale : LinearTransformation->Scale

Hints:
Eq (Vectort)
MonoidLinearTransformation
Ord (Vectort)
SemigroupLinearTransformation
Show (Vectort)
.scale : LinearTransformation->Scale
Totality: total
Visibility: public export
scale : LinearTransformation->Scale
Totality: total
Visibility: public export
.rotate : LinearTransformation->Angle
Totality: total
Visibility: public export
rotate : LinearTransformation->Angle
Totality: total
Visibility: public export
Id : LinearTransformation
  The identity transformation

Totality: total
Visibility: public export
rotation : Angle->LinearTransformation
  A clockwise rotation by the given angle.

Totality: total
Visibility: public export
scaling : Scale->LinearTransformation
  A scaling by the given factor.

Totality: total
Visibility: public export
inverse : LinearTransformation->LinearTransformation
  Computes the inverse of a linear transformation, so
`x <+> inverse x` corresponse to the identity (modulo rounding
errors).

Totality: total
Visibility: export
recordVector : LinearTransformation->Type
  A two-dimensional vector.

Totality: total
Visibility: public export
Constructor: 
V : Double->Double->Vectort

Projections:
.x : Vectort->Double
.y : Vectort->Double

Hints:
Eq (Vectort)
Ord (Vectort)
Show (Vectort)
.x : Vectort->Double
Totality: total
Visibility: public export
x : Vectort->Double
Totality: total
Visibility: public export
.y : Vectort->Double
Totality: total
Visibility: public export
y : Vectort->Double
Totality: total
Visibility: public export
vzero : Vectort
  The zero vector.

Totality: total
Visibility: export
vone : Vectort
  Unity vector along the x axis

Totality: total
Visibility: export
vid : Double->Double->VectorId
  Utility to help with type inference when using vectors in `Id`

Totality: total
Visibility: export
length : Vectort->Double
  Computes the length of a vector.

Totality: total
Visibility: export
(+) : Vectort->Vectort->Vectort
  Vector addition.

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 8
negate : Negty=>ty->ty
  The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.

Totality: total
Visibility: public export
Fixity Declaration: prefix operator, level 10
(-) : Vectort->Vectort->Vectort
  Vector subtraction.

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 8
prefix operator, level 10
negate : Vectort->Vectort
  Inverts the given vector by negating its coordinates.

Totality: total
Visibility: export
Fixity Declaration: prefix operator, level 10
scale : Double->Vectort->Vectort
  Multiply a vector with a scalar.

Totality: total
Visibility: export
scaleTo : Double->Vectort->Vectort
  Scales the vector to the given length.

Totality: total
Visibility: export
normalize : Vectort->Vectort
  Normalize a vector to length 1.

Totality: total
Visibility: export
transform : LinearTransformation->Vectort->Vectort
  Apply a linear transformation to a vector

Totality: total
Visibility: export
polar : Scale->Angle->Vectort
  Define a vector by giving its length and its angle

Totality: total
Visibility: export
rotate : Angle->Vectort->Vectort
  Rotate a vector by the specified number of degrees

Totality: total
Visibility: export
angle : Vectort->MaybeAngle
  Tries to calculate the angle of the given vector.
Fails in case this is the zero vector.

Totality: total
Visibility: export
+

Geom.Vector

(source)

Definitions

solveQuadratic : Double->Double->Double->Maybe (Double, Double)
  Tries to find solutions to the quadratic equation
`ax^2 + bx + c = 0`.

Totality: total
Visibility: export
recordLinearTransformation : Type
  A linear transformation in a two-dimensional vector space
is a sequence of scalings and rotations.

By not using a matrix here we make sure that a transformation
is invertible, without the risk of a division by zero.
This might be a performance issue, but only if we create large
trees of wild mixtures of linear transformations. However,
in a UI we often work with sequences of the same type of
transformations such as a sequence of scalings or a sequence of
rotations. These are merged automatically in the `Semigroup`
implementation.

Totality: total
Visibility: public export
Constructor: 
LT : Scale->Angle->LinearTransformation

Projections:
.rotate : LinearTransformation->Angle
.scale : LinearTransformation->Scale

Hints:
Eq (Vectort)
MonoidLinearTransformation
Ord (Vectort)
SemigroupLinearTransformation
Show (Vectort)
.scale : LinearTransformation->Scale
Totality: total
Visibility: public export
scale : LinearTransformation->Scale
Totality: total
Visibility: public export
.rotate : LinearTransformation->Angle
Totality: total
Visibility: public export
rotate : LinearTransformation->Angle
Totality: total
Visibility: public export
Id : LinearTransformation
  The identity transformation

Totality: total
Visibility: public export
rotation : Angle->LinearTransformation
  A clockwise rotation by the given angle.

Totality: total
Visibility: public export
scaling : Scale->LinearTransformation
  A scaling by the given factor.

Totality: total
Visibility: public export
inverse : LinearTransformation->LinearTransformation
  Computes the inverse of a linear transformation, so
`x <+> inverse x` corresponse to the identity (modulo rounding
errors).

Totality: total
Visibility: export
recordVector : LinearTransformation->Type
  A two-dimensional vector.

Totality: total
Visibility: public export
Constructor: 
V : Double->Double->Vectort

Projections:
.x : Vectort->Double
.y : Vectort->Double

Hints:
Eq (Vectort)
Ord (Vectort)
Show (Vectort)
.x : Vectort->Double
Totality: total
Visibility: public export
x : Vectort->Double
Totality: total
Visibility: public export
.y : Vectort->Double
Totality: total
Visibility: public export
y : Vectort->Double
Totality: total
Visibility: public export
vzero : Vectort
  The zero vector.

Totality: total
Visibility: export
vone : Vectort
  Unity vector along the x axis

Totality: total
Visibility: export
vid : Double->Double->VectorId
  Utility to help with type inference when using vectors in `Id`

Totality: total
Visibility: export
length : Vectort->Double
  Computes the length of a vector.

Totality: total
Visibility: export
(+) : Vectort->Vectort->Vectort
  Vector addition.

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 8
negate : Negty=>ty->ty
  The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.

Totality: total
Visibility: public export
Fixity Declaration: prefix operator, level 10
(-) : Vectort->Vectort->Vectort
  Vector subtraction.

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 8
prefix operator, level 10
negate : Vectort->Vectort
  Inverts the given vector by negating its coordinates.

Totality: total
Visibility: export
Fixity Declaration: prefix operator, level 10
scale : Double->Vectort->Vectort
  Multiply a vector with a scalar.

Totality: total
Visibility: export
scaleTo : Double->Vectort->Vectort
  Scales the vector to the given length.

Totality: total
Visibility: export
normalize : Vectort->Vectort
  Normalize a vector to length 1.

Totality: total
Visibility: export
transform : LinearTransformation->Vectort->Vectort
  Apply a linear transformation to a vector

Totality: total
Visibility: export
polar : Scale->Angle->Vectort
  Define a vector by giving its length and its angle

Totality: total
Visibility: export
rotate : Angle->Vectort->Vectort
  Rotate a vector by the specified number of degrees

Totality: total
Visibility: export
angle : Vectort->MaybeAngle
  Tries to calculate the angle of the given vector.
Fails in case this is the zero vector.

Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Text.Lex.Formula.html b/docs/chem/docs/docs/Text.Lex.Formula.html index b2b4ddb68..b9f5d04db 100644 --- a/docs/chem/docs/docs/Text.Lex.Formula.html +++ b/docs/chem/docs/docs/Text.Lex.Formula.html @@ -61,4 +61,4 @@ -

Text.Lex.Formula

(source)

Definitions

recordFormulaErr : Type
Totality: total
Visibility: public export
Constructor: 
FE : String->FileContext->ParseErrorVoidVoid->FormulaErr

Projections:
.context : FormulaErr->FileContext
.error : FormulaErr->ParseErrorVoidVoid
.formula : FormulaErr->String

Hints:
EqFormulaErr
InterpolationFormulaErr
ShowFormulaErr
.formula : FormulaErr->String
Totality: total
Visibility: public export
formula : FormulaErr->String
Totality: total
Visibility: public export
.context : FormulaErr->FileContext
Totality: total
Visibility: public export
context : FormulaErr->FileContext
Totality: total
Visibility: public export
.error : FormulaErr->ParseErrorVoidVoid
Totality: total
Visibility: public export
error : FormulaErr->ParseErrorVoidVoid
Totality: total
Visibility: public export
readFormula : HasFormulaErres=>String->ChemResesFormula
Totality: total
Visibility: export
readFormula' : String->EitherStringFormula
Totality: total
Visibility: export
+

Text.Lex.Formula

(source)

Definitions

recordFormulaErr : Type
Totality: total
Visibility: public export
Constructor: 
FE : String->FileContext->ParseErrorVoidVoid->FormulaErr

Projections:
.context : FormulaErr->FileContext
.error : FormulaErr->ParseErrorVoidVoid
.formula : FormulaErr->String

Hints:
EqFormulaErr
InterpolationFormulaErr
ShowFormulaErr
.formula : FormulaErr->String
Totality: total
Visibility: public export
formula : FormulaErr->String
Totality: total
Visibility: public export
.context : FormulaErr->FileContext
Totality: total
Visibility: public export
context : FormulaErr->FileContext
Totality: total
Visibility: public export
.error : FormulaErr->ParseErrorVoidVoid
Totality: total
Visibility: public export
error : FormulaErr->ParseErrorVoidVoid
Totality: total
Visibility: public export
readFormula : HasFormulaErres=>String->ChemResesFormula
Totality: total
Visibility: export
readFormula' : String->EitherStringFormula
Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Text.Molfile.Reader.Error.html b/docs/chem/docs/docs/Text.Molfile.Reader.Error.html index f095870b7..1b1477cb0 100644 --- a/docs/chem/docs/docs/Text.Molfile.Reader.Error.html +++ b/docs/chem/docs/docs/Text.Molfile.Reader.Error.html @@ -61,4 +61,4 @@ -

Text.Molfile.Reader.Error

(source)

Definitions

dataMolErr : Type
Totality: total
Visibility: public export
Constructors:
EEdge : MolErr
EHeader : MolErr
EChiralFlag : String->MolErr
EDot : Char->MolErr
EVersion : String->MolErr
ESymbol : String->MolErr
ERadical : String->MolErr
EStereoParity : String->MolErr
EStereoCareBox : String->MolErr
EH0Designator : String->MolErr
EBondType : String->MolErr
EBondStereo : String->MolErr
EBondTopo : String->MolErr
EOutOfBounds : Nat->MolErr
EInvalid : String->MolErr
ECoordinate : String->MolErr
EOI : MolErr

Hints:
EqMolErr
InterpolationMolErr
ShowMolErr
packError : SnocListChar-> (String->MolErr) ->EitherMolErra
Totality: total
Visibility: export
recordMolParseErr : Type
Totality: total
Visibility: public export
Constructor: 
MPE : Nat->MolErr->MolParseErr

Projections:
.error : MolParseErr->MolErr
.line : MolParseErr->Nat

Hints:
EqMolParseErr
InterpolationMolParseErr
ShowMolParseErr
.line : MolParseErr->Nat
Totality: total
Visibility: public export
line : MolParseErr->Nat
Totality: total
Visibility: public export
.error : MolParseErr->MolErr
Totality: total
Visibility: public export
error : MolParseErr->MolErr
Totality: total
Visibility: public export
+

Text.Molfile.Reader.Error

(source)

Definitions

dataMolErr : Type
Totality: total
Visibility: public export
Constructors:
EEdge : MolErr
EHeader : MolErr
EChiralFlag : String->MolErr
EDot : Char->MolErr
EVersion : String->MolErr
ESymbol : String->MolErr
ERadical : String->MolErr
EStereoParity : String->MolErr
EStereoCareBox : String->MolErr
EH0Designator : String->MolErr
EBondType : String->MolErr
EBondStereo : String->MolErr
EBondTopo : String->MolErr
EOutOfBounds : Nat->MolErr
EInvalid : String->MolErr
ECoordinate : String->MolErr
EOI : MolErr

Hints:
EqMolErr
InterpolationMolErr
ShowMolErr
packError : SnocListChar-> (String->MolErr) ->EitherMolErra
Totality: total
Visibility: export
recordMolParseErr : Type
Totality: total
Visibility: public export
Constructor: 
MPE : Nat->MolErr->MolParseErr

Projections:
.error : MolParseErr->MolErr
.line : MolParseErr->Nat

Hints:
EqMolParseErr
InterpolationMolParseErr
ShowMolParseErr
.line : MolParseErr->Nat
Totality: total
Visibility: public export
line : MolParseErr->Nat
Totality: total
Visibility: public export
.error : MolParseErr->MolErr
Totality: total
Visibility: public export
error : MolParseErr->MolErr
Totality: total
Visibility: public export
diff --git a/docs/chem/docs/docs/Text.Molfile.SDF.html b/docs/chem/docs/docs/Text.Molfile.SDF.html index a8e48eeee..af8f1b7f5 100644 --- a/docs/chem/docs/docs/Text.Molfile.SDF.html +++ b/docs/chem/docs/docs/Text.Molfile.SDF.html @@ -61,4 +61,4 @@ -

Text.Molfile.SDF

(source)

Definitions

0IsHeader : String->Type
Totality: total
Visibility: public export
recordSDHeader : Type
  Header of a SDF data entry. This is put in angles (`<>`) in an SD file.

Totality: total
Visibility: public export
Constructor: 
SDH : (value : String) -> {auto0_ : IsHeadervalue} ->SDHeader

Projections:
0.prf : ({rec:0} : SDHeader) ->IsHeader (value{rec:0})
.value : SDHeader->String

Hints:
EqSDHeader
InterpolationSDHeader
OrdSDHeader
ShowSDHeader
.value : SDHeader->String
Totality: total
Visibility: public export
value : SDHeader->String
Totality: total
Visibility: public export
0.prf : ({rec:0} : SDHeader) ->IsHeader (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : SDHeader) ->IsHeader (value{rec:0})
Totality: total
Visibility: public export
encodeHeader : String->MaybeSDHeader
  Encodes a value header by replacing spaces with underscores and
dropping some other invalid characters such as angles.

Totality: total
Visibility: export
0IsValue : String->Type
Totality: total
Visibility: public export
recordSDValue : Type
  Value of an SDF data entry. This follows after the header (see
`SDHeader`) and may span across several lines, each of which must not
be longer than 200 characters.

Totality: total
Visibility: public export
Constructor: 
SDV : (value : String) -> {auto0_ : IsValuevalue} ->SDValue

Projections:
0.prf : ({rec:0} : SDValue) ->IsValue (value{rec:0})
.value : SDValue->String

Hints:
EqSDValue
InterpolationSDValue
OrdSDValue
ShowSDValue
.value : SDValue->String
Totality: total
Visibility: public export
value : SDValue->String
Totality: total
Visibility: public export
0.prf : ({rec:0} : SDValue) ->IsValue (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : SDValue) ->IsValue (value{rec:0})
Totality: total
Visibility: public export
recordStructureData : Type
  A data entry in an SD file consisting of the data header and value.

Totality: total
Visibility: public export
Constructor: 
SD : SDHeader->SDValue->StructureData

Projections:
.header : StructureData->SDHeader
.value : StructureData->SDValue

Hints:
EqStructureData
ShowStructureData
.header : StructureData->SDHeader
Totality: total
Visibility: public export
header : StructureData->SDHeader
Totality: total
Visibility: public export
.value : StructureData->SDValue
Totality: total
Visibility: public export
value : StructureData->SDValue
Totality: total
Visibility: public export
encodeStructureData : String->String->MaybeStructureData
  Tries to convert a name-value pair to a piece of
SD-data.

While the values is refined as it is, we try to encode the
header in such a way that it does not contain any invalid
characters.

Totality: total
Visibility: export
recordSDFile' : Type->Type->Type->Type
  A single structure in an SD file consisting of a mol-file entry followed
by an arbitrary number of data entries.

Totality: total
Visibility: public export
Constructor: 
SDF : Molfile'htc->ListStructureData->SDFile'htc

Projections:
.dat : SDFile'htc->ListStructureData
.mol : SDFile'htc->Molfile'htc

Hints:
Eqh=>Eqt=>Eqc=>Eq (SDFile'htc)
Showh=>Showt=>Showc=>Show (SDFile'htc)
.mol : SDFile'htc->Molfile'htc
Totality: total
Visibility: public export
mol : SDFile'htc->Molfile'htc
Totality: total
Visibility: public export
.dat : SDFile'htc->ListStructureData
Totality: total
Visibility: public export
dat : SDFile'htc->ListStructureData
Totality: total
Visibility: public export
0SDFile : Type
Totality: total
Visibility: public export
0SDFileAT : Type
Totality: total
Visibility: public export
sdfDelimiter : String
Totality: total
Visibility: export
writeSDF : List (SDFile'htc) ->String
Totality: total
Visibility: export
readSDF : HasMolParseErres=>String->ChemReses (ListSDFile)
  Reads the SD file entries from a string.

Totality: total
Visibility: export
+

Text.Molfile.SDF

(source)

Definitions

0IsHeader : String->Type
Totality: total
Visibility: public export
recordSDHeader : Type
  Header of a SDF data entry. This is put in angles (`<>`) in an SD file.

Totality: total
Visibility: public export
Constructor: 
SDH : (value : String) -> {auto0_ : IsHeadervalue} ->SDHeader

Projections:
0.prf : ({rec:0} : SDHeader) ->IsHeader (value{rec:0})
.value : SDHeader->String

Hints:
EqSDHeader
InterpolationSDHeader
OrdSDHeader
ShowSDHeader
.value : SDHeader->String
Totality: total
Visibility: public export
value : SDHeader->String
Totality: total
Visibility: public export
0.prf : ({rec:0} : SDHeader) ->IsHeader (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : SDHeader) ->IsHeader (value{rec:0})
Totality: total
Visibility: public export
encodeHeader : String->MaybeSDHeader
  Encodes a value header by replacing spaces with underscores and
dropping some other invalid characters such as angles.

Totality: total
Visibility: export
0IsValue : String->Type
Totality: total
Visibility: public export
recordSDValue : Type
  Value of an SDF data entry. This follows after the header (see
`SDHeader`) and may span across several lines, each of which must not
be longer than 200 characters.

Totality: total
Visibility: public export
Constructor: 
SDV : (value : String) -> {auto0_ : IsValuevalue} ->SDValue

Projections:
0.prf : ({rec:0} : SDValue) ->IsValue (value{rec:0})
.value : SDValue->String

Hints:
EqSDValue
InterpolationSDValue
OrdSDValue
ShowSDValue
.value : SDValue->String
Totality: total
Visibility: public export
value : SDValue->String
Totality: total
Visibility: public export
0.prf : ({rec:0} : SDValue) ->IsValue (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : SDValue) ->IsValue (value{rec:0})
Totality: total
Visibility: public export
recordStructureData : Type
  A data entry in an SD file consisting of the data header and value.

Totality: total
Visibility: public export
Constructor: 
SD : SDHeader->SDValue->StructureData

Projections:
.header : StructureData->SDHeader
.value : StructureData->SDValue

Hints:
EqStructureData
ShowStructureData
.header : StructureData->SDHeader
Totality: total
Visibility: public export
header : StructureData->SDHeader
Totality: total
Visibility: public export
.value : StructureData->SDValue
Totality: total
Visibility: public export
value : StructureData->SDValue
Totality: total
Visibility: public export
encodeStructureData : String->String->MaybeStructureData
  Tries to convert a name-value pair to a piece of
SD-data.

While the values is refined as it is, we try to encode the
header in such a way that it does not contain any invalid
characters.

Totality: total
Visibility: export
recordSDFile' : Type->Type->Type->Type
  A single structure in an SD file consisting of a mol-file entry followed
by an arbitrary number of data entries.

Totality: total
Visibility: public export
Constructor: 
SDF : Molfile'htc->ListStructureData->SDFile'htc

Projections:
.dat : SDFile'htc->ListStructureData
.mol : SDFile'htc->Molfile'htc

Hints:
Eqh=>Eqt=>Eqc=>Eq (SDFile'htc)
Showh=>Showt=>Showc=>Show (SDFile'htc)
.mol : SDFile'htc->Molfile'htc
Totality: total
Visibility: public export
mol : SDFile'htc->Molfile'htc
Totality: total
Visibility: public export
.dat : SDFile'htc->ListStructureData
Totality: total
Visibility: public export
dat : SDFile'htc->ListStructureData
Totality: total
Visibility: public export
0SDFile : Type
Totality: total
Visibility: public export
0SDFileAT : Type
Totality: total
Visibility: public export
sdfDelimiter : String
Totality: total
Visibility: export
writeSDF : List (SDFile'htc) ->String
Totality: total
Visibility: export
readSDF : HasMolParseErres=>String->ChemReses (ListSDFile)
  Reads the SD file entries from a string.

Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Text.Molfile.Types.html b/docs/chem/docs/docs/Text.Molfile.Types.html index 69349b168..98ee5cad6 100644 --- a/docs/chem/docs/docs/Text.Molfile.Types.html +++ b/docs/chem/docs/docs/Text.Molfile.Types.html @@ -63,4 +63,4 @@

Text.Molfile.Types

(source)
Some of the refined types in here should probably
 go to their own dedicated module
-

Reexports

importpublic Data.Refined.String
importpublic Data.Refined.Integer
importpublic Chem
importpublic Data.Nat
importpublic Data.String
importpublic Data.Vect

Definitions

0IsMolLine : String->Type
Totality: total
Visibility: public export
recordMolLine : Type
  An uninterpreted line in a v2000 mol file

Totality: total
Visibility: public export
Constructor: 
MkMolLine : (value : String) -> {auto0_ : IsMolLinevalue} ->MolLine

Projections:
0.prf : ({rec:0} : MolLine) ->IsMolLine (value{rec:0})
.value : MolLine->String

Hints:
EqMolLine
InterpolationMolLine
OrdMolLine
ShowMolLine
.value : MolLine->String
Totality: total
Visibility: public export
value : MolLine->String
Totality: total
Visibility: public export
0.prf : ({rec:0} : MolLine) ->IsMolLine (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : MolLine) ->IsMolLine (value{rec:0})
Totality: total
Visibility: public export
dataMolVersion : Type
Totality: total
Visibility: public export
Constructors:
V2000 : MolVersion
V3000 : MolVersion

Hints:
EqMolVersion
InterpolationMolVersion
OrdMolVersion
ShowMolVersion
dataChiralFlag : Type
Totality: total
Visibility: public export
Constructors:
NonChiral : ChiralFlag
Chiral : ChiralFlag

Hints:
EqChiralFlag
InterpolationChiralFlag
OrdChiralFlag
ShowChiralFlag
recordCounts : Type
Totality: total
Visibility: public export
Constructor: 
MkCounts : Nat->Nat->ChiralFlag->MolVersion->Counts

Projections:
.atoms : Counts->Nat
.bonds : Counts->Nat
.chiral : Counts->ChiralFlag
.version : Counts->MolVersion

Hints:
EqCounts
ShowCounts
.atoms : Counts->Nat
Totality: total
Visibility: public export
atoms : Counts->Nat
Totality: total
Visibility: public export
.bonds : Counts->Nat
Totality: total
Visibility: public export
bonds : Counts->Nat
Totality: total
Visibility: public export
.chiral : Counts->ChiralFlag
Totality: total
Visibility: public export
chiral : Counts->ChiralFlag
Totality: total
Visibility: public export
.version : Counts->MolVersion
Totality: total
Visibility: public export
version : Counts->MolVersion
Totality: total
Visibility: public export
dataAtomSymbol : Type
  Ast    -> Asterisk
RSharp -> R# (RGroupLabel)

Totality: total
Visibility: public export
Constructors:
L : AtomSymbol
A : AtomSymbol
Q : AtomSymbol
Ast : AtomSymbol
LP : AtomSymbol
RSharp : AtomSymbol
El : Elem->AtomSymbol

Hints:
CastElemAtomSymbol
EqAtomSymbol
InterpolationAtomSymbol
ShowAtomSymbol
dataStereoParity : Type
  Atom Stereo parity encoded in V2000 CTAB

Totality: total
Visibility: public export
Constructors:
NoStereo : StereoParity
OddStereo : StereoParity
EvenStereo : StereoParity
AnyStereo : StereoParity

Hints:
EqStereoParity
InterpolationStereoParity
OrdStereoParity
ShowStereoParity
dataStereoCareBox : Type
  Stereo care box encoded in V2000

Totality: total
Visibility: public export
Constructors:
IgnoreStereo : StereoCareBox
MatchStereo : StereoCareBox

Hints:
EqStereoCareBox
InterpolationStereoCareBox
OrdStereoCareBox
ShowStereoCareBox
recordValence : Type
  Valence of atoms

NOTE: In a V2000 molfile 15 is zero valence,
while 0 means no marking

Totality: total
Visibility: public export
Constructor: 
MkValence : (value : Bits8) -> {auto0_ : value<=15} ->Valence

Projections:
0.prf : ({rec:0} : Valence) ->value{rec:0}<=15
.value : Valence->Bits8

Hints:
EqValence
InterpolationValence
OrdValence
ShowValence
.value : Valence->Bits8
Totality: total
Visibility: public export
value : Valence->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : Valence) ->value{rec:0}<=15
Totality: total
Visibility: public export
0prf : ({rec:0} : Valence) ->value{rec:0}<=15
Totality: total
Visibility: public export
dataH0Designator : Type
  Reduntant hydrogen count flag

Totality: total
Visibility: public export
Constructors:
H0NotSpecified : H0Designator
NoHAllowed : H0Designator

Hints:
EqH0Designator
InterpolationH0Designator
OrdH0Designator
ShowH0Designator
recordHydrogenCount : Type
  HCount plus 1: 0 means "not explicitly given"
1 means "explicitly 0" and so on.

Totality: total
Visibility: public export
Constructor: 
MkHC : (value : Bits8) -> {auto0_ : value<=5} ->HydrogenCount

Projections:
0.prf : ({rec:0} : HydrogenCount) ->value{rec:0}<=5
.value : HydrogenCount->Bits8

Hints:
EqHydrogenCount
InterpolationHydrogenCount
OrdHydrogenCount
ShowHydrogenCount
.value : HydrogenCount->Bits8
Totality: total
Visibility: public export
value : HydrogenCount->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : HydrogenCount) ->value{rec:0}<=5
Totality: total
Visibility: public export
0prf : ({rec:0} : HydrogenCount) ->value{rec:0}<=5
Totality: total
Visibility: public export
recordCoordinate : Type
  We encode coordinates as a sufficiently precise integer
to prevent loss of precision during parsing.

Totality: total
Visibility: public export
Constructor: 
MkCoordinate : (value : Integer) -> {auto0_ : FromTo-99999999999999999value} ->Coordinate

Projections:
0.prf : ({rec:0} : Coordinate) ->FromTo-99999999999999999 (value{rec:0})
.value : Coordinate->Integer

Hints:
CastCoordinateDouble
EqCoordinate
GetPoint (Vect3Coordinate)
InterpolationCoordinate
ModPoint (Vect3Coordinate)
OrdCoordinate
ShowCoordinate
.value : Coordinate->Integer
Totality: total
Visibility: public export
value : Coordinate->Integer
Totality: total
Visibility: public export
0.prf : ({rec:0} : Coordinate) ->FromTo-99999999999999999 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : Coordinate) ->FromTo-99999999999999999 (value{rec:0})
Totality: total
Visibility: public export
Precision : Integer
Totality: total
Visibility: public export
0Coordinates : Type
  Convenience alias for `Vect 3 Coordinates`

Totality: total
Visibility: public export
recordAtomGroup : Type
Totality: total
Visibility: public export
Constructor: 
G : Nat->String->AtomGroup

Projections:
.lbl : AtomGroup->String
.nr : AtomGroup->Nat

Hints:
EqAtomGroup
ShowAtomGroup
.nr : AtomGroup->Nat
Totality: total
Visibility: public export
nr : AtomGroup->Nat
Totality: total
Visibility: public export
.lbl : AtomGroup->String
Totality: total
Visibility: public export
lbl : AtomGroup->String
Totality: total
Visibility: public export
0MolAtom' : Type->Type->Type->Type
  Regular atom loaded from a .mol file.

Note: .mol files support additional atom symbols
(for instance, for queries), but for real-world molecules,
this is the type to use.

The type parameters are used for implicit hydrogens and atom types,
which are `()` for freshly loaded `MolAtom`s but more specific after
atom type perception.

Totality: total
Visibility: public export
0MolAtom : Type
  Regular atom loaded from a .mol file.

Note: .mol files support additional atom symbols
(for instance, for queries), but for real-world molecules,
this is the type to use.

Totality: total
Visibility: public export
0MolAtomAT : Type
  .mol-file atom with perceived atom type and computed
implicit hydrogen count

Totality: total
Visibility: public export
dataQueryBondType : Type
Totality: total
Visibility: public export
Constructors:
BT : BondOrder->QueryBondType
Arom : QueryBondType
SngOrDbl : QueryBondType
SngOrAromatic : QueryBondType
DblOrAromatic : QueryBondType
AnyBond : QueryBondType

Hints:
EqQueryBondType
InterpolationQueryBondType
OrdQueryBondType
ShowQueryBondType
dataBondStereo : Type
  Stereoinformation represented in molfiles

Totality: total
Visibility: public export
Constructors:
NoBondStereo : BondStereo
Up : BondStereo
CisOrTrans : BondStereo
UpOrDown : BondStereo
Down : BondStereo

Hints:
CastMolBondBondStereo
CastBondStereoMolBond
EqBondStereo
InterpolationBondStereo
OrdBondStereo
ShowBondStereo
dataBondTopo : Type
  Bond topology encoded in CTAB V2000

Totality: total
Visibility: public export
Constructors:
AnyTopology : BondTopo
Ring : BondTopo
Chain : BondTopo

Hints:
EqBondTopo
InterpolationBondTopo
OrdBondTopo
ShowBondTopo
recordMolBond : Type
Totality: total
Visibility: public export
Constructor: 
MkBond : Bool->BondOrder->BondStereo->MolBond

Projections:
.firstSmaller : MolBond->Bool
  Flag indicating whether the bond goes from the
atom with the smaller index to the one with the larger index
or vice versa.

We need this to figure out in which direction wedged bonds should
point.
.stereo : MolBond->BondStereo
.type : MolBond->BondOrder

Hints:
CastMolBondBondOrder
CastBondOrderMolBond
CastMolBondBondStereo
CastBondStereoMolBond
EqMolBond
ShowMolBond
.firstSmaller : MolBond->Bool
  Flag indicating whether the bond goes from the
atom with the smaller index to the one with the larger index
or vice versa.

We need this to figure out in which direction wedged bonds should
point.

Totality: total
Visibility: public export
firstSmaller : MolBond->Bool
  Flag indicating whether the bond goes from the
atom with the smaller index to the one with the larger index
or vice versa.

We need this to figure out in which direction wedged bonds should
point.

Totality: total
Visibility: public export
.type : MolBond->BondOrder
Totality: total
Visibility: public export
type : MolBond->BondOrder
Totality: total
Visibility: public export
.stereo : MolBond->BondStereo
Totality: total
Visibility: public export
stereo : MolBond->BondStereo
Totality: total
Visibility: public export
dataSGroupType : Type
Totality: total
Visibility: public export
Constructors:
SUP : SGroupType
Other : SGroupType

Hints:
EqSGroupType
ShowSGroupType
0MolGraph' : Type->Type->Type->Type
Totality: total
Visibility: public export
0MolGraph : Type
Totality: total
Visibility: public export
0MolGraphAT : Type
  .mol-file graph with perceived atom types and computed
implicit hydrogen counts

Totality: total
Visibility: public export
recordMolfile' : Type->Type->Type->Type
Totality: total
Visibility: public export
Constructor: 
MkMolfile : MolLine->MolLine->MolLine->MolGraph'htc->Molfile'htc

Projections:
.comment : Molfile'htc->MolLine
.graph : Molfile'htc->MolGraph'htc
.info : Molfile'htc->MolLine
.name : Molfile'htc->MolLine

Hints:
Eqh=>Eqt=>Eqc=>Eq (Molfile'htc)
Showh=>Showt=>Showc=>Show (Molfile'htc)
.name : Molfile'htc->MolLine
Totality: total
Visibility: public export
name : Molfile'htc->MolLine
Totality: total
Visibility: public export
.info : Molfile'htc->MolLine
Totality: total
Visibility: public export
info : Molfile'htc->MolLine
Totality: total
Visibility: public export
.comment : Molfile'htc->MolLine
Totality: total
Visibility: public export
comment : Molfile'htc->MolLine
Totality: total
Visibility: public export
.graph : Molfile'htc->MolGraph'htc
Totality: total
Visibility: public export
graph : Molfile'htc->MolGraph'htc
Totality: total
Visibility: public export
emptyMolFile : Molfile'htc
Totality: total
Visibility: export
0Molfile : Type
Totality: total
Visibility: public export
0MolfileAT : Type
Totality: total
Visibility: public export
+

Reexports

importpublic Data.Refined.String
importpublic Data.Refined.Integer
importpublic Chem
importpublic Data.Nat
importpublic Data.String
importpublic Data.Vect

Definitions

0IsMolLine : String->Type
Totality: total
Visibility: public export
recordMolLine : Type
  An uninterpreted line in a v2000 mol file

Totality: total
Visibility: public export
Constructor: 
MkMolLine : (value : String) -> {auto0_ : IsMolLinevalue} ->MolLine

Projections:
0.prf : ({rec:0} : MolLine) ->IsMolLine (value{rec:0})
.value : MolLine->String

Hints:
EqMolLine
InterpolationMolLine
OrdMolLine
ShowMolLine
.value : MolLine->String
Totality: total
Visibility: public export
value : MolLine->String
Totality: total
Visibility: public export
0.prf : ({rec:0} : MolLine) ->IsMolLine (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : MolLine) ->IsMolLine (value{rec:0})
Totality: total
Visibility: public export
dataMolVersion : Type
Totality: total
Visibility: public export
Constructors:
V2000 : MolVersion
V3000 : MolVersion

Hints:
EqMolVersion
InterpolationMolVersion
OrdMolVersion
ShowMolVersion
dataChiralFlag : Type
Totality: total
Visibility: public export
Constructors:
NonChiral : ChiralFlag
Chiral : ChiralFlag

Hints:
EqChiralFlag
InterpolationChiralFlag
OrdChiralFlag
ShowChiralFlag
recordCounts : Type
Totality: total
Visibility: public export
Constructor: 
MkCounts : Nat->Nat->ChiralFlag->MolVersion->Counts

Projections:
.atoms : Counts->Nat
.bonds : Counts->Nat
.chiral : Counts->ChiralFlag
.version : Counts->MolVersion

Hints:
EqCounts
ShowCounts
.atoms : Counts->Nat
Totality: total
Visibility: public export
atoms : Counts->Nat
Totality: total
Visibility: public export
.bonds : Counts->Nat
Totality: total
Visibility: public export
bonds : Counts->Nat
Totality: total
Visibility: public export
.chiral : Counts->ChiralFlag
Totality: total
Visibility: public export
chiral : Counts->ChiralFlag
Totality: total
Visibility: public export
.version : Counts->MolVersion
Totality: total
Visibility: public export
version : Counts->MolVersion
Totality: total
Visibility: public export
dataAtomSymbol : Type
  Ast    -> Asterisk
RSharp -> R# (RGroupLabel)

Totality: total
Visibility: public export
Constructors:
L : AtomSymbol
A : AtomSymbol
Q : AtomSymbol
Ast : AtomSymbol
LP : AtomSymbol
RSharp : AtomSymbol
El : Elem->AtomSymbol

Hints:
CastElemAtomSymbol
EqAtomSymbol
InterpolationAtomSymbol
ShowAtomSymbol
dataStereoParity : Type
  Atom Stereo parity encoded in V2000 CTAB

Totality: total
Visibility: public export
Constructors:
NoStereo : StereoParity
OddStereo : StereoParity
EvenStereo : StereoParity
AnyStereo : StereoParity

Hints:
EqStereoParity
InterpolationStereoParity
OrdStereoParity
ShowStereoParity
dataStereoCareBox : Type
  Stereo care box encoded in V2000

Totality: total
Visibility: public export
Constructors:
IgnoreStereo : StereoCareBox
MatchStereo : StereoCareBox

Hints:
EqStereoCareBox
InterpolationStereoCareBox
OrdStereoCareBox
ShowStereoCareBox
recordValence : Type
  Valence of atoms

NOTE: In a V2000 molfile 15 is zero valence,
while 0 means no marking

Totality: total
Visibility: public export
Constructor: 
MkValence : (value : Bits8) -> {auto0_ : value<=15} ->Valence

Projections:
0.prf : ({rec:0} : Valence) ->value{rec:0}<=15
.value : Valence->Bits8

Hints:
EqValence
InterpolationValence
OrdValence
ShowValence
.value : Valence->Bits8
Totality: total
Visibility: public export
value : Valence->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : Valence) ->value{rec:0}<=15
Totality: total
Visibility: public export
0prf : ({rec:0} : Valence) ->value{rec:0}<=15
Totality: total
Visibility: public export
dataH0Designator : Type
  Reduntant hydrogen count flag

Totality: total
Visibility: public export
Constructors:
H0NotSpecified : H0Designator
NoHAllowed : H0Designator

Hints:
EqH0Designator
InterpolationH0Designator
OrdH0Designator
ShowH0Designator
recordHydrogenCount : Type
  HCount plus 1: 0 means "not explicitly given"
1 means "explicitly 0" and so on.

Totality: total
Visibility: public export
Constructor: 
MkHC : (value : Bits8) -> {auto0_ : value<=5} ->HydrogenCount

Projections:
0.prf : ({rec:0} : HydrogenCount) ->value{rec:0}<=5
.value : HydrogenCount->Bits8

Hints:
EqHydrogenCount
InterpolationHydrogenCount
OrdHydrogenCount
ShowHydrogenCount
.value : HydrogenCount->Bits8
Totality: total
Visibility: public export
value : HydrogenCount->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : HydrogenCount) ->value{rec:0}<=5
Totality: total
Visibility: public export
0prf : ({rec:0} : HydrogenCount) ->value{rec:0}<=5
Totality: total
Visibility: public export
recordCoordinate : Type
  We encode coordinates as a sufficiently precise integer
to prevent loss of precision during parsing.

Totality: total
Visibility: public export
Constructor: 
MkCoordinate : (value : Integer) -> {auto0_ : FromTo-99999999999999999value} ->Coordinate

Projections:
0.prf : ({rec:0} : Coordinate) ->FromTo-99999999999999999 (value{rec:0})
.value : Coordinate->Integer

Hints:
CastCoordinateDouble
EqCoordinate
GetPoint (Vect3Coordinate)
InterpolationCoordinate
ModPoint (Vect3Coordinate)
OrdCoordinate
ShowCoordinate
.value : Coordinate->Integer
Totality: total
Visibility: public export
value : Coordinate->Integer
Totality: total
Visibility: public export
0.prf : ({rec:0} : Coordinate) ->FromTo-99999999999999999 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : Coordinate) ->FromTo-99999999999999999 (value{rec:0})
Totality: total
Visibility: public export
Precision : Integer
Totality: total
Visibility: public export
0Coordinates : Type
  Convenience alias for `Vect 3 Coordinates`

Totality: total
Visibility: public export
recordAtomGroup : Type
Totality: total
Visibility: public export
Constructor: 
G : Nat->String->AtomGroup

Projections:
.lbl : AtomGroup->String
.nr : AtomGroup->Nat

Hints:
EqAtomGroup
ShowAtomGroup
.nr : AtomGroup->Nat
Totality: total
Visibility: public export
nr : AtomGroup->Nat
Totality: total
Visibility: public export
.lbl : AtomGroup->String
Totality: total
Visibility: public export
lbl : AtomGroup->String
Totality: total
Visibility: public export
0MolAtom' : Type->Type->Type->Type
  Regular atom loaded from a .mol file.

Note: .mol files support additional atom symbols
(for instance, for queries), but for real-world molecules,
this is the type to use.

The type parameters are used for implicit hydrogens and atom types,
which are `()` for freshly loaded `MolAtom`s but more specific after
atom type perception.

Totality: total
Visibility: public export
0MolAtom : Type
  Regular atom loaded from a .mol file.

Note: .mol files support additional atom symbols
(for instance, for queries), but for real-world molecules,
this is the type to use.

Totality: total
Visibility: public export
0MolAtomAT : Type
  .mol-file atom with perceived atom type and computed
implicit hydrogen count

Totality: total
Visibility: public export
dataQueryBondType : Type
Totality: total
Visibility: public export
Constructors:
BT : BondOrder->QueryBondType
Arom : QueryBondType
SngOrDbl : QueryBondType
SngOrAromatic : QueryBondType
DblOrAromatic : QueryBondType
AnyBond : QueryBondType

Hints:
EqQueryBondType
InterpolationQueryBondType
OrdQueryBondType
ShowQueryBondType
dataBondStereo : Type
  Stereoinformation represented in molfiles

Totality: total
Visibility: public export
Constructors:
NoBondStereo : BondStereo
Up : BondStereo
CisOrTrans : BondStereo
UpOrDown : BondStereo
Down : BondStereo

Hints:
CastMolBondBondStereo
CastBondStereoMolBond
EqBondStereo
InterpolationBondStereo
OrdBondStereo
ShowBondStereo
dataBondTopo : Type
  Bond topology encoded in CTAB V2000

Totality: total
Visibility: public export
Constructors:
AnyTopology : BondTopo
Ring : BondTopo
Chain : BondTopo

Hints:
EqBondTopo
InterpolationBondTopo
OrdBondTopo
ShowBondTopo
recordMolBond : Type
Totality: total
Visibility: public export
Constructor: 
MkBond : Bool->BondOrder->BondStereo->MolBond

Projections:
.firstSmaller : MolBond->Bool
  Flag indicating whether the bond goes from the
atom with the smaller index to the one with the larger index
or vice versa.

We need this to figure out in which direction wedged bonds should
point.
.stereo : MolBond->BondStereo
.type : MolBond->BondOrder

Hints:
CastMolBondBondOrder
CastBondOrderMolBond
CastMolBondBondStereo
CastBondStereoMolBond
EqMolBond
ShowMolBond
.firstSmaller : MolBond->Bool
  Flag indicating whether the bond goes from the
atom with the smaller index to the one with the larger index
or vice versa.

We need this to figure out in which direction wedged bonds should
point.

Totality: total
Visibility: public export
firstSmaller : MolBond->Bool
  Flag indicating whether the bond goes from the
atom with the smaller index to the one with the larger index
or vice versa.

We need this to figure out in which direction wedged bonds should
point.

Totality: total
Visibility: public export
.type : MolBond->BondOrder
Totality: total
Visibility: public export
type : MolBond->BondOrder
Totality: total
Visibility: public export
.stereo : MolBond->BondStereo
Totality: total
Visibility: public export
stereo : MolBond->BondStereo
Totality: total
Visibility: public export
dataSGroupType : Type
Totality: total
Visibility: public export
Constructors:
SUP : SGroupType
Other : SGroupType

Hints:
EqSGroupType
ShowSGroupType
0MolGraph' : Type->Type->Type->Type
Totality: total
Visibility: public export
0MolGraph : Type
Totality: total
Visibility: public export
0MolGraphAT : Type
  .mol-file graph with perceived atom types and computed
implicit hydrogen counts

Totality: total
Visibility: public export
recordMolfile' : Type->Type->Type->Type
Totality: total
Visibility: public export
Constructor: 
MkMolfile : MolLine->MolLine->MolLine->MolGraph'htc->Molfile'htc

Projections:
.comment : Molfile'htc->MolLine
.graph : Molfile'htc->MolGraph'htc
.info : Molfile'htc->MolLine
.name : Molfile'htc->MolLine

Hints:
Eqh=>Eqt=>Eqc=>Eq (Molfile'htc)
Showh=>Showt=>Showc=>Show (Molfile'htc)
.name : Molfile'htc->MolLine
Totality: total
Visibility: public export
name : Molfile'htc->MolLine
Totality: total
Visibility: public export
.info : Molfile'htc->MolLine
Totality: total
Visibility: public export
info : Molfile'htc->MolLine
Totality: total
Visibility: public export
.comment : Molfile'htc->MolLine
Totality: total
Visibility: public export
comment : Molfile'htc->MolLine
Totality: total
Visibility: public export
.graph : Molfile'htc->MolGraph'htc
Totality: total
Visibility: public export
graph : Molfile'htc->MolGraph'htc
Totality: total
Visibility: public export
emptyMolFile : Molfile'htc
Totality: total
Visibility: export
0Molfile : Type
Totality: total
Visibility: public export
0MolfileAT : Type
Totality: total
Visibility: public export
diff --git a/docs/chem/docs/docs/Text.Smiles.Lexer.html b/docs/chem/docs/docs/Text.Smiles.Lexer.html index d0c4f8255..a8016db9f 100644 --- a/docs/chem/docs/docs/Text.Smiles.Lexer.html +++ b/docs/chem/docs/docs/Text.Smiles.Lexer.html @@ -61,4 +61,4 @@ -

Text.Smiles.Lexer

(source)

Definitions

dataSmilesErr : Type
Totality: total
Visibility: public export
Constructors:
ExpectedAtom : SmilesErr
ExpectedAtomOrRing : SmilesErr
ExpectedAtomOrBond : SmilesErr
EmptyParen : SmilesErr
UnexpectedRing : SmilesErr
RingBondMismatch : SmilesErr
UnclosedRing : SmilesErr

Hints:
EqSmilesErr
InterpolationSmilesErr
ShowSmilesErr
recordRing : Type
Totality: total
Visibility: public export
Constructor: 
R : RingNr->MaybeSmilesBond->Ring

Projections:
.bond : Ring->MaybeSmilesBond
.ring : Ring->RingNr

Hints:
EqRing
InterpolationRing
ShowRing
.ring : Ring->RingNr
Totality: total
Visibility: public export
ring : Ring->RingNr
Totality: total
Visibility: public export
.bond : Ring->MaybeSmilesBond
Totality: total
Visibility: public export
bond : Ring->MaybeSmilesBond
Totality: total
Visibility: public export
rnChars : RingNr->Nat
Totality: total
Visibility: export
ringChars : Ring->Nat
Totality: total
Visibility: export
dataSmilesToken : Type
Totality: total
Visibility: public export
Constructors:
PO : SmilesToken
PC : SmilesToken
Dot : SmilesToken
TB : SmilesBond->SmilesToken
TA : SmilesAtom->SnocListRing->SmilesToken

Hints:
EqSmilesToken
InterpolationSmilesToken
ShowSmilesToken
0LexErr : Type
Totality: total
Visibility: public export
0Err : Type
Totality: total
Visibility: public export
ringBounds : Nat->RingNr->Bounds
Totality: total
Visibility: export
bounds : SmilesToken->Nat->Bounds
Totality: total
Visibility: export
bracket : AutoTokeSmilesAtom
Totality: total
Visibility: export
lexSmiles : String->Either (BoundedLexErr) (List (SmilesToken, Nat))
Totality: total
Visibility: export
+

Text.Smiles.Lexer

(source)

Definitions

dataSmilesErr : Type
Totality: total
Visibility: public export
Constructors:
ExpectedAtom : SmilesErr
ExpectedAtomOrRing : SmilesErr
ExpectedAtomOrBond : SmilesErr
EmptyParen : SmilesErr
UnexpectedRing : SmilesErr
RingBondMismatch : SmilesErr
UnclosedRing : SmilesErr

Hints:
EqSmilesErr
InterpolationSmilesErr
ShowSmilesErr
recordRing : Type
Totality: total
Visibility: public export
Constructor: 
R : RingNr->MaybeSmilesBond->Ring

Projections:
.bond : Ring->MaybeSmilesBond
.ring : Ring->RingNr

Hints:
EqRing
InterpolationRing
ShowRing
.ring : Ring->RingNr
Totality: total
Visibility: public export
ring : Ring->RingNr
Totality: total
Visibility: public export
.bond : Ring->MaybeSmilesBond
Totality: total
Visibility: public export
bond : Ring->MaybeSmilesBond
Totality: total
Visibility: public export
rnChars : RingNr->Nat
Totality: total
Visibility: export
ringChars : Ring->Nat
Totality: total
Visibility: export
dataSmilesToken : Type
Totality: total
Visibility: public export
Constructors:
PO : SmilesToken
PC : SmilesToken
Dot : SmilesToken
TB : SmilesBond->SmilesToken
TA : SmilesAtom->SnocListRing->SmilesToken

Hints:
EqSmilesToken
InterpolationSmilesToken
ShowSmilesToken
0LexErr : Type
Totality: total
Visibility: public export
0Err : Type
Totality: total
Visibility: public export
ringBounds : Nat->RingNr->Bounds
Totality: total
Visibility: export
bounds : SmilesToken->Nat->Bounds
Totality: total
Visibility: export
bracket : AutoTokeSmilesAtom
Totality: total
Visibility: export
lexSmiles : String->Either (BoundedLexErr) (List (SmilesToken, Nat))
Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Text.Smiles.Parser.html b/docs/chem/docs/docs/Text.Smiles.Parser.html index 319284957..7c3de672f 100644 --- a/docs/chem/docs/docs/Text.Smiles.Parser.html +++ b/docs/chem/docs/docs/Text.Smiles.Parser.html @@ -61,4 +61,4 @@ -

Text.Smiles.Parser

(source)

Definitions

recordSmilesParseErr : Type
Totality: total
Visibility: public export
Constructor: 
SPE : String->FileContext->Err->SmilesParseErr

Projections:
.context : SmilesParseErr->FileContext
.error : SmilesParseErr->Err
.smiles : SmilesParseErr->String

Hints:
EqSmilesParseErr
InterpolationSmilesParseErr
ShowSmilesParseErr
.smiles : SmilesParseErr->String
Totality: total
Visibility: public export
smiles : SmilesParseErr->String
Totality: total
Visibility: public export
.context : SmilesParseErr->FileContext
Totality: total
Visibility: public export
context : SmilesParseErr->FileContext
Totality: total
Visibility: public export
.error : SmilesParseErr->Err
Totality: total
Visibility: public export
error : SmilesParseErr->Err
Totality: total
Visibility: public export
fromBounded : String->Origin->BoundedErr->SmilesParseErr
Totality: total
Visibility: export
readSmilesFrom : HasSmilesParseErres=>Origin->String->ChemResesSmilesGraph
Totality: total
Visibility: export
readSmiles : HasSmilesParseErres=>String->ChemResesSmilesGraph
Totality: total
Visibility: export
readSmiles' : String->EitherStringSmilesGraph
  This is a convenience alias `readSmiles`, which can be used
to quickly come up with fairly complex molecular graphs.

All errors are converted to pretty printed error messages.

Totality: total
Visibility: export
+

Text.Smiles.Parser

(source)

Definitions

recordSmilesParseErr : Type
Totality: total
Visibility: public export
Constructor: 
SPE : String->FileContext->Err->SmilesParseErr

Projections:
.context : SmilesParseErr->FileContext
.error : SmilesParseErr->Err
.smiles : SmilesParseErr->String

Hints:
EqSmilesParseErr
InterpolationSmilesParseErr
ShowSmilesParseErr
.smiles : SmilesParseErr->String
Totality: total
Visibility: public export
smiles : SmilesParseErr->String
Totality: total
Visibility: public export
.context : SmilesParseErr->FileContext
Totality: total
Visibility: public export
context : SmilesParseErr->FileContext
Totality: total
Visibility: public export
.error : SmilesParseErr->Err
Totality: total
Visibility: public export
error : SmilesParseErr->Err
Totality: total
Visibility: public export
fromBounded : String->Origin->BoundedErr->SmilesParseErr
Totality: total
Visibility: export
readSmilesFrom : HasSmilesParseErres=>Origin->String->ChemResesSmilesGraph
Totality: total
Visibility: export
readSmiles : HasSmilesParseErres=>String->ChemResesSmilesGraph
Totality: total
Visibility: export
readSmiles' : String->EitherStringSmilesGraph
  This is a convenience alias `readSmiles`, which can be used
to quickly come up with fairly complex molecular graphs.

All errors are converted to pretty printed error messages.

Totality: total
Visibility: export
diff --git a/docs/chem/docs/docs/Text.Smiles.Types.html b/docs/chem/docs/docs/Text.Smiles.Types.html index 4e6f55d55..431497476 100644 --- a/docs/chem/docs/docs/Text.Smiles.Types.html +++ b/docs/chem/docs/docs/Text.Smiles.Types.html @@ -61,4 +61,4 @@ -

Text.Smiles.Types

(source)

Definitions

recordTBIx : Type
  Index for tetrahedral chirality flags as given in the
OpenSMILES specification

Totality: total
Visibility: public export
Constructor: 
MkTBIx : (value : Bits8) -> {auto0_ : FromTo120value} ->TBIx

Projections:
0.prf : ({rec:0} : TBIx) ->FromTo120 (value{rec:0})
.value : TBIx->Bits8

Hints:
EqTBIx
InterpolationTBIx
OrdTBIx
ShowTBIx
.value : TBIx->Bits8
Totality: total
Visibility: public export
value : TBIx->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : TBIx) ->FromTo120 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : TBIx) ->FromTo120 (value{rec:0})
Totality: total
Visibility: public export
recordOHIx : Type
  Index for octahedral chirality flags as given in the
OpenSMILES specification

Totality: total
Visibility: public export
Constructor: 
MkOHIx : (value : Bits8) -> {auto0_ : FromTo120value} ->OHIx

Projections:
0.prf : ({rec:0} : OHIx) ->FromTo120 (value{rec:0})
.value : OHIx->Bits8

Hints:
EqOHIx
InterpolationOHIx
OrdOHIx
ShowOHIx
.value : OHIx->Bits8
Totality: total
Visibility: public export
value : OHIx->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : OHIx) ->FromTo120 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : OHIx) ->FromTo120 (value{rec:0})
Totality: total
Visibility: public export
dataChirality : Type
  Chirality flag of a bracket atom

Totality: total
Visibility: public export
Constructors:
None : Chirality
CW : Chirality
CCW : Chirality
TH1 : Chirality
TH2 : Chirality
AL1 : Chirality
AL2 : Chirality
SP1 : Chirality
SP2 : Chirality
SP3 : Chirality
TB : TBIx->Chirality
OH : OHIx->Chirality

Hints:
EqChirality
InterpolationChirality
OrdChirality
ShowChirality
dataValidSubset : Elem->Bool->Type
  Proof that an element (plus aromaticity flag) is a valid subset
element that can appear without being wrapped in a pair of
brackets.

Totality: total
Visibility: public export
Constructors:
VB : ValidSubsetBb
VC : ValidSubsetCb
VN : ValidSubsetNb
VO : ValidSubsetOb
VF : ValidSubsetFFalse
VP : ValidSubsetPb
VS : ValidSubsetSb
VCl : ValidSubsetClFalse
VBr : ValidSubsetBrFalse
VI : ValidSubsetIFalse

Hint: 
ValidSubseteb=>ValidAromaticeb
0toValidArom : ValidSubseteb=>ValidAromaticeb
Totality: total
Visibility: export
dataSmilesAtom : Type
Totality: total
Visibility: public export
Constructors:
SubsetAtom : (elem : Elem) -> (arom : Bool) -> {auto0_ : ValidSubsetelemarom} ->SmilesAtom
Bracket : AtomAromIsotopeCharge () () HCount () Chirality () ->SmilesAtom

Hints:
CastSmilesAtomElem
CastSmilesAtomIsotope
CastSmilesAtomAromIsotope
CastSmilesAtomAromElem
EqSmilesAtom
InterpolationSmilesAtom
ShowSmilesAtom
bracket : AromIsotope->Chirality->HCount->Charge->SmilesAtom
Totality: total
Visibility: export
isArom : SmilesAtom->Bool
Totality: total
Visibility: export
recordRingNr : Type
  An natural number in the range [0,99] representing a ring opening
or -closure in a SMILES string

Totality: total
Visibility: public export
Constructor: 
MkRingNr : (value : Bits8) -> (0_ : value<=99) ->RingNr

Projections:
0.prf : ({rec:0} : RingNr) ->value{rec:0}<=99
.value : RingNr->Bits8

Hints:
EqRingNr
InterpolationRingNr
OrdRingNr
ShowRingNr
.value : RingNr->Bits8
Totality: total
Visibility: public export
value : RingNr->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : RingNr) ->value{rec:0}<=99
Totality: total
Visibility: public export
0prf : ({rec:0} : RingNr) ->value{rec:0}<=99
Totality: total
Visibility: public export
dataSmilesBond : Type
  A bond in a SMILES string

Totality: total
Visibility: public export
Constructors:
Sngl : SmilesBond
Arom : SmilesBond
Dbl : SmilesBond
Trpl : SmilesBond
Quad : SmilesBond
FW : SmilesBond
BW : SmilesBond

Hints:
CastSmilesBondBondOrder
EqSmilesBond
InterpolationSmilesBond
OrdSmilesBond
ShowSmilesBond
0SmilesGraph : Type
Totality: total
Visibility: public export
+

Text.Smiles.Types

(source)

Definitions

recordTBIx : Type
  Index for tetrahedral chirality flags as given in the
OpenSMILES specification

Totality: total
Visibility: public export
Constructor: 
MkTBIx : (value : Bits8) -> {auto0_ : FromTo120value} ->TBIx

Projections:
0.prf : ({rec:0} : TBIx) ->FromTo120 (value{rec:0})
.value : TBIx->Bits8

Hints:
EqTBIx
InterpolationTBIx
OrdTBIx
ShowTBIx
.value : TBIx->Bits8
Totality: total
Visibility: public export
value : TBIx->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : TBIx) ->FromTo120 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : TBIx) ->FromTo120 (value{rec:0})
Totality: total
Visibility: public export
recordOHIx : Type
  Index for octahedral chirality flags as given in the
OpenSMILES specification

Totality: total
Visibility: public export
Constructor: 
MkOHIx : (value : Bits8) -> {auto0_ : FromTo120value} ->OHIx

Projections:
0.prf : ({rec:0} : OHIx) ->FromTo120 (value{rec:0})
.value : OHIx->Bits8

Hints:
EqOHIx
InterpolationOHIx
OrdOHIx
ShowOHIx
.value : OHIx->Bits8
Totality: total
Visibility: public export
value : OHIx->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : OHIx) ->FromTo120 (value{rec:0})
Totality: total
Visibility: public export
0prf : ({rec:0} : OHIx) ->FromTo120 (value{rec:0})
Totality: total
Visibility: public export
dataChirality : Type
  Chirality flag of a bracket atom

Totality: total
Visibility: public export
Constructors:
None : Chirality
CW : Chirality
CCW : Chirality
TH1 : Chirality
TH2 : Chirality
AL1 : Chirality
AL2 : Chirality
SP1 : Chirality
SP2 : Chirality
SP3 : Chirality
TB : TBIx->Chirality
OH : OHIx->Chirality

Hints:
EqChirality
InterpolationChirality
OrdChirality
ShowChirality
dataValidSubset : Elem->Bool->Type
  Proof that an element (plus aromaticity flag) is a valid subset
element that can appear without being wrapped in a pair of
brackets.

Totality: total
Visibility: public export
Constructors:
VB : ValidSubsetBb
VC : ValidSubsetCb
VN : ValidSubsetNb
VO : ValidSubsetOb
VF : ValidSubsetFFalse
VP : ValidSubsetPb
VS : ValidSubsetSb
VCl : ValidSubsetClFalse
VBr : ValidSubsetBrFalse
VI : ValidSubsetIFalse

Hint: 
ValidSubseteb=>ValidAromaticeb
0toValidArom : ValidSubseteb=>ValidAromaticeb
Totality: total
Visibility: export
dataSmilesAtom : Type
Totality: total
Visibility: public export
Constructors:
SubsetAtom : (elem : Elem) -> (arom : Bool) -> {auto0_ : ValidSubsetelemarom} ->SmilesAtom
Bracket : AtomAromIsotopeCharge () () HCount () Chirality () ->SmilesAtom

Hints:
CastSmilesAtomElem
CastSmilesAtomIsotope
CastSmilesAtomAromIsotope
CastSmilesAtomAromElem
EqSmilesAtom
InterpolationSmilesAtom
ShowSmilesAtom
bracket : AromIsotope->Chirality->HCount->Charge->SmilesAtom
Totality: total
Visibility: export
isArom : SmilesAtom->Bool
Totality: total
Visibility: export
recordRingNr : Type
  An natural number in the range [0,99] representing a ring opening
or -closure in a SMILES string

Totality: total
Visibility: public export
Constructor: 
MkRingNr : (value : Bits8) -> (0_ : value<=99) ->RingNr

Projections:
0.prf : ({rec:0} : RingNr) ->value{rec:0}<=99
.value : RingNr->Bits8

Hints:
EqRingNr
InterpolationRingNr
OrdRingNr
ShowRingNr
.value : RingNr->Bits8
Totality: total
Visibility: public export
value : RingNr->Bits8
Totality: total
Visibility: public export
0.prf : ({rec:0} : RingNr) ->value{rec:0}<=99
Totality: total
Visibility: public export
0prf : ({rec:0} : RingNr) ->value{rec:0}<=99
Totality: total
Visibility: public export
dataSmilesBond : Type
  A bond in a SMILES string

Totality: total
Visibility: public export
Constructors:
Sngl : SmilesBond
Arom : SmilesBond
Dbl : SmilesBond
Trpl : SmilesBond
Quad : SmilesBond
FW : SmilesBond
BW : SmilesBond

Hints:
CastSmilesBondBondOrder
EqSmilesBond
InterpolationSmilesBond
OrdSmilesBond
ShowSmilesBond
0SmilesGraph : Type
Totality: total
Visibility: public export
diff --git a/docs/cptr/docs/docs/Data.C.Array.html b/docs/cptr/docs/docs/Data.C.Array.html index 0a3689854..f76276bcc 100644 --- a/docs/cptr/docs/docs/Data.C.Array.html +++ b/docs/cptr/docs/docs/Data.C.Array.html @@ -61,4 +61,4 @@ -

Data.C.Array

(source)

Reexports

importpublic Data.Fin
importpublic Data.Linear.Token
importpublic Data.Array.Index

Definitions

prim__malloc : Bits32->AnyPtr
prim__calloc : Bits32->Bits32->AnyPtr
prim__free : AnyPtr->PrimIO ()
prim__inc_ptr : AnyPtr->Bits32->AnyPtr
recordCIArray : Nat->Type->Type
  A wrapped pointer to a C-array holding `n` values of (C-primitive)
type `a`.

Reading from such an array is O(1) and can be done in pure functions.

See `CArrayIO` for a version of mutable C arrays running in `IO`.
See `CArray` for an mutable wrapper to be used in pure (linear) code.

Note : In general, this type is not for prolonged storage in an Idris data
structure (although this is still possible), because it needs to be
eventually freed. A typical use case is to make use of this for
its pure and clean API, but to do so from within `IO` or `F1` by
using `withIArray`.

Totality: total
Visibility: export
Constructor: 
IA : AnyPtr->CIArrayna

Projection: 
.ptr : CIArrayna->AnyPtr
at : SizeOfa=>Derefa=>CIArrayna->Finn->a
Totality: total
Visibility: export
ix : SizeOfa=>Derefa=>CIArrayna-> (0m : Nat) ->Ix (Sm) n=>a
Totality: total
Visibility: export
atNat : SizeOfa=>Derefa=>CIArrayna-> (m : Nat) -> {auto0_ : LTmn} ->a
Totality: total
Visibility: export
toVect : SizeOfa=>Derefa=>CIArrayna->Vectna
  Reads the values from a C pointer into a vector.

Totality: total
Visibility: export
foldrKV : SizeOfa=>Derefa=> (Finn->a->b->b) ->b->CIArrayna->b
  Right fold over the values of an array plus their indices.

Totality: total
Visibility: export
foldr : SizeOfa=>Derefa=> (a->b->b) ->b->CIArrayna->b
  Right fold over the values of an array

Totality: total
Visibility: export
foldlKV : SizeOfa=>Derefa=> (Finn->b->a->b) ->b->CIArrayna->b
  Left fold over the values of an array plus their indices.

Totality: total
Visibility: export
foldl : SizeOfa=>Derefa=> (b->a->b) ->b->CIArrayna->b
  Left fold over the values of an array

Totality: total
Visibility: export
withPtr : HasIOio=>Bits32-> (AnyPtr->ioa) ->ioa
  Allocates a pointer of the given size and uses it for running
the given computation. The pointer is freed afterwards.

Totality: total
Visibility: export
recordCArray' : RTag->Nat->Type->Type
  A wrapped pointer to a C-array holding `n` values of (C-primitive)
type `a`.

Reading from and writing to such an array is O(1) and runs in `IO`.

See `CArray` for a pure version of mutable C arrays using linear types.
See `CArrayIO` for a version of mutable C arrays usable in IO.

Note : In typical use cases, the memory allocated for a C array must
be manually released with a call to `free` unless it is part
of a larger structure `Struct` or managed by an external library.

Totality: total
Visibility: export
Constructor: 
CA : AnyPtr->CArray'tna

Projection: 
.ptr : CArray'tna->AnyPtr

Hints:
InIO (CArray'RIOna)
SizeOfa=>SizeOf (CArray'tna)
0CArray : Nat->Type->Type
  Convenience alias for `CArray' RPure`

Totality: total
Visibility: public export
0CArrayIO : Nat->Type->Type
  Convenience alias for `CArray' RIO`

Totality: total
Visibility: public export
unsafeUnwrap : CArray'tna->AnyPtr
Totality: total
Visibility: export
unsafeWrap : AnyPtr->CArray'tna
Totality: total
Visibility: export
0IOBox : Type->Type
Totality: total
Visibility: public export
0Box : Type->Type
Totality: total
Visibility: public export
malloc : HasIOio=> (0a : Type) ->SizeOfa=> (n : Nat) ->io (CArrayIOna)
  Allocates a new C-pointer of `sizeof a * n` bytes.

Totality: total
Visibility: export
calloc : HasIOio=> (0a : Type) ->SizeOfa=> (n : Nat) ->io (CArrayIOna)
  Like `malloc` but resets all allocated bytes to zero.

Totality: total
Visibility: export
free : HasIOio=>CArrayIOna->io ()
  Frees the memory allocated for a C-array.

Note: Only call this if the C array is no longer used and has been
allocated via a call to `malloc` or `alloc` (either in C land
or in Idris). Afterwards, it is no longer safe to use the array
for reading or writing, nor is it safe to call `free` on it again.

For safe resource management, use the linear version of
C arrays if possible. Otherwise, consider using a safer monad
than `IO` if possible.

Totality: total
Visibility: export
malloc1 : (0a : Type) ->SizeOfa=> (n : Nat) -> (1_ : T1rs) ->A1rs (CArrayna)
  Allocates a new C-pointer of `sizeof a * n` bytes.

Totality: total
Visibility: export
calloc1 : (0a : Type) ->SizeOfa=> (n : Nat) -> (1_ : T1rs) ->A1rs (CArrayna)
  Like `malloc1` but resets all allocated bytes to zero.

Totality: total
Visibility: export
free1 : (r : CArrayna) -> {auto0p : Resrrs} ->C1'rs (Droprsp)
  Frees the memory allocated for a C pointer and removes it from the
resources bound to the linear token.

Totality: total
Visibility: export
unbox : Derefa=> (r : CArray't (Sn) a) -> {auto0_ : Resrrs} ->F1rsa
  Extracts the first value stored in a C pointer.

Totality: total
Visibility: export
get : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->Derefa=>Finn->F1rsa
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
getIx : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->Derefa=> (0m : Nat) ->Ix (Sm) n=>F1rsa
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
getNat : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->Derefa=> (m : Nat) -> {auto0_ : LTmn} ->F1rsa
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
set : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->SetPtra=>Finn->a->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
setIx : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->SetPtra=> (0m : Nat) ->Ix (Sm) n=>a->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
setNat : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->SetPtra=> (m : Nat) -> {auto0_ : LTmn} ->a->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
writeVect : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->SetPtra=>Vectna->F1'rs
  Writes the values from a vector to a C pointer

Totality: total
Visibility: export
withIArray : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} -> (CIArrayna->b) ->F1rsb
  Temporarily wraps the mutable array in an immutable wrapper and
run a computation with that.

This is safe, because the pure function cannot possibly share the
immutable array by storing it in a mutable reference. It is
referentially transparent, because we call it from a linear context.

Totality: total
Visibility: export
writeList : SizeOfa=>SetPtra=> (as : Lista) -> (r : CArray't (lengthas) a) -> {auto0_ : Resrrs} ->F1'rs
  Writes the values from a list to a C pointer

Totality: total
Visibility: export
withCArray : SizeOfa=> (n : Nat) -> ((r : CArrayna) ->F1 [r] b) ->b
Totality: total
Visibility: export
fromListIO : HasIOio=>SizeOfa=>SetPtra=> (as : Lista) ->io (CArrayIO (lengthas) a)
Totality: total
Visibility: export
+

Data.C.Array

(source)

Reexports

importpublic Data.Fin
importpublic Data.Linear.Token
importpublic Data.Array.Index

Definitions

prim__malloc : Bits32->AnyPtr
prim__calloc : Bits32->Bits32->AnyPtr
prim__free : AnyPtr->PrimIO ()
prim__inc_ptr : AnyPtr->Bits32->Bits32->AnyPtr
recordCIArray : Nat->Type->Type
  A wrapped pointer to a C-array holding `n` values of (C-primitive)
type `a`.

Reading from such an array is O(1) and can be done in pure functions.

See `CArrayIO` for a version of mutable C arrays running in `IO`.
See `CArray` for an mutable wrapper to be used in pure (linear) code.

Note : In general, this type is not for prolonged storage in an Idris data
structure (although this is still possible), because it needs to be
eventually freed. A typical use case is to make use of this for
its pure and clean API, but to do so from within `IO` or `F1` by
using `withIArray`.

Totality: total
Visibility: export
Constructor: 
IA : AnyPtr->CIArrayna

Projection: 
.ptr : CIArrayna->AnyPtr
at : SizeOfa=>Derefa=>CIArrayna->Finn->a
Totality: total
Visibility: export
ix : SizeOfa=>Derefa=>CIArrayna-> (0m : Nat) ->Ix (Sm) n=>a
Totality: total
Visibility: export
atNat : SizeOfa=>Derefa=>CIArrayna-> (m : Nat) -> {auto0_ : LTmn} ->a
Totality: total
Visibility: export
toVect : SizeOfa=>Derefa=>CIArrayna->Vectna
  Reads the values from a C pointer into a vector.

Totality: total
Visibility: export
foldrKV : SizeOfa=>Derefa=> (Finn->a->b->b) ->b->CIArrayna->b
  Right fold over the values of an array plus their indices.

Totality: total
Visibility: export
foldr : SizeOfa=>Derefa=> (a->b->b) ->b->CIArrayna->b
  Right fold over the values of an array

Totality: total
Visibility: export
foldlKV : SizeOfa=>Derefa=> (Finn->b->a->b) ->b->CIArrayna->b
  Left fold over the values of an array plus their indices.

Totality: total
Visibility: export
foldl : SizeOfa=>Derefa=> (b->a->b) ->b->CIArrayna->b
  Left fold over the values of an array

Totality: total
Visibility: export
withPtr : HasIOio=>Bits32-> (AnyPtr->ioa) ->ioa
  Allocates a pointer of the given size and uses it for running
the given computation. The pointer is freed afterwards.

Totality: total
Visibility: export
recordCArray' : RTag->Nat->Type->Type
  A wrapped pointer to a C-array holding `n` values of (C-primitive)
type `a`.

Reading from and writing to such an array is O(1) and runs in `IO`.

See `CArray` for a pure version of mutable C arrays using linear types.
See `CArrayIO` for a version of mutable C arrays usable in IO.

Note : In typical use cases, the memory allocated for a C array must
be manually released with a call to `free` unless it is part
of a larger structure `Struct` or managed by an external library.

Totality: total
Visibility: export
Constructor: 
CA : AnyPtr->CArray'tna

Projection: 
.ptr : CArray'tna->AnyPtr

Hints:
InIO (CArray'RIOna)
SizeOfa=>SizeOf (CArray'tna)
0CArray : Nat->Type->Type
  Convenience alias for `CArray' RPure`

Totality: total
Visibility: public export
0CArrayIO : Nat->Type->Type
  Convenience alias for `CArray' RIO`

Totality: total
Visibility: public export
unsafeUnwrap : CArray'tna->AnyPtr
Totality: total
Visibility: export
unsafeWrap : AnyPtr->CArray'tna
Totality: total
Visibility: export
0IOBox : Type->Type
Totality: total
Visibility: public export
0Box : Type->Type
Totality: total
Visibility: public export
malloc : HasIOio=> (0a : Type) ->SizeOfa=> (n : Nat) ->io (CArrayIOna)
  Allocates a new C-pointer of `sizeof a * n` bytes.

Totality: total
Visibility: export
calloc : HasIOio=> (0a : Type) ->SizeOfa=> (n : Nat) ->io (CArrayIOna)
  Like `malloc` but resets all allocated bytes to zero.

Totality: total
Visibility: export
free : HasIOio=>CArrayIOna->io ()
  Frees the memory allocated for a C-array.

Note: Only call this if the C array is no longer used and has been
allocated via a call to `malloc` or `alloc` (either in C land
or in Idris). Afterwards, it is no longer safe to use the array
for reading or writing, nor is it safe to call `free` on it again.

For safe resource management, use the linear version of
C arrays if possible. Otherwise, consider using a safer monad
than `IO` if possible.

Totality: total
Visibility: export
malloc1 : (0a : Type) ->SizeOfa=> (n : Nat) -> (1_ : T1rs) ->A1rs (CArrayna)
  Allocates a new C-pointer of `sizeof a * n` bytes.

Totality: total
Visibility: export
calloc1 : (0a : Type) ->SizeOfa=> (n : Nat) -> (1_ : T1rs) ->A1rs (CArrayna)
  Like `malloc1` but resets all allocated bytes to zero.

Totality: total
Visibility: export
free1 : (r : CArrayna) -> {auto0p : Resrrs} ->C1'rs (Droprsp)
  Frees the memory allocated for a C pointer and removes it from the
resources bound to the linear token.

Totality: total
Visibility: export
unbox : Derefa=> (r : CArray't (Sn) a) -> {auto0_ : Resrrs} ->F1rsa
  Extracts the first value stored in a C pointer.

Totality: total
Visibility: export
get : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->Derefa=>Finn->F1rsa
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
getIx : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->Derefa=> (0m : Nat) ->Ix (Sm) n=>F1rsa
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
getNat : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->Derefa=> (m : Nat) -> {auto0_ : LTmn} ->F1rsa
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
set : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->SetPtra=>Finn->a->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
setIx : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->SetPtra=> (0m : Nat) ->Ix (Sm) n=>a->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
setNat : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->SetPtra=> (m : Nat) -> {auto0_ : LTmn} ->a->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
writeVect : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} ->SetPtra=>Vectna->F1'rs
  Writes the values from a vector to a C pointer

Totality: total
Visibility: export
withIArray : SizeOfa=> (r : CArray'tna) -> {auto0_ : Resrrs} -> (CIArrayna->b) ->F1rsb
  Temporarily wraps the mutable array in an immutable wrapper and
run a computation with that.

This is safe, because the pure function cannot possibly share the
immutable array by storing it in a mutable reference. It is
referentially transparent, because we call it from a linear context.

Totality: total
Visibility: export
writeList : SizeOfa=>SetPtra=> (as : Lista) -> (r : CArray't (lengthas) a) -> {auto0_ : Resrrs} ->F1'rs
  Writes the values from a list to a C pointer

Totality: total
Visibility: export
withCArray : SizeOfa=> (n : Nat) -> ((r : CArrayna) ->F1 [r] b) ->b
Totality: total
Visibility: export
fromListIO : HasIOio=>SizeOfa=>SetPtra=> (as : Lista) ->io (CArrayIO (lengthas) a)
Totality: total
Visibility: export
diff --git a/docs/cptr/docs/docs/Data.C.Array.src.html b/docs/cptr/docs/docs/Data.C.Array.src.html index 02af2d5af..46e96dbcb 100644 --- a/docs/cptr/docs/docs/Data.C.Array.src.html +++ b/docs/cptr/docs/docs/Data.C.Array.src.html @@ -138,349 +138,352 @@
 17 | --------------------------------------------------------------------------------
 18 |
 19 | export %foreign "C:cptr_malloc, cptr-idris"
-
 20 | prim__malloc : (size : Bits32) -> AnyPtr
-
 21 |
-
 22 | export %foreign "C:cptr_calloc, cptr-idris"
-
 23 | prim__calloc : (n, size : Bits32) -> AnyPtr
-
 24 |
-
 25 | export %foreign "C:cptr_free, cptr-idris"
-
 26 | prim__free : AnyPtr -> PrimIO ()
-
 27 |
-
 28 | export %foreign "C:cptr_inc_ptr, cptr-idris"
-
 29 | prim__inc_ptr : AnyPtr -> Bits32 -> AnyPtr
-
 30 |
-
 31 | --------------------------------------------------------------------------------
-
 32 | -- Immutable API
-
 33 | --------------------------------------------------------------------------------
-
 34 |
-
 35 | ||| A wrapped pointer to a C-array holding `n` values of (C-primitive)
-
 36 | ||| type `a`.
-
 37 | |||
-
 38 | ||| Reading from such an array is O(1) and can be done in pure functions.
-
 39 | |||
-
 40 | ||| See `CArrayIO` for a version of mutable C arrays running in `IO`.
-
 41 | ||| See `CArray` for an mutable wrapper to be used in pure (linear) code.
+
 20 |                 "scheme,chez:(lambda (x) (if (= 0 x) 0 (foreign-alloc x)))"
+
 21 | prim__malloc : (size : Bits32) -> AnyPtr
+
 22 |
+
 23 | export %foreign "C:cptr_calloc, cptr-idris"
+
 24 | prim__calloc : (n, size : Bits32) -> AnyPtr
+
 25 |
+
 26 | export %foreign "C:cptr_free, cptr-idris"
+
 27 |                 "scheme,chez:(lambda (x) (if (= 0 x) '() (foreign-free x)))"
+
 28 | prim__free : AnyPtr -> PrimIO ()
+
 29 |
+
 30 | export %foreign "C:cptr_inc_ptr, cptr-idris"
+
 31 |                 "scheme,chez:(lambda (p x y) (+ p (* x y)))"
+
 32 | prim__inc_ptr : AnyPtr -> Bits32 -> Bits32 -> AnyPtr
+
 33 |
+
 34 | --------------------------------------------------------------------------------
+
 35 | -- Immutable API
+
 36 | --------------------------------------------------------------------------------
+
 37 |
+
 38 | ||| A wrapped pointer to a C-array holding `n` values of (C-primitive)
+
 39 | ||| type `a`.
+
 40 | |||
+
 41 | ||| Reading from such an array is O(1) and can be done in pure functions.
 42 | |||
-
 43 | ||| Note : In general, this type is not for prolonged storage in an Idris data
-
 44 | |||        structure (although this is still possible), because it needs to be
-
 45 | |||        eventually freed. A typical use case is to make use of this for
-
 46 | |||        its pure and clean API, but to do so from within `IO` or `F1` by
-
 47 | |||        using `withIArray`.
-
 48 | export
-
 49 | record CIArray (n : Nat) (a : Type) where
-
 50 |   constructor IA
-
 51 |   ptr : AnyPtr
-
 52 |
-
 53 | parameters {0 a      : Type}
-
 54 |            {0 n      : Nat}
-
 55 |            {auto so  : SizeOf a}
-
 56 |            {auto dr  : Deref a}
-
 57 |
-
 58 |   export %inline
-
 59 |   at : CIArray n a -> Fin n -> a
-
 60 |   at r x =
-
 61 |     let MkIORes v _ := toPrim (deref $ prim__inc_ptr r.ptr $ cast $ cast x * sizeof a) %MkWorld
-
 62 |      in v
-
 63 |
-
 64 |   export %inline
-
 65 |   ix : CIArray n a -> (0 m : Nat) -> (x : Ix (S m) n) => a
-
 66 |   ix r m = at r (ixToFin x)
-
 67 |
-
 68 |   export %inline
-
 69 |   atNat : CIArray n a -> (m : Nat) -> (0 lt : LT m n) => a
-
 70 |   atNat r m = at r (natToFinLT m)
-
 71 |
-
 72 |   foldrI : (m : Nat) -> (0 _ : LTE m n) => (a -> b -> b) -> b -> CIArray n a -> b
-
 73 |   foldrI 0     _ x r = x
-
 74 |   foldrI (S k) f x r = foldrI k f (f (atNat r k) x) r
-
 75 |
-
 76 |   foldrKV_ :
-
 77 |        (m : Nat)
-
 78 |     -> {auto 0 prf : LTE m n}
-
 79 |     -> (Fin n -> a -> b -> b)
-
 80 |     -> b
-
 81 |     -> CIArray n a
-
 82 |     -> b
-
 83 |   foldrKV_ 0     _ x r = x
-
 84 |   foldrKV_ (S k) f x r =
-
 85 |     let fin := natToFinLT k @{prf} in foldrKV_ k f (f fin (at r fin) x) r
-
 86 |
-
 87 |   foldlI : (m : Nat) -> (x : Ix m n) => (b -> a -> b) -> b -> CIArray n a -> b
-
 88 |   foldlI 0     _ v r = v
-
 89 |   foldlI (S k) f v r = foldlI k f (f v (ix r k)) r
-
 90 |
-
 91 |   foldlKV_ :
-
 92 |        (m : Nat)
-
 93 |     -> {auto x : Ix m n}
-
 94 |     -> (Fin n -> b -> a -> b)
-
 95 |     -> b
-
 96 |     -> CIArray n a
-
 97 |     -> b
-
 98 |   foldlKV_ 0     _ v r = v
-
 99 |   foldlKV_ (S k) f v r =
-
100 |     let fin := ixToFin x in foldlKV_ k f (f fin v (at r fin)) r
-
101 |
-
102 |   ontoVect :
-
103 |        (r : CIArray n a)
-
104 |     -> Vect m a
-
105 |     -> (k : Nat)
-
106 |     -> {auto 0 lt : LTE k n}
-
107 |     -> Vect (m+k) a
-
108 |   ontoVect r vs 0     = rewrite plusCommutative m 0 in vs
-
109 |   ontoVect r vs (S x) =
-
110 |     let v := atNat r x {lt}
-
111 |      in rewrite sym (plusSuccRightSucc m x) in ontoVect r (v::vs) x
-
112 |
-
113 | parameters {n : Nat}
-
114 |            {auto sz : SizeOf a}
-
115 |            {auto de : Deref a}
-
116 |
-
117 |   ||| Reads the values from a C pointer into a vector.
-
118 |   export %inline
-
119 |   toVect : (r : CIArray n a) -> Vect n a
-
120 |   toVect r = ontoVect r [] n
-
121 |
-
122 |   ||| Right fold over the values of an array plus their indices.
-
123 |   export %inline
-
124 |   foldrKV : (Fin n -> a -> b -> b) -> b -> CIArray n a -> b
-
125 |   foldrKV = foldrKV_ n
-
126 |
-
127 |   ||| Right fold over the values of an array
-
128 |   export %inline
-
129 |   foldr : (a -> b -> b) -> b -> CIArray n a -> b
-
130 |   foldr = foldrI n
-
131 |
-
132 |   ||| Left fold over the values of an array plus their indices.
-
133 |   export %inline
-
134 |   foldlKV : (Fin n -> b -> a -> b) -> b -> CIArray n a -> b
-
135 |   foldlKV = foldlKV_ n
-
136 |
-
137 |   ||| Left fold over the values of an array
-
138 |   export %inline
-
139 |   foldl : (b -> a -> b) -> b -> CIArray n a -> b
-
140 |   foldl = foldlI n
-
141 |
-
142 | --------------------------------------------------------------------------------
-
143 | -- IO-API
-
144 | --------------------------------------------------------------------------------
-
145 |
-
146 | ||| Allocates a pointer of the given size and uses it for running
-
147 | ||| the given computation. The pointer is freed afterwards.
-
148 | export %inline
-
149 | withPtr : HasIO io => Bits32 -> (AnyPtr -> io a) -> io a
-
150 | withPtr sz f = Prelude.do
-
151 |   ptr <- pure $ prim__malloc sz
-
152 |   res <- f ptr
-
153 |   primIO $ prim__free ptr
-
154 |   pure res
-
155 |
-
156 | ||| A wrapped pointer to a C-array holding `n` values of (C-primitive)
-
157 | ||| type `a`.
-
158 | |||
-
159 | ||| Reading from and writing to such an array is O(1) and runs in `IO`.
-
160 | |||
-
161 | ||| See `CArray` for a pure version of mutable C arrays using linear types.
-
162 | ||| See `CArrayIO` for a version of mutable C arrays usable in IO.
+
 43 | ||| See `CArrayIO` for a version of mutable C arrays running in `IO`.
+
 44 | ||| See `CArray` for an mutable wrapper to be used in pure (linear) code.
+
 45 | |||
+
 46 | ||| Note : In general, this type is not for prolonged storage in an Idris data
+
 47 | |||        structure (although this is still possible), because it needs to be
+
 48 | |||        eventually freed. A typical use case is to make use of this for
+
 49 | |||        its pure and clean API, but to do so from within `IO` or `F1` by
+
 50 | |||        using `withIArray`.
+
 51 | export
+
 52 | record CIArray (n : Nat) (a : Type) where
+
 53 |   constructor IA
+
 54 |   ptr : AnyPtr
+
 55 |
+
 56 | parameters {0 a      : Type}
+
 57 |            {0 n      : Nat}
+
 58 |            {auto so  : SizeOf a}
+
 59 |            {auto dr  : Deref a}
+
 60 |
+
 61 |   export %inline
+
 62 |   at : CIArray n a -> Fin n -> a
+
 63 |   at r x =
+
 64 |     let MkIORes v _ := toPrim (deref $ prim__inc_ptr r.ptr (sizeof a) (cast $ finToNat x)) %MkWorld
+
 65 |      in v
+
 66 |
+
 67 |   export %inline
+
 68 |   ix : CIArray n a -> (0 m : Nat) -> (x : Ix (S m) n) => a
+
 69 |   ix r m = at r (ixToFin x)
+
 70 |
+
 71 |   export %inline
+
 72 |   atNat : CIArray n a -> (m : Nat) -> (0 lt : LT m n) => a
+
 73 |   atNat r m = at r (natToFinLT m)
+
 74 |
+
 75 |   foldrI : (m : Nat) -> (0 _ : LTE m n) => (a -> b -> b) -> b -> CIArray n a -> b
+
 76 |   foldrI 0     _ x r = x
+
 77 |   foldrI (S k) f x r = foldrI k f (f (atNat r k) x) r
+
 78 |
+
 79 |   foldrKV_ :
+
 80 |        (m : Nat)
+
 81 |     -> {auto 0 prf : LTE m n}
+
 82 |     -> (Fin n -> a -> b -> b)
+
 83 |     -> b
+
 84 |     -> CIArray n a
+
 85 |     -> b
+
 86 |   foldrKV_ 0     _ x r = x
+
 87 |   foldrKV_ (S k) f x r =
+
 88 |     let fin := natToFinLT k @{prf} in foldrKV_ k f (f fin (at r fin) x) r
+
 89 |
+
 90 |   foldlI : (m : Nat) -> (x : Ix m n) => (b -> a -> b) -> b -> CIArray n a -> b
+
 91 |   foldlI 0     _ v r = v
+
 92 |   foldlI (S k) f v r = foldlI k f (f v (ix r k)) r
+
 93 |
+
 94 |   foldlKV_ :
+
 95 |        (m : Nat)
+
 96 |     -> {auto x : Ix m n}
+
 97 |     -> (Fin n -> b -> a -> b)
+
 98 |     -> b
+
 99 |     -> CIArray n a
+
100 |     -> b
+
101 |   foldlKV_ 0     _ v r = v
+
102 |   foldlKV_ (S k) f v r =
+
103 |     let fin := ixToFin x in foldlKV_ k f (f fin v (at r fin)) r
+
104 |
+
105 |   ontoVect :
+
106 |        (r : CIArray n a)
+
107 |     -> Vect m a
+
108 |     -> (k : Nat)
+
109 |     -> {auto 0 lt : LTE k n}
+
110 |     -> Vect (m+k) a
+
111 |   ontoVect r vs 0     = rewrite plusCommutative m 0 in vs
+
112 |   ontoVect r vs (S x) =
+
113 |     let v := atNat r x {lt}
+
114 |      in rewrite sym (plusSuccRightSucc m x) in ontoVect r (v::vs) x
+
115 |
+
116 | parameters {n : Nat}
+
117 |            {auto sz : SizeOf a}
+
118 |            {auto de : Deref a}
+
119 |
+
120 |   ||| Reads the values from a C pointer into a vector.
+
121 |   export %inline
+
122 |   toVect : (r : CIArray n a) -> Vect n a
+
123 |   toVect r = ontoVect r [] n
+
124 |
+
125 |   ||| Right fold over the values of an array plus their indices.
+
126 |   export %inline
+
127 |   foldrKV : (Fin n -> a -> b -> b) -> b -> CIArray n a -> b
+
128 |   foldrKV = foldrKV_ n
+
129 |
+
130 |   ||| Right fold over the values of an array
+
131 |   export %inline
+
132 |   foldr : (a -> b -> b) -> b -> CIArray n a -> b
+
133 |   foldr = foldrI n
+
134 |
+
135 |   ||| Left fold over the values of an array plus their indices.
+
136 |   export %inline
+
137 |   foldlKV : (Fin n -> b -> a -> b) -> b -> CIArray n a -> b
+
138 |   foldlKV = foldlKV_ n
+
139 |
+
140 |   ||| Left fold over the values of an array
+
141 |   export %inline
+
142 |   foldl : (b -> a -> b) -> b -> CIArray n a -> b
+
143 |   foldl = foldlI n
+
144 |
+
145 | --------------------------------------------------------------------------------
+
146 | -- IO-API
+
147 | --------------------------------------------------------------------------------
+
148 |
+
149 | ||| Allocates a pointer of the given size and uses it for running
+
150 | ||| the given computation. The pointer is freed afterwards.
+
151 | export %inline
+
152 | withPtr : HasIO io => Bits32 -> (AnyPtr -> io a) -> io a
+
153 | withPtr sz f = Prelude.do
+
154 |   ptr <- pure $ prim__malloc sz
+
155 |   res <- f ptr
+
156 |   primIO $ prim__free ptr
+
157 |   pure res
+
158 |
+
159 | ||| A wrapped pointer to a C-array holding `n` values of (C-primitive)
+
160 | ||| type `a`.
+
161 | |||
+
162 | ||| Reading from and writing to such an array is O(1) and runs in `IO`.
163 | |||
-
164 | ||| Note : In typical use cases, the memory allocated for a C array must
-
165 | |||        be manually released with a call to `free` unless it is part
-
166 | |||        of a larger structure `Struct` or managed by an external library.
-
167 | export
-
168 | record CArray' (t : RTag) (n : Nat) (a : Type) where
-
169 |   constructor CA
-
170 |   ptr : AnyPtr
-
171 |
-
172 | ||| Convenience alias for `CArray' RPure`
-
173 | public export
-
174 | 0 CArray : Nat -> Type -> Type
-
175 | CArray = CArray' RPure
-
176 |
-
177 | ||| Convenience alias for `CArray' RIO`
-
178 | public export
-
179 | 0 CArrayIO : Nat -> Type -> Type
-
180 | CArrayIO = CArray' RIO
-
181 |
-
182 | public export
-
183 | InIO (CArray' RIO n a) where
+
164 | ||| See `CArray` for a pure version of mutable C arrays using linear types.
+
165 | ||| See `CArrayIO` for a version of mutable C arrays usable in IO.
+
166 | |||
+
167 | ||| Note : In typical use cases, the memory allocated for a C array must
+
168 | |||        be manually released with a call to `free` unless it is part
+
169 | |||        of a larger structure `Struct` or managed by an external library.
+
170 | export
+
171 | record CArray' (t : RTag) (n : Nat) (a : Type) where
+
172 |   constructor CA
+
173 |   ptr : AnyPtr
+
174 |
+
175 | ||| Convenience alias for `CArray' RPure`
+
176 | public export
+
177 | 0 CArray : Nat -> Type -> Type
+
178 | CArray = CArray' RPure
+
179 |
+
180 | ||| Convenience alias for `CArray' RIO`
+
181 | public export
+
182 | 0 CArrayIO : Nat -> Type -> Type
+
183 | CArrayIO = CArray' RIO
184 |
-
185 | public export %inline
-
186 | {n : Nat} -> SizeOf a => SizeOf (CArray' t n a) where
-
187 |   sizeof_ = cast n * sizeof a
-
188 |
-
189 | export %inline
-
190 | unsafeUnwrap : CArray' t n a -> AnyPtr
-
191 | unsafeUnwrap = ptr
-
192 |
-
193 | export %inline
-
194 | unsafeWrap : AnyPtr -> CArray' t n a
-
195 | unsafeWrap = CA
-
196 |
-
197 | public export
-
198 | 0 IOBox : Type -> Type
-
199 | IOBox = CArrayIO 1
-
200 |
-
201 | public export
-
202 | 0 Box : Type -> Type
-
203 | Box = CArray 1
-
204 |
-
205 | parameters {auto has : HasIO io}
-
206 |
-
207 |   ||| Allocates a new C-pointer of `sizeof a * n` bytes.
-
208 |   export %inline
-
209 |   malloc : (0 a : Type) -> SizeOf a => (n : Nat) -> io (CArrayIO n a)
-
210 |   malloc a n = primIO $ MkIORes (CA $ prim__malloc (cast $ n * sizeof a))
-
211 |
-
212 |   ||| Like `malloc` but resets all allocated bytes to zero.
-
213 |   export %inline
-
214 |   calloc : (0 a : Type) -> SizeOf a => (n : Nat) -> io (CArrayIO n a)
-
215 |   calloc a n =
-
216 |     primIO $ MkIORes (CA $ prim__calloc (cast n) (cast $ sizeof a))
-
217 |
-
218 |   ||| Frees the memory allocated for a C-array.
-
219 |   |||
-
220 |   ||| Note: Only call this if the C array is no longer used and has been
-
221 |   |||       allocated via a call to `malloc` or `alloc` (either in C land
-
222 |   |||       or in Idris). Afterwards, it is no longer safe to use the array
-
223 |   |||       for reading or writing, nor is it safe to call `free` on it again.
-
224 |   |||
-
225 |   |||       For safe resource management, use the linear version of
-
226 |   |||       C arrays if possible. Otherwise, consider using a safer monad
-
227 |   |||       than `IO` if possible.
-
228 |   export %inline
-
229 |   free : CArrayIO n a -> io ()
-
230 |   free (CA p) = primIO $ prim__free p
-
231 |
-
232 | --------------------------------------------------------------------------------
-
233 | -- Linear API
-
234 | --------------------------------------------------------------------------------
-
235 |
-
236 | ||| Allocates a new C-pointer of `sizeof a * n` bytes.
-
237 | export %inline
-
238 | malloc1 :
-
239 |      (0 a : Type)
-
240 |   -> {auto so : SizeOf a}
-
241 |   -> (n : Nat)
-
242 |   -> (1 t : T1 rs)
-
243 |   -> A1 rs (CArray n a)
-
244 | malloc1 a n t =
-
245 |   let p := prim__malloc (cast $ n * sizeof a)
-
246 |    in A (CA p) (unsafeBind t)
-
247 |
-
248 | ||| Like `malloc1` but resets all allocated bytes to zero.
-
249 | export %inline
-
250 | calloc1 :
-
251 |      (0 a : Type)
-
252 |   -> {auto so : SizeOf a}
-
253 |   -> (n : Nat)
-
254 |   -> (1 t : T1 rs)
-
255 |   -> A1 rs (CArray n a)
-
256 | calloc1 a n t =
-
257 |   let p := prim__calloc (cast n) (cast $ sizeof a)
-
258 |    in A (CA p) (unsafeBind t)
-
259 |
-
260 | ||| Frees the memory allocated for a C pointer and removes it from the
-
261 | ||| resources bound to the linear token.
-
262 | export %inline
-
263 | free1 : (r : CArray n a) -> (0 p : Res r rs) => C1' rs (Drop rs p)
-
264 | free1 r t =
-
265 |   let MkIORes _ _ := prim__free r.ptr %MkWorld
-
266 |    in unsafeRelease p t
-
267 |
-
268 | ||| Extracts the first value stored in a C pointer.
-
269 | export %inline
-
270 | unbox : Deref a => (r : CArray' t (S n) a) -> (0 p : Res r rs) => F1 rs a
-
271 | unbox r t = let MkIORes v _ := toPrim (deref r.ptr) %MkWorld in v # t
-
272 |
-
273 | parameters {0 a      : Type}
-
274 |            {0 n      : Nat}
-
275 |            {0 rs     : Resources}
-
276 |            {auto so  : SizeOf a}
-
277 |            (r        : CArray' t n a)
-
278 |            {auto 0 p : Res r rs}
-
279 |
-
280 |   ||| Reads a value from a C-pointer at the given position.
-
281 |   export %inline
-
282 |   get : Deref a => Fin n -> F1 rs a
-
283 |   get x = ffi $ toPrim (deref $ prim__inc_ptr r.ptr $ cast $ cast x * sizeof a)
-
284 |
-
285 |   ||| Reads a value from a C-pointer at the given position.
-
286 |   export %inline
-
287 |   getIx : Deref a => (0 m : Nat) -> (x : Ix (S m) n) => F1 rs a
-
288 |   getIx m = get (ixToFin x)
-
289 |
-
290 |   ||| Reads a value from a C-pointer at the given position.
-
291 |   export %inline
-
292 |   getNat : Deref a => (m : Nat) -> (0 lt : LT m n) => F1 rs a
-
293 |   getNat m = get (natToFinLT m)
-
294 |
-
295 |   ||| Writes a value to a C pointer at the given position.
-
296 |   export %inline
-
297 |   set : SetPtr a => Fin n -> a -> F1' rs
-
298 |   set x v = ffi $ toPrim (setPtr (prim__inc_ptr r.ptr $ cast $ cast x * sizeof a) v)
-
299 |
-
300 |   ||| Writes a value to a C pointer at the given position.
-
301 |   export %inline
-
302 |   setIx : SetPtr a => (0 m : Nat) -> (x : Ix (S m) n) => a -> F1' rs
-
303 |   setIx m = set (ixToFin x)
-
304 |
-
305 |   ||| Writes a value to a C pointer at the given position.
-
306 |   export %inline
-
307 |   setNat : SetPtr a => (m : Nat) -> (0 lt : LT m n) => a -> F1' rs
-
308 |   setNat m = set (natToFinLT m)
-
309 |
-
310 |   writeVect1 : SetPtr a => Vect k a -> Ix k n => F1' rs
-
311 |   writeVect1           []        t = () # t
-
312 |   writeVect1 {k = S m} (x :: xs) t =
-
313 |     let _ # t := setIx m x t
-
314 |      in writeVect1 xs t
-
315 |
-
316 |   ||| Writes the values from a vector to a C pointer
-
317 |   export %inline
-
318 |   writeVect : SetPtr a => Vect n a -> F1' rs
-
319 |   writeVect as = writeVect1 as
-
320 |
-
321 |   ||| Temporarily wraps the mutable array in an immutable wrapper and
-
322 |   ||| run a computation with that.
-
323 |   |||
-
324 |   ||| This is safe, because the pure function cannot possibly share the
-
325 |   ||| immutable array by storing it in a mutable reference. It is
-
326 |   ||| referentially transparent, because we call it from a linear context.
-
327 |   export %inline
-
328 |   withIArray : (CIArray n a -> b) -> F1 rs b
-
329 |   withIArray f t = f (IA r.ptr) # t
-
330 |
-
331 | ||| Writes the values from a list to a C pointer
-
332 | export %inline
-
333 | writeList :
-
334 |      {auto so  : SizeOf a}
-
335 |   -> {auto sp  : SetPtr a}
-
336 |   -> (as       : List a)
-
337 |   -> (r        : CArray' t (length as) a)
-
338 |   -> {auto 0 p : Res r rs}
-
339 |   -> F1' rs
-
340 | writeList as r = writeVect r (fromList as)
-
341 |
-
342 | export
-
343 | withCArray : SizeOf a => (n : Nat) -> (f : (r : CArray n a) -> F1 [r] b) -> b
-
344 | withCArray n f =
-
345 |   run1 $ \t =>
-
346 |     let A r t := malloc1 a n t
-
347 |         v # t := f r t
-
348 |         _ # t := free1 r t
-
349 |      in v # t
-
350 |
-
351 | export %inline
-
352 | fromListIO :
-
353 |      {auto has : HasIO io}
-
354 |   -> {auto sz  : SizeOf a}
-
355 |   -> {auto sp  : SetPtr a}
-
356 |   -> (as : List a)
-
357 |   -> io (CArrayIO (length as) a)
-
358 | fromListIO as = Prelude.do
-
359 |   arr <- malloc a (length as)
-
360 |   runIO $ writeList as arr
-
361 |   pure arr
-
362 |
+
185 | public export
+
186 | InIO (CArray' RIO n a) where
+
187 |
+
188 | public export %inline
+
189 | {n : Nat} -> SizeOf a => SizeOf (CArray' t n a) where
+
190 |   sizeof_ = cast n * sizeof a
+
191 |
+
192 | export %inline
+
193 | unsafeUnwrap : CArray' t n a -> AnyPtr
+
194 | unsafeUnwrap = ptr
+
195 |
+
196 | export %inline
+
197 | unsafeWrap : AnyPtr -> CArray' t n a
+
198 | unsafeWrap = CA
+
199 |
+
200 | public export
+
201 | 0 IOBox : Type -> Type
+
202 | IOBox = CArrayIO 1
+
203 |
+
204 | public export
+
205 | 0 Box : Type -> Type
+
206 | Box = CArray 1
+
207 |
+
208 | parameters {auto has : HasIO io}
+
209 |
+
210 |   ||| Allocates a new C-pointer of `sizeof a * n` bytes.
+
211 |   export %inline
+
212 |   malloc : (0 a : Type) -> SizeOf a => (n : Nat) -> io (CArrayIO n a)
+
213 |   malloc a n = primIO $ MkIORes (CA $ prim__malloc (cast n * sizeof a))
+
214 |
+
215 |   ||| Like `malloc` but resets all allocated bytes to zero.
+
216 |   export %inline
+
217 |   calloc : (0 a : Type) -> SizeOf a => (n : Nat) -> io (CArrayIO n a)
+
218 |   calloc a n =
+
219 |     primIO $ MkIORes (CA $ prim__calloc (cast n) (sizeof a))
+
220 |
+
221 |   ||| Frees the memory allocated for a C-array.
+
222 |   |||
+
223 |   ||| Note: Only call this if the C array is no longer used and has been
+
224 |   |||       allocated via a call to `malloc` or `alloc` (either in C land
+
225 |   |||       or in Idris). Afterwards, it is no longer safe to use the array
+
226 |   |||       for reading or writing, nor is it safe to call `free` on it again.
+
227 |   |||
+
228 |   |||       For safe resource management, use the linear version of
+
229 |   |||       C arrays if possible. Otherwise, consider using a safer monad
+
230 |   |||       than `IO` if possible.
+
231 |   export %inline
+
232 |   free : CArrayIO n a -> io ()
+
233 |   free (CA p) = primIO $ prim__free p
+
234 |
+
235 | --------------------------------------------------------------------------------
+
236 | -- Linear API
+
237 | --------------------------------------------------------------------------------
+
238 |
+
239 | ||| Allocates a new C-pointer of `sizeof a * n` bytes.
+
240 | export %inline
+
241 | malloc1 :
+
242 |      (0 a : Type)
+
243 |   -> {auto so : SizeOf a}
+
244 |   -> (n : Nat)
+
245 |   -> (1 t : T1 rs)
+
246 |   -> A1 rs (CArray n a)
+
247 | malloc1 a n t =
+
248 |   let p := prim__malloc (cast n * sizeof a)
+
249 |    in A (CA p) (unsafeBind t)
+
250 |
+
251 | ||| Like `malloc1` but resets all allocated bytes to zero.
+
252 | export %inline
+
253 | calloc1 :
+
254 |      (0 a : Type)
+
255 |   -> {auto so : SizeOf a}
+
256 |   -> (n : Nat)
+
257 |   -> (1 t : T1 rs)
+
258 |   -> A1 rs (CArray n a)
+
259 | calloc1 a n t =
+
260 |   let p := prim__calloc (cast n) (sizeof a)
+
261 |    in A (CA p) (unsafeBind t)
+
262 |
+
263 | ||| Frees the memory allocated for a C pointer and removes it from the
+
264 | ||| resources bound to the linear token.
+
265 | export %inline
+
266 | free1 : (r : CArray n a) -> (0 p : Res r rs) => C1' rs (Drop rs p)
+
267 | free1 r t =
+
268 |   let MkIORes _ _ := prim__free r.ptr %MkWorld
+
269 |    in unsafeRelease p t
+
270 |
+
271 | ||| Extracts the first value stored in a C pointer.
+
272 | export %inline
+
273 | unbox : Deref a => (r : CArray' t (S n) a) -> (0 p : Res r rs) => F1 rs a
+
274 | unbox r t = let MkIORes v _ := toPrim (deref r.ptr) %MkWorld in v # t
+
275 |
+
276 | parameters {0 a      : Type}
+
277 |            {0 n      : Nat}
+
278 |            {0 rs     : Resources}
+
279 |            {auto so  : SizeOf a}
+
280 |            (r        : CArray' t n a)
+
281 |            {auto 0 p : Res r rs}
+
282 |
+
283 |   ||| Reads a value from a C-pointer at the given position.
+
284 |   export %inline
+
285 |   get : Deref a => Fin n -> F1 rs a
+
286 |   get x = ffi $ toPrim (deref $ prim__inc_ptr r.ptr (cast $ finToNat x) (sizeof a))
+
287 |
+
288 |   ||| Reads a value from a C-pointer at the given position.
+
289 |   export %inline
+
290 |   getIx : Deref a => (0 m : Nat) -> (x : Ix (S m) n) => F1 rs a
+
291 |   getIx m = get (ixToFin x)
+
292 |
+
293 |   ||| Reads a value from a C-pointer at the given position.
+
294 |   export %inline
+
295 |   getNat : Deref a => (m : Nat) -> (0 lt : LT m n) => F1 rs a
+
296 |   getNat m = get (natToFinLT m)
+
297 |
+
298 |   ||| Writes a value to a C pointer at the given position.
+
299 |   export %inline
+
300 |   set : SetPtr a => Fin n -> a -> F1' rs
+
301 |   set x v = ffi $ toPrim (setPtr (prim__inc_ptr r.ptr (cast $ finToNat x) (sizeof a)) v)
+
302 |
+
303 |   ||| Writes a value to a C pointer at the given position.
+
304 |   export %inline
+
305 |   setIx : SetPtr a => (0 m : Nat) -> (x : Ix (S m) n) => a -> F1' rs
+
306 |   setIx m = set (ixToFin x)
+
307 |
+
308 |   ||| Writes a value to a C pointer at the given position.
+
309 |   export %inline
+
310 |   setNat : SetPtr a => (m : Nat) -> (0 lt : LT m n) => a -> F1' rs
+
311 |   setNat m = set (natToFinLT m)
+
312 |
+
313 |   writeVect1 : SetPtr a => Vect k a -> Ix k n => F1' rs
+
314 |   writeVect1           []        t = () # t
+
315 |   writeVect1 {k = S m} (x :: xs) t =
+
316 |     let _ # t := setIx m x t
+
317 |      in writeVect1 xs t
+
318 |
+
319 |   ||| Writes the values from a vector to a C pointer
+
320 |   export %inline
+
321 |   writeVect : SetPtr a => Vect n a -> F1' rs
+
322 |   writeVect as = writeVect1 as
+
323 |
+
324 |   ||| Temporarily wraps the mutable array in an immutable wrapper and
+
325 |   ||| run a computation with that.
+
326 |   |||
+
327 |   ||| This is safe, because the pure function cannot possibly share the
+
328 |   ||| immutable array by storing it in a mutable reference. It is
+
329 |   ||| referentially transparent, because we call it from a linear context.
+
330 |   export %inline
+
331 |   withIArray : (CIArray n a -> b) -> F1 rs b
+
332 |   withIArray f t = f (IA r.ptr) # t
+
333 |
+
334 | ||| Writes the values from a list to a C pointer
+
335 | export %inline
+
336 | writeList :
+
337 |      {auto so  : SizeOf a}
+
338 |   -> {auto sp  : SetPtr a}
+
339 |   -> (as       : List a)
+
340 |   -> (r        : CArray' t (length as) a)
+
341 |   -> {auto 0 p : Res r rs}
+
342 |   -> F1' rs
+
343 | writeList as r = writeVect r (fromList as)
+
344 |
+
345 | export
+
346 | withCArray : SizeOf a => (n : Nat) -> (f : (r : CArray n a) -> F1 [r] b) -> b
+
347 | withCArray n f =
+
348 |   run1 $ \t =>
+
349 |     let A r t := malloc1 a n t
+
350 |         v # t := f r t
+
351 |         _ # t := free1 r t
+
352 |      in v # t
+
353 |
+
354 | export %inline
+
355 | fromListIO :
+
356 |      {auto has : HasIO io}
+
357 |   -> {auto sz  : SizeOf a}
+
358 |   -> {auto sp  : SetPtr a}
+
359 |   -> (as : List a)
+
360 |   -> io (CArrayIO (length as) a)
+
361 | fromListIO as = Prelude.do
+
362 |   arr <- malloc a (length as)
+
363 |   runIO $ writeList as arr
+
364 |   pure arr
+
365 |
diff --git a/docs/cptr/docs/docs/Data.C.Array8.html b/docs/cptr/docs/docs/Data.C.Array8.html new file mode 100644 index 000000000..6e6716e7a --- /dev/null +++ b/docs/cptr/docs/docs/Data.C.Array8.html @@ -0,0 +1,64 @@ + + + + + Data.C.Array8 + + + + + +
+ Idris2Doc : Data.C.Array8 + + + + +
+

Data.C.Array8

(source)

Reexports

importpublic Data.Fin
importpublic Data.Linear.Token
importpublic Data.Array.Index

Definitions

prim__setbits8 : AnyPtr->Integer->Bits8->PrimIO ()
prim__getbits8 : AnyPtr->Integer->Bits8
recordCIArray8 : Nat->Type
Totality: total
Visibility: export
Constructor: 
IA : AnyPtr->CIArray8n

Projection: 
.ptr : CIArray8n->AnyPtr
at : CIArray8n->Finn->Bits8
Totality: total
Visibility: export
ix : CIArray8n-> (0m : Nat) ->Ix (Sm) n=>Bits8
Totality: total
Visibility: export
atNat : CIArray8n-> (m : Nat) -> {auto0_ : LTmn} ->Bits8
Totality: total
Visibility: export
toVect : CIArray8n->VectnBits8
  Reads the values from a C pointer into a vector.

Totality: total
Visibility: export
foldrKV : (Finn->Bits8->b->b) ->b->CIArray8n->b
  Right fold over the values of an array plus their indices.

Totality: total
Visibility: export
foldr : (Bits8->b->b) ->b->CIArray8n->b
  Right fold over the values of an array

Totality: total
Visibility: export
foldlKV : (Finn->b->Bits8->b) ->b->CIArray8n->b
  Left fold over the values of an array plus their indices.

Totality: total
Visibility: export
foldl : (b->Bits8->b) ->b->CIArray8n->b
  Left fold over the values of an array

Totality: total
Visibility: export
recordCArray8' : RTag->Nat->Type
Totality: total
Visibility: export
Constructor: 
CA : AnyPtr->CArray8'tn

Projection: 
.ptr : CArray8'tn->AnyPtr

Hint: 
InIO (CArray8'RIOn)
0CArray8 : Nat->Type
  Convenience alias for `CArray8' RPure`

Totality: total
Visibility: public export
0CArray8IO : Nat->Type
  Convenience alias for `CArray8' RIO`

Totality: total
Visibility: public export
unsafeUnwrap : CArray8'tn->AnyPtr
Totality: total
Visibility: export
unsafeWrap : AnyPtr->CArray8'tn
Totality: total
Visibility: export
malloc : HasIOio=> (n : Nat) ->io (CArray8IOn)
  Allocates a new C-pointer of `sizeof a * n` bytes.

Totality: total
Visibility: export
calloc : HasIOio=> (n : Nat) ->io (CArray8IOn)
  Like `malloc` but resets all allocated bytes to zero.

Totality: total
Visibility: export
free : HasIOio=>CArray8IOn->io ()
Totality: total
Visibility: export
malloc1 : (n : Nat) -> (1_ : T1rs) ->A1rs (CArray8n)
  Allocates a new C-pointer of `sizeof a * n` bytes.

Totality: total
Visibility: export
calloc1 : (n : Nat) -> (1_ : T1rs) ->A1rs (CArray8n)
  Like `malloc1` but resets all allocated bytes to zero.

Totality: total
Visibility: export
free1 : (r : CArray8n) -> {auto0p : Resrrs} ->C1'rs (Droprsp)
  Frees the memory allocated for a C pointer and removes it from the
resources bound to the linear token.

Totality: total
Visibility: export
get : (r : CArray8'tn) -> {auto0_ : Resrrs} ->Finn->F1rsBits8
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
getIx : (r : CArray8'tn) -> {auto0_ : Resrrs} -> (0m : Nat) ->Ix (Sm) n=>F1rsBits8
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
getNat : (r : CArray8'tn) -> {auto0_ : Resrrs} -> (m : Nat) -> {auto0_ : LTmn} ->F1rsBits8
  Reads a value from a C-pointer at the given position.

Totality: total
Visibility: export
set : (r : CArray8'tn) -> {auto0_ : Resrrs} ->Finn->Bits8->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
setIx : (r : CArray8'tn) -> {auto0_ : Resrrs} -> (0m : Nat) ->Ix (Sm) n=>Bits8->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
setNat : (r : CArray8'tn) -> {auto0_ : Resrrs} -> (m : Nat) -> {auto0_ : LTmn} ->Bits8->F1'rs
  Writes a value to a C pointer at the given position.

Totality: total
Visibility: export
writeVect : (r : CArray8'tn) -> {auto0_ : Resrrs} ->VectnBits8->F1'rs
  Writes the values from a vector to a C pointer

Totality: total
Visibility: export
withIArray : (r : CArray8'tn) -> {auto0_ : Resrrs} -> (CIArray8n->b) ->F1rsb
  Temporarily wraps the mutable array in an immutable wrapper and
run a computation with that.

This is safe, because the pure function cannot possibly share the
immutable array by storing it in a mutable reference. It is
referentially transparent, because we call it from a linear context.

Totality: total
Visibility: export
writeList : (as : ListBits8) -> (r : CArray8't (lengthas)) -> {auto0_ : Resrrs} ->F1'rs
  Writes the values from a list to a C pointer

Totality: total
Visibility: export
withCArray : (n : Nat) -> ((r : CArray8n) ->F1 [r] b) ->b
Totality: total
Visibility: export
fromListIO : HasIOio=> (as : ListBits8) ->io (CArray8IO (lengthas))
Totality: total
Visibility: export
diff --git a/docs/cptr/docs/docs/Data.C.Array8.src.html b/docs/cptr/docs/docs/Data.C.Array8.src.html new file mode 100644 index 000000000..b2a175ce3 --- /dev/null +++ b/docs/cptr/docs/docs/Data.C.Array8.src.html @@ -0,0 +1,387 @@ + + + + + + + + + +
  0 | module Data.C.Array8
+
  1 |
+
  2 | import Data.C.Integer
+
  3 | import Data.C.Array
+
  4 | import Data.Vect
+
  5 |
+
  6 | import public Data.Fin
+
  7 | import public Data.Linear.Token
+
  8 | import public Data.Array.Index
+
  9 |
+
 10 | import Syntax.T1
+
 11 |
+
 12 | %default total
+
 13 |
+
 14 | export %foreign "scheme,chez:(lambda (x y z) (foreign-set! 'unsigned-8 x y z))"
+
 15 | prim__setbits8 : AnyPtr -> Integer -> Bits8 -> PrimIO ()
+
 16 |
+
 17 | export %foreign "scheme,chez:(lambda (x y) (foreign-ref 'unsigned-8 x y))"
+
 18 | prim__getbits8 : AnyPtr -> Integer -> Bits8
+
 19 |
+
 20 | --------------------------------------------------------------------------------
+
 21 | -- Immutable API
+
 22 | --------------------------------------------------------------------------------
+
 23 |
+
 24 | export
+
 25 | record CIArray8 (n : Nat) where
+
 26 |   constructor IA
+
 27 |   ptr : AnyPtr
+
 28 |
+
 29 | export %inline
+
 30 | at : CIArray8 n -> Fin n -> Bits8
+
 31 | at r x = prim__getbits8 r.ptr (cast $ finToNat x)
+
 32 |
+
 33 | export %inline
+
 34 | ix : CIArray8 n -> (0 m : Nat) -> (x : Ix (S m) n) => Bits8
+
 35 | ix r m = at r (ixToFin x)
+
 36 |
+
 37 | export %inline
+
 38 | atNat : CIArray8 n -> (m : Nat) -> (0 lt : LT m n) => Bits8
+
 39 | atNat r m = at r (natToFinLT m)
+
 40 |
+
 41 | foldrI : (m : Nat) -> (0 _ : LTE m n) => (Bits8 -> b -> b) -> b -> CIArray8 n -> b
+
 42 | foldrI 0     _ x r = x
+
 43 | foldrI (S k) f x r = foldrI k f (f (atNat r k) x) r
+
 44 |
+
 45 | foldrKV_ :
+
 46 |      (m : Nat)
+
 47 |   -> {auto 0 prf : LTE m n}
+
 48 |   -> (Fin n -> Bits8 -> b -> b)
+
 49 |   -> b
+
 50 |   -> CIArray8 n
+
 51 |   -> b
+
 52 | foldrKV_ 0     _ x r = x
+
 53 | foldrKV_ (S k) f x r =
+
 54 |   let fin := natToFinLT k @{prf} in foldrKV_ k f (f fin (at r fin) x) r
+
 55 |
+
 56 | foldlI : (m : Nat) -> (x : Ix m n) => (b -> Bits8 -> b) -> b -> CIArray8 n -> b
+
 57 | foldlI 0     _ v r = v
+
 58 | foldlI (S k) f v r = foldlI k f (f v (ix r k)) r
+
 59 |
+
 60 | foldlKV_ :
+
 61 |      (m : Nat)
+
 62 |   -> {auto x : Ix m n}
+
 63 |   -> (Fin n -> b -> Bits8 -> b)
+
 64 |   -> b
+
 65 |   -> CIArray8 n
+
 66 |   -> b
+
 67 | foldlKV_ 0     _ v r = v
+
 68 | foldlKV_ (S k) f v r =
+
 69 |   let fin := ixToFin x in foldlKV_ k f (f fin v (at r fin)) r
+
 70 |
+
 71 | ontoVect :
+
 72 |      (r : CIArray8 n)
+
 73 |   -> Vect m Bits8
+
 74 |   -> (k : Nat)
+
 75 |   -> {auto 0 lt : LTE k n}
+
 76 |   -> Vect (m+k) Bits8
+
 77 | ontoVect r vs 0     = rewrite plusCommutative m 0 in vs
+
 78 | ontoVect r vs (S x) =
+
 79 |   let v := atNat r x {lt}
+
 80 |    in rewrite sym (plusSuccRightSucc m x) in ontoVect r (v::vs) x
+
 81 |
+
 82 | ||| Reads the values from a C pointer into a vector.
+
 83 | export %inline
+
 84 | toVect : {n : _} -> (r : CIArray8 n) -> Vect n Bits8
+
 85 | toVect r = ontoVect r [] n
+
 86 |
+
 87 | ||| Right fold over the values of an array plus their indices.
+
 88 | export %inline
+
 89 | foldrKV : {n : _} -> (Fin n -> Bits8 -> b -> b) -> b -> CIArray8 n -> b
+
 90 | foldrKV = foldrKV_ n
+
 91 |
+
 92 | ||| Right fold over the values of an array
+
 93 | export %inline
+
 94 | foldr : {n : _} -> (Bits8 -> b -> b) -> b -> CIArray8 n -> b
+
 95 | foldr = foldrI n
+
 96 |
+
 97 | ||| Left fold over the values of an array plus their indices.
+
 98 | export %inline
+
 99 | foldlKV : {n : _} -> (Fin n -> b -> Bits8 -> b) -> b -> CIArray8 n -> b
+
100 | foldlKV = foldlKV_ n
+
101 |
+
102 | ||| Left fold over the values of an array
+
103 | export %inline
+
104 | foldl : {n : _} -> (b -> Bits8 -> b) -> b -> CIArray8 n -> b
+
105 | foldl = foldlI n
+
106 |
+
107 | --------------------------------------------------------------------------------
+
108 | -- IO-API
+
109 | --------------------------------------------------------------------------------
+
110 |
+
111 | export
+
112 | record CArray8' (t : RTag) (n : Nat) where
+
113 |   constructor CA
+
114 |   ptr : AnyPtr
+
115 |
+
116 | ||| Convenience alias for `CArray8' RPure`
+
117 | public export
+
118 | 0 CArray8 : Nat -> Type
+
119 | CArray8 = CArray8' RPure
+
120 |
+
121 | ||| Convenience alias for `CArray8' RIO`
+
122 | public export
+
123 | 0 CArray8IO : Nat -> Type
+
124 | CArray8IO = CArray8' RIO
+
125 |
+
126 | public export
+
127 | InIO (CArray8' RIO n) where
+
128 |
+
129 | export %inline
+
130 | unsafeUnwrap : CArray8' t n -> AnyPtr
+
131 | unsafeUnwrap = ptr
+
132 |
+
133 | export %inline
+
134 | unsafeWrap : AnyPtr -> CArray8' t n
+
135 | unsafeWrap = CA
+
136 |
+
137 | parameters {auto has : HasIO io}
+
138 |
+
139 |   ||| Allocates a new C-pointer of `sizeof a * n` bytes.
+
140 |   export %inline
+
141 |   malloc : (n : Nat) -> io (CArray8IO n)
+
142 |   malloc n = primIO $ MkIORes (CA $ prim__malloc (cast n))
+
143 |
+
144 |   ||| Like `malloc` but resets all allocated bytes to zero.
+
145 |   export %inline
+
146 |   calloc : (n : Nat) -> io (CArray8IO n)
+
147 |   calloc n =
+
148 |     primIO $ MkIORes (CA $ prim__calloc (cast n) 1)
+
149 |
+
150 |   export %inline
+
151 |   free : CArray8IO n -> io ()
+
152 |   free (CA p) = primIO $ prim__free p
+
153 |
+
154 | --------------------------------------------------------------------------------
+
155 | -- Linear API
+
156 | --------------------------------------------------------------------------------
+
157 |
+
158 | ||| Allocates a new C-pointer of `sizeof a * n` bytes.
+
159 | export %inline
+
160 | malloc1 : (n : Nat) -> (1 t : T1 rs) -> A1 rs (CArray8 n)
+
161 | malloc1 n t =
+
162 |   let p := prim__malloc (cast n)
+
163 |    in A (CA p) (unsafeBind t)
+
164 |
+
165 | ||| Like `malloc1` but resets all allocated bytes to zero.
+
166 | export %inline
+
167 | calloc1 : (n : Nat) -> (1 t : T1 rs) -> A1 rs (CArray8 n)
+
168 | calloc1 n t =
+
169 |   let p := prim__calloc (cast n) 1
+
170 |    in A (CA p) (unsafeBind t)
+
171 |
+
172 | ||| Frees the memory allocated for a C pointer and removes it from the
+
173 | ||| resources bound to the linear token.
+
174 | export %inline
+
175 | free1 : (r : CArray8 n) -> (0 p : Res r rs) => C1' rs (Drop rs p)
+
176 | free1 r t =
+
177 |   let MkIORes _ _ := prim__free r.ptr %MkWorld
+
178 |    in unsafeRelease p t
+
179 |
+
180 | parameters {0 n      : Nat}
+
181 |            {0 rs     : Resources}
+
182 |            (r        : CArray8' t n)
+
183 |            {auto 0 p : Res r rs}
+
184 |
+
185 |   ||| Reads a value from a C-pointer at the given position.
+
186 |   export %inline
+
187 |   get : Fin n -> F1 rs Bits8
+
188 |   get x t = prim__getbits8 r.ptr (cast $ finToNat x) # t
+
189 |
+
190 |   ||| Reads a value from a C-pointer at the given position.
+
191 |   export %inline
+
192 |   getIx : (0 m : Nat) -> (x : Ix (S m) n) => F1 rs Bits8
+
193 |   getIx m = get (ixToFin x)
+
194 |
+
195 |   ||| Reads a value from a C-pointer at the given position.
+
196 |   export %inline
+
197 |   getNat : (m : Nat) -> (0 lt : LT m n) => F1 rs Bits8
+
198 |   getNat m = get (natToFinLT m)
+
199 |
+
200 |   ||| Writes a value to a C pointer at the given position.
+
201 |   export %inline
+
202 |   set : Fin n -> Bits8 -> F1' rs
+
203 |   set x v = ffi $ prim__setbits8 r.ptr (cast $ finToNat x) v
+
204 |
+
205 |   ||| Writes a value to a C pointer at the given position.
+
206 |   export %inline
+
207 |   setIx : (0 m : Nat) -> (x : Ix (S m) n) => Bits8 -> F1' rs
+
208 |   setIx m = set (ixToFin x)
+
209 |
+
210 |   ||| Writes a value to a C pointer at the given position.
+
211 |   export %inline
+
212 |   setNat : (m : Nat) -> (0 lt : LT m n) => Bits8 -> F1' rs
+
213 |   setNat m = set (natToFinLT m)
+
214 |
+
215 |   writeVect1 : Vect k Bits8 -> Ix k n => F1' rs
+
216 |   writeVect1           []        t = () # t
+
217 |   writeVect1 {k = S m} (x :: xs) t =
+
218 |     let _ # t := Array8.setIx m x t
+
219 |      in writeVect1 xs t
+
220 |
+
221 |   ||| Writes the values from a vector to a C pointer
+
222 |   export %inline
+
223 |   writeVect : Vect n Bits8 -> F1' rs
+
224 |   writeVect as = writeVect1 as
+
225 |
+
226 |   ||| Temporarily wraps the mutable array in an immutable wrapper and
+
227 |   ||| run a computation with that.
+
228 |   |||
+
229 |   ||| This is safe, because the pure function cannot possibly share the
+
230 |   ||| immutable array by storing it in a mutable reference. It is
+
231 |   ||| referentially transparent, because we call it from a linear context.
+
232 |   export %inline
+
233 |   withIArray : (CIArray8 n -> b) -> F1 rs b
+
234 |   withIArray f t = f (IA r.ptr) # t
+
235 |
+
236 | ||| Writes the values from a list to a C pointer
+
237 | export %inline
+
238 | writeList :
+
239 |      (as       : List Bits8)
+
240 |   -> (r        : CArray8' t (length as))
+
241 |   -> {auto 0 p : Res r rs}
+
242 |   -> F1' rs
+
243 | writeList as r = writeVect r (fromList as)
+
244 |
+
245 | export
+
246 | withCArray : (n : Nat) -> (f : (r : CArray8 n) -> F1 [r] b) -> b
+
247 | withCArray n f =
+
248 |   run1 $ \t =>
+
249 |     let A r t := Array8.malloc1 n t
+
250 |         v # t := f r t
+
251 |         _ # t := Array8.free1 r t
+
252 |      in v # t
+
253 |
+
254 | export %inline
+
255 | fromListIO :
+
256 |      {auto has : HasIO io}
+
257 |   -> (as : List Bits8)
+
258 |   -> io (CArray8IO (length as))
+
259 | fromListIO as = Prelude.do
+
260 |   arr <- Array8.malloc (length as)
+
261 |   runIO $ writeList as arr
+
262 |   pure arr
+
263 |
+
+ + diff --git a/docs/cptr/docs/docs/Data.C.Deref.src.html b/docs/cptr/docs/docs/Data.C.Deref.src.html index 7c8905604..8c7e3f503 100644 --- a/docs/cptr/docs/docs/Data.C.Deref.src.html +++ b/docs/cptr/docs/docs/Data.C.Deref.src.html @@ -127,143 +127,159 @@
  6 | --------------------------------------------------------------------------------
  7 |
  8 | %foreign "C:cptr_deref_bits8, cptr-idris"
-
  9 | prim__deref_bits8 : AnyPtr -> PrimIO Bits8
-
 10 |
-
 11 | %foreign "C:cptr_deref_bits16, cptr-idris"
-
 12 | prim__deref_bits16 : AnyPtr -> PrimIO Bits16
-
 13 |
-
 14 | %foreign "C:cptr_deref_bits32, cptr-idris"
-
 15 | prim__deref_bits32 : AnyPtr -> PrimIO Bits32
-
 16 |
-
 17 | %foreign "C:cptr_deref_bits64, cptr-idris"
-
 18 | prim__deref_bits64 : AnyPtr -> PrimIO Bits64
+
  9 |          "scheme,chez:(lambda (x) (foreign-ref 'unsigned-8 x 0))"
+
 10 | prim__deref_bits8 : AnyPtr -> PrimIO Bits8
+
 11 |
+
 12 | %foreign "C:cptr_deref_bits16, cptr-idris"
+
 13 |          "scheme,chez:(lambda (x) (foreign-ref 'unsigned-16 x 0))"
+
 14 | prim__deref_bits16 : AnyPtr -> PrimIO Bits16
+
 15 |
+
 16 | %foreign "C:cptr_deref_bits32, cptr-idris"
+
 17 |          "scheme,chez:(lambda (x) (foreign-ref 'unsigned-32 x 0))"
+
 18 | prim__deref_bits32 : AnyPtr -> PrimIO Bits32
 19 |
-
 20 | %foreign "C:cptr_deref_int8, cptr-idris"
-
 21 | prim__deref_int8 : AnyPtr -> PrimIO Int8
-
 22 |
-
 23 | %foreign "C:cptr_deref_int16, cptr-idris"
-
 24 | prim__deref_int16 : AnyPtr -> PrimIO Int16
-
 25 |
-
 26 | %foreign "C:cptr_deref_int32, cptr-idris"
-
 27 | prim__deref_int32 : AnyPtr -> PrimIO Int32
-
 28 |
-
 29 | %foreign "C:cptr_deref_int64, cptr-idris"
-
 30 | prim__deref_int64 : AnyPtr -> PrimIO Int64
+
 20 | %foreign "C:cptr_deref_bits64, cptr-idris"
+
 21 |          "scheme,chez:(lambda (x) (foreign-ref 'unsigned-64 x 0))"
+
 22 | prim__deref_bits64 : AnyPtr -> PrimIO Bits64
+
 23 |
+
 24 | %foreign "C:cptr_deref_int8, cptr-idris"
+
 25 |          "scheme,chez:(lambda (x) (foreign-ref 'integer-8 x 0))"
+
 26 | prim__deref_int8 : AnyPtr -> PrimIO Int8
+
 27 |
+
 28 | %foreign "C:cptr_deref_int16, cptr-idris"
+
 29 |          "scheme,chez:(lambda (x) (foreign-ref 'integer-16 x 0))"
+
 30 | prim__deref_int16 : AnyPtr -> PrimIO Int16
 31 |
-
 32 | %foreign "C:cptr_deref_str, cptr-idris"
-
 33 | prim__deref_str : AnyPtr -> PrimIO String
-
 34 |
-
 35 | %foreign "C:cptr_set_bits8, cptr-idris"
-
 36 | prim__set_bits8 : AnyPtr -> Bits8 -> PrimIO ()
-
 37 |
-
 38 | %foreign "C:cptr_set_bits16, cptr-idris"
-
 39 | prim__set_bits16 : AnyPtr -> Bits16 -> PrimIO ()
-
 40 |
-
 41 | %foreign "C:cptr_set_bits32, cptr-idris"
-
 42 | prim__set_bits32 : AnyPtr -> Bits32 -> PrimIO ()
-
 43 |
-
 44 | %foreign "C:cptr_set_bits64, cptr-idris"
-
 45 | prim__set_bits64 : AnyPtr -> Bits64 -> PrimIO ()
+
 32 | %foreign "C:cptr_deref_int32, cptr-idris"
+
 33 |          "scheme,chez:(lambda (x) (foreign-ref 'integer-32 x 0))"
+
 34 | prim__deref_int32 : AnyPtr -> PrimIO Int32
+
 35 |
+
 36 | %foreign "C:cptr_deref_int64, cptr-idris"
+
 37 |          "scheme,chez:(lambda (x) (foreign-ref 'integer-64 x 0))"
+
 38 | prim__deref_int64 : AnyPtr -> PrimIO Int64
+
 39 |
+
 40 | %foreign "C:cptr_deref_str, cptr-idris"
+
 41 | prim__deref_str : AnyPtr -> PrimIO String
+
 42 |
+
 43 | %foreign "C:cptr_set_bits8, cptr-idris"
+
 44 |          "scheme,chez:(lambda (x y) (foreign-set! 'unsigned-8 x 0 y))"
+
 45 | prim__set_bits8 : AnyPtr -> Bits8 -> PrimIO ()
 46 |
-
 47 | %foreign "C:cptr_set_int8, cptr-idris"
-
 48 | prim__set_int8 : AnyPtr -> Int8 -> PrimIO ()
-
 49 |
-
 50 | %foreign "C:cptr_set_int16, cptr-idris"
-
 51 | prim__set_int16 : AnyPtr -> Int16 -> PrimIO ()
-
 52 |
-
 53 | %foreign "C:cptr_set_int32, cptr-idris"
-
 54 | prim__set_int32 : AnyPtr -> Int32 -> PrimIO ()
-
 55 |
-
 56 | %foreign "C:cptr_set_int64, cptr-idris"
-
 57 | prim__set_int64 : AnyPtr -> Int64 -> PrimIO ()
+
 47 | %foreign "C:cptr_set_bits16, cptr-idris"
+
 48 |          "scheme,chez:(lambda (x y) (foreign-set! 'unsigned-16 x 0 y))"
+
 49 | prim__set_bits16 : AnyPtr -> Bits16 -> PrimIO ()
+
 50 |
+
 51 | %foreign "C:cptr_set_bits32, cptr-idris"
+
 52 |          "scheme,chez:(lambda (x y) (foreign-set! 'unsigned-32 x 0 y))"
+
 53 | prim__set_bits32 : AnyPtr -> Bits32 -> PrimIO ()
+
 54 |
+
 55 | %foreign "C:cptr_set_bits64, cptr-idris"
+
 56 |          "scheme,chez:(lambda (x y) (foreign-set! 'unsigned-64 x 0 y))"
+
 57 | prim__set_bits64 : AnyPtr -> Bits64 -> PrimIO ()
 58 |
-
 59 | %foreign "C:cptr_set_str, cptr-idris"
-
 60 | prim__set_str : AnyPtr -> String -> PrimIO ()
-
 61 |
-
 62 | %foreign "C:cptr_set_null, cptr-idris"
-
 63 | prim__set_null : AnyPtr -> PrimIO ()
-
 64 |
-
 65 | %foreign "C:cptr_is_null, cptr-idris"
-
 66 | prim__is_null : AnyPtr -> Bits8
-
 67 |
-
 68 | --------------------------------------------------------------------------------
-
 69 | -- Interfaces
-
 70 | --------------------------------------------------------------------------------
-
 71 |
-
 72 | public export
-
 73 | interface Deref a where
-
 74 |   deref : AnyPtr -> IO a
-
 75 |
-
 76 | export %inline
-
 77 | Deref Bits8 where deref p = fromPrim $ prim__deref_bits8 p
-
 78 |
-
 79 | export %inline
-
 80 | Deref Bits16 where deref p = fromPrim $ prim__deref_bits16 p
-
 81 |
-
 82 | export %inline
-
 83 | Deref Bits32 where deref p = fromPrim $ prim__deref_bits32 p
-
 84 |
-
 85 | export %inline
-
 86 | Deref Bits64 where deref p = fromPrim $ prim__deref_bits64 p
+
 59 | %foreign "C:cptr_set_int8, cptr-idris"
+
 60 |          "scheme,chez:(lambda (x y) (foreign-set! 'integer-8 x 0 y))"
+
 61 | prim__set_int8 : AnyPtr -> Int8 -> PrimIO ()
+
 62 |
+
 63 | %foreign "C:cptr_set_int16, cptr-idris"
+
 64 |          "scheme,chez:(lambda (x y) (foreign-set! 'integer-16 x 0 y))"
+
 65 | prim__set_int16 : AnyPtr -> Int16 -> PrimIO ()
+
 66 |
+
 67 | %foreign "C:cptr_set_int32, cptr-idris"
+
 68 |          "scheme,chez:(lambda (x y) (foreign-set! 'integer-32 x 0 y))"
+
 69 | prim__set_int32 : AnyPtr -> Int32 -> PrimIO ()
+
 70 |
+
 71 | %foreign "C:cptr_set_int64, cptr-idris"
+
 72 |          "scheme,chez:(lambda (x y) (foreign-set! 'integer-64 x 0 y))"
+
 73 | prim__set_int64 : AnyPtr -> Int64 -> PrimIO ()
+
 74 |
+
 75 | %foreign "C:cptr_set_str, cptr-idris"
+
 76 | prim__set_str : AnyPtr -> String -> PrimIO ()
+
 77 |
+
 78 | %foreign "C:cptr_set_null, cptr-idris"
+
 79 | prim__set_null : AnyPtr -> PrimIO ()
+
 80 |
+
 81 | %foreign "C:cptr_is_null, cptr-idris"
+
 82 | prim__is_null : AnyPtr -> Bits8
+
 83 |
+
 84 | --------------------------------------------------------------------------------
+
 85 | -- Interfaces
+
 86 | --------------------------------------------------------------------------------
 87 |
-
 88 | export %inline
-
 89 | Deref Int8 where deref p = fromPrim $ prim__deref_int8 p
-
 90 |
-
 91 | export %inline
-
 92 | Deref Int16 where deref p = fromPrim $ prim__deref_int16 p
-
 93 |
-
 94 | export %inline
-
 95 | Deref Int32 where deref p = fromPrim $ prim__deref_int32 p
-
 96 |
-
 97 | export %inline
-
 98 | Deref Int64 where deref p = fromPrim $ prim__deref_int64 p
-
 99 |
-
100 | export %inline
-
101 | Deref String where deref p = fromPrim $ prim__deref_str p
-
102 |
-
103 | export %inline
-
104 | Deref (Maybe String) where
-
105 |   deref p =
-
106 |     case prim__is_null p of
-
107 |       0 => Just <$> deref p
-
108 |       _ => pure Nothing
+
 88 | public export
+
 89 | interface Deref a where
+
 90 |   deref : AnyPtr -> IO a
+
 91 |
+
 92 | export %inline
+
 93 | Deref Bits8 where deref p = fromPrim $ prim__deref_bits8 p
+
 94 |
+
 95 | export %inline
+
 96 | Deref Bits16 where deref p = fromPrim $ prim__deref_bits16 p
+
 97 |
+
 98 | export %inline
+
 99 | Deref Bits32 where deref p = fromPrim $ prim__deref_bits32 p
+
100 |
+
101 | export %inline
+
102 | Deref Bits64 where deref p = fromPrim $ prim__deref_bits64 p
+
103 |
+
104 | export %inline
+
105 | Deref Int8 where deref p = fromPrim $ prim__deref_int8 p
+
106 |
+
107 | export %inline
+
108 | Deref Int16 where deref p = fromPrim $ prim__deref_int16 p
109 |
-
110 | public export
-
111 | interface SetPtr a where
-
112 |   setPtr : AnyPtr -> a -> IO ()
-
113 |
-
114 | export %inline
-
115 | SetPtr Bits8 where setPtr p x = fromPrim $ prim__set_bits8 p x
-
116 |
-
117 | export %inline
-
118 | SetPtr Bits16 where setPtr p x = fromPrim $ prim__set_bits16 p x
-
119 |
-
120 | export %inline
-
121 | SetPtr Bits32 where setPtr p x = fromPrim $ prim__set_bits32 p x
-
122 |
-
123 | export %inline
-
124 | SetPtr Bits64 where setPtr p x = fromPrim $ prim__set_bits64 p x
+
110 | export %inline
+
111 | Deref Int32 where deref p = fromPrim $ prim__deref_int32 p
+
112 |
+
113 | export %inline
+
114 | Deref Int64 where deref p = fromPrim $ prim__deref_int64 p
+
115 |
+
116 | export %inline
+
117 | Deref String where deref p = fromPrim $ prim__deref_str p
+
118 |
+
119 | export %inline
+
120 | Deref (Maybe String) where
+
121 |   deref p =
+
122 |     case prim__is_null p of
+
123 |       0 => Just <$> deref p
+
124 |       _ => pure Nothing
125 |
-
126 | export %inline
-
127 | SetPtr Int8 where setPtr p x = fromPrim $ prim__set_int8 p x
-
128 |
-
129 | export %inline
-
130 | SetPtr Int16 where setPtr p x = fromPrim $ prim__set_int16 p x
-
131 |
-
132 | export %inline
-
133 | SetPtr Int32 where setPtr p x = fromPrim $ prim__set_int32 p x
-
134 |
-
135 | export %inline
-
136 | SetPtr Int64 where setPtr p x = fromPrim $ prim__set_int64 p x
-
137 |
-
138 | export %inline
-
139 | SetPtr String where setPtr p x = fromPrim $ prim__set_str p x
-
140 |
-
141 | export %inline
-
142 | SetPtr (Maybe String) where
-
143 |   setPtr p Nothing  = fromPrim $ prim__set_null p
-
144 |   setPtr p (Just s) = setPtr p s
-
145 |
+
126 | public export
+
127 | interface SetPtr a where
+
128 |   setPtr : AnyPtr -> a -> IO ()
+
129 |
+
130 | export %inline
+
131 | SetPtr Bits8 where setPtr p x = fromPrim $ prim__set_bits8 p x
+
132 |
+
133 | export %inline
+
134 | SetPtr Bits16 where setPtr p x = fromPrim $ prim__set_bits16 p x
+
135 |
+
136 | export %inline
+
137 | SetPtr Bits32 where setPtr p x = fromPrim $ prim__set_bits32 p x
+
138 |
+
139 | export %inline
+
140 | SetPtr Bits64 where setPtr p x = fromPrim $ prim__set_bits64 p x
+
141 |
+
142 | export %inline
+
143 | SetPtr Int8 where setPtr p x = fromPrim $ prim__set_int8 p x
+
144 |
+
145 | export %inline
+
146 | SetPtr Int16 where setPtr p x = fromPrim $ prim__set_int16 p x
+
147 |
+
148 | export %inline
+
149 | SetPtr Int32 where setPtr p x = fromPrim $ prim__set_int32 p x
+
150 |
+
151 | export %inline
+
152 | SetPtr Int64 where setPtr p x = fromPrim $ prim__set_int64 p x
+
153 |
+
154 | export %inline
+
155 | SetPtr String where setPtr p x = fromPrim $ prim__set_str p x
+
156 |
+
157 | export %inline
+
158 | SetPtr (Maybe String) where
+
159 |   setPtr p Nothing  = fromPrim $ prim__set_null p
+
160 |   setPtr p (Just s) = setPtr p s
+
161 |
diff --git a/docs/cptr/docs/docs/Data.C.Integer.html b/docs/cptr/docs/docs/Data.C.Integer.html index 3ed1d201d..f838e2229 100644 --- a/docs/cptr/docs/docs/Data.C.Integer.html +++ b/docs/cptr/docs/docs/Data.C.Integer.html @@ -61,4 +61,4 @@ -

Data.C.Integer

(source)

Definitions

0Short : Type
Totality: total
Visibility: public export
0CInt : Type
Totality: total
Visibility: public export
0Long : Type
Totality: total
Visibility: public export
0LongLong : Type
Totality: total
Visibility: public export
0UShort : Type
Totality: total
Visibility: public export
0UInt : Type
Totality: total
Visibility: public export
0ULong : Type
Totality: total
Visibility: public export
0ULongLong : Type
Totality: total
Visibility: public export
0PidT : Type
Totality: total
Visibility: public export
0UidT : Type
Totality: total
Visibility: public export
0GidT : Type
Totality: total
Visibility: public export
0IdT : Type
Totality: total
Visibility: public export
0KeyT : Type
Totality: total
Visibility: public export
0SsizeT : Type
Totality: total
Visibility: public export
0SizeT : Type
Totality: total
Visibility: public export
0ModeT : Type
Totality: total
Visibility: public export
0OffT : Type
Totality: total
Visibility: public export
0TimeT : Type
Totality: total
Visibility: public export
0ClockT : Type
Totality: total
Visibility: public export
0SusecondsT : Type
Totality: total
Visibility: public export
0NsecT : Type
Totality: total
Visibility: public export
TimespecSize : Nat
Totality: total
Visibility: public export
AnyPtrSize : Nat
Totality: total
Visibility: public export
0FsBlkCntT : Type
Totality: total
Visibility: public export
0FsFilCntT : Type
Totality: total
Visibility: public export
0DevT : Type
Totality: total
Visibility: public export
0InoT : Type
Totality: total
Visibility: public export
0NlinkT : Type
Totality: total
Visibility: public export
0BlkSizeT : Type
Totality: total
Visibility: public export
0BlkCntT : Type
Totality: total
Visibility: public export
+

Data.C.Integer

(source)

Definitions

0Short : Type
Totality: total
Visibility: public export
0CInt : Type
Totality: total
Visibility: public export
0Long : Type
Totality: total
Visibility: public export
0LongLong : Type
Totality: total
Visibility: public export
0UShort : Type
Totality: total
Visibility: public export
0UInt : Type
Totality: total
Visibility: public export
0ULong : Type
Totality: total
Visibility: public export
0ULongLong : Type
Totality: total
Visibility: public export
0PidT : Type
Totality: total
Visibility: public export
0UidT : Type
Totality: total
Visibility: public export
0GidT : Type
Totality: total
Visibility: public export
0IdT : Type
Totality: total
Visibility: public export
0KeyT : Type
Totality: total
Visibility: public export
0SsizeT : Type
Totality: total
Visibility: public export
0SizeT : Type
Totality: total
Visibility: public export
0ModeT : Type
Totality: total
Visibility: public export
0OffT : Type
Totality: total
Visibility: public export
0TimeT : Type
Totality: total
Visibility: public export
0ClockT : Type
Totality: total
Visibility: public export
0SusecondsT : Type
Totality: total
Visibility: public export
0NsecT : Type
Totality: total
Visibility: public export
TimespecSize : Bits32
Totality: total
Visibility: public export
AnyPtrSize : Bits32
Totality: total
Visibility: public export
0FsBlkCntT : Type
Totality: total
Visibility: public export
0FsFilCntT : Type
Totality: total
Visibility: public export
0DevT : Type
Totality: total
Visibility: public export
0InoT : Type
Totality: total
Visibility: public export
0NlinkT : Type
Totality: total
Visibility: public export
0BlkSizeT : Type
Totality: total
Visibility: public export
0BlkCntT : Type
Totality: total
Visibility: public export
diff --git a/docs/cptr/docs/docs/Data.C.Integer.src.html b/docs/cptr/docs/docs/Data.C.Integer.src.html index 0f4a947d7..5b2149a70 100644 --- a/docs/cptr/docs/docs/Data.C.Integer.src.html +++ b/docs/cptr/docs/docs/Data.C.Integer.src.html @@ -215,11 +215,11 @@
 94 | NsecT = Int64
 95 |
 96 | public export %inline
-
 97 | TimespecSize : Nat
+
 97 | TimespecSize : Bits32
 98 | TimespecSize = 16
 99 |
100 | public export %inline
-
101 | AnyPtrSize : Nat
+
101 | AnyPtrSize : Bits32
102 | AnyPtrSize = 8
103 |
104 | public export
diff --git a/docs/cptr/docs/docs/Data.C.SizeOf.html b/docs/cptr/docs/docs/Data.C.SizeOf.html index 914cac17f..b2e29e05a 100644 --- a/docs/cptr/docs/docs/Data.C.SizeOf.html +++ b/docs/cptr/docs/docs/Data.C.SizeOf.html @@ -61,4 +61,4 @@ -

Data.C.SizeOf

(source)

Definitions

interfaceSizeOf : Type->Type
  Interface for returning the size of a C object in bytes

Parameters: a
Methods:
sizeof_ : Nat

Implementations:
SizeOfInt8
SizeOfBits8
SizeOfInt16
SizeOfBits16
SizeOfInt32
SizeOfBits32
SizeOfInt64
SizeOfBits64
SizeOfString
SizeOf (MaybeString)
SizeOfa=>SizeOf (CArray'tna)
sizeof_ : SizeOfa=>Nat
Totality: total
Visibility: public export
sizeof : (0a : Type) ->SizeOfa=>Nat
Totality: total
Visibility: public export
+

Data.C.SizeOf

(source)

Definitions

interfaceSizeOf : Type->Type
  Interface for returning the size of a C object in bytes

Parameters: a
Methods:
sizeof_ : Bits32

Implementations:
SizeOfInt8
SizeOfBits8
SizeOfInt16
SizeOfBits16
SizeOfInt32
SizeOfBits32
SizeOfInt64
SizeOfBits64
SizeOfString
SizeOf (MaybeString)
SizeOfa=>SizeOf (CArray'tna)
sizeof_ : SizeOfa=>Bits32
Totality: total
Visibility: public export
sizeof : (0a : Type) ->SizeOfa=>Bits32
Totality: total
Visibility: public export
diff --git a/docs/cptr/docs/docs/Data.C.SizeOf.src.html b/docs/cptr/docs/docs/Data.C.SizeOf.src.html index a322a8f0b..f043a411a 100644 --- a/docs/cptr/docs/docs/Data.C.SizeOf.src.html +++ b/docs/cptr/docs/docs/Data.C.SizeOf.src.html @@ -127,10 +127,10 @@
 6 | ||| Interface for returning the size of a C object in bytes
 7 | public export
 8 | interface SizeOf a where
-
 9 |   sizeof_ : Nat
+
 9 |   sizeof_ : Bits32
10 |
11 | public export %inline
-
12 | sizeof : (0 a : Type) -> SizeOf a => Nat
+
12 | sizeof : (0 a : Type) -> SizeOf a => Bits32
13 | sizeof a = sizeof_ {a}
14 |
15 | --------------------------------------------------------------------------------
diff --git a/docs/cptr/docs/index.html b/docs/cptr/docs/index.html index 8841a952b..356627ee1 100644 --- a/docs/cptr/docs/index.html +++ b/docs/cptr/docs/index.html @@ -71,6 +71,15 @@
  • +
    + +
    + +
    +
    +
  • Data.C.Deref diff --git a/docs/cyby-draw/docs/docs/CyBy.Draw.Event.html b/docs/cyby-draw/docs/docs/CyBy.Draw.Event.html index 6e08ae2e2..403b0ccaa 100644 --- a/docs/cyby-draw/docs/docs/CyBy.Draw.Event.html +++ b/docs/cyby-draw/docs/docs/CyBy.Draw.Event.html @@ -61,4 +61,4 @@ -

    CyBy.Draw.Event

    (source)

    Definitions

    dataModifier : Type
      Modifier key such as "Shift" or "Ctrl" currently being pressed.

    Totality: total
    Visibility: public export
    Constructors:
    NoMod : Modifier
    Ctrl : Modifier
    Shift : Modifier

    Hints:
    EqModifier
    ShowModifier
    reset : Modifier->Modifier->Modifier
      Resets the pressed modifier key if it matches the keyboard key being
    lifted.

    Totality: total
    Visibility: export
    dataDrawMsg : Type
      A data type for logging messages.

    Typically, these will not be handled by cyby-draw directly but
    by applications embedding our drawing canvas into their own
    UI.

    Totality: total
    Visibility: public export
    Constructors:
    Copied : DrawMsg
      Data was copied to clipboard
    ReadErr : String->DrawMsg
      Invalid data was read from clipboard

    Hints:
    EqDrawMsg
    ShowDrawMsg
    dataDrawEvent : Type
    Totality: total
    Visibility: public export
    Constructors:
    ZoomIn : Bool->DrawEvent
    ZoomOut : Bool->DrawEvent
    Undo : DrawEvent
    Redo : DrawEvent
    SetElem : Elem->DrawEvent
    ChgElem : Elem->DrawEvent
    ChgCharge : Charge->DrawEvent
    ChgMass : MaybeMassNr->DrawEvent
    SelAbbr : Abbreviation->DrawEvent
    EnableAbbr : DrawEvent
    SetBond : MolBond->DrawEvent
    Move : Double->Double->DrawEvent
    LeftDown : DrawEvent
    LeftUp : DrawEvent
    MiddleDown : DrawEvent
    MiddleUp : DrawEvent
    SetTempl : CDGraph->DrawEvent
    SelectMode : DrawEvent
    KeyDown : String->DrawEvent
    KeyUp : String->DrawEvent
    EraseMode : DrawEvent
    Focus : DrawEvent
    Blur : DrawEvent
    Clear : DrawEvent
    Expand : DrawEvent
    Center : DrawEvent
    Msg : DrawMsg->DrawEvent
    EndResize : DrawEvent
    EndResizeHW : Double->Double->DrawEvent
    StartPSE : DrawEvent

    Hints:
    EqDrawEvent
    ShowDrawEvent
    Produced by Idris 2 version 0.7.0-6d02c5210
    +

    CyBy.Draw.Event

    (source)

    Definitions

    dataModifier : Type
      Modifier key such as "Shift" or "Ctrl" currently being pressed.

    Totality: total
    Visibility: public export
    Constructors:
    NoMod : Modifier
    Ctrl : Modifier
    Shift : Modifier

    Hints:
    EqModifier
    ShowModifier
    reset : Modifier->Modifier->Modifier
      Resets the pressed modifier key if it matches the keyboard key being
    lifted.

    Totality: total
    Visibility: export
    dataDrawMsg : Type
      A data type for logging messages.

    Typically, these will not be handled by cyby-draw directly but
    by applications embedding our drawing canvas into their own
    UI.

    Totality: total
    Visibility: public export
    Constructors:
    Copied : DrawMsg
      Data was copied to clipboard
    ReadErr : String->DrawMsg
      Invalid data was read from clipboard

    Hints:
    EqDrawMsg
    ShowDrawMsg
    dataDrawEvent : Type
    Totality: total
    Visibility: public export
    Constructors:
    ZoomIn : Bool->DrawEvent
    ZoomOut : Bool->DrawEvent
    Undo : DrawEvent
    Redo : DrawEvent
    SetElem : Elem->DrawEvent
    ChgElem : Elem->DrawEvent
    ChgCharge : Charge->DrawEvent
    ChgMass : MaybeMassNr->DrawEvent
    SelAbbr : Abbreviation->DrawEvent
    EnableAbbr : DrawEvent
    SetBond : MolBond->DrawEvent
    Move : Double->Double->DrawEvent
    LeftDown : DrawEvent
    LeftUp : DrawEvent
    MiddleDown : DrawEvent
    MiddleUp : DrawEvent
    SetTempl : CDGraph->DrawEvent
    SelectMode : DrawEvent
    KeyDown : String->DrawEvent
    KeyUp : String->DrawEvent
    EraseMode : DrawEvent
    Focus : DrawEvent
    Blur : DrawEvent
    Clear : DrawEvent
    Expand : DrawEvent
    Center : DrawEvent
    Msg : DrawMsg->DrawEvent
    EndResize : DrawEvent
    EndResizeHW : Double->Double->DrawEvent
    StartPSE : DrawEvent

    Hints:
    EqDrawEvent
    ShowDrawEvent
    Produced by Idris 2 version 0.7.0-6d02c5210
    diff --git a/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Atom.html b/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Atom.html index 4c1dd3070..24ef66dc9 100644 --- a/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Atom.html +++ b/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Atom.html @@ -61,4 +61,4 @@ -

    CyBy.Draw.Internal.Atom

    (source)

    Definitions

    recordCDAtom : Type
      Atom type used in the application state of cyby-draw.

    This is a mol-file atom with perceived atom type paired with a role
    used for drawing.

    Totality: total
    Visibility: public export
    Constructor: 
    CA : Role->MolAtomAT->CDAtom

    Projections:
    .atom : CDAtom->MolAtomAT
    .role : CDAtom->Role

    Hints:
    CastCDAtomRole
    Cast (AdjkbCDAtom) Role
    Cast (ContextkbCDAtom) Role
    CastCDAtomElem
    EqCDAtom
    GetPointCDAtom
    ModPointCDAtom
    ModRoleCDAtom
    ShowCDAtom
    .role : CDAtom->Role
    Totality: total
    Visibility: public export
    role : CDAtom->Role
    Totality: total
    Visibility: public export
    .atom : CDAtom->MolAtomAT
    Totality: total
    Visibility: public export
    atom : CDAtom->MolAtomAT
    Totality: total
    Visibility: public export
    group : CDAtom->MaybeAtomGroup
    Totality: total
    Visibility: export
    inAnyGroup : CDAtom->Bool
    Totality: total
    Visibility: export
    setGroup : AtomGroup->CDAtom->CDAtom
      Sets the given `AtomGroup` (abbreviation) at an atom

    Totality: total
    Visibility: export
    clearGroup : Nat->CDAtom->CDAtom
      Unsets the abbreviation label of an atom if it belongs to
    the given group.

    Totality: total
    Visibility: export
    inGroup : Nat->CDAtom->Bool
      True, if the given atom is part of the abbreviation with the given ID.

    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    +

    CyBy.Draw.Internal.Atom

    (source)

    Definitions

    recordCDAtom : Type
      Atom type used in the application state of cyby-draw.

    This is a mol-file atom with perceived atom type paired with a role
    used for drawing.

    Totality: total
    Visibility: public export
    Constructor: 
    CA : Role->MolAtomAT->CDAtom

    Projections:
    .atom : CDAtom->MolAtomAT
    .role : CDAtom->Role

    Hints:
    CastCDAtomRole
    Cast (AdjkbCDAtom) Role
    Cast (ContextkbCDAtom) Role
    CastCDAtomElem
    EqCDAtom
    GetPointCDAtom
    ModPointCDAtom
    ModRoleCDAtom
    ShowCDAtom
    .role : CDAtom->Role
    Totality: total
    Visibility: public export
    role : CDAtom->Role
    Totality: total
    Visibility: public export
    .atom : CDAtom->MolAtomAT
    Totality: total
    Visibility: public export
    atom : CDAtom->MolAtomAT
    Totality: total
    Visibility: public export
    group : CDAtom->MaybeAtomGroup
    Totality: total
    Visibility: export
    inAnyGroup : CDAtom->Bool
    Totality: total
    Visibility: export
    setGroup : AtomGroup->CDAtom->CDAtom
      Sets the given `AtomGroup` (abbreviation) at an atom

    Totality: total
    Visibility: export
    clearGroup : Nat->CDAtom->CDAtom
      Unsets the abbreviation label of an atom if it belongs to
    the given group.

    Totality: total
    Visibility: export
    inGroup : Nat->CDAtom->Bool
      True, if the given atom is part of the abbreviation with the given ID.

    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    diff --git a/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.CoreDims.html b/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.CoreDims.html index 8b86bc896..06b17e7ca 100644 --- a/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.CoreDims.html +++ b/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.CoreDims.html @@ -61,4 +61,4 @@ -

    CyBy.Draw.Internal.CoreDims

    (source)

    Definitions

    recordCoreDims : Type
      Core drawing settings used for computing the geometric properties of
    drawn molecules.

    Totality: total
    Visibility: public export
    Constructor: 
    CD : Double->Double->Double->Double-> (angleSteps : Nat) ->String->Nat->Nat->Double->Double->Double->Double->Double->Measure-> (0_ : IsSuccangleSteps) ->CoreDims

    Projections:
    .angleSteps : CoreDims->Nat
    .bondBGWidth : CoreDims->Double
    .bondWidth : CoreDims->Double
    .downWedgeGap : CoreDims->Double
      Gap between two bars of a downward facing wedge
    .font : CoreDims->String
    .fontSize : CoreDims->Nat
    .halfWaveLength : CoreDims->Double
      Half the wavelength of a wavy bond
    .measure : CoreDims->Measure
      Utility used for measuring text
    .radiusAtom : CoreDims->Double
    .selectBufferSize : CoreDims->Double
    0.stepsPrf : ({rec:0} : CoreDims) ->IsSucc (angleSteps{rec:0})
    .subscriptSize : CoreDims->Nat
    .waveAmplitude : CoreDims->Double
      Amplitude of a wavy bond
    .wedgeNarrowEnd : CoreDims->Double
      Width of the narrow end of a wedge
    .wedgeWideEnd : CoreDims->Double
      Width of the wide end of a wedge

    Hints:
    CoreDims=>BoundedLabel
    DrawSettings=>CoreDims
    .radiusAtom : CoreDims->Double
    Totality: total
    Visibility: public export
    radiusAtom : CoreDims->Double
    Totality: total
    Visibility: public export
    .bondWidth : CoreDims->Double
    Totality: total
    Visibility: public export
    bondWidth : CoreDims->Double
    Totality: total
    Visibility: public export
    .bondBGWidth : CoreDims->Double
    Totality: total
    Visibility: public export
    bondBGWidth : CoreDims->Double
    Totality: total
    Visibility: public export
    .selectBufferSize : CoreDims->Double
    Totality: total
    Visibility: public export
    selectBufferSize : CoreDims->Double
    Totality: total
    Visibility: public export
    .angleSteps : CoreDims->Nat
    Totality: total
    Visibility: public export
    angleSteps : CoreDims->Nat
    Totality: total
    Visibility: public export
    .font : CoreDims->String
    Totality: total
    Visibility: public export
    font : CoreDims->String
    Totality: total
    Visibility: public export
    .fontSize : CoreDims->Nat
    Totality: total
    Visibility: public export
    fontSize : CoreDims->Nat
    Totality: total
    Visibility: public export
    .subscriptSize : CoreDims->Nat
    Totality: total
    Visibility: public export
    subscriptSize : CoreDims->Nat
    Totality: total
    Visibility: public export
    .downWedgeGap : CoreDims->Double
      Gap between two bars of a downward facing wedge

    Totality: total
    Visibility: public export
    downWedgeGap : CoreDims->Double
      Gap between two bars of a downward facing wedge

    Totality: total
    Visibility: public export
    .wedgeNarrowEnd : CoreDims->Double
      Width of the narrow end of a wedge

    Totality: total
    Visibility: public export
    wedgeNarrowEnd : CoreDims->Double
      Width of the narrow end of a wedge

    Totality: total
    Visibility: public export
    .wedgeWideEnd : CoreDims->Double
      Width of the wide end of a wedge

    Totality: total
    Visibility: public export
    wedgeWideEnd : CoreDims->Double
      Width of the wide end of a wedge

    Totality: total
    Visibility: public export
    .halfWaveLength : CoreDims->Double
      Half the wavelength of a wavy bond

    Totality: total
    Visibility: public export
    halfWaveLength : CoreDims->Double
      Half the wavelength of a wavy bond

    Totality: total
    Visibility: public export
    .waveAmplitude : CoreDims->Double
      Amplitude of a wavy bond

    Totality: total
    Visibility: public export
    waveAmplitude : CoreDims->Double
      Amplitude of a wavy bond

    Totality: total
    Visibility: public export
    .measure : CoreDims->Measure
      Utility used for measuring text

    Totality: total
    Visibility: public export
    measure : CoreDims->Measure
      Utility used for measuring text

    Totality: total
    Visibility: public export
    0.stepsPrf : ({rec:0} : CoreDims) ->IsSucc (angleSteps{rec:0})
    Totality: total
    Visibility: public export
    0stepsPrf : ({rec:0} : CoreDims) ->IsSucc (angleSteps{rec:0})
    Totality: total
    Visibility: public export
    defaultCore : CoreDims
    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    +

    CyBy.Draw.Internal.CoreDims

    (source)

    Definitions

    recordCoreDims : Type
      Core drawing settings used for computing the geometric properties of
    drawn molecules.

    Totality: total
    Visibility: public export
    Constructor: 
    CD : Double->Double->Double->Double-> (angleSteps : Nat) ->String->Nat->Nat->Double->Double->Double->Double->Double->Measure-> (0_ : IsSuccangleSteps) ->CoreDims

    Projections:
    .angleSteps : CoreDims->Nat
    .bondBGWidth : CoreDims->Double
    .bondWidth : CoreDims->Double
    .downWedgeGap : CoreDims->Double
      Gap between two bars of a downward facing wedge
    .font : CoreDims->String
    .fontSize : CoreDims->Nat
    .halfWaveLength : CoreDims->Double
      Half the wavelength of a wavy bond
    .measure : CoreDims->Measure
      Utility used for measuring text
    .radiusAtom : CoreDims->Double
    .selectBufferSize : CoreDims->Double
    0.stepsPrf : ({rec:0} : CoreDims) ->IsSucc (angleSteps{rec:0})
    .subscriptSize : CoreDims->Nat
    .waveAmplitude : CoreDims->Double
      Amplitude of a wavy bond
    .wedgeNarrowEnd : CoreDims->Double
      Width of the narrow end of a wedge
    .wedgeWideEnd : CoreDims->Double
      Width of the wide end of a wedge

    Hints:
    CoreDims=>BoundedLabel
    DrawSettings=>CoreDims
    .radiusAtom : CoreDims->Double
    Totality: total
    Visibility: public export
    radiusAtom : CoreDims->Double
    Totality: total
    Visibility: public export
    .bondWidth : CoreDims->Double
    Totality: total
    Visibility: public export
    bondWidth : CoreDims->Double
    Totality: total
    Visibility: public export
    .bondBGWidth : CoreDims->Double
    Totality: total
    Visibility: public export
    bondBGWidth : CoreDims->Double
    Totality: total
    Visibility: public export
    .selectBufferSize : CoreDims->Double
    Totality: total
    Visibility: public export
    selectBufferSize : CoreDims->Double
    Totality: total
    Visibility: public export
    .angleSteps : CoreDims->Nat
    Totality: total
    Visibility: public export
    angleSteps : CoreDims->Nat
    Totality: total
    Visibility: public export
    .font : CoreDims->String
    Totality: total
    Visibility: public export
    font : CoreDims->String
    Totality: total
    Visibility: public export
    .fontSize : CoreDims->Nat
    Totality: total
    Visibility: public export
    fontSize : CoreDims->Nat
    Totality: total
    Visibility: public export
    .subscriptSize : CoreDims->Nat
    Totality: total
    Visibility: public export
    subscriptSize : CoreDims->Nat
    Totality: total
    Visibility: public export
    .downWedgeGap : CoreDims->Double
      Gap between two bars of a downward facing wedge

    Totality: total
    Visibility: public export
    downWedgeGap : CoreDims->Double
      Gap between two bars of a downward facing wedge

    Totality: total
    Visibility: public export
    .wedgeNarrowEnd : CoreDims->Double
      Width of the narrow end of a wedge

    Totality: total
    Visibility: public export
    wedgeNarrowEnd : CoreDims->Double
      Width of the narrow end of a wedge

    Totality: total
    Visibility: public export
    .wedgeWideEnd : CoreDims->Double
      Width of the wide end of a wedge

    Totality: total
    Visibility: public export
    wedgeWideEnd : CoreDims->Double
      Width of the wide end of a wedge

    Totality: total
    Visibility: public export
    .halfWaveLength : CoreDims->Double
      Half the wavelength of a wavy bond

    Totality: total
    Visibility: public export
    halfWaveLength : CoreDims->Double
      Half the wavelength of a wavy bond

    Totality: total
    Visibility: public export
    .waveAmplitude : CoreDims->Double
      Amplitude of a wavy bond

    Totality: total
    Visibility: public export
    waveAmplitude : CoreDims->Double
      Amplitude of a wavy bond

    Totality: total
    Visibility: public export
    .measure : CoreDims->Measure
      Utility used for measuring text

    Totality: total
    Visibility: public export
    measure : CoreDims->Measure
      Utility used for measuring text

    Totality: total
    Visibility: public export
    0.stepsPrf : ({rec:0} : CoreDims) ->IsSucc (angleSteps{rec:0})
    Totality: total
    Visibility: public export
    0stepsPrf : ({rec:0} : CoreDims) ->IsSucc (angleSteps{rec:0})
    Totality: total
    Visibility: public export
    defaultCore : CoreDims
    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    diff --git a/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Label.html b/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Label.html index 31fc6fb1c..60e11d536 100644 --- a/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Label.html +++ b/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Label.html @@ -61,4 +61,4 @@ -

    CyBy.Draw.Internal.Label

    (source)

    Definitions

    lineEndRadius : Double
    Totality: total
    Visibility: export
    dataHPos : Type
      Position of implicit hydrogen label.
    These are placed in such a way that they interfere as little as
    possible with the bonds leading to an atom's neighbours

    Totality: total
    Visibility: public export
    Constructors:
    NoH : HPos
    N : HPos
    W : HPos
    S : HPos
    E : HPos
    recordText : Type->Type
      A text label together with the text metrics we need to properly
    center it around its position `pos`

    Totality: total
    Visibility: public export
    Constructor: 
    T : Nat->String->a->TextDims->Texta

    Projections:
    .dims : Texta->TextDims
    .fsize : Texta->Nat
    .pos : Texta->a
    .text : Texta->String

    Hint: 
    Bounded (Text (PointId))
    .fsize : Texta->Nat
    Totality: total
    Visibility: public export
    fsize : Texta->Nat
    Totality: total
    Visibility: public export
    .text : Texta->String
    Totality: total
    Visibility: public export
    text : Texta->String
    Totality: total
    Visibility: public export
    .pos : Texta->a
    Totality: total
    Visibility: public export
    pos : Texta->a
    Totality: total
    Visibility: public export
    .dims : Texta->TextDims
    Totality: total
    Visibility: public export
    dims : Texta->TextDims
    Totality: total
    Visibility: public export
    .h : Texta->Double
    Totality: total
    Visibility: export
    .lh : Texta->Double
    Totality: total
    Visibility: export
    .w : Texta->Double
    Totality: total
    Visibility: export
    noLbl : Text ()
      The empty text label

    Totality: total
    Visibility: export
    text : CoreDims=>Bool->String->Text ()
      Returns a `Label` for a string together with its `TextDims`

    Totality: total
    Visibility: export
    radius : Texta->MaybeDouble
      Computes the radius of the background circle of a text label.

    Totality: total
    Visibility: export
    adjEndPoints : PointId->PointId->MaybeDouble->MaybeDouble->Maybe (PointId, PointId)
      Adjusts the end point of an edge based on the radius of
    their background labels.

    Totality: total
    Visibility: export
    .textPos : Text (PointId) ->PointId
      Position where the text label should be placed in the canvas
    to correctly center it around the point given in its `pos` field

    Totality: total
    Visibility: export
    recordAtomLabels : Type->Type
      Text labels for an atom's symbol, charge, mass number,
    implicit hydrogen, and implicit hydrogen count

    Totality: total
    Visibility: public export
    Constructor: 
    AL : Texta->Texta->Texta->Texta->Texta->AtomLabelsa

    Projections:
    .charge : AtomLabelsa->Texta
    .hcount : AtomLabelsa->Texta
    .hydrogen : AtomLabelsa->Texta
    .mass : AtomLabelsa->Texta
    .symbol : AtomLabelsa->Texta

    Hint: 
    Bounded (AtomLabels (PointId))
    .symbol : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    symbol : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    .charge : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    charge : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    .mass : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    mass : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    .hydrogen : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    hydrogen : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    .hcount : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    hcount : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    labels : AtomLabelsa->List (Texta)
    Totality: total
    Visibility: export
    chargeLabel : Charge->String
    Totality: total
    Visibility: export
    massLabel : MaybeMassNr->String
    Totality: total
    Visibility: export
    hlabel : HCount->String
    Totality: total
    Visibility: export
    hsubscript : HCount->String
    Totality: total
    Visibility: export
    setPositions : HPos->PointId->AtomLabels () ->AtomLabels (PointId)
      Compute the exact positions of all parts of an atom's labels based
    on the determined position of the hydrogen label (`HPos`), the position
    of the atom in the molecule, and the metrics of all labels we want
    to display.

    Totality: total
    Visibility: export
    dataAbbrPos : Type
    Totality: total
    Visibility: public export
    Constructors:
    AE : AbbrPos
    AW : AbbrPos
    abbrTextPos : CoreDims=>AbbrPos->PointId->Text () ->Text (PointId)
    Totality: total
    Visibility: export
    updateElem : String->Elem->Elem
      Based on a string input (currently, a single character) and the current
    element, selects the next element from all elements the symbol of which
    starts with the input character.

    This allows us to use keyboard shortcuts to change the element of the
    atom over which we currently hover.

    Totality: total
    Visibility: export
    updateIsotope : String->Isotope->Isotope
      Uses `updateElem` to change the element of an isotope.

    Totality: total
    Visibility: export
    masses : Elem->List (MaybeMassNr)
    Totality: total
    Visibility: export
    incIso : Isotope->Isotope
    Totality: total
    Visibility: export
    decIso : Isotope->Isotope
    Totality: total
    Visibility: export
    dataLabel : Type
    Totality: total
    Visibility: public export
    Constructors:
    Hidden : Label
    NoLabel : PointId->Label
    Abbreviation : PointId->Text (PointId) ->Label
    Explicit : AtomLabels (PointId) ->Label

    Hint: 
    CoreDims=>BoundedLabel
    0Labels : Nat->Type
    Totality: total
    Visibility: public export
    trimToCircle : Pointt->Vector (transformt) ->Pointt->Double->Double
      Given a starting point and a vector, tries to find the
    first intersection of the resulting line segment with a
    circle given by its center and radius.

    Totality: total
    Visibility: export
    endpoints : CoreDims=>PointId->PointId->Label->Label->Maybe (PointId, PointId)
      Computes the end points of a bond based on the atom positions and
    atom labels so that the bonds do not overlap with the labels.

    Totality: total
    Visibility: export
    abbrPos : CDIGraphk->Fink->AbbrPos
      Relative position, where the label of an abbreviated group will be
    placed.

    Totality: total
    Visibility: export
    bestHPos : ListAngle->HPos
      Determines the position of the "H"-label depending on the angles of
    bonds leading to neighbours

    Totality: total
    Visibility: export
    hpos : CDIGraphk->Fink->HPos
      Determines the position of the "H" label (if any)
    relative to an atom's symbol. To do this, this computes the angles
    of all bonds leading to an atom's neighbours and tries to find
    a direction (north, west, south, or east) without any neighbouring bonds

    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    +

    CyBy.Draw.Internal.Label

    (source)

    Definitions

    lineEndRadius : Double
    Totality: total
    Visibility: export
    dataHPos : Type
      Position of implicit hydrogen label.
    These are placed in such a way that they interfere as little as
    possible with the bonds leading to an atom's neighbours

    Totality: total
    Visibility: public export
    Constructors:
    NoH : HPos
    N : HPos
    W : HPos
    S : HPos
    E : HPos
    recordText : Type->Type
      A text label together with the text metrics we need to properly
    center it around its position `pos`

    Totality: total
    Visibility: public export
    Constructor: 
    T : Nat->String->a->TextDims->Texta

    Projections:
    .dims : Texta->TextDims
    .fsize : Texta->Nat
    .pos : Texta->a
    .text : Texta->String

    Hint: 
    Bounded (Text (PointId))
    .fsize : Texta->Nat
    Totality: total
    Visibility: public export
    fsize : Texta->Nat
    Totality: total
    Visibility: public export
    .text : Texta->String
    Totality: total
    Visibility: public export
    text : Texta->String
    Totality: total
    Visibility: public export
    .pos : Texta->a
    Totality: total
    Visibility: public export
    pos : Texta->a
    Totality: total
    Visibility: public export
    .dims : Texta->TextDims
    Totality: total
    Visibility: public export
    dims : Texta->TextDims
    Totality: total
    Visibility: public export
    .h : Texta->Double
    Totality: total
    Visibility: export
    .lh : Texta->Double
    Totality: total
    Visibility: export
    .w : Texta->Double
    Totality: total
    Visibility: export
    noLbl : Text ()
      The empty text label

    Totality: total
    Visibility: export
    text : CoreDims=>Bool->String->Text ()
      Returns a `Label` for a string together with its `TextDims`

    Totality: total
    Visibility: export
    radius : Texta->MaybeDouble
      Computes the radius of the background circle of a text label.

    Totality: total
    Visibility: export
    adjEndPoints : PointId->PointId->MaybeDouble->MaybeDouble->Maybe (PointId, PointId)
      Adjusts the end point of an edge based on the radius of
    their background labels.

    Totality: total
    Visibility: export
    .textPos : Text (PointId) ->PointId
      Position where the text label should be placed in the canvas
    to correctly center it around the point given in its `pos` field

    Totality: total
    Visibility: export
    recordAtomLabels : Type->Type
      Text labels for an atom's symbol, charge, mass number,
    implicit hydrogen, and implicit hydrogen count

    Totality: total
    Visibility: public export
    Constructor: 
    AL : Texta->Texta->Texta->Texta->Texta->AtomLabelsa

    Projections:
    .charge : AtomLabelsa->Texta
    .hcount : AtomLabelsa->Texta
    .hydrogen : AtomLabelsa->Texta
    .mass : AtomLabelsa->Texta
    .symbol : AtomLabelsa->Texta

    Hint: 
    Bounded (AtomLabels (PointId))
    .symbol : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    symbol : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    .charge : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    charge : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    .mass : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    mass : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    .hydrogen : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    hydrogen : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    .hcount : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    hcount : AtomLabelsa->Texta
    Totality: total
    Visibility: public export
    labels : AtomLabelsa->List (Texta)
    Totality: total
    Visibility: export
    chargeLabel : Charge->String
    Totality: total
    Visibility: export
    massLabel : MaybeMassNr->String
    Totality: total
    Visibility: export
    hlabel : HCount->String
    Totality: total
    Visibility: export
    hsubscript : HCount->String
    Totality: total
    Visibility: export
    setPositions : HPos->PointId->AtomLabels () ->AtomLabels (PointId)
      Compute the exact positions of all parts of an atom's labels based
    on the determined position of the hydrogen label (`HPos`), the position
    of the atom in the molecule, and the metrics of all labels we want
    to display.

    Totality: total
    Visibility: export
    dataAbbrPos : Type
    Totality: total
    Visibility: public export
    Constructors:
    AE : AbbrPos
    AW : AbbrPos
    abbrTextPos : CoreDims=>AbbrPos->PointId->Text () ->Text (PointId)
    Totality: total
    Visibility: export
    updateElem : String->Elem->Elem
      Based on a string input (currently, a single character) and the current
    element, selects the next element from all elements the symbol of which
    starts with the input character.

    This allows us to use keyboard shortcuts to change the element of the
    atom over which we currently hover.

    Totality: total
    Visibility: export
    updateIsotope : String->Isotope->Isotope
      Uses `updateElem` to change the element of an isotope.

    Totality: total
    Visibility: export
    masses : Elem->List (MaybeMassNr)
    Totality: total
    Visibility: export
    incIso : Isotope->Isotope
    Totality: total
    Visibility: export
    decIso : Isotope->Isotope
    Totality: total
    Visibility: export
    dataLabel : Type
    Totality: total
    Visibility: public export
    Constructors:
    Hidden : Label
    NoLabel : PointId->Label
    Abbreviation : PointId->Text (PointId) ->Label
    Explicit : AtomLabels (PointId) ->Label

    Hint: 
    CoreDims=>BoundedLabel
    0Labels : Nat->Type
    Totality: total
    Visibility: public export
    trimToCircle : Pointt->Vector (transformt) ->Pointt->Double->Double
      Given a starting point and a vector, tries to find the
    first intersection of the resulting line segment with a
    circle given by its center and radius.

    Totality: total
    Visibility: export
    endpoints : CoreDims=>PointId->PointId->Label->Label->Maybe (PointId, PointId)
      Computes the end points of a bond based on the atom positions and
    atom labels so that the bonds do not overlap with the labels.

    Totality: total
    Visibility: export
    abbrPos : CDIGraphk->Fink->AbbrPos
      Relative position, where the label of an abbreviated group will be
    placed.

    Totality: total
    Visibility: export
    bestHPos : ListAngle->HPos
      Determines the position of the "H"-label depending on the angles of
    bonds leading to neighbours

    Totality: total
    Visibility: export
    hpos : CDIGraphk->Fink->HPos
      Determines the position of the "H" label (if any)
    relative to an atom's symbol. To do this, this computes the angles
    of all bonds leading to an atom's neighbours and tries to find
    a direction (north, west, south, or east) without any neighbouring bonds

    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    diff --git a/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Role.html b/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Role.html index 8a31db08b..9a1402324 100644 --- a/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Role.html +++ b/docs/cyby-draw/docs/docs/CyBy.Draw.Internal.Role.html @@ -61,4 +61,4 @@ -

    CyBy.Draw.Internal.Role

    (source)

    Definitions

    recordRole : Type
      The role(s) an object (typically an atom or bond) in the
    drawing currently has (for instance, it is selected, or
    the mouse hovers over it, or it is currently being drawn).

    We encode this as a bit pattern to facilitate adding new roles and
    having several roles set simultaneously.

    `Role` is a semigroup (using bitwise "or", `(.|.)`, for append) and
    a monoid, with 0 as the neutral element.

    Totality: total
    Visibility: public export
    Constructor: 
    R : Bits8->Role

    Projection: 
    .role : Role->Bits8

    Hints:
    CastCDAtomRole
    Cast (AdjkbCDAtom) Role
    Cast (ContextkbCDAtom) Role
    CastCDBondRole
    EqRole
    ModRoleRole
    MonoidRole
    OrdRole
    SemigroupRole
    ShowRole
    .role : Role->Bits8
    Totality: total
    Visibility: public export
    role : Role->Bits8
    Totality: total
    Visibility: public export
    Selected : Role
    Totality: total
    Visibility: public export
    Persistent : Role
    Totality: total
    Visibility: public export
    Origin : Role
    Totality: total
    Visibility: public export
    None : Role
    Totality: total
    Visibility: public export
    New : Role
    Totality: total
    Visibility: public export
    HoverNew : Role
    Totality: total
    Visibility: public export
    Hover : Role
    Totality: total
    Visibility: public export
    Highlight : Role
    Totality: total
    Visibility: public export
    interfaceModRole : Type->Type
      Interface for objects with a `Role` we can modify

    Parameters: a
    Methods:
    modRole : (Role->Role) ->a->a

    Implementations:
    ModRoleCDAtom
    ModRoleRole
    ModRoleCDBond
    modRole : ModRolea=> (Role->Role) ->a->a
    Totality: total
    Visibility: public export
    setIf : ModRolea=>Role->Bool->a->a
      Sets the given role at an object in the drawing

    Totality: total
    Visibility: export
    set : ModRolea=>Role->a->a
      Sets the given role at an object in the drawing

    Totality: total
    Visibility: export
    unset : ModRolea=>Role->a->a
      Sets the given role at an object in the drawing

    Totality: total
    Visibility: export
    keep : ModRolea=>Role->a->a
      Keep only the given roles and unset all others

    Totality: total
    Visibility: export
    clear : ModRolea=>a->a
      Completely remove all roles

    Totality: total
    Visibility: export
    is : CastaRole=>Role->a->Bool
      Tests if the given role(s) is/are set at the given object
    in the drawing

    Totality: total
    Visibility: export
    dataSelectMode : Type
      Selection mode we are currently in.

    `Ignore` means that we are currently not selecting this type of item.
    `One` means "single-select" mode (SHIFT is not down)
    `Many` means "multi-select" mode (SHIFT is down)

    Totality: total
    Visibility: public export
    Constructors:
    Ignore : SelectMode
    One : SelectMode
    Many : SelectMode
    selectIfHovered : ModRolea=>SelectMode->a->a
      Selects a hovered node or edge.

    The boolean flag indicates, if we want to keep already selected
    node or not (as indicated by the `Shift` key being down).

    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    +

    CyBy.Draw.Internal.Role

    (source)

    Definitions

    recordRole : Type
      The role(s) an object (typically an atom or bond) in the
    drawing currently has (for instance, it is selected, or
    the mouse hovers over it, or it is currently being drawn).

    We encode this as a bit pattern to facilitate adding new roles and
    having several roles set simultaneously.

    `Role` is a semigroup (using bitwise "or", `(.|.)`, for append) and
    a monoid, with 0 as the neutral element.

    Totality: total
    Visibility: public export
    Constructor: 
    R : Bits8->Role

    Projection: 
    .role : Role->Bits8

    Hints:
    CastCDAtomRole
    Cast (AdjkbCDAtom) Role
    Cast (ContextkbCDAtom) Role
    CastCDBondRole
    EqRole
    ModRoleRole
    MonoidRole
    OrdRole
    SemigroupRole
    ShowRole
    .role : Role->Bits8
    Totality: total
    Visibility: public export
    role : Role->Bits8
    Totality: total
    Visibility: public export
    Selected : Role
    Totality: total
    Visibility: public export
    Persistent : Role
    Totality: total
    Visibility: public export
    Origin : Role
    Totality: total
    Visibility: public export
    None : Role
    Totality: total
    Visibility: public export
    New : Role
    Totality: total
    Visibility: public export
    HoverNew : Role
    Totality: total
    Visibility: public export
    Hover : Role
    Totality: total
    Visibility: public export
    Highlight : Role
    Totality: total
    Visibility: public export
    interfaceModRole : Type->Type
      Interface for objects with a `Role` we can modify

    Parameters: a
    Methods:
    modRole : (Role->Role) ->a->a

    Implementations:
    ModRoleCDAtom
    ModRoleRole
    ModRoleCDBond
    modRole : ModRolea=> (Role->Role) ->a->a
    Totality: total
    Visibility: public export
    setIf : ModRolea=>Role->Bool->a->a
      Sets the given role at an object in the drawing

    Totality: total
    Visibility: export
    set : ModRolea=>Role->a->a
      Sets the given role at an object in the drawing

    Totality: total
    Visibility: export
    unset : ModRolea=>Role->a->a
      Sets the given role at an object in the drawing

    Totality: total
    Visibility: export
    keep : ModRolea=>Role->a->a
      Keep only the given roles and unset all others

    Totality: total
    Visibility: export
    clear : ModRolea=>a->a
      Completely remove all roles

    Totality: total
    Visibility: export
    is : CastaRole=>Role->a->Bool
      Tests if the given role(s) is/are set at the given object
    in the drawing

    Totality: total
    Visibility: export
    dataSelectMode : Type
      Selection mode we are currently in.

    `Ignore` means that we are currently not selecting this type of item.
    `One` means "single-select" mode (SHIFT is not down)
    `Many` means "multi-select" mode (SHIFT is down)

    Totality: total
    Visibility: public export
    Constructors:
    Ignore : SelectMode
    One : SelectMode
    Many : SelectMode
    selectIfHovered : ModRolea=>SelectMode->a->a
      Selects a hovered node or edge.

    The boolean flag indicates, if we want to keep already selected
    node or not (as indicated by the `Shift` key being down).

    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    diff --git a/docs/cyby-draw/docs/docs/CyBy.Draw.MoleculeCanvas.html b/docs/cyby-draw/docs/docs/CyBy.Draw.MoleculeCanvas.html index 2aa4c1b2e..73bd0fba2 100644 --- a/docs/cyby-draw/docs/docs/CyBy.Draw.MoleculeCanvas.html +++ b/docs/cyby-draw/docs/docs/CyBy.Draw.MoleculeCanvas.html @@ -61,4 +61,4 @@ -

    CyBy.Draw.MoleculeCanvas

    (source)

    Definitions

    dataMode : Type
    Totality: total
    Visibility: public export
    Constructors:
    Select : Mode
    Erase : Mode
    Draw : Mode
    SetAtom : Isotope->Mode
    SetAbbr : Abbreviation->Mode
    SetTempl : CDGraph->Mode
    RotTempl : PointMol->CDGraph->Mode
    Selecting : PointId->Mode
    Erasing : PointId->Mode
    Dragging : PointMol->Mode
    Rotating : PointMol->Mode
    Translating : Mode->Mode
    Drawing : MaybeAbbreviation->Mode
    PTable : MaybeElem->Mode

    Hints:
    EqMode
    ShowMode
    recordDrawState : Type
    Totality: total
    Visibility: public export
    Constructor: 
    ST : SceneDims-> (transform : AffineTransformation) ->Pointtransform->CDGraph->ListCDGraph->ListCDGraph->Mode->Modifier->MolBond->MaybeAbbreviation->Bool->MaybeElem->String->String->DrawState

    Projections:
    .abbr : DrawState->MaybeAbbreviation
    .bond : DrawState->MolBond
    .curPos : ({rec:0} : DrawState) ->Point (transform{rec:0})
    .curSVG : DrawState->String
      Current SVG scene rendered to a string
    We keep track of this and the previous one to easily
    decide when to redraw the scene.
    .dims : DrawState->SceneDims
    .hasFocus : DrawState->Bool
    .mode : DrawState->Mode
    .modifier : DrawState->Modifier
    .mol : DrawState->CDGraph
    .prevSVG : DrawState->String
      Previous SVG scene rendered to a string
    .ptable : DrawState->MaybeElem
    .redos : DrawState->ListCDGraph
    .transform : DrawState->AffineTransformation
    .undos : DrawState->ListCDGraph
    .dims : DrawState->SceneDims
    Totality: total
    Visibility: public export
    dims : DrawState->SceneDims
    Totality: total
    Visibility: public export
    .transform : DrawState->AffineTransformation
    Totality: total
    Visibility: public export
    transform : DrawState->AffineTransformation
    Totality: total
    Visibility: public export
    .curPos : ({rec:0} : DrawState) ->Point (transform{rec:0})
    Totality: total
    Visibility: public export
    curPos : ({rec:0} : DrawState) ->Point (transform{rec:0})
    Totality: total
    Visibility: public export
    .mol : DrawState->CDGraph
    Totality: total
    Visibility: public export
    mol : DrawState->CDGraph
    Totality: total
    Visibility: public export
    .undos : DrawState->ListCDGraph
    Totality: total
    Visibility: public export
    undos : DrawState->ListCDGraph
    Totality: total
    Visibility: public export
    .redos : DrawState->ListCDGraph
    Totality: total
    Visibility: public export
    redos : DrawState->ListCDGraph
    Totality: total
    Visibility: public export
    .mode : DrawState->Mode
    Totality: total
    Visibility: public export
    mode : DrawState->Mode
    Totality: total
    Visibility: public export
    .modifier : DrawState->Modifier
    Totality: total
    Visibility: public export
    modifier : DrawState->Modifier
    Totality: total
    Visibility: public export
    .bond : DrawState->MolBond
    Totality: total
    Visibility: public export
    bond : DrawState->MolBond
    Totality: total
    Visibility: public export
    .abbr : DrawState->MaybeAbbreviation
    Totality: total
    Visibility: public export
    abbr : DrawState->MaybeAbbreviation
    Totality: total
    Visibility: public export
    .hasFocus : DrawState->Bool
    Totality: total
    Visibility: public export
    hasFocus : DrawState->Bool
    Totality: total
    Visibility: public export
    .ptable : DrawState->MaybeElem
    Totality: total
    Visibility: public export
    ptable : DrawState->MaybeElem
    Totality: total
    Visibility: public export
    .curSVG : DrawState->String
      Current SVG scene rendered to a string
    We keep track of this and the previous one to easily
    decide when to redraw the scene.

    Totality: total
    Visibility: public export
    curSVG : DrawState->String
      Current SVG scene rendered to a string
    We keep track of this and the previous one to easily
    decide when to redraw the scene.

    Totality: total
    Visibility: public export
    .prevSVG : DrawState->String
      Previous SVG scene rendered to a string

    Totality: total
    Visibility: public export
    prevSVG : DrawState->String
      Previous SVG scene rendered to a string

    Totality: total
    Visibility: public export
    toMol : DrawState->MolfileAT
    Totality: total
    Visibility: export
    toMolStr : DrawState->String
    Totality: total
    Visibility: export
    .imol : (s : DrawState) ->CDIGraph ((s.mol) .order)
    Totality: total
    Visibility: export
    dataScaleMode : Type
      Mode used to scale a molecule.

    This is used when centering a molecule, for instance, when we begin
    drawing, or when we just display a molecule and want to zoom in for it
    to fill the whole scene.

    Totality: total
    Visibility: public export
    Constructors:
    Init : ScaleMode
      Scale mode used when initializing a scene for drawing
    Reset : ScaleMode
      Scale mode used when centering the molecule (by pressing the "reset" button)
    Fill : ScaleMode
      Scale mode used when displaying a molecule so that it fills the whole
    scene
    scaleAt : DrawSettings=>PointId->Scale->DrawState->DrawState
    Totality: total
    Visibility: export
    scaleAtPos : DrawSettings=>Scale->DrawState->DrawState
      Scales the molecule at the current mouse position.

    Totality: total
    Visibility: export
    scaleAtCenter : DrawSettings=>Scale->DrawState->DrawState
      Scales the molecule at the center of the scene

    Totality: total
    Visibility: export
    .posId : DrawState->PointId
    Totality: total
    Visibility: export
    .posMol : DrawState->PointMol
    Totality: total
    Visibility: export
    applyWhenSel : DrawSettings=>DrawState-> Lazy a-> Lazy a-> Lazy a->a
    Totality: total
    Visibility: export
    toTransform : AffineTransformation->Transform
      Convert an `AffineTransformation` to a transformation to be
    used in an SVG element.

    Totality: total
    Visibility: export
    update : DrawSettings=>DrawEvent->DrawState->DrawState
    Totality: total
    Visibility: export
    initMol : DrawSettings=>SceneDims->ScaleMode->CDGraph->DrawState
      Initializes the drawing state for the given mol graph.

    The `SceneDims` are used for centering the molecule, as well
    as for scaling it to fill the scene in case the given bool is
    set to `True`.

    Totality: total
    Visibility: export
    init : DrawSettings=>SceneDims->ScaleMode->String->DrawState
    Totality: total
    Visibility: export
    fromMol : DrawSettings=>SceneDims->ScaleMode->MolGraphAT->DrawState
    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    +

    CyBy.Draw.MoleculeCanvas

    (source)

    Definitions

    dataMode : Type
    Totality: total
    Visibility: public export
    Constructors:
    Select : Mode
    Erase : Mode
    Draw : Mode
    SetAtom : Isotope->Mode
    SetAbbr : Abbreviation->Mode
    SetTempl : CDGraph->Mode
    RotTempl : PointMol->CDGraph->Mode
    Selecting : PointId->Mode
    Erasing : PointId->Mode
    Dragging : PointMol->Mode
    Rotating : PointMol->Mode
    Translating : Mode->Mode
    Drawing : MaybeAbbreviation->Mode
    PTable : MaybeElem->Mode

    Hints:
    EqMode
    ShowMode
    recordDrawState : Type
    Totality: total
    Visibility: public export
    Constructor: 
    ST : SceneDims-> (transform : AffineTransformation) ->Pointtransform->CDGraph->ListCDGraph->ListCDGraph->Mode->Modifier->MolBond->MaybeAbbreviation->Bool->MaybeElem->String->String->DrawState

    Projections:
    .abbr : DrawState->MaybeAbbreviation
    .bond : DrawState->MolBond
    .curPos : ({rec:0} : DrawState) ->Point (transform{rec:0})
    .curSVG : DrawState->String
      Current SVG scene rendered to a string
    We keep track of this and the previous one to easily
    decide when to redraw the scene.
    .dims : DrawState->SceneDims
    .hasFocus : DrawState->Bool
    .mode : DrawState->Mode
    .modifier : DrawState->Modifier
    .mol : DrawState->CDGraph
    .prevSVG : DrawState->String
      Previous SVG scene rendered to a string
    .ptable : DrawState->MaybeElem
    .redos : DrawState->ListCDGraph
    .transform : DrawState->AffineTransformation
    .undos : DrawState->ListCDGraph
    .dims : DrawState->SceneDims
    Totality: total
    Visibility: public export
    dims : DrawState->SceneDims
    Totality: total
    Visibility: public export
    .transform : DrawState->AffineTransformation
    Totality: total
    Visibility: public export
    transform : DrawState->AffineTransformation
    Totality: total
    Visibility: public export
    .curPos : ({rec:0} : DrawState) ->Point (transform{rec:0})
    Totality: total
    Visibility: public export
    curPos : ({rec:0} : DrawState) ->Point (transform{rec:0})
    Totality: total
    Visibility: public export
    .mol : DrawState->CDGraph
    Totality: total
    Visibility: public export
    mol : DrawState->CDGraph
    Totality: total
    Visibility: public export
    .undos : DrawState->ListCDGraph
    Totality: total
    Visibility: public export
    undos : DrawState->ListCDGraph
    Totality: total
    Visibility: public export
    .redos : DrawState->ListCDGraph
    Totality: total
    Visibility: public export
    redos : DrawState->ListCDGraph
    Totality: total
    Visibility: public export
    .mode : DrawState->Mode
    Totality: total
    Visibility: public export
    mode : DrawState->Mode
    Totality: total
    Visibility: public export
    .modifier : DrawState->Modifier
    Totality: total
    Visibility: public export
    modifier : DrawState->Modifier
    Totality: total
    Visibility: public export
    .bond : DrawState->MolBond
    Totality: total
    Visibility: public export
    bond : DrawState->MolBond
    Totality: total
    Visibility: public export
    .abbr : DrawState->MaybeAbbreviation
    Totality: total
    Visibility: public export
    abbr : DrawState->MaybeAbbreviation
    Totality: total
    Visibility: public export
    .hasFocus : DrawState->Bool
    Totality: total
    Visibility: public export
    hasFocus : DrawState->Bool
    Totality: total
    Visibility: public export
    .ptable : DrawState->MaybeElem
    Totality: total
    Visibility: public export
    ptable : DrawState->MaybeElem
    Totality: total
    Visibility: public export
    .curSVG : DrawState->String
      Current SVG scene rendered to a string
    We keep track of this and the previous one to easily
    decide when to redraw the scene.

    Totality: total
    Visibility: public export
    curSVG : DrawState->String
      Current SVG scene rendered to a string
    We keep track of this and the previous one to easily
    decide when to redraw the scene.

    Totality: total
    Visibility: public export
    .prevSVG : DrawState->String
      Previous SVG scene rendered to a string

    Totality: total
    Visibility: public export
    prevSVG : DrawState->String
      Previous SVG scene rendered to a string

    Totality: total
    Visibility: public export
    toMol : DrawState->MolfileAT
    Totality: total
    Visibility: export
    toMolStr : DrawState->String
    Totality: total
    Visibility: export
    .imol : (s : DrawState) ->CDIGraph ((s.mol) .order)
    Totality: total
    Visibility: export
    dataScaleMode : Type
      Mode used to scale a molecule.

    This is used when centering a molecule, for instance, when we begin
    drawing, or when we just display a molecule and want to zoom in for it
    to fill the whole scene.

    Totality: total
    Visibility: public export
    Constructors:
    Init : ScaleMode
      Scale mode used when initializing a scene for drawing
    Reset : ScaleMode
      Scale mode used when centering the molecule (by pressing the "reset" button)
    Fill : ScaleMode
      Scale mode used when displaying a molecule so that it fills the whole
    scene
    scaleAt : DrawSettings=>PointId->Scale->DrawState->DrawState
    Totality: total
    Visibility: export
    scaleAtPos : DrawSettings=>Scale->DrawState->DrawState
      Scales the molecule at the current mouse position.

    Totality: total
    Visibility: export
    scaleAtCenter : DrawSettings=>Scale->DrawState->DrawState
      Scales the molecule at the center of the scene

    Totality: total
    Visibility: export
    .posId : DrawState->PointId
    Totality: total
    Visibility: export
    .posMol : DrawState->PointMol
    Totality: total
    Visibility: export
    applyWhenSel : DrawSettings=>DrawState-> Lazy a-> Lazy a-> Lazy a->a
    Totality: total
    Visibility: export
    toTransform : AffineTransformation->Transform
      Convert an `AffineTransformation` to a transformation to be
    used in an SVG element.

    Totality: total
    Visibility: export
    update : DrawSettings=>DrawEvent->DrawState->DrawState
    Totality: total
    Visibility: export
    initMol : DrawSettings=>SceneDims->ScaleMode->CDGraph->DrawState
      Initializes the drawing state for the given mol graph.

    The `SceneDims` are used for centering the molecule, as well
    as for scaling it to fill the scene in case the given bool is
    set to `True`.

    Totality: total
    Visibility: export
    init : DrawSettings=>SceneDims->ScaleMode->String->DrawState
    Totality: total
    Visibility: export
    fromMol : DrawSettings=>SceneDims->ScaleMode->MolGraphAT->DrawState
    Totality: total
    Visibility: export
    Produced by Idris 2 version 0.7.0-6d02c5210
    diff --git a/docs/epoll/docs/docs/System.Linux.EventFD.html b/docs/epoll/docs/docs/System.Linux.EventFD.html index 832c56bf1..3b1f9d7a5 100644 --- a/docs/epoll/docs/docs/System.Linux.EventFD.html +++ b/docs/epoll/docs/docs/System.Linux.EventFD.html @@ -68,4 +68,4 @@ The file descriptor can work in `EFD_SEMAPHORE` mode, in which case it can indeed be used liked a `System.Concurrent.Semaphore` or a `System.Concurrent.Condition`. -

    Definitions

    recordFlags : Type
      Flags describing the behavior of an event file descriptor.

    Several flags can be combined using `(<+>)`.

    Totality: total
    Visibility: export
    Constructor: 
    F : Bits32->Flags

    Projection: 
    .value : Flags->Bits32

    Hints:
    EqFlags
    MonoidFlags
    OrdFlags
    SemigroupFlags
    ShowFlags
    flagCode : Flags->Bits32
    Totality: total
    Visibility: export
    EFD_CLOEXEC : Flags
    Totality: total
    Visibility: export
    EFD_NONBLOCK : Flags
      Sets the file descriptor to non-blocking: Reading from
    an `EventFD` via `readEv` will usually block the calling thread
    unless the file descriptor's stored value is greater than zero.

    With this flag being set, `readEv` will never block but will return
    `Left EAGAIN` in case of an empty file descriptor.

    Totality: total
    Visibility: export
    EFD_SEMAPHORE : Flags
      Changes the file descriptor to work in "semaphore mode": Usually,
    `readEv` will return the whole 64-bit value currently stored in the
    file descriptor. In semaphore mode, `readEv` will always return 1
    (unliss the file descriptor is empty) and likewise reduce the stored
    value by 1.

    Totality: total
    Visibility: export
    recordEventFD : Type
      An event file descriptor that can be monitored via `epoll`
    and programmatically written to and read from.

    Totality: total
    Visibility: public export
    Constructor: 
    EFD : Bits32->EventFD

    Projection: 
    .file : EventFD->Bits32

    Hint: 
    FileDescEventFD
    .file : EventFD->Bits32
    Totality: total
    Visibility: public export
    file : EventFD->Bits32
    Totality: total
    Visibility: public export
    eventfd : Bits64->Flags->PrimIOEventFD
      Creates a new `EventFD` with the given initial value a flags set.

    Totality: total
    Visibility: export
    writeEv : EventFD->Bits64->PrimIO ()
      Writes (adds) the given 64-bit value to the value currently stored
    in the given event file descriptor.

    Totality: total
    Visibility: export
    readEv : EventFD->PrimIO (EitherEpollErrBits64)
      Reads the current value from an event file descriptor, setting the
    stored value to 0.

    If the `EFD_SEMAPHORE` flag was set when creating the file descriptor,
    this will always return 1 in case the event file is non-empty. Likewise,
    the value stored in the event file will be reduced by one.

    Totality: total
    Visibility: export
    withEv : Bits64->Flags-> (EventFD->PrimIOa) ->PrimIOa
      Creates and finally closes and event file descriptor.

    Totality: total
    Visibility: export
    +

    Definitions

    recordFlags : Type
      Flags describing the behavior of an event file descriptor.

    Several flags can be combined using `(<+>)`.

    Totality: total
    Visibility: export
    Constructor: 
    F : Bits32->Flags

    Projection: 
    .value : Flags->Bits32

    Hints:
    EqFlags
    MonoidFlags
    OrdFlags
    SemigroupFlags
    ShowFlags
    flagCode : Flags->Bits32
    Totality: total
    Visibility: export
    EFD_CLOEXEC : Flags
    Totality: total
    Visibility: export
    EFD_NONBLOCK : Flags
      Sets the file descriptor to non-blocking: Reading from
    an `EventFD` via `readEv` will usually block the calling thread
    unless the file descriptor's stored value is greater than zero.

    With this flag being set, `readEv` will never block but will return
    `Left EAGAIN` in case of an empty file descriptor.

    Totality: total
    Visibility: export
    EFD_SEMAPHORE : Flags
      Changes the file descriptor to work in "semaphore mode": Usually,
    `readEv` will return the whole 64-bit value currently stored in the
    file descriptor. In semaphore mode, `readEv` will always return 1
    (unliss the file descriptor is empty) and likewise reduce the stored
    value by 1.

    Totality: total
    Visibility: export
    recordEventFD : Type
      An event file descriptor that can be monitored via `epoll`
    and programmatically written to and read from.

    Totality: total
    Visibility: public export
    Constructor: 
    EFD : Bits32->EventFD

    Projection: 
    .file : EventFD->Bits32

    Hint: 
    FileDescEventFD
    .file : EventFD->Bits32
    Totality: total
    Visibility: public export
    file : EventFD->Bits32
    Totality: total
    Visibility: public export
    eventfd : Bits64->Flags->PrimIOEventFD
      Creates a new `EventFD` with the given initial value a flags set.

    Totality: total
    Visibility: export
    writeEv : EventFD->Bits64->PrimIO ()
      Writes (adds) the given 64-bit value to the value currently stored
    in the given event file descriptor.

    Totality: total
    Visibility: export
    readEv : EventFD->PrimIO (EitherEpollErrBits64)
      Reads the current value from an event file descriptor, setting the
    stored value to 0.

    If the `EFD_SEMAPHORE` flag was set when creating the file descriptor,
    this will always return 1 in case the event file is non-empty. Likewise,
    the value stored in the event file will be reduced by one.

    Totality: total
    Visibility: export
    withEv : Bits64->Flags-> (EventFD->PrimIOa) ->PrimIOa
      Creates and finally closes and event file descriptor.

    Totality: total
    Visibility: export
    diff --git a/docs/epoll/docs/docs/System.Linux.File.html b/docs/epoll/docs/docs/System.Linux.File.html index 8efb4b11d..9d8571be4 100644 --- a/docs/epoll/docs/docs/System.Linux.File.html +++ b/docs/epoll/docs/docs/System.Linux.File.html @@ -61,4 +61,4 @@ -

    System.Linux.File

    (source)

    Definitions

    interfaceFileDesc : Type->Type
    Parameters: a
    Methods:
    fileDesc : a->Bits32

    Implementations:
    FileDescEventFD
    FileDescBits32
    FileDescStdFile
    fileDesc : FileDesca=>a->Bits32
    Totality: total
    Visibility: public export
    dataReadRes : Type
      Result of reading from a file descriptor

    Totality: total
    Visibility: public export
    Constructors:
    EOF : ReadRes
      End of file has been reached
    Again : ReadRes
      This occurs when reading from a file descriptor in non-blocking mode
    and there is currently no data ready.
    Bytes : (n : Nat) ->IBuffern->ReadRes
      The given numbers have been read into an immutable buffer
    Err : EpollErr->ReadRes
      An error occured
    close : FileDesca=>a->PrimIO ()
      Close a file descriptor.

    Totality: total
    Visibility: export
    read : FileDesca=>a->Buffer->Nat->Nat->PrimIO (EitherEpollErrNat)
      Low-level reading of at most `max` bytes from a file into a buffer
    starting at buffer offset `offset`.

    See `readBytes` for a higher-level function that allocates a new buffer and
    correctly interprets the result.

    Totality: total
    Visibility: export
    write : FileDesca=>a->Buffer->Nat->Nat->PrimIO (EitherEpollErrNat)
    Totality: total
    Visibility: export
    readBytes : FileDesca=>a->Nat->PrimIOReadRes
      A higher-level alternative to `read`: It allocates a new buffer of the
    given size and returns it wrapped in a `ReadRes`.

    Use `read` if you want to avoid allocating a new buffer for every
    data package.

    Totality: total
    Visibility: export
    setNonBlocking : FileDesca=>a->PrimIO ()
      Changes a file descriptor's mode to `O_NONBLOCK`.

    This will not block when trying to read from a stream such as a pipe, socket, or
    stdin. Instead, `readBytes` will return `Again` in case no data is currently
    available. Use this in combination with `EPOLLET` to keep reading from a data
    source until it is temporarily exhausted.

    Totality: total
    Visibility: export
    dataStdFile : Type
    Totality: total
    Visibility: public export
    Constructors:
    StdIn : StdFile
    StdOut : StdFile
    StdErr : StdFile

    Hints:
    EqStdFile
    FileDescStdFile
    FiniteStdFile
    OrdStdFile
    ShowStdFile
    +

    System.Linux.File

    (source)

    Definitions

    interfaceFileDesc : Type->Type
    Parameters: a
    Methods:
    fileDesc : a->Bits32

    Implementations:
    FileDescEventFD
    FileDescBits32
    FileDescStdFile
    fileDesc : FileDesca=>a->Bits32
    Totality: total
    Visibility: public export
    dataReadRes : Type
      Result of reading from a file descriptor

    Totality: total
    Visibility: public export
    Constructors:
    EOF : ReadRes
      End of file has been reached
    Again : ReadRes
      This occurs when reading from a file descriptor in non-blocking mode
    and there is currently no data ready.
    Bytes : (n : Nat) ->IBuffern->ReadRes
      The given numbers have been read into an immutable buffer
    Err : EpollErr->ReadRes
      An error occured
    close : FileDesca=>a->PrimIO ()
      Close a file descriptor.

    Totality: total
    Visibility: export
    read : FileDesca=>a->Buffer->Nat->Nat->PrimIO (EitherEpollErrNat)
      Low-level reading of at most `max` bytes from a file into a buffer
    starting at buffer offset `offset`.

    See `readBytes` for a higher-level function that allocates a new buffer and
    correctly interprets the result.

    Totality: total
    Visibility: export
    write : FileDesca=>a->Buffer->Nat->Nat->PrimIO (EitherEpollErrNat)
    Totality: total
    Visibility: export
    readBytes : FileDesca=>a->Nat->PrimIOReadRes
      A higher-level alternative to `read`: It allocates a new buffer of the
    given size and returns it wrapped in a `ReadRes`.

    Use `read` if you want to avoid allocating a new buffer for every
    data package.

    Totality: total
    Visibility: export
    setNonBlocking : FileDesca=>a->PrimIO ()
      Changes a file descriptor's mode to `O_NONBLOCK`.

    This will not block when trying to read from a stream such as a pipe, socket, or
    stdin. Instead, `readBytes` will return `Again` in case no data is currently
    available. Use this in combination with `EPOLLET` to keep reading from a data
    source until it is temporarily exhausted.

    Totality: total
    Visibility: export
    dataStdFile : Type
    Totality: total
    Visibility: public export
    Constructors:
    StdIn : StdFile
    StdOut : StdFile
    StdErr : StdFile

    Hints:
    EqStdFile
    FileDescStdFile
    FiniteStdFile
    OrdStdFile
    ShowStdFile
    diff --git a/docs/epoll/docs/docs/System.Linux.SignalFD.html b/docs/epoll/docs/docs/System.Linux.SignalFD.html index 5b4895df2..84fffd055 100644 --- a/docs/epoll/docs/docs/System.Linux.SignalFD.html +++ b/docs/epoll/docs/docs/System.Linux.SignalFD.html @@ -61,4 +61,4 @@ -

    System.Linux.SignalFD

    (source)

    Reexports

    importpublic System.Signal

    Definitions

    recordFlags : Type
      Flags describing the behavior of an signal file descriptor.

    Several flags can be combined using `(<+>)`.

    Totality: total
    Visibility: export
    Constructor: 
    F : Bits32->Flags

    Projection: 
    .value : Flags->Bits32

    Hints:
    EqFlags
    MonoidFlags
    OrdFlags
    SemigroupFlags
    ShowFlags
    flagCode : Flags->Bits32
    Totality: total
    Visibility: export
    SFD_CLOEXEC : Flags
    Totality: total
    Visibility: export
    SFD_NONBLOCK : Flags
      Sets the file descriptor to non-blocking: Reading from
    a `SignalFD` via `readSignal` will usually block the calling thread
    unless the file descriptor's signal has been caught.

    With this flag being set, `readSignal` will never block but will return
    `Left EAGAIN` in case of a still running signal.

    Totality: total
    Visibility: export
    recordSignalFD : Type
      A signal file descriptor that can be monitored via `epoll`.

    Totality: total
    Visibility: public export
    Constructor: 
    SFD : Bits32->SignalFD

    Projection: 
    .file : SignalFD->Bits32

    Hint: 
    FileDescSignalFD
    .file : SignalFD->Bits32
    Totality: total
    Visibility: public export
    file : SignalFD->Bits32
    Totality: total
    Visibility: public export
    signalCreate : ListSignal->Flags->PrimIOSignalFD
      Creates a new `SignalFD`, observing the given signals
    with the given flags set.

    Note: Make sure to block the given list of signals to prevent their
    default behavior. The easiest way to do so is by using
    `blockSignals` at the beginning of your application.

    Totality: total
    Visibility: export
    blockSignals : ListSignal->PrimIO ()
      Block default handling for the given list of signals.

    Totality: total
    Visibility: export
    readSignal : SignalFD->PrimIO (EitherEpollErrBits32)
      Reads the next caught signal from a signal file descriptor.

    Totality: total
    Visibility: export
    withSignal : ListSignal->Flags-> (SignalFD->PrimIOa) ->PrimIOa
      Creates and finally closes and event file descriptor.

    Totality: total
    Visibility: export
    raise : Signal->PrimIO ()
    Totality: total
    Visibility: export
    +

    System.Linux.SignalFD

    (source)

    Reexports

    importpublic System.Signal

    Definitions

    recordFlags : Type
      Flags describing the behavior of an signal file descriptor.

    Several flags can be combined using `(<+>)`.

    Totality: total
    Visibility: export
    Constructor: 
    F : Bits32->Flags

    Projection: 
    .value : Flags->Bits32

    Hints:
    EqFlags
    MonoidFlags
    OrdFlags
    SemigroupFlags
    ShowFlags
    flagCode : Flags->Bits32
    Totality: total
    Visibility: export
    SFD_CLOEXEC : Flags
    Totality: total
    Visibility: export
    SFD_NONBLOCK : Flags
      Sets the file descriptor to non-blocking: Reading from
    a `SignalFD` via `readSignal` will usually block the calling thread
    unless the file descriptor's signal has been caught.

    With this flag being set, `readSignal` will never block but will return
    `Left EAGAIN` in case of a still running signal.

    Totality: total
    Visibility: export
    recordSignalFD : Type
      A signal file descriptor that can be monitored via `epoll`.

    Totality: total
    Visibility: public export
    Constructor: 
    SFD : Bits32->SignalFD

    Projection: 
    .file : SignalFD->Bits32

    Hint: 
    FileDescSignalFD
    .file : SignalFD->Bits32
    Totality: total
    Visibility: public export
    file : SignalFD->Bits32
    Totality: total
    Visibility: public export
    signalCreate : ListSignal->Flags->PrimIOSignalFD
      Creates a new `SignalFD`, observing the given signals
    with the given flags set.

    Note: Make sure to block the given list of signals to prevent their
    default behavior. The easiest way to do so is by using
    `blockSignals` at the beginning of your application.

    Totality: total
    Visibility: export
    blockSignals : ListSignal->PrimIO ()
      Block default handling for the given list of signals.

    Totality: total
    Visibility: export
    readSignal : SignalFD->PrimIO (EitherEpollErrBits32)
      Reads the next caught signal from a signal file descriptor.

    Totality: total
    Visibility: export
    withSignal : ListSignal->Flags-> (SignalFD->PrimIOa) ->PrimIOa
      Creates and finally closes and event file descriptor.

    Totality: total
    Visibility: export
    raise : Signal->PrimIO ()
    Totality: total
    Visibility: export
    diff --git a/docs/epoll/docs/docs/System.Linux.TimerFD.html b/docs/epoll/docs/docs/System.Linux.TimerFD.html index 10654bbbb..15f11e353 100644 --- a/docs/epoll/docs/docs/System.Linux.TimerFD.html +++ b/docs/epoll/docs/docs/System.Linux.TimerFD.html @@ -61,4 +61,4 @@ -

    System.Linux.TimerFD

    (source)

    Reexports

    importpublic System.Clock

    Definitions

    dataClockTpe : Type
    Totality: total
    Visibility: public export
    Constructors:
    REALTIME : ClockTpe
    MONOTONIC : ClockTpe
    BOOTTIME : ClockTpe
    REALTIME_ALARM : ClockTpe
    BOOTTIME_ALARM : ClockTpe

    Hints:
    EqClockTpe
    FiniteClockTpe
    ShowClockTpe
    clockCode : ClockTpe->Bits32
    Totality: total
    Visibility: export
    recordFlags : Type
      Flags describing the behavior of an timer file descriptor.

    Several flags can be combined using `(<+>)`.

    Totality: total
    Visibility: export
    Constructor: 
    F : Bits32->Flags

    Projection: 
    .value : Flags->Bits32

    Hints:
    EqFlags
    MonoidFlags
    OrdFlags
    SemigroupFlags
    ShowFlags
    flagCode : Flags->Bits32
    Totality: total
    Visibility: export
    TFD_CLOEXEC : Flags
    Totality: total
    Visibility: export
    TFD_NONBLOCK : Flags
      Sets the file descriptor to non-blocking: Reading from
    an `TimerFD` via `readTimer` will usually block the calling thread
    unless the file descriptor's timer has already expired at least
    once.

    With this flag being set, `readTimer` will never block but will return
    `Left EAGAIN` in case of a still running timer.

    Totality: total
    Visibility: export
    recordTimerFD : Type
      A timer file descriptor that can be monitored via `epoll`.

    Totality: total
    Visibility: public export
    Constructor: 
    TFD : Bits32->TimerFD

    Projection: 
    .file : TimerFD->Bits32

    Hint: 
    FileDescTimerFD
    .file : TimerFD->Bits32
    Totality: total
    Visibility: public export
    file : TimerFD->Bits32
    Totality: total
    Visibility: public export
    timerCreate : ClockTpe->Flags->PrimIOTimerFD
      Creates a new `TimerFD` with the given initial value a flags set.

    Totality: total
    Visibility: export
    readTimer : TimerFD->PrimIO (EitherEpollErrBits64)
      Reads the current value from a timer file descriptor, returning the
    number of times the timer has expired since the last read.

    This will block the calling thread unless the `TFD_NONBLOCK` flag
    was set.

    Totality: total
    Visibility: export
    setTime : TimerFD->ClockDuration->PrimIO ()
    Totality: total
    Visibility: export
    withTimer : ClockTpe->Flags-> (TimerFD->PrimIOa) ->PrimIOa
      Creates and finally closes and event file descriptor.

    Totality: total
    Visibility: export
    zero : ClockDuration
      The zero duration.

    Totality: total
    Visibility: export
    .s : Nat->ClockDuration
      Creates a duration of `n` seconds

    Totality: total
    Visibility: export
    .ns : Nat->ClockDuration
      Creates a duration of `n` nanoseconds

    Totality: total
    Visibility: export
    .us : Nat->ClockDuration
      Creates a duration of `n` microseconds

    Totality: total
    Visibility: export
    .ms : Nat->ClockDuration
      Creates a duration of `n` milliseconds

    Totality: total
    Visibility: export
    +

    System.Linux.TimerFD

    (source)

    Reexports

    importpublic System.Clock

    Definitions

    dataClockTpe : Type
    Totality: total
    Visibility: public export
    Constructors:
    REALTIME : ClockTpe
    MONOTONIC : ClockTpe
    BOOTTIME : ClockTpe
    REALTIME_ALARM : ClockTpe
    BOOTTIME_ALARM : ClockTpe

    Hints:
    EqClockTpe
    FiniteClockTpe
    ShowClockTpe
    clockCode : ClockTpe->Bits32
    Totality: total
    Visibility: export
    recordFlags : Type
      Flags describing the behavior of an timer file descriptor.

    Several flags can be combined using `(<+>)`.

    Totality: total
    Visibility: export
    Constructor: 
    F : Bits32->Flags

    Projection: 
    .value : Flags->Bits32

    Hints:
    EqFlags
    MonoidFlags
    OrdFlags
    SemigroupFlags
    ShowFlags
    flagCode : Flags->Bits32
    Totality: total
    Visibility: export
    TFD_CLOEXEC : Flags
    Totality: total
    Visibility: export
    TFD_NONBLOCK : Flags
      Sets the file descriptor to non-blocking: Reading from
    an `TimerFD` via `readTimer` will usually block the calling thread
    unless the file descriptor's timer has already expired at least
    once.

    With this flag being set, `readTimer` will never block but will return
    `Left EAGAIN` in case of a still running timer.

    Totality: total
    Visibility: export
    recordTimerFD : Type
      A timer file descriptor that can be monitored via `epoll`.

    Totality: total
    Visibility: public export
    Constructor: 
    TFD : Bits32->TimerFD

    Projection: 
    .file : TimerFD->Bits32

    Hint: 
    FileDescTimerFD
    .file : TimerFD->Bits32
    Totality: total
    Visibility: public export
    file : TimerFD->Bits32
    Totality: total
    Visibility: public export
    timerCreate : ClockTpe->Flags->PrimIOTimerFD
      Creates a new `TimerFD` with the given initial value a flags set.

    Totality: total
    Visibility: export
    readTimer : TimerFD->PrimIO (EitherEpollErrBits64)
      Reads the current value from a timer file descriptor, returning the
    number of times the timer has expired since the last read.

    This will block the calling thread unless the `TFD_NONBLOCK` flag
    was set.

    Totality: total
    Visibility: export
    setTime : TimerFD->ClockDuration->PrimIO ()
    Totality: total
    Visibility: export
    withTimer : ClockTpe->Flags-> (TimerFD->PrimIOa) ->PrimIOa
      Creates and finally closes and event file descriptor.

    Totality: total
    Visibility: export
    zero : ClockDuration
      The zero duration.

    Totality: total
    Visibility: export
    .s : Nat->ClockDuration
      Creates a duration of `n` seconds

    Totality: total
    Visibility: export
    .ns : Nat->ClockDuration
      Creates a duration of `n` nanoseconds

    Totality: total
    Visibility: export
    .us : Nat->ClockDuration
      Creates a duration of `n` microseconds

    Totality: total
    Visibility: export
    .ms : Nat->ClockDuration
      Creates a duration of `n` milliseconds

    Totality: total
    Visibility: export
    diff --git a/docs/linux/docs/docs/System.Linux.Inotify.Flags.html b/docs/linux/docs/docs/System.Linux.Inotify.Flags.html index 6918461b9..4344a2db7 100644 --- a/docs/linux/docs/docs/System.Linux.Inotify.Flags.html +++ b/docs/linux/docs/docs/System.Linux.Inotify.Flags.html @@ -61,4 +61,4 @@ -

    System.Linux.Inotify.Flags

    (source)

    Definitions

    recordInotifyFlags : Type
    Totality: total
    Visibility: public export
    Constructor: 
    IF : Bits32->InotifyFlags

    Projection: 
    .flags : InotifyFlags->Bits32

    Hints:
    EqInotifyFlags
    MonoidInotifyFlags
    OrdInotifyFlags
    SemigroupInotifyFlags
    ShowInotifyFlags
    .flags : InotifyFlags->Bits32
    Totality: total
    Visibility: public export
    flags : InotifyFlags->Bits32
    Totality: total
    Visibility: public export
    recordInotifyMask : Type
    Totality: total
    Visibility: public export
    Constructor: 
    IM : Bits32->InotifyMask

    Projection: 
    .mask : InotifyMask->Bits32

    Hints:
    EqInotifyMask
    MonoidInotifyMask
    OrdInotifyMask
    SemigroupInotifyMask
    ShowInotifyMask
    .mask : InotifyMask->Bits32
    Totality: total
    Visibility: public export
    mask : InotifyMask->Bits32
    Totality: total
    Visibility: public export
    has : InotifyMask->InotifyMask->Bool
      Checks if an inotify event mask holds the given event.

    Totality: total
    Visibility: export
    IN_NONBLOCK : InotifyFlags
    Totality: total
    Visibility: public export
    IN_CLOEXEC : InotifyFlags
    Totality: total
    Visibility: public export
    IN_ACCESS : InotifyMask
    Totality: total
    Visibility: public export
    IN_ATTRIB : InotifyMask
    Totality: total
    Visibility: public export
    IN_CLOSE_WRITE : InotifyMask
    Totality: total
    Visibility: public export
    IN_CLOSE_NOWRITE : InotifyMask
    Totality: total
    Visibility: public export
    IN_CREATE : InotifyMask
    Totality: total
    Visibility: public export
    IN_DELETE : InotifyMask
    Totality: total
    Visibility: public export
    IN_DELETE_SELF : InotifyMask
    Totality: total
    Visibility: public export
    IN_MODIFY : InotifyMask
    Totality: total
    Visibility: public export
    IN_MOVE_SELF : InotifyMask
    Totality: total
    Visibility: public export
    IN_MOVED_FROM : InotifyMask
    Totality: total
    Visibility: public export
    IN_MOVED_TO : InotifyMask
    Totality: total
    Visibility: public export
    IN_OPEN : InotifyMask
    Totality: total
    Visibility: public export
    IN_ALL_EVENTS : InotifyMask
    Totality: total
    Visibility: public export
    IN_MOVE : InotifyMask
    Totality: total
    Visibility: public export
    IN_CLOSE : InotifyMask
    Totality: total
    Visibility: public export
    IN_DONT_FOLLOW : InotifyMask
    Totality: total
    Visibility: public export
    Totality: total
    Visibility: public export
    IN_MASK_ADD : InotifyMask
    Totality: total
    Visibility: public export
    IN_ONESHOT : InotifyMask
    Totality: total
    Visibility: public export
    IN_ONLYDIR : InotifyMask
    Totality: total
    Visibility: public export
    IN_MASK_CREATE : InotifyMask
    Totality: total
    Visibility: public export
    IN_IGNORED : InotifyMask
    Totality: total
    Visibility: public export
    IN_ISDIR : InotifyMask
    Totality: total
    Visibility: public export
    IN_Q_OVERFLOW : InotifyMask
    Totality: total
    Visibility: public export
    IN_UNMOUNT : InotifyMask
    Totality: total
    Visibility: public export
    +

    System.Linux.Inotify.Flags

    (source)

    Definitions

    recordInotifyFlags : Type
    Totality: total
    Visibility: public export
    Constructor: 
    IF : Bits32->InotifyFlags

    Projection: 
    .flags : InotifyFlags->Bits32

    Hints:
    EqInotifyFlags
    MonoidInotifyFlags
    OrdInotifyFlags
    SemigroupInotifyFlags
    ShowInotifyFlags
    .flags : InotifyFlags->Bits32
    Totality: total
    Visibility: public export
    flags : InotifyFlags->Bits32
    Totality: total
    Visibility: public export
    recordInotifyMask : Type
    Totality: total
    Visibility: public export
    Constructor: 
    IM : Bits32->InotifyMask

    Projection: 
    .mask : InotifyMask->Bits32

    Hints:
    EqInotifyMask
    MonoidInotifyMask
    OrdInotifyMask
    SemigroupInotifyMask
    ShowInotifyMask
    .mask : InotifyMask->Bits32
    Totality: total
    Visibility: public export
    mask : InotifyMask->Bits32
    Totality: total
    Visibility: public export
    has : InotifyMask->InotifyMask->Bool
      Checks if an inotify event mask holds the given event.

    Totality: total
    Visibility: export
    IN_NONBLOCK : InotifyFlags
    Totality: total
    Visibility: public export
    IN_CLOEXEC : InotifyFlags
    Totality: total
    Visibility: public export
    IN_ACCESS : InotifyMask
    Totality: total
    Visibility: public export
    IN_ATTRIB : InotifyMask
    Totality: total
    Visibility: public export
    IN_CLOSE_WRITE : InotifyMask
    Totality: total
    Visibility: public export
    IN_CLOSE_NOWRITE : InotifyMask
    Totality: total
    Visibility: public export
    IN_CREATE : InotifyMask
    Totality: total
    Visibility: public export
    IN_DELETE : InotifyMask
    Totality: total
    Visibility: public export
    IN_DELETE_SELF : InotifyMask
    Totality: total
    Visibility: public export
    IN_MODIFY : InotifyMask
    Totality: total
    Visibility: public export
    IN_MOVE_SELF : InotifyMask
    Totality: total
    Visibility: public export
    IN_MOVED_FROM : InotifyMask
    Totality: total
    Visibility: public export
    IN_MOVED_TO : InotifyMask
    Totality: total
    Visibility: public export
    IN_OPEN : InotifyMask
    Totality: total
    Visibility: public export
    IN_ALL_EVENTS : InotifyMask
    Totality: total
    Visibility: public export
    IN_MOVE : InotifyMask
    Totality: total
    Visibility: public export
    IN_CLOSE : InotifyMask
    Totality: total
    Visibility: public export
    IN_DONT_FOLLOW : InotifyMask
    Totality: total
    Visibility: public export
    Totality: total
    Visibility: public export
    IN_MASK_ADD : InotifyMask
    Totality: total
    Visibility: public export
    IN_ONESHOT : InotifyMask
    Totality: total
    Visibility: public export
    IN_ONLYDIR : InotifyMask
    Totality: total
    Visibility: public export
    IN_MASK_CREATE : InotifyMask
    Totality: total
    Visibility: public export
    IN_IGNORED : InotifyMask
    Totality: total
    Visibility: public export
    IN_ISDIR : InotifyMask
    Totality: total
    Visibility: public export
    IN_Q_OVERFLOW : InotifyMask
    Totality: total
    Visibility: public export
    IN_UNMOUNT : InotifyMask
    Totality: total
    Visibility: public export
    diff --git a/docs/linux/docs/docs/System.Linux.Signalfd.Flags.html b/docs/linux/docs/docs/System.Linux.Signalfd.Flags.html index b98d0fdb5..f95409466 100644 --- a/docs/linux/docs/docs/System.Linux.Signalfd.Flags.html +++ b/docs/linux/docs/docs/System.Linux.Signalfd.Flags.html @@ -61,4 +61,4 @@ -

    System.Linux.Signalfd.Flags

    (source)

    Definitions

    recordSignalfdFlags : Type
    Totality: total
    Visibility: public export
    Constructor: 
    F : Bits32->SignalfdFlags

    Projection: 
    .flags : SignalfdFlags->Bits32

    Hints:
    EqSignalfdFlags
    MonoidSignalfdFlags
    OrdSignalfdFlags
    SemigroupSignalfdFlags
    ShowSignalfdFlags
    .flags : SignalfdFlags->Bits32
    Totality: total
    Visibility: public export
    flags : SignalfdFlags->Bits32
    Totality: total
    Visibility: public export
    SFD_CLOEXEC : SignalfdFlags
    Totality: total
    Visibility: public export
    SFD_NONBLOCK : SignalfdFlags
    Totality: total
    Visibility: public export
    signalfd_siginfo_size : Nat
    Totality: total
    Visibility: public export
    +

    System.Linux.Signalfd.Flags

    (source)

    Definitions

    recordSignalfdFlags : Type
    Totality: total
    Visibility: public export
    Constructor: 
    F : Bits32->SignalfdFlags

    Projection: 
    .flags : SignalfdFlags->Bits32

    Hints:
    EqSignalfdFlags
    MonoidSignalfdFlags
    OrdSignalfdFlags
    SemigroupSignalfdFlags
    ShowSignalfdFlags
    .flags : SignalfdFlags->Bits32
    Totality: total
    Visibility: public export
    flags : SignalfdFlags->Bits32
    Totality: total
    Visibility: public export
    SFD_CLOEXEC : SignalfdFlags
    Totality: total
    Visibility: public export
    SFD_NONBLOCK : SignalfdFlags
    Totality: total
    Visibility: public export
    signalfd_siginfo_size : Bits32
    Totality: total
    Visibility: public export
    diff --git a/docs/linux/docs/docs/System.Linux.Signalfd.Flags.src.html b/docs/linux/docs/docs/System.Linux.Signalfd.Flags.src.html index 0ff102dfd..9a4ca3a2c 100644 --- a/docs/linux/docs/docs/System.Linux.Signalfd.Flags.src.html +++ b/docs/linux/docs/docs/System.Linux.Signalfd.Flags.src.html @@ -157,7 +157,7 @@
    36 | SFD_NONBLOCK = 2048
    37 |
    38 | public export
    -
    39 | signalfd_siginfo_size : Nat
    +
    39 | signalfd_siginfo_size : Bits32
    40 | signalfd_siginfo_size = 128
    41 |
    diff --git a/docs/linux/docs/docs/System.Linux.Signalfd.html b/docs/linux/docs/docs/System.Linux.Signalfd.html index 79fc7f6ab..594c19946 100644 --- a/docs/linux/docs/docs/System.Linux.Signalfd.html +++ b/docs/linux/docs/docs/System.Linux.Signalfd.html @@ -61,4 +61,4 @@ -

    System.Linux.Signalfd

    (source)

    Reexports

    importpublic Data.C.Ptr
    importpublic System.Linux.Signalfd.Flags
    importpublic System.Posix.File
    importpublic System.Posix.Signal

    Definitions

    recordSignalfd : Type
      A file descriptor for signal handling.

    This can be used for synchronous signal handling using
    (blocking) `readSignalfd` directly, or for asynchronous signal handling
    using `epoll`.

    Totality: total
    Visibility: export
    Constructor: 
    SFD : Bits32->Signalfd

    Projection: 
    .fd : Signalfd->Bits32

    Hint: 
    CastSignalfdFd
    signalfd : ErrIOio=>SigsetT->SignalfdFlags->ioSignalfd
      Opens a new `signalfd` file descriptor for observing the
    signals specified in the given `SigsetT`.


    Notes:
    * Usually, the signals in `set` should first be blocked via `sigprocmask`.
    * A `signalfd` should be closed using `close` just like other file
    descriptors.
    * In general, use `readSignalfd` instead of the `read` functions
    from `System.Posix.File` to read from a `signalfd`.

    Totality: total
    Visibility: export
    recordSiginfoFd : Type
      Result type when reading from a `Signalfd`.

    Totality: total
    Visibility: export
    Constructor: 
    SI : AnyPtr->SiginfoFd

    Projection: 
    .ptr : SiginfoFd->AnyPtr

    Hints:
    DerefSiginfoFd
    SizeOfSiginfoFd
    signal : HasIOio=>SiginfoFd->ioSignal
      The signal that was raised

    Totality: total
    Visibility: export
    errno : HasIOio=>SiginfoFd->ioInt32
    Totality: total
    Visibility: export
    code : HasIOio=>SiginfoFd->ioInt32
    Totality: total
    Visibility: export
    pid : HasIOio=>SiginfoFd->ioPidT
      ID of the process that raised the signal.

    Totality: total
    Visibility: export
    uid : HasIOio=>SiginfoFd->ioUidT
      Real user ID of the process that raised the signal.

    Totality: total
    Visibility: export
    fd : HasIOio=>SiginfoFd->ioSignalfd
      File descriptor that caught the signal.

    Totality: total
    Visibility: export
    tid : HasIOio=>SiginfoFd->ioBits32
      ID of the timer that raised the signal.

    Totality: total
    Visibility: export
    band : HasIOio=>SiginfoFd->ioBits32
    Totality: total
    Visibility: export
    overrun : HasIOio=>SiginfoFd->ioBits32
    Totality: total
    Visibility: export
    trapno : HasIOio=>SiginfoFd->ioBits32
    Totality: total
    Visibility: export
    status : HasIOio=>SiginfoFd->ioInt32
    Totality: total
    Visibility: export
    int : HasIOio=>SiginfoFd->ioInt32
      Integer value of a realtime signal.

    Totality: total
    Visibility: export
    ptr : HasIOio=>SiginfoFd->ioBits64
      Pointer value of a realtime signal

    Totality: total
    Visibility: export
    utime : HasIOio=>SiginfoFd->ioBits64
    Totality: total
    Visibility: export
    stime : HasIOio=>SiginfoFd->ioBits64
    Totality: total
    Visibility: export
    addr : HasIOio=>SiginfoFd->ioBits64
    Totality: total
    Visibility: export
    addrlsb : HasIOio=>SiginfoFd->ioBits16
    Totality: total
    Visibility: export
    readSignalfd : ErrIOio=>Signalfd->CArrayIOnSiginfoFd->io (n : Nat**CArrayIOnSiginfoFd)
      Reads data from a `signalfd` into a pre-allocated array.

    Note: This will overwrite the data stored in `arr` and the
    result is a wrapper around the same pointer.

    Totality: total
    Visibility: export
    +

    System.Linux.Signalfd

    (source)

    Reexports

    importpublic Data.C.Ptr
    importpublic System.Linux.Signalfd.Flags
    importpublic System.Posix.File
    importpublic System.Posix.Signal

    Definitions

    recordSignalfd : Type
      A file descriptor for signal handling.

    This can be used for synchronous signal handling using
    (blocking) `readSignalfd` directly, or for asynchronous signal handling
    using `epoll`.

    Totality: total
    Visibility: export
    Constructor: 
    SFD : Bits32->Signalfd

    Projection: 
    .fd : Signalfd->Bits32

    Hint: 
    CastSignalfdFd
    signalfd : ErrIOio=>SigsetT->SignalfdFlags->ioSignalfd
      Opens a new `signalfd` file descriptor for observing the
    signals specified in the given `SigsetT`.


    Notes:
    * Usually, the signals in `set` should first be blocked via `sigprocmask`.
    * A `signalfd` should be closed using `close` just like other file
    descriptors.
    * In general, use `readSignalfd` instead of the `read` functions
    from `System.Posix.File` to read from a `signalfd`.

    Totality: total
    Visibility: export
    recordSiginfoFd : Type
      Result type when reading from a `Signalfd`.

    Totality: total
    Visibility: export
    Constructor: 
    SI : AnyPtr->SiginfoFd

    Projection: 
    .ptr : SiginfoFd->AnyPtr

    Hints:
    DerefSiginfoFd
    SizeOfSiginfoFd
    signal : HasIOio=>SiginfoFd->ioSignal
      The signal that was raised

    Totality: total
    Visibility: export
    errno : HasIOio=>SiginfoFd->ioInt32
    Totality: total
    Visibility: export
    code : HasIOio=>SiginfoFd->ioInt32
    Totality: total
    Visibility: export
    pid : HasIOio=>SiginfoFd->ioPidT
      ID of the process that raised the signal.

    Totality: total
    Visibility: export
    uid : HasIOio=>SiginfoFd->ioUidT
      Real user ID of the process that raised the signal.

    Totality: total
    Visibility: export
    fd : HasIOio=>SiginfoFd->ioSignalfd
      File descriptor that caught the signal.

    Totality: total
    Visibility: export
    tid : HasIOio=>SiginfoFd->ioBits32
      ID of the timer that raised the signal.

    Totality: total
    Visibility: export
    band : HasIOio=>SiginfoFd->ioBits32
    Totality: total
    Visibility: export
    overrun : HasIOio=>SiginfoFd->ioBits32
    Totality: total
    Visibility: export
    trapno : HasIOio=>SiginfoFd->ioBits32
    Totality: total
    Visibility: export
    status : HasIOio=>SiginfoFd->ioInt32
    Totality: total
    Visibility: export
    int : HasIOio=>SiginfoFd->ioInt32
      Integer value of a realtime signal.

    Totality: total
    Visibility: export
    ptr : HasIOio=>SiginfoFd->ioBits64
      Pointer value of a realtime signal

    Totality: total
    Visibility: export
    utime : HasIOio=>SiginfoFd->ioBits64
    Totality: total
    Visibility: export
    stime : HasIOio=>SiginfoFd->ioBits64
    Totality: total
    Visibility: export
    addr : HasIOio=>SiginfoFd->ioBits64
    Totality: total
    Visibility: export
    addrlsb : HasIOio=>SiginfoFd->ioBits16
    Totality: total
    Visibility: export
    readSignalfd : ErrIOio=>Signalfd->CArrayIOnSiginfoFd->io (n : Nat**CArrayIOnSiginfoFd)
      Reads data from a `signalfd` into a pre-allocated array.

    Note: This will overwrite the data stored in `arr` and the
    result is a wrapper around the same pointer.

    Totality: total
    Visibility: export
    diff --git a/docs/linux/docs/docs/System.Linux.Signalfd.src.html b/docs/linux/docs/docs/System.Linux.Signalfd.src.html index 749e21648..71fb00a4e 100644 --- a/docs/linux/docs/docs/System.Linux.Signalfd.src.html +++ b/docs/linux/docs/docs/System.Linux.Signalfd.src.html @@ -320,7 +320,7 @@
    199 |   let p  := unsafeUnwrap arr
    200 |       sz := sizeof SiginfoFd
    201 |    in do
    -
    202 |      bs <- readPtr fd p (cast $ n * sz)
    +
    202 |      bs <- readPtr fd p (cast n * sz)
    203 |      pure (cast (bs `div` cast sz) ** unsafeWrap p)
    204 |
    diff --git a/docs/linux/docs/docs/System.Linux.Timerfd.Flags.html b/docs/linux/docs/docs/System.Linux.Timerfd.Flags.html index 4a720b747..d57e1fafe 100644 --- a/docs/linux/docs/docs/System.Linux.Timerfd.Flags.html +++ b/docs/linux/docs/docs/System.Linux.Timerfd.Flags.html @@ -61,4 +61,4 @@ -

    System.Linux.Timerfd.Flags

    (source)

    Definitions

    recordTimerfdFlags : Type
    Totality: total
    Visibility: public export
    Constructor: 
    F : Bits32->TimerfdFlags

    Projection: 
    .flags : TimerfdFlags->Bits32

    Hints:
    EqTimerfdFlags
    MonoidTimerfdFlags
    OrdTimerfdFlags
    SemigroupTimerfdFlags
    ShowTimerfdFlags
    .flags : TimerfdFlags->Bits32
    Totality: total
    Visibility: public export
    flags : TimerfdFlags->Bits32
    Totality: total
    Visibility: public export
    TFD_CLOEXEC : TimerfdFlags
    Totality: total
    Visibility: public export
    TFD_NONBLOCK : TimerfdFlags
    Totality: total
    Visibility: public export
    TFD_TIMER_ABSTIME : Bits32
    Totality: total
    Visibility: public export
    +

    System.Linux.Timerfd.Flags

    (source)

    Definitions

    recordTimerfdFlags : Type
    Totality: total
    Visibility: public export
    Constructor: 
    F : Bits32->TimerfdFlags

    Projection: 
    .flags : TimerfdFlags->Bits32

    Hints:
    EqTimerfdFlags
    MonoidTimerfdFlags
    OrdTimerfdFlags
    SemigroupTimerfdFlags
    ShowTimerfdFlags
    .flags : TimerfdFlags->Bits32
    Totality: total
    Visibility: public export
    flags : TimerfdFlags->Bits32
    Totality: total
    Visibility: public export
    TFD_CLOEXEC : TimerfdFlags
    Totality: total
    Visibility: public export
    TFD_NONBLOCK : TimerfdFlags
    Totality: total
    Visibility: public export
    TFD_TIMER_ABSTIME : Bits32
    Totality: total
    Visibility: public export
    diff --git a/docs/linux/docs/docs/System.Linux.Timerfd.html b/docs/linux/docs/docs/System.Linux.Timerfd.html index 7703163f9..1e1d52c52 100644 --- a/docs/linux/docs/docs/System.Linux.Timerfd.html +++ b/docs/linux/docs/docs/System.Linux.Timerfd.html @@ -61,4 +61,4 @@ -

    System.Linux.Timerfd

    (source)

    Reexports

    importpublic Data.C.Ptr
    importpublic System.Linux.Timerfd.Flags
    importpublic System.Posix.File
    importpublic System.Posix.Timer

    Definitions

    recordTimerfd : Type
      A file descriptor for signal handling.

    This can be used for synchronous signal handling using
    (blocking) `readSignalfd` directly, or for asynchronous signal handling
    using `epoll`.

    Totality: total
    Visibility: export
    Constructor: 
    TFD : Bits32->Timerfd

    Projection: 
    .fd : Timerfd->Bits32

    Hint: 
    CastTimerfdFd
    timerfd : ErrIOio=>ClockId->TimerfdFlags->ioTimerfd
      Opens a new `timerfd` file descriptor for observing the given clock.


    Notes:
    * A `signalfd` should be closed using `close` just like other file
    descriptors.
    * In general, use `readTimerfd` instead of the `read` functions
    from `System.Posix.File` to read from a `timerfd`.

    Totality: total
    Visibility: export
    settime : ErrIOio=>Timerfd->Bits32->Itimerspec->Itimerspec->io ()
      Sets the time of a `timerfd`.

    The currently set time will be stored in `old`.
    Use the `TFD_TIMER_ABSTIME` flag if the time should be interpreted as
    an absolute wall clock time.

    Totality: total
    Visibility: export
    settime' : ErrIOio=>Timerfd->Bits32->Itimerspec->io ()
      Like `settime` but without storing the currently set `itimerspec`.

    Totality: total
    Visibility: export
    gettime : ErrIOio=>Timerfd->Itimerspec->io ()
      Reads the currently set `itimerspec` of a `timerfd` and uses the given
    pointer to place the data.

    Totality: total
    Visibility: export
    readTimerfd : ErrIOio=>Timerfd->ioBits64
      Reads data from a `timerfd`.

    This will block until the next time the timer expires unless `TFD_NONBLOCK`
    was set when creating the timer.

    The value returned is the number of times the timer expired since
    the last read.

    Totality: total
    Visibility: export
    +

    System.Linux.Timerfd

    (source)

    Reexports

    importpublic Data.C.Ptr
    importpublic System.Linux.Timerfd.Flags
    importpublic System.Posix.File
    importpublic System.Posix.Timer

    Definitions

    recordTimerfd : Type
      A file descriptor for signal handling.

    This can be used for synchronous signal handling using
    (blocking) `readSignalfd` directly, or for asynchronous signal handling
    using `epoll`.

    Totality: total
    Visibility: export
    Constructor: 
    TFD : Bits32->Timerfd

    Projection: 
    .fd : Timerfd->Bits32

    Hint: 
    CastTimerfdFd
    timerfd : ErrIOio=>ClockId->TimerfdFlags->ioTimerfd
      Opens a new `timerfd` file descriptor for observing the given clock.


    Notes:
    * A `signalfd` should be closed using `close` just like other file
    descriptors.
    * In general, use `readTimerfd` instead of the `read` functions
    from `System.Posix.File` to read from a `timerfd`.

    Totality: total
    Visibility: export
    settime : ErrIOio=>Timerfd->Bits32->Itimerspec->Itimerspec->io ()
      Sets the time of a `timerfd`.

    The currently set time will be stored in `old`.
    Use the `TFD_TIMER_ABSTIME` flag if the time should be interpreted as
    an absolute wall clock time.

    Totality: total
    Visibility: export
    settime' : ErrIOio=>Timerfd->Bits32->Itimerspec->io ()
      Like `settime` but without storing the currently set `itimerspec`.

    Totality: total
    Visibility: export
    gettime : ErrIOio=>Timerfd->Itimerspec->io ()
      Reads the currently set `itimerspec` of a `timerfd` and uses the given
    pointer to place the data.

    Totality: total
    Visibility: export
    readTimerfd : ErrIOio=>Timerfd->ioBits64
      Reads data from a `timerfd`.

    This will block until the next time the timer expires unless `TFD_NONBLOCK`
    was set when creating the timer.

    The value returned is the number of times the timer expired since
    the last read.

    Totality: total
    Visibility: export
    diff --git a/docs/linux/docs/docs/System.Linux.User.Passwd.html b/docs/linux/docs/docs/System.Linux.User.Passwd.html index c66809099..aad47dab1 100644 --- a/docs/linux/docs/docs/System.Linux.User.Passwd.html +++ b/docs/linux/docs/docs/System.Linux.User.Passwd.html @@ -61,4 +61,4 @@ -

    System.Linux.User.Passwd

    (source)

    Definitions

    recordPasswdEntry : Type
      An entry in the `/etc/passwd` file.

    Totality: total
    Visibility: public export
    Constructor: 
    PE : String->String->UidT->GidT->String->String->String->PasswdEntry

    Projections:
    .comment : PasswdEntry->String
    .gid : PasswdEntry->GidT
    .homedir : PasswdEntry->String
    .loginName : PasswdEntry->String
    .password : PasswdEntry->String
    .shell : PasswdEntry->String
    .uid : PasswdEntry->UidT

    Hints:
    EqPasswdEntry
    ShowPasswdEntry
    .loginName : PasswdEntry->String
    Totality: total
    Visibility: public export
    loginName : PasswdEntry->String
    Totality: total
    Visibility: public export
    .password : PasswdEntry->String
    Totality: total
    Visibility: public export
    password : PasswdEntry->String
    Totality: total
    Visibility: public export
    .uid : PasswdEntry->UidT
    Totality: total
    Visibility: public export
    uid : PasswdEntry->UidT
    Totality: total
    Visibility: public export
    .gid : PasswdEntry->GidT
    Totality: total
    Visibility: public export
    gid : PasswdEntry->GidT
    Totality: total
    Visibility: public export
    .comment : PasswdEntry->String
    Totality: total
    Visibility: public export
    comment : PasswdEntry->String
    Totality: total
    Visibility: public export
    .homedir : PasswdEntry->String
    Totality: total
    Visibility: public export
    homedir : PasswdEntry->String
    Totality: total
    Visibility: public export
    .shell : PasswdEntry->String
    Totality: total
    Visibility: public export
    shell : PasswdEntry->String
    Totality: total
    Visibility: public export
    readEntry : ByteString->MaybePasswdEntry
    Totality: total
    Visibility: export
    +

    System.Linux.User.Passwd

    (source)

    Definitions

    recordPasswdEntry : Type
      An entry in the `/etc/passwd` file.

    Totality: total
    Visibility: public export
    Constructor: 
    PE : String->String->UidT->GidT->String->String->String->PasswdEntry

    Projections:
    .comment : PasswdEntry->String
    .gid : PasswdEntry->GidT
    .homedir : PasswdEntry->String
    .loginName : PasswdEntry->String
    .password : PasswdEntry->String
    .shell : PasswdEntry->String
    .uid : PasswdEntry->UidT

    Hints:
    EqPasswdEntry
    ShowPasswdEntry
    .loginName : PasswdEntry->String
    Totality: total
    Visibility: public export
    loginName : PasswdEntry->String
    Totality: total
    Visibility: public export
    .password : PasswdEntry->String
    Totality: total
    Visibility: public export
    password : PasswdEntry->String
    Totality: total
    Visibility: public export
    .uid : PasswdEntry->UidT
    Totality: total
    Visibility: public export
    uid : PasswdEntry->UidT
    Totality: total
    Visibility: public export
    .gid : PasswdEntry->GidT
    Totality: total
    Visibility: public export
    gid : PasswdEntry->GidT
    Totality: total
    Visibility: public export
    .comment : PasswdEntry->String
    Totality: total
    Visibility: public export
    comment : PasswdEntry->String
    Totality: total
    Visibility: public export
    .homedir : PasswdEntry->String
    Totality: total
    Visibility: public export
    homedir : PasswdEntry->String
    Totality: total
    Visibility: public export
    .shell : PasswdEntry->String
    Totality: total
    Visibility: public export
    shell : PasswdEntry->String
    Totality: total
    Visibility: public export
    readEntry : ByteString->MaybePasswdEntry
    Totality: total
    Visibility: export
    diff --git a/docs/pack/docs/docs/Pack.Runner.Install.src.html b/docs/pack/docs/docs/Pack.Runner.Install.src.html index 7fd49c4c5..798d0635e 100644 --- a/docs/pack/docs/docs/Pack.Runner.Install.src.html +++ b/docs/pack/docs/docs/Pack.Runner.Install.src.html @@ -351,278 +351,281 @@
    230 | installImpl dir rl =
    231 |   let pre      := libInstallPrefix rl
    232 |       instCmd  := installCmd e.env.config.withSrc
    -
    233 |    in do
    -
    234 |      info "Installing library\{withSrcStr}: \{name rl}"
    -
    235 |      when (isInstalled rl) $ do
    -
    236 |        info "Removing currently installed version of \{name rl}"
    -
    237 |        rmDir (pkgInstallDir rl.name rl.pkg rl.desc)
    -
    238 |        rmDir (pkgLibDir rl.name rl.pkg)
    -
    239 |      libPkg pre Build True ["--build"] rl.desc
    -
    240 |      libPkg pre Debug False instCmd rl.desc
    -
    241 |      when !(exists $ dir /> "lib") $
    -
    242 |        copyDir (dir /> "lib") (pkgLibDir rl.name rl.pkg)
    -
    243 |
    -
    244 | preInstall :
    -
    245 |      {auto _ : HasIO io}
    -
    246 |   -> {auto e : IdrisEnv}
    -
    247 |   -> SafeLib
    -
    248 |   -> EitherT PackErr io ()
    -
    249 | preInstall rl = withPkgEnv rl.name rl.pkg $ \dir =>
    -
    250 |   let ipkgAbs := ipkg dir rl.pkg
    -
    251 |    in case rl.pkg of
    -
    252 |         Git u c ipkg _ _ => do
    -
    253 |           let cache := ipkgCachePath rl.name c ipkg
    -
    254 |           copyFile cache ipkgAbs
    -
    255 |         Local _ _ _ _ => pure ()
    -
    256 |
    -
    257 |         Core c => do
    -
    258 |           let cache   := coreCachePath c
    -
    259 |           copyFile cache ipkgAbs
    -
    260 |           case c of
    -
    261 |             IdrisApi =>
    -
    262 |               sysAndLog Build ["make", "src/IdrisPaths.idr", prefixVar]
    -
    263 |             _        => pure ()
    -
    264 |
    -
    265 | -- Install the given resolved library.
    -
    266 | installLib :
    -
    267 |      {auto _ : HasIO io}
    -
    268 |   -> {auto e : IdrisEnv}
    -
    269 |   -> SafeLib
    -
    270 |   -> EitherT PackErr io ()
    -
    271 | installLib rl = case rl.status of
    -
    272 |   Installed _ => pure ()
    -
    273 |   _           => do
    -
    274 |     preInstall rl
    -
    275 |     withPkgEnv rl.name rl.pkg $ \dir => do
    -
    276 |       installImpl dir rl
    -
    277 |       case rl.pkg of
    -
    278 |        Local _ _ _ _ => write (libTimestamp rl.name rl.pkg) ""
    -
    279 |        _             => pure ()
    -
    280 |
    -
    281 |     uncacheLib (name rl)
    -
    282 |
    -
    283 | --------------------------------------------------------------------------------
    -
    284 | --          Installing Apps
    -
    285 | --------------------------------------------------------------------------------
    -
    286 |
    -
    287 | -- Install an Idris application given as a package name
    -
    288 | -- TODO: Install wrapper script only if necessary
    -
    289 | covering
    -
    290 | installApp :
    -
    291 |      {auto _ : HasIO io}
    -
    292 |   -> {auto e : IdrisEnv}
    -
    293 |   -> (withWrapperScript : Bool)
    -
    294 |   -> SafeApp
    -
    295 |   -> EitherT PackErr io ()
    -
    296 | installApp b ra =
    -
    297 |   let cg := ipkgCodeGen ra.desc.desc
    -
    298 |   in case ra.status of
    -
    299 |     BinInstalled => pure ()
    -
    300 |     Installed    => case b of
    -
    301 |       False => pure ()
    -
    302 |       True  => appLink ra.exec ra.name (usePackagePath ra) cg
    -
    303 |     _            => withPkgEnv ra.name ra.pkg $ \dir =>
    -
    304 |       let ipkgAbs := ipkg dir ra.pkg
    -
    305 |        in case ra.pkg of
    -
    306 |             Core _            => pure ()
    -
    307 |             Git u c ipkg pp _ => do
    -
    308 |               let cache   := ipkgCachePath ra.name c ipkg
    -
    309 |               copyFile cache ipkgAbs
    -
    310 |               libPkg [] Build True ["--build"] (notPackIsSafe ra.desc)
    -
    311 |               copyApp ra
    -
    312 |               when b $ appLink ra.exec ra.name pp cg
    -
    313 |             Local _ _ pp _    => do
    -
    314 |               libPkg [] Build True ["--build"] (notPackIsSafe ra.desc)
    -
    315 |               copyApp ra
    -
    316 |               when b $ appLink ra.exec ra.name pp cg
    -
    317 |               write (appTimestamp ra.name ra.pkg) ""
    -
    318 |
    -
    319 |
    -
    320 | --------------------------------------------------------------------------------
    -
    321 | --          Generating API Docs
    -
    322 | --------------------------------------------------------------------------------
    -
    323 |
    -
    324 | covering
    -
    325 | -- Install the API docs for the given resolved library.
    -
    326 | installDocs :
    -
    327 |      {auto _ : HasIO io}
    -
    328 |   -> {auto e : IdrisEnv}
    -
    329 |   -> SafeLib
    -
    330 |   -> EitherT PackErr io ()
    -
    331 | installDocs rl = case rl.status of
    -
    332 |   Installed True => pure ()
    -
    333 |   _              => withPkgEnv rl.name rl.pkg $ \dir => do
    -
    334 |     let docsDir : Path Abs
    -
    335 |         docsDir = buildPath rl.desc /> "docs"
    -
    336 |
    -
    337 |         pre : List (String,String)
    -
    338 |         pre = libInstallPrefix rl
    +
    233 |       libDir   := rl.desc.path.parent </> "lib"
    +
    234 |    in do
    +
    235 |      info "Installing library\{withSrcStr}: \{name rl}"
    +
    236 |      when (isInstalled rl) $ do
    +
    237 |        info "Removing currently installed version of \{name rl}"
    +
    238 |        rmDir (pkgInstallDir rl.name rl.pkg rl.desc)
    +
    239 |        rmDir (pkgLibDir rl.name rl.pkg)
    +
    240 |      libPkg pre Build True ["--build"] rl.desc
    +
    241 |      libPkg pre Debug False instCmd rl.desc
    +
    242 |      debug "checking if libdir at \{libDir} exists"
    +
    243 |      when !(exists libDir) $ do
    +
    244 |        debug "copying lib dir"
    +
    245 |        copyDir libDir (pkgLibDir rl.name rl.pkg)
    +
    246 |
    +
    247 | preInstall :
    +
    248 |      {auto _ : HasIO io}
    +
    249 |   -> {auto e : IdrisEnv}
    +
    250 |   -> SafeLib
    +
    251 |   -> EitherT PackErr io ()
    +
    252 | preInstall rl = withPkgEnv rl.name rl.pkg $ \dir =>
    +
    253 |   let ipkgAbs := ipkg dir rl.pkg
    +
    254 |    in case rl.pkg of
    +
    255 |         Git u c ipkg _ _ => do
    +
    256 |           let cache := ipkgCachePath rl.name c ipkg
    +
    257 |           copyFile cache ipkgAbs
    +
    258 |         Local _ _ _ _ => pure ()
    +
    259 |
    +
    260 |         Core c => do
    +
    261 |           let cache   := coreCachePath c
    +
    262 |           copyFile cache ipkgAbs
    +
    263 |           case c of
    +
    264 |             IdrisApi =>
    +
    265 |               sysAndLog Build ["make", "src/IdrisPaths.idr", prefixVar]
    +
    266 |             _        => pure ()
    +
    267 |
    +
    268 | -- Install the given resolved library.
    +
    269 | installLib :
    +
    270 |      {auto _ : HasIO io}
    +
    271 |   -> {auto e : IdrisEnv}
    +
    272 |   -> SafeLib
    +
    273 |   -> EitherT PackErr io ()
    +
    274 | installLib rl = case rl.status of
    +
    275 |   Installed _ => pure ()
    +
    276 |   _           => do
    +
    277 |     preInstall rl
    +
    278 |     withPkgEnv rl.name rl.pkg $ \dir => do
    +
    279 |       installImpl dir rl
    +
    280 |       case rl.pkg of
    +
    281 |        Local _ _ _ _ => write (libTimestamp rl.name rl.pkg) ""
    +
    282 |        _             => pure ()
    +
    283 |
    +
    284 |     uncacheLib (name rl)
    +
    285 |
    +
    286 | --------------------------------------------------------------------------------
    +
    287 | --          Installing Apps
    +
    288 | --------------------------------------------------------------------------------
    +
    289 |
    +
    290 | -- Install an Idris application given as a package name
    +
    291 | -- TODO: Install wrapper script only if necessary
    +
    292 | covering
    +
    293 | installApp :
    +
    294 |      {auto _ : HasIO io}
    +
    295 |   -> {auto e : IdrisEnv}
    +
    296 |   -> (withWrapperScript : Bool)
    +
    297 |   -> SafeApp
    +
    298 |   -> EitherT PackErr io ()
    +
    299 | installApp b ra =
    +
    300 |   let cg := ipkgCodeGen ra.desc.desc
    +
    301 |   in case ra.status of
    +
    302 |     BinInstalled => pure ()
    +
    303 |     Installed    => case b of
    +
    304 |       False => pure ()
    +
    305 |       True  => appLink ra.exec ra.name (usePackagePath ra) cg
    +
    306 |     _            => withPkgEnv ra.name ra.pkg $ \dir =>
    +
    307 |       let ipkgAbs := ipkg dir ra.pkg
    +
    308 |        in case ra.pkg of
    +
    309 |             Core _            => pure ()
    +
    310 |             Git u c ipkg pp _ => do
    +
    311 |               let cache   := ipkgCachePath ra.name c ipkg
    +
    312 |               copyFile cache ipkgAbs
    +
    313 |               libPkg [] Build True ["--build"] (notPackIsSafe ra.desc)
    +
    314 |               copyApp ra
    +
    315 |               when b $ appLink ra.exec ra.name pp cg
    +
    316 |             Local _ _ pp _    => do
    +
    317 |               libPkg [] Build True ["--build"] (notPackIsSafe ra.desc)
    +
    318 |               copyApp ra
    +
    319 |               when b $ appLink ra.exec ra.name pp cg
    +
    320 |               write (appTimestamp ra.name ra.pkg) ""
    +
    321 |
    +
    322 |
    +
    323 | --------------------------------------------------------------------------------
    +
    324 | --          Generating API Docs
    +
    325 | --------------------------------------------------------------------------------
    +
    326 |
    +
    327 | covering
    +
    328 | -- Install the API docs for the given resolved library.
    +
    329 | installDocs :
    +
    330 |      {auto _ : HasIO io}
    +
    331 |   -> {auto e : IdrisEnv}
    +
    332 |   -> SafeLib
    +
    333 |   -> EitherT PackErr io ()
    +
    334 | installDocs rl = case rl.status of
    +
    335 |   Installed True => pure ()
    +
    336 |   _              => withPkgEnv rl.name rl.pkg $ \dir => do
    +
    337 |     let docsDir : Path Abs
    +
    338 |         docsDir = buildPath rl.desc /> "docs"
    339 |
    -
    340 |         htmlDir : Path Abs
    -
    341 |         htmlDir = docsDir /> "docs"
    +
    340 |         pre : List (String,String)
    +
    341 |         pre = libInstallPrefix rl
    342 |
    -
    343 |     info "Building source docs for: \{name rl}"
    -
    344 |     preInstall rl
    -
    345 |     libPkg pre Build False ["--mkdoc"] rl.desc
    -
    346 |
    -
    347 |     when e.env.config.useKatla $ do
    -
    348 |       info "Building highlighted sources for: \{name rl}"
    -
    349 |       mkDir htmlDir
    -
    350 |       rp <- resolveApp "katla"
    -
    351 |       let katla := pkgExec rp.name rp.pkg rp.exec
    -
    352 |       fs <- map (MkF htmlDir) <$> htmlFiles htmlDir
    -
    353 |       for_ fs $ \htmlFile =>
    -
    354 |         let Just ds@(MkDS _ src ttm srcHtml) := sourceForDoc rl.desc htmlFile
    -
    355 |               | Nothing => pure ()
    -
    356 |          in sysAndLog Build [katla, "html", src, ttm, NoEscape ">", srcHtml] >>
    -
    357 |             insertSources ds
    -
    358 |
    -
    359 |     let docs := pkgDocs rl.name rl.pkg rl.desc
    -
    360 |     when !(exists docs) (rmDir docs)
    -
    361 |     copyDir docsDir docs
    -
    362 |     uncacheLib (name rl)
    -
    363 |
    -
    364 | katla : (c : Config) => List (InstallType, PkgName)
    -
    365 | katla = if c.withDocs && c.useKatla then [(App False, "katla")] else []
    +
    343 |         htmlDir : Path Abs
    +
    344 |         htmlDir = docsDir /> "docs"
    +
    345 |
    +
    346 |     info "Building source docs for: \{name rl}"
    +
    347 |     preInstall rl
    +
    348 |     libPkg pre Build False ["--mkdoc"] rl.desc
    +
    349 |
    +
    350 |     when e.env.config.useKatla $ do
    +
    351 |       info "Building highlighted sources for: \{name rl}"
    +
    352 |       mkDir htmlDir
    +
    353 |       rp <- resolveApp "katla"
    +
    354 |       let katla := pkgExec rp.name rp.pkg rp.exec
    +
    355 |       fs <- map (MkF htmlDir) <$> htmlFiles htmlDir
    +
    356 |       for_ fs $ \htmlFile =>
    +
    357 |         let Just ds@(MkDS _ src ttm srcHtml) := sourceForDoc rl.desc htmlFile
    +
    358 |               | Nothing => pure ()
    +
    359 |          in sysAndLog Build [katla, "html", src, ttm, NoEscape ">", srcHtml] >>
    +
    360 |             insertSources ds
    +
    361 |
    +
    362 |     let docs := pkgDocs rl.name rl.pkg rl.desc
    +
    363 |     when !(exists docs) (rmDir docs)
    +
    364 |     copyDir docsDir docs
    +
    365 |     uncacheLib (name rl)
    366 |
    -
    367 | autoPairs : (c : Config) => List (InstallType, PkgName)
    -
    368 | autoPairs =
    -
    369 |      map ((Library,) . corePkgName) [ Prelude, Base, Network ]
    -
    370 |   ++ map (Library,) c.autoLibs
    -
    371 |   ++ map (App True,) c.autoApps
    -
    372 |
    -
    373 | libInfo : List SafePkg -> List String
    -
    374 | libInfo = mapMaybe $ \case Lib rl  => Just "\{rl.name}"
    -
    375 |                            App _ _ => Nothing
    -
    376 |
    -
    377 | appInfo : List SafePkg -> List String
    -
    378 | appInfo = mapMaybe $ \case App _ ra => Just "\{ra.name}"
    -
    379 |                            Lib _    => Nothing
    -
    380 |
    -
    381 | ||| Install the given list of libraries or applications, by first
    -
    382 | ||| resolving each of them and then creating a build plan including
    -
    383 | ||| all dependencies of the lot.
    -
    384 | export covering
    -
    385 | install :
    -
    386 |      {auto _ : HasIO io}
    -
    387 |   -> {auto e : IdrisEnv}
    -
    388 |   -> List (InstallType, PkgName)
    -
    389 |   -> EitherT PackErr io ()
    -
    390 | install ps = do
    -
    391 |   all <- plan $ katla <+> autoPairs <+> ps
    -
    392 |   logMany Info "Installing libraries:" (libInfo all)
    -
    393 |   logMany Info "Installing apps:" (appInfo all)
    -
    394 |   for_ all $ \case Lib rl   => installLib rl
    -
    395 |                    App b rl => installApp b rl
    -
    396 |
    -
    397 |   when e.env.config.withDocs $
    -
    398 |     for_ all $ \case Lib rl  => installDocs rl
    -
    399 |                      App _ _ => pure ()
    -
    400 |
    -
    401 | ||| Install the given list of libraries, by first
    -
    402 | ||| resolving each of them and then creating a build plan including
    -
    403 | ||| all dependencies of the lot.
    -
    404 | export covering %inline
    -
    405 | installLibs : HasIO io => IdrisEnv => List PkgName -> EitherT PackErr io ()
    -
    406 | installLibs = install . map (Library,)
    -
    407 |
    -
    408 | ||| Install the given list of applications, by first
    -
    409 | ||| resolving each of them and then creating a build plan including
    -
    410 | ||| all dependencies of the lot.
    -
    411 | export covering %inline
    -
    412 | installApps : HasIO io => IdrisEnv => List PkgName -> EitherT PackErr io ()
    -
    413 | installApps = install . map (App True,)
    -
    414 |
    -
    415 | ||| Install the (possibly transitive) dependencies of the given
    -
    416 | ||| loaded `.ipkg` file.
    -
    417 | export covering
    -
    418 | installDeps :
    -
    419 |      {auto _ : HasIO io}
    -
    420 |   -> {auto _ : IdrisEnv}
    -
    421 |   -> Desc Safe
    -
    422 |   -> EitherT PackErr io ()
    -
    423 | installDeps = install . map (Library,) . dependencies
    -
    424 |
    -
    425 | ||| Creates a packaging environment with Idris2 installed.
    -
    426 | export covering
    -
    427 | idrisEnv :
    -
    428 |      {auto _ : HasIO io}
    -
    429 |   -> {auto _ : PackDir}
    -
    430 |   -> {auto _ : TmpDir}
    -
    431 |   -> {auto _ : LibCache}
    -
    432 |   -> {auto _ : LineBufferingCmd}
    -
    433 |   -> MetaConfig
    -
    434 |   -> (fetch : Bool)
    -
    435 |   -> EitherT PackErr io IdrisEnv
    -
    436 | idrisEnv mc fetch = env mc fetch >>= (\e => mkIdris)
    -
    437 |
    -
    438 | ||| Update the pack installation
    -
    439 | export covering
    -
    440 | update : HasIO io => IdrisEnv -> EitherT PackErr io ()
    -
    441 | update e =
    -
    442 |   let bin  := packBinDir
    -
    443 |    in do
    -
    444 |      info "Updating pack. If this fails, try switching to the latest package collection."
    -
    445 |      commit <- maybe (gitLatest packRepo "main") pure packCommit
    -
    446 |
    -
    447 |      withGit "pack" packRepo commit $ \dir => do
    -
    448 |        let ipkg := MkF dir "pack.ipkg"
    -
    449 |        d <- parseLibIpkg ipkg ipkg
    -
    450 |        installDeps d
    -
    451 |        let installDir    := packInstallDir commit
    -
    452 |            installedExec := installDir /> "pack"
    -
    453 |        ex <- exists installedExec
    -
    454 |        case ex of
    -
    455 |          True  => link installedExec packExec
    -
    456 |          False => do
    -
    457 |            libPkg [] Build True ["--build"] d
    -
    458 |            mkDir installDir
    -
    459 |            sys ["cp", "-r", NoEscape "build/exec/*", installDir]
    -
    460 |            link installedExec packExec
    -
    461 |
    -
    462 | --------------------------------------------------------------------------------
    -
    463 | --          Removing Libs
    -
    464 | --------------------------------------------------------------------------------
    -
    465 |
    -
    466 | covering
    -
    467 | removeApp : HasIO io => Env => PkgName -> EitherT PackErr io ()
    -
    468 | removeApp n = do
    -
    469 |   info "Removing application \{n}"
    -
    470 |   ra <- resolveApp n
    -
    471 |   rmFile (pathExec ra.exec)
    -
    472 |   rmDir (pkgBinDir ra.name ra.pkg)
    -
    473 |
    -
    474 | covering
    -
    475 | removeLib : HasIO io => Env => PkgName -> EitherT PackErr io ()
    -
    476 | removeLib n = do
    -
    477 |   rl <- resolveLib n
    -
    478 |   case isInstalled rl of
    -
    479 |     True  => do
    -
    480 |       info "Removing library \{n}"
    -
    481 |       rmDir (pkgInstallDir rl.name rl.pkg rl.desc)
    -
    482 |       rmDir (pkgLibDir rl.name rl.pkg)
    -
    483 |     False => warn "Package \{n} is not installed. Ignoring."
    -
    484 |
    -
    485 | ||| Remove the given libs or apps
    -
    486 | export covering
    -
    487 | remove : HasIO io => Env => List (PkgType,PkgName) -> EitherT PackErr io ()
    -
    488 | remove ps = do
    -
    489 |   ref <- emptyCache
    -
    490 |   for_ ps  $ \case (PLib,n) => removeLib n
    -
    491 |                    (PApp,n) => removeApp n
    -
    492 |
    -
    493 | ||| Remove the given libs
    -
    494 | export covering
    -
    495 | removeLibs : HasIO io => Env => List PkgName -> EitherT PackErr io ()
    -
    496 | removeLibs ns = do
    -
    497 |   checkDeletable ns
    -
    498 |   remove $ map (PLib,) ns
    -
    499 |
    -
    500 | ||| Remove the given apps
    -
    501 | export covering
    -
    502 | removeApps : HasIO io => Env => List PkgName -> EitherT PackErr io ()
    -
    503 | removeApps = remove . map (PApp,)
    -
    504 |
    +
    367 | katla : (c : Config) => List (InstallType, PkgName)
    +
    368 | katla = if c.withDocs && c.useKatla then [(App False, "katla")] else []
    +
    369 |
    +
    370 | autoPairs : (c : Config) => List (InstallType, PkgName)
    +
    371 | autoPairs =
    +
    372 |      map ((Library,) . corePkgName) [ Prelude, Base, Network ]
    +
    373 |   ++ map (Library,) c.autoLibs
    +
    374 |   ++ map (App True,) c.autoApps
    +
    375 |
    +
    376 | libInfo : List SafePkg -> List String
    +
    377 | libInfo = mapMaybe $ \case Lib rl  => Just "\{rl.name}"
    +
    378 |                            App _ _ => Nothing
    +
    379 |
    +
    380 | appInfo : List SafePkg -> List String
    +
    381 | appInfo = mapMaybe $ \case App _ ra => Just "\{ra.name}"
    +
    382 |                            Lib _    => Nothing
    +
    383 |
    +
    384 | ||| Install the given list of libraries or applications, by first
    +
    385 | ||| resolving each of them and then creating a build plan including
    +
    386 | ||| all dependencies of the lot.
    +
    387 | export covering
    +
    388 | install :
    +
    389 |      {auto _ : HasIO io}
    +
    390 |   -> {auto e : IdrisEnv}
    +
    391 |   -> List (InstallType, PkgName)
    +
    392 |   -> EitherT PackErr io ()
    +
    393 | install ps = do
    +
    394 |   all <- plan $ katla <+> autoPairs <+> ps
    +
    395 |   logMany Info "Installing libraries:" (libInfo all)
    +
    396 |   logMany Info "Installing apps:" (appInfo all)
    +
    397 |   for_ all $ \case Lib rl   => installLib rl
    +
    398 |                    App b rl => installApp b rl
    +
    399 |
    +
    400 |   when e.env.config.withDocs $
    +
    401 |     for_ all $ \case Lib rl  => installDocs rl
    +
    402 |                      App _ _ => pure ()
    +
    403 |
    +
    404 | ||| Install the given list of libraries, by first
    +
    405 | ||| resolving each of them and then creating a build plan including
    +
    406 | ||| all dependencies of the lot.
    +
    407 | export covering %inline
    +
    408 | installLibs : HasIO io => IdrisEnv => List PkgName -> EitherT PackErr io ()
    +
    409 | installLibs = install . map (Library,)
    +
    410 |
    +
    411 | ||| Install the given list of applications, by first
    +
    412 | ||| resolving each of them and then creating a build plan including
    +
    413 | ||| all dependencies of the lot.
    +
    414 | export covering %inline
    +
    415 | installApps : HasIO io => IdrisEnv => List PkgName -> EitherT PackErr io ()
    +
    416 | installApps = install . map (App True,)
    +
    417 |
    +
    418 | ||| Install the (possibly transitive) dependencies of the given
    +
    419 | ||| loaded `.ipkg` file.
    +
    420 | export covering
    +
    421 | installDeps :
    +
    422 |      {auto _ : HasIO io}
    +
    423 |   -> {auto _ : IdrisEnv}
    +
    424 |   -> Desc Safe
    +
    425 |   -> EitherT PackErr io ()
    +
    426 | installDeps = install . map (Library,) . dependencies
    +
    427 |
    +
    428 | ||| Creates a packaging environment with Idris2 installed.
    +
    429 | export covering
    +
    430 | idrisEnv :
    +
    431 |      {auto _ : HasIO io}
    +
    432 |   -> {auto _ : PackDir}
    +
    433 |   -> {auto _ : TmpDir}
    +
    434 |   -> {auto _ : LibCache}
    +
    435 |   -> {auto _ : LineBufferingCmd}
    +
    436 |   -> MetaConfig
    +
    437 |   -> (fetch : Bool)
    +
    438 |   -> EitherT PackErr io IdrisEnv
    +
    439 | idrisEnv mc fetch = env mc fetch >>= (\e => mkIdris)
    +
    440 |
    +
    441 | ||| Update the pack installation
    +
    442 | export covering
    +
    443 | update : HasIO io => IdrisEnv -> EitherT PackErr io ()
    +
    444 | update e =
    +
    445 |   let bin  := packBinDir
    +
    446 |    in do
    +
    447 |      info "Updating pack. If this fails, try switching to the latest package collection."
    +
    448 |      commit <- maybe (gitLatest packRepo "main") pure packCommit
    +
    449 |
    +
    450 |      withGit "pack" packRepo commit $ \dir => do
    +
    451 |        let ipkg := MkF dir "pack.ipkg"
    +
    452 |        d <- parseLibIpkg ipkg ipkg
    +
    453 |        installDeps d
    +
    454 |        let installDir    := packInstallDir commit
    +
    455 |            installedExec := installDir /> "pack"
    +
    456 |        ex <- exists installedExec
    +
    457 |        case ex of
    +
    458 |          True  => link installedExec packExec
    +
    459 |          False => do
    +
    460 |            libPkg [] Build True ["--build"] d
    +
    461 |            mkDir installDir
    +
    462 |            sys ["cp", "-r", NoEscape "build/exec/*", installDir]
    +
    463 |            link installedExec packExec
    +
    464 |
    +
    465 | --------------------------------------------------------------------------------
    +
    466 | --          Removing Libs
    +
    467 | --------------------------------------------------------------------------------
    +
    468 |
    +
    469 | covering
    +
    470 | removeApp : HasIO io => Env => PkgName -> EitherT PackErr io ()
    +
    471 | removeApp n = do
    +
    472 |   info "Removing application \{n}"
    +
    473 |   ra <- resolveApp n
    +
    474 |   rmFile (pathExec ra.exec)
    +
    475 |   rmDir (pkgBinDir ra.name ra.pkg)
    +
    476 |
    +
    477 | covering
    +
    478 | removeLib : HasIO io => Env => PkgName -> EitherT PackErr io ()
    +
    479 | removeLib n = do
    +
    480 |   rl <- resolveLib n
    +
    481 |   case isInstalled rl of
    +
    482 |     True  => do
    +
    483 |       info "Removing library \{n}"
    +
    484 |       rmDir (pkgInstallDir rl.name rl.pkg rl.desc)
    +
    485 |       rmDir (pkgLibDir rl.name rl.pkg)
    +
    486 |     False => warn "Package \{n} is not installed. Ignoring."
    +
    487 |
    +
    488 | ||| Remove the given libs or apps
    +
    489 | export covering
    +
    490 | remove : HasIO io => Env => List (PkgType,PkgName) -> EitherT PackErr io ()
    +
    491 | remove ps = do
    +
    492 |   ref <- emptyCache
    +
    493 |   for_ ps  $ \case (PLib,n) => removeLib n
    +
    494 |                    (PApp,n) => removeApp n
    +
    495 |
    +
    496 | ||| Remove the given libs
    +
    497 | export covering
    +
    498 | removeLibs : HasIO io => Env => List PkgName -> EitherT PackErr io ()
    +
    499 | removeLibs ns = do
    +
    500 |   checkDeletable ns
    +
    501 |   remove $ map (PLib,) ns
    +
    502 |
    +
    503 | ||| Remove the given apps
    +
    504 | export covering
    +
    505 | removeApps : HasIO io => Env => List PkgName -> EitherT PackErr io ()
    +
    506 | removeApps = remove . map (PApp,)
    +
    507 |
    diff --git a/docs/posix/docs/docs/System.Posix.Errno.Type.html b/docs/posix/docs/docs/System.Posix.Errno.Type.html index 799628709..beda17fad 100644 --- a/docs/posix/docs/docs/System.Posix.Errno.Type.html +++ b/docs/posix/docs/docs/System.Posix.Errno.Type.html @@ -61,4 +61,4 @@ -

    System.Posix.Errno.Type

    (source)

    Definitions

    recordErrno : Type
    Totality: total
    Visibility: public export
    Constructor: 
    EN : Bits32->Errno

    Projection: 
    .errno : Errno->Bits32

    Hints:
    EqErrno
    InterpolationErrno
    OrdErrno
    ShowErrno
    .errno : Errno->Bits32
    Totality: total
    Visibility: public export
    errno : Errno->Bits32
    Totality: total
    Visibility: public export
    EPERM : Errno
    Totality: total
    Visibility: public export
    ENOENT : Errno
    Totality: total
    Visibility: public export
    ESRCH : Errno
    Totality: total
    Visibility: public export
    EINTR : Errno
    Totality: total
    Visibility: public export
    EIO : Errno
    Totality: total
    Visibility: public export
    ENXIO : Errno
    Totality: total
    Visibility: public export
    E2BIG : Errno
    Totality: total
    Visibility: public export
    ENOEXEC : Errno
    Totality: total
    Visibility: public export
    EBADF : Errno
    Totality: total
    Visibility: public export
    ECHILD : Errno
    Totality: total
    Visibility: public export
    EAGAIN : Errno
    Totality: total
    Visibility: public export
    ENOMEM : Errno
    Totality: total
    Visibility: public export
    EACCES : Errno
    Totality: total
    Visibility: public export
    EFAULT : Errno
    Totality: total
    Visibility: public export
    ENOTBLK : Errno
    Totality: total
    Visibility: public export
    EBUSY : Errno
    Totality: total
    Visibility: public export
    EEXIST : Errno
    Totality: total
    Visibility: public export
    EXDEV : Errno
    Totality: total
    Visibility: public export
    ENODEV : Errno
    Totality: total
    Visibility: public export
    ENOTDIR : Errno
    Totality: total
    Visibility: public export
    EISDIR : Errno
    Totality: total
    Visibility: public export
    EINVAL : Errno
    Totality: total
    Visibility: public export
    ENFILE : Errno
    Totality: total
    Visibility: public export
    EMFILE : Errno
    Totality: total
    Visibility: public export
    ENOTTY : Errno
    Totality: total
    Visibility: public export
    ETXTBSY : Errno
    Totality: total
    Visibility: public export
    EFBIG : Errno
    Totality: total
    Visibility: public export
    ENOSPC : Errno
    Totality: total
    Visibility: public export
    ESPIPE : Errno
    Totality: total
    Visibility: public export
    EROFS : Errno
    Totality: total
    Visibility: public export
    Totality: total
    Visibility: public export
    EPIPE : Errno
    Totality: total
    Visibility: public export
    EDOM : Errno
    Totality: total
    Visibility: public export
    ERANGE : Errno
    Totality: total
    Visibility: public export
    EDEADLK : Errno
    Totality: total
    Visibility: public export
    ENAMETOOLONG : Errno
    Totality: total
    Visibility: public export
    ENOLCK : Errno
    Totality: total
    Visibility: public export
    ENOSYS : Errno
    Totality: total
    Visibility: public export
    ENOTEMPTY : Errno
    Totality: total
    Visibility: public export
    ELOOP : Errno
    Totality: total
    Visibility: public export
    ENOMSG : Errno
    Totality: total
    Visibility: public export
    EIDRM : Errno
    Totality: total
    Visibility: public export
    ECHRNG : Errno
    Totality: total
    Visibility: public export
    EL2NSYNC : Errno
    Totality: total
    Visibility: public export
    EL3HLT : Errno
    Totality: total
    Visibility: public export
    EL3RST : Errno
    Totality: total
    Visibility: public export
    ELNRNG : Errno
    Totality: total
    Visibility: public export
    EUNATCH : Errno
    Totality: total
    Visibility: public export
    ENOCSI : Errno
    Totality: total
    Visibility: public export
    EL2HLT : Errno
    Totality: total
    Visibility: public export
    EBADE : Errno
    Totality: total
    Visibility: public export
    EBADR : Errno
    Totality: total
    Visibility: public export
    EXFULL : Errno
    Totality: total
    Visibility: public export
    ENOANO : Errno
    Totality: total
    Visibility: public export
    EBADRQC : Errno
    Totality: total
    Visibility: public export
    EBADSLT : Errno
    Totality: total
    Visibility: public export
    EBFONT : Errno
    Totality: total
    Visibility: public export
    ENOSTR : Errno
    Totality: total
    Visibility: public export
    ENODATA : Errno
    Totality: total
    Visibility: public export
    ETIME : Errno
    Totality: total
    Visibility: public export
    ENOSR : Errno
    Totality: total
    Visibility: public export
    ENONET : Errno
    Totality: total
    Visibility: public export
    ENOPKG : Errno
    Totality: total
    Visibility: public export
    EREMOTE : Errno
    Totality: total
    Visibility: public export
    Totality: total
    Visibility: public export
    EADV : Errno
    Totality: total
    Visibility: public export
    ESRMNT : Errno
    Totality: total
    Visibility: public export
    ECOMM : Errno
    Totality: total
    Visibility: public export
    EPROTO : Errno
    Totality: total
    Visibility: public export
    EMULTIHOP : Errno
    Totality: total
    Visibility: public export
    EDOTDOT : Errno
    Totality: total
    Visibility: public export
    EBADMSG : Errno
    Totality: total
    Visibility: public export
    EOVERFLOW : Errno
    Totality: total
    Visibility: public export
    ENOTUNIQ : Errno
    Totality: total
    Visibility: public export
    EBADFD : Errno
    Totality: total
    Visibility: public export
    EREMCHG : Errno
    Totality: total
    Visibility: public export
    ELIBACC : Errno
    Totality: total
    Visibility: public export
    ELIBBAD : Errno
    Totality: total
    Visibility: public export
    ELIBSCN : Errno
    Totality: total
    Visibility: public export
    ELIBMAX : Errno
    Totality: total
    Visibility: public export
    ELIBEXEC : Errno
    Totality: total
    Visibility: public export
    EILSEQ : Errno
    Totality: total
    Visibility: public export
    ERESTART : Errno
    Totality: total
    Visibility: public export
    ESTRPIPE : Errno
    Totality: total
    Visibility: public export
    EUSERS : Errno
    Totality: total
    Visibility: public export
    ENOTSOCK : Errno
    Totality: total
    Visibility: public export
    EDESTADDRREQ : Errno
    Totality: total
    Visibility: public export
    EMSGSIZE : Errno
    Totality: total
    Visibility: public export
    EPROTOTYPE : Errno
    Totality: total
    Visibility: public export
    ENOPROTOOPT : Errno
    Totality: total
    Visibility: public export
    EPROTONOSUPPORT : Errno
    Totality: total
    Visibility: public export
    ESOCKTNOSUPPORT : Errno
    Totality: total
    Visibility: public export
    EOPNOTSUPP : Errno
    Totality: total
    Visibility: public export
    EPFNOSUPPORT : Errno
    Totality: total
    Visibility: public export
    EAFNOSUPPORT : Errno
    Totality: total
    Visibility: public export
    EADDRINUSE : Errno
    Totality: total
    Visibility: public export
    EADDRNOTAVAIL : Errno
    Totality: total
    Visibility: public export
    ENETDOWN : Errno
    Totality: total
    Visibility: public export
    ENETUNREACH : Errno
    Totality: total
    Visibility: public export
    ENETRESET : Errno
    Totality: total
    Visibility: public export
    ECONNABORTED : Errno
    Totality: total
    Visibility: public export
    ECONNRESET : Errno
    Totality: total
    Visibility: public export
    ENOBUFS : Errno
    Totality: total
    Visibility: public export
    EISCONN : Errno
    Totality: total
    Visibility: public export
    ENOTCONN : Errno
    Totality: total
    Visibility: public export
    ESHUTDOWN : Errno
    Totality: total
    Visibility: public export
    ETOOMANYREFS : Errno
    Totality: total
    Visibility: public export
    ETIMEDOUT : Errno
    Totality: total
    Visibility: public export
    ECONNREFUSED : Errno
    Totality: total
    Visibility: public export
    EHOSTDOWN : Errno
    Totality: total
    Visibility: public export
    EHOSTUNREACH : Errno
    Totality: total
    Visibility: public export
    EALREADY : Errno
    Totality: total
    Visibility: public export
    EINPROGRESS : Errno
    Totality: total
    Visibility: public export
    ESTALE : Errno
    Totality: total
    Visibility: public export
    EUCLEAN : Errno
    Totality: total
    Visibility: public export
    ENOTNAM : Errno
    Totality: total
    Visibility: public export
    ENAVAIL : Errno
    Totality: total
    Visibility: public export
    EISNAM : Errno
    Totality: total
    Visibility: public export
    EREMOTEIO : Errno
    Totality: total
    Visibility: public export
    EDQUOT : Errno
    Totality: total
    Visibility: public export
    ENOMEDIUM : Errno
    Totality: total
    Visibility: public export
    EMEDIUMTYPE : Errno
    Totality: total
    Visibility: public export
    ECANCELED : Errno
    Totality: total
    Visibility: public export
    ENOKEY : Errno
    Totality: total
    Visibility: public export
    EKEYEXPIRED : Errno
    Totality: total
    Visibility: public export
    EKEYREVOKED : Errno
    Totality: total
    Visibility: public export
    EKEYREJECTED : Errno
    Totality: total
    Visibility: public export
    EOWNERDEAD : Errno
    Totality: total
    Visibility: public export
    ENOTRECOVERABLE : Errno
    Totality: total
    Visibility: public export
    ERFKILL : Errno
    Totality: total
    Visibility: public export
    EHWPOISON : Errno
    Totality: total
    Visibility: public export
    errorText : Errno->String
    Totality: total
    Visibility: export
    errorName : Errno->String
    Totality: total
    Visibility: export
    +

    System.Posix.Errno.Type

    (source)

    Definitions

    recordErrno : Type
    Totality: total
    Visibility: public export
    Constructor: 
    EN : Bits32->Errno

    Projection: 
    .errno : Errno->Bits32

    Hints:
    EqErrno
    InterpolationErrno
    OrdErrno
    ShowErrno
    .errno : Errno->Bits32
    Totality: total
    Visibility: public export
    errno : Errno->Bits32
    Totality: total
    Visibility: public export
    EPERM : Errno
    Totality: total
    Visibility: public export
    ENOENT : Errno
    Totality: total
    Visibility: public export
    ESRCH : Errno
    Totality: total
    Visibility: public export
    EINTR : Errno
    Totality: total
    Visibility: public export
    EIO : Errno
    Totality: total
    Visibility: public export
    ENXIO : Errno
    Totality: total
    Visibility: public export
    E2BIG : Errno
    Totality: total
    Visibility: public export
    ENOEXEC : Errno
    Totality: total
    Visibility: public export
    EBADF : Errno
    Totality: total
    Visibility: public export
    ECHILD : Errno
    Totality: total
    Visibility: public export
    EAGAIN : Errno
    Totality: total
    Visibility: public export
    ENOMEM : Errno
    Totality: total
    Visibility: public export
    EACCES : Errno
    Totality: total
    Visibility: public export
    EFAULT : Errno
    Totality: total
    Visibility: public export
    ENOTBLK : Errno
    Totality: total
    Visibility: public export
    EBUSY : Errno
    Totality: total
    Visibility: public export
    EEXIST : Errno
    Totality: total
    Visibility: public export
    EXDEV : Errno
    Totality: total
    Visibility: public export
    ENODEV : Errno
    Totality: total
    Visibility: public export
    ENOTDIR : Errno
    Totality: total
    Visibility: public export
    EISDIR : Errno
    Totality: total
    Visibility: public export
    EINVAL : Errno
    Totality: total
    Visibility: public export
    ENFILE : Errno
    Totality: total
    Visibility: public export
    EMFILE : Errno
    Totality: total
    Visibility: public export
    ENOTTY : Errno
    Totality: total
    Visibility: public export
    ETXTBSY : Errno
    Totality: total
    Visibility: public export
    EFBIG : Errno
    Totality: total
    Visibility: public export
    ENOSPC : Errno
    Totality: total
    Visibility: public export
    ESPIPE : Errno
    Totality: total
    Visibility: public export
    EROFS : Errno
    Totality: total
    Visibility: public export
    Totality: total
    Visibility: public export
    EPIPE : Errno
    Totality: total
    Visibility: public export
    EDOM : Errno
    Totality: total
    Visibility: public export
    ERANGE : Errno
    Totality: total
    Visibility: public export
    EDEADLK : Errno
    Totality: total
    Visibility: public export
    ENAMETOOLONG : Errno
    Totality: total
    Visibility: public export
    ENOLCK : Errno
    Totality: total
    Visibility: public export
    ENOSYS : Errno
    Totality: total
    Visibility: public export
    ENOTEMPTY : Errno
    Totality: total
    Visibility: public export
    ELOOP : Errno
    Totality: total
    Visibility: public export
    ENOMSG : Errno
    Totality: total
    Visibility: public export
    EIDRM : Errno
    Totality: total
    Visibility: public export
    ENOSTR : Errno
    Totality: total
    Visibility: public export
    ENODATA : Errno
    Totality: total
    Visibility: public export
    ETIME : Errno
    Totality: total
    Visibility: public export
    ENOSR : Errno
    Totality: total
    Visibility: public export
    EREMOTE : Errno
    Totality: total
    Visibility: public export
    Totality: total
    Visibility: public export
    EPROTO : Errno
    Totality: total
    Visibility: public export
    EMULTIHOP : Errno
    Totality: total
    Visibility: public export
    EBADMSG : Errno
    Totality: total
    Visibility: public export
    EOVERFLOW : Errno
    Totality: total
    Visibility: public export
    EILSEQ : Errno
    Totality: total
    Visibility: public export
    EUSERS : Errno
    Totality: total
    Visibility: public export
    ENOTSOCK : Errno
    Totality: total
    Visibility: public export
    EDESTADDRREQ : Errno
    Totality: total
    Visibility: public export
    EMSGSIZE : Errno
    Totality: total
    Visibility: public export
    EPROTOTYPE : Errno
    Totality: total
    Visibility: public export
    ENOPROTOOPT : Errno
    Totality: total
    Visibility: public export
    EPROTONOSUPPORT : Errno
    Totality: total
    Visibility: public export
    ESOCKTNOSUPPORT : Errno
    Totality: total
    Visibility: public export
    EOPNOTSUPP : Errno
    Totality: total
    Visibility: public export
    EPFNOSUPPORT : Errno
    Totality: total
    Visibility: public export
    EAFNOSUPPORT : Errno
    Totality: total
    Visibility: public export
    EADDRINUSE : Errno
    Totality: total
    Visibility: public export
    EADDRNOTAVAIL : Errno
    Totality: total
    Visibility: public export
    ENETDOWN : Errno
    Totality: total
    Visibility: public export
    ENETUNREACH : Errno
    Totality: total
    Visibility: public export
    ENETRESET : Errno
    Totality: total
    Visibility: public export
    ECONNABORTED : Errno
    Totality: total
    Visibility: public export
    ECONNRESET : Errno
    Totality: total
    Visibility: public export
    ENOBUFS : Errno
    Totality: total
    Visibility: public export
    EISCONN : Errno
    Totality: total
    Visibility: public export
    ENOTCONN : Errno
    Totality: total
    Visibility: public export
    ESHUTDOWN : Errno
    Totality: total
    Visibility: public export
    ETOOMANYREFS : Errno
    Totality: total
    Visibility: public export
    ETIMEDOUT : Errno
    Totality: total
    Visibility: public export
    ECONNREFUSED : Errno
    Totality: total
    Visibility: public export
    EHOSTDOWN : Errno
    Totality: total
    Visibility: public export
    EHOSTUNREACH : Errno
    Totality: total
    Visibility: public export
    EALREADY : Errno
    Totality: total
    Visibility: public export
    EINPROGRESS : Errno
    Totality: total
    Visibility: public export
    ESTALE : Errno
    Totality: total
    Visibility: public export
    EDQUOT : Errno
    Totality: total
    Visibility: public export
    EMEDIUMTYPE : Errno
    Totality: total
    Visibility: public export
    ECANCELED : Errno
    Totality: total
    Visibility: public export
    ENOKEY : Errno
    Totality: total
    Visibility: public export
    EKEYEXPIRED : Errno
    Totality: total
    Visibility: public export
    EKEYREVOKED : Errno
    Totality: total
    Visibility: public export
    EKEYREJECTED : Errno
    Totality: total
    Visibility: public export
    EOWNERDEAD : Errno
    Totality: total
    Visibility: public export
    ENOTRECOVERABLE : Errno
    Totality: total
    Visibility: public export
    ERFKILL : Errno
    Totality: total
    Visibility: public export
    EHWPOISON : Errno
    Totality: total
    Visibility: public export
    ECHRNG : Errno
    Totality: total
    Visibility: public export
    EL2NSYNC : Errno
    Totality: total
    Visibility: public export
    EL3HLT : Errno
    Totality: total
    Visibility: public export
    EL3RST : Errno
    Totality: total
    Visibility: public export
    ELNRNG : Errno
    Totality: total
    Visibility: public export
    EUNATCH : Errno
    Totality: total
    Visibility: public export
    ENOCSI : Errno
    Totality: total
    Visibility: public export
    EL2HLT : Errno
    Totality: total
    Visibility: public export
    EBADE : Errno
    Totality: total
    Visibility: public export
    EBADR : Errno
    Totality: total
    Visibility: public export
    EXFULL : Errno
    Totality: total
    Visibility: public export
    ENOANO : Errno
    Totality: total
    Visibility: public export
    EBADRQC : Errno
    Totality: total
    Visibility: public export
    EBADSLT : Errno
    Totality: total
    Visibility: public export
    EBFONT : Errno
    Totality: total
    Visibility: public export
    ENONET : Errno
    Totality: total
    Visibility: public export
    ENOPKG : Errno
    Totality: total
    Visibility: public export
    EADV : Errno
    Totality: total
    Visibility: public export
    ESRMNT : Errno
    Totality: total
    Visibility: public export
    ECOMM : Errno
    Totality: total
    Visibility: public export
    EDOTDOT : Errno
    Totality: total
    Visibility: public export
    ENOTUNIQ : Errno
    Totality: total
    Visibility: public export
    EBADFD : Errno
    Totality: total
    Visibility: public export
    EREMCHG : Errno
    Totality: total
    Visibility: public export
    ELIBACC : Errno
    Totality: total
    Visibility: public export
    ELIBBAD : Errno
    Totality: total
    Visibility: public export
    ELIBSCN : Errno
    Totality: total
    Visibility: public export
    ELIBMAX : Errno
    Totality: total
    Visibility: public export
    ELIBEXEC : Errno
    Totality: total
    Visibility: public export
    ERESTART : Errno
    Totality: total
    Visibility: public export
    ESTRPIPE : Errno
    Totality: total
    Visibility: public export
    EUCLEAN : Errno
    Totality: total
    Visibility: public export
    ENOTNAM : Errno
    Totality: total
    Visibility: public export
    ENAVAIL : Errno
    Totality: total
    Visibility: public export
    EISNAM : Errno
    Totality: total
    Visibility: public export
    EREMOTEIO : Errno
    Totality: total
    Visibility: public export
    ENOMEDIUM : Errno
    Totality: total
    Visibility: public export
    errorText : Errno->String
    Totality: total
    Visibility: export
    errorName : Errno->String
    Totality: total
    Visibility: export
    diff --git a/docs/posix/docs/docs/System.Posix.Errno.Type.src.html b/docs/posix/docs/docs/System.Posix.Errno.Type.src.html index 625bc899d..f260ba870 100644 --- a/docs/posix/docs/docs/System.Posix.Errno.Type.src.html +++ b/docs/posix/docs/docs/System.Posix.Errno.Type.src.html @@ -311,360 +311,360 @@
    190 | EIDRM = 43
    191 |
    192 | public export %inline
    -
    193 | ECHRNG : Errno
    -
    194 | ECHRNG = 44
    +
    193 | ENOSTR : Errno
    +
    194 | ENOSTR = 60
    195 |
    196 | public export %inline
    -
    197 | EL2NSYNC : Errno
    -
    198 | EL2NSYNC = 45
    +
    197 | ENODATA : Errno
    +
    198 | ENODATA = 61
    199 |
    200 | public export %inline
    -
    201 | EL3HLT : Errno
    -
    202 | EL3HLT = 46
    +
    201 | ETIME : Errno
    +
    202 | ETIME = 62
    203 |
    204 | public export %inline
    -
    205 | EL3RST : Errno
    -
    206 | EL3RST = 47
    +
    205 | ENOSR : Errno
    +
    206 | ENOSR = 63
    207 |
    208 | public export %inline
    -
    209 | ELNRNG : Errno
    -
    210 | ELNRNG = 48
    +
    209 | EREMOTE : Errno
    +
    210 | EREMOTE = 66
    211 |
    212 | public export %inline
    -
    213 | EUNATCH : Errno
    -
    214 | EUNATCH = 49
    +
    213 | ENOLINK : Errno
    +
    214 | ENOLINK = 67
    215 |
    216 | public export %inline
    -
    217 | ENOCSI : Errno
    -
    218 | ENOCSI = 50
    +
    217 | EPROTO : Errno
    +
    218 | EPROTO = 71
    219 |
    220 | public export %inline
    -
    221 | EL2HLT : Errno
    -
    222 | EL2HLT = 51
    +
    221 | EMULTIHOP : Errno
    +
    222 | EMULTIHOP = 72
    223 |
    224 | public export %inline
    -
    225 | EBADE : Errno
    -
    226 | EBADE = 52
    +
    225 | EBADMSG : Errno
    +
    226 | EBADMSG = 74
    227 |
    228 | public export %inline
    -
    229 | EBADR : Errno
    -
    230 | EBADR = 53
    +
    229 | EOVERFLOW : Errno
    +
    230 | EOVERFLOW = 75
    231 |
    232 | public export %inline
    -
    233 | EXFULL : Errno
    -
    234 | EXFULL = 54
    +
    233 | EILSEQ : Errno
    +
    234 | EILSEQ = 84
    235 |
    236 | public export %inline
    -
    237 | ENOANO : Errno
    -
    238 | ENOANO = 55
    +
    237 | EUSERS : Errno
    +
    238 | EUSERS = 87
    239 |
    240 | public export %inline
    -
    241 | EBADRQC : Errno
    -
    242 | EBADRQC = 56
    +
    241 | ENOTSOCK : Errno
    +
    242 | ENOTSOCK = 88
    243 |
    244 | public export %inline
    -
    245 | EBADSLT : Errno
    -
    246 | EBADSLT = 57
    +
    245 | EDESTADDRREQ : Errno
    +
    246 | EDESTADDRREQ = 89
    247 |
    248 | public export %inline
    -
    249 | EBFONT : Errno
    -
    250 | EBFONT = 59
    +
    249 | EMSGSIZE : Errno
    +
    250 | EMSGSIZE = 90
    251 |
    252 | public export %inline
    -
    253 | ENOSTR : Errno
    -
    254 | ENOSTR = 60
    +
    253 | EPROTOTYPE : Errno
    +
    254 | EPROTOTYPE = 91
    255 |
    256 | public export %inline
    -
    257 | ENODATA : Errno
    -
    258 | ENODATA = 61
    +
    257 | ENOPROTOOPT : Errno
    +
    258 | ENOPROTOOPT = 92
    259 |
    260 | public export %inline
    -
    261 | ETIME : Errno
    -
    262 | ETIME = 62
    +
    261 | EPROTONOSUPPORT : Errno
    +
    262 | EPROTONOSUPPORT = 93
    263 |
    264 | public export %inline
    -
    265 | ENOSR : Errno
    -
    266 | ENOSR = 63
    +
    265 | ESOCKTNOSUPPORT : Errno
    +
    266 | ESOCKTNOSUPPORT = 94
    267 |
    268 | public export %inline
    -
    269 | ENONET : Errno
    -
    270 | ENONET = 64
    +
    269 | EOPNOTSUPP : Errno
    +
    270 | EOPNOTSUPP = 95
    271 |
    272 | public export %inline
    -
    273 | ENOPKG : Errno
    -
    274 | ENOPKG = 65
    +
    273 | EPFNOSUPPORT : Errno
    +
    274 | EPFNOSUPPORT = 96
    275 |
    276 | public export %inline
    -
    277 | EREMOTE : Errno
    -
    278 | EREMOTE = 66
    +
    277 | EAFNOSUPPORT : Errno
    +
    278 | EAFNOSUPPORT = 97
    279 |
    280 | public export %inline
    -
    281 | ENOLINK : Errno
    -
    282 | ENOLINK = 67
    +
    281 | EADDRINUSE : Errno
    +
    282 | EADDRINUSE = 98
    283 |
    284 | public export %inline
    -
    285 | EADV : Errno
    -
    286 | EADV = 68
    +
    285 | EADDRNOTAVAIL : Errno
    +
    286 | EADDRNOTAVAIL = 99
    287 |
    288 | public export %inline
    -
    289 | ESRMNT : Errno
    -
    290 | ESRMNT = 69
    +
    289 | ENETDOWN : Errno
    +
    290 | ENETDOWN = 100
    291 |
    292 | public export %inline
    -
    293 | ECOMM : Errno
    -
    294 | ECOMM = 70
    +
    293 | ENETUNREACH : Errno
    +
    294 | ENETUNREACH = 101
    295 |
    296 | public export %inline
    -
    297 | EPROTO : Errno
    -
    298 | EPROTO = 71
    +
    297 | ENETRESET : Errno
    +
    298 | ENETRESET = 102
    299 |
    300 | public export %inline
    -
    301 | EMULTIHOP : Errno
    -
    302 | EMULTIHOP = 72
    +
    301 | ECONNABORTED : Errno
    +
    302 | ECONNABORTED = 103
    303 |
    304 | public export %inline
    -
    305 | EDOTDOT : Errno
    -
    306 | EDOTDOT = 73
    +
    305 | ECONNRESET : Errno
    +
    306 | ECONNRESET = 104
    307 |
    308 | public export %inline
    -
    309 | EBADMSG : Errno
    -
    310 | EBADMSG = 74
    +
    309 | ENOBUFS : Errno
    +
    310 | ENOBUFS = 105
    311 |
    312 | public export %inline
    -
    313 | EOVERFLOW : Errno
    -
    314 | EOVERFLOW = 75
    +
    313 | EISCONN : Errno
    +
    314 | EISCONN = 106
    315 |
    316 | public export %inline
    -
    317 | ENOTUNIQ : Errno
    -
    318 | ENOTUNIQ = 76
    +
    317 | ENOTCONN : Errno
    +
    318 | ENOTCONN = 107
    319 |
    320 | public export %inline
    -
    321 | EBADFD : Errno
    -
    322 | EBADFD = 77
    +
    321 | ESHUTDOWN : Errno
    +
    322 | ESHUTDOWN = 108
    323 |
    324 | public export %inline
    -
    325 | EREMCHG : Errno
    -
    326 | EREMCHG = 78
    +
    325 | ETOOMANYREFS : Errno
    +
    326 | ETOOMANYREFS = 109
    327 |
    328 | public export %inline
    -
    329 | ELIBACC : Errno
    -
    330 | ELIBACC = 79
    +
    329 | ETIMEDOUT : Errno
    +
    330 | ETIMEDOUT = 110
    331 |
    332 | public export %inline
    -
    333 | ELIBBAD : Errno
    -
    334 | ELIBBAD = 80
    +
    333 | ECONNREFUSED : Errno
    +
    334 | ECONNREFUSED = 111
    335 |
    336 | public export %inline
    -
    337 | ELIBSCN : Errno
    -
    338 | ELIBSCN = 81
    +
    337 | EHOSTDOWN : Errno
    +
    338 | EHOSTDOWN = 112
    339 |
    340 | public export %inline
    -
    341 | ELIBMAX : Errno
    -
    342 | ELIBMAX = 82
    +
    341 | EHOSTUNREACH : Errno
    +
    342 | EHOSTUNREACH = 113
    343 |
    344 | public export %inline
    -
    345 | ELIBEXEC : Errno
    -
    346 | ELIBEXEC = 83
    +
    345 | EALREADY : Errno
    +
    346 | EALREADY = 114
    347 |
    348 | public export %inline
    -
    349 | EILSEQ : Errno
    -
    350 | EILSEQ = 84
    +
    349 | EINPROGRESS : Errno
    +
    350 | EINPROGRESS = 115
    351 |
    352 | public export %inline
    -
    353 | ERESTART : Errno
    -
    354 | ERESTART = 85
    +
    353 | ESTALE : Errno
    +
    354 | ESTALE = 116
    355 |
    356 | public export %inline
    -
    357 | ESTRPIPE : Errno
    -
    358 | ESTRPIPE = 86
    +
    357 | EDQUOT : Errno
    +
    358 | EDQUOT = 122
    359 |
    360 | public export %inline
    -
    361 | EUSERS : Errno
    -
    362 | EUSERS = 87
    +
    361 | EMEDIUMTYPE : Errno
    +
    362 | EMEDIUMTYPE = 124
    363 |
    364 | public export %inline
    -
    365 | ENOTSOCK : Errno
    -
    366 | ENOTSOCK = 88
    +
    365 | ECANCELED : Errno
    +
    366 | ECANCELED = 125
    367 |
    368 | public export %inline
    -
    369 | EDESTADDRREQ : Errno
    -
    370 | EDESTADDRREQ = 89
    +
    369 | ENOKEY : Errno
    +
    370 | ENOKEY = 126
    371 |
    372 | public export %inline
    -
    373 | EMSGSIZE : Errno
    -
    374 | EMSGSIZE = 90
    +
    373 | EKEYEXPIRED : Errno
    +
    374 | EKEYEXPIRED = 127
    375 |
    376 | public export %inline
    -
    377 | EPROTOTYPE : Errno
    -
    378 | EPROTOTYPE = 91
    +
    377 | EKEYREVOKED : Errno
    +
    378 | EKEYREVOKED = 128
    379 |
    380 | public export %inline
    -
    381 | ENOPROTOOPT : Errno
    -
    382 | ENOPROTOOPT = 92
    +
    381 | EKEYREJECTED : Errno
    +
    382 | EKEYREJECTED = 129
    383 |
    384 | public export %inline
    -
    385 | EPROTONOSUPPORT : Errno
    -
    386 | EPROTONOSUPPORT = 93
    +
    385 | EOWNERDEAD : Errno
    +
    386 | EOWNERDEAD = 130
    387 |
    388 | public export %inline
    -
    389 | ESOCKTNOSUPPORT : Errno
    -
    390 | ESOCKTNOSUPPORT = 94
    +
    389 | ENOTRECOVERABLE : Errno
    +
    390 | ENOTRECOVERABLE = 131
    391 |
    392 | public export %inline
    -
    393 | EOPNOTSUPP : Errno
    -
    394 | EOPNOTSUPP = 95
    +
    393 | ERFKILL : Errno
    +
    394 | ERFKILL = 132
    395 |
    396 | public export %inline
    -
    397 | EPFNOSUPPORT : Errno
    -
    398 | EPFNOSUPPORT = 96
    +
    397 | EHWPOISON : Errno
    +
    398 | EHWPOISON = 133
    399 |
    400 | public export %inline
    -
    401 | EAFNOSUPPORT : Errno
    -
    402 | EAFNOSUPPORT = 97
    +
    401 | ECHRNG : Errno
    +
    402 | ECHRNG = 44
    403 |
    404 | public export %inline
    -
    405 | EADDRINUSE : Errno
    -
    406 | EADDRINUSE = 98
    +
    405 | EL2NSYNC : Errno
    +
    406 | EL2NSYNC = 45
    407 |
    408 | public export %inline
    -
    409 | EADDRNOTAVAIL : Errno
    -
    410 | EADDRNOTAVAIL = 99
    +
    409 | EL3HLT : Errno
    +
    410 | EL3HLT = 46
    411 |
    412 | public export %inline
    -
    413 | ENETDOWN : Errno
    -
    414 | ENETDOWN = 100
    +
    413 | EL3RST : Errno
    +
    414 | EL3RST = 47
    415 |
    416 | public export %inline
    -
    417 | ENETUNREACH : Errno
    -
    418 | ENETUNREACH = 101
    +
    417 | ELNRNG : Errno
    +
    418 | ELNRNG = 48
    419 |
    420 | public export %inline
    -
    421 | ENETRESET : Errno
    -
    422 | ENETRESET = 102
    +
    421 | EUNATCH : Errno
    +
    422 | EUNATCH = 49
    423 |
    424 | public export %inline
    -
    425 | ECONNABORTED : Errno
    -
    426 | ECONNABORTED = 103
    +
    425 | ENOCSI : Errno
    +
    426 | ENOCSI = 50
    427 |
    428 | public export %inline
    -
    429 | ECONNRESET : Errno
    -
    430 | ECONNRESET = 104
    +
    429 | EL2HLT : Errno
    +
    430 | EL2HLT = 51
    431 |
    432 | public export %inline
    -
    433 | ENOBUFS : Errno
    -
    434 | ENOBUFS = 105
    +
    433 | EBADE : Errno
    +
    434 | EBADE = 52
    435 |
    436 | public export %inline
    -
    437 | EISCONN : Errno
    -
    438 | EISCONN = 106
    +
    437 | EBADR : Errno
    +
    438 | EBADR = 53
    439 |
    440 | public export %inline
    -
    441 | ENOTCONN : Errno
    -
    442 | ENOTCONN = 107
    +
    441 | EXFULL : Errno
    +
    442 | EXFULL = 54
    443 |
    444 | public export %inline
    -
    445 | ESHUTDOWN : Errno
    -
    446 | ESHUTDOWN = 108
    +
    445 | ENOANO : Errno
    +
    446 | ENOANO = 55
    447 |
    448 | public export %inline
    -
    449 | ETOOMANYREFS : Errno
    -
    450 | ETOOMANYREFS = 109
    +
    449 | EBADRQC : Errno
    +
    450 | EBADRQC = 56
    451 |
    452 | public export %inline
    -
    453 | ETIMEDOUT : Errno
    -
    454 | ETIMEDOUT = 110
    +
    453 | EBADSLT : Errno
    +
    454 | EBADSLT = 57
    455 |
    456 | public export %inline
    -
    457 | ECONNREFUSED : Errno
    -
    458 | ECONNREFUSED = 111
    +
    457 | EBFONT : Errno
    +
    458 | EBFONT = 59
    459 |
    460 | public export %inline
    -
    461 | EHOSTDOWN : Errno
    -
    462 | EHOSTDOWN = 112
    +
    461 | ENONET : Errno
    +
    462 | ENONET = 64
    463 |
    464 | public export %inline
    -
    465 | EHOSTUNREACH : Errno
    -
    466 | EHOSTUNREACH = 113
    +
    465 | ENOPKG : Errno
    +
    466 | ENOPKG = 65
    467 |
    468 | public export %inline
    -
    469 | EALREADY : Errno
    -
    470 | EALREADY = 114
    +
    469 | EADV : Errno
    +
    470 | EADV = 68
    471 |
    472 | public export %inline
    -
    473 | EINPROGRESS : Errno
    -
    474 | EINPROGRESS = 115
    +
    473 | ESRMNT : Errno
    +
    474 | ESRMNT = 69
    475 |
    476 | public export %inline
    -
    477 | ESTALE : Errno
    -
    478 | ESTALE = 116
    +
    477 | ECOMM : Errno
    +
    478 | ECOMM = 70
    479 |
    480 | public export %inline
    -
    481 | EUCLEAN : Errno
    -
    482 | EUCLEAN = 117
    +
    481 | EDOTDOT : Errno
    +
    482 | EDOTDOT = 73
    483 |
    484 | public export %inline
    -
    485 | ENOTNAM : Errno
    -
    486 | ENOTNAM = 118
    +
    485 | ENOTUNIQ : Errno
    +
    486 | ENOTUNIQ = 76
    487 |
    488 | public export %inline
    -
    489 | ENAVAIL : Errno
    -
    490 | ENAVAIL = 119
    +
    489 | EBADFD : Errno
    +
    490 | EBADFD = 77
    491 |
    492 | public export %inline
    -
    493 | EISNAM : Errno
    -
    494 | EISNAM = 120
    +
    493 | EREMCHG : Errno
    +
    494 | EREMCHG = 78
    495 |
    496 | public export %inline
    -
    497 | EREMOTEIO : Errno
    -
    498 | EREMOTEIO = 121
    +
    497 | ELIBACC : Errno
    +
    498 | ELIBACC = 79
    499 |
    500 | public export %inline
    -
    501 | EDQUOT : Errno
    -
    502 | EDQUOT = 122
    +
    501 | ELIBBAD : Errno
    +
    502 | ELIBBAD = 80
    503 |
    504 | public export %inline
    -
    505 | ENOMEDIUM : Errno
    -
    506 | ENOMEDIUM = 123
    +
    505 | ELIBSCN : Errno
    +
    506 | ELIBSCN = 81
    507 |
    508 | public export %inline
    -
    509 | EMEDIUMTYPE : Errno
    -
    510 | EMEDIUMTYPE = 124
    +
    509 | ELIBMAX : Errno
    +
    510 | ELIBMAX = 82
    511 |
    512 | public export %inline
    -
    513 | ECANCELED : Errno
    -
    514 | ECANCELED = 125
    +
    513 | ELIBEXEC : Errno
    +
    514 | ELIBEXEC = 83
    515 |
    516 | public export %inline
    -
    517 | ENOKEY : Errno
    -
    518 | ENOKEY = 126
    +
    517 | ERESTART : Errno
    +
    518 | ERESTART = 85
    519 |
    520 | public export %inline
    -
    521 | EKEYEXPIRED : Errno
    -
    522 | EKEYEXPIRED = 127
    +
    521 | ESTRPIPE : Errno
    +
    522 | ESTRPIPE = 86
    523 |
    524 | public export %inline
    -
    525 | EKEYREVOKED : Errno
    -
    526 | EKEYREVOKED = 128
    +
    525 | EUCLEAN : Errno
    +
    526 | EUCLEAN = 117
    527 |
    528 | public export %inline
    -
    529 | EKEYREJECTED : Errno
    -
    530 | EKEYREJECTED = 129
    +
    529 | ENOTNAM : Errno
    +
    530 | ENOTNAM = 118
    531 |
    532 | public export %inline
    -
    533 | EOWNERDEAD : Errno
    -
    534 | EOWNERDEAD = 130
    +
    533 | ENAVAIL : Errno
    +
    534 | ENAVAIL = 119
    535 |
    536 | public export %inline
    -
    537 | ENOTRECOVERABLE : Errno
    -
    538 | ENOTRECOVERABLE = 131
    +
    537 | EISNAM : Errno
    +
    538 | EISNAM = 120
    539 |
    540 | public export %inline
    -
    541 | ERFKILL : Errno
    -
    542 | ERFKILL = 132
    +
    541 | EREMOTEIO : Errno
    +
    542 | EREMOTEIO = 121
    543 |
    544 | public export %inline
    -
    545 | EHWPOISON : Errno
    -
    546 | EHWPOISON = 133
    +
    545 | ENOMEDIUM : Errno
    +
    546 | ENOMEDIUM = 123
    547 |
    548 | export
    549 | errorText : Errno -> String
    @@ -710,95 +710,95 @@
    589 | errorText 40 = "Too many levels of symbolic links"
    590 | errorText 42 = "No message of desired type"
    591 | errorText 43 = "Identifier removed"
    -
    592 | errorText 44 = "Channel number out of range"
    -
    593 | errorText 45 = "Level 2 not synchronized"
    -
    594 | errorText 46 = "Level 3 halted"
    -
    595 | errorText 47 = "Level 3 reset"
    -
    596 | errorText 48 = "Link number out of range"
    -
    597 | errorText 49 = "Protocol driver not attached"
    -
    598 | errorText 50 = "No CSI structure available"
    -
    599 | errorText 51 = "Level 2 halted"
    -
    600 | errorText 52 = "Invalid exchange"
    -
    601 | errorText 53 = "Invalid request descriptor"
    -
    602 | errorText 54 = "Exchange full"
    -
    603 | errorText 55 = "No anode"
    -
    604 | errorText 56 = "Invalid request code"
    -
    605 | errorText 57 = "Invalid slot"
    -
    606 | errorText 59 = "Bad font file format"
    -
    607 | errorText 60 = "Device not a stream"
    -
    608 | errorText 61 = "No data available"
    -
    609 | errorText 62 = "Timer expired"
    -
    610 | errorText 63 = "Out of streams resources"
    -
    611 | errorText 64 = "Machine is not on the network"
    -
    612 | errorText 65 = "Package not installed"
    -
    613 | errorText 66 = "Object is remote"
    -
    614 | errorText 67 = "Link has been severed"
    -
    615 | errorText 68 = "Advertise error"
    -
    616 | errorText 69 = "Srmount error"
    -
    617 | errorText 70 = "Communication error on send"
    -
    618 | errorText 71 = "Protocol error"
    -
    619 | errorText 72 = "Multihop attempted"
    -
    620 | errorText 73 = "RFS specific error"
    -
    621 | errorText 74 = "Bad message"
    -
    622 | errorText 75 = "Value too large for defined data type"
    -
    623 | errorText 76 = "Name not unique on network"
    -
    624 | errorText 77 = "File descriptor in bad state"
    -
    625 | errorText 78 = "Remote address changed"
    -
    626 | errorText 79 = "Can not access a needed shared library"
    -
    627 | errorText 80 = "Accessing a corrupted shared library"
    -
    628 | errorText 81 = ".lib section in a.out corrupted"
    -
    629 | errorText 82 = "Attempting to link in too many shared libraries"
    -
    630 | errorText 83 = "Cannot exec a shared library directly"
    -
    631 | errorText 84 = "Invalid or incomplete multibyte or wide character"
    -
    632 | errorText 85 = "Interrupted system call should be restarted"
    -
    633 | errorText 86 = "Streams pipe error"
    -
    634 | errorText 87 = "Too many users"
    -
    635 | errorText 88 = "Socket operation on non-socket"
    -
    636 | errorText 89 = "Destination address required"
    -
    637 | errorText 90 = "Message too long"
    -
    638 | errorText 91 = "Protocol wrong type for socket"
    -
    639 | errorText 92 = "Protocol not available"
    -
    640 | errorText 93 = "Protocol not supported"
    -
    641 | errorText 94 = "Socket type not supported"
    -
    642 | errorText 95 = "Operation not supported"
    -
    643 | errorText 96 = "Protocol family not supported"
    -
    644 | errorText 97 = "Address family not supported by protocol"
    -
    645 | errorText 98 = "Address already in use"
    -
    646 | errorText 99 = "Cannot assign requested address"
    -
    647 | errorText 100 = "Network is down"
    -
    648 | errorText 101 = "Network is unreachable"
    -
    649 | errorText 102 = "Network dropped connection on reset"
    -
    650 | errorText 103 = "Software caused connection abort"
    -
    651 | errorText 104 = "Connection reset by peer"
    -
    652 | errorText 105 = "No buffer space available"
    -
    653 | errorText 106 = "Transport endpoint is already connected"
    -
    654 | errorText 107 = "Transport endpoint is not connected"
    -
    655 | errorText 108 = "Cannot send after transport endpoint shutdown"
    -
    656 | errorText 109 = "Too many references: cannot splice"
    -
    657 | errorText 110 = "Connection timed out"
    -
    658 | errorText 111 = "Connection refused"
    -
    659 | errorText 112 = "Host is down"
    -
    660 | errorText 113 = "No route to host"
    -
    661 | errorText 114 = "Operation already in progress"
    -
    662 | errorText 115 = "Operation now in progress"
    -
    663 | errorText 116 = "Stale file handle"
    -
    664 | errorText 117 = "Structure needs cleaning"
    -
    665 | errorText 118 = "Not a XENIX named type file"
    -
    666 | errorText 119 = "No XENIX semaphores available"
    -
    667 | errorText 120 = "Is a named type file"
    -
    668 | errorText 121 = "Remote I/O error"
    -
    669 | errorText 122 = "Disk quota exceeded"
    -
    670 | errorText 123 = "No medium found"
    -
    671 | errorText 124 = "Wrong medium type"
    -
    672 | errorText 125 = "Operation canceled"
    -
    673 | errorText 126 = "Required key not available"
    -
    674 | errorText 127 = "Key has expired"
    -
    675 | errorText 128 = "Key has been revoked"
    -
    676 | errorText 129 = "Key was rejected by service"
    -
    677 | errorText 130 = "Owner died"
    -
    678 | errorText 131 = "State not recoverable"
    -
    679 | errorText 132 = "Operation not possible due to RF-kill"
    -
    680 | errorText 133 = "Memory page has hardware error"
    +
    592 | errorText 60 = "Device not a stream"
    +
    593 | errorText 61 = "No data available"
    +
    594 | errorText 62 = "Timer expired"
    +
    595 | errorText 63 = "Out of streams resources"
    +
    596 | errorText 66 = "Object is remote"
    +
    597 | errorText 67 = "Link has been severed"
    +
    598 | errorText 71 = "Protocol error"
    +
    599 | errorText 72 = "Multihop attempted"
    +
    600 | errorText 74 = "Bad message"
    +
    601 | errorText 75 = "Value too large for defined data type"
    +
    602 | errorText 84 = "Invalid or incomplete multibyte or wide character"
    +
    603 | errorText 87 = "Too many users"
    +
    604 | errorText 88 = "Socket operation on non-socket"
    +
    605 | errorText 89 = "Destination address required"
    +
    606 | errorText 90 = "Message too long"
    +
    607 | errorText 91 = "Protocol wrong type for socket"
    +
    608 | errorText 92 = "Protocol not available"
    +
    609 | errorText 93 = "Protocol not supported"
    +
    610 | errorText 94 = "Socket type not supported"
    +
    611 | errorText 95 = "Operation not supported"
    +
    612 | errorText 96 = "Protocol family not supported"
    +
    613 | errorText 97 = "Address family not supported by protocol"
    +
    614 | errorText 98 = "Address already in use"
    +
    615 | errorText 99 = "Cannot assign requested address"
    +
    616 | errorText 100 = "Network is down"
    +
    617 | errorText 101 = "Network is unreachable"
    +
    618 | errorText 102 = "Network dropped connection on reset"
    +
    619 | errorText 103 = "Software caused connection abort"
    +
    620 | errorText 104 = "Connection reset by peer"
    +
    621 | errorText 105 = "No buffer space available"
    +
    622 | errorText 106 = "Transport endpoint is already connected"
    +
    623 | errorText 107 = "Transport endpoint is not connected"
    +
    624 | errorText 108 = "Cannot send after transport endpoint shutdown"
    +
    625 | errorText 109 = "Too many references: cannot splice"
    +
    626 | errorText 110 = "Connection timed out"
    +
    627 | errorText 111 = "Connection refused"
    +
    628 | errorText 112 = "Host is down"
    +
    629 | errorText 113 = "No route to host"
    +
    630 | errorText 114 = "Operation already in progress"
    +
    631 | errorText 115 = "Operation now in progress"
    +
    632 | errorText 116 = "Stale file handle"
    +
    633 | errorText 122 = "Disk quota exceeded"
    +
    634 | errorText 124 = "Wrong medium type"
    +
    635 | errorText 125 = "Operation canceled"
    +
    636 | errorText 126 = "Required key not available"
    +
    637 | errorText 127 = "Key has expired"
    +
    638 | errorText 128 = "Key has been revoked"
    +
    639 | errorText 129 = "Key was rejected by service"
    +
    640 | errorText 130 = "Owner died"
    +
    641 | errorText 131 = "State not recoverable"
    +
    642 | errorText 132 = "Operation not possible due to RF-kill"
    +
    643 | errorText 133 = "Memory page has hardware error"
    +
    644 | errorText 44 = "Channel number out of range"
    +
    645 | errorText 45 = "Level 2 not synchronized"
    +
    646 | errorText 46 = "Level 3 halted"
    +
    647 | errorText 47 = "Level 3 reset"
    +
    648 | errorText 48 = "Link number out of range"
    +
    649 | errorText 49 = "Protocol driver not attached"
    +
    650 | errorText 50 = "No CSI structure available"
    +
    651 | errorText 51 = "Level 2 halted"
    +
    652 | errorText 52 = "Invalid exchange"
    +
    653 | errorText 53 = "Invalid request descriptor"
    +
    654 | errorText 54 = "Exchange full"
    +
    655 | errorText 55 = "No anode"
    +
    656 | errorText 56 = "Invalid request code"
    +
    657 | errorText 57 = "Invalid slot"
    +
    658 | errorText 59 = "Bad font file format"
    +
    659 | errorText 64 = "Machine is not on the network"
    +
    660 | errorText 65 = "Package not installed"
    +
    661 | errorText 68 = "Advertise error"
    +
    662 | errorText 69 = "Srmount error"
    +
    663 | errorText 70 = "Communication error on send"
    +
    664 | errorText 73 = "RFS specific error"
    +
    665 | errorText 76 = "Name not unique on network"
    +
    666 | errorText 77 = "File descriptor in bad state"
    +
    667 | errorText 78 = "Remote address changed"
    +
    668 | errorText 79 = "Can not access a needed shared library"
    +
    669 | errorText 80 = "Accessing a corrupted shared library"
    +
    670 | errorText 81 = ".lib section in a.out corrupted"
    +
    671 | errorText 82 = "Attempting to link in too many shared libraries"
    +
    672 | errorText 83 = "Cannot exec a shared library directly"
    +
    673 | errorText 85 = "Interrupted system call should be restarted"
    +
    674 | errorText 86 = "Streams pipe error"
    +
    675 | errorText 117 = "Structure needs cleaning"
    +
    676 | errorText 118 = "Not a XENIX named type file"
    +
    677 | errorText 119 = "No XENIX semaphores available"
    +
    678 | errorText 120 = "Is a named type file"
    +
    679 | errorText 121 = "Remote I/O error"
    +
    680 | errorText 123 = "No medium found"
    681 | errorText (EN x) = "Unknown error: \{show x}"
    682 |
    683 | export
    @@ -845,95 +845,95 @@
    724 | errorName 40 = "ELOOP"
    725 | errorName 42 = "ENOMSG"
    726 | errorName 43 = "EIDRM"
    -
    727 | errorName 44 = "ECHRNG"
    -
    728 | errorName 45 = "EL2NSYNC"
    -
    729 | errorName 46 = "EL3HLT"
    -
    730 | errorName 47 = "EL3RST"
    -
    731 | errorName 48 = "ELNRNG"
    -
    732 | errorName 49 = "EUNATCH"
    -
    733 | errorName 50 = "ENOCSI"
    -
    734 | errorName 51 = "EL2HLT"
    -
    735 | errorName 52 = "EBADE"
    -
    736 | errorName 53 = "EBADR"
    -
    737 | errorName 54 = "EXFULL"
    -
    738 | errorName 55 = "ENOANO"
    -
    739 | errorName 56 = "EBADRQC"
    -
    740 | errorName 57 = "EBADSLT"
    -
    741 | errorName 59 = "EBFONT"
    -
    742 | errorName 60 = "ENOSTR"
    -
    743 | errorName 61 = "ENODATA"
    -
    744 | errorName 62 = "ETIME"
    -
    745 | errorName 63 = "ENOSR"
    -
    746 | errorName 64 = "ENONET"
    -
    747 | errorName 65 = "ENOPKG"
    -
    748 | errorName 66 = "EREMOTE"
    -
    749 | errorName 67 = "ENOLINK"
    -
    750 | errorName 68 = "EADV"
    -
    751 | errorName 69 = "ESRMNT"
    -
    752 | errorName 70 = "ECOMM"
    -
    753 | errorName 71 = "EPROTO"
    -
    754 | errorName 72 = "EMULTIHOP"
    -
    755 | errorName 73 = "EDOTDOT"
    -
    756 | errorName 74 = "EBADMSG"
    -
    757 | errorName 75 = "EOVERFLOW"
    -
    758 | errorName 76 = "ENOTUNIQ"
    -
    759 | errorName 77 = "EBADFD"
    -
    760 | errorName 78 = "EREMCHG"
    -
    761 | errorName 79 = "ELIBACC"
    -
    762 | errorName 80 = "ELIBBAD"
    -
    763 | errorName 81 = "ELIBSCN"
    -
    764 | errorName 82 = "ELIBMAX"
    -
    765 | errorName 83 = "ELIBEXEC"
    -
    766 | errorName 84 = "EILSEQ"
    -
    767 | errorName 85 = "ERESTART"
    -
    768 | errorName 86 = "ESTRPIPE"
    -
    769 | errorName 87 = "EUSERS"
    -
    770 | errorName 88 = "ENOTSOCK"
    -
    771 | errorName 89 = "EDESTADDRREQ"
    -
    772 | errorName 90 = "EMSGSIZE"
    -
    773 | errorName 91 = "EPROTOTYPE"
    -
    774 | errorName 92 = "ENOPROTOOPT"
    -
    775 | errorName 93 = "EPROTONOSUPPORT"
    -
    776 | errorName 94 = "ESOCKTNOSUPPORT"
    -
    777 | errorName 95 = "EOPNOTSUPP"
    -
    778 | errorName 96 = "EPFNOSUPPORT"
    -
    779 | errorName 97 = "EAFNOSUPPORT"
    -
    780 | errorName 98 = "EADDRINUSE"
    -
    781 | errorName 99 = "EADDRNOTAVAIL"
    -
    782 | errorName 100 = "ENETDOWN"
    -
    783 | errorName 101 = "ENETUNREACH"
    -
    784 | errorName 102 = "ENETRESET"
    -
    785 | errorName 103 = "ECONNABORTED"
    -
    786 | errorName 104 = "ECONNRESET"
    -
    787 | errorName 105 = "ENOBUFS"
    -
    788 | errorName 106 = "EISCONN"
    -
    789 | errorName 107 = "ENOTCONN"
    -
    790 | errorName 108 = "ESHUTDOWN"
    -
    791 | errorName 109 = "ETOOMANYREFS"
    -
    792 | errorName 110 = "ETIMEDOUT"
    -
    793 | errorName 111 = "ECONNREFUSED"
    -
    794 | errorName 112 = "EHOSTDOWN"
    -
    795 | errorName 113 = "EHOSTUNREACH"
    -
    796 | errorName 114 = "EALREADY"
    -
    797 | errorName 115 = "EINPROGRESS"
    -
    798 | errorName 116 = "ESTALE"
    -
    799 | errorName 117 = "EUCLEAN"
    -
    800 | errorName 118 = "ENOTNAM"
    -
    801 | errorName 119 = "ENAVAIL"
    -
    802 | errorName 120 = "EISNAM"
    -
    803 | errorName 121 = "EREMOTEIO"
    -
    804 | errorName 122 = "EDQUOT"
    -
    805 | errorName 123 = "ENOMEDIUM"
    -
    806 | errorName 124 = "EMEDIUMTYPE"
    -
    807 | errorName 125 = "ECANCELED"
    -
    808 | errorName 126 = "ENOKEY"
    -
    809 | errorName 127 = "EKEYEXPIRED"
    -
    810 | errorName 128 = "EKEYREVOKED"
    -
    811 | errorName 129 = "EKEYREJECTED"
    -
    812 | errorName 130 = "EOWNERDEAD"
    -
    813 | errorName 131 = "ENOTRECOVERABLE"
    -
    814 | errorName 132 = "ERFKILL"
    -
    815 | errorName 133 = "EHWPOISON"
    +
    727 | errorName 60 = "ENOSTR"
    +
    728 | errorName 61 = "ENODATA"
    +
    729 | errorName 62 = "ETIME"
    +
    730 | errorName 63 = "ENOSR"
    +
    731 | errorName 66 = "EREMOTE"
    +
    732 | errorName 67 = "ENOLINK"
    +
    733 | errorName 71 = "EPROTO"
    +
    734 | errorName 72 = "EMULTIHOP"
    +
    735 | errorName 74 = "EBADMSG"
    +
    736 | errorName 75 = "EOVERFLOW"
    +
    737 | errorName 84 = "EILSEQ"
    +
    738 | errorName 87 = "EUSERS"
    +
    739 | errorName 88 = "ENOTSOCK"
    +
    740 | errorName 89 = "EDESTADDRREQ"
    +
    741 | errorName 90 = "EMSGSIZE"
    +
    742 | errorName 91 = "EPROTOTYPE"
    +
    743 | errorName 92 = "ENOPROTOOPT"
    +
    744 | errorName 93 = "EPROTONOSUPPORT"
    +
    745 | errorName 94 = "ESOCKTNOSUPPORT"
    +
    746 | errorName 95 = "EOPNOTSUPP"
    +
    747 | errorName 96 = "EPFNOSUPPORT"
    +
    748 | errorName 97 = "EAFNOSUPPORT"
    +
    749 | errorName 98 = "EADDRINUSE"
    +
    750 | errorName 99 = "EADDRNOTAVAIL"
    +
    751 | errorName 100 = "ENETDOWN"
    +
    752 | errorName 101 = "ENETUNREACH"
    +
    753 | errorName 102 = "ENETRESET"
    +
    754 | errorName 103 = "ECONNABORTED"
    +
    755 | errorName 104 = "ECONNRESET"
    +
    756 | errorName 105 = "ENOBUFS"
    +
    757 | errorName 106 = "EISCONN"
    +
    758 | errorName 107 = "ENOTCONN"
    +
    759 | errorName 108 = "ESHUTDOWN"
    +
    760 | errorName 109 = "ETOOMANYREFS"
    +
    761 | errorName 110 = "ETIMEDOUT"
    +
    762 | errorName 111 = "ECONNREFUSED"
    +
    763 | errorName 112 = "EHOSTDOWN"
    +
    764 | errorName 113 = "EHOSTUNREACH"
    +
    765 | errorName 114 = "EALREADY"
    +
    766 | errorName 115 = "EINPROGRESS"
    +
    767 | errorName 116 = "ESTALE"
    +
    768 | errorName 122 = "EDQUOT"
    +
    769 | errorName 124 = "EMEDIUMTYPE"
    +
    770 | errorName 125 = "ECANCELED"
    +
    771 | errorName 126 = "ENOKEY"
    +
    772 | errorName 127 = "EKEYEXPIRED"
    +
    773 | errorName 128 = "EKEYREVOKED"
    +
    774 | errorName 129 = "EKEYREJECTED"
    +
    775 | errorName 130 = "EOWNERDEAD"
    +
    776 | errorName 131 = "ENOTRECOVERABLE"
    +
    777 | errorName 132 = "ERFKILL"
    +
    778 | errorName 133 = "EHWPOISON"
    +
    779 | errorName 44 = "ECHRNG"
    +
    780 | errorName 45 = "EL2NSYNC"
    +
    781 | errorName 46 = "EL3HLT"
    +
    782 | errorName 47 = "EL3RST"
    +
    783 | errorName 48 = "ELNRNG"
    +
    784 | errorName 49 = "EUNATCH"
    +
    785 | errorName 50 = "ENOCSI"
    +
    786 | errorName 51 = "EL2HLT"
    +
    787 | errorName 52 = "EBADE"
    +
    788 | errorName 53 = "EBADR"
    +
    789 | errorName 54 = "EXFULL"
    +
    790 | errorName 55 = "ENOANO"
    +
    791 | errorName 56 = "EBADRQC"
    +
    792 | errorName 57 = "EBADSLT"
    +
    793 | errorName 59 = "EBFONT"
    +
    794 | errorName 64 = "ENONET"
    +
    795 | errorName 65 = "ENOPKG"
    +
    796 | errorName 68 = "EADV"
    +
    797 | errorName 69 = "ESRMNT"
    +
    798 | errorName 70 = "ECOMM"
    +
    799 | errorName 73 = "EDOTDOT"
    +
    800 | errorName 76 = "ENOTUNIQ"
    +
    801 | errorName 77 = "EBADFD"
    +
    802 | errorName 78 = "EREMCHG"
    +
    803 | errorName 79 = "ELIBACC"
    +
    804 | errorName 80 = "ELIBBAD"
    +
    805 | errorName 81 = "ELIBSCN"
    +
    806 | errorName 82 = "ELIBMAX"
    +
    807 | errorName 83 = "ELIBEXEC"
    +
    808 | errorName 85 = "ERESTART"
    +
    809 | errorName 86 = "ESTRPIPE"
    +
    810 | errorName 117 = "EUCLEAN"
    +
    811 | errorName 118 = "ENOTNAM"
    +
    812 | errorName 119 = "ENAVAIL"
    +
    813 | errorName 120 = "EISNAM"
    +
    814 | errorName 121 = "EREMOTEIO"
    +
    815 | errorName 123 = "ENOMEDIUM"
    816 | errorName (EN _) = "EUNKNOWN"
    817 |
    diff --git a/docs/posix/docs/docs/System.Posix.File.Stats.html b/docs/posix/docs/docs/System.Posix.File.Stats.html index 3cd7d47f7..cca3f745c 100644 --- a/docs/posix/docs/docs/System.Posix.File.Stats.html +++ b/docs/posix/docs/docs/System.Posix.File.Stats.html @@ -61,4 +61,4 @@ -

    System.Posix.File.Stats

    (source)

    Definitions

    recordStatvfs : Type
    Totality: total
    Visibility: export
    Constructor: 
    SF : AnyPtr->Statvfs

    Projection: 
    .ptr : Statvfs->AnyPtr

    Hints:
    SizeOfStatvfs
    StructStatvfs
    blockSize : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    fundamentalBlockSize : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    blocks : HasIOio=>Statvfs->ioFsBlkCntT
    Totality: total
    Visibility: export
    freeBlocks : HasIOio=>Statvfs->ioFsBlkCntT
    Totality: total
    Visibility: export
    availableBlocks : HasIOio=>Statvfs->ioFsBlkCntT
    Totality: total
    Visibility: export
    files : HasIOio=>Statvfs->ioFsFilCntT
    Totality: total
    Visibility: export
    freeFiles : HasIOio=>Statvfs->ioFsFilCntT
    Totality: total
    Visibility: export
    availableFiles : HasIOio=>Statvfs->ioFsFilCntT
    Totality: total
    Visibility: export
    fsID : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    flags : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    namemax : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    recordFileStats : Type
    Totality: total
    Visibility: export
    Constructor: 
    FS : AnyPtr->FileStats

    Projection: 
    .ptr : FileStats->AnyPtr

    Hints:
    SizeOfFileStats
    StructFileStats
    dev : HasIOio=>FileStats->ioDevT
    Totality: total
    Visibility: export
    ino : HasIOio=>FileStats->ioInoT
    Totality: total
    Visibility: export
    mode : HasIOio=>FileStats->ioModeT
    Totality: total
    Visibility: export
    Totality: total
    Visibility: export
    uid : HasIOio=>FileStats->ioUidT
    Totality: total
    Visibility: export
    gid : HasIOio=>FileStats->ioGidT
    Totality: total
    Visibility: export
    rdev : HasIOio=>FileStats->ioDevT
    Totality: total
    Visibility: export
    size : HasIOio=>FileStats->ioSizeT
    Totality: total
    Visibility: export
    blksize : HasIOio=>FileStats->ioBlkSizeT
    Totality: total
    Visibility: export
    blocks : HasIOio=>FileStats->ioBlkCntT
    Totality: total
    Visibility: export
    atime : HasIOio=>FileStats->ioAnyPtr
    Totality: total
    Visibility: export
    mtime : HasIOio=>FileStats->ioAnyPtr
    Totality: total
    Visibility: export
    ctime : HasIOio=>FileStats->ioAnyPtr
    Totality: total
    Visibility: export
    statvfs : ErrIOio=>String->Statvfs->io ()
    Totality: total
    Visibility: export
    fstatvfs : ErrIOio=>FileDesca=>a->Statvfs->io ()
    Totality: total
    Visibility: export
    stat : ErrIOio=>String->FileStats->io ()
    Totality: total
    Visibility: export
    lstat : ErrIOio=>String->FileStats->io ()
    Totality: total
    Visibility: export
    fstat : ErrIOio=>FileDesca=>a->FileStats->io ()
    Totality: total
    Visibility: export
    +

    System.Posix.File.Stats

    (source)

    Definitions

    recordStatvfs : Type
    Totality: total
    Visibility: export
    Constructor: 
    SF : AnyPtr->Statvfs

    Projection: 
    .ptr : Statvfs->AnyPtr

    Hints:
    SizeOfStatvfs
    StructStatvfs
    blockSize : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    fundamentalBlockSize : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    blocks : HasIOio=>Statvfs->ioFsBlkCntT
    Totality: total
    Visibility: export
    freeBlocks : HasIOio=>Statvfs->ioFsBlkCntT
    Totality: total
    Visibility: export
    availableBlocks : HasIOio=>Statvfs->ioFsBlkCntT
    Totality: total
    Visibility: export
    files : HasIOio=>Statvfs->ioFsFilCntT
    Totality: total
    Visibility: export
    freeFiles : HasIOio=>Statvfs->ioFsFilCntT
    Totality: total
    Visibility: export
    availableFiles : HasIOio=>Statvfs->ioFsFilCntT
    Totality: total
    Visibility: export
    fsID : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    flags : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    namemax : HasIOio=>Statvfs->ioULong
    Totality: total
    Visibility: export
    recordFileStats : Type
    Totality: total
    Visibility: export
    Constructor: 
    FS : AnyPtr->FileStats

    Projection: 
    .ptr : FileStats->AnyPtr

    Hints:
    SizeOfFileStats
    StructFileStats
    dev : HasIOio=>FileStats->ioDevT
    Totality: total
    Visibility: export
    ino : HasIOio=>FileStats->ioInoT
    Totality: total
    Visibility: export
    mode : HasIOio=>FileStats->ioModeT
    Totality: total
    Visibility: export
    Totality: total
    Visibility: export
    uid : HasIOio=>FileStats->ioUidT
    Totality: total
    Visibility: export
    gid : HasIOio=>FileStats->ioGidT
    Totality: total
    Visibility: export
    rdev : HasIOio=>FileStats->ioDevT
    Totality: total
    Visibility: export
    size : HasIOio=>FileStats->ioSizeT
    Totality: total
    Visibility: export
    blksize : HasIOio=>FileStats->ioBlkSizeT
    Totality: total
    Visibility: export
    blocks : HasIOio=>FileStats->ioBlkCntT
    Totality: total
    Visibility: export
    atime : HasIOio=>FileStats->ioAnyPtr
    Totality: total
    Visibility: export
    mtime : HasIOio=>FileStats->ioAnyPtr
    Totality: total
    Visibility: export
    ctime : HasIOio=>FileStats->ioAnyPtr
    Totality: total
    Visibility: export
    statvfs : ErrIOio=>String->Statvfs->io ()
    Totality: total
    Visibility: export
    fstatvfs : ErrIOio=>FileDesca=>a->Statvfs->io ()
    Totality: total
    Visibility: export
    stat : ErrIOio=>String->FileStats->io ()
    Totality: total
    Visibility: export
    lstat : ErrIOio=>String->FileStats->io ()
    Totality: total
    Visibility: export
    fstat : ErrIOio=>FileDesca=>a->FileStats->io ()
    Totality: total
    Visibility: export
    diff --git a/docs/posix/docs/docs/System.Posix.File.Type.html b/docs/posix/docs/docs/System.Posix.File.Type.html index 4cc7208d2..039752300 100644 --- a/docs/posix/docs/docs/System.Posix.File.Type.html +++ b/docs/posix/docs/docs/System.Posix.File.Type.html @@ -61,4 +61,4 @@ -

    System.Posix.File.Type

    (source)

    Definitions

    dataFileType : Type
    Totality: total
    Visibility: public export
    Constructors:
    Regular : FileType
    Directory : FileType
    CharDevice : FileType
    BlockDevice : FileType
    Pipe : FileType
    Socket : FileType
    Other : FileType

    Hints:
    EqFileType
    FiniteFileType
    OrdFileType
    ShowFileType
    fromMode : ModeT->FileType
    Totality: total
    Visibility: public export
    statvfs_size : Nat
    Totality: total
    Visibility: public export
    stat_size : Nat
    Totality: total
    Visibility: public export
    +

    System.Posix.File.Type

    (source)

    Definitions

    dataFileType : Type
    Totality: total
    Visibility: public export
    Constructors:
    Regular : FileType
    Directory : FileType
    CharDevice : FileType
    BlockDevice : FileType
    Pipe : FileType
    Socket : FileType
    Other : FileType

    Hints:
    EqFileType
    FiniteFileType
    OrdFileType
    ShowFileType
    fromMode : ModeT->FileType
    Totality: total
    Visibility: public export
    statvfs_size : Bits32
    Totality: total
    Visibility: public export
    stat_size : Bits32
    Totality: total
    Visibility: public export
    diff --git a/docs/posix/docs/docs/System.Posix.File.Type.src.html b/docs/posix/docs/docs/System.Posix.File.Type.src.html index 3da837aa0..685654b0a 100644 --- a/docs/posix/docs/docs/System.Posix.File.Type.src.html +++ b/docs/posix/docs/docs/System.Posix.File.Type.src.html @@ -163,11 +163,11 @@
    42 |     _ => Other
    43 |
    44 | public export
    -
    45 | statvfs_size : Nat
    +
    45 | statvfs_size : Bits32
    46 | statvfs_size = 112
    47 |
    48 | public export
    -
    49 | stat_size : Nat
    +
    49 | stat_size : Bits32
    50 | stat_size = 144
    51 |
    diff --git a/docs/posix/docs/docs/System.Posix.File.src.html b/docs/posix/docs/docs/System.Posix.File.src.html index 4c254db30..140cd7afe 100644 --- a/docs/posix/docs/docs/System.Posix.File.src.html +++ b/docs/posix/docs/docs/System.Posix.File.src.html @@ -327,7 +327,7 @@
    206 |   ||| Reads at most `n * sizeof a` bytes into a preallocated array.
    207 |   export %inline
    208 |   readArr : {n : _} -> SizeOf b => CArrayIO n b -> io Bits32
    -
    209 |   readArr p = readPtr (unsafeUnwrap p) (cast $ n * sizeof b)
    +
    209 |   readArr p = readPtr (unsafeUnwrap p) (cast n * sizeof b)
    210 |
    211 |   ||| Reads at most `n` bytes from a file into a buffer.
    212 |   export %inline
    @@ -382,7 +382,7 @@
    261 |   |||       was opened in "append" mode (with the `O_APPEND` flag).
    262 |   export %inline
    263 |   writeArr : {n : _} -> SizeOf b => CArrayIO n b -> io Bits32
    -
    264 |   writeArr p = writePtr (unsafeUnwrap p) (cast $ n * sizeof b)
    +
    264 |   writeArr p = writePtr (unsafeUnwrap p) (cast n * sizeof b)
    265 |
    266 |
    267 |   ||| Atomically writes up to the number of bytes in the bytestring
    diff --git a/docs/posix/docs/docs/System.Posix.Process.Flags.html b/docs/posix/docs/docs/System.Posix.Process.Flags.html index 9ceee0376..227650bb1 100644 --- a/docs/posix/docs/docs/System.Posix.Process.Flags.html +++ b/docs/posix/docs/docs/System.Posix.Process.Flags.html @@ -61,4 +61,4 @@ -

    System.Posix.Process.Flags

    (source)

    Definitions

    recordWaitFlags : Type
    Totality: total
    Visibility: public export
    Constructor: 
    F : Bits32->WaitFlags

    Projection: 
    .flags : WaitFlags->Bits32

    Hints:
    EqWaitFlags
    MonoidWaitFlags
    OrdWaitFlags
    SemigroupWaitFlags
    ShowWaitFlags
    .flags : WaitFlags->Bits32
    Totality: total
    Visibility: public export
    flags : WaitFlags->Bits32
    Totality: total
    Visibility: public export
    dataIdType : Type
    Totality: total
    Visibility: public export
    Constructors:
    P_ALL : IdType
    P_PID : IdType
    P_PGID : IdType

    Hints:
    EqIdType
    OrdIdType
    ShowIdType
    WUNTRACED : WaitFlags
    Totality: total
    Visibility: public export
    WCONTINUED : WaitFlags
    Totality: total
    Visibility: public export
    WNOHANG : WaitFlags
    Totality: total
    Visibility: public export
    WEXITED : WaitFlags
    Totality: total
    Visibility: public export
    WSTOPPED : WaitFlags
    Totality: total
    Visibility: public export
    WNOWAIT : WaitFlags
    Totality: total
    Visibility: public export
    idtypeCode : IdType->Bits8
    Totality: total
    Visibility: public export
    +

    System.Posix.Process.Flags

    (source)

    Definitions

    recordWaitFlags : Type
    Totality: total
    Visibility: public export
    Constructor: 
    F : Bits32->WaitFlags

    Projection: 
    .flags : WaitFlags->Bits32

    Hints:
    EqWaitFlags
    MonoidWaitFlags
    OrdWaitFlags
    SemigroupWaitFlags
    ShowWaitFlags
    .flags : WaitFlags->Bits32
    Totality: total
    Visibility: public export
    flags : WaitFlags->Bits32
    Totality: total
    Visibility: public export
    dataIdType : Type
    Totality: total
    Visibility: public export
    Constructors:
    P_ALL : IdType
    P_PID : IdType
    P_PGID : IdType

    Hints:
    EqIdType
    OrdIdType
    ShowIdType
    WUNTRACED : WaitFlags
    Totality: total
    Visibility: public export
    WCONTINUED : WaitFlags
    Totality: total
    Visibility: public export
    WNOHANG : WaitFlags
    Totality: total
    Visibility: public export
    WEXITED : WaitFlags
    Totality: total
    Visibility: public export
    WSTOPPED : WaitFlags
    Totality: total
    Visibility: public export
    WNOWAIT : WaitFlags
    Totality: total
    Visibility: public export
    idtypeCode : IdType->Bits8
    Totality: total
    Visibility: public export
    diff --git a/docs/posix/docs/docs/System.Posix.Process.html b/docs/posix/docs/docs/System.Posix.Process.html index f54a0e10c..99b903e0a 100644 --- a/docs/posix/docs/docs/System.Posix.Process.html +++ b/docs/posix/docs/docs/System.Posix.Process.html @@ -61,4 +61,4 @@ -

    System.Posix.Process

    (source)

    Reexports

    importpublic Data.C.Ptr
    importpublic System.Posix.Errno
    importpublic System.Posix.Process.Flags

    Definitions

    getpid : HasIOio=>ioPidT
      Returns the process ID of the current process

    Totality: total
    Visibility: export
    getppid : HasIOio=>ioPidT
      Returns the process ID of the current process' parent process

    Totality: total
    Visibility: export
    getuid : HasIOio=>ioUidT
      Returns the real user ID of the current process

    Totality: total
    Visibility: export
    geteuid : HasIOio=>ioUidT
      Returns the effective user ID of the current process

    Totality: total
    Visibility: export
    getgid : HasIOio=>ioGidT
      Returns the real group ID of the current process

    Totality: total
    Visibility: export
    getegid : HasIOio=>ioGidT
      Returns the effective group ID of the current process

    Totality: total
    Visibility: export
    setuid : ErrIOio=>UidT->io ()
      Tries to set the real user ID of the current process

    Totality: total
    Visibility: export
    seteuid : ErrIOio=>UidT->io ()
      Tries to set the effective user ID of the current process

    Totality: total
    Visibility: export
    setgid : ErrIOio=>GidT->io ()
      Tries to set the real group ID of the current process

    Totality: total
    Visibility: export
    setegid : ErrIOio=>GidT->io ()
      Tries to set the effective group ID of the current process

    Totality: total
    Visibility: export
    recordProcStatus : Type
      Process status returned by a call to `wait` or `waitpid`.

    Totality: total
    Visibility: public export
    Constructor: 
    PS : CInt->ProcStatus

    Projection: 
    .status : ProcStatus->CInt

    Hints:
    DerefProcStatus
    SetPtrProcStatus
    SizeOfProcStatus
    .status : ProcStatus->CInt
    Totality: total
    Visibility: public export
    status : ProcStatus->CInt
    Totality: total
    Visibility: public export
    fork : ErrIOio=>ioPidT
      Creates a new child process.

    This creates a new process by copying the stack, head, and
    data memory segment of the parent process. If successful,
    the functions returns `0` for the child process and
    the child's process ID for the parent.

    Totality: total
    Visibility: export
    execve : ErrIOio=>String->CArrayIOm (MaybeString) ->CArrayIOn (MaybeString) ->io ()
      Loads a new program into this process's memory.

    `path` : The path of the program to run
    `args` : Command-line arguments (a `NULL` terminated array of strings)
    `env ` : Environment (a `NULL` terminated array of strings of the for "a=b")

    This only returns in case of an error.

    Totality: total
    Visibility: export
    execle : ErrIOio=>String->ListString->List (String, String) ->io ()
      Convenience alias of `execve` that uses Idris lists for passing
    the arguments list and environment.

    Totality: total
    Visibility: export
    execv : ErrIOio=>String->CArrayIOm (MaybeString) ->io ()
      Like `execve` but uses the environment of the current process.

    Totality: total
    Visibility: export
    execvp : ErrIOio=>String->CArrayIOm (MaybeString) ->io ()
      Like `execv` but allows us to just use a filename
    and resolve in using the `$PATH` variable.

    Totality: total
    Visibility: export
    execlp : ErrIOio=>String->ListString->io ()
      Convenience alias for `execvp` that uses an Idris list for
    the list of arguments.

    Totality: total
    Visibility: export
    system : ErrIOio=>String->ioProcStatus
      Runs the given shell command in a child process.

    This has a slightly different type signature that the actual
    `system` call in C, which allows us to use the same mechanism
    as with `wait` to get the returned exit status.

    Totality: total
    Visibility: export
    wait : ErrIOio=>IOBoxProcStatus->ioPidT
      Waits for one of the child processes of this process to
    terminate.

    On success, this returns the process ID of the child process
    that terminated. In addition, the termination status of the child
    is written into the given pointer.

    Totality: total
    Visibility: export
    waitpid : ErrIOio=>PidT->BoxProcStatus->WaitFlags->ioPidT
      Waits for the given child processes of to terminate.

    Unlike `wait`, this allows us to wait on a specific child process.
    In addition, it is possible to be notified about child processes that have
    been terminated by a signal.

    Totality: total
    Visibility: export
    waitid : ErrIOio=>IdType->PidT->SiginfoT->WaitFlags->io ()
      More powerful version of `waitpid` supporting additional flags and
    waiting on groups of children. Wait results are stored in the
    provided `SiginfoT` pointer.

    Totality: total
    Visibility: export
    exited : ProcStatus->Bool
      `True` if the process exited normally.

    Totality: total
    Visibility: export
    exitstatus : ProcStatus->Bits8
      Returns the exit status with which the process exited.

    Totality: total
    Visibility: export
    signaled : ProcStatus->Bool
      `True` if the process has been killed by a signal.

    Totality: total
    Visibility: export
    termsig : ProcStatus->Signal
      Returns the signal the process was killed with.

    Totality: total
    Visibility: export
    coredump : ProcStatus->Bool
      `True` if the process has dumped core.

    Totality: total
    Visibility: export
    stopped : ProcStatus->Bool
      `True` if the process has been stopped by a signal.

    Totality: total
    Visibility: export
    stopsig : ProcStatus->Signal
      Returns the signal the process was stopped with.

    Totality: total
    Visibility: export
    continued : ProcStatus->Bool
      `True` if the process has been awakend with `SIGCONT`.

    Totality: total
    Visibility: export
    +

    System.Posix.Process

    (source)

    Reexports

    importpublic Data.C.Ptr
    importpublic System.Posix.Errno
    importpublic System.Posix.Process.Flags

    Definitions

    getpid : HasIOio=>ioPidT
      Returns the process ID of the current process

    Totality: total
    Visibility: export
    getppid : HasIOio=>ioPidT
      Returns the process ID of the current process' parent process

    Totality: total
    Visibility: export
    getuid : HasIOio=>ioUidT
      Returns the real user ID of the current process

    Totality: total
    Visibility: export
    geteuid : HasIOio=>ioUidT
      Returns the effective user ID of the current process

    Totality: total
    Visibility: export
    getgid : HasIOio=>ioGidT
      Returns the real group ID of the current process

    Totality: total
    Visibility: export
    getegid : HasIOio=>ioGidT
      Returns the effective group ID of the current process

    Totality: total
    Visibility: export
    setuid : ErrIOio=>UidT->io ()
      Tries to set the real user ID of the current process

    Totality: total
    Visibility: export
    seteuid : ErrIOio=>UidT->io ()
      Tries to set the effective user ID of the current process

    Totality: total
    Visibility: export
    setgid : ErrIOio=>GidT->io ()
      Tries to set the real group ID of the current process

    Totality: total
    Visibility: export
    setegid : ErrIOio=>GidT->io ()
      Tries to set the effective group ID of the current process

    Totality: total
    Visibility: export
    recordProcStatus : Type
      Process status returned by a call to `wait` or `waitpid`.

    Totality: total
    Visibility: public export
    Constructor: 
    PS : CInt->ProcStatus

    Projection: 
    .status : ProcStatus->CInt

    Hints:
    DerefProcStatus
    SetPtrProcStatus
    SizeOfProcStatus
    .status : ProcStatus->CInt
    Totality: total
    Visibility: public export
    status : ProcStatus->CInt
    Totality: total
    Visibility: public export
    fork : ErrIOio=>ioPidT
      Creates a new child process.

    This creates a new process by copying the stack, head, and
    data memory segment of the parent process. If successful,
    the functions returns `0` for the child process and
    the child's process ID for the parent.

    Totality: total
    Visibility: export
    execve : ErrIOio=>String->CArrayIOm (MaybeString) ->CArrayIOn (MaybeString) ->io ()
      Loads a new program into this process's memory.

    `path` : The path of the program to run
    `args` : Command-line arguments (a `NULL` terminated array of strings)
    `env ` : Environment (a `NULL` terminated array of strings of the for "a=b")

    This only returns in case of an error.

    Totality: total
    Visibility: export
    execle : ErrIOio=>String->ListString->List (String, String) ->io ()
      Convenience alias of `execve` that uses Idris lists for passing
    the arguments list and environment.

    Totality: total
    Visibility: export
    execv : ErrIOio=>String->CArrayIOm (MaybeString) ->io ()
      Like `execve` but uses the environment of the current process.

    Totality: total
    Visibility: export
    execvp : ErrIOio=>String->CArrayIOm (MaybeString) ->io ()
      Like `execv` but allows us to just use a filename
    and resolve in using the `$PATH` variable.

    Totality: total
    Visibility: export
    execlp : ErrIOio=>String->ListString->io ()
      Convenience alias for `execvp` that uses an Idris list for
    the list of arguments.

    Totality: total
    Visibility: export
    system : ErrIOio=>String->ioProcStatus
      Runs the given shell command in a child process.

    This has a slightly different type signature that the actual
    `system` call in C, which allows us to use the same mechanism
    as with `wait` to get the returned exit status.

    Totality: total
    Visibility: export
    wait : ErrIOio=>IOBoxProcStatus->ioPidT
      Waits for one of the child processes of this process to
    terminate.

    On success, this returns the process ID of the child process
    that terminated. In addition, the termination status of the child
    is written into the given pointer.

    Totality: total
    Visibility: export
    waitpid : ErrIOio=>PidT->BoxProcStatus->WaitFlags->ioPidT
      Waits for the given child processes of to terminate.

    Unlike `wait`, this allows us to wait on a specific child process.
    In addition, it is possible to be notified about child processes that have
    been terminated by a signal.

    Totality: total
    Visibility: export
    waitid : ErrIOio=>IdType->PidT->SiginfoT->WaitFlags->io ()
      More powerful version of `waitpid` supporting additional flags and
    waiting on groups of children. Wait results are stored in the
    provided `SiginfoT` pointer.

    Totality: total
    Visibility: export
    exited : ProcStatus->Bool
      `True` if the process exited normally.

    Totality: total
    Visibility: export
    exitstatus : ProcStatus->Bits8
      Returns the exit status with which the process exited.

    Totality: total
    Visibility: export
    signaled : ProcStatus->Bool
      `True` if the process has been killed by a signal.

    Totality: total
    Visibility: export
    termsig : ProcStatus->Signal
      Returns the signal the process was killed with.

    Totality: total
    Visibility: export
    coredump : ProcStatus->Bool
      `True` if the process has dumped core.

    Totality: total
    Visibility: export
    stopped : ProcStatus->Bool
      `True` if the process has been stopped by a signal.

    Totality: total
    Visibility: export
    stopsig : ProcStatus->Signal
      Returns the signal the process was stopped with.

    Totality: total
    Visibility: export
    continued : ProcStatus->Bool
      `True` if the process has been awakend with `SIGCONT`.

    Totality: total
    Visibility: export
    diff --git a/docs/posix/docs/docs/System.Posix.Pthreads.Types.html b/docs/posix/docs/docs/System.Posix.Pthreads.Types.html index f3a3cf450..0123ec079 100644 --- a/docs/posix/docs/docs/System.Posix.Pthreads.Types.html +++ b/docs/posix/docs/docs/System.Posix.Pthreads.Types.html @@ -61,4 +61,4 @@ -

    System.Posix.Pthreads.Types

    (source)

    Definitions

    dataMutexType : Type
    Totality: total
    Visibility: public export
    Constructors:
    MUTEX_NORMAL : MutexType
    MUTEX_RECURSIVE : MutexType
    MUTEX_ERRORCHECK : MutexType

    Hints:
    EqMutexType
    FiniteMutexType
    OrdMutexType
    ShowMutexType
    dataCancelType : Type
    Totality: total
    Visibility: public export
    Constructors:
    CANCEL_DEFERRED : CancelType
    CANCEL_ASYNCHRONOUS : CancelType

    Hints:
    EqCancelType
    FiniteCancelType
    OrdCancelType
    ShowCancelType
    dataCancelState : Type
    Totality: total
    Visibility: public export
    Constructors:
    CANCEL_ENABLE : CancelState
    CANCEL_DISABLE : CancelState

    Hints:
    EqCancelState
    FiniteCancelState
    OrdCancelState
    ShowCancelState
    mutexCode : MutexType->Bits8
    Totality: total
    Visibility: public export
    cancelType : CancelType->Bits8
    Totality: total
    Visibility: public export
    cancelState : CancelState->Bits8
    Totality: total
    Visibility: public export
    pthread_t_size : Nat
    Totality: total
    Visibility: public export
    mutex_t_size : Nat
    Totality: total
    Visibility: public export
    cond_t_size : Nat
    Totality: total
    Visibility: public export
    +

    System.Posix.Pthreads.Types

    (source)

    Definitions

    dataMutexType : Type
    Totality: total
    Visibility: public export
    Constructors:
    MUTEX_NORMAL : MutexType
    MUTEX_RECURSIVE : MutexType
    MUTEX_ERRORCHECK : MutexType

    Hints:
    EqMutexType
    FiniteMutexType
    OrdMutexType
    ShowMutexType
    dataCancelType : Type
    Totality: total
    Visibility: public export
    Constructors:
    CANCEL_DEFERRED : CancelType
    CANCEL_ASYNCHRONOUS : CancelType

    Hints:
    EqCancelType
    FiniteCancelType
    OrdCancelType
    ShowCancelType
    dataCancelState : Type
    Totality: total
    Visibility: public export
    Constructors:
    CANCEL_ENABLE : CancelState
    CANCEL_DISABLE : CancelState

    Hints:
    EqCancelState
    FiniteCancelState
    OrdCancelState
    ShowCancelState
    mutexCode : MutexType->Bits8
    Totality: total
    Visibility: public export
    cancelType : CancelType->Bits8
    Totality: total
    Visibility: public export
    cancelState : CancelState->Bits8
    Totality: total
    Visibility: public export
    pthread_t_size : Bits32
    Totality: total
    Visibility: public export
    mutex_t_size : Bits32
    Totality: total
    Visibility: public export
    cond_t_size : Bits32
    Totality: total
    Visibility: public export
    diff --git a/docs/posix/docs/docs/System.Posix.Pthreads.Types.src.html b/docs/posix/docs/docs/System.Posix.Pthreads.Types.src.html index 8901a9031..e472fc9cb 100644 --- a/docs/posix/docs/docs/System.Posix.Pthreads.Types.src.html +++ b/docs/posix/docs/docs/System.Posix.Pthreads.Types.src.html @@ -175,15 +175,15 @@
    54 | cancelState CANCEL_DISABLE = 1
    55 |
    56 | public export %inline
    -
    57 | pthread_t_size : Nat
    +
    57 | pthread_t_size : Bits32
    58 | pthread_t_size = 8
    59 |
    60 | public export %inline
    -
    61 | mutex_t_size : Nat
    +
    61 | mutex_t_size : Bits32
    62 | mutex_t_size = 40
    63 |
    64 | public export %inline
    -
    65 | cond_t_size : Nat
    +
    65 | cond_t_size : Bits32
    66 | cond_t_size = 48
    67 |
    diff --git a/docs/posix/docs/docs/System.Posix.Pthreads.html b/docs/posix/docs/docs/System.Posix.Pthreads.html index 0547166ca..4543d975c 100644 --- a/docs/posix/docs/docs/System.Posix.Pthreads.html +++ b/docs/posix/docs/docs/System.Posix.Pthreads.html @@ -61,4 +61,4 @@ -

    System.Posix.Pthreads

    (source)

    Reexports

    importpublic Data.C.Ptr
    importpublic System.Posix.Errno
    importpublic System.Posix.Pthreads.Types

    Definitions

    recordPthreadT : Type
      Wrapper around an identifier for a POSIX thread.

    Totality: total
    Visibility: export
    Constructor: 
    P : AnyPtr->PthreadT

    Projection: 
    .ptr : PthreadT->AnyPtr

    Hints:
    EqPthreadT
    ShowPthreadT
    unwrapPthreadT : PthreadT->AnyPtr
    Totality: total
    Visibility: export
    pthreadSelf : HasIOio=>ioPthreadT
      Returns the thread ID of the current thread.

    Totality: total
    Visibility: export
    pthreadJoin : ErrIOio=>PthreadT->io ()
      Blocks the current thread and waits for the given thread to terminate.

    Totality: total
    Visibility: export
    recordMutexT : Type
      Wrapper around a `pthread_mutex_t` pointer.

    Noted: While this provides additional flexibility over the type of mutex
    we use (see `mkmutex`) and how we acquire a lock on a mutex, it is less
    convenient to use than the garbage-collected version from
    `System.Concurrency`.

    Totality: total
    Visibility: export
    Constructor: 
    M : AnyPtr->MutexT

    Projection: 
    .ptr : MutexT->AnyPtr

    Hints:
    SizeOfMutexT
    StructMutexT
    mkmutex : ErrIOio=>MutexType->ioMutexT
      Allocates and initializes a new mutex of the given type.

    This must be freed with `destroyMutex`.

    Totality: total
    Visibility: export
    destroyMutex : HasIOio=>MutexT->io ()
      Destroys a mutex and frees the memory allocated for it.

    Totality: total
    Visibility: export
    lockMutex : ErrIOio=>MutexT->io ()
      Tries to lock the given mutex, blocking the calling thread
    in case it is already locked.

    Totality: total
    Visibility: export
    timedlockMutex : ErrIOio=>MutexT->Timespec->io ()
    Totality: total
    Visibility: export
    trylockMutex : ErrIOio=>MutexT->io ()
      Like `lockMutex` but fails with `EBUSY` in case the mutex is
    already locked.

    Totality: total
    Visibility: export
    unlockMutex : ErrIOio=>MutexT->io ()
      Unlocks the given mutex.

    This is an error if the calling thread is not the one holding
    the mutex's lock.

    Totality: total
    Visibility: export
    recordCondT : Type
      Wrapper around a `pthread_cond_t` pointer.

    Noted: While this provides additional flexibility over the type of condition
    we use (see `mkcond`) convenient to use than the garbage-collected version from
    `System.Concurrency`.

    Totality: total
    Visibility: export
    Constructor: 
    C : AnyPtr->CondT

    Projection: 
    .ptr : CondT->AnyPtr

    Hints:
    SizeOfCondT
    StructCondT
    mkcond : ErrIOio=>ioCondT
      Allocates and initializes a new condition variable.

    This must be freed with `destroyCond`.

    Totality: total
    Visibility: export
    destroyCond : HasIOio=>CondT->io ()
      Destroys a condition variable and frees the memory allocated for it.

    Totality: total
    Visibility: export
    condSignal : ErrIOio=>CondT->io ()
      Signals the given `pthread_cond_t`.

    If several threads are waiting on the condition, it is unspecified
    which of them will be signalled. We are only guaranteed that at least
    of them will be woken up.

    Totality: total
    Visibility: export
    condBroadcast : ErrIOio=>CondT->io ()
      Broadcasts the given `pthread_cond_t`.

    This will wake up all threads waiting on the given condition.

    Totality: total
    Visibility: export
    condWait : ErrIOio=>CondT->MutexT->io ()
      Blocks the given thread and waits for the given condition to
    be signalled.

    Note: The mutex must have been locked by the calling thread. The
    lock is automatically released upon calling `condWait`, and when
    the thread is woken up, the mutex will automatically be locked again.

    Totality: total
    Visibility: export
    condTimedwait : ErrIOio=>CondT->MutexT->Timespec->io ()
      Like `condWait` but will return with `ETIMEDOUT` after the given
    time interval expires.

    Totality: total
    Visibility: export
    pthreadCancel : ErrIOio=>PthreadT->io ()
      Sends a cancelation request to the given thread.

    Totality: total
    Visibility: export
    pthreadTestCancel : HasIOio=>io ()
      Tests for thread cancelation in the absence of other cancelation
    points.

    Totality: total
    Visibility: export
    setCancelType : HasIOio=>CancelType->ioCancelType
      Sets the current thread's cancel type returning the previous cancel type.

    Totality: total
    Visibility: export
    setCancelState : HasIOio=>CancelState->ioCancelState
      Sets the current thread's cancel state returning the previous cancel state.

    Totality: total
    Visibility: export
    pthreadSigmask : HasIOio=>How->SigsetT->ioSigsetT
      Adjust the thread's signal mask according to the given `How`
    and signal set.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.
    See also `pthreadSigmask'` for a version that does not return
    the previous signal mask.

    Totality: total
    Visibility: export
    pthreadSigmask' : HasIOio=>How->SigsetT->io ()
      Like `sigprocmask` but does not allocate a pointer for the
    previous `sigset_t`.

    Totality: total
    Visibility: export
    pthreadSiggetmask : HasIOio=>ioSigsetT
      Returns the current signal mask of the thread.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.

    Totality: total
    Visibility: export
    pthreadKill : ErrIOio=>PthreadT->Signal->io ()
      Sends the given signal to the given thread.

    Totality: total
    Visibility: export
    +

    System.Posix.Pthreads

    (source)

    Reexports

    importpublic Data.C.Ptr
    importpublic System.Posix.Errno
    importpublic System.Posix.Pthreads.Types

    Definitions

    recordPthreadT : Type
      Wrapper around an identifier for a POSIX thread.

    Totality: total
    Visibility: export
    Constructor: 
    P : AnyPtr->PthreadT

    Projection: 
    .ptr : PthreadT->AnyPtr

    Hints:
    EqPthreadT
    ShowPthreadT
    unwrapPthreadT : PthreadT->AnyPtr
    Totality: total
    Visibility: export
    pthreadSelf : HasIOio=>ioPthreadT
      Returns the thread ID of the current thread.

    Totality: total
    Visibility: export
    pthreadJoin : ErrIOio=>PthreadT->io ()
      Blocks the current thread and waits for the given thread to terminate.

    Totality: total
    Visibility: export
    recordMutexT : Type
      Wrapper around a `pthread_mutex_t` pointer.

    Noted: While this provides additional flexibility over the type of mutex
    we use (see `mkmutex`) and how we acquire a lock on a mutex, it is less
    convenient to use than the garbage-collected version from
    `System.Concurrency`.

    Totality: total
    Visibility: export
    Constructor: 
    M : AnyPtr->MutexT

    Projection: 
    .ptr : MutexT->AnyPtr

    Hints:
    SizeOfMutexT
    StructMutexT
    mkmutex : ErrIOio=>MutexType->ioMutexT
      Allocates and initializes a new mutex of the given type.

    This must be freed with `destroyMutex`.

    Totality: total
    Visibility: export
    destroyMutex : HasIOio=>MutexT->io ()
      Destroys a mutex and frees the memory allocated for it.

    Totality: total
    Visibility: export
    lockMutex : ErrIOio=>MutexT->io ()
      Tries to lock the given mutex, blocking the calling thread
    in case it is already locked.

    Totality: total
    Visibility: export
    timedlockMutex : ErrIOio=>MutexT->Timespec->io ()
    Totality: total
    Visibility: export
    trylockMutex : ErrIOio=>MutexT->io ()
      Like `lockMutex` but fails with `EBUSY` in case the mutex is
    already locked.

    Totality: total
    Visibility: export
    unlockMutex : ErrIOio=>MutexT->io ()
      Unlocks the given mutex.

    This is an error if the calling thread is not the one holding
    the mutex's lock.

    Totality: total
    Visibility: export
    recordCondT : Type
      Wrapper around a `pthread_cond_t` pointer.

    Noted: While this provides additional flexibility over the type of condition
    we use (see `mkcond`) convenient to use than the garbage-collected version from
    `System.Concurrency`.

    Totality: total
    Visibility: export
    Constructor: 
    C : AnyPtr->CondT

    Projection: 
    .ptr : CondT->AnyPtr

    Hints:
    SizeOfCondT
    StructCondT
    mkcond : ErrIOio=>ioCondT
      Allocates and initializes a new condition variable.

    This must be freed with `destroyCond`.

    Totality: total
    Visibility: export
    destroyCond : HasIOio=>CondT->io ()
      Destroys a condition variable and frees the memory allocated for it.

    Totality: total
    Visibility: export
    condSignal : ErrIOio=>CondT->io ()
      Signals the given `pthread_cond_t`.

    If several threads are waiting on the condition, it is unspecified
    which of them will be signalled. We are only guaranteed that at least
    of them will be woken up.

    Totality: total
    Visibility: export
    condBroadcast : ErrIOio=>CondT->io ()
      Broadcasts the given `pthread_cond_t`.

    This will wake up all threads waiting on the given condition.

    Totality: total
    Visibility: export
    condWait : ErrIOio=>CondT->MutexT->io ()
      Blocks the given thread and waits for the given condition to
    be signalled.

    Note: The mutex must have been locked by the calling thread. The
    lock is automatically released upon calling `condWait`, and when
    the thread is woken up, the mutex will automatically be locked again.

    Totality: total
    Visibility: export
    condTimedwait : ErrIOio=>CondT->MutexT->Timespec->io ()
      Like `condWait` but will return with `ETIMEDOUT` after the given
    time interval expires.

    Totality: total
    Visibility: export
    pthreadCancel : ErrIOio=>PthreadT->io ()
      Sends a cancelation request to the given thread.

    Totality: total
    Visibility: export
    pthreadTestCancel : HasIOio=>io ()
      Tests for thread cancelation in the absence of other cancelation
    points.

    Totality: total
    Visibility: export
    setCancelType : HasIOio=>CancelType->ioCancelType
      Sets the current thread's cancel type returning the previous cancel type.

    Totality: total
    Visibility: export
    setCancelState : HasIOio=>CancelState->ioCancelState
      Sets the current thread's cancel state returning the previous cancel state.

    Totality: total
    Visibility: export
    pthreadSigmask : HasIOio=>How->SigsetT->ioSigsetT
      Adjust the thread's signal mask according to the given `How`
    and signal set.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.
    See also `pthreadSigmask'` for a version that does not return
    the previous signal mask.

    Totality: total
    Visibility: export
    pthreadSigmask' : HasIOio=>How->SigsetT->io ()
      Like `sigprocmask` but does not allocate a pointer for the
    previous `sigset_t`.

    Totality: total
    Visibility: export
    pthreadSiggetmask : HasIOio=>ioSigsetT
      Returns the current signal mask of the thread.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.

    Totality: total
    Visibility: export
    pthreadKill : ErrIOio=>PthreadT->Signal->io ()
      Sends the given signal to the given thread.

    Totality: total
    Visibility: export
    diff --git a/docs/posix/docs/docs/System.Posix.Signal.Types.html b/docs/posix/docs/docs/System.Posix.Signal.Types.html index 0281b9912..065b4a686 100644 --- a/docs/posix/docs/docs/System.Posix.Signal.Types.html +++ b/docs/posix/docs/docs/System.Posix.Signal.Types.html @@ -61,4 +61,4 @@ -

    System.Posix.Signal.Types

    (source)

    Definitions

    dataHow : Type
    Totality: total
    Visibility: public export
    Constructors:
    SIG_BLOCK : How
    SIG_UNBLOCK : How
    SIG_SETMASK : How

    Hints:
    EqHow
    OrdHow
    ShowHow
    recordSignal : Type
    Totality: total
    Visibility: public export
    Constructor: 
    S : Bits32->Signal

    Projection: 
    .sig : Signal->Bits32

    Hints:
    EqSignal
    OrdSignal
    ShowSignal
    .sig : Signal->Bits32
    Totality: total
    Visibility: public export
    sig : Signal->Bits32
    Totality: total
    Visibility: public export
    howCode : How->Bits8
    Totality: total
    Visibility: public export
    SIGRTMIN : Signal
    Totality: total
    Visibility: public export
    SIGRTMAX : Signal
    Totality: total
    Visibility: public export
    SIGHUP : Signal
    Totality: total
    Visibility: public export
    SIGINT : Signal
    Totality: total
    Visibility: public export
    SIGQUIT : Signal
    Totality: total
    Visibility: public export
    SIGILL : Signal
    Totality: total
    Visibility: public export
    SIGTRAP : Signal
    Totality: total
    Visibility: public export
    SIGABRT : Signal
    Totality: total
    Visibility: public export
    SIGBUS : Signal
    Totality: total
    Visibility: public export
    SIGFPE : Signal
    Totality: total
    Visibility: public export
    SIGKILL : Signal
    Totality: total
    Visibility: public export
    SIGUSR1 : Signal
    Totality: total
    Visibility: public export
    SIGSEGV : Signal
    Totality: total
    Visibility: public export
    SIGUSR2 : Signal
    Totality: total
    Visibility: public export
    SIGPIPE : Signal
    Totality: total
    Visibility: public export
    SIGALRM : Signal
    Totality: total
    Visibility: public export
    SIGTERM : Signal
    Totality: total
    Visibility: public export
    SIGCHLD : Signal
    Totality: total
    Visibility: public export
    SIGCONT : Signal
    Totality: total
    Visibility: public export
    SIGSTOP : Signal
    Totality: total
    Visibility: public export
    SIGTSTP : Signal
    Totality: total
    Visibility: public export
    SIGTTIN : Signal
    Totality: total
    Visibility: public export
    SIGTTOU : Signal
    Totality: total
    Visibility: public export
    SIGURG : Signal
    Totality: total
    Visibility: public export
    SIGXCPU : Signal
    Totality: total
    Visibility: public export
    SIGXFSZ : Signal
    Totality: total
    Visibility: public export
    SIGVTALRM : Signal
    Totality: total
    Visibility: public export
    SIGPROF : Signal
    Totality: total
    Visibility: public export
    SIGPOLL : Signal
    Totality: total
    Visibility: public export
    SIGSYS : Signal
    Totality: total
    Visibility: public export
    sigName : SortedMapSignalString
    Totality: total
    Visibility: export
    siginfo_t_size : Nat
    Totality: total
    Visibility: public export
    +

    System.Posix.Signal.Types

    (source)

    Definitions

    dataHow : Type
    Totality: total
    Visibility: public export
    Constructors:
    SIG_BLOCK : How
    SIG_UNBLOCK : How
    SIG_SETMASK : How

    Hints:
    EqHow
    OrdHow
    ShowHow
    recordSignal : Type
    Totality: total
    Visibility: public export
    Constructor: 
    S : Bits32->Signal

    Projection: 
    .sig : Signal->Bits32

    Hints:
    EqSignal
    OrdSignal
    ShowSignal
    .sig : Signal->Bits32
    Totality: total
    Visibility: public export
    sig : Signal->Bits32
    Totality: total
    Visibility: public export
    howCode : How->Bits8
    Totality: total
    Visibility: public export
    SIGRTMIN : Signal
    Totality: total
    Visibility: public export
    SIGRTMAX : Signal
    Totality: total
    Visibility: public export
    SIGHUP : Signal
    Totality: total
    Visibility: public export
    SIGINT : Signal
    Totality: total
    Visibility: public export
    SIGQUIT : Signal
    Totality: total
    Visibility: public export
    SIGILL : Signal
    Totality: total
    Visibility: public export
    SIGTRAP : Signal
    Totality: total
    Visibility: public export
    SIGABRT : Signal
    Totality: total
    Visibility: public export
    SIGBUS : Signal
    Totality: total
    Visibility: public export
    SIGFPE : Signal
    Totality: total
    Visibility: public export
    SIGKILL : Signal
    Totality: total
    Visibility: public export
    SIGUSR1 : Signal
    Totality: total
    Visibility: public export
    SIGSEGV : Signal
    Totality: total
    Visibility: public export
    SIGUSR2 : Signal
    Totality: total
    Visibility: public export
    SIGPIPE : Signal
    Totality: total
    Visibility: public export
    SIGALRM : Signal
    Totality: total
    Visibility: public export
    SIGTERM : Signal
    Totality: total
    Visibility: public export
    SIGCHLD : Signal
    Totality: total
    Visibility: public export
    SIGCONT : Signal
    Totality: total
    Visibility: public export
    SIGSTOP : Signal
    Totality: total
    Visibility: public export
    SIGTSTP : Signal
    Totality: total
    Visibility: public export
    SIGTTIN : Signal
    Totality: total
    Visibility: public export
    SIGTTOU : Signal
    Totality: total
    Visibility: public export
    SIGURG : Signal
    Totality: total
    Visibility: public export
    SIGXCPU : Signal
    Totality: total
    Visibility: public export
    SIGXFSZ : Signal
    Totality: total
    Visibility: public export
    SIGVTALRM : Signal
    Totality: total
    Visibility: public export
    SIGPROF : Signal
    Totality: total
    Visibility: public export
    SIGPOLL : Signal
    Totality: total
    Visibility: public export
    SIGSYS : Signal
    Totality: total
    Visibility: public export
    sigName : SortedMapSignalString
    Totality: total
    Visibility: export
    siginfo_t_size : Bits32
    Totality: total
    Visibility: public export
    diff --git a/docs/posix/docs/docs/System.Posix.Signal.Types.src.html b/docs/posix/docs/docs/System.Posix.Signal.Types.src.html index a289e6e15..a38bdf521 100644 --- a/docs/posix/docs/docs/System.Posix.Signal.Types.src.html +++ b/docs/posix/docs/docs/System.Posix.Signal.Types.src.html @@ -313,7 +313,7 @@
    192 |     ]
    193 |
    194 | public export %inline
    -
    195 | siginfo_t_size : Nat
    +
    195 | siginfo_t_size : Bits32
    196 | siginfo_t_size = 128
    197 |
    diff --git a/docs/posix/docs/docs/System.Posix.Signal.html b/docs/posix/docs/docs/System.Posix.Signal.html index 949128bc5..ae48c8c27 100644 --- a/docs/posix/docs/docs/System.Posix.Signal.html +++ b/docs/posix/docs/docs/System.Posix.Signal.html @@ -61,4 +61,4 @@ -

    System.Posix.Signal

    (source)

    Reexports

    importpublic Data.C.Integer
    importpublic Data.C.Struct
    importpublic System.Posix.Errno
    importpublic System.Posix.Signal.Types

    Definitions

    get_siginfo_t_si_signo : AnyPtr->PrimIOBits32
    get_siginfo_t_si_code : AnyPtr->PrimIOCInt
    get_siginfo_t_si_pid : AnyPtr->PrimIOPidT
    get_siginfo_t_si_uid : AnyPtr->PrimIOUidT
    get_siginfo_t_si_status : AnyPtr->PrimIOCInt
    get_siginfo_t_si_value : AnyPtr->PrimIOCInt
    recordSigsetT : Type
      Wrapper around a pointer of a signal set (`sigset_t`).

    Totality: total
    Visibility: export
    Constructor: 
    S : AnyPtr->SigsetT

    Projection: 
    .ptr : SigsetT->AnyPtr

    Hint: 
    StructSigsetT
    emptySigset : HasIOio=>ioSigsetT
      Allocates a `sigset_t` with all signals cleared.

    This must be freed with `freeSigset`.

    Totality: total
    Visibility: export
    fullSigset : HasIOio=>ioSigsetT
      Allocates a `sigset_t` with all signals set.

    This must be freed with `freeSigset`.

    Totality: total
    Visibility: export
    sigaddset : HasIOio=>SigsetT->Signal->io ()
      Adds a signal to a `sigset_t`

    Totality: total
    Visibility: export
    sigdelset : HasIOio=>SigsetT->Signal->io ()
      Removes a signal from a `sigset_t`

    Totality: total
    Visibility: export
    sigismember : HasIOio=>SigsetT->Signal->ioBool
      Tests if a signal is a member of a `sigset_t`.

    Totality: total
    Visibility: export
    kill : ErrIOio=>PidT->Signal->io ()
      Sends a signal to a running process or a group of processes.

    Totality: total
    Visibility: export
    raise : HasIOio=>Signal->io ()
      Sends a signal to the calling thread.

    Totality: total
    Visibility: export
    sigqueue : ErrIOio=>PidT->Signal->CInt->io ()
      Sends a realtime signal plus data word to a running process.

    Note that `sig` must be in the range [SIGRTMIN, SIGRTMAX].

    Totality: total
    Visibility: export
    sigprocmask : HasIOio=>How->SigsetT->ioSigsetT
      Adjust the process signal mask according to the given `How`
    and signal set.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.
    See also `sigprocmask'` for a version that does not return
    the previous signal mask.

    Totality: total
    Visibility: export
    sigprocmask' : HasIOio=>How->SigsetT->io ()
      Like `sigprocmask` but does not allocate a pointer for the
    previous `sigset_t`.

    Totality: total
    Visibility: export
    siggetprocmask : HasIOio=>ioSigsetT
      Returns the current signal mask of the process.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.

    Totality: total
    Visibility: export
    sigpending : HasIOio=>ioSigsetT
      Returns the set of currently pending signals.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.

    Totality: total
    Visibility: export
    abort : HasIOio=>io ()
      Terminates the application by raising `SIGABRT` and dumps core.

    While `SIGABRT` can be handled with a signal handler, `abort` is
    still guaranteed successfully terminate the process.

    Totality: total
    Visibility: export
    pause : ErrIOio=>io ()
      Suspends the current thread until a non-blocked signal is encountered.

    Totality: total
    Visibility: export
    recordSiginfoT : Type
    Totality: total
    Visibility: export
    Constructor: 
    ST : AnyPtr->SiginfoT

    Projection: 
    .ptr : SiginfoT->AnyPtr

    Hints:
    SizeOfSiginfoT
    StructSiginfoT
    signal : HasIOio=>SiginfoT->ioSignal
    Totality: total
    Visibility: export
    code : HasIOio=>SiginfoT->ioCInt
    Totality: total
    Visibility: export
    pid : HasIOio=>SiginfoT->ioPidT
    Totality: total
    Visibility: export
    uid : HasIOio=>SiginfoT->ioUidT
    Totality: total
    Visibility: export
    status : HasIOio=>SiginfoT->ioCInt
    Totality: total
    Visibility: export
    value : HasIOio=>SiginfoT->ioCInt
    Totality: total
    Visibility: export
    sigsuspend : ErrIOio=>SigsetT->io ()
      Atomically blocks the signals in `set`, then
    pauses the thread (see `pause`) and restores the signal set
    afterwards.

    Totality: total
    Visibility: export
    sigwaitinfo : ErrIOio=>SigsetT->SiginfoT->io ()
      Synchronously awaits one of the signals in `set`.

    Note: Usually, the signals in `set` should first be blocked via
    `sigprocmask`.

    Totality: total
    Visibility: export
    sigwait : ErrIOio=>SigsetT->ioSignal
      Synchronously awaits one of the signals in `set`.

    This is like `sigwaitinfo` but with a simpler API.

    Totality: total
    Visibility: export
    sigtimedwait : ErrIOio=>SigsetT->SiginfoT->TimeT->NsecT->io ()
      Like `sigwaitinfo` but times out with `EAGAIN` after `sec` seconds and
    `nsec` nanoseconds.

    Totality: total
    Visibility: export
    +

    System.Posix.Signal

    (source)

    Reexports

    importpublic Data.C.Integer
    importpublic Data.C.Struct
    importpublic System.Posix.Errno
    importpublic System.Posix.Signal.Types

    Definitions

    get_siginfo_t_si_signo : AnyPtr->PrimIOBits32
    get_siginfo_t_si_code : AnyPtr->PrimIOCInt
    get_siginfo_t_si_pid : AnyPtr->PrimIOPidT
    get_siginfo_t_si_uid : AnyPtr->PrimIOUidT
    get_siginfo_t_si_status : AnyPtr->PrimIOCInt
    get_siginfo_t_si_value : AnyPtr->PrimIOCInt
    recordSigsetT : Type
      Wrapper around a pointer of a signal set (`sigset_t`).

    Totality: total
    Visibility: export
    Constructor: 
    S : AnyPtr->SigsetT

    Projection: 
    .ptr : SigsetT->AnyPtr

    Hint: 
    StructSigsetT
    emptySigset : HasIOio=>ioSigsetT
      Allocates a `sigset_t` with all signals cleared.

    This must be freed with `freeSigset`.

    Totality: total
    Visibility: export
    fullSigset : HasIOio=>ioSigsetT
      Allocates a `sigset_t` with all signals set.

    This must be freed with `freeSigset`.

    Totality: total
    Visibility: export
    sigaddset : HasIOio=>SigsetT->Signal->io ()
      Adds a signal to a `sigset_t`

    Totality: total
    Visibility: export
    sigdelset : HasIOio=>SigsetT->Signal->io ()
      Removes a signal from a `sigset_t`

    Totality: total
    Visibility: export
    sigismember : HasIOio=>SigsetT->Signal->ioBool
      Tests if a signal is a member of a `sigset_t`.

    Totality: total
    Visibility: export
    kill : ErrIOio=>PidT->Signal->io ()
      Sends a signal to a running process or a group of processes.

    Totality: total
    Visibility: export
    raise : HasIOio=>Signal->io ()
      Sends a signal to the calling thread.

    Totality: total
    Visibility: export
    sigqueue : ErrIOio=>PidT->Signal->CInt->io ()
      Sends a realtime signal plus data word to a running process.

    Note that `sig` must be in the range [SIGRTMIN, SIGRTMAX].

    Totality: total
    Visibility: export
    sigprocmask : HasIOio=>How->SigsetT->ioSigsetT
      Adjust the process signal mask according to the given `How`
    and signal set.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.
    See also `sigprocmask'` for a version that does not return
    the previous signal mask.

    Totality: total
    Visibility: export
    sigprocmask' : HasIOio=>How->SigsetT->io ()
      Like `sigprocmask` but does not allocate a pointer for the
    previous `sigset_t`.

    Totality: total
    Visibility: export
    siggetprocmask : HasIOio=>ioSigsetT
      Returns the current signal mask of the process.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.

    Totality: total
    Visibility: export
    sigpending : HasIOio=>ioSigsetT
      Returns the set of currently pending signals.

    Note: This allocates a new `sigset_t` pointer and returns the
    previously set signal mask. Client code is responsible to
    free the memory for this once it is no longer used.

    Totality: total
    Visibility: export
    abort : HasIOio=>io ()
      Terminates the application by raising `SIGABRT` and dumps core.

    While `SIGABRT` can be handled with a signal handler, `abort` is
    still guaranteed successfully terminate the process.

    Totality: total
    Visibility: export
    pause : ErrIOio=>io ()
      Suspends the current thread until a non-blocked signal is encountered.

    Totality: total
    Visibility: export
    recordSiginfoT : Type
    Totality: total
    Visibility: export
    Constructor: 
    ST : AnyPtr->SiginfoT

    Projection: 
    .ptr : SiginfoT->AnyPtr

    Hints:
    SizeOfSiginfoT
    StructSiginfoT
    signal : HasIOio=>SiginfoT->ioSignal
    Totality: total
    Visibility: export
    code : HasIOio=>SiginfoT->ioCInt
    Totality: total
    Visibility: export
    pid : HasIOio=>SiginfoT->ioPidT
    Totality: total
    Visibility: export
    uid : HasIOio=>SiginfoT->ioUidT
    Totality: total
    Visibility: export
    status : HasIOio=>SiginfoT->ioCInt
    Totality: total
    Visibility: export
    value : HasIOio=>SiginfoT->ioCInt
    Totality: total
    Visibility: export
    sigsuspend : ErrIOio=>SigsetT->io ()
      Atomically blocks the signals in `set`, then
    pauses the thread (see `pause`) and restores the signal set
    afterwards.

    Totality: total
    Visibility: export
    sigwaitinfo : ErrIOio=>SigsetT->SiginfoT->io ()
      Synchronously awaits one of the signals in `set`.

    Note: Usually, the signals in `set` should first be blocked via
    `sigprocmask`.

    Totality: total
    Visibility: export
    sigwait : ErrIOio=>SigsetT->ioSignal
      Synchronously awaits one of the signals in `set`.

    This is like `sigwaitinfo` but with a simpler API.

    Totality: total
    Visibility: export
    sigtimedwait : ErrIOio=>SigsetT->SiginfoT->TimeT->NsecT->io ()
      Like `sigwaitinfo` but times out with `EAGAIN` after `sec` seconds and
    `nsec` nanoseconds.

    Totality: total
    Visibility: export
    diff --git a/docs/posix/docs/docs/System.Posix.Time.Types.html b/docs/posix/docs/docs/System.Posix.Time.Types.html index 00e5a2b90..7ea14ff47 100644 --- a/docs/posix/docs/docs/System.Posix.Time.Types.html +++ b/docs/posix/docs/docs/System.Posix.Time.Types.html @@ -61,4 +61,4 @@ -

    System.Posix.Time.Types

    (source)

    Definitions

    timespec_size : Nat
    Totality: total
    Visibility: public export
    +

    System.Posix.Time.Types

    (source)

    Definitions

    timespec_size : Bits32
    Totality: total
    Visibility: public export
    diff --git a/docs/posix/docs/docs/System.Posix.Time.Types.src.html b/docs/posix/docs/docs/System.Posix.Time.Types.src.html index 5bbd4a0bc..00cdfb2ca 100644 --- a/docs/posix/docs/docs/System.Posix.Time.Types.src.html +++ b/docs/posix/docs/docs/System.Posix.Time.Types.src.html @@ -134,7 +134,7 @@
    13 |
    14 |
    15 | public export %inline
    -
    16 | timespec_size : Nat
    +
    16 | timespec_size : Bits32
    17 | timespec_size = 16
    18 |
    diff --git a/docs/posix/docs/docs/System.Posix.Time.html b/docs/posix/docs/docs/System.Posix.Time.html index ad4db0940..bdb7342ad 100644 --- a/docs/posix/docs/docs/System.Posix.Time.html +++ b/docs/posix/docs/docs/System.Posix.Time.html @@ -61,4 +61,4 @@ -

    System.Posix.Time

    (source)

    Reexports

    importpublic Data.C.Integer
    importpublic System.Posix.Time.Types
    importpublic System.Clock

    Definitions

    recordTimespec : Type
      A wrapper around a `struct timespec` pointer.

    Totality: total
    Visibility: export
    Constructor: 
    TS : AnyPtr->Timespec

    Projection: 
    .ptr : Timespec->AnyPtr

    Hints:
    SizeOfTimespec
    StructTimespec
    sec : HasIOio=>Timespec->ioTimeT
      Reads the `tv_sec` field of a `timespec` pointer.

    Totality: total
    Visibility: export
    nsec : HasIOio=>Timespec->ioNsecT
      Reads the `tv_nsec` field of a `timespec` pointer.

    Totality: total
    Visibility: export
    setSec : HasIOio=>Timespec->TimeT->io ()
      Sets the `tv_sec` field of a `timespec` pointer.

    Totality: total
    Visibility: export
    setNsec : HasIOio=>Timespec->NsecT->io ()
      Sets the `tv_nsec` field of a `timespec` pointer.

    Totality: total
    Visibility: export
    toClock : HasIOio=>Timespec->io (Clockt)
      Convert a `Timespec` to a `Clock t`

    Totality: total
    Visibility: export
    +

    System.Posix.Time

    (source)

    Reexports

    importpublic Data.C.Integer
    importpublic System.Posix.Time.Types
    importpublic System.Clock

    Definitions

    recordTimespec : Type
      A wrapper around a `struct timespec` pointer.

    Totality: total
    Visibility: export
    Constructor: 
    TS : AnyPtr->Timespec

    Projection: 
    .ptr : Timespec->AnyPtr

    Hints:
    SizeOfTimespec
    StructTimespec
    sec : HasIOio=>Timespec->ioTimeT
      Reads the `tv_sec` field of a `timespec` pointer.

    Totality: total
    Visibility: export
    nsec : HasIOio=>Timespec->ioNsecT
      Reads the `tv_nsec` field of a `timespec` pointer.

    Totality: total
    Visibility: export
    setSec : HasIOio=>Timespec->TimeT->io ()
      Sets the `tv_sec` field of a `timespec` pointer.

    Totality: total
    Visibility: export
    setNsec : HasIOio=>Timespec->NsecT->io ()
      Sets the `tv_nsec` field of a `timespec` pointer.

    Totality: total
    Visibility: export
    toClock : HasIOio=>Timespec->io (Clockt)
      Convert a `Timespec` to a `Clock t`

    Totality: total
    Visibility: export
    diff --git a/docs/posix/docs/docs/System.Posix.Timer.Types.html b/docs/posix/docs/docs/System.Posix.Timer.Types.html index 81b4c0a74..d25de9ca6 100644 --- a/docs/posix/docs/docs/System.Posix.Timer.Types.html +++ b/docs/posix/docs/docs/System.Posix.Timer.Types.html @@ -61,4 +61,4 @@ -

    System.Posix.Timer.Types

    (source)

    Definitions

    dataWhich : Type
    Totality: total
    Visibility: public export
    Constructors:
    ITIMER_REAL : Which
    ITIMER_VIRTUAL : Which
    ITIMER_PROF : Which

    Hints:
    EqWhich
    FiniteWhich
    OrdWhich
    ShowWhich
    dataClockId : Type
    Totality: total
    Visibility: public export
    Constructors:
    CLOCK_REALTIME : ClockId
    CLOCK_MONOTONIC : ClockId
    CLOCK_PROCESS_CPUTIME_ID : ClockId
    CLOCK_THREAD_CPUTIME_ID : ClockId

    Hints:
    EqClockId
    FiniteClockId
    OrdClockId
    ShowClockId
    whichCode : Which->Bits8
    Totality: total
    Visibility: public export
    clockCode : ClockId->Bits8
    Totality: total
    Visibility: public export
    timeval_size : Nat
    Totality: total
    Visibility: public export
    itimerval_size : Nat
    Totality: total
    Visibility: public export
    itimerspec_size : Nat
    Totality: total
    Visibility: public export
    CLOCKS_PER_SEC : ClockT
    Totality: total
    Visibility: public export
    +

    System.Posix.Timer.Types

    (source)

    Definitions

    dataWhich : Type
    Totality: total
    Visibility: public export
    Constructors:
    ITIMER_REAL : Which
    ITIMER_VIRTUAL : Which
    ITIMER_PROF : Which

    Hints:
    EqWhich
    FiniteWhich
    OrdWhich
    ShowWhich
    dataClockId : Type
    Totality: total
    Visibility: public export
    Constructors:
    CLOCK_REALTIME : ClockId
    CLOCK_MONOTONIC : ClockId
    CLOCK_PROCESS_CPUTIME_ID : ClockId
    CLOCK_THREAD_CPUTIME_ID : ClockId

    Hints:
    EqClockId
    FiniteClockId
    OrdClockId
    ShowClockId
    whichCode : Which->Bits8
    Totality: total
    Visibility: public export
    clockCode : ClockId->Bits8
    Totality: total
    Visibility: public export
    timeval_size : Bits32
    Totality: total
    Visibility: public export
    itimerval_size : Bits32
    Totality: total
    Visibility: public export
    itimerspec_size : Bits32
    Totality: total
    Visibility: public export
    CLOCKS_PER_SEC : ClockT
    Totality: total
    Visibility: public export
    diff --git a/docs/posix/docs/docs/System.Posix.Timer.Types.src.html b/docs/posix/docs/docs/System.Posix.Timer.Types.src.html index b4fac763d..4bc44f2fb 100644 --- a/docs/posix/docs/docs/System.Posix.Timer.Types.src.html +++ b/docs/posix/docs/docs/System.Posix.Timer.Types.src.html @@ -165,15 +165,15 @@
    44 | clockCode CLOCK_THREAD_CPUTIME_ID = 3
    45 |
    46 | public export %inline
    -
    47 | timeval_size : Nat
    +
    47 | timeval_size : Bits32
    48 | timeval_size = 16
    49 |
    50 | public export %inline
    -
    51 | itimerval_size : Nat
    +
    51 | itimerval_size : Bits32
    52 | itimerval_size = 32
    53 |
    54 | public export %inline
    -
    55 | itimerspec_size : Nat
    +
    55 | itimerspec_size : Bits32
    56 | itimerspec_size = 32
    57 |
    58 | public export %inline
    diff --git a/docs/posix/docs/docs/System.Posix.Timer.html b/docs/posix/docs/docs/System.Posix.Timer.html index 98f6d7e3a..7cc80118c 100644 --- a/docs/posix/docs/docs/System.Posix.Timer.html +++ b/docs/posix/docs/docs/System.Posix.Timer.html @@ -61,4 +61,4 @@ -

    System.Posix.Timer

    (source)

    Reexports

    importpublic Data.C.Integer
    importpublic System.Posix.Errno
    importpublic System.Posix.Timer.Types
    importpublic System.Posix.Time

    Definitions

    recordTimeval : Type
    Totality: total
    Visibility: export
    Constructor: 
    TV : AnyPtr->Timeval

    Projection: 
    .ptr : Timeval->AnyPtr

    Hints:
    SizeOfTimeval
    StructTimeval
    sec : HasIOio=>Timeval->ioTimeT
    Totality: total
    Visibility: export
    usec : HasIOio=>Timeval->ioSusecondsT
    Totality: total
    Visibility: export
    setsec : HasIOio=>Timeval->TimeT->io ()
    Totality: total
    Visibility: export
    setusec : HasIOio=>Timeval->SusecondsT->io ()
    Totality: total
    Visibility: export
    timeval : HasIOio=>TimeT->SusecondsT->ioTimeval
    Totality: total
    Visibility: export
    recordItimerval : Type
    Totality: total
    Visibility: export
    Constructor: 
    ITV : AnyPtr->Itimerval

    Projection: 
    .ptr : Itimerval->AnyPtr

    Hints:
    SizeOfItimerval
    StructItimerval
    interval : HasIOio=>Itimerval->ioTimeval
    Totality: total
    Visibility: export
    value : HasIOio=>Itimerval->ioTimeval
    Totality: total
    Visibility: export
    setinterval : HasIOio=>Itimerval->Timeval->io ()
    Totality: total
    Visibility: export
    setvalue : HasIOio=>Itimerval->Timeval->io ()
    Totality: total
    Visibility: export
    itimerval : HasIOio=>TimeT->SusecondsT->TimeT->SusecondsT->ioItimerval
      Creates and sets the fields of a `Itimerval` pointer.

    The allocated memory must be freed via `freeStruct`.

    Totality: total
    Visibility: export
    get_itimerspec_it_interval : AnyPtr->PrimIOAnyPtr
    get_itimerspec_it_value : AnyPtr->PrimIOAnyPtr
    set_itimerspec_it_interval : AnyPtr->AnyPtr->PrimIO ()
    set_itimerspec_it_value : AnyPtr->AnyPtr->PrimIO ()
    recordItimerspec : Type
    Totality: total
    Visibility: export
    Constructor: 
    ITS : AnyPtr->Itimerspec

    Projection: 
    .ptr : Itimerspec->AnyPtr

    Hints:
    SizeOfItimerspec
    StructItimerspec
    interval : HasIOio=>Itimerspec->ioTimespec
    Totality: total
    Visibility: export
    value : HasIOio=>Itimerspec->ioTimespec
    Totality: total
    Visibility: export
    setinterval : HasIOio=>Itimerspec->Timespec->io ()
    Totality: total
    Visibility: export
    setvalue : HasIOio=>Itimerspec->Timespec->io ()
    Totality: total
    Visibility: export
    itimerspec : HasIOio=>TimeT->NsecT->TimeT->NsecT->ioItimerspec
      Creates and sets the fields of a `Itimerspec` pointer.

    The allocated memory must be freed via `freeStruct`.

    Totality: total
    Visibility: export
    clock : HasIOio=>ioClockT
      Returns an approximation of processor time used by the program.

    Type `ClockT` measures time with a granularity of
    `CLOCKS_PER_SEC`.

    Totality: total
    Visibility: export
    setitimer : ErrIOio=>Which->Itimerval->Itimerval->io ()
      This sets `new` as the new timer and places the current timer for
    `Which` in `old`.

    Depending on `Which`, the timer will use a different clock and
    will (possibly repeatedly) raise a different kind signal:

    * ITIMER_REAL: Counts down in real (i.e. wall clock) time
    and raises SIGALRM
    * ITIMER_VIRTUAL: Counts down in process virtual time
    (i.e. user-mode CPU time) and raises SIGVTALRM
    * ITIMER_PROF: Counts down in process time
    (i.e. the sum of kernel-mode and user-mode CPU time) and raises SIGPROF

    Totality: total
    Visibility: export
    setitimer' : ErrIOio=>Which->Itimerval->io ()
      Like `setitimer` but does not store the old timer in a pointer.

    Totality: total
    Visibility: export
    getitimer : ErrIOio=>Which->Itimerval->io ()
      Writes the currently set timer for `Which` into `old.

    Totality: total
    Visibility: export
    alarm : HasIOio=>UInt->ioUInt
      A very basic version of `setitimer` that raises `SIGALRM`
    after the given number of seconds.

    The returned value is the remaining number of seconds on any
    previously set timer. The timer can be disabled by setting
    this to zero.

    Totality: total
    Visibility: export
    clockGetTime : ErrIOio=>ClockId->Timespec->io ()
      Writes the current time for the given clock into the
    `Timespec` pointer.

    Totality: total
    Visibility: export
    clockGetRes : ErrIOio=>ClockId->Timespec->io ()
      Writes the resolution for the given clock into the
    `Timespec` pointer.

    Totality: total
    Visibility: export
    nanosleep : ErrIOio=>Timespec->Timespec->io ()
      High resolution sleeping for the duration given in `dur`.

    In case this is interrupted by a signal, it returns `Left EINTR`
    and writes the remaining duration into `rem`.

    Totality: total
    Visibility: export
    nanosleep' : ErrIOio=>Timespec->io ()
      Like `nanosleep` but without the capability of keeping track of the
    remaining duration in case of a signal interrupt.

    Totality: total
    Visibility: export
    clockNanosleep : ErrIOio=>ClockId->Timespec->Timespec->io ()
      Like `nanosleep` but allows us to specify the system clock to use.

    Totality: total
    Visibility: export
    clockNanosleepAbs : ErrIOio=>ClockId->Timespec->io ()
      Like `clockNanosleep` but uses an absolute time value instead of a duration.

    This is useful to get exact wakeup times even in case of lots of signal
    interrupts.

    Totality: total
    Visibility: export
    +

    System.Posix.Timer

    (source)

    Reexports

    importpublic Data.C.Integer
    importpublic System.Posix.Errno
    importpublic System.Posix.Timer.Types
    importpublic System.Posix.Time

    Definitions

    recordTimeval : Type
    Totality: total
    Visibility: export
    Constructor: 
    TV : AnyPtr->Timeval

    Projection: 
    .ptr : Timeval->AnyPtr

    Hints:
    SizeOfTimeval
    StructTimeval
    sec : HasIOio=>Timeval->ioTimeT
    Totality: total
    Visibility: export
    usec : HasIOio=>Timeval->ioSusecondsT
    Totality: total
    Visibility: export
    setsec : HasIOio=>Timeval->TimeT->io ()
    Totality: total
    Visibility: export
    setusec : HasIOio=>Timeval->SusecondsT->io ()
    Totality: total
    Visibility: export
    timeval : HasIOio=>TimeT->SusecondsT->ioTimeval
    Totality: total
    Visibility: export
    recordItimerval : Type
    Totality: total
    Visibility: export
    Constructor: 
    ITV : AnyPtr->Itimerval

    Projection: 
    .ptr : Itimerval->AnyPtr

    Hints:
    SizeOfItimerval
    StructItimerval
    interval : HasIOio=>Itimerval->ioTimeval
    Totality: total
    Visibility: export
    value : HasIOio=>Itimerval->ioTimeval
    Totality: total
    Visibility: export
    setinterval : HasIOio=>Itimerval->Timeval->io ()
    Totality: total
    Visibility: export
    setvalue : HasIOio=>Itimerval->Timeval->io ()
    Totality: total
    Visibility: export
    itimerval : HasIOio=>TimeT->SusecondsT->TimeT->SusecondsT->ioItimerval
      Creates and sets the fields of a `Itimerval` pointer.

    The allocated memory must be freed via `freeStruct`.

    Totality: total
    Visibility: export
    get_itimerspec_it_interval : AnyPtr->PrimIOAnyPtr
    get_itimerspec_it_value : AnyPtr->PrimIOAnyPtr
    set_itimerspec_it_interval : AnyPtr->AnyPtr->PrimIO ()
    set_itimerspec_it_value : AnyPtr->AnyPtr->PrimIO ()
    recordItimerspec : Type
    Totality: total
    Visibility: export
    Constructor: 
    ITS : AnyPtr->Itimerspec

    Projection: 
    .ptr : Itimerspec->AnyPtr

    Hints:
    SizeOfItimerspec
    StructItimerspec
    interval : HasIOio=>Itimerspec->ioTimespec
    Totality: total
    Visibility: export
    value : HasIOio=>Itimerspec->ioTimespec
    Totality: total
    Visibility: export
    setinterval : HasIOio=>Itimerspec->Timespec->io ()
    Totality: total
    Visibility: export
    setvalue : HasIOio=>Itimerspec->Timespec->io ()
    Totality: total
    Visibility: export
    itimerspec : HasIOio=>TimeT->NsecT->TimeT->NsecT->ioItimerspec
      Creates and sets the fields of a `Itimerspec` pointer.

    The allocated memory must be freed via `freeStruct`.

    Totality: total
    Visibility: export
    clock : HasIOio=>ioClockT
      Returns an approximation of processor time used by the program.

    Type `ClockT` measures time with a granularity of
    `CLOCKS_PER_SEC`.

    Totality: total
    Visibility: export
    setitimer : ErrIOio=>Which->Itimerval->Itimerval->io ()
      This sets `new` as the new timer and places the current timer for
    `Which` in `old`.

    Depending on `Which`, the timer will use a different clock and
    will (possibly repeatedly) raise a different kind signal:

    * ITIMER_REAL: Counts down in real (i.e. wall clock) time
    and raises SIGALRM
    * ITIMER_VIRTUAL: Counts down in process virtual time
    (i.e. user-mode CPU time) and raises SIGVTALRM
    * ITIMER_PROF: Counts down in process time
    (i.e. the sum of kernel-mode and user-mode CPU time) and raises SIGPROF

    Totality: total
    Visibility: export
    setitimer' : ErrIOio=>Which->Itimerval->io ()
      Like `setitimer` but does not store the old timer in a pointer.

    Totality: total
    Visibility: export
    getitimer : ErrIOio=>Which->Itimerval->io ()
      Writes the currently set timer for `Which` into `old.

    Totality: total
    Visibility: export
    alarm : HasIOio=>UInt->ioUInt
      A very basic version of `setitimer` that raises `SIGALRM`
    after the given number of seconds.

    The returned value is the remaining number of seconds on any
    previously set timer. The timer can be disabled by setting
    this to zero.

    Totality: total
    Visibility: export
    clockGetTime : ErrIOio=>ClockId->Timespec->io ()
      Writes the current time for the given clock into the
    `Timespec` pointer.

    Totality: total
    Visibility: export
    clockGetRes : ErrIOio=>ClockId->Timespec->io ()
      Writes the resolution for the given clock into the
    `Timespec` pointer.

    Totality: total
    Visibility: export
    nanosleep : ErrIOio=>Timespec->Timespec->io ()
      High resolution sleeping for the duration given in `dur`.

    In case this is interrupted by a signal, it returns `Left EINTR`
    and writes the remaining duration into `rem`.

    Totality: total
    Visibility: export
    nanosleep' : ErrIOio=>Timespec->io ()
      Like `nanosleep` but without the capability of keeping track of the
    remaining duration in case of a signal interrupt.

    Totality: total
    Visibility: export
    clockNanosleep : ErrIOio=>ClockId->Timespec->Timespec->io ()
      Like `nanosleep` but allows us to specify the system clock to use.

    Totality: total
    Visibility: export
    clockNanosleepAbs : ErrIOio=>ClockId->Timespec->io ()
      Like `clockNanosleep` but uses an absolute time value instead of a duration.

    This is useful to get exact wakeup times even in case of lots of signal
    interrupts.

    Totality: total
    Visibility: export
    diff --git a/docs/profiler/docs/docs/Profile.Runner.src.html b/docs/profiler/docs/docs/Profile.Runner.src.html index cef8dceee..831e3b1ce 100644 --- a/docs/profiler/docs/docs/Profile.Runner.src.html +++ b/docs/profiler/docs/docs/Profile.Runner.src.html @@ -179,7 +179,7 @@
     58 | -- runs a benchmark once with the given number of
     59 | -- interations
     60 | run : Pos -> Benchmarkable err -> IO (Either err Measured)
    -
     61 | run p (MkBenchmarkable alloc clean go) = do
    +
     61 | run p (MkBenchmarkable alloc clean go cpuonly) = do
     62 |   env      <- alloc p
     63 |   start    <- clockTime Monotonic
     64 |   startCPU <- clockTime Process
    @@ -189,137 +189,140 @@
     68 |   clean p env
     69 |
     70 |   let tot  := timeDelta start stop
    -
     71 |       runs := the Runs $ MkScalar $ cast p.val
    -
     72 |       meas :=
    -
     73 |         MkMeasured
    -
     74 |           { iterations = runs
    -
     75 |           , startTime  = start
    -
     76 |           , stopTime   = stop
    -
     77 |           , totalTime  = tot
    -
     78 |           , avrgTime   = tot `div` runs
    -
     79 |           , cpuTime    = timeDelta stopCPU startCPU
    -
     80 |           }
    -
     81 |   case res of
    -
     82 |     Left err => pure (Left err)
    -
     83 |     Right v  => pure (Right meas)
    -
     84 |
    -
     85 | -- 30 ms
    -
     86 | threshold : AttoSeconds
    -
     87 | threshold = fromMilliSeconds 30
    -
     88 |
    -
     89 | -- 300 ms
    -
     90 | threshold10 : AttoSeconds
    -
     91 | threshold10 = fromMilliSeconds 300
    -
     92 |
    -
     93 | ||| Run a benchmark with an increasing number of
    -
     94 | ||| iterations until at least the given time limit
    -
     95 | ||| has passed.
    -
     96 | export
    -
     97 | runBenchmark : (timeLimit : AttoSeconds)
    -
     98 |              -> Benchmarkable err
    -
     99 |              -> IO (Either err $ List Measured)
    -
    100 | runBenchmark timeLimit b = do
    -
    101 |   startTime <- clockTime Monotonic
    -
    102 |   fromPrim $ go Lin runs startTime 0 0
    -
    103 |
    -
    104 |   where
    -
    105 |     go :
    -
    106 |          SnocList Measured
    -
    107 |       -> List Pos
    -
    108 |       -> (startTime     : Clock Monotonic)
    -
    109 |       -> (overThreshold : AttoSeconds)
    -
    110 |       -> (nruns         : Nat)
    -
    111 |       -> PrimIO (Either err $ List Measured)
    -
    112 |     go sr []        st ot nr w = MkIORes (Right $ sr <>> Nil) w
    -
    113 |     go sr (p :: ps) st ot nr w =
    -
    114 |       let MkIORes (Right r) w2 := toPrim (run p b) w
    -
    115 |             | MkIORes (Left err) w2 => MkIORes (Left err) w2
    -
    116 |           diffThreshold := max 0 $ r.totalTime `minus` threshold
    -
    117 |           overThreshold := ot `plus` diffThreshold
    -
    118 |           tot           := fromClock $ timeDifference r.stopTime st
    -
    119 |           done          :=
    -
    120 |             tot           >= timeLimit   &&
    -
    121 |             overThreshold >= threshold10 &&
    -
    122 |             nr            >= 4
    -
    123 |
    -
    124 |        in if done then MkIORes (Right (sr <>> [r])) w2
    -
    125 |           else go (sr :< r) ps st overThreshold (S nr) w2
    +
     71 |       cpu  := timeDelta startCPU stopCPU
    +
     72 |       runs := the Runs $ MkScalar $ cast p.val
    +
     73 |       meas :=
    +
     74 |         MkMeasured
    +
     75 |           { iterations = runs
    +
     76 |           , startTime  = start
    +
     77 |           , stopTime   = stop
    +
     78 |           , totalTime  = tot
    +
     79 |           , avrgTime   = tot `div` runs
    +
     80 |           , cpuTime    = cpu
    +
     81 |           , avrgCPU    = cpu `div` runs
    +
     82 |           , cpuOnly    = cpuonly
    +
     83 |           }
    +
     84 |   case res of
    +
     85 |     Left err => pure (Left err)
    +
     86 |     Right v  => pure (Right meas)
    +
     87 |
    +
     88 | -- 30 ms
    +
     89 | threshold : AttoSeconds
    +
     90 | threshold = fromMilliSeconds 30
    +
     91 |
    +
     92 | -- 300 ms
    +
     93 | threshold10 : AttoSeconds
    +
     94 | threshold10 = fromMilliSeconds 300
    +
     95 |
    +
     96 | ||| Run a benchmark with an increasing number of
    +
     97 | ||| iterations until at least the given time limit
    +
     98 | ||| has passed.
    +
     99 | export
    +
    100 | runBenchmark : (timeLimit : AttoSeconds)
    +
    101 |              -> Benchmarkable err
    +
    102 |              -> IO (Either err $ List Measured)
    +
    103 | runBenchmark timeLimit b = do
    +
    104 |   startTime <- clockTime Monotonic
    +
    105 |   fromPrim $ go Lin runs startTime 0 0
    +
    106 |
    +
    107 |   where
    +
    108 |     go :
    +
    109 |          SnocList Measured
    +
    110 |       -> List Pos
    +
    111 |       -> (startTime     : Clock Monotonic)
    +
    112 |       -> (overThreshold : AttoSeconds)
    +
    113 |       -> (nruns         : Nat)
    +
    114 |       -> PrimIO (Either err $ List Measured)
    +
    115 |     go sr []        st ot nr w = MkIORes (Right $ sr <>> Nil) w
    +
    116 |     go sr (p :: ps) st ot nr w =
    +
    117 |       let MkIORes (Right r) w2 := toPrim (run p b) w
    +
    118 |             | MkIORes (Left err) w2 => MkIORes (Left err) w2
    +
    119 |           diffThreshold := max 0 $ r.totalTime `minus` threshold
    +
    120 |           overThreshold := ot `plus` diffThreshold
    +
    121 |           tot           := fromClock $ timeDifference r.stopTime st
    +
    122 |           done          :=
    +
    123 |             tot           >= timeLimit   &&
    +
    124 |             overThreshold >= threshold10 &&
    +
    125 |             nr            >= 4
    126 |
    -
    127 | detailStats : Nat -> String -> Stats -> String
    -
    128 | detailStats k name stats = """
    -
    129 |   # \{show k}: \{name}
    -
    130 |     time per run : \{printAtto stats.slope}
    -
    131 |     mean         : \{printAtto stats.mean}
    -
    132 |     r2           : \{show stats.r2}
    -
    133 |
    -
    134 |
    -
    135 |   """
    +
    127 |        in if done then MkIORes (Right (sr <>> [r])) w2
    +
    128 |           else go (sr :< r) ps st overThreshold (S nr) w2
    +
    129 |
    +
    130 | detailStats : Nat -> String -> Stats -> String
    +
    131 | detailStats k name stats = """
    +
    132 |   # \{show k}: \{name}
    +
    133 |     time per run : \{printAtto stats.slope}
    +
    134 |     mean         : \{printAtto stats.mean}
    +
    135 |     r2           : \{show stats.r2}
    136 |
    -
    137 | tableStats : Nat -> String -> Stats -> String
    -
    138 | tableStats k name stats =
    -
    139 |   let nm   := padRight 50 ' ' name
    -
    140 |       tpr  := padLeft 10 ' ' $ printAtto stats.slope
    -
    141 |       mean := padLeft 10 ' ' $ printAtto stats.mean
    -
    142 |       r2   := pack $ take 5 $ unpack $ show stats.r2
    -
    143 |    in "\{nm} \{tpr} \{mean} \{r2}"
    -
    144 |
    -
    145 | showStats : Format -> Nat -> String -> Stats -> String
    -
    146 | showStats Table   = tableStats
    -
    147 | showStats Details = detailStats
    -
    148 |
    -
    149 | runAndPrint :
    -
    150 |      Format
    -
    151 |   -> Nat
    -
    152 |   -> String
    -
    153 |   -> Benchmarkable err
    -
    154 |   -> IO (Either err ())
    -
    155 | runAndPrint format k name b = do
    -
    156 |   Right (h :: t) <- runBenchmark (fromSeconds 1) b
    -
    157 |     | Right [] => pure (Right ())
    -
    158 |     | Left err => pure (Left err)
    -
    159 |
    -
    160 |   putStrLn (showStats format k name $ regr (h :: fromList t))
    -
    161 |   pure (Right ())
    +
    137 |
    +
    138 |   """
    +
    139 |
    +
    140 | tableStats : Nat -> String -> Stats -> String
    +
    141 | tableStats k name stats =
    +
    142 |   let nm   := padRight 50 ' ' name
    +
    143 |       tpr  := padLeft 10 ' ' $ printAtto stats.slope
    +
    144 |       mean := padLeft 10 ' ' $ printAtto stats.mean
    +
    145 |       r2   := pack $ take 5 $ unpack $ show stats.r2
    +
    146 |    in "\{nm} \{tpr} \{mean} \{r2}"
    +
    147 |
    +
    148 | showStats : Format -> Nat -> String -> Stats -> String
    +
    149 | showStats Table   = tableStats
    +
    150 | showStats Details = detailStats
    +
    151 |
    +
    152 | runAndPrint :
    +
    153 |      Format
    +
    154 |   -> Nat
    +
    155 |   -> String
    +
    156 |   -> Benchmarkable err
    +
    157 |   -> IO (Either err ())
    +
    158 | runAndPrint format k name b = do
    +
    159 |   Right (h :: t) <- runBenchmark (fromSeconds 1) b
    +
    160 |     | Right [] => pure (Right ())
    +
    161 |     | Left err => pure (Left err)
    162 |
    -
    163 | for :
    -
    164 |      (String -> Bool)
    -
    165 |   -> Benchmark err
    -
    166 |   -> (Nat -> String -> Benchmarkable err -> IO (Either err ()))
    -
    167 |   -> IO (Either err ())
    -
    168 | for select b f = ignore <$> fromPrim (go 1 "" b)
    -
    169 |
    -
    170 |   where
    -
    171 |     many : Nat -> String -> List (Benchmark err) -> PrimIO (Either err Nat)
    +
    163 |   putStrLn (showStats format k name $ regr (h :: fromList t))
    +
    164 |   pure (Right ())
    +
    165 |
    +
    166 | for :
    +
    167 |      (String -> Bool)
    +
    168 |   -> Benchmark err
    +
    169 |   -> (Nat -> String -> Benchmarkable err -> IO (Either err ()))
    +
    170 |   -> IO (Either err ())
    +
    171 | for select b f = ignore <$> fromPrim (go 1 "" b)
    172 |
    -
    173 |     go : Nat -> String -> Benchmark err -> PrimIO (Either err Nat)
    -
    174 |     go k s (Single name bench) w =
    -
    175 |       let s' := addPrefix s name
    -
    176 |        in if select s'
    -
    177 |             then
    -
    178 |               let MkIORes (Right _) w2 := toPrim (f k s' bench) w
    -
    179 |                     | MkIORes (Left err) w2 => MkIORes (Left err) w2
    -
    180 |                in MkIORes (Right $ S k) w2
    -
    181 |             else MkIORes (Right k) w
    -
    182 |     go k s (Group name benchs) w = many k (addPrefix s name) benchs w
    -
    183 |
    -
    184 |     many k s [] w        = MkIORes (Right k) w
    -
    185 |     many k s (b :: bs) w =
    -
    186 |       let MkIORes (Right k2) w2 = go k s b w
    -
    187 |             | MkIORes (Left err) w2 => MkIORes (Left err) w2
    -
    188 |        in many k2 s bs w2
    -
    189 |
    -
    190 | export
    -
    191 | runDefault :
    -
    192 |      (String -> Bool)
    -
    193 |   -> Format
    -
    194 |   -> (err -> String)
    -
    195 |   -> Benchmark err
    -
    196 |   -> IO ()
    -
    197 | runDefault select format showErr b = do
    -
    198 |   Left err <- for select b (runAndPrint format)
    -
    199 |     | Right () => pure ()
    -
    200 |   putStrLn (showErr err)
    -
    201 |
    +
    173 |   where
    +
    174 |     many : Nat -> String -> List (Benchmark err) -> PrimIO (Either err Nat)
    +
    175 |
    +
    176 |     go : Nat -> String -> Benchmark err -> PrimIO (Either err Nat)
    +
    177 |     go k s (Single name bench) w =
    +
    178 |       let s' := addPrefix s name
    +
    179 |        in if select s'
    +
    180 |             then
    +
    181 |               let MkIORes (Right _) w2 := toPrim (f k s' bench) w
    +
    182 |                     | MkIORes (Left err) w2 => MkIORes (Left err) w2
    +
    183 |                in MkIORes (Right $ S k) w2
    +
    184 |             else MkIORes (Right k) w
    +
    185 |     go k s (Group name benchs) w = many k (addPrefix s name) benchs w
    +
    186 |
    +
    187 |     many k s [] w        = MkIORes (Right k) w
    +
    188 |     many k s (b :: bs) w =
    +
    189 |       let MkIORes (Right k2) w2 = go k s b w
    +
    190 |             | MkIORes (Left err) w2 => MkIORes (Left err) w2
    +
    191 |        in many k2 s bs w2
    +
    192 |
    +
    193 | export
    +
    194 | runDefault :
    +
    195 |      (String -> Bool)
    +
    196 |   -> Format
    +
    197 |   -> (err -> String)
    +
    198 |   -> Benchmark err
    +
    199 |   -> IO ()
    +
    200 | runDefault select format showErr b = do
    +
    201 |   Left err <- for select b (runAndPrint format)
    +
    202 |     | Right () => pure ()
    +
    203 |   putStrLn (showErr err)
    +
    204 |
    diff --git a/docs/profiler/docs/docs/Profile.Statistics.src.html b/docs/profiler/docs/docs/Profile.Statistics.src.html index a5d701fbb..27e6f4955 100644 --- a/docs/profiler/docs/docs/Profile.Statistics.src.html +++ b/docs/profiler/docs/docs/Profile.Statistics.src.html @@ -146,10 +146,10 @@
    25 | regr : (ms : Vect (S n) Measured) -> Stats
    26 | regr ms =
    27 |   let iters      := map iterations ms
    -
    28 |       attos      := map totalTime ms
    +
    28 |       attos      := map tot ms
    29 |       mean_iter  := mean iters
    30 |       mean_attos := mean attos
    -
    31 |       mean_avrg  := mean (map avrgTime ms)
    +
    31 |       mean_avrg  := mean (map avrg ms)
    32 |       ss_iter    :=
    33 |         scalarSum (map square iters) `minus`
    34 |         mult (posLength ms) (square mean_iter)
    diff --git a/docs/profiler/docs/docs/Profile.Types.html b/docs/profiler/docs/docs/Profile.Types.html index 4a22bd79e..0669a2ad6 100644 --- a/docs/profiler/docs/docs/Profile.Types.html +++ b/docs/profiler/docs/docs/Profile.Types.html @@ -61,4 +61,4 @@ -

    Profile.Types

    (source)

    Reexports

    importpublic Data.DPair
    importpublic Data.Nat
    importpublic Data.Vect
    importpublic System.Clock

    Definitions

    dataFormat : Type
    Totality: total
    Visibility: public export
    Constructors:
    Table : Format
    Details : Format
    recordPos : Type
      A strictly positive natural number.

    Totality: total
    Visibility: public export
    Constructor: 
    MkPos : (val : Nat) -> {auto0_ : IsSuccval} ->Pos

    Projections:
    0.prf : ({rec:0} : Pos) ->IsSucc (val{rec:0})
    .val : Pos->Nat

    Hints:
    EqPos
    OrdPos
    .val : Pos->Nat
    Totality: total
    Visibility: public export
    val : Pos->Nat
    Totality: total
    Visibility: public export
    0.prf : ({rec:0} : Pos) ->IsSucc (val{rec:0})
    Totality: total
    Visibility: public export
    0prf : ({rec:0} : Pos) ->IsSucc (val{rec:0})
    Totality: total
    Visibility: public export
    fromInteger : (n : Integer) -> {auto0_ : IsSucc (castn)} ->Pos
    Totality: total
    Visibility: public export
    recordBenchmarkable : Type->Type
      A benchmarkable computation, which can fail with error `err`.

    Totality: total
    Visibility: public export
    Constructor: 
    MkBenchmarkable : (Pos->IOenvironment) -> (Pos->environment->IO ()) -> (environment->Pos->IO (Eithererrresult)) ->Benchmarkableerr

    Projections:
    .allocEnv : ({rec:0} : Benchmarkableerr) ->Pos->IO (environment{rec:0})
      Allocates an environment for running the benchmark
    the given number of times.
    .cleanEnv : ({rec:0} : Benchmarkableerr) ->Pos->environment{rec:0}->IO ()
      Cleanup the environment after running the benchmark
    the given number of times.
    0.environment : Benchmarkableerr->Type
    0.result : Benchmarkableerr->Type
    .runRepeatedly : ({rec:0} : Benchmarkableerr) ->environment{rec:0}->Pos->IO (Eithererr (result{rec:0}))
      Run a benchmurk in the given environment for
    the given number of times.
    0.environment : Benchmarkableerr->Type
    Totality: total
    Visibility: public export
    0environment : Benchmarkableerr->Type
    Totality: total
    Visibility: public export
    0.result : Benchmarkableerr->Type
    Totality: total
    Visibility: public export
    0result : Benchmarkableerr->Type
    Totality: total
    Visibility: public export
    .allocEnv : ({rec:0} : Benchmarkableerr) ->Pos->IO (environment{rec:0})
      Allocates an environment for running the benchmark
    the given number of times.

    Totality: total
    Visibility: public export
    allocEnv : ({rec:0} : Benchmarkableerr) ->Pos->IO (environment{rec:0})
      Allocates an environment for running the benchmark
    the given number of times.

    Totality: total
    Visibility: public export
    .cleanEnv : ({rec:0} : Benchmarkableerr) ->Pos->environment{rec:0}->IO ()
      Cleanup the environment after running the benchmark
    the given number of times.

    Totality: total
    Visibility: public export
    cleanEnv : ({rec:0} : Benchmarkableerr) ->Pos->environment{rec:0}->IO ()
      Cleanup the environment after running the benchmark
    the given number of times.

    Totality: total
    Visibility: public export
    .runRepeatedly : ({rec:0} : Benchmarkableerr) ->environment{rec:0}->Pos->IO (Eithererr (result{rec:0}))
      Run a benchmurk in the given environment for
    the given number of times.

    Totality: total
    Visibility: public export
    runRepeatedly : ({rec:0} : Benchmarkableerr) ->environment{rec:0}->Pos->IO (Eithererr (result{rec:0}))
      Run a benchmurk in the given environment for
    the given number of times.

    Totality: total
    Visibility: public export
    repeatedly : Pos->IO (Eithererr ()) ->IO (Eithererr ())
      Tail-recursively runs an IO action the given number
    of times or until it returns `False`, signaling a
    failure.

    Totality: total
    Visibility: export
    singleIO : IO () ->BenchmarkableVoid
    Totality: total
    Visibility: export
    repeatedlyPure : Pos-> (() ->Eithererra) ->Eithererra
    Totality: total
    Visibility: export
    singlePure : (() ->Eithererra) ->Benchmarkableerr
    Totality: total
    Visibility: export
    basic : (a->b) ->a->BenchmarkableVoid
    Totality: total
    Visibility: export
    dataBenchmark : Type->Type
    Totality: total
    Visibility: public export
    Constructors:
    Single : String->Benchmarkableerr->Benchmarkerr
    Group : String->List (Benchmarkerr) ->Benchmarkerr
    addPrefix : String->String->String
    Totality: total
    Visibility: export
    recordSUnit : Type
    Totality: total
    Visibility: public export
    Constructor: 
    U : Integer->Integer->SUnit

    Projections:
    .atto : SUnit->Integer
    .run : SUnit->Integer

    Hints:
    Eq (Scalaru)
    Ord (Scalaru)
    .atto : SUnit->Integer
    Totality: total
    Visibility: public export
    atto : SUnit->Integer
    Totality: total
    Visibility: public export
    .run : SUnit->Integer
    Totality: total
    Visibility: public export
    run : SUnit->Integer
    Totality: total
    Visibility: public export
    times : SUnit->SUnit->SUnit
    Totality: total
    Visibility: public export
    div : SUnit->SUnit->SUnit
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 9
    recordScalar : SUnit->Type
    Totality: total
    Visibility: public export
    Constructor: 
    MkScalar : Integer->Scalaru

    Projection: 
    .val : Scalaru->Integer

    Hints:
    Eq (Scalaru)
    Ord (Scalaru)
    .val : Scalaru->Integer
    Totality: total
    Visibility: public export
    val : Scalaru->Integer
    Totality: total
    Visibility: public export
    fromInteger : Integer->Scalaru
    Totality: total
    Visibility: public export
    0AttoSeconds : Type
    Totality: total
    Visibility: public export
    0AttoSecondsPerRun : Type
    Totality: total
    Visibility: public export
    0Runs : Type
    Totality: total
    Visibility: public export
    plus : Scalaru->Scalaru->Scalaru
    Totality: total
    Visibility: public export
    minus : Scalaru->Scalaru->Scalaru
    Totality: total
    Visibility: public export
    scalarSum : Foldablet=>t (Scalaru) ->Scalaru
    Totality: total
    Visibility: public export
    mult : Scalaru1->Scalaru2->Scalar (timesu1u2)
    Totality: total
    Visibility: public export
    div : Scalaru1->Scalaru2->Scalar (u1 `div` u2)
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 9
    posLength : Vect (Sn) a->Scalar (U00)
    Totality: total
    Visibility: public export
    fromFemtoSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromPicoSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromNanoSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromMicroSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromMilliSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromClock : ClockDuration->AttoSeconds
    Totality: total
    Visibility: public export
    timeDelta : Clockt->Clockt->AttoSeconds
    Totality: total
    Visibility: export
    toFloat : Scalaru->Double
    Totality: total
    Visibility: export
    recordMeasured : Type
      A collection of measurements made while benchmarking

    Totality: total
    Visibility: public export
    Constructor: 
    MkMeasured : Runs->ClockMonotonic->ClockMonotonic->AttoSeconds->AttoSecondsPerRun->AttoSeconds->Measured

    Projections:
    .avrgTime : Measured->AttoSecondsPerRun
      Average wall clock time elapsed per iteration
    .cpuTime : Measured->AttoSeconds
      Total CPU time elapsed
    .iterations : Measured->Runs
      Number of iterations
    .startTime : Measured->ClockMonotonic
      Wall clock time when starting the measurement
    .stopTime : Measured->ClockMonotonic
      Wall clock time when stopping the measurement
    .totalTime : Measured->AttoSeconds
      Total wall clock time elapsed in atto seconds
    .iterations : Measured->Runs
      Number of iterations

    Totality: total
    Visibility: public export
    iterations : Measured->Runs
      Number of iterations

    Totality: total
    Visibility: public export
    .startTime : Measured->ClockMonotonic
      Wall clock time when starting the measurement

    Totality: total
    Visibility: public export
    startTime : Measured->ClockMonotonic
      Wall clock time when starting the measurement

    Totality: total
    Visibility: public export
    .stopTime : Measured->ClockMonotonic
      Wall clock time when stopping the measurement

    Totality: total
    Visibility: public export
    stopTime : Measured->ClockMonotonic
      Wall clock time when stopping the measurement

    Totality: total
    Visibility: public export
    .totalTime : Measured->AttoSeconds
      Total wall clock time elapsed in atto seconds

    Totality: total
    Visibility: public export
    totalTime : Measured->AttoSeconds
      Total wall clock time elapsed in atto seconds

    Totality: total
    Visibility: public export
    .avrgTime : Measured->AttoSecondsPerRun
      Average wall clock time elapsed per iteration

    Totality: total
    Visibility: public export
    avrgTime : Measured->AttoSecondsPerRun
      Average wall clock time elapsed per iteration

    Totality: total
    Visibility: public export
    .cpuTime : Measured->AttoSeconds
      Total CPU time elapsed

    Totality: total
    Visibility: public export
    cpuTime : Measured->AttoSeconds
      Total CPU time elapsed

    Totality: total
    Visibility: public export
    recordResult : Type
    Totality: total
    Visibility: public export
    Constructor: 
    MkResult : String->ListMeasured->Result

    Projections:
    .name : Result->String
    .runs : Result->ListMeasured
    .name : Result->String
    Totality: total
    Visibility: public export
    name : Result->String
    Totality: total
    Visibility: public export
    .runs : Result->ListMeasured
    Totality: total
    Visibility: public export
    runs : Result->ListMeasured
    Totality: total
    Visibility: public export
    +

    Profile.Types

    (source)

    Reexports

    importpublic Data.DPair
    importpublic Data.Nat
    importpublic Data.Vect
    importpublic System.Clock

    Definitions

    dataFormat : Type
    Totality: total
    Visibility: public export
    Constructors:
    Table : Format
    Details : Format
    recordPos : Type
      A strictly positive natural number.

    Totality: total
    Visibility: public export
    Constructor: 
    MkPos : (val : Nat) -> {auto0_ : IsSuccval} ->Pos

    Projections:
    0.prf : ({rec:0} : Pos) ->IsSucc (val{rec:0})
    .val : Pos->Nat

    Hints:
    EqPos
    OrdPos
    .val : Pos->Nat
    Totality: total
    Visibility: public export
    val : Pos->Nat
    Totality: total
    Visibility: public export
    0.prf : ({rec:0} : Pos) ->IsSucc (val{rec:0})
    Totality: total
    Visibility: public export
    0prf : ({rec:0} : Pos) ->IsSucc (val{rec:0})
    Totality: total
    Visibility: public export
    fromInteger : (n : Integer) -> {auto0_ : IsSucc (castn)} ->Pos
    Totality: total
    Visibility: public export
    recordBenchmarkable : Type->Type
      A benchmarkable computation, which can fail with error `err`.

    Totality: total
    Visibility: public export
    Constructor: 
    MkBenchmarkable : (Pos->IOenvironment) -> (Pos->environment->IO ()) -> (environment->Pos->IO (Eithererrresult)) ->Bool->Benchmarkableerr

    Projections:
    .allocEnv : ({rec:0} : Benchmarkableerr) ->Pos->IO (environment{rec:0})
      Allocates an environment for running the benchmark
    the given number of times.
    .cleanEnv : ({rec:0} : Benchmarkableerr) ->Pos->environment{rec:0}->IO ()
      Cleanup the environment after running the benchmark
    the given number of times.
    .cpuOnly : Benchmarkableerr->Bool
      True, if this is a pure computation and we are only interested
    in the time spent on the CPU.
    0.environment : Benchmarkableerr->Type
    0.result : Benchmarkableerr->Type
    .runRepeatedly : ({rec:0} : Benchmarkableerr) ->environment{rec:0}->Pos->IO (Eithererr (result{rec:0}))
      Run a benchmurk in the given environment for
    the given number of times.
    0.environment : Benchmarkableerr->Type
    Totality: total
    Visibility: public export
    0environment : Benchmarkableerr->Type
    Totality: total
    Visibility: public export
    0.result : Benchmarkableerr->Type
    Totality: total
    Visibility: public export
    0result : Benchmarkableerr->Type
    Totality: total
    Visibility: public export
    .allocEnv : ({rec:0} : Benchmarkableerr) ->Pos->IO (environment{rec:0})
      Allocates an environment for running the benchmark
    the given number of times.

    Totality: total
    Visibility: public export
    allocEnv : ({rec:0} : Benchmarkableerr) ->Pos->IO (environment{rec:0})
      Allocates an environment for running the benchmark
    the given number of times.

    Totality: total
    Visibility: public export
    .cleanEnv : ({rec:0} : Benchmarkableerr) ->Pos->environment{rec:0}->IO ()
      Cleanup the environment after running the benchmark
    the given number of times.

    Totality: total
    Visibility: public export
    cleanEnv : ({rec:0} : Benchmarkableerr) ->Pos->environment{rec:0}->IO ()
      Cleanup the environment after running the benchmark
    the given number of times.

    Totality: total
    Visibility: public export
    .runRepeatedly : ({rec:0} : Benchmarkableerr) ->environment{rec:0}->Pos->IO (Eithererr (result{rec:0}))
      Run a benchmurk in the given environment for
    the given number of times.

    Totality: total
    Visibility: public export
    runRepeatedly : ({rec:0} : Benchmarkableerr) ->environment{rec:0}->Pos->IO (Eithererr (result{rec:0}))
      Run a benchmurk in the given environment for
    the given number of times.

    Totality: total
    Visibility: public export
    .cpuOnly : Benchmarkableerr->Bool
      True, if this is a pure computation and we are only interested
    in the time spent on the CPU.

    Totality: total
    Visibility: public export
    cpuOnly : Benchmarkableerr->Bool
      True, if this is a pure computation and we are only interested
    in the time spent on the CPU.

    Totality: total
    Visibility: public export
    repeatedly : Pos->IO (Eithererr ()) ->IO (Eithererr ())
      Tail-recursively runs an IO action the given number
    of times or until it returns `False`, signaling a
    failure.

    Totality: total
    Visibility: export
    singleIO : IO () ->BenchmarkableVoid
    Totality: total
    Visibility: export
    repeatedlyPure : Pos-> (() ->Eithererra) ->Eithererra
    Totality: total
    Visibility: export
    singlePure : (() ->Eithererra) ->Benchmarkableerr
    Totality: total
    Visibility: export
    basic : (a->b) ->a->BenchmarkableVoid
    Totality: total
    Visibility: export
    dataBenchmark : Type->Type
    Totality: total
    Visibility: public export
    Constructors:
    Single : String->Benchmarkableerr->Benchmarkerr
    Group : String->List (Benchmarkerr) ->Benchmarkerr
    addPrefix : String->String->String
    Totality: total
    Visibility: export
    recordSUnit : Type
    Totality: total
    Visibility: public export
    Constructor: 
    U : Integer->Integer->SUnit

    Projections:
    .atto : SUnit->Integer
    .run : SUnit->Integer

    Hints:
    Eq (Scalaru)
    Ord (Scalaru)
    .atto : SUnit->Integer
    Totality: total
    Visibility: public export
    atto : SUnit->Integer
    Totality: total
    Visibility: public export
    .run : SUnit->Integer
    Totality: total
    Visibility: public export
    run : SUnit->Integer
    Totality: total
    Visibility: public export
    times : SUnit->SUnit->SUnit
    Totality: total
    Visibility: public export
    div : SUnit->SUnit->SUnit
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 9
    recordScalar : SUnit->Type
    Totality: total
    Visibility: public export
    Constructor: 
    MkScalar : Integer->Scalaru

    Projection: 
    .val : Scalaru->Integer

    Hints:
    Eq (Scalaru)
    Ord (Scalaru)
    .val : Scalaru->Integer
    Totality: total
    Visibility: public export
    val : Scalaru->Integer
    Totality: total
    Visibility: public export
    fromInteger : Integer->Scalaru
    Totality: total
    Visibility: public export
    0AttoSeconds : Type
    Totality: total
    Visibility: public export
    0AttoSecondsPerRun : Type
    Totality: total
    Visibility: public export
    0Runs : Type
    Totality: total
    Visibility: public export
    plus : Scalaru->Scalaru->Scalaru
    Totality: total
    Visibility: public export
    minus : Scalaru->Scalaru->Scalaru
    Totality: total
    Visibility: public export
    scalarSum : Foldablet=>t (Scalaru) ->Scalaru
    Totality: total
    Visibility: public export
    mult : Scalaru1->Scalaru2->Scalar (timesu1u2)
    Totality: total
    Visibility: public export
    div : Scalaru1->Scalaru2->Scalar (u1 `div` u2)
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 9
    posLength : Vect (Sn) a->Scalar (U00)
    Totality: total
    Visibility: public export
    fromFemtoSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromPicoSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromNanoSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromMicroSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromMilliSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromSeconds : Integer->AttoSeconds
    Totality: total
    Visibility: public export
    fromClock : ClockDuration->AttoSeconds
    Totality: total
    Visibility: public export
    timeDelta : Clockt->Clockt->AttoSeconds
    Totality: total
    Visibility: export
    toFloat : Scalaru->Double
    Totality: total
    Visibility: export
    recordMeasured : Type
      A collection of measurements made while benchmarking

    Totality: total
    Visibility: public export
    Constructor: 
    MkMeasured : Runs->Bool->ClockMonotonic->ClockMonotonic->AttoSeconds->AttoSecondsPerRun->AttoSeconds->AttoSecondsPerRun->Measured

    Projections:
    .avrgCPU : Measured->AttoSecondsPerRun
      Average CPU time elapsed per iteration
    .avrgTime : Measured->AttoSecondsPerRun
      Average wall clock time elapsed per iteration
    .cpuOnly : Measured->Bool
      True, if we are interested only in the CPU time
    .cpuTime : Measured->AttoSeconds
      Total CPU time elapsed
    .iterations : Measured->Runs
      Number of iterations
    .startTime : Measured->ClockMonotonic
      Wall clock time when starting the measurement
    .stopTime : Measured->ClockMonotonic
      Wall clock time when stopping the measurement
    .totalTime : Measured->AttoSeconds
      Total wall clock time elapsed in atto seconds
    .iterations : Measured->Runs
      Number of iterations

    Totality: total
    Visibility: public export
    iterations : Measured->Runs
      Number of iterations

    Totality: total
    Visibility: public export
    .cpuOnly : Measured->Bool
      True, if we are interested only in the CPU time

    Totality: total
    Visibility: public export
    cpuOnly : Measured->Bool
      True, if we are interested only in the CPU time

    Totality: total
    Visibility: public export
    .startTime : Measured->ClockMonotonic
      Wall clock time when starting the measurement

    Totality: total
    Visibility: public export
    startTime : Measured->ClockMonotonic
      Wall clock time when starting the measurement

    Totality: total
    Visibility: public export
    .stopTime : Measured->ClockMonotonic
      Wall clock time when stopping the measurement

    Totality: total
    Visibility: public export
    stopTime : Measured->ClockMonotonic
      Wall clock time when stopping the measurement

    Totality: total
    Visibility: public export
    .totalTime : Measured->AttoSeconds
      Total wall clock time elapsed in atto seconds

    Totality: total
    Visibility: public export
    totalTime : Measured->AttoSeconds
      Total wall clock time elapsed in atto seconds

    Totality: total
    Visibility: public export
    .avrgTime : Measured->AttoSecondsPerRun
      Average wall clock time elapsed per iteration

    Totality: total
    Visibility: public export
    avrgTime : Measured->AttoSecondsPerRun
      Average wall clock time elapsed per iteration

    Totality: total
    Visibility: public export
    .cpuTime : Measured->AttoSeconds
      Total CPU time elapsed

    Totality: total
    Visibility: public export
    cpuTime : Measured->AttoSeconds
      Total CPU time elapsed

    Totality: total
    Visibility: public export
    .avrgCPU : Measured->AttoSecondsPerRun
      Average CPU time elapsed per iteration

    Totality: total
    Visibility: public export
    avrgCPU : Measured->AttoSecondsPerRun
      Average CPU time elapsed per iteration

    Totality: total
    Visibility: public export
    tot : Measured->AttoSeconds
    Totality: total
    Visibility: export
    avrg : Measured->AttoSecondsPerRun
    Totality: total
    Visibility: export
    recordResult : Type
    Totality: total
    Visibility: public export
    Constructor: 
    MkResult : String->ListMeasured->Result

    Projections:
    .name : Result->String
    .runs : Result->ListMeasured
    .name : Result->String
    Totality: total
    Visibility: public export
    name : Result->String
    Totality: total
    Visibility: public export
    .runs : Result->ListMeasured
    Totality: total
    Visibility: public export
    runs : Result->ListMeasured
    Totality: total
    Visibility: public export
    diff --git a/docs/profiler/docs/docs/Profile.Types.src.html b/docs/profiler/docs/docs/Profile.Types.src.html index c244ebd3f..60560241f 100644 --- a/docs/profiler/docs/docs/Profile.Types.src.html +++ b/docs/profiler/docs/docs/Profile.Types.src.html @@ -180,219 +180,239 @@
     59 |   ||| the given number of times.
     60 |   runRepeatedly : environment -> Pos -> IO (Either err result)
     61 |
    -
     62 | repeatedly_ : Nat -> PrimIO (Either err ()) -> PrimIO (Either err ())
    -
     63 | repeatedly_ 0     _ w = MkIORes (Right ()) w
    -
     64 | repeatedly_ (S k) f w =
    -
     65 |   let MkIORes (Right _) w2 := f w | res => res
    -
     66 |    in repeatedly_ k f w2
    -
     67 |
    -
     68 | ||| Tail-recursively runs an IO action the given number
    -
     69 | ||| of times or until it returns `False`, signaling a
    -
     70 | ||| failure.
    -
     71 | export
    -
     72 | repeatedly : Pos -> IO (Either err ()) -> IO (Either err ())
    -
     73 | repeatedly (MkPos n) io = fromPrim $ repeatedly_ n (toPrim io)
    -
     74 |
    +
     62 |   ||| True, if this is a pure computation and we are only interested
    +
     63 |   ||| in the time spent on the CPU.
    +
     64 |   cpuOnly       : Bool
    +
     65 |
    +
     66 | repeatedly_ : Nat -> PrimIO (Either err ()) -> PrimIO (Either err ())
    +
     67 | repeatedly_ 0     _ w = MkIORes (Right ()) w
    +
     68 | repeatedly_ (S k) f w =
    +
     69 |   let MkIORes (Right _) w2 := f w | res => res
    +
     70 |    in repeatedly_ k f w2
    +
     71 |
    +
     72 | ||| Tail-recursively runs an IO action the given number
    +
     73 | ||| of times or until it returns `False`, signaling a
    +
     74 | ||| failure.
     75 | export
    -
     76 | singleIO : IO () -> Benchmarkable Void
    -
     77 | singleIO io =
    -
     78 |   MkBenchmarkable
    -
     79 |     { allocEnv = \_ => pure ()
    -
     80 |     , cleanEnv = \_,_ => pure ()
    -
     81 |     , runRepeatedly = \(),n => repeatedly n (map Right io)
    -
     82 |     }
    -
     83 |
    -
     84 | repeatedlyPure_ : Nat -> a -> (() -> Either err a) -> Either err a
    -
     85 | repeatedlyPure_ 0     v _ = Right v
    -
     86 | repeatedlyPure_ (S k) v f = case f () of
    -
     87 |   Right v2 => repeatedlyPure_ k v2 f
    -
     88 |   Left err => Left err
    -
     89 |
    -
     90 | export
    -
     91 | repeatedlyPure : Pos -> (() -> Either err a) -> Either err a
    -
     92 | repeatedlyPure (MkPos $ S n) f = case f () of
    +
     76 | repeatedly : Pos -> IO (Either err ()) -> IO (Either err ())
    +
     77 | repeatedly (MkPos n) io = fromPrim $ repeatedly_ n (toPrim io)
    +
     78 |
    +
     79 | export
    +
     80 | singleIO : IO () -> Benchmarkable Void
    +
     81 | singleIO io =
    +
     82 |   MkBenchmarkable
    +
     83 |     { allocEnv = \_ => pure ()
    +
     84 |     , cleanEnv = \_,_ => pure ()
    +
     85 |     , runRepeatedly = \(),n => repeatedly n (map Right io)
    +
     86 |     , cpuOnly  = False
    +
     87 |     }
    +
     88 |
    +
     89 | repeatedlyPure_ : Nat -> a -> (() -> Either err a) -> Either err a
    +
     90 | repeatedlyPure_ 0     v _ = Right v
    +
     91 | repeatedlyPure_ (S k) v f = case f () of
    +
     92 |   Right v2 => repeatedlyPure_ k v2 f
     93 |   Left err => Left err
    -
     94 |   Right v  => repeatedlyPure_ n v f
    -
     95 |
    -
     96 | export
    -
     97 | singlePure : (() -> Either err a) -> Benchmarkable err
    -
     98 | singlePure f =
    -
     99 |   MkBenchmarkable
    -
    100 |     { allocEnv = \_ => pure ()
    -
    101 |     , cleanEnv = \_,_ => pure ()
    -
    102 |     , runRepeatedly = \(),n => map (`repeatedlyPure` f) (pure n)
    -
    103 |     }
    -
    104 |
    -
    105 | export
    -
    106 | basic : (a -> b) -> a -> Benchmarkable Void
    -
    107 | basic f va = singlePure (\_ => let v = f va in Right v)
    -
    108 |
    -
    109 | --------------------------------------------------------------------------------
    -
    110 | --          Benchmarks
    -
    111 | --------------------------------------------------------------------------------
    -
    112 |
    -
    113 | public export
    -
    114 | data Benchmark : (err : Type) -> Type where
    -
    115 |   Single : (name : String) -> (bench : Benchmarkable err) -> Benchmark err
    -
    116 |   Group  : (name : String) -> (benchs : List (Benchmark err)) -> Benchmark err
    -
    117 |
    -
    118 | export
    -
    119 | addPrefix : (pre : String) -> (rst : String) -> String
    -
    120 | addPrefix ""  rst = rst
    -
    121 | addPrefix pre rst = "\{pre}/\{rst}"
    -
    122 |
    -
    123 | --------------------------------------------------------------------------------
    -
    124 | --          Scalars
    -
    125 | --------------------------------------------------------------------------------
    -
    126 |
    -
    127 | public export
    -
    128 | record SUnit where
    -
    129 |   constructor U
    -
    130 |   atto : Integer
    -
    131 |   run  : Integer
    +
     94 |
    +
     95 | export
    +
     96 | repeatedlyPure : Pos -> (() -> Either err a) -> Either err a
    +
     97 | repeatedlyPure (MkPos $ S n) f = case f () of
    +
     98 |   Left err => Left err
    +
     99 |   Right v  => repeatedlyPure_ n v f
    +
    100 |
    +
    101 | export
    +
    102 | singlePure : (() -> Either err a) -> Benchmarkable err
    +
    103 | singlePure f =
    +
    104 |   MkBenchmarkable
    +
    105 |     { allocEnv = \_ => pure ()
    +
    106 |     , cleanEnv = \_,_ => pure ()
    +
    107 |     , runRepeatedly = \(),n => map (`repeatedlyPure` f) (pure n)
    +
    108 |     , cpuOnly  = True
    +
    109 |     }
    +
    110 |
    +
    111 | export
    +
    112 | basic : (a -> b) -> a -> Benchmarkable Void
    +
    113 | basic f va = singlePure (\_ => let v = f va in Right v)
    +
    114 |
    +
    115 | --------------------------------------------------------------------------------
    +
    116 | --          Benchmarks
    +
    117 | --------------------------------------------------------------------------------
    +
    118 |
    +
    119 | public export
    +
    120 | data Benchmark : (err : Type) -> Type where
    +
    121 |   Single : (name : String) -> (bench : Benchmarkable err) -> Benchmark err
    +
    122 |   Group  : (name : String) -> (benchs : List (Benchmark err)) -> Benchmark err
    +
    123 |
    +
    124 | export
    +
    125 | addPrefix : (pre : String) -> (rst : String) -> String
    +
    126 | addPrefix ""  rst = rst
    +
    127 | addPrefix pre rst = "\{pre}/\{rst}"
    +
    128 |
    +
    129 | --------------------------------------------------------------------------------
    +
    130 | --          Scalars
    +
    131 | --------------------------------------------------------------------------------
    132 |
    -
    133 | namespace SUnit
    -
    134 |   public export
    -
    135 |   times : SUnit -> SUnit -> SUnit
    -
    136 |   -- this makes sure that multiplication by a unit-less scalar
    -
    137 |   -- reduces during unification
    -
    138 |   times (U 0 0)   u         = u
    -
    139 |   times (U a1 r1) (U a2 r2) = U (a1 + a2) (r1 + r2)
    -
    140 |
    -
    141 |   public export
    -
    142 |   div : SUnit -> SUnit -> SUnit
    -
    143 |   -- this makes sure that division by a unit-less scalar
    -
    144 |   -- reduces during unification
    -
    145 |   div u         (U 0 0)   = u
    -
    146 |   div (U a1 r1) (U a2 r2) = U (a1 - a2) (r1 - r2)
    -
    147 |
    -
    148 | public export
    -
    149 | record Scalar (u : SUnit) where
    -
    150 |   constructor MkScalar
    -
    151 |   val : Integer
    -
    152 |
    -
    153 | public export
    -
    154 | Eq (Scalar u) where (==) = (==) `on` val
    -
    155 |
    -
    156 | public export
    -
    157 | Ord (Scalar u) where compare = compare `on` val
    +
    133 | public export
    +
    134 | record SUnit where
    +
    135 |   constructor U
    +
    136 |   atto : Integer
    +
    137 |   run  : Integer
    +
    138 |
    +
    139 | namespace SUnit
    +
    140 |   public export
    +
    141 |   times : SUnit -> SUnit -> SUnit
    +
    142 |   -- this makes sure that multiplication by a unit-less scalar
    +
    143 |   -- reduces during unification
    +
    144 |   times (U 0 0)   u         = u
    +
    145 |   times (U a1 r1) (U a2 r2) = U (a1 + a2) (r1 + r2)
    +
    146 |
    +
    147 |   public export
    +
    148 |   div : SUnit -> SUnit -> SUnit
    +
    149 |   -- this makes sure that division by a unit-less scalar
    +
    150 |   -- reduces during unification
    +
    151 |   div u         (U 0 0)   = u
    +
    152 |   div (U a1 r1) (U a2 r2) = U (a1 - a2) (r1 - r2)
    +
    153 |
    +
    154 | public export
    +
    155 | record Scalar (u : SUnit) where
    +
    156 |   constructor MkScalar
    +
    157 |   val : Integer
    158 |
    -
    159 | namespace Scalar
    -
    160 |   public export
    -
    161 |   fromInteger : Integer -> Scalar u
    -
    162 |   fromInteger = MkScalar
    -
    163 |
    -
    164 | public export
    -
    165 | 0 AttoSeconds : Type
    -
    166 | AttoSeconds = Scalar (U 1 0)
    -
    167 |
    -
    168 | public export
    -
    169 | 0 AttoSecondsPerRun : Type
    -
    170 | AttoSecondsPerRun = Scalar (U 1 (-1))
    -
    171 |
    -
    172 | public export
    -
    173 | 0 Runs : Type
    -
    174 | Runs = Scalar (U 0 1)
    -
    175 |
    -
    176 | public export
    -
    177 | plus : Scalar u -> Scalar u -> Scalar u
    -
    178 | plus x y = MkScalar $ x.val + y.val
    -
    179 |
    -
    180 | public export
    -
    181 | minus : Scalar u -> Scalar u -> Scalar u
    -
    182 | minus x y = MkScalar $ x.val - y.val
    -
    183 |
    -
    184 | public export
    -
    185 | scalarSum : Foldable t => t (Scalar u) -> Scalar u
    -
    186 | scalarSum = foldl plus 0
    -
    187 |
    -
    188 | public export
    -
    189 | mult : Scalar u1 -> Scalar u2 -> Scalar (times u1 u2)
    -
    190 | mult x y = MkScalar $ x.val * y.val
    -
    191 |
    -
    192 | public export
    -
    193 | div : Scalar u1 -> Scalar u2 -> Scalar (div u1 u2)
    -
    194 | div x y = MkScalar $ x.val `div` y.val
    -
    195 |
    -
    196 | public export
    -
    197 | posLength : Vect (S n) a -> Scalar (U 0 0)
    -
    198 | posLength = MkScalar . cast . length
    -
    199 |
    -
    200 | public export
    -
    201 | fromFemtoSeconds : Integer -> AttoSeconds
    -
    202 | fromFemtoSeconds = fromInteger . (* 1000)
    -
    203 |
    -
    204 | public export
    -
    205 | fromPicoSeconds : Integer -> AttoSeconds
    -
    206 | fromPicoSeconds = fromFemtoSeconds . (* 1000)
    -
    207 |
    -
    208 | public export
    -
    209 | fromNanoSeconds : Integer -> AttoSeconds
    -
    210 | fromNanoSeconds = fromPicoSeconds . (* 1000)
    -
    211 |
    -
    212 | public export
    -
    213 | fromMicroSeconds : Integer -> AttoSeconds
    -
    214 | fromMicroSeconds = fromNanoSeconds . (* 1000)
    -
    215 |
    -
    216 | public export
    -
    217 | fromMilliSeconds : Integer -> AttoSeconds
    -
    218 | fromMilliSeconds = fromMicroSeconds . (* 1000)
    -
    219 |
    -
    220 | public export
    -
    221 | fromSeconds : Integer -> AttoSeconds
    -
    222 | fromSeconds = fromMilliSeconds . (* 1000)
    -
    223 |
    -
    224 | public export
    -
    225 | fromClock : Clock Duration -> AttoSeconds
    -
    226 | fromClock c =
    -
    227 |   plus
    -
    228 |     (fromNanoSeconds $ nanoseconds c)
    -
    229 |     (fromSeconds $ seconds c)
    -
    230 |
    -
    231 | export
    -
    232 | timeDelta : Clock t -> Clock t -> AttoSeconds
    -
    233 | timeDelta c1 c2 = fromClock $ timeDifference (max c1 c2) (min c1 c2)
    -
    234 |
    -
    235 | export
    -
    236 | toFloat : Scalar u -> Double
    -
    237 | toFloat = cast . val
    -
    238 |
    -
    239 | --------------------------------------------------------------------------------
    -
    240 | --          Measured
    -
    241 | --------------------------------------------------------------------------------
    -
    242 |
    -
    243 | ||| A collection of measurements made while benchmarking
    -
    244 | public export
    -
    245 | record Measured where
    -
    246 |   constructor MkMeasured
    -
    247 |   ||| Number of iterations
    -
    248 |   iterations : Runs
    -
    249 |
    -
    250 |   ||| Wall clock time when starting the measurement
    -
    251 |   startTime  : Clock Monotonic
    -
    252 |
    -
    253 |   ||| Wall clock time when stopping the measurement
    -
    254 |   stopTime   : Clock Monotonic
    +
    159 | public export
    +
    160 | Eq (Scalar u) where (==) = (==) `on` val
    +
    161 |
    +
    162 | public export
    +
    163 | Ord (Scalar u) where compare = compare `on` val
    +
    164 |
    +
    165 | namespace Scalar
    +
    166 |   public export
    +
    167 |   fromInteger : Integer -> Scalar u
    +
    168 |   fromInteger = MkScalar
    +
    169 |
    +
    170 | public export
    +
    171 | 0 AttoSeconds : Type
    +
    172 | AttoSeconds = Scalar (U 1 0)
    +
    173 |
    +
    174 | public export
    +
    175 | 0 AttoSecondsPerRun : Type
    +
    176 | AttoSecondsPerRun = Scalar (U 1 (-1))
    +
    177 |
    +
    178 | public export
    +
    179 | 0 Runs : Type
    +
    180 | Runs = Scalar (U 0 1)
    +
    181 |
    +
    182 | public export
    +
    183 | plus : Scalar u -> Scalar u -> Scalar u
    +
    184 | plus x y = MkScalar $ x.val + y.val
    +
    185 |
    +
    186 | public export
    +
    187 | minus : Scalar u -> Scalar u -> Scalar u
    +
    188 | minus x y = MkScalar $ x.val - y.val
    +
    189 |
    +
    190 | public export
    +
    191 | scalarSum : Foldable t => t (Scalar u) -> Scalar u
    +
    192 | scalarSum = foldl plus 0
    +
    193 |
    +
    194 | public export
    +
    195 | mult : Scalar u1 -> Scalar u2 -> Scalar (times u1 u2)
    +
    196 | mult x y = MkScalar $ x.val * y.val
    +
    197 |
    +
    198 | public export
    +
    199 | div : Scalar u1 -> Scalar u2 -> Scalar (div u1 u2)
    +
    200 | div x y = MkScalar $ x.val `div` y.val
    +
    201 |
    +
    202 | public export
    +
    203 | posLength : Vect (S n) a -> Scalar (U 0 0)
    +
    204 | posLength = MkScalar . cast . length
    +
    205 |
    +
    206 | public export
    +
    207 | fromFemtoSeconds : Integer -> AttoSeconds
    +
    208 | fromFemtoSeconds = fromInteger . (* 1000)
    +
    209 |
    +
    210 | public export
    +
    211 | fromPicoSeconds : Integer -> AttoSeconds
    +
    212 | fromPicoSeconds = fromFemtoSeconds . (* 1000)
    +
    213 |
    +
    214 | public export
    +
    215 | fromNanoSeconds : Integer -> AttoSeconds
    +
    216 | fromNanoSeconds = fromPicoSeconds . (* 1000)
    +
    217 |
    +
    218 | public export
    +
    219 | fromMicroSeconds : Integer -> AttoSeconds
    +
    220 | fromMicroSeconds = fromNanoSeconds . (* 1000)
    +
    221 |
    +
    222 | public export
    +
    223 | fromMilliSeconds : Integer -> AttoSeconds
    +
    224 | fromMilliSeconds = fromMicroSeconds . (* 1000)
    +
    225 |
    +
    226 | public export
    +
    227 | fromSeconds : Integer -> AttoSeconds
    +
    228 | fromSeconds = fromMilliSeconds . (* 1000)
    +
    229 |
    +
    230 | public export
    +
    231 | fromClock : Clock Duration -> AttoSeconds
    +
    232 | fromClock c =
    +
    233 |   plus
    +
    234 |     (fromNanoSeconds $ nanoseconds c)
    +
    235 |     (fromSeconds $ seconds c)
    +
    236 |
    +
    237 | export
    +
    238 | timeDelta : Clock t -> Clock t -> AttoSeconds
    +
    239 | timeDelta c1 c2 = fromClock $ timeDifference (max c1 c2) (min c1 c2)
    +
    240 |
    +
    241 | export
    +
    242 | toFloat : Scalar u -> Double
    +
    243 | toFloat = cast . val
    +
    244 |
    +
    245 | --------------------------------------------------------------------------------
    +
    246 | --          Measured
    +
    247 | --------------------------------------------------------------------------------
    +
    248 |
    +
    249 | ||| A collection of measurements made while benchmarking
    +
    250 | public export
    +
    251 | record Measured where
    +
    252 |   constructor MkMeasured
    +
    253 |   ||| Number of iterations
    +
    254 |   iterations : Runs
    255 |
    -
    256 |   ||| Total wall clock time elapsed in atto seconds
    -
    257 |   totalTime  : AttoSeconds
    +
    256 |   ||| True, if we are interested only in the CPU time
    +
    257 |   cpuOnly    : Bool
    258 |
    -
    259 |   ||| Average wall clock time elapsed per iteration
    -
    260 |   avrgTime   : AttoSecondsPerRun
    +
    259 |   ||| Wall clock time when starting the measurement
    +
    260 |   startTime  : Clock Monotonic
    261 |
    -
    262 |   ||| Total CPU time elapsed
    -
    263 |   cpuTime    : AttoSeconds
    +
    262 |   ||| Wall clock time when stopping the measurement
    +
    263 |   stopTime   : Clock Monotonic
    264 |
    -
    265 | --------------------------------------------------------------------------------
    -
    266 | --          Result of running a single benchmark
    -
    267 | --------------------------------------------------------------------------------
    -
    268 |
    -
    269 | public export
    -
    270 | record Result where
    -
    271 |   constructor MkResult
    -
    272 |   name      : String
    -
    273 |   runs      : List Measured
    -
    274 |
    +
    265 |   ||| Total wall clock time elapsed in atto seconds
    +
    266 |   totalTime  : AttoSeconds
    +
    267 |
    +
    268 |   ||| Average wall clock time elapsed per iteration
    +
    269 |   avrgTime   : AttoSecondsPerRun
    +
    270 |
    +
    271 |   ||| Total CPU time elapsed
    +
    272 |   cpuTime    : AttoSeconds
    +
    273 |
    +
    274 |   ||| Average CPU time elapsed per iteration
    +
    275 |   avrgCPU    : AttoSecondsPerRun
    +
    276 |
    +
    277 | export
    +
    278 | tot : Measured -> AttoSeconds
    +
    279 | tot m = if m.cpuOnly then m.cpuTime else m.totalTime
    +
    280 |
    +
    281 | export
    +
    282 | avrg : Measured -> AttoSecondsPerRun
    +
    283 | avrg m = if m.cpuOnly then m.avrgCPU else m.avrgTime
    +
    284 |
    +
    285 | --------------------------------------------------------------------------------
    +
    286 | --          Result of running a single benchmark
    +
    287 | --------------------------------------------------------------------------------
    +
    288 |
    +
    289 | public export
    +
    290 | record Result where
    +
    291 |   constructor MkResult
    +
    292 |   name      : String
    +
    293 |   runs      : List Measured
    +
    294 |
    diff --git a/docs/sqlite3/docs/docs/Sqlite3.Cmd.html b/docs/sqlite3/docs/docs/Sqlite3.Cmd.html index c514abf44..bf7892522 100644 --- a/docs/sqlite3/docs/docs/Sqlite3.Cmd.html +++ b/docs/sqlite3/docs/docs/Sqlite3.Cmd.html @@ -61,4 +61,4 @@ -

    Sqlite3.Cmd

    (source)

    Definitions

    toExprs : LAll (Maybe.IdrisType) ts->LAll (Exprs) ts
      We can always convert a list of marshallable Idris values to
    a list of SQL expressions.

    Totality: total
    Visibility: export
    recordVal : SQLTable->Type
      A single name-value pair in an `UPDATE` statement.

    Totality: total
    Visibility: public export
    Constructor: 
    V : (name : String) -> {auto0prf : IsJust (FindColname (t.cols))} ->Expr [<t] (TableColTypenamet) ->Valt

    Projections:
    .name : Valt->String
    0.prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
    .val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
    .name : Valt->String
    Totality: total
    Visibility: public export
    name : Valt->String
    Totality: total
    Visibility: public export
    0.prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
    Totality: total
    Visibility: public export
    0prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
    Totality: total
    Visibility: public export
    .val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
    Totality: total
    Visibility: public export
    val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
    Totality: total
    Visibility: public export
    (.=) : {autoto : ToCella} -> (name : String) -> {auto0prf : IsJust (FindColname (t.cols))} -> {auto0_ : TableColTypenamet=ToCellTypea} ->a->Valt
      Operator alias for the data constructor of `Val`,
    specialized for usage with Idris types with a
    `ToCell` implementation.

    Totality: total
    Visibility: public export
    Fixity Declaration: infix operator, level 1
    dataAction : Type
      Foreign Key Actions

    Totality: total
    Visibility: public export
    Constructors:
    SET_NULL : Action
    SET_DEFAULT : Action
    CASCADE : Action
    RESTRICT : Action
    NO_ACTION : Action
    dataEvent : Type
    Totality: total
    Visibility: public export
    Constructors:
    ON_UPDATE : Action->Event
    ON_DELETE : Action->Event
    dataConstraint : SQLTable->Type
      Column and table constraints to be used when creating a new table.

    Totality: total
    Visibility: public export
    Constructors:
    NOT_NULL : TColumntx->Constraintt
    AUTOINCREMENT : TColumntx->Constraintt
    UNIQUE : LAll (TColumnt) xs->Constraintt
    PRIMARY_KEY : LAll (TColumnt) xs->Constraintt
    ForeignKey : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->ListEvent->Constraintt
    CHECK : Expr [<t] BOOL->Constraintt
    DEFAULT : (s : String) -> {auto0prf : IsJust (FindCols (t.cols))} ->Expr [<t] (TableColTypest) ->Constraintt
    FOREIGN_KEY : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->Constraintt
      Convenience API to construct a foreign key constraint.

    Totality: total
    Visibility: public export
    FOREIGN_KEY' : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->ListEvent->Constraintt
      Constructs a foreign key constraint with actions

    Totality: total
    Visibility: public export
    dataCmdType : Type
      Index used to distinguish different types of commands.

    This should facilitate writing combinator such as
    `IF_NOT_EXISTS` to operate only on certain commands.

    Totality: total
    Visibility: public export
    Constructors:
    TCreate : CmdType
    TDelete : CmdType
    TDrop : CmdType
    TInsert : CmdType
    TSelect : CmdType
    TUpdate : CmdType
    dataCmd : CmdType->Type
      Data management commands for creating tables and
    inserting, updating, or deleting rows in a table.

    Totality: total
    Visibility: public export
    Constructors:
    CreateTable : (t : SQLTable) ->List (Constraintt) ->Bool->CmdTCreate
      Information used to create a new table.

    It is recommended to use a combination of `CREATE_TABLE` and
    `IF_NOT_EXISTS` instead of using this constructor directly.
    DropTable : SQLTable->Bool->CmdTDrop
    INSERT : (t : SQLTable) ->LAll (TColumnt) ts->LAll (Expr [<t]) ts->CmdTInsert
      Information required to insert data into a table.

    This is well suited if you want to have full control over
    the expressions used to insert data. If, however, you want
    to insert an Idris value with a `ToRow` implementation,
    consider using function `insert` instead.
    REPLACE : (t : SQLTable) ->LAll (TColumnt) ts->LAll (Expr [<t]) ts->CmdTInsert
      Information required to insert or replace data in a a table.

    This is like insert, but will replace values to fullfil `UNIQUE`
    constraints in the table. As such, it is useful for updating
    data that might not yet be present in a table.

    This is well suited if you want to have full control over
    the expressions used to replace data. If, however, you want
    to insert an Idris value with a `ToRow` implementation,
    consider using function `replace` instead.
    UPDATE : (t : SQLTable) ->List (Valt) ->Expr [<t] BOOL->CmdTUpdate
      Information required to update values in table.
    DELETE : (t : SQLTable) ->Expr [<t] BOOL->CmdTDelete
      Information required to delete values from a table.
    insert : {autoas : ToRowv} -> (t : SQLTable) ->LAll (TColumnt) (ToRowTypesv) ->v->CmdTInsert
      Utility version of `INSERT` for those cases when you want to
    insert an Idris value with a `ToRow` implementation.

    Totality: total
    Visibility: export
    replace : {autoas : ToRowv} -> (t : SQLTable) ->LAll (TColumnt) (ToRowTypesv) ->v->CmdTInsert
      Utility version of `REPLACE` for those cases when you want to
    replace an Idris value with a `ToRow` implementation.

    Totality: total
    Visibility: export
    dataCmds : Type
      A list of different types of commands, with the
    command types being hidden.

    Totality: total
    Visibility: public export
    Constructors:
    Nil : Cmds
    (::) : Cmdt->Cmds->Cmds

    Hints:
    MonoidCmds
    SemigroupCmds
    (++) : Cmds->Cmds->Cmds
    Totality: total
    Visibility: export
    Fixity Declaration: infixr operator, level 7
    fromList : List (Cmdt) ->Cmds
    Totality: total
    Visibility: export
    IF_NOT_EXISTS : CmdTCreate->CmdTCreate
      Create a table only if it does not yet exist.

    Totality: total
    Visibility: public export
    IF_EXISTS : CmdTDrop->CmdTDrop
      Drop a table only if it exists.

    Totality: total
    Visibility: public export
    CREATE_TABLE : (t : SQLTable) ->List (Constraintt) ->CmdTCreate
      Convenience constructor for the `CreateTable` command

    Totality: total
    Visibility: public export
    DROP_TABLE : SQLTable->CmdTDrop
      Convenience constructor for the `DropTable` command

    Totality: total
    Visibility: public export
    0JoinPred : Schema->SQLTable->Type
    Totality: total
    Visibility: public export
    dataJoin : Schema->SQLTable->Type
    Totality: total
    Visibility: public export
    Constructors:
    JOIN : (t : SQLTable) ->JoinPred (s:<t0) t->Join (s:<t0) t
    OUTER_JOIN : (t : SQLTable) ->JoinPred (s:<t0) t->Join (s:<t0) t
    CROSS_JOIN : (t : SQLTable) ->Join (s:<t0) t
    FROM : (t : SQLTable) ->Join [<] t
    USING : (JoinPredst->Joinst) ->List (JColumnst) ->Joinst
    Totality: total
    Visibility: public export
    ON : (JoinPredst->Joinst) ->Expr (s:<t) BOOL->Joinst
    Totality: total
    Visibility: public export
    dataFrom : Schema->Type
      The `FROM` part in a select statement.

    Totality: total
    Visibility: public export
    Constructors:
    Lin : From [<]
    (:<) : Froms->Joinst->From (s:<t)
    dataAscDesc : Type
      Tag indicating, whether results should be sorted in ascending
    or descending order.

    Totality: total
    Visibility: public export
    Constructors:
    NoAsc : AscDesc
    Asc : AscDesc
    Desc : AscDesc
    dataCollation : SqliteType->Type
      Different collations used during ordering.

    Currently, only `NO CASE` is supported.

    Totality: total
    Visibility: public export
    Constructors:
    None : Collationt
    NOCASE : CollationTEXT
    recordOrderingTerm : Schema->Type
    Totality: total
    Visibility: public export
    Constructor: 
    O : Exprstpe->Collationtpe->AscDesc->OrderingTerms

    Projections:
    .asc : OrderingTerms->AscDesc
    .coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
    .expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
    0.tpe : OrderingTerms->SqliteType
    0.tpe : OrderingTerms->SqliteType
    Totality: total
    Visibility: public export
    0tpe : OrderingTerms->SqliteType
    Totality: total
    Visibility: public export
    .expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
    Totality: total
    Visibility: public export
    expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
    Totality: total
    Visibility: public export
    .coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
    Totality: total
    Visibility: public export
    coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
    Totality: total
    Visibility: public export
    .asc : OrderingTerms->AscDesc
    Totality: total
    Visibility: public export
    asc : OrderingTerms->AscDesc
    Totality: total
    Visibility: public export
    ASC : Exprst->OrderingTerms
    Totality: total
    Visibility: public export
    DESC : Exprst->OrderingTerms
    Totality: total
    Visibility: public export
    COLLATE : (o : OrderingTerms) ->Collation (o.tpe) ->OrderingTerms
    Totality: total
    Visibility: public export
    recordGroupingTerm : Schema->Type
    Totality: total
    Visibility: public export
    Constructor: 
    G : Exprstpe->Collationtpe->GroupingTerms

    Projections:
    .coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
    .expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
    0.tpe : GroupingTerms->SqliteType
    0.tpe : GroupingTerms->SqliteType
    Totality: total
    Visibility: public export
    0tpe : GroupingTerms->SqliteType
    Totality: total
    Visibility: public export
    .expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
    Totality: total
    Visibility: public export
    expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
    Totality: total
    Visibility: public export
    .coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
    Totality: total
    Visibility: public export
    coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
    Totality: total
    Visibility: public export
    fromString : (col : String) -> {auto0_ : IsJust (FindSchemaColcols)} ->GroupingTerms
    Totality: total
    Visibility: public export
    ord : GroupingTerms->OrderingTerms
    Totality: total
    Visibility: public export
    recordNamedExpr : Schema->SqliteType->Type
    Totality: total
    Visibility: public export
    Constructor: 
    AS : Exprst->String->NamedExprst

    Projections:
    .expr : NamedExprst->Exprst
    .name : NamedExprst->String
    .expr : NamedExprst->Exprst
    Totality: total
    Visibility: public export
    expr : NamedExprst->Exprst
    Totality: total
    Visibility: public export
    .name : NamedExprst->String
    Totality: total
    Visibility: public export
    name : NamedExprst->String
    Totality: total
    Visibility: public export
    fromString : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->NamedExprs (SchemaColTypecols)
    Totality: total
    Visibility: public export
    columnName : NamedExprst->String
      Extracts the column name we use to reference a named
    expression.

    If a custom name has been set, this will be returned. Otherwise,
    if the expression references a table column, that columns (possibly
    qualified) name will be returned.

    Totality: total
    Visibility: export
    ExprColumns : LAll (NamedExprs) ts->ListColumn
      Computes a list of named and typed columns from a list of
    name expressions.

    Expressions with an empty string as their name are not included in
    the result.

    Totality: total
    Visibility: public export
    ExprSchema : LAll (NamedExprs) ts->Schema
      Appends an unnamed table with the list of columns coming from
    the given list of named expressions to a schema.

    Expressions with an empty string as their name are not included in
    the result.

    This is used to compute the full `Schema` to be used in
    those fields of `Query` that are used for filtering, grouping, and
    sorting.

    Totality: total
    Visibility: public export
    recordQuery : Type->Type
      Different types of `SELECT` commands.

    Totality: total
    Visibility: public export
    Constructor: 
    Q : {autofromRow : FromRowt} ->Bool-> (schema : Schema) ->Fromschema-> (columns : LAll (NamedExprschema) (FromRowTypest)) ->Expr (ExprSchemacolumns) BOOL->Expr (ExprSchemacolumns) BOOL->List (GroupingTerm (ExprSchemacolumns)) ->List (OrderingTerm (ExprSchemacolumns)) ->MaybeNat->Nat->Queryt

    Projections:
    .columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
    .distinct : Queryt->Bool
    .from : ({rec:0} : Queryt) ->From (schema{rec:0})
    .fromRow : Queryt->FromRowt
    .group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
    .having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    .limit : Queryt->MaybeNat
    .offset : Queryt->Nat
    .order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
    .schema : Queryt->Schema
    .where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL

    Hint: 
    Queryt=>FromRowt
    .fromRow : Queryt->FromRowt
    Totality: total
    Visibility: public export
    fromRow : Queryt->FromRowt
    Totality: total
    Visibility: public export
    .distinct : Queryt->Bool
    Totality: total
    Visibility: public export
    distinct : Queryt->Bool
    Totality: total
    Visibility: public export
    .schema : Queryt->Schema
    Totality: total
    Visibility: public export
    schema : Queryt->Schema
    Totality: total
    Visibility: public export
    .from : ({rec:0} : Queryt) ->From (schema{rec:0})
    Totality: total
    Visibility: public export
    from : ({rec:0} : Queryt) ->From (schema{rec:0})
    Totality: total
    Visibility: public export
    .columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
    Totality: total
    Visibility: public export
    columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
    Totality: total
    Visibility: public export
    .where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    Totality: total
    Visibility: public export
    where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    Totality: total
    Visibility: public export
    .having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    Totality: total
    Visibility: public export
    having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    Totality: total
    Visibility: public export
    .group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
    Totality: total
    Visibility: public export
    group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
    Totality: total
    Visibility: public export
    .order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
    Totality: total
    Visibility: public export
    order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
    Totality: total
    Visibility: public export
    .limit : Queryt->MaybeNat
    Totality: total
    Visibility: public export
    limit : Queryt->MaybeNat
    Totality: total
    Visibility: public export
    .offset : Queryt->Nat
    Totality: total
    Visibility: public export
    offset : Queryt->Nat
    Totality: total
    Visibility: public export
    queryAsRow : Queryt=>FromRowt
    Totality: total
    Visibility: public export
    0LQuery : ListType->Type
    Totality: total
    Visibility: public export
    SELECT : {autofromRow : FromRowt} ->LAll (NamedExprs) (FromRowTypest) ->Froms->Queryt
    Totality: total
    Visibility: public export
    SELECT_DISTINCT : {autofromRow : FromRowt} ->LAll (NamedExprs) (FromRowTypest) ->Froms->Queryt
    Totality: total
    Visibility: public export
    GROUP_BY : (q : Queryt) ->List (GroupingTerm (ExprSchema (q.columns))) ->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    WHERE : (q : Queryt) ->Expr (ExprSchema (q.columns)) BOOL->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    HAVING : (q : Queryt) ->Expr (ExprSchema (q.columns)) BOOL->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    ORDER_BY : (q : Queryt) ->List (OrderingTerm (ExprSchema (q.columns))) ->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    LIMIT : Queryt->Nat->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    OFFSET : Queryt->Nat->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    +

    Sqlite3.Cmd

    (source)

    Definitions

    toExprs : LAll (Maybe.IdrisType) ts->LAll (Exprs) ts
      We can always convert a list of marshallable Idris values to
    a list of SQL expressions.

    Totality: total
    Visibility: export
    recordVal : SQLTable->Type
      A single name-value pair in an `UPDATE` statement.

    Totality: total
    Visibility: public export
    Constructor: 
    V : (name : String) -> {auto0prf : IsJust (FindColname (t.cols))} ->Expr [<t] (TableColTypenamet) ->Valt

    Projections:
    .name : Valt->String
    0.prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
    .val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
    .name : Valt->String
    Totality: total
    Visibility: public export
    name : Valt->String
    Totality: total
    Visibility: public export
    0.prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
    Totality: total
    Visibility: public export
    0prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
    Totality: total
    Visibility: public export
    .val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
    Totality: total
    Visibility: public export
    val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
    Totality: total
    Visibility: public export
    (.=) : {autoto : ToCella} -> (name : String) -> {auto0prf : IsJust (FindColname (t.cols))} -> {auto0_ : TableColTypenamet=ToCellTypea} ->a->Valt
      Operator alias for the data constructor of `Val`,
    specialized for usage with Idris types with a
    `ToCell` implementation.

    Totality: total
    Visibility: public export
    Fixity Declaration: infix operator, level 1
    dataAction : Type
      Foreign Key Actions

    Totality: total
    Visibility: public export
    Constructors:
    SET_NULL : Action
    SET_DEFAULT : Action
    CASCADE : Action
    RESTRICT : Action
    NO_ACTION : Action
    dataEvent : Type
    Totality: total
    Visibility: public export
    Constructors:
    ON_UPDATE : Action->Event
    ON_DELETE : Action->Event
    dataConstraint : SQLTable->Type
      Column and table constraints to be used when creating a new table.

    Totality: total
    Visibility: public export
    Constructors:
    NOT_NULL : TColumntx->Constraintt
    AUTOINCREMENT : TColumntx->Constraintt
    UNIQUE : LAll (TColumnt) xs->Constraintt
    PRIMARY_KEY : LAll (TColumnt) xs->Constraintt
    ForeignKey : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->ListEvent->Constraintt
    CHECK : Expr [<t] BOOL->Constraintt
    DEFAULT : (s : String) -> {auto0prf : IsJust (FindCols (t.cols))} ->Expr [<t] (TableColTypest) ->Constraintt
    FOREIGN_KEY : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->Constraintt
      Convenience API to construct a foreign key constraint.

    Totality: total
    Visibility: public export
    FOREIGN_KEY' : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->ListEvent->Constraintt
      Constructs a foreign key constraint with actions

    Totality: total
    Visibility: public export
    dataCmdType : Type
      Index used to distinguish different types of commands.

    This should facilitate writing combinator such as
    `IF_NOT_EXISTS` to operate only on certain commands.

    Totality: total
    Visibility: public export
    Constructors:
    TCreate : CmdType
    TDelete : CmdType
    TDrop : CmdType
    TInsert : CmdType
    TSelect : CmdType
    TUpdate : CmdType
    dataCmd : CmdType->Type
      Data management commands for creating tables and
    inserting, updating, or deleting rows in a table.

    Totality: total
    Visibility: public export
    Constructors:
    CreateTable : (t : SQLTable) ->List (Constraintt) ->Bool->CmdTCreate
      Information used to create a new table.

    It is recommended to use a combination of `CREATE_TABLE` and
    `IF_NOT_EXISTS` instead of using this constructor directly.
    DropTable : SQLTable->Bool->CmdTDrop
    INSERT : (t : SQLTable) ->LAll (TColumnt) ts->LAll (Expr [<t]) ts->CmdTInsert
      Information required to insert data into a table.

    This is well suited if you want to have full control over
    the expressions used to insert data. If, however, you want
    to insert an Idris value with a `ToRow` implementation,
    consider using function `insert` instead.
    REPLACE : (t : SQLTable) ->LAll (TColumnt) ts->LAll (Expr [<t]) ts->CmdTInsert
      Information required to insert or replace data in a a table.

    This is like insert, but will replace values to fullfil `UNIQUE`
    constraints in the table. As such, it is useful for updating
    data that might not yet be present in a table.

    This is well suited if you want to have full control over
    the expressions used to replace data. If, however, you want
    to insert an Idris value with a `ToRow` implementation,
    consider using function `replace` instead.
    UPDATE : (t : SQLTable) ->List (Valt) ->Expr [<t] BOOL->CmdTUpdate
      Information required to update values in table.
    DELETE : (t : SQLTable) ->Expr [<t] BOOL->CmdTDelete
      Information required to delete values from a table.
    insert : {autoas : ToRowv} -> (t : SQLTable) ->LAll (TColumnt) (ToRowTypesv) ->v->CmdTInsert
      Utility version of `INSERT` for those cases when you want to
    insert an Idris value with a `ToRow` implementation.

    Totality: total
    Visibility: export
    replace : {autoas : ToRowv} -> (t : SQLTable) ->LAll (TColumnt) (ToRowTypesv) ->v->CmdTInsert
      Utility version of `REPLACE` for those cases when you want to
    replace an Idris value with a `ToRow` implementation.

    Totality: total
    Visibility: export
    dataCmds : Type
      A list of different types of commands, with the
    command types being hidden.

    Totality: total
    Visibility: public export
    Constructors:
    Nil : Cmds
    (::) : Cmdt->Cmds->Cmds

    Hints:
    MonoidCmds
    SemigroupCmds
    (++) : Cmds->Cmds->Cmds
    Totality: total
    Visibility: export
    Fixity Declaration: infixr operator, level 7
    fromList : List (Cmdt) ->Cmds
    Totality: total
    Visibility: export
    IF_NOT_EXISTS : CmdTCreate->CmdTCreate
      Create a table only if it does not yet exist.

    Totality: total
    Visibility: public export
    IF_EXISTS : CmdTDrop->CmdTDrop
      Drop a table only if it exists.

    Totality: total
    Visibility: public export
    CREATE_TABLE : (t : SQLTable) ->List (Constraintt) ->CmdTCreate
      Convenience constructor for the `CreateTable` command

    Totality: total
    Visibility: public export
    DROP_TABLE : SQLTable->CmdTDrop
      Convenience constructor for the `DropTable` command

    Totality: total
    Visibility: public export
    0JoinPred : Schema->SQLTable->Type
    Totality: total
    Visibility: public export
    dataJoin : Schema->SQLTable->Type
    Totality: total
    Visibility: public export
    Constructors:
    JOIN : (t : SQLTable) ->JoinPred (s:<t0) t->Join (s:<t0) t
    OUTER_JOIN : (t : SQLTable) ->JoinPred (s:<t0) t->Join (s:<t0) t
    CROSS_JOIN : (t : SQLTable) ->Join (s:<t0) t
    FROM : (t : SQLTable) ->Join [<] t
    USING : (JoinPredst->Joinst) ->List (JColumnst) ->Joinst
    Totality: total
    Visibility: public export
    ON : (JoinPredst->Joinst) ->Expr (s:<t) BOOL->Joinst
    Totality: total
    Visibility: public export
    dataFrom : Schema->Type
      The `FROM` part in a select statement.

    Totality: total
    Visibility: public export
    Constructors:
    Lin : From [<]
    (:<) : Froms->Joinst->From (s:<t)
    dataAscDesc : Type
      Tag indicating, whether results should be sorted in ascending
    or descending order.

    Totality: total
    Visibility: public export
    Constructors:
    NoAsc : AscDesc
    Asc : AscDesc
    Desc : AscDesc
    dataCollation : SqliteType->Type
      Different collations used during ordering.

    Currently, only `NO CASE` is supported.

    Totality: total
    Visibility: public export
    Constructors:
    None : Collationt
    NOCASE : CollationTEXT
    recordOrderingTerm : Schema->Type
    Totality: total
    Visibility: public export
    Constructor: 
    O : Exprstpe->Collationtpe->AscDesc->OrderingTerms

    Projections:
    .asc : OrderingTerms->AscDesc
    .coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
    .expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
    0.tpe : OrderingTerms->SqliteType
    0.tpe : OrderingTerms->SqliteType
    Totality: total
    Visibility: public export
    0tpe : OrderingTerms->SqliteType
    Totality: total
    Visibility: public export
    .expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
    Totality: total
    Visibility: public export
    expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
    Totality: total
    Visibility: public export
    .coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
    Totality: total
    Visibility: public export
    coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
    Totality: total
    Visibility: public export
    .asc : OrderingTerms->AscDesc
    Totality: total
    Visibility: public export
    asc : OrderingTerms->AscDesc
    Totality: total
    Visibility: public export
    ASC : Exprst->OrderingTerms
    Totality: total
    Visibility: public export
    DESC : Exprst->OrderingTerms
    Totality: total
    Visibility: public export
    COLLATE : (o : OrderingTerms) ->Collation (o.tpe) ->OrderingTerms
    Totality: total
    Visibility: public export
    recordGroupingTerm : Schema->Type
    Totality: total
    Visibility: public export
    Constructor: 
    G : Exprstpe->Collationtpe->GroupingTerms

    Projections:
    .coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
    .expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
    0.tpe : GroupingTerms->SqliteType
    0.tpe : GroupingTerms->SqliteType
    Totality: total
    Visibility: public export
    0tpe : GroupingTerms->SqliteType
    Totality: total
    Visibility: public export
    .expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
    Totality: total
    Visibility: public export
    expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
    Totality: total
    Visibility: public export
    .coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
    Totality: total
    Visibility: public export
    coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
    Totality: total
    Visibility: public export
    fromString : (col : String) -> {auto0_ : IsJust (FindSchemaColcols)} ->GroupingTerms
    Totality: total
    Visibility: public export
    ord : GroupingTerms->OrderingTerms
    Totality: total
    Visibility: public export
    recordNamedExpr : Schema->SqliteType->Type
    Totality: total
    Visibility: public export
    Constructor: 
    AS : Exprst->String->NamedExprst

    Projections:
    .expr : NamedExprst->Exprst
    .name : NamedExprst->String
    .expr : NamedExprst->Exprst
    Totality: total
    Visibility: public export
    expr : NamedExprst->Exprst
    Totality: total
    Visibility: public export
    .name : NamedExprst->String
    Totality: total
    Visibility: public export
    name : NamedExprst->String
    Totality: total
    Visibility: public export
    fromString : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->NamedExprs (SchemaColTypecols)
    Totality: total
    Visibility: public export
    columnName : NamedExprst->String
      Extracts the column name we use to reference a named
    expression.

    If a custom name has been set, this will be returned. Otherwise,
    if the expression references a table column, that columns (possibly
    qualified) name will be returned.

    Totality: total
    Visibility: export
    ExprColumns : LAll (NamedExprs) ts->ListColumn
      Computes a list of named and typed columns from a list of
    name expressions.

    Expressions with an empty string as their name are not included in
    the result.

    Totality: total
    Visibility: public export
    ExprSchema : LAll (NamedExprs) ts->Schema
      Appends an unnamed table with the list of columns coming from
    the given list of named expressions to a schema.

    Expressions with an empty string as their name are not included in
    the result.

    This is used to compute the full `Schema` to be used in
    those fields of `Query` that are used for filtering, grouping, and
    sorting.

    Totality: total
    Visibility: public export
    recordQuery : Type->Type
      Different types of `SELECT` commands.

    Totality: total
    Visibility: public export
    Constructor: 
    Q : {autofromRow : FromRowt} ->Bool-> (schema : Schema) ->Fromschema-> (columns : LAll (NamedExprschema) (FromRowTypest)) ->Expr (ExprSchemacolumns) BOOL->Expr (ExprSchemacolumns) BOOL->List (GroupingTerm (ExprSchemacolumns)) ->List (OrderingTerm (ExprSchemacolumns)) ->MaybeNat->Nat->Queryt

    Projections:
    .columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
    .distinct : Queryt->Bool
    .from : ({rec:0} : Queryt) ->From (schema{rec:0})
    .fromRow : Queryt->FromRowt
    .group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
    .having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    .limit : Queryt->MaybeNat
    .offset : Queryt->Nat
    .order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
    .schema : Queryt->Schema
    .where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL

    Hint: 
    Queryt=>FromRowt
    .fromRow : Queryt->FromRowt
    Totality: total
    Visibility: public export
    fromRow : Queryt->FromRowt
    Totality: total
    Visibility: public export
    .distinct : Queryt->Bool
    Totality: total
    Visibility: public export
    distinct : Queryt->Bool
    Totality: total
    Visibility: public export
    .schema : Queryt->Schema
    Totality: total
    Visibility: public export
    schema : Queryt->Schema
    Totality: total
    Visibility: public export
    .from : ({rec:0} : Queryt) ->From (schema{rec:0})
    Totality: total
    Visibility: public export
    from : ({rec:0} : Queryt) ->From (schema{rec:0})
    Totality: total
    Visibility: public export
    .columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
    Totality: total
    Visibility: public export
    columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
    Totality: total
    Visibility: public export
    .where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    Totality: total
    Visibility: public export
    where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    Totality: total
    Visibility: public export
    .having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    Totality: total
    Visibility: public export
    having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
    Totality: total
    Visibility: public export
    .group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
    Totality: total
    Visibility: public export
    group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
    Totality: total
    Visibility: public export
    .order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
    Totality: total
    Visibility: public export
    order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
    Totality: total
    Visibility: public export
    .limit : Queryt->MaybeNat
    Totality: total
    Visibility: public export
    limit : Queryt->MaybeNat
    Totality: total
    Visibility: public export
    .offset : Queryt->Nat
    Totality: total
    Visibility: public export
    offset : Queryt->Nat
    Totality: total
    Visibility: public export
    queryAsRow : Queryt=>FromRowt
    Totality: total
    Visibility: public export
    0LQuery : ListType->Type
    Totality: total
    Visibility: public export
    SELECT : {autofromRow : FromRowt} ->LAll (NamedExprs) (FromRowTypest) ->Froms->Queryt
    Totality: total
    Visibility: public export
    SELECT_DISTINCT : {autofromRow : FromRowt} ->LAll (NamedExprs) (FromRowTypest) ->Froms->Queryt
    Totality: total
    Visibility: public export
    GROUP_BY : (q : Queryt) ->List (GroupingTerm (ExprSchema (q.columns))) ->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    WHERE : (q : Queryt) ->Expr (ExprSchema (q.columns)) BOOL->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    HAVING : (q : Queryt) ->Expr (ExprSchema (q.columns)) BOOL->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    ORDER_BY : (q : Queryt) ->List (OrderingTerm (ExprSchema (q.columns))) ->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    LIMIT : Queryt->Nat->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    OFFSET : Queryt->Nat->Queryt
    Totality: total
    Visibility: public export
    Fixity Declaration: infixl operator, level 7
    diff --git a/docs/sqlite3/docs/docs/Sqlite3.Expr.html b/docs/sqlite3/docs/docs/Sqlite3.Expr.html index 20c8e33b4..2a49b86c5 100644 --- a/docs/sqlite3/docs/docs/Sqlite3.Expr.html +++ b/docs/sqlite3/docs/docs/Sqlite3.Expr.html @@ -61,4 +61,4 @@ -

    Sqlite3.Expr

    (source)

    Definitions

    dataNumeric : SqliteType->Type
    Totality: total
    Visibility: public export
    Constructors:
    N_INTEGER : NumericINTEGER
    N_REAL : NumericREAL
    dataExpr : Schema->SqliteType->Type
      A syntax tree type representing well-typed SQLite expressions.

    Totality: total
    Visibility: public export
    Constructors:
    Lit : (t : SqliteType) ->IdrisTypet->Exprst
      A literal value in an SQL expression
    NULL : Exprst
      The `NULL` literal
    TRUE : ExprsBOOL
      Alias for the literal `1`, which corresponds to `True` in
    boolean expressions
    FALSE : ExprsBOOL
      Alias for the literal `0`, which corresponds to `False` in
    boolean expressions
    Raw : String->Exprst
      A raw expressions string that will be used as given.
    Col : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->Exprs (SchemaColTypecols)
      A column in a list of tables. Typically, it is convenient to
    use string literals directly for this (see `Expr.fromString`).
    (>) : Exprst->Exprst->ExprsBOOL
      Greater-than operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (<) : Exprst->Exprst->ExprsBOOL
      Less-than operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (>=) : Exprst->Exprst->ExprsBOOL
      Greater-than or equals operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (<=) : Exprst->Exprst->ExprsBOOL
      Less-than or equals operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (==) : Exprst->Exprst->ExprsBOOL
      Equality operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (/=) : Exprst->Exprst->ExprsBOOL
      Inequality operator.

    We use the same operator as in the `Eq` interface here, but this
    corresponds to SQL's `<>` (or `!=`) operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    IS : Exprst->Exprst->ExprsBOOL
      Equality test.

    Unlike `(==)`, this will always result in `TRUE` or `FALSE`
    even in the presence of `NULL`.
    IS_NOT : Exprst->Exprst->ExprsBOOL
      Inequality test.

    Unlike `(==)`, this will always result in `TRUE` or `FALSE`
    even in the presence of `NULL`.
    (&&) : ExprsBOOL->ExprsBOOL->ExprsBOOL
      Logical `AND`.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (||) : ExprsBOOL->ExprsBOOL->ExprsBOOL
      Logical `OR`.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    NOT : ExprsBOOL->ExprsBOOL
      Logical negation.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (.&.) : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Bit-wise `AND`.

    This corresponds to SQLite's `&` operator.
    (.|.) : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Bit-wise `OR`.

    This corresponds to SQLite's `|` operator.
    ShiftL : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Bit-wise left shift.

    This corresponds to SQLite's `<<` operator.
    ShiftR : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Bit-wise right shift.

    This corresponds to SQLite's `>>` operator.
    Add : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
      Numeric addition.

    Since `Expr s t` implements `Num` for numeric types `t`, you can
    typically use the addition operator `(+)` instead of this constructor.
    Mult : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
      Numeric multiplication.

    Since `Expr s t` implements `Num` for numeric types `t`, you can
    typically use the multiplication operator `(*)` instead of this
    constructor.
    Sub : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
      Numeric subtraction.

    Since `Expr s t` implements `Neg` for numeric types `t`, you can
    typically use the subtraction operator `(-)` instead of this
    constructor.
    Abs : {auto0_ : Numerict} ->Exprst->Exprst
      Computes the absolute of an expressions.

    This corresponds to the `abs()` function.
    Neg : {auto0_ : Numerict} ->Exprst->Exprst
      Numeric negation.
    Div : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
      Numeric division.

    Since `Expr s t` implements `Integral` for numeric types `INTEGER`,
    you can typically use `div` for integer division. Likewise, you can
    use `(/)` for floating point division.
    Mod : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Computes the modulus of two integers.

    This corresponds to the `%` operator in SQL.
    (++) : ExprsTEXT->ExprsTEXT->ExprsTEXT
      String concatenation.

    This corresponds to the `||` operator in SQL.
    CURRENT_TIME : ExprsTEXT
      The current time as a string.
    CURRENT_DATE : ExprsTEXT
      The current date as a string.
    CURRENT_TIMESTAMP : ExprsTEXT
      The current date and time as a string.
    LIKE : ExprsTEXT->ExprsTEXT->ExprsBOOL
      Matches the given text expression against the given
    text pattern.
    GLOB : ExprsTEXT->ExprsTEXT->ExprsBOOL
      Matches the given text expression against the given
    GLOB pattern.
    IN : Exprst->List (Exprst) ->ExprsBOOL
      True, if the given value appears in the given list of values.
    COALESCE : List (Exprst) ->Exprst
      Returns the first non-NULL value in the given list of expressions.
    COUNT : Exprst->ExprsINTEGER
      Counts the number of aggregated values.

    This is typically used with a `GROUP BY` statement.
    AVG : {auto0_ : Numerict} ->Exprst->ExprsREAL
      Returns the average of accumulated values.

    This is typically used with a `GROUP BY` statement.
    SUM : {auto0_ : Numerict} ->Exprst->Exprst
      Returns the sum of accumulated values.

    This is typically used with a `GROUP BY` statement.
    MIN : Exprst->Exprst
      Returns the minimum of accumulated values.

    This is typically used with a `GROUP BY` statement.
    MAX : Exprst->Exprst
      Returns the maximum of accumulated values.

    This is typically used with a `GROUP BY` statement.
    GROUP_CONCAT : ExprsTEXT->String->ExprsTEXT
      Concatenates aggregated text values using the given separator.

    This is typically used with a `GROUP BY` statement.

    Hints:
    Fractional (ExprsREAL)
    FromDouble (ExprsREAL)
    Integral (ExprsINTEGER)
    Neg (ExprsINTEGER)
    Neg (ExprsREAL)
    Num (ExprsINTEGER)
    Num (ExprsREAL)
    fromString : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->Exprs (SchemaColTypecols)
    Totality: total
    Visibility: export
    val : {auto{conArg:6648} : ToCella} ->a->Exprs (ToCellTypea)
      Convert a value of a marshallable type to a literal expression.

    Totality: total
    Visibility: export
    text : String->ExprsTEXT
    Totality: total
    Visibility: export
    int : Int64->ExprsINTEGER
    Totality: total
    Visibility: export
    blob : ByteString->ExprsBLOB
    Totality: total
    Visibility: export
    real : Double->ExprsREAL
    Totality: total
    Visibility: export
    commaSep : (a->String) ->Lista->String
      Converts a list of values to strings and concatenates them using
    a comma as the separator.

    Totality: total
    Visibility: export
    encodeText : String->String
      Encodes a `String` as an SQL literal.

    The whole string is wrapped in single quotes. Single quotes withing
    the string are escaped by doubling them.

    Totality: total
    Visibility: export
    encodeLit : (t : SqliteType) ->IdrisTypet->String
      Encodes an SQL literal as a string.

    Totality: total
    Visibility: export
    encodeExpr : Exprst->String
      Encodes an expression as a string.

    Literals will be correctly escaped and converted.

    Note: See module `Sqlite3.Parameter` for encoding of expressions
    with SQL parameters that will be bound separately when
    binding the statement.

    Totality: total
    Visibility: export
    +

    Sqlite3.Expr

    (source)

    Definitions

    dataNumeric : SqliteType->Type
    Totality: total
    Visibility: public export
    Constructors:
    N_INTEGER : NumericINTEGER
    N_REAL : NumericREAL
    dataExpr : Schema->SqliteType->Type
      A syntax tree type representing well-typed SQLite expressions.

    Totality: total
    Visibility: public export
    Constructors:
    Lit : (t : SqliteType) ->IdrisTypet->Exprst
      A literal value in an SQL expression
    NULL : Exprst
      The `NULL` literal
    TRUE : ExprsBOOL
      Alias for the literal `1`, which corresponds to `True` in
    boolean expressions
    FALSE : ExprsBOOL
      Alias for the literal `0`, which corresponds to `False` in
    boolean expressions
    Raw : String->Exprst
      A raw expressions string that will be used as given.
    Col : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->Exprs (SchemaColTypecols)
      A column in a list of tables. Typically, it is convenient to
    use string literals directly for this (see `Expr.fromString`).
    (>) : Exprst->Exprst->ExprsBOOL
      Greater-than operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (<) : Exprst->Exprst->ExprsBOOL
      Less-than operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (>=) : Exprst->Exprst->ExprsBOOL
      Greater-than or equals operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (<=) : Exprst->Exprst->ExprsBOOL
      Less-than or equals operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (==) : Exprst->Exprst->ExprsBOOL
      Equality operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (/=) : Exprst->Exprst->ExprsBOOL
      Inequality operator.

    We use the same operator as in the `Eq` interface here, but this
    corresponds to SQL's `<>` (or `!=`) operator.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    IS : Exprst->Exprst->ExprsBOOL
      Equality test.

    Unlike `(==)`, this will always result in `TRUE` or `FALSE`
    even in the presence of `NULL`.
    IS_NOT : Exprst->Exprst->ExprsBOOL
      Inequality test.

    Unlike `(==)`, this will always result in `TRUE` or `FALSE`
    even in the presence of `NULL`.
    (&&) : ExprsBOOL->ExprsBOOL->ExprsBOOL
      Logical `AND`.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (||) : ExprsBOOL->ExprsBOOL->ExprsBOOL
      Logical `OR`.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    NOT : ExprsBOOL->ExprsBOOL
      Logical negation.

    Note, that this is subject to SQL's three-valued logic in the
    presence of `NULL`.
    (.&.) : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Bit-wise `AND`.

    This corresponds to SQLite's `&` operator.
    (.|.) : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Bit-wise `OR`.

    This corresponds to SQLite's `|` operator.
    ShiftL : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Bit-wise left shift.

    This corresponds to SQLite's `<<` operator.
    ShiftR : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Bit-wise right shift.

    This corresponds to SQLite's `>>` operator.
    Add : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
      Numeric addition.

    Since `Expr s t` implements `Num` for numeric types `t`, you can
    typically use the addition operator `(+)` instead of this constructor.
    Mult : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
      Numeric multiplication.

    Since `Expr s t` implements `Num` for numeric types `t`, you can
    typically use the multiplication operator `(*)` instead of this
    constructor.
    Sub : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
      Numeric subtraction.

    Since `Expr s t` implements `Neg` for numeric types `t`, you can
    typically use the subtraction operator `(-)` instead of this
    constructor.
    Abs : {auto0_ : Numerict} ->Exprst->Exprst
      Computes the absolute of an expressions.

    This corresponds to the `abs()` function.
    Neg : {auto0_ : Numerict} ->Exprst->Exprst
      Numeric negation.
    Div : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
      Numeric division.

    Since `Expr s t` implements `Integral` for numeric types `INTEGER`,
    you can typically use `div` for integer division. Likewise, you can
    use `(/)` for floating point division.
    Mod : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
      Computes the modulus of two integers.

    This corresponds to the `%` operator in SQL.
    (++) : ExprsTEXT->ExprsTEXT->ExprsTEXT
      String concatenation.

    This corresponds to the `||` operator in SQL.
    CURRENT_TIME : ExprsTEXT
      The current time as a string.
    CURRENT_DATE : ExprsTEXT
      The current date as a string.
    CURRENT_TIMESTAMP : ExprsTEXT
      The current date and time as a string.
    LIKE : ExprsTEXT->ExprsTEXT->ExprsBOOL
      Matches the given text expression against the given
    text pattern.
    GLOB : ExprsTEXT->ExprsTEXT->ExprsBOOL
      Matches the given text expression against the given
    GLOB pattern.
    IN : Exprst->List (Exprst) ->ExprsBOOL
      True, if the given value appears in the given list of values.
    COALESCE : List (Exprst) ->Exprst
      Returns the first non-NULL value in the given list of expressions.
    COUNT : Exprst->ExprsINTEGER
      Counts the number of aggregated values.

    This is typically used with a `GROUP BY` statement.
    AVG : {auto0_ : Numerict} ->Exprst->ExprsREAL
      Returns the average of accumulated values.

    This is typically used with a `GROUP BY` statement.
    SUM : {auto0_ : Numerict} ->Exprst->Exprst
      Returns the sum of accumulated values.

    This is typically used with a `GROUP BY` statement.
    MIN : Exprst->Exprst
      Returns the minimum of accumulated values.

    This is typically used with a `GROUP BY` statement.
    MAX : Exprst->Exprst
      Returns the maximum of accumulated values.

    This is typically used with a `GROUP BY` statement.
    GROUP_CONCAT : ExprsTEXT->String->ExprsTEXT
      Concatenates aggregated text values using the given separator.

    This is typically used with a `GROUP BY` statement.

    Hints:
    Fractional (ExprsREAL)
    FromDouble (ExprsREAL)
    Integral (ExprsINTEGER)
    Neg (ExprsINTEGER)
    Neg (ExprsREAL)
    Num (ExprsINTEGER)
    Num (ExprsREAL)
    fromString : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->Exprs (SchemaColTypecols)
    Totality: total
    Visibility: export
    val : {auto{conArg:6648} : ToCella} ->a->Exprs (ToCellTypea)
      Convert a value of a marshallable type to a literal expression.

    Totality: total
    Visibility: export
    text : String->ExprsTEXT
    Totality: total
    Visibility: export
    int : Int64->ExprsINTEGER
    Totality: total
    Visibility: export
    blob : ByteString->ExprsBLOB
    Totality: total
    Visibility: export
    real : Double->ExprsREAL
    Totality: total
    Visibility: export
    commaSep : (a->String) ->Lista->String
      Converts a list of values to strings and concatenates them using
    a comma as the separator.

    Totality: total
    Visibility: export
    encodeText : String->String
      Encodes a `String` as an SQL literal.

    The whole string is wrapped in single quotes. Single quotes withing
    the string are escaped by doubling them.

    Totality: total
    Visibility: export
    encodeLit : (t : SqliteType) ->IdrisTypet->String
      Encodes an SQL literal as a string.

    Totality: total
    Visibility: export
    encodeExpr : Exprst->String
      Encodes an expression as a string.

    Literals will be correctly escaped and converted.

    Note: See module `Sqlite3.Parameter` for encoding of expressions
    with SQL parameters that will be bound separately when
    binding the statement.

    Totality: total
    Visibility: export
    diff --git a/docs/sqlite3/docs/docs/Sqlite3.Marshall.html b/docs/sqlite3/docs/docs/Sqlite3.Marshall.html index d186aa801..00a5fa678 100644 --- a/docs/sqlite3/docs/docs/Sqlite3.Marshall.html +++ b/docs/sqlite3/docs/docs/Sqlite3.Marshall.html @@ -61,4 +61,4 @@ -

    Sqlite3.Marshall

    (source)

    Reexports

    importpublic Data.List.Quantifiers.Extra

    Definitions

    0LAll : (0_ : (k->Type)) ->Listk->Type
    Totality: total
    Visibility: public export
    interfaceFromCell : Type->Type
      Inteface for converting an Idris value to a single cell in a table row.

    Parameters: a
    Constructor: 
    MkFromCell

    Methods:
    fromCellType : SqliteType
    fromCell : Maybe (IdrisTypefromCellType) ->EitherSqlErrora

    Implementations:
    FromCella=>FromCell (Maybea)
    FromCellInteger
    FromCellNat
    FromCellInt64
    FromCellInt32
    FromCellInt16
    FromCellInt8
    FromCellBits64
    FromCellBits32
    FromCellBits16
    FromCellBits8
    FromCellString
    FromCellByteString
    FromCellDouble
    FromCellBool
    fromCellType : FromCella=>SqliteType
    Totality: total
    Visibility: public export
    fromCell : {auto__con : FromCella} ->Maybe (IdrisTypefromCellType) ->EitherSqlErrora
    Totality: total
    Visibility: public export
    FromCellType : (0a : Type) ->FromCella=>SqliteType
      Utility alias for `fromCellType` with an explicit erased type argument.

    Totality: total
    Visibility: public export
    decodeJust : String-> (t->EitherSqlErrora) ->Maybet->EitherSqlErrora
      Utility for implementing `fromCell` for non-nullable data types.

    In case of a `Nothing` (corresponding to `NULL` in SQL land),
    this fails with a `NullPointer` error that wraps the type name
    to display, what kind of data we tried to convert.

    Totality: total
    Visibility: export
    interfaceToCell : Type->Type
      Inteface for converting an Idris value to a single cell in a table row.

    Parameters: a
    Constructor: 
    MkToCell

    Methods:
    toCellType : SqliteType
    toCell : a->Maybe (IdrisTypetoCellType)

    Implementations:
    ToCella=>ToCell (Maybea)
    ToCellInt64
    ToCellInt32
    ToCellInt16
    ToCellInt8
    ToCellBits64
    ToCellBits32
    ToCellBits16
    ToCellBits8
    ToCellString
    ToCellByteString
    ToCellDouble
    ToCellBool
    toCellType : ToCella=>SqliteType
    Totality: total
    Visibility: public export
    toCell : {auto__con : ToCella} ->a->Maybe (IdrisTypetoCellType)
    Totality: total
    Visibility: public export
    ToCellType : (0a : Type) ->ToCella=>SqliteType
      Utility alias for `toCellType` with an explicit erased type argument.

    Totality: total
    Visibility: public export
    interfaceFromRow : Type->Type
      Inteface for converting an Idris value from a row in a table.

    Parameters: a
    Constructor: 
    MkFromRow

    Methods:
    fromRowTypes : ListSqliteType
    fromRow : LAll (Maybe.IdrisType) fromRowTypes->EitherSqlErrora

    Implementations:
    Queryt=>FromRowt
    FromCella=>FromRowa
    LAll (FromRow.f) ts=>FromRow (LAllfts)
    FromRowa=>FromRow (Vectna)
    fromRowTypes : FromRowa=>ListSqliteType
    Totality: total
    Visibility: public export
    fromRow : {auto__con : FromRowa} ->LAll (Maybe.IdrisType) fromRowTypes->EitherSqlErrora
    Totality: total
    Visibility: public export
    FromRowTypes : (0a : Type) ->FromRowa=>ListSqliteType
      Utility alias for `fromRowTypes` with an explicit erased type argument.

    Totality: total
    Visibility: public export
    FromRowsTypes : LAll (FromRow.f) ts->ListSqliteType
      List of SQLite types we require to read a sequence of
    several values with a `FromRow` implementation.

    Totality: total
    Visibility: public export
    FromRowsTypesN : Nat->FromRowa->ListSqliteType
      We can also convert a row of values to a vector of values.

    This function computes the types we need.

    Totality: total
    Visibility: public export
    interfaceToRow : Type->Type
      Inteface for converting an Idris value from a row in a table.

    Parameters: a
    Constructor: 
    MkToRow

    Methods:
    toRowTypes : ListSqliteType
    toRow : a->LAll (Maybe.IdrisType) toRowTypes

    Implementations:
    ToCella=>ToRowa
    LAll (ToRow.f) ts=>ToRow (LAllfts)
    ToRowa=>ToRow (Vectna)
    toRowTypes : ToRowa=>ListSqliteType
    Totality: total
    Visibility: public export
    toRow : {auto__con : ToRowa} ->a->LAll (Maybe.IdrisType) toRowTypes
    Totality: total
    Visibility: public export
    ToRowTypes : (0a : Type) ->ToRowa=>ListSqliteType
      Utility alias for `fromRowTypes` with an explicit erased type argument.

    Totality: total
    Visibility: public export
    ToRowsTypes : LAll (ToRow.f) ts->ListSqliteType
      List of SQLite types we require to read a sequence of
    several values with a `ToRow` implementation.

    Totality: total
    Visibility: public export
    ToRowsTypesN : Nat->ToRowa->ListSqliteType
      We can also convert a vector of values to a (flat) row of values.

    This function computes the types we need.

    Totality: total
    Visibility: public export
    Concat : List (Lista) ->Lista
      List concatenation specialized to behave nicely during unification.

    Totality: total
    Visibility: public export
    splitAll : (v : List (Lista)) ->LAllf (Concatv) ->LAll (LAllf) v
      Generalization of `Data.List.Quantifiers.splitAt`, to split a
    heterogeneous list based on a list of lists of its indices.

    Totality: total
    Visibility: public export
    +

    Sqlite3.Marshall

    (source)

    Reexports

    importpublic Data.List.Quantifiers.Extra

    Definitions

    0LAll : (0_ : (k->Type)) ->Listk->Type
    Totality: total
    Visibility: public export
    interfaceFromCell : Type->Type
      Inteface for converting an Idris value to a single cell in a table row.

    Parameters: a
    Constructor: 
    MkFromCell

    Methods:
    fromCellType : SqliteType
    fromCell : Maybe (IdrisTypefromCellType) ->EitherSqlErrora

    Implementations:
    FromCella=>FromCell (Maybea)
    FromCellInteger
    FromCellNat
    FromCellInt64
    FromCellInt32
    FromCellInt16
    FromCellInt8
    FromCellBits64
    FromCellBits32
    FromCellBits16
    FromCellBits8
    FromCellString
    FromCellByteString
    FromCellDouble
    FromCellBool
    fromCellType : FromCella=>SqliteType
    Totality: total
    Visibility: public export
    fromCell : {auto__con : FromCella} ->Maybe (IdrisTypefromCellType) ->EitherSqlErrora
    Totality: total
    Visibility: public export
    FromCellType : (0a : Type) ->FromCella=>SqliteType
      Utility alias for `fromCellType` with an explicit erased type argument.

    Totality: total
    Visibility: public export
    decodeJust : String-> (t->EitherSqlErrora) ->Maybet->EitherSqlErrora
      Utility for implementing `fromCell` for non-nullable data types.

    In case of a `Nothing` (corresponding to `NULL` in SQL land),
    this fails with a `NullPointer` error that wraps the type name
    to display, what kind of data we tried to convert.

    Totality: total
    Visibility: export
    interfaceToCell : Type->Type
      Inteface for converting an Idris value to a single cell in a table row.

    Parameters: a
    Constructor: 
    MkToCell

    Methods:
    toCellType : SqliteType
    toCell : a->Maybe (IdrisTypetoCellType)

    Implementations:
    ToCella=>ToCell (Maybea)
    ToCellInt64
    ToCellInt32
    ToCellInt16
    ToCellInt8
    ToCellBits64
    ToCellBits32
    ToCellBits16
    ToCellBits8
    ToCellString
    ToCellByteString
    ToCellDouble
    ToCellBool
    toCellType : ToCella=>SqliteType
    Totality: total
    Visibility: public export
    toCell : {auto__con : ToCella} ->a->Maybe (IdrisTypetoCellType)
    Totality: total
    Visibility: public export
    ToCellType : (0a : Type) ->ToCella=>SqliteType
      Utility alias for `toCellType` with an explicit erased type argument.

    Totality: total
    Visibility: public export
    interfaceFromRow : Type->Type
      Inteface for converting an Idris value from a row in a table.

    Parameters: a
    Constructor: 
    MkFromRow

    Methods:
    fromRowTypes : ListSqliteType
    fromRow : LAll (Maybe.IdrisType) fromRowTypes->EitherSqlErrora

    Implementations:
    Queryt=>FromRowt
    FromCella=>FromRowa
    LAll (FromRow.f) ts=>FromRow (LAllfts)
    FromRowa=>FromRow (Vectna)
    fromRowTypes : FromRowa=>ListSqliteType
    Totality: total
    Visibility: public export
    fromRow : {auto__con : FromRowa} ->LAll (Maybe.IdrisType) fromRowTypes->EitherSqlErrora
    Totality: total
    Visibility: public export
    FromRowTypes : (0a : Type) ->FromRowa=>ListSqliteType
      Utility alias for `fromRowTypes` with an explicit erased type argument.

    Totality: total
    Visibility: public export
    FromRowsTypes : LAll (FromRow.f) ts->ListSqliteType
      List of SQLite types we require to read a sequence of
    several values with a `FromRow` implementation.

    Totality: total
    Visibility: public export
    FromRowsTypesN : Nat->FromRowa->ListSqliteType
      We can also convert a row of values to a vector of values.

    This function computes the types we need.

    Totality: total
    Visibility: public export
    interfaceToRow : Type->Type
      Inteface for converting an Idris value from a row in a table.

    Parameters: a
    Constructor: 
    MkToRow

    Methods:
    toRowTypes : ListSqliteType
    toRow : a->LAll (Maybe.IdrisType) toRowTypes

    Implementations:
    ToCella=>ToRowa
    LAll (ToRow.f) ts=>ToRow (LAllfts)
    ToRowa=>ToRow (Vectna)
    toRowTypes : ToRowa=>ListSqliteType
    Totality: total
    Visibility: public export
    toRow : {auto__con : ToRowa} ->a->LAll (Maybe.IdrisType) toRowTypes
    Totality: total
    Visibility: public export
    ToRowTypes : (0a : Type) ->ToRowa=>ListSqliteType
      Utility alias for `fromRowTypes` with an explicit erased type argument.

    Totality: total
    Visibility: public export
    ToRowsTypes : LAll (ToRow.f) ts->ListSqliteType
      List of SQLite types we require to read a sequence of
    several values with a `ToRow` implementation.

    Totality: total
    Visibility: public export
    ToRowsTypesN : Nat->ToRowa->ListSqliteType
      We can also convert a vector of values to a (flat) row of values.

    This function computes the types we need.

    Totality: total
    Visibility: public export
    Concat : List (Lista) ->Lista
      List concatenation specialized to behave nicely during unification.

    Totality: total
    Visibility: public export
    splitAll : (v : List (Lista)) ->LAllf (Concatv) ->LAll (LAllf) v
      Generalization of `Data.List.Quantifiers.splitAt`, to split a
    heterogeneous list based on a list of lists of its indices.

    Totality: total
    Visibility: public export
    diff --git a/docs/uv/docs/docs/System.UV.File.html b/docs/uv/docs/docs/System.UV.File.html index 5fe57ccfa..68b38ec6c 100644 --- a/docs/uv/docs/docs/System.UV.File.html +++ b/docs/uv/docs/docs/System.UV.File.html @@ -61,4 +61,4 @@ -

    System.UV.File

    (source)

    Reexports

    importpublic Data.Buffer.Indexed
    importpublic Data.ByteString
    importpublic System.UV.Raw.File

    Definitions

    recordFile : Type
      A file handle.

    Totality: total
    Visibility: public export
    Constructor: 
    MkFile : Int32->File

    Projection: 
    .file : File->Int32

    Hint: 
    UVLoop=>ResourceFile
    .file : File->Int32
    Totality: total
    Visibility: public export
    file : File->Int32
    Totality: total
    Visibility: public export
    stdin : File
      File handle for standard input

    Totality: total
    Visibility: export
    stdout : File
      File handle for standard output

    Totality: total
    Visibility: export
    stderr : File
      File handle for standard err

    Totality: total
    Visibility: export
    fsClose : HasIOio=>UVLoop=>File->io ()
    Totality: total
    Visibility: export
    dataUVFileError : Type
    Totality: total
    Visibility: public export
    Constructors:
    OpenError : String->UVError->UVFileError
    ReadError : String->UVError->UVFileError
    WriteError : String->UVError->UVFileError

    Hint: 
    InterpolationUVFileError
    fsOpen : UVLoop=>HasUVFileErrores=>String->Flags->Mode->AsyncesFile
      Asynchronously opens a file.

    Totality: total
    Visibility: export
    readOpen : UVLoop=>HasUVFileErrores=>String->AsyncesFile
    Totality: total
    Visibility: export
    writeOpen : UVLoop=>HasUVFileErrores=>String->AsyncesFile
    Totality: total
    Visibility: export
    appendOpen : UVLoop=>HasUVFileErrores=>String->AsyncesFile
    Totality: total
    Visibility: export
    writeBytesAt : UVLoop=>HasUVErrores=>File->Int64->ByteString->Asynces ()
    Totality: total
    Visibility: export
    writeBytes : UVLoop=>HasUVErrores=>File->ByteString->Asynces ()
    Totality: total
    Visibility: export
    bytesOut : UVLoop=>HasUVErrores=>ByteString->Asynces ()
      Writes all bytes to `stdout`.

    Totality: total
    Visibility: export
    putOut : UVLoop=>HasUVErrores=>String->Asynces ()
      Write some text to `stdout`.

    Totality: total
    Visibility: export
    putOutLn : UVLoop=>HasUVErrores=>String->Asynces ()
      Sink that writes all text to `stdout`, interpreting
    every item as a single line

    Totality: total
    Visibility: export
    printOut : UVLoop=>HasUVErrores=>Showa=>a->Asynces ()
      Sink that printes values to `stdout` using their `Show`
    implementation.

    Totality: total
    Visibility: export
    printOutLn : UVLoop=>HasUVErrores=>Showa=>a->Asynces ()
      Sink that printes values to `stdout` using their `Show`
    implementation and putting every item on a single line.

    Totality: total
    Visibility: export
    bytesErr : UVLoop=>HasUVErrores=>ByteString->Asynces ()
      Writes all bytes to `stderr`.

    Totality: total
    Visibility: export
    putErr : UVLoop=>HasUVErrores=>String->Asynces ()
      Write some text to `stderr`.

    Totality: total
    Visibility: export
    putErrLn : UVLoop=>HasUVErrores=>String->Asynces ()
      Sink that writes all text to `stderr`, interpreting
    every item as a single line

    Totality: total
    Visibility: export
    printErr : UVLoop=>HasUVErrores=>Showa=>a->Asynces ()
      Sink that printes values to `stderr` using their `Show`
    implementation.

    Totality: total
    Visibility: export
    printErrLn : UVLoop=>HasUVErrores=>Showa=>a->Asynces ()
      Sink that printes values to `stderr` using their `Show`
    implementation and putting every item on a single line.

    Totality: total
    Visibility: export
    writeFile : UVLoop=>HasUVFileErrores=>String->Flags->Mode->ByteString->Asynces ()
    Totality: total
    Visibility: export
    toFile : UVLoop=>HasUVFileErrores=>String->ByteString->Asynces ()
    Totality: total
    Visibility: export
    appendToFile : UVLoop=>HasUVFileErrores=>String->ByteString->Asynces ()
    Totality: total
    Visibility: export
    readBytes : UVLoop=>HasUVErrores=>File->Bits32->AsyncesByteString
    Totality: total
    Visibility: export
    readStdIn : UVLoop=>HasUVErrores=>AsyncesByteString
    Totality: total
    Visibility: export
    readFile : UVLoop=>HasUVFileErrores=>String->Bits32->AsyncesByteString
    Totality: total
    Visibility: export
    streamFileUntil : UVLoop=>HasUVFileErrores=>String->Bits32-> (ByteString->Asynces (Maybeb)) ->Asynces (Maybeb)
    Visibility: export
    streamFile : UVLoop=>HasUVFileErrores=>String->Bits32-> (ByteString->Asynces ()) ->Asynces ()
    Visibility: export
    streamLinesUntil : UVLoop=>HasUVFileErrores=>String->Bits32-> (ListByteString->Asynces (Maybeb)) ->Asynces (Maybeb)
    Visibility: export
    streamLines : UVLoop=>HasUVFileErrores=>String->Bits32-> (ListByteString->Asynces ()) ->Asynces ()
    Visibility: export
    foldBytes : UVLoop=>HasUVFileErrores=>String->Bits32-> (s->ByteString->s) ->s->Asyncess
    Visibility: export
    foldLines : UVLoop=>HasUVFileErrores=>String->Bits32-> (s->ByteString->s) ->s->Asyncess
    Visibility: export
    +

    System.UV.File

    (source)

    Reexports

    importpublic Data.Buffer.Indexed
    importpublic Data.ByteString
    importpublic System.UV.Raw.File

    Definitions

    recordFile : Type
      A file handle.

    Totality: total
    Visibility: public export
    Constructor: 
    MkFile : Int32->File

    Projection: 
    .file : File->Int32

    Hint: 
    UVLoop=>ResourceFile
    .file : File->Int32
    Totality: total
    Visibility: public export
    file : File->Int32
    Totality: total
    Visibility: public export
    stdin : File
      File handle for standard input

    Totality: total
    Visibility: export
    stdout : File
      File handle for standard output

    Totality: total
    Visibility: export
    stderr : File
      File handle for standard err

    Totality: total
    Visibility: export
    fsClose : HasIOio=>UVLoop=>File->io ()
    Totality: total
    Visibility: export
    dataUVFileError : Type
    Totality: total
    Visibility: public export
    Constructors:
    OpenError : String->UVError->UVFileError
    ReadError : String->UVError->UVFileError
    WriteError : String->UVError->UVFileError

    Hint: 
    InterpolationUVFileError
    fsOpen : UVLoop=>HasUVFileErrores=>String->Flags->Mode->AsyncesFile
      Asynchronously opens a file.

    Totality: total
    Visibility: export
    readOpen : UVLoop=>HasUVFileErrores=>String->AsyncesFile
    Totality: total
    Visibility: export
    writeOpen : UVLoop=>HasUVFileErrores=>String->AsyncesFile
    Totality: total
    Visibility: export
    appendOpen : UVLoop=>HasUVFileErrores=>String->AsyncesFile
    Totality: total
    Visibility: export
    writeBytesAt : UVLoop=>HasUVErrores=>File->Int64->ByteString->Asynces ()
    Totality: total
    Visibility: export
    writeBytes : UVLoop=>HasUVErrores=>File->ByteString->Asynces ()
    Totality: total
    Visibility: export
    bytesOut : UVLoop=>HasUVErrores=>ByteString->Asynces ()
      Writes all bytes to `stdout`.

    Totality: total
    Visibility: export
    putOut : UVLoop=>HasUVErrores=>String->Asynces ()
      Write some text to `stdout`.

    Totality: total
    Visibility: export
    putOutLn : UVLoop=>HasUVErrores=>String->Asynces ()
      Sink that writes all text to `stdout`, interpreting
    every item as a single line

    Totality: total
    Visibility: export
    printOut : UVLoop=>HasUVErrores=>Showa=>a->Asynces ()
      Sink that printes values to `stdout` using their `Show`
    implementation.

    Totality: total
    Visibility: export
    printOutLn : UVLoop=>HasUVErrores=>Showa=>a->Asynces ()
      Sink that printes values to `stdout` using their `Show`
    implementation and putting every item on a single line.

    Totality: total
    Visibility: export
    bytesErr : UVLoop=>HasUVErrores=>ByteString->Asynces ()
      Writes all bytes to `stderr`.

    Totality: total
    Visibility: export
    putErr : UVLoop=>HasUVErrores=>String->Asynces ()
      Write some text to `stderr`.

    Totality: total
    Visibility: export
    putErrLn : UVLoop=>HasUVErrores=>String->Asynces ()
      Sink that writes all text to `stderr`, interpreting
    every item as a single line

    Totality: total
    Visibility: export
    printErr : UVLoop=>HasUVErrores=>Showa=>a->Asynces ()
      Sink that printes values to `stderr` using their `Show`
    implementation.

    Totality: total
    Visibility: export
    printErrLn : UVLoop=>HasUVErrores=>Showa=>a->Asynces ()
      Sink that printes values to `stderr` using their `Show`
    implementation and putting every item on a single line.

    Totality: total
    Visibility: export
    writeFile : UVLoop=>HasUVFileErrores=>String->Flags->Mode->ByteString->Asynces ()
    Totality: total
    Visibility: export
    toFile : UVLoop=>HasUVFileErrores=>String->ByteString->Asynces ()
    Totality: total
    Visibility: export
    appendToFile : UVLoop=>HasUVFileErrores=>String->ByteString->Asynces ()
    Totality: total
    Visibility: export
    readBytes : UVLoop=>HasUVErrores=>File->Bits32->AsyncesByteString
    Totality: total
    Visibility: export
    readStdIn : UVLoop=>HasUVErrores=>AsyncesByteString
    Totality: total
    Visibility: export
    readFile : UVLoop=>HasUVFileErrores=>String->Bits32->AsyncesByteString
    Totality: total
    Visibility: export
    streamFileUntil : UVLoop=>HasUVFileErrores=>String->Bits32-> (ByteString->Asynces (Maybeb)) ->Asynces (Maybeb)
    Visibility: export
    streamFile : UVLoop=>HasUVFileErrores=>String->Bits32-> (ByteString->Asynces ()) ->Asynces ()
    Visibility: export
    streamLinesUntil : UVLoop=>HasUVFileErrores=>String->Bits32-> (ListByteString->Asynces (Maybeb)) ->Asynces (Maybeb)
    Visibility: export
    streamLines : UVLoop=>HasUVFileErrores=>String->Bits32-> (ListByteString->Asynces ()) ->Asynces ()
    Visibility: export
    foldBytes : UVLoop=>HasUVFileErrores=>String->Bits32-> (s->ByteString->s) ->s->Asyncess
    Visibility: export
    foldLines : UVLoop=>HasUVFileErrores=>String->Bits32-> (s->ByteString->s) ->s->Asyncess
    Visibility: export
    diff --git a/docs/uv/docs/docs/System.UV.Loop.html b/docs/uv/docs/docs/System.UV.Loop.html index cdaa381d2..d0d9766cd 100644 --- a/docs/uv/docs/docs/System.UV.Loop.html +++ b/docs/uv/docs/docs/System.UV.Loop.html @@ -61,4 +61,4 @@ -

    System.UV.Loop

    (source)

    Reexports

    importpublic IO.Async
    importpublic System.UV.Data.Error
    importpublic System.UV.Data.RunMode

    Definitions

    recordUVLoop : Type
    Totality: total
    Visibility: public export
    Constructor: 
    MkLoop : PtrLoop->PtrAsync->TokenGen->CloseCB->IORef (SnocList (IO ())) ->Nat->UVLoop

    Projections:
    .async : UVLoop->PtrAsync
    .cc : UVLoop->CloseCB
    .limit : UVLoop->Nat
    .loop : UVLoop->PtrLoop
    .ref : UVLoop->IORef (SnocList (IO ()))
    .tg : UVLoop->TokenGen

    Hints:
    UVLoop=>CloseCB
    UVLoop=>ExecutionContext
    UVLoop=>ResourceFile
    .loop : UVLoop->PtrLoop
    Totality: total
    Visibility: public export
    loop : UVLoop->PtrLoop
    Totality: total
    Visibility: public export
    .async : UVLoop->PtrAsync
    Totality: total
    Visibility: public export
    async : UVLoop->PtrAsync
    Totality: total
    Visibility: public export
    .tg : UVLoop->TokenGen
    Totality: total
    Visibility: public export
    tg : UVLoop->TokenGen
    Totality: total
    Visibility: public export
    .cc : UVLoop->CloseCB
    Totality: total
    Visibility: public export
    cc : UVLoop->CloseCB
    Totality: total
    Visibility: public export
    .ref : UVLoop->IORef (SnocList (IO ()))
    Totality: total
    Visibility: public export
    ref : UVLoop->IORef (SnocList (IO ()))
    Totality: total
    Visibility: public export
    .limit : UVLoop->Nat
    Totality: total
    Visibility: public export
    limit : UVLoop->Nat
    Totality: total
    Visibility: public export
    loopCtxt : UVLoop=>ExecutionContext
    Totality: total
    Visibility: export
    loopCloseCB : UVLoop=>CloseCB
    Totality: total
    Visibility: export
    defaultLoop : IOUVLoop
      Returns the default loop, corresponding to `uv_default_loop`.

    Totality: total
    Visibility: export
    uvCheck : HasUVErrores=>a->Int32->Resultesa
    Totality: total
    Visibility: export
    uvRes : HasUVErrores=>Int32->Resultes ()
    Totality: total
    Visibility: export
    uv : HasUVErrores=>IOInt32->Asynces ()
    Totality: total
    Visibility: export
    uvAct : HasUVErrores=>Resourcea=> (a->IOInt32) ->a->Asyncesa
    Totality: total
    Visibility: export
    uvCancelableAsync : HasUVErrores=>Asyncesr-> (r->Async [] ()) -> (r->Async [] ()) -> (r-> (a->IO ()) ->IOInt32) ->Asyncesa
    Totality: total
    Visibility: export
    uvAsync : HasUVErrores=> ((Outcomeesa->IO ()) ->IOInt32) ->Asyncesa
    Totality: total
    Visibility: export
    runUV : (UVLoop=>Async [] ()) ->IO ()
      Sets up the given application by registering it at the default loop
    and starting the loop afterwards.

    Visibility: export
    +

    System.UV.Loop

    (source)

    Reexports

    importpublic IO.Async
    importpublic System.UV.Data.Error
    importpublic System.UV.Data.RunMode

    Definitions

    recordUVLoop : Type
    Totality: total
    Visibility: public export
    Constructor: 
    MkLoop : PtrLoop->PtrAsync->TokenGen->CloseCB->IORef (SnocList (IO ())) ->Nat->UVLoop

    Projections:
    .async : UVLoop->PtrAsync
    .cc : UVLoop->CloseCB
    .limit : UVLoop->Nat
    .loop : UVLoop->PtrLoop
    .ref : UVLoop->IORef (SnocList (IO ()))
    .tg : UVLoop->TokenGen

    Hints:
    UVLoop=>CloseCB
    UVLoop=>ExecutionContext
    UVLoop=>ResourceFile
    .loop : UVLoop->PtrLoop
    Totality: total
    Visibility: public export
    loop : UVLoop->PtrLoop
    Totality: total
    Visibility: public export
    .async : UVLoop->PtrAsync
    Totality: total
    Visibility: public export
    async : UVLoop->PtrAsync
    Totality: total
    Visibility: public export
    .tg : UVLoop->TokenGen
    Totality: total
    Visibility: public export
    tg : UVLoop->TokenGen
    Totality: total
    Visibility: public export
    .cc : UVLoop->CloseCB
    Totality: total
    Visibility: public export
    cc : UVLoop->CloseCB
    Totality: total
    Visibility: public export
    .ref : UVLoop->IORef (SnocList (IO ()))
    Totality: total
    Visibility: public export
    ref : UVLoop->IORef (SnocList (IO ()))
    Totality: total
    Visibility: public export
    .limit : UVLoop->Nat
    Totality: total
    Visibility: public export
    limit : UVLoop->Nat
    Totality: total
    Visibility: public export
    loopCtxt : UVLoop=>ExecutionContext
    Totality: total
    Visibility: export
    loopCloseCB : UVLoop=>CloseCB
    Totality: total
    Visibility: export
    defaultLoop : IOUVLoop
      Returns the default loop, corresponding to `uv_default_loop`.

    Totality: total
    Visibility: export
    uvCheck : HasUVErrores=>a->Int32->Resultesa
    Totality: total
    Visibility: export
    uvRes : HasUVErrores=>Int32->Resultes ()
    Totality: total
    Visibility: export
    uv : HasUVErrores=>IOInt32->Asynces ()
    Totality: total
    Visibility: export
    uvAct : HasUVErrores=>Resourcea=> (a->IOInt32) ->a->Asyncesa
    Totality: total
    Visibility: export
    uvCancelableAsync : HasUVErrores=>Asyncesr-> (r->Async [] ()) -> (r->Async [] ()) -> (r-> (a->IO ()) ->IOInt32) ->Asyncesa
    Totality: total
    Visibility: export
    uvAsync : HasUVErrores=> ((Outcomeesa->IO ()) ->IOInt32) ->Asyncesa
    Totality: total
    Visibility: export
    runUV : (UVLoop=>Async [] ()) ->IO ()
      Sets up the given application by registering it at the default loop
    and starting the loop afterwards.

    Visibility: export
    diff --git a/docs/uv/docs/docs/System.UV.Raw.Handle.html b/docs/uv/docs/docs/System.UV.Raw.Handle.html index 10bf6935b..24075b606 100644 --- a/docs/uv/docs/docs/System.UV.Raw.Handle.html +++ b/docs/uv/docs/docs/System.UV.Raw.Handle.html @@ -61,4 +61,4 @@ -

    System.UV.Raw.Handle

    (source)

    Definitions

    uv_handle_type_name : Int->String
      Returns the name of the handle type.
    recordCloseCB : Type
    Totality: total
    Visibility: export
    Constructor: 
    CC : AnyPtr->CloseCB

    Projection: 
    .ptr : CloseCB->AnyPtr

    Hints:
    UVLoop=>CloseCB
    CloseCB=>Resource (PtrTcp)
    CloseCB=>Resource (PtrStream)
    CloseCB=>Resource (PtrPipe)
    CloseCB=>Resource (PtrIdle)
    CloseCB=>Resource (PtrCheck)
    CloseCB=>Resource (PtrPrepare)
    CloseCB=>Resource (PtrSignal)
    ResourceCloseCB
    CloseCB=>Resource (PtrTimer)
    freeCloseCB : HasIOio=>CloseCB->io ()
    Totality: total
    Visibility: export
    uv_is_active : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioInt32
    Totality: total
    Visibility: export
    uv_is_closing : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioInt32
    Totality: total
    Visibility: export
    uv_close : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->CloseCB->io ()
      Request a handle to be closed.

    This *must* be called before releasing the handle from memory,
    which can be done from within the callback or after the callback
    has returned.

    Totality: total
    Visibility: export
    uv_ref : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->io ()
      Reference a handle.

    This is an idempotent action, so calling it several times has no
    additional effect.

    Totality: total
    Visibility: export
    uv_unref : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->io ()
      Un-reference a handle.

    This is an idempotent action, so calling it several times has no
    additional effect.

    Totality: total
    Visibility: export
    uv_has_ref : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioBool
      Returns `True` is the handle is currently referenced.

    Totality: total
    Visibility: export
    uv_handle_get_data : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioAnyPtr
      Returns a pointer to the data associated with a handle.

    Totality: total
    Visibility: export
    uv_handle_set_data : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->AnyPtr->io ()
      Sets the data associated with a handle

    Totality: total
    Visibility: export
    uv_handle_type : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioInt
      Returns the type the current handle.

    Totality: total
    Visibility: export
    freeHandle : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->io ()
    Totality: total
    Visibility: export
    freeHandleWithoutUnlocking : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->io ()
    Totality: total
    Visibility: export
    closeCB : HasIOio=> (PtrHandle->IO ()) ->ioCloseCB
      Allocates and locks a callback for closing handles.

    The callback will run any custom operations given in the
    `handler` argument before freeing the `Ptr Handle` from memory.

    Totality: total
    Visibility: export
    defaultClose : HasIOio=>ioCloseCB
    Totality: total
    Visibility: export
    closeWithoutUnlockingCB : HasIOio=>ioCloseCB
    Totality: total
    Visibility: export
    +

    System.UV.Raw.Handle

    (source)

    Definitions

    uv_handle_type_name : Int->String
      Returns the name of the handle type.
    recordCloseCB : Type
    Totality: total
    Visibility: export
    Constructor: 
    CC : AnyPtr->CloseCB

    Projection: 
    .ptr : CloseCB->AnyPtr

    Hints:
    UVLoop=>CloseCB
    CloseCB=>Resource (PtrTcp)
    CloseCB=>Resource (PtrStream)
    CloseCB=>Resource (PtrPipe)
    CloseCB=>Resource (PtrIdle)
    CloseCB=>Resource (PtrCheck)
    CloseCB=>Resource (PtrPrepare)
    CloseCB=>Resource (PtrSignal)
    ResourceCloseCB
    CloseCB=>Resource (PtrTimer)
    freeCloseCB : HasIOio=>CloseCB->io ()
    Totality: total
    Visibility: export
    uv_is_active : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioInt32
    Totality: total
    Visibility: export
    uv_is_closing : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioInt32
    Totality: total
    Visibility: export
    uv_close : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->CloseCB->io ()
      Request a handle to be closed.

    This *must* be called before releasing the handle from memory,
    which can be done from within the callback or after the callback
    has returned.

    Totality: total
    Visibility: export
    uv_ref : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->io ()
      Reference a handle.

    This is an idempotent action, so calling it several times has no
    additional effect.

    Totality: total
    Visibility: export
    uv_unref : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->io ()
      Un-reference a handle.

    This is an idempotent action, so calling it several times has no
    additional effect.

    Totality: total
    Visibility: export
    uv_has_ref : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioBool
      Returns `True` is the handle is currently referenced.

    Totality: total
    Visibility: export
    uv_handle_get_data : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioAnyPtr
      Returns a pointer to the data associated with a handle.

    Totality: total
    Visibility: export
    uv_handle_set_data : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->AnyPtr->io ()
      Sets the data associated with a handle

    Totality: total
    Visibility: export
    uv_handle_type : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->ioInt
      Returns the type the current handle.

    Totality: total
    Visibility: export
    freeHandle : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->io ()
    Totality: total
    Visibility: export
    freeHandleWithoutUnlocking : HasIOio=> {auto0_ : PCasttHandle} ->Ptrt->io ()
    Totality: total
    Visibility: export
    closeCB : HasIOio=> (PtrHandle->IO ()) ->ioCloseCB
      Allocates and locks a callback for closing handles.

    The callback will run any custom operations given in the
    `handler` argument before freeing the `Ptr Handle` from memory.

    Totality: total
    Visibility: export
    defaultClose : HasIOio=>ioCloseCB
    Totality: total
    Visibility: export
    closeWithoutUnlockingCB : HasIOio=>ioCloseCB
    Totality: total
    Visibility: export
    diff --git a/docs/uv/docs/docs/System.UV.Raw.Pointer.html b/docs/uv/docs/docs/System.UV.Raw.Pointer.html index 3886367dc..a178c7d1e 100644 --- a/docs/uv/docs/docs/System.UV.Raw.Pointer.html +++ b/docs/uv/docs/docs/System.UV.Raw.Pointer.html @@ -61,4 +61,4 @@ -

    System.UV.Raw.Pointer

    (source)

    Reexports

    importpublic System.FFI
    importpublic System.UV.Data.Pointer

    Definitions

    dataBuf : Type
    Totality: total
    Visibility: export
    dataLoop : Type
    Totality: total
    Visibility: export
    getString : PtrChar->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 : PtrChar->MaybeString
      Like `getString` but returns `Nothing` in case the given pointer is the
    null pointer.

    Totality: total
    Visibility: export
    dataAsync : Type
    Totality: total
    Visibility: export
    dataCheck : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrCheck)
    dataFsEvent : Type
    Totality: total
    Visibility: export
    dataFsPoll : Type
    Totality: total
    Visibility: export
    dataHandle : Type
    Totality: total
    Visibility: export
    dataIdle : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrIdle)
    dataPipe : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrPipe)
    dataPoll : Type
    Totality: total
    Visibility: export
    dataPrepare : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrPrepare)
    dataProcess : Type
    Totality: total
    Visibility: export
    dataStream : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrStream)
    dataTcp : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrTcp)
    dataTimer : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrTimer)
    dataTty : Type
    Totality: total
    Visibility: export
    dataUdp : Type
    Totality: total
    Visibility: export
    dataSignal : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrSignal)
    dataReq : Type
    Totality: total
    Visibility: export
    dataConnect : Type
    Totality: total
    Visibility: export
    dataWrite : Type
    Totality: total
    Visibility: export
    dataShutdown : Type
    Totality: total
    Visibility: export
    dataUpdSend : Type
    Totality: total
    Visibility: export
    dataFs : Type
    Totality: total
    Visibility: export
    dataWork : Type
    Totality: total
    Visibility: export
    dataGetAddrInfo : Type
    Totality: total
    Visibility: export
    Hint: 
    Resource (PtrGetAddrInfo)
    dataGetNameInfo : Type
    Totality: total
    Visibility: export
    dataAddrInfo : Type
    Totality: total
    Visibility: export
    Hint: 
    Resource (PtrAddrInfo)
    dataSockAddr : Type
    Totality: total
    Visibility: export
    dataSockAddrIn : Type
    Totality: total
    Visibility: export
    Hint: 
    Resource (PtrSockAddrIn)
    dataSockAddrIn6 : Type
    Totality: total
    Visibility: export
    dataPSize : 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 : PSizeAsyncSZ_ASYNC
    CHECK : PSizeCheckSZ_CHECK
    FS_EVENT : PSizeFsEventSZ_FS_EVENT
    FS_POLL : PSizeFsPollSZ_FS_POLL
    HANDLE : PSizeHandleSZ_HANDLE
    IDLE : PSizeIdleSZ_IDLE
    NAMEDPIPE : PSizePipeSZ_NAMED_PIPE
    POLL : PSizePollSZ_POLL
    PREPARE : PSizePrepareSZ_PREPARE
    PROCESS : PSizeProcessSZ_PROCESS
    STREAM : PSizeStreamSZ_STREAM
    TCP : PSizeTcpSZ_TCP
    TIMER : PSizeTimerSZ_TIMER
    TTY : PSizeTtySZ_TTY
    UDP : PSizeUdpSZ_UDP
    SIGNAL : PSizeSignalSZ_SIGNAL
    REQ : PSizeReqSZ_REQ
    CONNECT : PSizeConnectSZ_CONNECT
    WRITE : PSizeWriteSZ_WRITE
    SHUTDOWN : PSizeShutdownSZ_SHUTDOWN
    FS : PSizeFsSZ_FS
    WORK : PSizeWorkSZ_WORK
    GETADDRINFO : PSizeGetAddrInfoSZ_GETADDRINFO
    GETNAMEINFO : PSizeGetNameInfoSZ_GETNAMEINFO
    ADDRINFO : PSizeAddrInfoSZ_ADDRINFO
    SOCKADDR : PSizeSockAddrSZ_SOCKADDR
    SOCKADDRIN : PSizeSockAddrInSZ_SOCKADDR_IN
    SOCKADDRIN6 : PSizeSockAddrIn6SZ_SOCKADDR_IN6
    BUF : PSizeBufSZ_BUF
    LOOP : PSizeLoopSZ_LOOP
    BYTE : PSizeBits81
    CHAR : PSizeChar1

    Hint: 
    Show (PSizeas)
    mallocPtr : HasIOio=> (0a : Type) -> {auto0_ : PSizeas} ->io (Ptra)
      Allocates a pointer for a type of a known pointer size.

    Totality: total
    Visibility: export
    mallocPtrs : HasIOio=> (0a : Type) -> {auto0_ : PSizeas} ->Bits32->io (Ptra)
      Allocates an array of pointers for a type of a known pointer size.

    Totality: total
    Visibility: export
    freePtr : HasIOio=>Ptrt->io ()
      Frees a typed pointer.

    Totality: total
    Visibility: export
    dataPCast : 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 : PCasttt
    AsyncHandle : PCastAsyncHandle
    CheckHandle : PCastCheckHandle
    Fs_eventHandle : PCastFsEventHandle
    Fs_pollHandle : PCastFsPollHandle
    IdleHandle : PCastIdleHandle
    NamedpipeHandle : PCastPipeHandle
    PollHandle : PCastPollHandle
    PrepareHandle : PCastPrepareHandle
    ProcessHandle : PCastProcessHandle
    StreamHandle : PCastStreamHandle
    TcpHandle : PCastTcpHandle
    TimerHandle : PCastTimerHandle
    TtyHandle : PCastTtyHandle
    UdpHandle : PCastUdpHandle
    SignalHandle : PCastSignalHandle
    StreamStream : PCastStreamStream
    TcpStream : PCastTcpStream
    PipeStream : PCastPipeStream
    TtyStream : PCastTtyStream
    IP4Addr : PCastSockAddrInSockAddr
    RevIP4Addr : PCastSockAddrSockAddrIn
    IP6Addr : PCastSockAddrIn6SockAddr
    ConnectReq : PCastConnectReq
    WriteReq : PCastWriteReq
    ShutdownReq : PCastShutdownReq
    UpdSendReq : PCastUpdSendReq
    FsReq : PCastFsReq
    WorkReq : PCastWorkReq
    GetAddrInfoReq : PCastGetAddrInfoReq
    GetNameInfoReq : PCastGetNameInfoReq
    ByteChar : PCastBits8Char
    CharByte : PCastCharBits8
    castPtr : {auto0_ : PCastst} ->Ptrs->Ptrt
    Totality: total
    Visibility: export
    newBuffer : HasIOio=>Bits32->ioBuffer
    Totality: total
    Visibility: export
    setBufLen : HasIOio=>PtrBuf->Bits32->io ()
    Totality: total
    Visibility: export
    getBufLen : HasIOio=>PtrBuf->ioBits32
    Totality: total
    Visibility: export
    setBufBase : HasIOio=>PtrBuf->PtrBits8->io ()
    Totality: total
    Visibility: export
    getBufBase : HasIOio=>PtrBuf->io (PtrBits8)
    Totality: total
    Visibility: export
    initBuf : HasIOio=>PtrBuf->PtrBits8->Bits32->io ()
    Totality: total
    Visibility: export
    freeBufBase : HasIOio=>PtrBuf->io ()
      Frees the memory allocated for a `uv_buf_t`'s `base` field.

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

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

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

    Totality: total
    Visibility: export
    +

    System.UV.Raw.Pointer

    (source)

    Reexports

    importpublic System.FFI
    importpublic System.UV.Data.Pointer

    Definitions

    dataBuf : Type
    Totality: total
    Visibility: export
    dataLoop : Type
    Totality: total
    Visibility: export
    getString : PtrChar->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 : PtrChar->MaybeString
      Like `getString` but returns `Nothing` in case the given pointer is the
    null pointer.

    Totality: total
    Visibility: export
    dataAsync : Type
    Totality: total
    Visibility: export
    dataCheck : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrCheck)
    dataFsEvent : Type
    Totality: total
    Visibility: export
    dataFsPoll : Type
    Totality: total
    Visibility: export
    dataHandle : Type
    Totality: total
    Visibility: export
    dataIdle : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrIdle)
    dataPipe : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrPipe)
    dataPoll : Type
    Totality: total
    Visibility: export
    dataPrepare : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrPrepare)
    dataProcess : Type
    Totality: total
    Visibility: export
    dataStream : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrStream)
    dataTcp : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrTcp)
    dataTimer : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrTimer)
    dataTty : Type
    Totality: total
    Visibility: export
    dataUdp : Type
    Totality: total
    Visibility: export
    dataSignal : Type
    Totality: total
    Visibility: export
    Hint: 
    CloseCB=>Resource (PtrSignal)
    dataReq : Type
    Totality: total
    Visibility: export
    dataConnect : Type
    Totality: total
    Visibility: export
    dataWrite : Type
    Totality: total
    Visibility: export
    dataShutdown : Type
    Totality: total
    Visibility: export
    dataUpdSend : Type
    Totality: total
    Visibility: export
    dataFs : Type
    Totality: total
    Visibility: export
    dataWork : Type
    Totality: total
    Visibility: export
    dataGetAddrInfo : Type
    Totality: total
    Visibility: export
    Hint: 
    Resource (PtrGetAddrInfo)
    dataGetNameInfo : Type
    Totality: total
    Visibility: export
    dataAddrInfo : Type
    Totality: total
    Visibility: export
    Hint: 
    Resource (PtrAddrInfo)
    dataSockAddr : Type
    Totality: total
    Visibility: export
    dataSockAddrIn : Type
    Totality: total
    Visibility: export
    Hint: 
    Resource (PtrSockAddrIn)
    dataSockAddrIn6 : Type
    Totality: total
    Visibility: export
    dataPSize : 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 : PSizeAsyncSZ_ASYNC
    CHECK : PSizeCheckSZ_CHECK
    FS_EVENT : PSizeFsEventSZ_FS_EVENT
    FS_POLL : PSizeFsPollSZ_FS_POLL
    HANDLE : PSizeHandleSZ_HANDLE
    IDLE : PSizeIdleSZ_IDLE
    NAMEDPIPE : PSizePipeSZ_NAMED_PIPE
    POLL : PSizePollSZ_POLL
    PREPARE : PSizePrepareSZ_PREPARE
    PROCESS : PSizeProcessSZ_PROCESS
    STREAM : PSizeStreamSZ_STREAM
    TCP : PSizeTcpSZ_TCP
    TIMER : PSizeTimerSZ_TIMER
    TTY : PSizeTtySZ_TTY
    UDP : PSizeUdpSZ_UDP
    SIGNAL : PSizeSignalSZ_SIGNAL
    REQ : PSizeReqSZ_REQ
    CONNECT : PSizeConnectSZ_CONNECT
    WRITE : PSizeWriteSZ_WRITE
    SHUTDOWN : PSizeShutdownSZ_SHUTDOWN
    FS : PSizeFsSZ_FS
    WORK : PSizeWorkSZ_WORK
    GETADDRINFO : PSizeGetAddrInfoSZ_GETADDRINFO
    GETNAMEINFO : PSizeGetNameInfoSZ_GETNAMEINFO
    ADDRINFO : PSizeAddrInfoSZ_ADDRINFO
    SOCKADDR : PSizeSockAddrSZ_SOCKADDR
    SOCKADDRIN : PSizeSockAddrInSZ_SOCKADDR_IN
    SOCKADDRIN6 : PSizeSockAddrIn6SZ_SOCKADDR_IN6
    BUF : PSizeBufSZ_BUF
    LOOP : PSizeLoopSZ_LOOP
    BYTE : PSizeBits81
    CHAR : PSizeChar1

    Hint: 
    Show (PSizeas)
    mallocPtr : HasIOio=> (0a : Type) -> {auto0_ : PSizeas} ->io (Ptra)
      Allocates a pointer for a type of a known pointer size.

    Totality: total
    Visibility: export
    mallocPtrs : HasIOio=> (0a : Type) -> {auto0_ : PSizeas} ->Bits32->io (Ptra)
      Allocates an array of pointers for a type of a known pointer size.

    Totality: total
    Visibility: export
    freePtr : HasIOio=>Ptrt->io ()
      Frees a typed pointer.

    Totality: total
    Visibility: export
    dataPCast : 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 : PCasttt
    AsyncHandle : PCastAsyncHandle
    CheckHandle : PCastCheckHandle
    Fs_eventHandle : PCastFsEventHandle
    Fs_pollHandle : PCastFsPollHandle
    IdleHandle : PCastIdleHandle
    NamedpipeHandle : PCastPipeHandle
    PollHandle : PCastPollHandle
    PrepareHandle : PCastPrepareHandle
    ProcessHandle : PCastProcessHandle
    StreamHandle : PCastStreamHandle
    TcpHandle : PCastTcpHandle
    TimerHandle : PCastTimerHandle
    TtyHandle : PCastTtyHandle
    UdpHandle : PCastUdpHandle
    SignalHandle : PCastSignalHandle
    StreamStream : PCastStreamStream
    TcpStream : PCastTcpStream
    PipeStream : PCastPipeStream
    TtyStream : PCastTtyStream
    IP4Addr : PCastSockAddrInSockAddr
    RevIP4Addr : PCastSockAddrSockAddrIn
    IP6Addr : PCastSockAddrIn6SockAddr
    ConnectReq : PCastConnectReq
    WriteReq : PCastWriteReq
    ShutdownReq : PCastShutdownReq
    UpdSendReq : PCastUpdSendReq
    FsReq : PCastFsReq
    WorkReq : PCastWorkReq
    GetAddrInfoReq : PCastGetAddrInfoReq
    GetNameInfoReq : PCastGetNameInfoReq
    ByteChar : PCastBits8Char
    CharByte : PCastCharBits8
    castPtr : {auto0_ : PCastst} ->Ptrs->Ptrt
    Totality: total
    Visibility: export
    newBuffer : HasIOio=>Bits32->ioBuffer
    Totality: total
    Visibility: export
    setBufLen : HasIOio=>PtrBuf->Bits32->io ()
    Totality: total
    Visibility: export
    getBufLen : HasIOio=>PtrBuf->ioBits32
    Totality: total
    Visibility: export
    setBufBase : HasIOio=>PtrBuf->PtrBits8->io ()
    Totality: total
    Visibility: export
    getBufBase : HasIOio=>PtrBuf->io (PtrBits8)
    Totality: total
    Visibility: export
    initBuf : HasIOio=>PtrBuf->PtrBits8->Bits32->io ()
    Totality: total
    Visibility: export
    freeBufBase : HasIOio=>PtrBuf->io ()
      Frees the memory allocated for a `uv_buf_t`'s `base` field.

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

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

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

    Totality: total
    Visibility: export
    diff --git a/docs/uv/docs/docs/System.UV.Raw.Stream.html b/docs/uv/docs/docs/System.UV.Raw.Stream.html index 16ea82451..76a908582 100644 --- a/docs/uv/docs/docs/System.UV.Raw.Stream.html +++ b/docs/uv/docs/docs/System.UV.Raw.Stream.html @@ -61,4 +61,4 @@ -

    System.UV.Raw.Stream

    (source)

    Definitions

    recordAllocCB : Type
    Totality: total
    Visibility: export
    Constructor: 
    AC : AnyPtr->AllocCB

    Projection: 
    .ptr : AllocCB->AnyPtr

    Hint: 
    ResourceAllocCB
    allocCB : HasIOio=> (PtrHandle->Bits32->PtrBuf->IO ()) ->ioAllocCB
    Totality: total
    Visibility: export
    sizedAlloc : HasIOio=>Bits32->ioAllocCB
    Totality: total
    Visibility: export
    defaultAlloc : HasIOio=>ioAllocCB
    Totality: total
    Visibility: export
    freeAllocCB : HasIOio=>AllocCB->io ()
    Totality: total
    Visibility: export
    uv_shutdown : HasIOio=>Ptrt-> {auto0_ : PCasttStream} -> (PtrShutdown->Int32->IO ()) ->ioInt32
      Shutdown the outgoing (write) side of a duplex stream.
    It waits for pending write requests to complete. The handle should
    refer to a initialized stream.
    The cb is called after shutdown is complete.

    Totality: total
    Visibility: export
    uv_listen : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->Int32-> (PtrStream->Int32->IO ()) ->ioInt32
      Start listening for incoming connections.
    backlog indicates the number of connections the kernel might queue,
    same as listen(2). When a new incoming connection is received
    the uv_connection_cb callback is called.

    Totality: total
    Visibility: export
    uv_accept : HasIOio=>Ptrs->Ptrt-> {auto0_ : PCastsStream} -> {auto0_ : PCasttStream} ->ioInt32
    Totality: total
    Visibility: export
    uv_read_start : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->AllocCB-> (PtrStream->Int32->PtrBuf->IO ()) ->ioInt32
      Read data from an incoming stream.
    The `readCB` callback will be made several times until there is
    no more data to read or `readstop` is called.

    Totality: total
    Visibility: export
    uv_read_stop : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->io ()
      Stop reading data from the stream. The uv_read_cb callback will no longer
    be called.

    This function is idempotent and may be safely called on a stopped stream.

    This function will always succeed; hence, checking its return value
    is unnecessary. A non-zero return indicates that finishing releasing
    resources may be pending on the next input event on that TTY on Windows,
    and does not indicate failure.

    Totality: total
    Visibility: export
    uv_write : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->PtrBits8->Bits32-> (PtrWrite->Int32->IO ()) ->ioInt32
      Write data to stream. Buffers are written in order. Example:

    Totality: total
    Visibility: export
    uv_is_readable : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->ioBool
    Totality: total
    Visibility: export
    uv_is_writable : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->ioBool
    Totality: total
    Visibility: export
    uv_stream_set_blocking : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->Bool->ioInt32
    Totality: total
    Visibility: export
    uv_get_write_queue_size : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->ioBits32
    Totality: total
    Visibility: export
    +

    System.UV.Raw.Stream

    (source)

    Definitions

    recordAllocCB : Type
    Totality: total
    Visibility: export
    Constructor: 
    AC : AnyPtr->AllocCB

    Projection: 
    .ptr : AllocCB->AnyPtr

    Hint: 
    ResourceAllocCB
    allocCB : HasIOio=> (PtrHandle->Bits32->PtrBuf->IO ()) ->ioAllocCB
    Totality: total
    Visibility: export
    sizedAlloc : HasIOio=>Bits32->ioAllocCB
    Totality: total
    Visibility: export
    defaultAlloc : HasIOio=>ioAllocCB
    Totality: total
    Visibility: export
    freeAllocCB : HasIOio=>AllocCB->io ()
    Totality: total
    Visibility: export
    uv_shutdown : HasIOio=>Ptrt-> {auto0_ : PCasttStream} -> (PtrShutdown->Int32->IO ()) ->ioInt32
      Shutdown the outgoing (write) side of a duplex stream.
    It waits for pending write requests to complete. The handle should
    refer to a initialized stream.
    The cb is called after shutdown is complete.

    Totality: total
    Visibility: export
    uv_listen : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->Int32-> (PtrStream->Int32->IO ()) ->ioInt32
      Start listening for incoming connections.
    backlog indicates the number of connections the kernel might queue,
    same as listen(2). When a new incoming connection is received
    the uv_connection_cb callback is called.

    Totality: total
    Visibility: export
    uv_accept : HasIOio=>Ptrs->Ptrt-> {auto0_ : PCastsStream} -> {auto0_ : PCasttStream} ->ioInt32
    Totality: total
    Visibility: export
    uv_read_start : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->AllocCB-> (PtrStream->Int32->PtrBuf->IO ()) ->ioInt32
      Read data from an incoming stream.
    The `readCB` callback will be made several times until there is
    no more data to read or `readstop` is called.

    Totality: total
    Visibility: export
    uv_read_stop : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->io ()
      Stop reading data from the stream. The uv_read_cb callback will no longer
    be called.

    This function is idempotent and may be safely called on a stopped stream.

    This function will always succeed; hence, checking its return value
    is unnecessary. A non-zero return indicates that finishing releasing
    resources may be pending on the next input event on that TTY on Windows,
    and does not indicate failure.

    Totality: total
    Visibility: export
    uv_write : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->PtrBits8->Bits32-> (PtrWrite->Int32->IO ()) ->ioInt32
      Write data to stream. Buffers are written in order. Example:

    Totality: total
    Visibility: export
    uv_is_readable : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->ioBool
    Totality: total
    Visibility: export
    uv_is_writable : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->ioBool
    Totality: total
    Visibility: export
    uv_stream_set_blocking : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->Bool->ioInt32
    Totality: total
    Visibility: export
    uv_get_write_queue_size : HasIOio=>Ptrt-> {auto0_ : PCasttStream} ->ioBits32
    Totality: total
    Visibility: export
    diff --git a/docs/uv/docs/docs/System.UV.Stream.html b/docs/uv/docs/docs/System.UV.Stream.html index 2bbdec8d2..d871362bc 100644 --- a/docs/uv/docs/docs/System.UV.Stream.html +++ b/docs/uv/docs/docs/System.UV.Stream.html @@ -61,4 +61,4 @@ -

    System.UV.Stream

    (source)

    Definitions

    dataReadRes : Type->Type
    Totality: total
    Visibility: public export
    Constructors:
    Done : ReadResa
    Data : a->ReadResa
    Err : UVError->ReadResa

    Hints:
    ApplicativeReadRes
    FunctorReadRes
    MonadReadRes
    dataReadResT : (Type->Type) ->Type->Type
    Totality: total
    Visibility: public export
    Constructor: 
    MkReadResT : m (ReadResa) ->ReadResTma

    Hints:
    Applicativem=>Applicative (ReadResTm)
    Functorm=>Functor (ReadResTm)
    HasIOm=>HasIO (ReadResTm)
    Monadm=>Monad (ReadResTm)
    MonadTransReadResT
    runReadResT : ReadResTma->m (ReadResa)
    Totality: total
    Visibility: export
    shutdownStream : UVLoop=> {auto0_ : PCasttStream} ->Ptrt->Async [] ()
    Totality: total
    Visibility: export
    read : UVLoop=>HasUVErrores=>AllocCB->Ptrt-> {auto0_ : PCasttStream} -> (Buffer (ReadResByteString) ->Asyncesa) ->Asyncesa
    Totality: total
    Visibility: export
    write : UVLoop=>HasUVErrores=>Ptrt-> {auto0_ : PCasttStream} ->ByteString->Asynces ()
    Totality: total
    Visibility: export
    listen : UVLoop=>HasUVErrores=>Ptrt-> {auto0_ : PCasttStream} -> (Buffer (EitherUVError (PtrStream)) ->Asyncesa) ->Asyncesa
    Totality: total
    Visibility: export
    +

    System.UV.Stream

    (source)

    Definitions

    dataReadRes : Type->Type
    Totality: total
    Visibility: public export
    Constructors:
    Done : ReadResa
    Data : a->ReadResa
    Err : UVError->ReadResa

    Hints:
    ApplicativeReadRes
    FunctorReadRes
    MonadReadRes
    dataReadResT : (Type->Type) ->Type->Type
    Totality: total
    Visibility: public export
    Constructor: 
    MkReadResT : m (ReadResa) ->ReadResTma

    Hints:
    Applicativem=>Applicative (ReadResTm)
    Functorm=>Functor (ReadResTm)
    HasIOm=>HasIO (ReadResTm)
    Monadm=>Monad (ReadResTm)
    MonadTransReadResT
    runReadResT : ReadResTma->m (ReadResa)
    Totality: total
    Visibility: export
    shutdownStream : UVLoop=> {auto0_ : PCasttStream} ->Ptrt->Async [] ()
    Totality: total
    Visibility: export
    read : UVLoop=>HasUVErrores=>AllocCB->Ptrt-> {auto0_ : PCasttStream} -> (Buffer (ReadResByteString) ->Asyncesa) ->Asyncesa
    Totality: total
    Visibility: export
    write : UVLoop=>HasUVErrores=>Ptrt-> {auto0_ : PCasttStream} ->ByteString->Asynces ()
    Totality: total
    Visibility: export
    listen : UVLoop=>HasUVErrores=>Ptrt-> {auto0_ : PCasttStream} -> (Buffer (EitherUVError (PtrStream)) ->Asyncesa) ->Asyncesa
    Totality: total
    Visibility: export