def _load_standard_module_docs(self, module_name):
        if module_name in autocompletion.database.get_cabal_modules():
            try:
                msg = 'Loading docs for {0}'.format(module_name)
                begin_time = time.clock()
                log('loading docs for standard module {0}'.format(module_name))

                with status_message(msg):
                    in_module = autocompletion.database.get_cabal_modules()[module_name]
                    for decl in in_module.declarations.values():
                        decl.docs = haskell_docs(module_name, decl.name)

                end_time = time.clock()
                log('loaded docs for standard module {0} within {1} seconds'.format(module_name, end_time - begin_time))
            except Exception as e:
                log('Loading docs for in-cabal module {0} failed: {1}'.format(module_name, e))
Example #2
0
def load_docs(decl):
    """
    Tries to load docs for decl
    """
    if decl.docs is None:
        decl.docs = haskell_docs.haskell_docs(decl.module.name, decl.name)
Example #3
0
def load_docs(decl):
    """
    Tries to load docs for decl
    """
    if decl.docs is None:
        decl.docs = haskell_docs.haskell_docs(decl.module.name, decl.name)