diff website/src/manual.html.luan @ 693:ca169567ce07

module URIs must now include ".luan"
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 19 Apr 2016 15:54:11 -0600
parents 1e4b0bc0202d
children 5042e487d717
line wrap: on
line diff
--- a/website/src/manual.html.luan	Mon Apr 18 20:40:21 2016 -0600
+++ b/website/src/manual.html.luan	Tue Apr 19 15:54:11 2016 -0600
@@ -1,8 +1,8 @@
-local Luan = require "luan:Luan"
-local Io = require "luan:Io"
-local Html = require "luan:Html"
-local Http = require "luan:http/Http"
-local Shared = require "site:/Shared"
+local Luan = require "luan:Luan.luan"
+local Io = require "luan:Io.luan"
+local Html = require "luan:Html.luan"
+local Http = require "luan:http/Http.luan"
+local Shared = require "site:/Shared.luan"
 
 
 return function()
@@ -1095,7 +1095,7 @@
 
 <pre><%=Html.encode[[
 	local name = "Bob"
-	require("luan:Io").stdout.write( %>
+	require("luan:Io.luan").stdout.write( %>
 	Hello <%= name %>!
 	Bye <%= name %>.
 	<% )
@@ -1770,7 +1770,7 @@
 Example use:
 
 <pre>
-	local Table = require "luan:Table"
+	local Table = require "luan:Table.luan"
 </pre>
 
 <p>
@@ -1789,7 +1789,7 @@
 Include this library by:
 
 <pre>
-	local Luan = require "luan:Luan"
+	local Luan = require "luan:Luan.luan"
 </pre>
 
 <p>
@@ -1955,7 +1955,7 @@
 If the <code>allow_expression</code> parameter is <code>true</code> then the entire text can be nothing more than an expression in which case the chunk returns the value of this expression.
 
 
-<h4 heading><a name="Luan.load_file" href="#Luan.load_file"><code>Luan.load_file (file_uri [, add_extension])</code></a></h4>
+<h4 heading><a name="Luan.load_file" href="#Luan.load_file"><code>Luan.load_file ([file_uri])</code></a></h4>
 
 <p>
 Similar to <a href="#Luan.load"><code>load</code></a>,
@@ -1967,9 +1967,9 @@
 Could be defined as:
 
 <pre>
-	function Luan.load_file(file_uri,add_extension)
+	function Luan.load_file(file_uri)
 		file_uri = file_uri or "stdin:"
-		local f = Io.uri(file_uri,add_extension)
+		local f = Io.uri(file_uri)
 		f.exists() or <a href="#Luan.error">Luan.error</a>("file '"..file_uri.."' not found")
 		return <a href="#Luan.load">Luan.load</a>( f.read_text(), file_uri )
 	end
@@ -2231,7 +2231,7 @@
 Include this library by:
 
 <pre>
-	local Package = require "luan:Package"
+	local Package = require "luan:Package.luan"
 </pre>
 
 <p>
@@ -2253,7 +2253,7 @@
 To load a new value, <code>Package.load</code> first checks if <code>mod_uri</code> starts with "<b>java:</b>".  If yes, then this is a Java class which is loaded by special Java code.
 
 <p>
-If <code>mod_uri</code> is not a Java class, then <code>Package.load</code> tries to read the text of the file referred to by <code>mod_uri</code> (using <code>add_extension</code>=true).  If the file doesn't exist, then <code>Package.load</code> returns <b>nil</b>.  If the file exists, then its content is compiled into a chunk calling <a href="#Luan.load"><code>Luan.load</code></a> and passing in an empty table as the <code>env</code> value.  This chunk is run passing in <code>mod_uri</code> as an argument.  If the chunk returns a value other than <b>nil</b>, then that value is the value of this module.  Otherwise the <code>env</code> that was passed in is the value of this module.
+If <code>mod_uri</code> is not a Java class, then <code>Package.load</code> tries to read the text of the file referred to by <code>mod_uri</code>.  If the file doesn't exist, then <code>Package.load</code> returns <b>nil</b>.  If the file exists, then its content is compiled into a chunk calling <a href="#Luan.load"><code>Luan.load</code></a> and passing in an empty table as the <code>env</code> value.  This chunk is run passing in <code>mod_uri</code> as an argument.  If the chunk returns a value other than <b>nil</b>, then that value is the value of this module.  Otherwise the <code>env</code> that was passed in is the value of this module.
 
 <p>
 If a new value for the module successful loaded, then it is stored in <code>Package.loaded[mod_uri]</code>.  The value is returned.
@@ -2288,7 +2288,7 @@
 Include this library by:
 
 <pre>
-	local String = require "luan:String"
+	local String = require "luan:String.luan"
 </pre>
 
 <p>
@@ -2634,7 +2634,7 @@
 Include this library by:
 
 <pre>
-	local Binary = require "luan:Binary"
+	local Binary = require "luan:Binary.luan"
 </pre>
 
 
@@ -2671,7 +2671,7 @@
 Include this library by:
 
 <pre>
-	local Table = require "luan:Table"
+	local Table = require "luan:Table.luan"
 </pre>
 
 <p>
@@ -2784,7 +2784,7 @@
 Include this library by:
 
 <pre>
-	local Number = require "luan:Number"
+	local Number = require "luan:Number.luan"
 </pre>
 
 
@@ -2825,7 +2825,7 @@
 Include this library by:
 
 <pre>
-	local Math = require "luan:Math"
+	local Math = require "luan:Math.luan"
 </pre>
 
 <p>