Hi

I am surfing the alice source code and came across ...tools/toplevel/Buffer.aml

which starts like:
-------------------------
import *structure* MkHashImpMap from "x-alice:/lib/data/MkHashImpMap"
import structure Gtk from "x-alice:/lib/gtk/Gtk"
import structure Channel from "x-alice:/lib/data/Channel"
import structure FileDialog from "FileDialog"
import structure Config from "Config"
import structure BufferHighlight from "BufferHighlight"
import structure BufferAnnotate from "BufferAnnotate"

structure Buffer =
  struct
     open Config

     structure Map =* MkHashImpMap(Int)*
---------------------------

Its probably because i dont understand SML in general, but i wonder why this works.
I would assume, that the compiler would reject this.
MkHashImpMap is a functor, but its imported as a structure.
I tried:
   import *functor* MkHashImpMap from "x-alice:/lib/data/MkHashImpMap"
in the toplevel and it seems to be the same to me.

Is a functor a kind of a structure?



Thx,

Max
_______________________________________________
alice-users mailing list
[email protected]
http://www.ps.uni-sb.de/mailman/listinfo/alice-users

Reply via email to