Alex Suraci avatar Alex Suraci committed 748812c

more specific method definitions

Comments (0)

Files changed (1)

combinators.atomo

 (c: HTML) input: (name: String) :=
   c input name: name
 
-(c: CHTML) form: (body: Block) action: page :=
-  send: { url | c do: { form: body action: url method: "post" } } next: page
+(c: CHTML) form: (body: Block) action: (page: Block) :=
+  continue: { url | c do: { form: body action: url method: "post" } } next: page
 
-(c: CHTML) link: (str: String) to: page :=
-  send: { url | c do: { a: str href: url } } next: page
+(c: CHTML) link: (str: String) to: (page: Block) :=
+  continue: { url | c do: { a: str href: url } } next: page
 
 
 (w: Website) send/suspend: (body: Block) :=
   { cc |
     w connection respond-to: *request* _? with:
-      (w send: body next: { cc yield: @ok })
+      w (continue: body next: { cc yield: *request* }) (as: String)
 
     w finish yield: @ok
   } call/cc
 
-(w: Website) send: (body: Block) next: (next: Block) :=
+(w: Website) continue: (body: Block) next: (next: Block) :=
   { cc = { r | with: [*request* -> r] do: { next web: w } }
   
     id = uuid!
 (w: Website) respond-with: (body: String) status: (status: Integer) :=
   w connection respond-to: *request* _? with: body headers: w headers status: status
 
-(w: Website) form: (body: Block) action: page :=
+(w: Website) form: (body: Block) action: (page: Block) :=
   with: *request* as: (send/suspend: { url | html: { form: body action: url method: "post" } }) do: {
     page web: w
   }
   *request* _? parameter: name
 
 super join: {
-  send: (body: Block) next: (next: Block) :=
-    *website* _? send: body next: next
+  continue: (body: Block) next: (next: Block) :=
+    *website* _? continue: body next: next
 
   send/suspend: (body: Block) :=
     *website* _? send/suspend: body
   respond-with: (body: String) :=
     *website* _? respond-with: body
 
-  form: (body: Block) action: page :=
+  form: (body: Block) action: (page: Block) :=
     *website* _? form: body action: page
 
   link: (text: String) to: page :=
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.