Resolve TODO in Elm.Docs
Allow docs on ports. It should be fine. Publishing modules with ports
will be ruled out elsewhere, and it seems like it would end up causing
issues later to disallow this.
commitaf2aeec6a1654193344f5a190c8b2dce496e7b6c
authorEvan Czaplicki <evancz@users.noreply.github.com>
dateWed 31 Jan 2018, 19:04 (9 years ago)
parent70933c9
src/Elm/Docs.hs+5−1
@@ -473,7 +473,11 @@ addExport info (Module n c us as_ vs bs) (name, A.At region export) =
473473 Result.ok $ Module n c newUnions as_ vs bs
474474
475475 Can.ExportPort ->
476− error "TODO"
476+ do tipe <- getType name info
477+ comment <- getComment region name info
478+
479+ let newValues = Map.insert name (Value comment tipe) vs
480+ Result.ok $ Module n c us as_ newValues bs
477481
478482
479483getComment :: R.Region -> N.Name -> Info -> Result i w Comment