[m-rev.] Change compiler output to use `.' as module separator

Ralph Becket rafe at cs.mu.OZ.AU
Fri Jan 17 16:07:07 AEDT 2003


Fergus Henderson, Friday, 17 January 2003:
> 
> I'd try renaming the '=..' module as just '.' ;-)
> 
> But yes, that should be sufficient.

How curious: I made the change as per your suggestion:

:- module dot_separator.

:- interface.

:- import_module io.

:- pred main(io::di, io::uo) is det.

    :- module foo_1.
    :- interface.

    :- type foo_1.bar ---> bar.
    :- type foo_1.'234' ---> foo_1.'234'.
    :- type foo_1.'345bar' ---> '345bar'.
    :- type foo_1.'.bar' ---> '.bar'.

    :- end_module foo_1.

    :- module 'foo.'.
    :- interface.

    :- type 'foo.'.baz ---> baz.
    :- type 'foo.'.'234' ---> 'foo.'.'234'.
    :- type 'foo.'.'345baz' ---> '345baz'.
    :- type 'foo.'.'.baz' ---> '.baz'.

    :- end_module 'foo.'.

    :- module ('.').
    :- interface.

    :- type ('.').quux ---> quux.
    :- type ('.').'456' ---> '456'.
    :- type ('.').'567quux' ---> '567quux'.
    :- type ('.').'.quux' ---> '.quux'.

    :- end_module ('.').

:- implementation.

main(!IO) :-
    io__write_string("All's well that ends well.\n", !IO).

However, when I compile it (using either `mmc --make dot_separator' or
`mmake dot_separator.depend; mmake dot_separator') I get

mmc --make-interface  --use-subdirs     dot_separator
mmc --compile-to-c --grade asm_fast.gc      --use-subdirs     dot_separator > dot_separator.err 2>&1
mgnuc --grade asm_fast.gc        --      -I. -IMercury/mihs/. -c Mercury/cs/dot_separator.c -o Mercury/os/dot_separator.o
mgnuc --grade asm_fast.gc        --      -I. -IMercury/mihs/. -c Mercury/cs/dot_separator...c -o Mercury/os/dot_separator...o
mgnuc --grade asm_fast.gc        --      -I. -IMercury/mihs/. -c Mercury/cs/dot_separator.foo..c -o Mercury/os/dot_separator.foo..o
mgnuc --grade asm_fast.gc        --      -I. -IMercury/mihs/. -c Mercury/cs/dot_separator.foo_1.c -o Mercury/os/dot_separator.foo_1.o
ml --grade asm_fast.gc              --    -o dot_separator Mercury/os/dot_separator_init.o \
        Mercury/os/dot_separator.o Mercury/os/dot_separator...o Mercury/os/dot_separator.foo..o Mercury/os/dot_separator.foo_1.o \
              
Mercury/os/dot_separator_init.o: In function `init_modules_type_tables_0':
Mercury/os/dot_separator_init.o(.text+0x1c): undefined reference to `mercury__dot_separator______init_type_tables'
Mercury/os/dot_separator_init.o(.text+0x21): undefined reference to `mercury__dot_separator__foo____init_type_tables'
collect2: ld returned 1 exit status
gmake: *** [dot_separator] Error 1

(the output from `mmc --make dot_separator' is less informative, but
ends with the same problem.)

Whose problem would this be?

	Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list