docs: document managed? primitive (#1244)

* docs: document managed? primitive

* docs: rewrite managed? docs
This commit is contained in:
Veit Heller 2021-06-14 09:50:04 +02:00 committed by GitHub
parent f7785ad93d
commit c149bfa7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,7 +297,7 @@ dynamicModule =
let f = makeUnaryPrim . spath
in [ f "quote" (\_ ctx x -> pure (ctx, Right x)) "quotes any value." "(quote x) ; where x is an actual symbol",
f "info" primitiveInfo "prints all information associated with a symbol." "(info mysymbol)",
f "managed?" primitiveIsManaged "" "",
f "managed?" primitiveIsManaged "checks whether a type is managed by Carp by checking whether `delete` was implemented for it. For an explanation of memory management, you can reference [this document](https://carp-lang.github.io/carp-docs/Memory.html)." "(register-type Unmanaged \"void*\")\n(managed? Unmanaged) ; => false",
f "members" primitiveMembers "returns the members of a type as an array." "(members MyType)",
f "use" primitiveUse "uses a module, i.e. imports the symbols inside that module into the current module." "(use MyModule)",
f "eval" primitiveEval "evaluates a list." "(eval mycode)",