1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-13 19:49:20 +03:00
juvix/app/Commands/Dev/Highlight.hs
2023-05-10 13:09:48 +02:00

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)