2023-02-22 17:27:40 +03:00
|
|
|
module Commands.Dev.Geb.Infer.Options where
|
|
|
|
|
|
|
|
import CommonOptions
|
2023-10-25 13:02:12 +03:00
|
|
|
import Data.List.NonEmpty qualified as NonEmpty
|
2023-02-22 17:27:40 +03:00
|
|
|
import Juvix.Compiler.Backend.Geb.Pretty qualified as Geb
|
|
|
|
|
|
|
|
newtype GebInferOptions = GebInferOptions
|
|
|
|
{ _gebInferOptionsInputFile :: AppPath File
|
|
|
|
}
|
|
|
|
deriving stock (Data)
|
|
|
|
|
|
|
|
makeLenses ''GebInferOptions
|
|
|
|
|
|
|
|
instance CanonicalProjection GebInferOptions Geb.Options where
|
|
|
|
project _ = Geb.defaultOptions
|
|
|
|
|
|
|
|
parseGebInferOptions :: Parser GebInferOptions
|
|
|
|
parseGebInferOptions = do
|
2023-10-25 13:02:12 +03:00
|
|
|
_gebInferOptionsInputFile <- parseInputFiles (NonEmpty.fromList [FileExtJuvixGeb, FileExtLisp])
|
2023-02-22 17:27:40 +03:00
|
|
|
pure GebInferOptions {..}
|