
TODO List - Erlang -> C compiler

Key:
    + done
    - don't do
    * delay until some other time when I have time
    ? not sure - need more info / thought

30/10/02
    Warning/error when non-existent (wrong # args) local function
        called.

    Should find non-existent records when compiling 
        (see filesystem.erl, set_permission/3)

    fix "--" (clist.c)

    get open_port() working properly.

15/10/02
    Fix problems identifying separate values that have been sent
        close together. recv() often grabs them as one bundle.

20/9/02
    connections to enode (apps/simple/httpd) not going away?
    
10/9/02
    + not all sockets being opened are being closed (sigh)

    problem with spawning - lists need to be Valcopied?

    + problems with simple httpd app closing up - causing hammerhead
        gets to hang.

    must get "when record(Var, recordname)" compiled nicely

    anonymous functions need to get extra params? (required environment
    variables).

    the enviroment the fun is created in needs to "remember" the 
            environment variables the fun needs
            (create a package on {F=function pointer, env vars})
            when it's applied the  F(A,B,E->[0],E->[1], etc) 
            where the extra params are the variables needed by the anon fun.
            ouch.


    nested record accesses (X#Y.rec)#Y.rec don't parse

    strings split across multiple lines don't work

    a bunch of escaped stuff generates warning \+, \$ most notably

5/9/02
    - Seems to be a problem with some case statements causing syntax errors
        (actually a problem with ?defines)

5/8/02
    + make a destructive set_element where appropriate.

    + imported functions should not override local ones of the same name

3/8/02
    - lists.erl:map/3 - broken?

    Line number errors aren't all that accurate

    Small space leak associated with Match() to non function call
        stuff (ie. direct assignment of a tuple not being free):
            T = { empty, empty, empty, empty }
            etc.

2/8/02
    + Function clause guards need to create their own symbol
        table for local free(s) etc. Functions might have to
        track two symbol tables?
        OR param matches should allocate space (it tail_list)
            and should be copied out.

    + Need to free up parameters properly at the end of a tail call
        sequence.
        (need's fixing still)


24/7/02
    + A problem with nested if's in barnes2:compute_acceleration line 115

28/2/02
    Do the sodding testing!

21/2/02
    Ensure an appropriate event is sent to each monitoring process
        so it (can) halt.

20/2/02
    + Process management - actually cull dead process from the process
        space (run the main process in the background?)

11/2/02
   mangle.cc - should parse entered strings for special chars
    (such as \n, etc)

21/1/02
    + Warning: still possible evaluation ordering problems with ifs embed'ed 
        in a list build (etc).

14/1/02
    Strings over multiple lines (with no joiner)

2/1/02
    + Problems with 'case'

    + Problems with 'if'
        + ifval assignment not emitted as precode.

    Scope problems with getting variables into anonymous functions
        (no nested functions in C alas,
        need major rework to support them properly)

24/12/01
    + A bunch of things to do to fix anonymous function output
        (don't want name mangling, don't want merged functions, etc)

5/12/01
    "blah\$" screws up when translated to C.
        should be "blah\\$"?

2/12/01
    httpd_conf.erl:484: warning: unknown escape sequence `\$'
    clean(String) ->
        {ok,CleanedString,_} = regexp:gsub(String, "^[ \t\n\r\f]*|[ \t\n\r\f]*\$
        ",""),
            CleanedString.


15/11/01
    Get monitoring stuff working (need to test it!) --
        (passed to monitoring process)

        + (FIX) catch

        + explicit throw

        internal throw 

        + (FIX) cross-module function calls

        + (FIX) process creation
        
        process death (shutdown and crash)


10/11/01
    + Fix NewRecord so make_tuple() is outputted properly.

19/10/01
    + Ensure named vars are assigned to where specified
        (see ExprList assign() problems)

    + Order of pre_code / actual code. Precode must
        be outside a "deep" exprlist but after other
        code statements in the outer exprlist.
    
    catch() expression problems

25/09/01
    + Add in named vars for "if" statements (instead of _ret).

20/06/01
    + "if" is only emitting an assignable symbol and not
        the precode which generates it (see 21/05/01).

    + blah#rec.x - not working

28/05/01
    + ExprList::emit_nonlocal doesn't work with the changed EList::emit_code
        fix one of them (also see ExprList).
        
21/05/01
    + if used as an embedded expression, ie.
      expr({'receive',_,Opts,To,ToOpt}, I, _, Hook) ->
        I1 = I + 4,
        [if                     %Must special case no options
        Opts /= [] ->
             options(Opts, I1, 'receive', Hook);
        true ->
            unquoted('receive')
        end,
        %% Now for the timeout bit.
        nl_indent(I),
        unquoted('after')];


14/05/01
    Include (erlang.l) depth counter/stack doesn't work properly
        it continues to increment for each file included but only
        decrements once per nesting level.

    + Problems on erroring out on -include & -includelib

    Preprocessor directives -ifdef -else -endif (ARGH!)

    + Support define's in -records.

23/04/01
    + Records:  S#rec{blah=X}

    + Anonymous functions still causing syntax problems, ie.
    get_all_mails(S,L) ->
    F = fun({N,_}) ->
        case epop:retrieve(S,N) of
            {ok,Msg} -> show_msg(S,N,Msg);
            Else ->
            epop:quit(S),
            io:fwrite("Retrieve of message ~w failed !!",[N]),
            throw(retrieve_failed)
        end
    end,
    etc.

    Another syntax problem with "of":
    start(Epop) when pid(Epop) ->
    case whereis(?SERVER_NAME) of
    Pid when pid(Pid) -> {ok,Pid};
    _ ->
        Pid = spawn_link(?MODULE, init, [Epop]),
        register(?SERVER_NAME,Pid),
        {ok,Pid}
    end.

    Need to add own inet.hrl - barfs on standard erlang one.


30/11/00
    + case (& receive) stmts cause problems when used as such:
        Curr = case X(x,z) of Pat -> what; Pat -> what end 
        compiled as (blah = t = xyass; if (pat(t)) -> what; if (pat(t));)

    itemer() & getitemer() for timing events.

12/06/00
    Ensure strings are automatically concatenated when given 
        as so:  "first " "second " "third"

    + Preprocessor directive: ?MODULE

29/05/00
    Write support functions for list comprehesions in lib. 

14/05/00
    + Emit code for anonymous functions 

17/03/00
    + List comprehensions parsing

    + Parse anonymous functions

18/02/00
    + Get records working
        fix find_record() to deal with lists of expressions.

24/11/99
    + Problem with "vx" temps being used in function calls to bif
    (and other directly imported functions)

23/11/99
    + Get list concatenation working.

    + Fix Match() to emit checks for constants and checks
        on tuple/list lengths.

    Passing file descriptors (and other I/O resources) between
    spawned processes? (file descriptor should have type LT_port perhaps)
        Don't exec after forking?

4/1/99
    + Make all processes spawned by enode?
        So it can catch failures and pass them onto registered processes?

9/12/98
    - In new list scheme "e" with an allocated "start" in a 
    list struct mustbe the lowest value in any list using that
    struct.

27/11/98
    + A problem with list tailings of patterns.

    Should only "import" the specified functions
        (otherwise it finds stuff in the imported file instead
        of the local file) 

25/11/98
    ? Two lists pointing to the same head can both free the   
        list (this is bad - need to ensure this doesn't happen).
        Use Boehm's GC to deal with this (don't let them be 
            freed by the program explicitly)

24/11/98
    + Signifcant problems with setjmp/longjmp on the SPARC architecture;
        these are WAAY slow and not viable as mechanisms for
        LCO (especially within a function).
        (using while(1) continue instead)
    
23/11/98
    + Econcatvl - ensure first param is heap allocated!
            (especially atoms/tuples)
            Don't free up the "l" value (shouldn't be freed anyway).

17/11/98
    - Allocation and GC stuff:
        Allocate tuples, list headers, etc on stack
        Copy non-Val size types onto heap when returning from a Val
            (guaranteeing a return value is stack allocated)
        All values assigned from a function call must be
            freed UNLESS they're subsequently returned to another function
        Tuple/List elements (index_tuple etc) which are incorporated
            into a return value (or are the return value) must 
            modify the value to be freed so it doesn't free the indexed
            element
        LCO stuff:
        FUCK IT - just use Boehm's GC.
    
16/11/98
    + Things index'ed from tuples need to be marked "local"
        so they're Valcopied in LCO recursion...

10/11/98
    - Improve type inferencing to infer the return type of functions
        in the code itself (especially for self-recursive calls?)

5/11/98
    + Some parameters being to a final function call are being
        freed before being passed.

29/10/98
    + Fix the typing stuff in erlang.y (see nucleic2.erl)
        Problems with floats, also bif_float(X) should be recognised
        by the parser (as a type check!).

28/10/98
    + Make the same "Variable" nodes be shared?

27/10/98
    Emit global assembly labels for "goto"s to functions..
        How to deal with parameters?
        (only goto funcs <= current # params)
        (must generate .global fun before a new block for locals __vvv, etc)
        Allocation issues?

22/10/98
    - Unrolling recursion (how much speed up for nrev?)

21/10/98
    - Two heap types LT_list_simple, LT_list
        Direct free without going through list
        Same for tuples

    Tuple allocation/deallocation:
        FINISH: tuple.cc
                freesym() dependencies (throughout).

+ 15/10/98
    Fixing case/receive output:
        depth stuff needs to be fixed up.
        depth 0 currently represents two things:
            return _ret at end... &
            delimit by ";"
        we need to be able to delimit by ";" and not return _ret..

14/10/98
    When assigning values to be returned or assigned to params
        they should not be freed (by a "jump" step - must
        trace right back) (Match statement?).

    Do some clever stuff with constant atoms (and other values?)

    - A shared string library for atoms?

    - List deallocation problems when there are multiple heads
        into a single list?

    + qsort/smith both still space leak.

    Check for excess deallocation of list elements


13/10/98
    Identify list elements removed as heads and concatenated later?
    
12/10/98
    + Consider using list Vals as a direct pointer to head of
        list (wouldn't need to be copied than, more cost on list size stuff).

    + For cons lists compile Val->head->next->next .. etc?
        
11/10/98
    "0" must be LT_number & LT_real?

    EValcopylist, EValcopytuple, etc.

    Eliminate EValrcopy/EValrfree? Hows?

7/10/98
    Memory problems:
        Valrcopy stuff being passed into sub-functions..
    
        tail_lists being local and sharing a pointer to heap allocated lists
    
2/10/98
    + Fix active_table stuff to point to the function's symbol table
        (for LCO).

1/10/98
    Some fixes need to case stmts (the L labels..).

    + Identify functions where set_stack/cut_stacks need to be emitted
        (function list needs to know which functions make LCO_localfun calls)

    + Perhaps beyond the assign() function in Node we should have a
        c_stmt() call which allows us to know if it emits a statement
            (we can create temps to handle them then).
        if, case, receive, begin/end, others?

28/9/98
    + Fix call.c so it doesn't continually re-open already open
        shared objects 

    + Ensure parameter returns are EValcopy'ed in functions
        which call themselves (LCO_localfun)

    + Emit set_stack() & cut_stack(sp) operations

25/9/98
    + Fix Free's to come before 'goto's in LCO (not after).
        Also EValfree all params and EValcopy them for the next iteration 

24/9/98
    + Fix the temporary variable allocation problem assocaited
    with different orderings of T_after in receive_expr.

23/9/98
    + EValfree need to be emitted appopriately at the end of
        conditional branches (since a value may not be assigned to them)

21/9/98
    + Consider implementing lists as a bunch of variable length
        cons cells.

    + In Econcatvl - list should be computed after value
        (currently it's the other way around).

    Go through all memory allocation with a fine tooth comb.

17/9/98
    + Fix up LCO.
        (only within functions)

    Unlimit (or limit to very large) on stacksize.

16/9/98
    + Add a virtual (set_free()) function to Nodes.
        exprlist calls set_free() on all nodes except the final one..
        set_free() pretty much allocates assigns free vars where
        necessary.

11/9/98
    ? Do list (& tuple) copies and free need to be deep or shallow?
        (do we need separate on heap types for this?)

    + Emit EValfree's in the correct locations.

    + Defines

    + Includes

7/9/98
    + Fix functions which end in _1 (_2, _3, etc).
        fails when we have a function x_1 and try and add x/1
            (which becomes x_1) or vice versa?

2/9/98
    + Make funccall(__vvv, EValatom("blah") work without trashing
    the first __vvv (ensuring it's pushed onto the stack properly).

27/8/98
    - Make all numbers into floats?
        (avoids if checks in many functions)
        damn bit operations!

26/8/98
    + In lib code
        funcall( (listalloc(0), listalloc(1) )
        {
            /* does the first var or call stack get trashed? */
        }

    + gcc bug?
        see nrev.ok.s & nrev.bad.s
        (yes there is - hacked to compile differently)

17/7/98
    + Make lists non-single allocation,
        dual allocation for list structure and contents
        (makes tail_list much much quicker)

14/8/98
    + Implement Binary operations with types for all operations
            ie. plusvi (plus Val Int)                                             

7/7/98
    + Monitoring support - see erlib/MONITOR
        + ensure monitor is checked for and spawned

    + Fix math.erl

6/7/98
    Optimisations:
        a built-in zero-length list?
        all arithmetic functions with types 
        

    listalloc() coming outside Econcat sometimes, should be inside
        next to Emake_list.

3/7/98
    CONSIDER: emitting entire module as one code block,
        use some sort of `trampoline' to jump into the correct places.
        . need a global structure with pointers to functions
            (for subroutine and for LCO goto)
        . LCO becomes easy locally
        loading a module loads all funs into a hash table for lookup 
        lookup on call...

        OR as one global function with nested functions?
            (declare labels in the outer global)
            (can then goto or gsub locally - externally?)

2/7/98
    + Make anthing that is "return"ed copied so it is "malloc"ed?

1/7/98
    + Fix bif.erl and 
        erlang.erl to work with new allocation scheme

    + Econcat - fix to alloca

    + Copying return values where necessary?

29/6/98
    + make_tuple, make_list and any other allocations requiring
        non-stack memory allocation need to take as a parameter a 
        pointer to space.

24/6/98
    Emit TC directly into the code where necessary;
        some pattern matching implicitly type checks

    + Create operations for constants/val pairs

    Constant folding

31/5/98
    + Implement some sort of garbage collection scheme
        allocas where possible in code
        return types on heap?
        tag allocated types?

27/5/98 
    + Work out why I'm adding symbols twice in erlang.y
        (for case clauses and case statements, receive too)
        Why does it seem to work?
        [ cause the tables are chained... ]

    Some tuple pattern matching not quite right
        see t5.erl when compiled 'fuddle' should be an equalvs thing..

26/5/98
    LCO between functions:
            . use `trampolines'?
            . use setjmp/longjmp, a table and static parameter space
            . emit some assmebly to do direct jumps?
            . labelled gotos with a longjmp() return to clear up stack?
                need to ensure enough space allocated for parameters
                of called functions

24/5/98
    * How much of gerl can be written in Erlang?

21/5/98
    /= and =/= need to be fixed.

    + BUG "after" clause of receives.
        generate receive as a conditional:
            (cR = receive(time)) ? (pattern matches) : (after clause)

20/5/98
    + Generate runtime failures for failed 
        + if
        + BUG case
        + BUG (receive?) matches

19/5/98
    + problems with x = 
        + if
        + BUG receive
        + BUG case 

15/5/98 
    + A return statement should only be inserted on
        exprs which are in the `outer' scope
        (not in case statements and the like)

14/5/98
    BUG Correct receive semantics. Unmatched messages should not
        be nuked they should be queued for another receive().
        (perhaps goahead needs a location specifier attached
            to the receive variable?)

13/5/98
    BUG: Sometimes on creation the inital method doesn't come
        in time and the receive hangs. It should be non-blocking;
        sleep and try again.

7/5/98
    + Stack based allocation (alloca) of all structures?

5/5/98
    + Add to `gerl':
       A flag to indicate `fetch call' from <local server port>
       which tells it which functions to run this gets around the 
       problem limited argv[] lengths        

    + Fix up the Mangle class to use a Val of T_list instead of a deque

    Fix demangle() & mangle() and eliminate Call() -> instead
        use Ecalllist.

29/4/98
    + LIB: deep-copy

    + fix so EValcopy is used where it should be - it should deep-copy
        lists and tuples
        
20/4/98
    + flatten/unflatten values for sending/receiving

    + implement an Erlang Node which handles message passing

    implement name registry in the Erlang Node

31/3/98
    Implement monitors (after send/receive)

30/3/98
    - Consider make "Val"s a single linear block of memory?

27/3/98
    * Thrown errors should indicate line numbers?

26/3/98
    + Finish error handling

23/3/98
    + Spawning support
    
19/3/98
    + Esend & Ereceive and PIDs (and groups) need work.

12/3/98
    Compiler error reporting:
        Compiler should warn of functions it can't find?

        doesn't recognise unterminated '.' clauses properly
        bug compiling bif.e - failed to identify two erase() functions?

	    Ensure imports / exports are verified
		- don't need an imported module to compile?
	
	    Line numbers and better compile time error reporting

    + pragma should work outside functions

    + Fix emitting matches inside function calls (grumble)

10/3/98
    - Need to fix prototypes to include external function calls?
      + wrapped in Ecall() stuff instead

6/3/98
    + Set the nesting depth for determining eol chars
        and for determining LCO possibilities

5/3/98
    + Fix semicolons (get rid of them?)
        (partly fixed)

4/3/98
    - extend grammar to handle erlang':'blah in guard_call
        this is just the stupid erlang pre-processor
        my compiler can ignore this

    floating point numbers with extended based 1.0000e-2
        in erlang.l are broken it seems

24/2/98
    + process spawning
        simply use exec()

    - must emit some code in a .so _init function that loads up
      other modules (where necessary)

23/2/98
    + "string" - should be a list. Should we handle them as a special
        case or just generic lists?

    + type checking in libs not throwing errors yet

13/2/98 
    ? floating point not working properly.

    + Scoping not quite right in case statements.
        Variables need to be declared in the outer scope
        (just maintained in an inner symbol table for pattern
         matching stuff - sigh)

	+ Add $\123 support (for character ordinal values)
    
    
12/2/98
    + Bug: Before = union(Vs, Ns = expr(To, Vs)),                  
        compiles as:
           cM18 = ordsets_union_2(Vs, cM17 = erl_lint_expr_2(To, Vs);
               Ns = cM17);                                                                All match assignments  should be moved before the statement?
                (do we get strange semantics then? if no side-effects then ok)
         

    + base 16 numbers apparently: max_timeout() -> 16#0800000.                        

11/2/98
    + Unary minus (Epreminus) seems fucked.

    + Finish the receive statement (similar to case)

    Add in # directives to indicate the corresponding .erl
    file for error reports from the C compiler

    ? "_" just gives the parameter (instead (1))

	? if two params have same name not always checked as equal

	+ No error handling calls at the end of each function list

	Comparison between tuples (if same param name)

6/2/98
    + Imports are being declared as if the functions were local
        (instead of from the imported package!)

5/2/98
    + introduce a pragma C { ... } directive to allow direct C source


4/2/98
    minor bug resulting in a function predeclaration not being done properly.
        function end in "_1" (etc) can cause name mangled names not to be
        added to symbol table

    + Match statements should be their own block (including symbol table)
        to handle the pattern matches properly


3/2/98
    + fix symbol tables up  (an emit_symbol task?)

    + change emit_param => emit_pattern

    ? simplify grammar to remove pattern/expr/guard duplicity
        (you either emit_pattern, emit_code or emit_guard)

2/2/98
    + Pattern Variables should only be added to the symbol table 
        if they're part of a pattern match
            (not of an expression unless a LHS expression?)

    + Some pattern variables not being added to the symbol table properly(?)

    + assignments (variable creation) x = 123. x not being added to symbol table

30/1/98
    + catch statements should emit something!?

    + case statement "when" clauses:
        should emit "else" when there's no "when"
        otherwise no else statement

    + case pattern matches not emitting assignments 

28/1/98
    In erlang.y
        + "cr_head" needs to set the new symbol table before invoking "pattern"

        + case labels need to be added to CurrentTable properly

        + "pattern" - basic patterns (atoms) need to be added into the 
              current symbol tables

        + Pattern classes need their emit_patterns() fixed

16/1/98
	+ "case" statement broken
		+ "case" to be if else if else (instead of if if if)
        + "case" clauses pattern matching not working properly

13/1/98
	+ Pattern matching not working properly (LHS especially)
        + tuples
        + lists
        + atoms

	get static compilation working


18/11/97
	Erlangshell needs to be extended and fixed to cope
	with other types AND with empty (0 length) functions

11/11/97
	+ Fix problem with ()'ed operands in expression lists

	+ guard_expr_list

28/10/97
	+ "receive" statement broken

	+ Add $. support (for character ordinal values)

7/10/97
	Implement an "arena" memory allocation scheme for
		cleaning up allocated objects on a "throw()"
			(to get bounded space guarantees)
		Useful for deallocating memory after a longjmp!

	+ Atoms not being properly identified in if() stmts.

3/10/97
	+ Use an environment variable (ERLANG_LIB) to specify the 	
	  paths to search for imports? 
      LD_LIBRARY_PATH is better!

	- Support environment variables in "gerl"

	+ List parameters to functions not being converted to C code properly

	+ Functions with 0 parameters aren't processed properly


23/9/97
	Comprehensive documentation required.

	? Implement a "noimports" flag for compiling erlang (& bif)

	A mode to spit out the parse-trees would be nice
		
	- Split the import / export / module forms in the grammar
			(easier to handle)

15/9/97
	Fork compiler to get non-compiled modules compiled.

19/8/97
	+ The `import' process:
		+ An imported module must be already compiled.
			(error - or go and compile it)
		+ Get symbol tables from the imported modules
			- Add to Program symbol table (use Clash where necessary)
		- Function scoping:
			Check to see if its a local function in the module
			Check import modules (in order) complain about ambiguities
			Generate a compile error
		+ Standard functions XX__exports()
		+ Generate prototypes for the .c file from the symbol tables
		+ "bif" and "erlang" and standard imported modules
		  (bif must compile without imports, erlang must compile
		   with only bif). Or should bifs be in the shared library?


22/7/97
	+ Ten bugs are calling:
		+ 1. BIFS (import,export)
		+ 3. Checking [ E ] in pattern match
		+ 4. [ H | T ]  - H not being assigned to Ehead_list(pX)
		+ 6. "when" guards not compiled in 
		+ 8. Tuple name assignment from parameters

	+ Create two "standard" imported modules:
		+ bif (for built in functions: maybe handcrafted)
		+ erlang (as above)

	+ Consider parallel communications stuff
		- managing the name/id space
		+ using TCP/IP sockets 
	
	+ Error Handling:
		+ catch & throw
		- an "error" value that can be passed around?
		  (at the end of all patterns matches, a check at the start
		  for an error value?)
		+ each process/thread needs its own errors handling state

	- Consider:
		- making each function clause a separate function in Erlang
		  which name mangling which includes parameter types
		  (need to chain calls for "when").

15/7/97
	+ Exports / Imports:
		+ .h or compilation function?
			(compilation function)
		+ orthogonal way so library stuff (bifs etc) can be handled 
			in a "default" manner

	+ Generate default errors if pattern matching falls through

	References (unique names on a node)
	
	+ Binary data type?

	Last call optimisation:
		+ determine when there's no "delay" needed.
		+ set variables = new values
		+ goto appropriate location
		. how to determine a possible recursive loop (among many functions)
			&& then determine if we can optimise?
		. START: only to LCO in the one function
        . LCO across multiple functions?

8/7/97
	+ Case / Case clause fixes still needed.

	? Built in functions (List BIFs):
		integer_to_list(1234) -> a list of [ 1, 2, 3, 4 ]
		float_to_list()
		atom_to_list()
		list_to_atom()
		list_to_float()
		list_to_integer()
		hd(L), tl(L), length(L)

2/7/97
	Modify the lexer (or create a new one!) to work with strings and / or files.

1/7/97
	Write short statement about the changes to the language
	for the formal language defintion, especially:
		- killing stuff gracefully
		- process monitoring support stuff

	+ Identifying atom's problem (with lower case errors).
		value is not an identifier (it's 'value' an atom).

17/6/97
	+ Fix "case" output

	+ Ensure that variables named "Val" (and other types in C) are
		transformed to something the compiler can handle.

10/6/97
	+ Add "case" statements to grammar 

	+ Do "_" variable support (dammit)
		. implement a special (series) of variables to ignore :-)

3/6/97
	+ Dynamically loaded libs must be kept in memory
		until they're manually "updated".

	Old modules must be moved (not deleted) in code is
		running that is using it (can we detect for deletion later?)
		(some sort of ref counting on running modules?)

	Each module name shall be moduleXXXX (XXXX - unique id #);
		it's "init()" function shall inform the system of what it's
		real module name is (fully qualified calls must go through a
		map; they need to check to load up new modules anyway).

	Collections:
		(steal from Ada :-)
		Higher level mechanism to interface to existing modules
		(call them "collections"). This allows us to import
		arbitrarily and create a new set of exports (and interface)
		with "renaming" (or delegation?) facilities.
		This allows us to create replaceable subsystems.
		Collections need to be arbitrarily nestable.
			. name mangling (how?)

	Gerl:
		+ compile command line stuff?
			(instead of the current hack).
		. No interpreter - rewrite lexer to handle strings instead.


27/5/97
	+ Make erlib shared so that dlopen() etc can
	  actually link with it?
	  (could simply link with it for every object)

13/5/97
	Create a module__init() function which is run when loaded
		. export module_function into dynamic lookup table
		. run the module__init()s of import modules
		. verify export list
		. generate .h files from export list
		(note: shared libs have a _init() function run on loading - hmm).

	Two versions (compile option):
		. static
			Emit #include's for imported code?
				. (static linking only)
		+ dynamic
			. Non-local function calls?

	+ Multi-threading stuff
		. vfork() and do what?

	+ Build a `erx' erlang execution stub (command line or
	  interpreter style) to load and execute functions.
        (actually I called it gerl)

6/5/97
	+ Ensure local variables are assigned their parameter
	  values if appropriate.

29/4/97
	+ Add in check for "equal" parameters.ie range(N,N) -> ...
		(need symbol table)

	+ Get "return"s in the correct place
		(done correctly? check deeper nesting)

22/4/97
	+ Create symbol table
		- output mapping before exprs

	+ Rework erlang.y so that "|" (element to list concatenation)
		is a binary operator.
		(|x is always at the end; used different solution)

15/4/97
	+ Get pattern matching parameters (head/tail/etc)	working
	  (need to pass the parameter as a black box unit - ie. a string?)

	+ Assign values to parameters

30/3/97	
	+ Fix-up (rename) the PatternList PatternTail PatternT classes
	  (to Patterns PatternList and PatternTail respectively)

?/?/96
	Build a test suite.

	Detail non-conformant changes.

	+ How do we interface the interpreter and the object code without
   	  using a virtual machine?
		. shared libraries and dload()
		. static linking: need a "main" function somewhere
		. Work out how to do imports nicely
		  (use shared library support)

	+ Need a type heirarchy (build in with the AST?)
		[ changed to C++ ]

	+ For assignment need to add declarations for use once values.

	Code generation for spawning monitors?

	+ Erlang library including --
    	* List / Tuple library
    	* Socket / process support library

	+ Multiple process support (erlang `spawn' command)?
        - can we fork then dynamically load a module
          and pass back the handle (to the main process) so we
          can call functions in that module?
          (termination problems?)
        - alternatively use execl (etc) to spawn a "stub"
          process with parameters including the dynamic module to
          load and the parameters to pass to it!
		- recompile kernel to support 1024 processes per user

	One day rewrite the compiler in Erlang!
		( should perform at the same speed as C++ version )


