better docs
This commit is contained in:
@@ -4,13 +4,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="../style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<a href="http://github.com/carp-lang/Carp">
|
<a href="">
|
||||||
<img src="logo.png">
|
<img src="">
|
||||||
</a>
|
</a>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
zlib
|
zlib
|
||||||
@@ -56,25 +56,6 @@ levels are defined in <a href="#ZLevel"><code>ZLib.ZLevel</code></a>, and are <c
|
|||||||
default.</p>
|
default.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="binder">
|
|
||||||
<a class="anchor" href="#ZBytes">
|
|
||||||
<h3 id="ZBytes">
|
|
||||||
ZBytes
|
|
||||||
</h3>
|
|
||||||
</a>
|
|
||||||
<div class="description">
|
|
||||||
module
|
|
||||||
</div>
|
|
||||||
<p class="sig">
|
|
||||||
Module
|
|
||||||
</p>
|
|
||||||
<span>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
<p class="doc">
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="binder">
|
<div class="binder">
|
||||||
<a class="anchor" href="#ZLevel">
|
<a class="anchor" href="#ZLevel">
|
||||||
<h3 id="ZLevel">
|
<h3 id="ZLevel">
|
||||||
@@ -108,7 +89,7 @@ default.</p>
|
|||||||
defn
|
defn
|
||||||
</div>
|
</div>
|
||||||
<p class="sig">
|
<p class="sig">
|
||||||
(λ [&String] (Result ZBytes String))
|
(Fn [(Ref String a)] (Result ZBytes String))
|
||||||
</p>
|
</p>
|
||||||
<pre class="args">
|
<pre class="args">
|
||||||
(deflate s)
|
(deflate s)
|
||||||
@@ -132,7 +113,7 @@ well, and an <code>Error</code> returning an error message otherwise.</p>
|
|||||||
defn
|
defn
|
||||||
</div>
|
</div>
|
||||||
<p class="sig">
|
<p class="sig">
|
||||||
(λ [&String, ZLevel] (Result ZBytes String))
|
(Fn [(Ref String a), ZLib.ZLevel] (Result ZBytes String))
|
||||||
</p>
|
</p>
|
||||||
<pre class="args">
|
<pre class="args">
|
||||||
(deflate-with s level)
|
(deflate-with s level)
|
||||||
@@ -155,7 +136,7 @@ well, and an <code>Error</code> returning an error message otherwise.</p>
|
|||||||
defn
|
defn
|
||||||
</div>
|
</div>
|
||||||
<p class="sig">
|
<p class="sig">
|
||||||
(λ [ZBytes] (Result String String))
|
(Fn [ZBytes] (Result String String))
|
||||||
</p>
|
</p>
|
||||||
<pre class="args">
|
<pre class="args">
|
||||||
(inflate s)
|
(inflate s)
|
||||||
|
15
gendocs.carp
15
gendocs.carp
@@ -1,13 +1,10 @@
|
|||||||
(load "zlib.carp")
|
(load "zlib.carp")
|
||||||
|
|
||||||
(defndynamic gendocs []
|
(Project.config "title" "zlib")
|
||||||
(do
|
(Project.config "docs-directory" "./docs/")
|
||||||
(Project.config "title" "zlib")
|
(Project.config "docs-logo" "")
|
||||||
(Project.config "docs-directory" "./docs/")
|
(Project.config "docs-styling" "../style.css")
|
||||||
(Project.config "docs-logo" "")
|
(Project.config "docs-generate-index" false)
|
||||||
(Project.config "docs-styling" "style.css")
|
(save-docs ZLib)
|
||||||
(Project.config "docs-generate-index" false)
|
|
||||||
(save-docs ZLib)))
|
|
||||||
|
|
||||||
(gendocs)
|
|
||||||
(quit)
|
(quit)
|
||||||
|
17
zlib.carp
17
zlib.carp
@@ -41,14 +41,13 @@ default.")
|
|||||||
; i tried doing this in carp, but it’s a bit of a pain to wrap the API
|
; i tried doing this in carp, but it’s a bit of a pain to wrap the API
|
||||||
; idiomatically, so for now you’ll only get regular inflation and deflation
|
; idiomatically, so for now you’ll only get regular inflation and deflation
|
||||||
(defmodule ZLib
|
(defmodule ZLib
|
||||||
(doc ZBytes "is an opaque bytes type with an associated length.")
|
|
||||||
(register-type ZBytes [
|
(register-type ZBytes [
|
||||||
len Int
|
len Int
|
||||||
bytes String
|
bytes String
|
||||||
])
|
])
|
||||||
|
(private ZBytes)
|
||||||
|
(hidden ZBytes)
|
||||||
|
|
||||||
(private ZRes)
|
|
||||||
(hidden ZRes)
|
|
||||||
(register-type ZRes)
|
(register-type ZRes)
|
||||||
(defmodule ZRes
|
(defmodule ZRes
|
||||||
(register ok? (Fn [&ZRes] Bool) "ZRes_is_ok")
|
(register ok? (Fn [&ZRes] Bool) "ZRes_is_ok")
|
||||||
@@ -56,12 +55,9 @@ default.")
|
|||||||
(register str (Fn [ZRes] String) "ZRes_str")
|
(register str (Fn [ZRes] String) "ZRes_str")
|
||||||
(register err (Fn [ZRes] String) "ZRes_err")
|
(register err (Fn [ZRes] String) "ZRes_err")
|
||||||
)
|
)
|
||||||
|
(private ZRes)
|
||||||
|
(hidden ZRes)
|
||||||
|
|
||||||
(doc ZLevel "is a type used in conjunction with
|
|
||||||
[`deflate-with`](#deflate-with). It controls the compression level.
|
|
||||||
|
|
||||||
The constructors are `NoCompression`, `BestSpeed`, `BestCompression`, and
|
|
||||||
`DefaultCompression`, which is, well, the default.")
|
|
||||||
(deftype ZLevel
|
(deftype ZLevel
|
||||||
(NoCompression [])
|
(NoCompression [])
|
||||||
(BestSpeed [])
|
(BestSpeed [])
|
||||||
@@ -76,6 +72,11 @@ The constructors are `NoCompression`, `BestSpeed`, `BestCompression`, and
|
|||||||
(BestSpeed) 1
|
(BestSpeed) 1
|
||||||
(BestCompression) 9
|
(BestCompression) 9
|
||||||
(DefaultCompression) -1)))
|
(DefaultCompression) -1)))
|
||||||
|
(doc ZLevel "is a type used in conjunction with
|
||||||
|
[`deflate-with`](#deflate-with). It controls the compression level.
|
||||||
|
|
||||||
|
The constructors are `NoCompression`, `BestSpeed`, `BestCompression`, and
|
||||||
|
`DefaultCompression`, which is, well, the default.")
|
||||||
|
|
||||||
(private inflate-)
|
(private inflate-)
|
||||||
(hidden inflate-)
|
(hidden inflate-)
|
||||||
|
Reference in New Issue
Block a user