1 {-# LANGUAGE AllowAmbiguousTypes #-}
2 {-# LANGUAGE OverloadedStrings #-}
3 {-# LANGUAGE NoMonomorphismRestriction #-}
4 {-# LANGUAGE TypeApplications #-}
5 {-# OPTIONS_GHC -Wno-missing-signatures #-}
6 module Textphile.CLI where
8 import Control.Monad (Monad(..))
10 import Data.Function (($))
11 import Data.Semigroup (Semigroup(..))
12 import Data.Text (Text)
13 import Data.Void (Void)
14 import Symantic.CLI as CLI
15 import qualified Data.Text.Lazy.IO as TL
16 import qualified Symantic.Document as Doc
17 import qualified Symantic.RNC.Write as RNC
18 import qualified System.IO as IO
19 import qualified Textphile.DTC.Sym as DTC
21 import Textphile.CLI.Lang
22 import Textphile.CLI.Utils
23 import Textphile.CLI.Compile
24 import Textphile.CLI.Source
26 parseAPI = parser @Void @Doc api run
40 api_command_compile <!>
41 api_command_source <!>
44 run_command_compile opts :!:
45 run_command_source opts :!:
49 helps l10n_help_version $
50 tag (TagLong "version") nothing
53 return (Doc.from version <> Doc.newline)
56 helps l10n_help_command_schema $
60 TL.hPutStrLn IO.stdout $
61 RNC.writeRNC DTC.schema DTC.schema