-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
The Elm.Annotation.dict function does not, on its own, cause Dict to get imported. I saw this when adding a feature to elm-open-api-cli (permalink that requires clicking 'Load diff' on SchemaUtils.elm).
This rears its head when nothing else in the File calls a Dict function, which is exactly the case when elm-open-api-cli generates an OpenAPI schema's Types.elm module.
SSCCE repository is here, but here's the code that generates a bad module, for reference:
import Elm.Annotation as Type
fileMissingImport : Elm.File
fileMissingImport =
Elm.file [ "MissingImport" ]
[ Elm.alias "SomeDict" (Type.dict Type.string Type.int)
]The code it generates:
module MissingImport exposing (..)
type alias SomeDict =
Dict.Dict String IntMetadata
Metadata
Assignees
Labels
No labels