<commit_before>module Settings.Args (getArgs) where

import Expression
import Settings.Builders.Alex
import Settings.Builders.Ar
import Settings.Builders.Gcc
import Settings.Builders.Ghc
import Settings.Builders.GhcCabal
import Settings.Builders.GhcPkg
import Settings.Builders.Haddock
import Settings.Builders.Happy
import Settings.Builders.Ld
import Settings.User

getArgs :: Expr [String]
getArgs = fromDiffExpr $ defaultArgs <> userArgs

-- TODO: add all other settings
-- TODO: add src-hc-args = -H32m -O
-- TODO: GhcStage2HcOpts=-O2 unless GhcUnregisterised
-- TODO: compiler/stage1/build/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas
-- TODO: compiler/main/GhcMake_HC_OPTS        += -auto-all
-- TODO: compiler_stage2_HADDOCK_OPTS += --optghc=-DSTAGE=2
-- TODO: compiler/prelude/PrimOp_HC_OPTS  += -fforce-recomp
-- TODO: is GhcHcOpts=-Rghc-timing needed?
defaultArgs :: Args
defaultArgs = mconcat
    [ alexArgs
    , arArgs
    , cabalArgs
    , customPackageArgs
    , ghcArgs
    , ghcCabalHsColourArgs
    , ghcMArgs
    , ghcPkgArgs
    , gccArgs
    , gccMArgs
    , haddockArgs
    , happyArgs
    , ldArgs ]<commit_msg>Add hsc2HsArgs to global settings.<commit_after>module Settings.Args (getArgs) where

import Expression
import Settings.Builders.Alex
import Settings.Builders.Ar
import Settings.Builders.Gcc
import Settings.Builders.Ghc
import Settings.Builders.GhcCabal
import Settings.Builders.GhcPkg
import Settings.Builders.Haddock
import Settings.Builders.Happy
import Settings.Builders.Hsc2Hs
import Settings.Builders.Ld
import Settings.User

getArgs :: Expr [String]
getArgs = fromDiffExpr $ defaultArgs <> userArgs

-- TODO: add all other settings
-- TODO: add src-hc-args = -H32m -O
-- TODO: GhcStage2HcOpts=-O2 unless GhcUnregisterised
-- TODO: compiler/stage1/build/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas
-- TODO: compiler/main/GhcMake_HC_OPTS        += -auto-all
-- TODO: compiler_stage2_HADDOCK_OPTS += --optghc=-DSTAGE=2
-- TODO: compiler/prelude/PrimOp_HC_OPTS  += -fforce-recomp
-- TODO: is GhcHcOpts=-Rghc-timing needed?
defaultArgs :: Args
defaultArgs = mconcat
    [ alexArgs
    , arArgs
    , cabalArgs
    , customPackageArgs
    , ghcArgs
    , ghcCabalHsColourArgs
    , ghcMArgs
    , ghcPkgArgs
    , gccArgs
    , gccMArgs
    , haddockArgs
    , happyArgs
    , hsc2HsArgs
    , ldArgs ]
{'fraction_non_alphanumeric': 0.09863945578231292, 'fraction_numerical': 0.008078231292517007, 'mean_word_length': 3.782520325203252, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5246472', 'n_tokens_mistral': 847, 'n_tokens_neox': 829, 'n_words': 169}