This syntax represents the exposing declaration for both imports and module headers. For example:
exposing (Foo(..))
exposing (..)
Different kind of exposing declarations
An exposed entity
{ name : String
, open : Maybe Elm.Syntax.Range.Range
}
Exposed Type
exposesFunction : String -> Exposing -> Basics.Bool
Check whether an import/module exposing list exposes a certain function. Will yield True
if Exposing
is exposing everything (All
).
exposesFunction "something" (All someRange) == True
exposesFunction "divide" (Explicit [ Node someRange (FunctionExpose "add") ]) == False
exposesFunction "add" (Explicit [ Node someRange (FunctionExpose "add") ]) == True
operators : List TopLevelExpose -> List String
Collect all operator names from a list of TopLevelExposes
encode : Exposing -> Json.Encode.Value
Encode an Exposing
syntax element to JSON.
decoder : Json.Decode.Decoder Exposing
JSON decoder for an Exposing
syntax element.