diff --git a/CHANGELOG.md b/CHANGELOG.md index c64e9efab..e9a6b265a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ - Changed `Elm.Syntax.Declaration.Declaration`: - Removed `Destructuring` variant (it was not possible to get) - `PortDeclaration` documentation's is now attached to the declaration - - `PortDeclaration Signature` -> `PortDeclaration Port` where `type alias Port = { documentation : Maybe (Node Documentation), signature : Signature }` + - `PortDeclaration Signature` -> `PortDeclaration { documentation : Maybe (Node Documentation), signature : Signature }` - The comment for the port declaration is now removed from the `Elm.Syntax.File.File.comments` field. - Add a new module `Elm.Syntax.DeconstructPattern` which mimics `Elm.Syntax.Pattern` but for patterns in functions and let declarations. diff --git a/elm.json b/elm.json index 3a96a7ff0..3c1b3351e 100644 --- a/elm.json +++ b/elm.json @@ -19,7 +19,6 @@ "Elm.Syntax.ModuleName", "Elm.Syntax.Node", "Elm.Syntax.Pattern", - "Elm.Syntax.Port", "Elm.Syntax.Range", "Elm.Syntax.Signature", "Elm.Syntax.StringLiteralType", diff --git a/src/Elm/Syntax/Declaration.elm b/src/Elm/Syntax/Declaration.elm index 4e03dc62a..651d458a8 100644 --- a/src/Elm/Syntax/Declaration.elm +++ b/src/Elm/Syntax/Declaration.elm @@ -16,9 +16,11 @@ These can be one of the following (all declared in `Declaration`): -} +import Elm.Syntax.Documentation exposing (Documentation) import Elm.Syntax.Expression exposing (Function) import Elm.Syntax.Infix exposing (Infix) -import Elm.Syntax.Port exposing (Port) +import Elm.Syntax.Node exposing (Node) +import Elm.Syntax.Signature exposing (Signature) import Elm.Syntax.Type exposing (Type) import Elm.Syntax.TypeAlias exposing (TypeAlias) @@ -29,5 +31,5 @@ type Declaration = FunctionDeclaration Function | AliasDeclaration TypeAlias | CustomTypeDeclaration Type - | PortDeclaration Port + | PortDeclaration { documentation : Maybe (Node Documentation), signature : Node Signature } | InfixDeclaration Infix diff --git a/src/Elm/Syntax/Port.elm b/src/Elm/Syntax/Port.elm deleted file mode 100644 index da56fb815..000000000 --- a/src/Elm/Syntax/Port.elm +++ /dev/null @@ -1,32 +0,0 @@ -module Elm.Syntax.Port exposing (Port) - -{-| This syntax represents ports. -For example: - - {-| This is a port. - -} - port send : String -> Cmd msg - - {-| This is another port. - -} - port scroll : (Move -> msg) -> Sub msg - - -## Types - -@docs Port - --} - -import Elm.Syntax.Documentation exposing (Documentation) -import Elm.Syntax.Node exposing (Node) -import Elm.Syntax.Signature exposing (Signature) - - -{-| Information associated with a Port. -A bit meta, but you get the idea. All information that you can define in a type alias is embedded. --} -type alias Port = - { documentation : Maybe (Node Documentation) - , signature : Node Signature - }