Skip to content

Commit

Permalink
taste: Small cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
MostAwesomeDude committed Apr 30, 2018
1 parent e30168d commit f9b929e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions docs/source/taste.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ imported from modules.

.. sidebar:: DeepFrozen Module Exports

One of the constraints of :ref:`object capability discipline
<ocap>` is that there is no global mutable state; so exported
objects must be ``DeepFrozen``, i.e. transitively immutable. Since
``main`` calls ``helloWeb``, ``helloWeb`` must be ``DeepFrozen`` as
well. We'll discuss this and other static properties of Monte code
in the :ref:`auditors` section.
One of the constraints of :ref:`object capability discipline <ocap>` is
that there is no global mutable state, so exported objects must be
``DeepFrozen``; that is, transitively immutable. Since ``main`` calls
``helloWeb``, ``helloWeb`` must be ``DeepFrozen`` as well. We'll discuss
this and other static properties of Monte code in the :ref:`auditors`
section.


We declare that this module ``exports`` its ``main`` function, as is
Expand Down
4 changes: 2 additions & 2 deletions docs/source/tut/web1.mt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "http/server" =~ [=> makeHTTPEndpoint :DeepFrozen]
import "lib/http/server" =~ [=> makeHTTPEndpoint]
exports (main)

def helloWeb(request) as DeepFrozen:
def helloWeb(_request) as DeepFrozen:
"Build a simple HTML response."

return [200, ["Content-Type" => "text/html"], b`<p>Hello!</p>`]
Expand Down
8 changes: 4 additions & 4 deletions docs/source/tut/web2.mt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "http/server" =~ [=> makeHTTPEndpoint :DeepFrozen]
import "http/tag" =~ [=> tag :DeepFrozen]
import "formData" =~ [=> fieldMap :DeepFrozen]
import "lib/http/server" =~ [=> makeHTTPEndpoint]
import "lib/http/tag" =~ [=> tag]
import "formData" =~ [=> fieldMap]
exports (main)

object calculator as DeepFrozen:
Expand All @@ -11,7 +11,7 @@ object calculator as DeepFrozen:
match =="POST":
calculator.post(request)

to get(request):
to get(_request):
def body := b`
<form method="POST">
<label>Arbitrary code to execute:<input name="code" /></label>
Expand Down

0 comments on commit f9b929e

Please sign in to comment.