Skip to content
  • Edward Z. Yang's avatar
    Support for multiple signature files in scope. · a7524eae
    Edward Z. Yang authored
    Summary:
    A common pattern when programming with signatures is to combine multiple
    signatures together (signature linking).  We achieve this by making it
    not-an-error to have multiple, distinct interface files for the same module
    name, as long as they have the same backing implementation.  When a user
    imports a module name, they get ALL matching signatures dumped into their
    scope.
    
    On the way, I refactored the module finder code, which now distinguishes
    between exact finds (when you had a 'Module') and regular finds (when
    you had a 'ModuleName').  I also refactored the package finder code to
    use a Monoid instance on LookupResult to collect together various results.
    
    ToDo: At the moment, if a signature is declared in the local package,
    it completely overrides any remote signatures.  Eventually, we'll want
    to also pull in the remote signatures (or even override the local signature,
    if the full implementation is available.)  There are bunch of ToDos in the
    code f...
    a7524eae