{-# LANGUAGE TupleSections #-} module Drasil.Projectile.Choices where import Language.Drasil (Space(..)) import Language.Drasil.Code (Choices(..), Comments(..), Mod, Verbosity(..), ConstraintBehaviour(..), ImplementationType(..), Lang(..), Logging(..), Modularity(..), Structure(..), ConstantStructure(..), ConstantRepr(..), CodeConcept(..), matchConcepts, SpaceMatch, matchSpaces, AuxFile(..), Visibility(..), defaultChoices, makeArchit, makeData, makeMaps, spaceToCodeType, makeConstraints, makeDocConfig, makeLogConfig, makeOptFeats) import Drasil.GOOL (CodeType(..)) import Data.Drasil.Quantities.Math (piConst) choiceCombos :: [(Choices, [Mod])] choiceCombos :: [(Choices, [Mod])] choiceCombos = (Choices -> (Choices, [Mod])) -> [Choices] -> [(Choices, [Mod])] forall a b. (a -> b) -> [a] -> [b] map (,[]) [ Choices baseChoices { lang = [Python, Cpp, CSharp, Java, Swift, Julia] }, Choices baseChoices { architecture = makeArchit Modular Program, dataInfo = makeData Bundled (Store Unbundled) Var }, Choices baseChoices { lang = [Python, Cpp, CSharp, Java, Swift, Julia], architecture = makeArchit Modular Library, dataInfo = makeData Unbundled (Store Unbundled) Var, maps = makeMaps (matchConcepts [(piConst, [Pi])]) matchToFloats }, Choices baseChoices { dataInfo = makeData Bundled (Store Bundled) Const, optFeats = makeOptFeats (makeDocConfig [CommentFunc, CommentClass, CommentMod] Quiet Hide) (makeLogConfig [LogVar, LogFunc] "log.txt") [SampleInput "../../../datafiles/projectile/sampleInput.txt", ReadME], folderVal = 5 }, Choices baseChoices { dataInfo = makeData Bundled WithInputs Var, maps = makeMaps (matchConcepts [(piConst, [Pi])]) matchToFloats, optFeats = makeOptFeats (makeDocConfig [CommentFunc, CommentClass, CommentMod] Quiet Hide) (makeLogConfig [LogVar, LogFunc] "log.txt") [SampleInput "../../../datafiles/projectile/sampleInput.txt", ReadME], folderVal = 5 }] matchToFloats :: SpaceMatch matchToFloats :: SpaceMatch matchToFloats = [(Space, [CodeType])] -> SpaceMatch matchSpaces ((Space -> (Space, [CodeType])) -> [Space] -> [(Space, [CodeType])] forall a b. (a -> b) -> [a] -> [b] map (,[CodeType Float, CodeType Double]) [Space Real, Space Rational]) baseChoices :: Choices baseChoices :: Choices baseChoices = Choices defaultChoices { lang = [Python, Cpp, CSharp, Java, Swift], architecture = makeArchit Unmodular Program, dataInfo = makeData Unbundled WithInputs Var, maps = makeMaps (matchConcepts [(piConst, [Pi])]) spaceToCodeType, optFeats = makeOptFeats (makeDocConfig [CommentFunc, CommentClass, CommentMod] Quiet Hide) (makeLogConfig [] "log.txt") [SampleInput "../../../datafiles/projectile/sampleInput.txt", ReadME], srsConstraints = makeConstraints Warning Warning, folderVal = 5 }