1{-# OPTIONS_GHC -Wall #-}
5 , Compile.Artifacts(..)
14import qualified Data.ByteString as BS
15import qualified Data.Map as Map
16import qualified Data.Text as Text
18import qualified Compile
19import qualified Elm.Compiler.Module as M
20import qualified Elm.Compiler.Version
21import qualified Elm.Package as Pkg
22import qualified Reporting.Error as Error
23import qualified Reporting.Helpers as H
24import qualified Reporting.Render.Code as Code
25import qualified Reporting.Report as Report
26import qualified Reporting.Result as Result
27import qualified Reporting.Warning as Warning
36 Elm.Compiler.Version.version
45 { _package :: Pkg.Name
47 , _imports :: Map.Map M.Raw M.Canonical
48 , _interfaces :: M.Interfaces
52compile :: Context -> BS.ByteString -> ([Warning.Warning], Either [Error.Error] Compile.Artifacts)
53compile (Context pkg exposed importDict interfaces) source =
56 if exposed then Compile.YesDocs else Compile.NoDocs
58 Result.run $ Compile.compile docsFlag pkg importDict interfaces source
65errorsToDoc :: FilePath -> Text.Text -> [Error.Error] -> H.Doc
66errorsToDoc filePath source errors =
69 (Report.toDoc filePath)
70 (concatMap (Error.toReports (Code.toSource source) Map.empty) errors)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list