def haskell_type_view(view, selection = None):
    filename = view.file_name()

    if selection is None:
        selection = view.sel()[0]

    (r, c) = view.rowcol(selection.b)
    line = r
    column = c

    module_name = None
    m = head_of(autocomplete.hsdev_client.module(file = filename))
    if m:
        module_name = m.name

    return haskell_type(view, filename, module_name, line, column)
dataset/ETHPy150Open SublimeHaskell/SublimeHaskell/haskell_type.py/haskell_type_view/original