def parse_module_declaration(d, parse_module_info = True):
    try:
        m = None
        if 'module-id' in d and parse_module_info:
            m = parse_module_id(d['module-id'])

        loc = parse_location(d['module-id'].get('location'))
        decl = parse_declaration(d['declaration'])

        if not decl:
            return None

        decl.module = m

        return decl
    except:
        return None
dataset/ETHPy150Open SublimeHaskell/SublimeHaskell/hsdev.py/parse_module_declaration/original