from .haskell import precedenceAnnotations, associativityAnnotations, displayAnnos, literalAnnos, prefixMap
[docs]
class GlobalAnnotations:
def __init__(self, hs_global_annos):
self._hs_global_annos = hs_global_annos
[docs]
def precedence_annotations(self) -> object:
"""
Returns the precedence annotations.
:warning: This functions returns a plain hyphen (haskell) object. Interaction might be difficult.
:return: Plain hyphen object of the precedence annotations
"""
return precedenceAnnotations(self._hs_global_annos)
[docs]
def associativity_annotations(self) -> dict:
"""
Returns the associativity annotations.
:warning: This functions returns a plain hyphen (haskell) object. Interaction might be difficult.
:return: Plain hyphen object of the associativity annotations
"""
return associativityAnnotations(self._hs_global_annos)
[docs]
def display_annos(self) -> dict:
"""
Returns a map on how to display ids according to a format.
:warning: This functions returns a plain hyphen (haskell) object. Interaction might be difficult.
:return: Plain hyphen object of the display map
"""
return displayAnnos(self._hs_global_annos)
[docs]
def literal_annos(self) -> object:
"""
Returns the literal map.
:warning: This functions returns a plain hyphen (haskell) object. Interaction might be difficult.
:return: Plain hyphen object of the literal map
"""
return literalAnnos(self._hs_global_annos)
[docs]
def prefix_map(self) -> dict:
"""
Returns a prefix definitions as map from prefix to definition.
:warning: This functions returns a plain hyphen (haskell) object. Interaction might be difficult.
:return: Plain hyphen object of the prefix map
"""
return prefixMap(self._hs_global_annos)