mirror of
https://github.com/anoma/juvix.git
synced 2024-12-13 19:49:20 +03:00
16 lines
547 B
Haskell
16 lines
547 B
Haskell
module Commands.Dev.Highlight where
|
|
|
|
import Commands.Base
|
|
import Commands.Dev.Highlight.Options
|
|
import Juvix.Compiler.Concrete.Data.Highlight qualified as Highlight
|
|
|
|
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)
|