mirror of
https://github.com/anoma/juvix.git
synced 2024-12-20 05:12:05 +03:00
830b3be304
This PR introduces FileExt type, and consequently, one can generalise methods and matches based on the file extension; for example, `parseInputJuvixAsmFile` is now an app. `parseInputFile FileExtJuvixAsm`
21 lines
616 B
Haskell
21 lines
616 B
Haskell
module Commands.Dev.Geb.Infer.Options where
|
|
|
|
import CommonOptions
|
|
import Data.List.NonEmpty qualified as NonEmpty
|
|
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
|
|
_gebInferOptionsInputFile <- parseInputFiles (NonEmpty.fromList [FileExtJuvixGeb, FileExtLisp])
|
|
pure GebInferOptions {..}
|