mirror of
https://github.com/anoma/juvix.git
synced 2024-12-14 17:32:00 +03:00
37de293c3d
Depends on: * https://github.com/anoma/juvix/pull/2451 This PR is part of a series implementing: * https://github.com/anoma/juvix/issues/2336 In attempt to make the main PR: * https://github.com/anoma/juvix/pull/2434 easier to review. Changes in this PR refactor EntryPoint, Package, Pipeline, Root, splitting out the types into Base modules so that they can be imported and used in subsequent PRs with fewer dependencies to avoid package cycles.
17 lines
584 B
Haskell
17 lines
584 B
Haskell
module Commands.Dev.Highlight where
|
|
|
|
import Commands.Base
|
|
import Commands.Dev.Highlight.Options
|
|
import Juvix.Compiler.Concrete.Data.Highlight qualified as Highlight
|
|
import Juvix.Compiler.Pipeline.Run
|
|
|
|
runCommand :: (Members '[Embed IO, App] r) => HighlightOptions -> Sem r ()
|
|
runCommand HighlightOptions {..} = do
|
|
entry <- getEntryPoint _highlightInputFile
|
|
inputFile <- fromAppPathFile _highlightInputFile
|
|
hinput <-
|
|
Highlight.filterInput
|
|
inputFile
|
|
<$> liftIO (runPipelineHighlight entry upToInternalTyped)
|
|
sayRaw (Highlight.highlight _highlightBackend hinput)
|