@@ -105,9 +105,7 @@ data Module
105 | ImportEnd Row Col -- different based on col=1 or if greater
105 | ImportEnd Row Col -- different based on col=1 or if greater
107 | ImportIndentName Row Col
107 | ImportIndentName Row Col
108− | ImportIndentAs Row Col
109 | ImportIndentAlias Row Col
108 | ImportIndentAlias Row Col
110− | ImportIndentExposing Row Col
111 | ImportIndentExposingList Row Col
109 | ImportIndentExposingList Row Col
113 | Infix Row Col
111 | Infix Row Col
@@ -599,7 +597,6 @@ toParseErrorReport source modul =
599 ModuleExposingList exposing row col ->
597 ModuleExposingList exposing row col ->
600 error "TODO ModuleExposingList" exposing row col
598 error "TODO ModuleExposingList" exposing row col
603 ModulePortModule row col ->
600 ModulePortModule row col ->
604 error "TODO ModulePortModule" row col
601 error "TODO ModulePortModule" row col
@@ -654,20 +651,47 @@ toParseErrorReport source modul =
654 ImportIndentName row col ->
651 ImportIndentName row col ->
655 error "TODO ImportIndentName" row col
652 error "TODO ImportIndentName" row col
657− ImportIndentAs row col ->
658− error "TODO ImportIndentAs" row col
660 ImportIndentAlias row col ->
654 ImportIndentAlias row col ->
661 error "TODO ImportIndentAlias" row col
655 error "TODO ImportIndentAlias" row col
663− ImportIndentExposing row col ->
664− error "TODO ImportIndentExposing" row col
666 ImportIndentExposingList row col ->
657 ImportIndentExposingList row col ->
667− error "TODO ImportIndentExposingList" row col
658+ let
659+ region = toRegion row col
661+ Report.Report "UNFINISHED IMPORT" region [] $
662+ Report.toCodeSnippet source region Nothing
665+ "I was parsing an `import` until I got stuck here:"
669+ "I was expecting to see the list of exposed values next. For example, here\
670+ \ are two ways to expose values from the `Html` module:"
671+ , D.indent 4 $ D.vcat $
672+ [ D.fillSep [D.blue "import","Html",D.blue "exposing",D.green "(..)"]
673+ , D.fillSep [D.blue "import","Html",D.blue "exposing",D.green "(Html, div, text)"]
676+ "I generally recommend the second style. It is more explicit, making it\
677+ \ much easier to figure out where values are coming from in large projects!"
669 Infix row col ->
681 Infix row col ->
670− error "TODO Infix" row col
682+ let
683+ region = toRegion row col
685+ Report.Report "BAD INFIX" region [] $
686+ Report.toCodeSnippet source region Nothing
689+ "Something went wrong in this infix operator declaration:"
692+ "This feature is used by the @elm organization to define the\
693+ \ languages built-in operators."
672 Declarations decl _ _ ->
696 Declarations decl _ _ ->
673 toDeclarationsReport source decl
697 toDeclarationsReport source decl