Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1344 rivejä
34 KiB

4 vuotta sitten
  1. ;;; haskell-ghc-support.el --- GHC specific code -*- coding: utf-8; lexical-binding: t -*-
  2. ;; Copyright © 2016 Haskell Mode
  3. ;; Author: 2016 Gracjan Polak
  4. ;; This file is not part of GNU Emacs.
  5. ;; This file is free software; you can redistribute it and/or modify
  6. ;; it under the terms of the GNU General Public License as published by
  7. ;; the Free Software Foundation; either version 3, or (at your option)
  8. ;; any later version.
  9. ;; This file is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ;; GNU General Public License for more details.
  13. ;; You should have received a copy of the GNU General Public License
  14. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. ;;; Commentary:
  16. ;; This file containt GHC specific constants and information.
  17. ;;; Code:
  18. (defvar haskell-ghc-supported-extensions
  19. '(
  20. ;;; BEGIN haskell-ghc-supported-extensions
  21. "AllowAmbiguousTypes"
  22. "AlternativeLayoutRule"
  23. "AlternativeLayoutRuleTransitional"
  24. "ApplicativeDo"
  25. "Arrows"
  26. "AutoDeriveTypeable"
  27. "BangPatterns"
  28. "BinaryLiterals"
  29. "CApiFFI"
  30. "CPP"
  31. "ConstrainedClassMethods"
  32. "ConstraintKinds"
  33. "DataKinds"
  34. "DatatypeContexts"
  35. "DefaultSignatures"
  36. "DeriveAnyClass"
  37. "DeriveDataTypeable"
  38. "DeriveFoldable"
  39. "DeriveFunctor"
  40. "DeriveGeneric"
  41. "DeriveLift"
  42. "DeriveTraversable"
  43. "DisambiguateRecordFields"
  44. "DoAndIfThenElse"
  45. "DoRec"
  46. "DuplicateRecordFields"
  47. "EmptyCase"
  48. "EmptyDataDecls"
  49. "ExistentialQuantification"
  50. "ExplicitForAll"
  51. "ExplicitNamespaces"
  52. "ExtendedDefaultRules"
  53. "FlexibleContexts"
  54. "FlexibleInstances"
  55. "ForeignFunctionInterface"
  56. "FunctionalDependencies"
  57. "GADTSyntax"
  58. "GADTs"
  59. "GHCForeignImportPrim"
  60. "GeneralizedNewtypeDeriving"
  61. "Haskell2010"
  62. "Haskell98"
  63. "ImplicitParams"
  64. "ImplicitPrelude"
  65. "ImpredicativeTypes"
  66. "IncoherentInstances"
  67. "InstanceSigs"
  68. "InterruptibleFFI"
  69. "JavaScriptFFI"
  70. "KindSignatures"
  71. "LambdaCase"
  72. "LiberalTypeSynonyms"
  73. "MagicHash"
  74. "MonadComprehensions"
  75. "MonadFailDesugaring"
  76. "MonoLocalBinds"
  77. "MonoPatBinds"
  78. "MonomorphismRestriction"
  79. "MultiParamTypeClasses"
  80. "MultiWayIf"
  81. "NPlusKPatterns"
  82. "NamedFieldPuns"
  83. "NamedWildCards"
  84. "NegativeLiterals"
  85. "NoAllowAmbiguousTypes"
  86. "NoAlternativeLayoutRule"
  87. "NoAlternativeLayoutRuleTransitional"
  88. "NoApplicativeDo"
  89. "NoArrows"
  90. "NoAutoDeriveTypeable"
  91. "NoBangPatterns"
  92. "NoBinaryLiterals"
  93. "NoCApiFFI"
  94. "NoCPP"
  95. "NoConstrainedClassMethods"
  96. "NoConstraintKinds"
  97. "NoDataKinds"
  98. "NoDatatypeContexts"
  99. "NoDefaultSignatures"
  100. "NoDeriveAnyClass"
  101. "NoDeriveDataTypeable"
  102. "NoDeriveFoldable"
  103. "NoDeriveFunctor"
  104. "NoDeriveGeneric"
  105. "NoDeriveLift"
  106. "NoDeriveTraversable"
  107. "NoDisambiguateRecordFields"
  108. "NoDoAndIfThenElse"
  109. "NoDoRec"
  110. "NoDuplicateRecordFields"
  111. "NoEmptyCase"
  112. "NoEmptyDataDecls"
  113. "NoExistentialQuantification"
  114. "NoExplicitForAll"
  115. "NoExplicitNamespaces"
  116. "NoExtendedDefaultRules"
  117. "NoFlexibleContexts"
  118. "NoFlexibleInstances"
  119. "NoForeignFunctionInterface"
  120. "NoFunctionalDependencies"
  121. "NoGADTSyntax"
  122. "NoGADTs"
  123. "NoGHCForeignImportPrim"
  124. "NoGeneralizedNewtypeDeriving"
  125. "NoImplicitParams"
  126. "NoImplicitPrelude"
  127. "NoImpredicativeTypes"
  128. "NoIncoherentInstances"
  129. "NoInstanceSigs"
  130. "NoInterruptibleFFI"
  131. "NoJavaScriptFFI"
  132. "NoKindSignatures"
  133. "NoLambdaCase"
  134. "NoLiberalTypeSynonyms"
  135. "NoMagicHash"
  136. "NoMonadComprehensions"
  137. "NoMonadFailDesugaring"
  138. "NoMonoLocalBinds"
  139. "NoMonoPatBinds"
  140. "NoMonomorphismRestriction"
  141. "NoMultiParamTypeClasses"
  142. "NoMultiWayIf"
  143. "NoNPlusKPatterns"
  144. "NoNamedFieldPuns"
  145. "NoNamedWildCards"
  146. "NoNegativeLiterals"
  147. "NoNondecreasingIndentation"
  148. "NoNullaryTypeClasses"
  149. "NoNumDecimals"
  150. "NoOverlappingInstances"
  151. "NoOverloadedLabels"
  152. "NoOverloadedLists"
  153. "NoOverloadedStrings"
  154. "NoPackageImports"
  155. "NoParallelArrays"
  156. "NoParallelListComp"
  157. "NoPartialTypeSignatures"
  158. "NoPatternGuards"
  159. "NoPatternSignatures"
  160. "NoPatternSynonyms"
  161. "NoPolyKinds"
  162. "NoPolymorphicComponents"
  163. "NoPostfixOperators"
  164. "NoQuasiQuotes"
  165. "NoRank2Types"
  166. "NoRankNTypes"
  167. "NoRebindableSyntax"
  168. "NoRecordPuns"
  169. "NoRecordWildCards"
  170. "NoRecursiveDo"
  171. "NoRelaxedLayout"
  172. "NoRelaxedPolyRec"
  173. "NoRoleAnnotations"
  174. "NoScopedTypeVariables"
  175. "NoStandaloneDeriving"
  176. "NoStaticPointers"
  177. "NoStrict"
  178. "NoStrictData"
  179. "NoTemplateHaskell"
  180. "NoTemplateHaskellQuotes"
  181. "NoTraditionalRecordSyntax"
  182. "NoTransformListComp"
  183. "NoTupleSections"
  184. "NoTypeApplications"
  185. "NoTypeFamilies"
  186. "NoTypeFamilyDependencies"
  187. "NoTypeInType"
  188. "NoTypeOperators"
  189. "NoTypeSynonymInstances"
  190. "NoUnboxedTuples"
  191. "NoUndecidableInstances"
  192. "NoUndecidableSuperClasses"
  193. "NoUnicodeSyntax"
  194. "NoUnliftedFFITypes"
  195. "NoViewPatterns"
  196. "NondecreasingIndentation"
  197. "NullaryTypeClasses"
  198. "NumDecimals"
  199. "OverlappingInstances"
  200. "OverloadedLabels"
  201. "OverloadedLists"
  202. "OverloadedStrings"
  203. "PackageImports"
  204. "ParallelArrays"
  205. "ParallelListComp"
  206. "PartialTypeSignatures"
  207. "PatternGuards"
  208. "PatternSignatures"
  209. "PatternSynonyms"
  210. "PolyKinds"
  211. "PolymorphicComponents"
  212. "PostfixOperators"
  213. "QuasiQuotes"
  214. "Rank2Types"
  215. "RankNTypes"
  216. "RebindableSyntax"
  217. "RecordPuns"
  218. "RecordWildCards"
  219. "RecursiveDo"
  220. "RelaxedLayout"
  221. "RelaxedPolyRec"
  222. "RoleAnnotations"
  223. "Safe"
  224. "ScopedTypeVariables"
  225. "StandaloneDeriving"
  226. "StaticPointers"
  227. "Strict"
  228. "StrictData"
  229. "TemplateHaskell"
  230. "TemplateHaskellQuotes"
  231. "TraditionalRecordSyntax"
  232. "TransformListComp"
  233. "Trustworthy"
  234. "TupleSections"
  235. "TypeApplications"
  236. "TypeFamilies"
  237. "TypeFamilyDependencies"
  238. "TypeInType"
  239. "TypeOperators"
  240. "TypeSynonymInstances"
  241. "UnboxedTuples"
  242. "UndecidableInstances"
  243. "UndecidableSuperClasses"
  244. "UnicodeSyntax"
  245. "UnliftedFFITypes"
  246. "Unsafe"
  247. "ViewPatterns"
  248. ;;; END haskell-ghc-supported-extensions
  249. )
  250. "List of language extensions supported by any known version of GHC.
  251. This list should be updated by running `haskell-update-ghc-support'.")
  252. (defvar haskell-ghc-supported-options
  253. '(
  254. ;;; BEGIN haskell-ghc-supported-options
  255. "-#include"
  256. "--abi-hash"
  257. "--frontend"
  258. "--help"
  259. "--info"
  260. "--interactive"
  261. "--make"
  262. "--numeric-version"
  263. "--print-booter-version"
  264. "--print-build-platform"
  265. "--print-c-compiler-flags"
  266. "--print-c-compiler-link-flags"
  267. "--print-debug-on"
  268. "--print-gcc-linker-flags"
  269. "--print-global-package-db"
  270. "--print-have-interpreter"
  271. "--print-have-native-code-generator"
  272. "--print-host-platform"
  273. "--print-ld-flags"
  274. "--print-ld-linker-flags"
  275. "--print-leading-underscore"
  276. "--print-libdir"
  277. "--print-object-splitting-supported"
  278. "--print-project-git-commit-id"
  279. "--print-project-version"
  280. "--print-rts-ways"
  281. "--print-stage"
  282. "--print-support-smp"
  283. "--print-tables-next-to-code"
  284. "--print-target-platform"
  285. "--print-unregisterised"
  286. "--show-iface"
  287. "--show-options"
  288. "--show-packages"
  289. "--supported-extensions"
  290. "--supported-languages"
  291. "--version"
  292. "-?"
  293. "-C"
  294. "-D"
  295. "-E"
  296. "-F"
  297. "-H"
  298. "-I"
  299. "-L"
  300. "-M"
  301. "-O"
  302. "-Odph"
  303. "-Onot"
  304. "-Rghc-timing"
  305. "-S"
  306. "-U"
  307. "-V"
  308. "-W"
  309. "-Wall"
  310. "-Wall-missed-specialisations"
  311. "-Walternative-layout-rule-transitional"
  312. "-Wamp"
  313. "-Wauto-orphans"
  314. "-Wcompat"
  315. "-Wcontext-quantification"
  316. "-Wdefault"
  317. "-Wdeferred-type-errors"
  318. "-Wdeprecated-flags"
  319. "-Wdeprecations"
  320. "-Wderiving-typeable"
  321. "-Wdodgy-exports"
  322. "-Wdodgy-foreign-imports"
  323. "-Wdodgy-imports"
  324. "-Wduplicate-constraints"
  325. "-Wduplicate-exports"
  326. "-Wempty-enumerations"
  327. "-Werror"
  328. "-Weverything"
  329. "-Wextra"
  330. "-Whi-shadowing"
  331. "-Widentities"
  332. "-Wimplicit-prelude"
  333. "-Wincomplete-patterns"
  334. "-Wincomplete-record-updates"
  335. "-Wincomplete-uni-patterns"
  336. "-Winline-rule-shadowing"
  337. "-Wmissed-specialisations"
  338. "-Wmissing-exported-signatures"
  339. "-Wmissing-exported-sigs"
  340. "-Wmissing-fields"
  341. "-Wmissing-import-lists"
  342. "-Wmissing-local-signatures"
  343. "-Wmissing-local-sigs"
  344. "-Wmissing-methods"
  345. "-Wmissing-monadfail-instances"
  346. "-Wmissing-pattern-synonym-signatures"
  347. "-Wmissing-signatures"
  348. "-Wmonomorphism-restriction"
  349. "-Wname-shadowing"
  350. "-Wno-all"
  351. "-Wno-all-missed-specialisations"
  352. "-Wno-alternative-layout-rule-transitional"
  353. "-Wno-amp"
  354. "-Wno-auto-orphans"
  355. "-Wno-compat"
  356. "-Wno-context-quantification"
  357. "-Wno-default"
  358. "-Wno-deferred-type-errors"
  359. "-Wno-deprecated-flags"
  360. "-Wno-deprecations"
  361. "-Wno-deriving-typeable"
  362. "-Wno-dodgy-exports"
  363. "-Wno-dodgy-foreign-imports"
  364. "-Wno-dodgy-imports"
  365. "-Wno-duplicate-constraints"
  366. "-Wno-duplicate-exports"
  367. "-Wno-empty-enumerations"
  368. "-Wno-everything"
  369. "-Wno-extra"
  370. "-Wno-hi-shadowing"
  371. "-Wno-identities"
  372. "-Wno-implicit-prelude"
  373. "-Wno-incomplete-patterns"
  374. "-Wno-incomplete-record-updates"
  375. "-Wno-incomplete-uni-patterns"
  376. "-Wno-inline-rule-shadowing"
  377. "-Wno-missed-specialisations"
  378. "-Wno-missing-exported-signatures"
  379. "-Wno-missing-exported-sigs"
  380. "-Wno-missing-fields"
  381. "-Wno-missing-import-lists"
  382. "-Wno-missing-local-signatures"
  383. "-Wno-missing-local-sigs"
  384. "-Wno-missing-methods"
  385. "-Wno-missing-monadfail-instances"
  386. "-Wno-missing-pattern-synonym-signatures"
  387. "-Wno-missing-signatures"
  388. "-Wno-monomorphism-restriction"
  389. "-Wno-name-shadowing"
  390. "-Wno-noncanonical-monad-instances"
  391. "-Wno-noncanonical-monadfail-instances"
  392. "-Wno-noncanonical-monoid-instances"
  393. "-Wno-orphans"
  394. "-Wno-overflowed-literals"
  395. "-Wno-overlapping-patterns"
  396. "-Wno-partial-type-signatures"
  397. "-Wno-redundant-constraints"
  398. "-Wno-safe"
  399. "-Wno-semigroup"
  400. "-Wno-tabs"
  401. "-Wno-trustworthy-safe"
  402. "-Wno-type-defaults"
  403. "-Wno-typed-holes"
  404. "-Wno-unrecognised-pragmas"
  405. "-Wno-unrecognised-warning-flags"
  406. "-Wno-unsafe"
  407. "-Wno-unsupported-calling-conventions"
  408. "-Wno-unsupported-llvm-version"
  409. "-Wno-unticked-promoted-constructors"
  410. "-Wno-unused-binds"
  411. "-Wno-unused-do-bind"
  412. "-Wno-unused-foralls"
  413. "-Wno-unused-imports"
  414. "-Wno-unused-local-binds"
  415. "-Wno-unused-matches"
  416. "-Wno-unused-pattern-binds"
  417. "-Wno-unused-top-binds"
  418. "-Wno-unused-type-patterns"
  419. "-Wno-warnings-deprecations"
  420. "-Wno-wrong-do-bind"
  421. "-Wnoncanonical-monad-instances"
  422. "-Wnoncanonical-monadfail-instances"
  423. "-Wnoncanonical-monoid-instances"
  424. "-Wnot"
  425. "-Worphans"
  426. "-Woverflowed-literals"
  427. "-Woverlapping-patterns"
  428. "-Wpartial-type-signatures"
  429. "-Wredundant-constraints"
  430. "-Wsafe"
  431. "-Wsemigroup"
  432. "-Wtabs"
  433. "-Wtrustworthy-safe"
  434. "-Wtype-defaults"
  435. "-Wtyped-holes"
  436. "-Wunrecognised-pragmas"
  437. "-Wunrecognised-warning-flags"
  438. "-Wunsafe"
  439. "-Wunsupported-calling-conventions"
  440. "-Wunsupported-llvm-version"
  441. "-Wunticked-promoted-constructors"
  442. "-Wunused-binds"
  443. "-Wunused-do-bind"
  444. "-Wunused-foralls"
  445. "-Wunused-imports"
  446. "-Wunused-local-binds"
  447. "-Wunused-matches"
  448. "-Wunused-pattern-binds"
  449. "-Wunused-top-binds"
  450. "-Wunused-type-patterns"
  451. "-Wwarn"
  452. "-Wwarnings-deprecations"
  453. "-Wwrong-do-bind"
  454. "-XAllowAmbiguousTypes"
  455. "-XAlternativeLayoutRule"
  456. "-XAlternativeLayoutRuleTransitional"
  457. "-XApplicativeDo"
  458. "-XArrows"
  459. "-XAutoDeriveTypeable"
  460. "-XBangPatterns"
  461. "-XBinaryLiterals"
  462. "-XCApiFFI"
  463. "-XCPP"
  464. "-XConstrainedClassMethods"
  465. "-XConstraintKinds"
  466. "-XDataKinds"
  467. "-XDatatypeContexts"
  468. "-XDefaultSignatures"
  469. "-XDeriveAnyClass"
  470. "-XDeriveDataTypeable"
  471. "-XDeriveFoldable"
  472. "-XDeriveFunctor"
  473. "-XDeriveGeneric"
  474. "-XDeriveLift"
  475. "-XDeriveTraversable"
  476. "-XDisambiguateRecordFields"
  477. "-XDoAndIfThenElse"
  478. "-XDoRec"
  479. "-XDuplicateRecordFields"
  480. "-XEmptyCase"
  481. "-XEmptyDataDecls"
  482. "-XExistentialQuantification"
  483. "-XExplicitForAll"
  484. "-XExplicitNamespaces"
  485. "-XExtendedDefaultRules"
  486. "-XFlexibleContexts"
  487. "-XFlexibleInstances"
  488. "-XForeignFunctionInterface"
  489. "-XFunctionalDependencies"
  490. "-XGADTSyntax"
  491. "-XGADTs"
  492. "-XGHCForeignImportPrim"
  493. "-XGeneralizedNewtypeDeriving"
  494. "-XGenerics"
  495. "-XHaskell2010"
  496. "-XHaskell98"
  497. "-XImplicitParams"
  498. "-XImplicitPrelude"
  499. "-XImpredicativeTypes"
  500. "-XIncoherentInstances"
  501. "-XInstanceSigs"
  502. "-XInterruptibleFFI"
  503. "-XJavaScriptFFI"
  504. "-XKindSignatures"
  505. "-XLambdaCase"
  506. "-XLiberalTypeSynonyms"
  507. "-XMagicHash"
  508. "-XMonadComprehensions"
  509. "-XMonadFailDesugaring"
  510. "-XMonoLocalBinds"
  511. "-XMonoPatBinds"
  512. "-XMonomorphismRestriction"
  513. "-XMultiParamTypeClasses"
  514. "-XMultiWayIf"
  515. "-XNPlusKPatterns"
  516. "-XNamedFieldPuns"
  517. "-XNamedWildCards"
  518. "-XNegativeLiterals"
  519. "-XNoAllowAmbiguousTypes"
  520. "-XNoAlternativeLayoutRule"
  521. "-XNoAlternativeLayoutRuleTransitional"
  522. "-XNoApplicativeDo"
  523. "-XNoArrows"
  524. "-XNoAutoDeriveTypeable"
  525. "-XNoBangPatterns"
  526. "-XNoBinaryLiterals"
  527. "-XNoCApiFFI"
  528. "-XNoCPP"
  529. "-XNoConstrainedClassMethods"
  530. "-XNoConstraintKinds"
  531. "-XNoDataKinds"
  532. "-XNoDatatypeContexts"
  533. "-XNoDefaultSignatures"
  534. "-XNoDeriveAnyClass"
  535. "-XNoDeriveDataTypeable"
  536. "-XNoDeriveFoldable"
  537. "-XNoDeriveFunctor"
  538. "-XNoDeriveGeneric"
  539. "-XNoDeriveLift"
  540. "-XNoDeriveTraversable"
  541. "-XNoDisambiguateRecordFields"
  542. "-XNoDoAndIfThenElse"
  543. "-XNoDoRec"
  544. "-XNoDuplicateRecordFields"
  545. "-XNoEmptyCase"
  546. "-XNoEmptyDataDecls"
  547. "-XNoExistentialQuantification"
  548. "-XNoExplicitForAll"
  549. "-XNoExplicitNamespaces"
  550. "-XNoExtendedDefaultRules"
  551. "-XNoFlexibleContexts"
  552. "-XNoFlexibleInstances"
  553. "-XNoForeignFunctionInterface"
  554. "-XNoFunctionalDependencies"
  555. "-XNoGADTSyntax"
  556. "-XNoGADTs"
  557. "-XNoGHCForeignImportPrim"
  558. "-XNoGeneralizedNewtypeDeriving"
  559. "-XNoGenerics"
  560. "-XNoImplicitParams"
  561. "-XNoImplicitPrelude"
  562. "-XNoImpredicativeTypes"
  563. "-XNoIncoherentInstances"
  564. "-XNoInstanceSigs"
  565. "-XNoInterruptibleFFI"
  566. "-XNoJavaScriptFFI"
  567. "-XNoKindSignatures"
  568. "-XNoLambdaCase"
  569. "-XNoLiberalTypeSynonyms"
  570. "-XNoMagicHash"
  571. "-XNoMonadComprehensions"
  572. "-XNoMonadFailDesugaring"
  573. "-XNoMonoLocalBinds"
  574. "-XNoMonoPatBinds"
  575. "-XNoMonomorphismRestriction"
  576. "-XNoMultiParamTypeClasses"
  577. "-XNoMultiWayIf"
  578. "-XNoNPlusKPatterns"
  579. "-XNoNamedFieldPuns"
  580. "-XNoNamedWildCards"
  581. "-XNoNegativeLiterals"
  582. "-XNoNondecreasingIndentation"
  583. "-XNoNullaryTypeClasses"
  584. "-XNoNumDecimals"
  585. "-XNoOverlappingInstances"
  586. "-XNoOverloadedLabels"
  587. "-XNoOverloadedLists"
  588. "-XNoOverloadedStrings"
  589. "-XNoPackageImports"
  590. "-XNoParallelArrays"
  591. "-XNoParallelListComp"
  592. "-XNoPartialTypeSignatures"
  593. "-XNoPatternGuards"
  594. "-XNoPatternSignatures"
  595. "-XNoPatternSynonyms"
  596. "-XNoPolyKinds"
  597. "-XNoPolymorphicComponents"
  598. "-XNoPostfixOperators"
  599. "-XNoQuasiQuotes"
  600. "-XNoRank2Types"
  601. "-XNoRankNTypes"
  602. "-XNoRebindableSyntax"
  603. "-XNoRecordPuns"
  604. "-XNoRecordWildCards"
  605. "-XNoRecursiveDo"
  606. "-XNoRelaxedLayout"
  607. "-XNoRelaxedPolyRec"
  608. "-XNoRoleAnnotations"
  609. "-XNoScopedTypeVariables"
  610. "-XNoStandaloneDeriving"
  611. "-XNoStaticPointers"
  612. "-XNoStrict"
  613. "-XNoStrictData"
  614. "-XNoTemplateHaskell"
  615. "-XNoTemplateHaskellQuotes"
  616. "-XNoTraditionalRecordSyntax"
  617. "-XNoTransformListComp"
  618. "-XNoTupleSections"
  619. "-XNoTypeApplications"
  620. "-XNoTypeFamilies"
  621. "-XNoTypeFamilyDependencies"
  622. "-XNoTypeInType"
  623. "-XNoTypeOperators"
  624. "-XNoTypeSynonymInstances"
  625. "-XNoUnboxedTuples"
  626. "-XNoUndecidableInstances"
  627. "-XNoUndecidableSuperClasses"
  628. "-XNoUnicodeSyntax"
  629. "-XNoUnliftedFFITypes"
  630. "-XNoViewPatterns"
  631. "-XNondecreasingIndentation"
  632. "-XNullaryTypeClasses"
  633. "-XNumDecimals"
  634. "-XOverlappingInstances"
  635. "-XOverloadedLabels"
  636. "-XOverloadedLists"
  637. "-XOverloadedStrings"
  638. "-XPackageImports"
  639. "-XParallelArrays"
  640. "-XParallelListComp"
  641. "-XPartialTypeSignatures"
  642. "-XPatternGuards"
  643. "-XPatternSignatures"
  644. "-XPatternSynonyms"
  645. "-XPolyKinds"
  646. "-XPolymorphicComponents"
  647. "-XPostfixOperators"
  648. "-XQuasiQuotes"
  649. "-XRank2Types"
  650. "-XRankNTypes"
  651. "-XRebindableSyntax"
  652. "-XRecordPuns"
  653. "-XRecordWildCards"
  654. "-XRecursiveDo"
  655. "-XRelaxedLayout"
  656. "-XRelaxedPolyRec"
  657. "-XRoleAnnotations"
  658. "-XSafe"
  659. "-XScopedTypeVariables"
  660. "-XStandaloneDeriving"
  661. "-XStaticPointers"
  662. "-XStrict"
  663. "-XStrictData"
  664. "-XTemplateHaskell"
  665. "-XTemplateHaskellQuotes"
  666. "-XTraditionalRecordSyntax"
  667. "-XTransformListComp"
  668. "-XTrustworthy"
  669. "-XTupleSections"
  670. "-XTypeApplications"
  671. "-XTypeFamilies"
  672. "-XTypeFamilyDependencies"
  673. "-XTypeInType"
  674. "-XTypeOperators"
  675. "-XTypeSynonymInstances"
  676. "-XUnboxedTuples"
  677. "-XUndecidableInstances"
  678. "-XUndecidableSuperClasses"
  679. "-XUnicodeSyntax"
  680. "-XUnliftedFFITypes"
  681. "-XUnsafe"
  682. "-XViewPatterns"
  683. "-auto"
  684. "-auto-all"
  685. "-c"
  686. "-caf-all"
  687. "-clear-package-db"
  688. "-cpp"
  689. "-dannot-lint"
  690. "-dasm-lint"
  691. "-dcmm-lint"
  692. "-dcore-lint"
  693. "-ddump-asm"
  694. "-ddump-asm-conflicts"
  695. "-ddump-asm-expanded"
  696. "-ddump-asm-liveness"
  697. "-ddump-asm-native"
  698. "-ddump-asm-regalloc"
  699. "-ddump-asm-regalloc-stages"
  700. "-ddump-asm-stats"
  701. "-ddump-bcos"
  702. "-ddump-call-arity"
  703. "-ddump-cmm"
  704. "-ddump-cmm-cbe"
  705. "-ddump-cmm-cfg"
  706. "-ddump-cmm-cps"
  707. "-ddump-cmm-info"
  708. "-ddump-cmm-proc"
  709. "-ddump-cmm-procmap"
  710. "-ddump-cmm-raw"
  711. "-ddump-cmm-sink"
  712. "-ddump-cmm-sp"
  713. "-ddump-cmm-split"
  714. "-ddump-cmm-switch"
  715. "-ddump-core-stats"
  716. "-ddump-cs-trace"
  717. "-ddump-cse"
  718. "-ddump-debug"
  719. "-ddump-deriv"
  720. "-ddump-ds"
  721. "-ddump-file-prefix"
  722. "-ddump-foreign"
  723. "-ddump-hi"
  724. "-ddump-hi-diffs"
  725. "-ddump-hpc"
  726. "-ddump-if-trace"
  727. "-ddump-inlinings"
  728. "-ddump-llvm"
  729. "-ddump-minimal-imports"
  730. "-ddump-mod-cycles"
  731. "-ddump-mod-map"
  732. "-ddump-occur-anal"
  733. "-ddump-opt-cmm"
  734. "-ddump-parsed"
  735. "-ddump-prep"
  736. "-ddump-rn"
  737. "-ddump-rn-stats"
  738. "-ddump-rn-trace"
  739. "-ddump-rtti"
  740. "-ddump-rule-firings"
  741. "-ddump-rule-rewrites"
  742. "-ddump-rules"
  743. "-ddump-simpl"
  744. "-ddump-simpl-iterations"
  745. "-ddump-simpl-stats"
  746. "-ddump-simpl-trace"
  747. "-ddump-spec"
  748. "-ddump-splices"
  749. "-ddump-stg"
  750. "-ddump-str-signatures"
  751. "-ddump-stranal"
  752. "-ddump-strsigs"
  753. "-ddump-tc"
  754. "-ddump-tc-trace"
  755. "-ddump-ticked"
  756. "-ddump-to-file"
  757. "-ddump-types"
  758. "-ddump-vect"
  759. "-ddump-view-pattern-commoning"
  760. "-ddump-vt-trace"
  761. "-ddump-worker-wrapper"
  762. "-debug"
  763. "-dep-makefile"
  764. "-dep-suffix"
  765. "-dfaststring-stats"
  766. "-dinitial-unique"
  767. "-distrust"
  768. "-distrust-all-packages"
  769. "-dno-debug-output"
  770. "-dno-llvm-mangler"
  771. "-dno-ppr-case-as-let"
  772. "-dno-ppr-ticks"
  773. "-dno-suppress-coercions"
  774. "-dno-suppress-idinfo"
  775. "-dno-suppress-module-prefixes"
  776. "-dno-suppress-type-applications"
  777. "-dno-suppress-type-signatures"
  778. "-dno-suppress-unfoldings"
  779. "-dno-suppress-uniques"
  780. "-dno-suppress-var-kinds"
  781. "-dppr-case-as-let"
  782. "-dppr-cols"
  783. "-dppr-debug"
  784. "-dppr-ticks"
  785. "-dppr-user-length"
  786. "-dshow-passes"
  787. "-dsource-stats"
  788. "-dstg-lint"
  789. "-dstg-stats"
  790. "-dsuppress-all"
  791. "-dsuppress-coercions"
  792. "-dsuppress-idinfo"
  793. "-dsuppress-module-prefixes"
  794. "-dsuppress-type-applications"
  795. "-dsuppress-type-signatures"
  796. "-dsuppress-unfoldings"
  797. "-dsuppress-uniques"
  798. "-dsuppress-var-kinds"
  799. "-dth-dec-file"
  800. "-dtrace-level"
  801. "-dumpdir"
  802. "-dunique-increment"
  803. "-dverbose-core2core"
  804. "-dverbose-stg2stg"
  805. "-dylib-install-name"
  806. "-dynamic"
  807. "-dynamic-too"
  808. "-dynhisuf"
  809. "-dynload"
  810. "-dyno"
  811. "-dynosuf"
  812. "-e"
  813. "-eventlog"
  814. "-exclude-module"
  815. "-fPArr"
  816. "-fPIC"
  817. "-fallow-incoherent-instances"
  818. "-fallow-overlapping-instances"
  819. "-fallow-undecidable-instances"
  820. "-farrows"
  821. "-fasm"
  822. "-fbang-patterns"
  823. "-fbuilding-cabal-package"
  824. "-fbyte-code"
  825. "-fcall-arity"
  826. "-fcase-merge"
  827. "-fcmm-elim-common-blocks"
  828. "-fcmm-sink"
  829. "-fconstraint-solver-iterations"
  830. "-fcontext-stack"
  831. "-fcpr-anal"
  832. "-fcpr-off"
  833. "-fcross-module-specialise"
  834. "-fcse"
  835. "-fdefer-type-errors"
  836. "-fdefer-typed-holes"
  837. "-fdicts-cheap"
  838. "-fdicts-strict"
  839. "-fdmd-tx-dict-sel"
  840. "-fdo-eta-reduction"
  841. "-fdo-lambda-eta-expansion"
  842. "-feager-blackholing"
  843. "-fembed-manifest"
  844. "-fenable-rewrite-rules"
  845. "-ferror-spans"
  846. "-fexcess-precision"
  847. "-fexpose-all-unfoldings"
  848. "-fext-core"
  849. "-fextended-default-rules"
  850. "-fexternal-interpreter"
  851. "-fffi"
  852. "-ffi"
  853. "-fflat-cache"
  854. "-ffloat-all-lams"
  855. "-ffloat-in"
  856. "-ffloat-lam-args"
  857. "-fforce-recomp"
  858. "-ffrontend-opt"
  859. "-ffull-laziness"
  860. "-ffun-to-thunk"
  861. "-fgen-manifest"
  862. "-fghci-history"
  863. "-fghci-sandbox"
  864. "-fglasgow-exts"
  865. "-fhelpful-errors"
  866. "-fhistory-size"
  867. "-fhpc"
  868. "-fhpc-no-auto"
  869. "-fignore-asserts"
  870. "-fignore-interface-pragmas"
  871. "-fimplicit-params"
  872. "-fimplicit-prelude"
  873. "-firrefutable-tuples"
  874. "-fkill-absence"
  875. "-fkill-one-shot"
  876. "-flate-dmd-anal"
  877. "-fliberate-case"
  878. "-fliberate-case-threshold"
  879. "-fllvm"
  880. "-floopification"
  881. "-fmax-inline-alloc-size"
  882. "-fmax-inline-memcpy-insns"
  883. "-fmax-inline-memset-insns"
  884. "-fmax-pmcheck-iterations"
  885. "-fmax-relevant-binds"
  886. "-fmax-simplifier-iterations"
  887. "-fmax-worker-args"
  888. "-fmono-pat-binds"
  889. "-fmonomorphism-restriction"
  890. "-fno-PArr"
  891. "-fno-PIC"
  892. "-fno-allow-incoherent-instances"
  893. "-fno-allow-overlapping-instances"
  894. "-fno-allow-undecidable-instances"
  895. "-fno-arrows"
  896. "-fno-bang-patterns"
  897. "-fno-building-cabal-package"
  898. "-fno-call-arity"
  899. "-fno-case-merge"
  900. "-fno-cmm-elim-common-blocks"
  901. "-fno-cmm-sink"
  902. "-fno-code"
  903. "-fno-cpr-anal"
  904. "-fno-cross-module-specialise"
  905. "-fno-cse"
  906. "-fno-defer-type-errors"
  907. "-fno-defer-typed-holes"
  908. "-fno-dicts-cheap"
  909. "-fno-dicts-strict"
  910. "-fno-dmd-tx-dict-sel"
  911. "-fno-do-eta-reduction"
  912. "-fno-do-lambda-eta-expansion"
  913. "-fno-eager-blackholing"
  914. "-fno-embed-manifest"
  915. "-fno-enable-rewrite-rules"
  916. "-fno-error-spans"
  917. "-fno-excess-precision"
  918. "-fno-expose-all-unfoldings"
  919. "-fno-ext-core"
  920. "-fno-extended-default-rules"
  921. "-fno-external-interpreter"
  922. "-fno-ffi"
  923. "-fno-fi"
  924. "-fno-flat-cache"
  925. "-fno-float-in"
  926. "-fno-force-recomp"
  927. "-fno-full-laziness"
  928. "-fno-fun-to-thunk"
  929. "-fno-gen-manifest"
  930. "-fno-ghci-history"
  931. "-fno-ghci-sandbox"
  932. "-fno-glasgow-exts"
  933. "-fno-helpful-errors"
  934. "-fno-hpc"
  935. "-fno-hpc-no-auto"
  936. "-fno-ignore-asserts"
  937. "-fno-ignore-interface-pragmas"
  938. "-fno-implicit-params"
  939. "-fno-implicit-prelude"
  940. "-fno-irrefutable-tuples"
  941. "-fno-kill-absence"
  942. "-fno-kill-one-shot"
  943. "-fno-late-dmd-anal"
  944. "-fno-liberate-case"
  945. "-fno-liberate-case-threshold"
  946. "-fno-loopification"
  947. "-fno-max-relevant-binds"
  948. "-fno-mono-pat-binds"
  949. "-fno-monomorphism-restriction"
  950. "-fno-omit-interface-pragmas"
  951. "-fno-omit-yields"
  952. "-fno-opt-coercion"
  953. "-fno-parr"
  954. "-fno-pedantic-bottoms"
  955. "-fno-pre-inlining"
  956. "-fno-print-equality-relations"
  957. "-fno-print-expanded-synonyms"
  958. "-fno-print-explicit-coercions"
  959. "-fno-print-explicit-foralls"
  960. "-fno-print-explicit-kinds"
  961. "-fno-print-explicit-runtime-reps"
  962. "-fno-print-potential-instances"
  963. "-fno-print-typechecker-elaboration"
  964. "-fno-print-unicode-syntax"
  965. "-fno-prof-auto"
  966. "-fno-prof-cafs"
  967. "-fno-prof-count-entries"
  968. "-fno-regs-graph"
  969. "-fno-regs-iterative"
  970. "-fno-reverse-errors"
  971. "-fno-rewrite-rules"
  972. "-fno-safe-infer"
  973. "-fno-scoped-type-variables"
  974. "-fno-shared-implib"
  975. "-fno-show-warning-groups"
  976. "-fno-simple-list-literals"
  977. "-fno-spec-constr"
  978. "-fno-spec-constr-count"
  979. "-fno-spec-constr-threshold"
  980. "-fno-specialise"
  981. "-fno-specialise-aggressively"
  982. "-fno-state-hack"
  983. "-fno-static-argument-transformation"
  984. "-fno-strictness"
  985. "-fno-th"
  986. "-fno-unbox-small-strict-fields"
  987. "-fno-unbox-strict-fields"
  988. "-fno-use-rpaths"
  989. "-fno-vectorisation-avoidance"
  990. "-fno-vectorise"
  991. "-fno-version-macros"
  992. "-fno-warn-"
  993. "-fno-warn-alternative-layout-rule-transitional"
  994. "-fno-warn-amp"
  995. "-fno-warn-auto-orphans"
  996. "-fno-warn-context-quantification"
  997. "-fno-warn-deprecated-flags"
  998. "-fno-warn-deprecations"
  999. "-fno-warn-deriving-typeable"
  1000. "-fno-warn-dodgy-exports"
  1001. "-fno-warn-dodgy-foreign-imports"
  1002. "-fno-warn-dodgy-imports"
  1003. "-fno-warn-duplicate-constraints"
  1004. "-fno-warn-duplicate-exports"
  1005. "-fno-warn-empty-enumerations"
  1006. "-fno-warn-hi-shadowing"
  1007. "-fno-warn-identities"
  1008. "-fno-warn-implicit-prelude"
  1009. "-fno-warn-incomplete-patterns"
  1010. "-fno-warn-incomplete-record-updates"
  1011. "-fno-warn-incomplete-uni-patterns"
  1012. "-fno-warn-inline-rule-shadowing"
  1013. "-fno-warn-missing-exported-sigs"
  1014. "-fno-warn-missing-fields"
  1015. "-fno-warn-missing-import-lists"
  1016. "-fno-warn-missing-local-sigs"
  1017. "-fno-warn-missing-methods"
  1018. "-fno-warn-missing-signatures"
  1019. "-fno-warn-monomorphism-restriction"
  1020. "-fno-warn-name-shadowing"
  1021. "-fno-warn-orphans"
  1022. "-fno-warn-overflowed-literals"
  1023. "-fno-warn-overlapping-patterns"
  1024. "-fno-warn-partial-type-signatures"
  1025. "-fno-warn-pointless-pragmas"
  1026. "-fno-warn-safe"
  1027. "-fno-warn-tabs"
  1028. "-fno-warn-trustworthy-safe"
  1029. "-fno-warn-type-defaults"
  1030. "-fno-warn-typed-holes"
  1031. "-fno-warn-unrecognised-pragmas"
  1032. "-fno-warn-unsafe"
  1033. "-fno-warn-unsupported-calling-conventions"
  1034. "-fno-warn-unsupported-llvm-version"
  1035. "-fno-warn-unticked-promoted-constructors"
  1036. "-fno-warn-unused-binds"
  1037. "-fno-warn-unused-do-bind"
  1038. "-fno-warn-unused-imports"
  1039. "-fno-warn-unused-matches"
  1040. "-fno-warn-warnings-deprecations"
  1041. "-fno-warn-wrong-do-bind"
  1042. "-fno-worker-wrapper"
  1043. "-fno-write-interface"
  1044. "-fobject-code"
  1045. "-fomit-interface-pragmas"
  1046. "-fomit-yields"
  1047. "-fpackage-trust"
  1048. "-fparr"
  1049. "-fpedantic-bottoms"
  1050. "-fplugin"
  1051. "-fplugin-opt"
  1052. "-fpre-inlining"
  1053. "-fprint-equality-relations"
  1054. "-fprint-expanded-synonyms"
  1055. "-fprint-explicit-coercions"
  1056. "-fprint-explicit-foralls"
  1057. "-fprint-explicit-kinds"
  1058. "-fprint-explicit-runtime-reps"
  1059. "-fprint-potential-instances"
  1060. "-fprint-typechecker-elaboration"
  1061. "-fprint-unicode-syntax"
  1062. "-fprof-auto"
  1063. "-fprof-auto-calls"
  1064. "-fprof-auto-exported"
  1065. "-fprof-auto-top"
  1066. "-fprof-cafs"
  1067. "-fprof-count-entries"
  1068. "-framework"
  1069. "-framework-path"
  1070. "-freduction-depth"
  1071. "-fregs-graph"
  1072. "-fregs-iterative"
  1073. "-freverse-errors"
  1074. "-frewrite-rules"
  1075. "-frule-check"
  1076. "-fscoped-type-variables"
  1077. "-fshared-implib"
  1078. "-fshow-warning-groups"
  1079. "-fsimpl-tick-factor"
  1080. "-fsimple-list-literals"
  1081. "-fsimplifier-phases"
  1082. "-fspec-constr"
  1083. "-fspec-constr-count"
  1084. "-fspec-constr-recursive"
  1085. "-fspec-constr-threshold"
  1086. "-fspecialise"
  1087. "-fspecialise-aggressively"
  1088. "-fstatic-argument-transformation"
  1089. "-fstrictness"
  1090. "-fstrictness-before"
  1091. "-fth"
  1092. "-ftype-function-depth"
  1093. "-funbox-small-strict-fields"
  1094. "-funbox-strict-fields"
  1095. "-funfolding-creation-threshold"
  1096. "-funfolding-dict-discount"
  1097. "-funfolding-fun-discount"
  1098. "-funfolding-keeness-factor"
  1099. "-funfolding-use-threshold"
  1100. "-fuse-rpaths"
  1101. "-fvectorisation-avoidance"
  1102. "-fvectorise"
  1103. "-fversion-macros"
  1104. "-fvia-C"
  1105. "-fvia-c"
  1106. "-fwarn-"
  1107. "-fwarn-alternative-layout-rule-transitional"
  1108. "-fwarn-amp"
  1109. "-fwarn-auto-orphans"
  1110. "-fwarn-context-quantification"
  1111. "-fwarn-deprecated-flags"
  1112. "-fwarn-deprecations"
  1113. "-fwarn-deriving-typeable"
  1114. "-fwarn-dodgy-exports"
  1115. "-fwarn-dodgy-foreign-imports"
  1116. "-fwarn-dodgy-imports"
  1117. "-fwarn-duplicate-constraints"
  1118. "-fwarn-duplicate-exports"
  1119. "-fwarn-empty-enumerations"
  1120. "-fwarn-hi-shadowing"
  1121. "-fwarn-identities"
  1122. "-fwarn-implicit-prelude"
  1123. "-fwarn-incomplete-patterns"
  1124. "-fwarn-incomplete-record-updates"
  1125. "-fwarn-incomplete-uni-patterns"
  1126. "-fwarn-inline-rule-shadowing"
  1127. "-fwarn-missing-exported-sigs"
  1128. "-fwarn-missing-fields"
  1129. "-fwarn-missing-import-lists"
  1130. "-fwarn-missing-local-sigs"
  1131. "-fwarn-missing-methods"
  1132. "-fwarn-missing-signatures"
  1133. "-fwarn-monomorphism-restriction"
  1134. "-fwarn-name-shadowing"
  1135. "-fwarn-orphans"
  1136. "-fwarn-overflowed-literals"
  1137. "-fwarn-overlapping-patterns"
  1138. "-fwarn-partial-type-signatures"
  1139. "-fwarn-pointless-pragmas"
  1140. "-fwarn-safe"
  1141. "-fwarn-tabs"
  1142. "-fwarn-trustworthy-safe"
  1143. "-fwarn-type-defaults"
  1144. "-fwarn-typed-holes"
  1145. "-fwarn-unrecognised-pragmas"
  1146. "-fwarn-unsafe"
  1147. "-fwarn-unsupported-calling-conventions"
  1148. "-fwarn-unsupported-llvm-version"
  1149. "-fwarn-unticked-promoted-constructors"
  1150. "-fwarn-unused-binds"
  1151. "-fwarn-unused-do-bind"
  1152. "-fwarn-unused-imports"
  1153. "-fwarn-unused-matches"
  1154. "-fwarn-warnings-deprecations"
  1155. "-fwarn-wrong-do-bind"
  1156. "-fworker-wrapper"
  1157. "-fwrite-interface"
  1158. "-g"
  1159. "-global-package-db"
  1160. "-gransim"
  1161. "-haddock"
  1162. "-haddock-opts"
  1163. "-hcsuf"
  1164. "-hide-all-packages"
  1165. "-hide-all-plugin-packages"
  1166. "-hide-package"
  1167. "-hidir"
  1168. "-hisuf"
  1169. "-hpcdir"
  1170. "-i"
  1171. "-ignore-package"
  1172. "-include-pkg-deps"
  1173. "-j"
  1174. "-keep-hc-file"
  1175. "-keep-hc-files"
  1176. "-keep-llvm-file"
  1177. "-keep-llvm-files"
  1178. "-keep-s-file"
  1179. "-keep-s-files"
  1180. "-keep-tmp-files"
  1181. "-l"
  1182. "-main-is"
  1183. "-mavx"
  1184. "-mavx2"
  1185. "-mavx512cd"
  1186. "-mavx512er"
  1187. "-mavx512f"
  1188. "-mavx512pf"
  1189. "-msse"
  1190. "-msse2"
  1191. "-msse3"
  1192. "-msse4"
  1193. "-msse4.2"
  1194. "-n"
  1195. "-ndp"
  1196. "-no-auto"
  1197. "-no-auto-all"
  1198. "-no-auto-link-packages"
  1199. "-no-caf-all"
  1200. "-no-global-package-db"
  1201. "-no-hs-main"
  1202. "-no-link"
  1203. "-no-recomp"
  1204. "-no-rtsopts"
  1205. "-no-rtsopts-suggestions"
  1206. "-no-user-package-conf"
  1207. "-no-user-package-db"
  1208. "-o"
  1209. "-odir"
  1210. "-ohi"
  1211. "-optF"
  1212. "-optL"
  1213. "-optP"
  1214. "-opta"
  1215. "-optc"
  1216. "-opti"
  1217. "-optl"
  1218. "-optlc"
  1219. "-optlo"
  1220. "-optwindres"
  1221. "-osuf"
  1222. "-outputdir"
  1223. "-package"
  1224. "-package-conf"
  1225. "-package-db"
  1226. "-package-env"
  1227. "-package-id"
  1228. "-package-key"
  1229. "-package-name"
  1230. "-parallel"
  1231. "-pgmF"
  1232. "-pgmL"
  1233. "-pgmP"
  1234. "-pgma"
  1235. "-pgmc"
  1236. "-pgmdll"
  1237. "-pgmi"
  1238. "-pgml"
  1239. "-pgmlc"
  1240. "-pgmlibtool"
  1241. "-pgmlo"
  1242. "-pgms"
  1243. "-pgmwindres"
  1244. "-plugin-package"
  1245. "-plugin-package-id"
  1246. "-prof"
  1247. "-rdynamic"
  1248. "-recomp"
  1249. "-relative-dynlib-paths"
  1250. "-rtsopts"
  1251. "-rtsopts=all"
  1252. "-rtsopts=none"
  1253. "-rtsopts=some"
  1254. "-shared"
  1255. "-sig-of"
  1256. "-smp"
  1257. "-split-objs"
  1258. "-split-sections"
  1259. "-static"
  1260. "-staticlib"
  1261. "-stubdir"
  1262. "-syslib"
  1263. "-this-package-key"
  1264. "-this-unit-id"
  1265. "-threaded"
  1266. "-ticky"
  1267. "-ticky-LNE"
  1268. "-ticky-allocd"
  1269. "-ticky-dyn-thunk"
  1270. "-tmpdir"
  1271. "-trust"
  1272. "-user-package-db"
  1273. "-v"
  1274. "-w"
  1275. "-with-rtsopts"
  1276. ;;; END haskell-ghc-supported-options
  1277. )
  1278. "List of options supported by any known version of GHC.
  1279. This list should be updated by running `haskell-update-ghc-support'.")
  1280. (defun haskell-update-ghc-support (ghc-path)
  1281. "Update `haskell-ghc-supported-options' and `haskell-ghc-supported-extensions'.
  1282. This command should be run once a GHC is released. It will use
  1283. --show-options and --supported-extensions to source the
  1284. information from GHC-PATH. Then it will update source code to
  1285. include newly found options. Old options are never removed and
  1286. are retained to support old versions of the compiler.
  1287. Options and extension are kept in ascending order."
  1288. (interactive
  1289. (list
  1290. (read-shell-command "GHC command: " nil nil
  1291. (let ((filename
  1292. (cond
  1293. (buffer-file-name)
  1294. ((eq major-mode 'dired-mode)
  1295. (when (fboundp 'dired-get-filename)
  1296. ;; silence the checker
  1297. (dired-get-filename nil t))))))
  1298. (and filename (file-relative-name filename))))))
  1299. (let ((extentions (split-string (shell-command-to-string (concat ghc-path " --supported-extensions"))))
  1300. (options (split-string (shell-command-to-string (concat ghc-path " --show-options")))))
  1301. (with-current-buffer
  1302. (find-file-noselect (replace-regexp-in-string "\\.elc$" ".el" (symbol-file 'haskell-ghc-supported-options)))
  1303. (save-excursion
  1304. (goto-char (point-min))
  1305. (re-search-forward "BEGIN haskell-ghc-supported-extensions")
  1306. (forward-line 1)
  1307. (let ((point (point)))
  1308. (re-search-forward "END haskell-ghc-supported-extensions")
  1309. (goto-char (line-beginning-position))
  1310. (delete-region point (point)))
  1311. (setq haskell-ghc-supported-extensions
  1312. (delete-dups (sort (append extentions haskell-ghc-supported-extensions) #'string<)))
  1313. (dolist (item haskell-ghc-supported-extensions)
  1314. (insert " \"" item "\"\n"))
  1315. (re-search-forward "BEGIN haskell-ghc-supported-options")
  1316. (forward-line 1)
  1317. (let ((point (point)))
  1318. (re-search-forward "END haskell-ghc-supported-options")
  1319. (goto-char (line-beginning-position))
  1320. (delete-region point (point)))
  1321. (setq haskell-ghc-supported-options
  1322. (delete-dups (sort (append options haskell-ghc-supported-options) #'string<)))
  1323. (dolist (item haskell-ghc-supported-options)
  1324. (insert " \"" item "\"\n"))))))
  1325. (provide 'haskell-ghc-support)