mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 13:37:57 +03:00
* refactor: project configuration get/set parity This commit refactors our handling of project configuration getters/setters in hopes of making it easier to ensure fields that have getters have setters and vice versa, and to ensure field keys are consistent across the Project.config and get-config commands. This commit also makes these commands return XObjs for all calls, instead of coercing certain things into strings and also adds getters for fields that previously lacked them, e.g.: (Project.get-config "libflags") => ("-lm") I've maintained parity with existing behaviors to avoid breaking changes, thus, this works as it did before this commit: (Project.config "libflags" "-lfoo") (Project.get-config "libflags") => ("-lm" "-lfoo") though it could now arguably take a list as an argument to permit complete one-liner replacements; one could still add a single flag and the interface would be more functional: (Project.config "libflags" (cons "-lfoo" (Project.get-config "libflags"))) => ("-lm" "-lfoo") (Project.config "libflags" ("-lbar" "-qux")) => ("-lbar" "-lqux") But, again, I've retained the old behavior to avoid breaking existing builds. This also fixes a small issue where by setting the file path print length to "full" still resulted in the "short" printing scheme. * fix: small typo fix in config field error messages * fix: restore old names for cflag and libflag config fields I accidentally pluralized these field keys, which broke some existing tests. This commit fixes that issue by restoring the original names. * fix: backwards compatibility for configuration fields Another small fix to ensure we retain backwards compatibility with existing code after recent configuration handling changes: pkg-config and load-stack fields should return array values, not lists. * refactor: move project configuration get/setters into a new module Moves the project configuration frontend code into its own module to avoid cyclic deps between Project and Obj and keep the Obj module clean. I've also removed some noisy comments about "internal only" project configuration fields.
135 lines
4.1 KiB
Plaintext
135 lines
4.1 KiB
Plaintext
name: CarpHask
|
|
version: 0.5.4.0
|
|
-- synopsis:
|
|
-- description:
|
|
homepage: https://github.com/eriksvedang/Carp
|
|
license: Apache-2.0
|
|
license-file: LICENSE
|
|
author: Erik Svedäng
|
|
maintainer: erik.svedang@gmail.com
|
|
copyright: Erik Svedäng
|
|
category: General
|
|
build-type: Simple
|
|
extra-source-files: README.md
|
|
cabal-version: >=1.10
|
|
|
|
library
|
|
ghc-options: -Wall -Werror
|
|
hs-source-dirs: src
|
|
exposed-modules: ArrayTemplates,
|
|
AssignTypes,
|
|
BoxTemplates,
|
|
ColorText,
|
|
Commands,
|
|
Concretize,
|
|
Constraints,
|
|
Context,
|
|
Deftype,
|
|
Emit,
|
|
Env,
|
|
EvalError,
|
|
Eval,
|
|
Expand,
|
|
Forms,
|
|
GenerateConstraints,
|
|
Infer,
|
|
Info,
|
|
InitialTypes,
|
|
Interfaces,
|
|
Managed,
|
|
Map,
|
|
Memory,
|
|
Meta,
|
|
Obj,
|
|
Parsing,
|
|
Path,
|
|
Polymorphism,
|
|
Primitives,
|
|
PrimitiveError
|
|
Project,
|
|
ProjectConfig,
|
|
Qualify,
|
|
Reify,
|
|
RenderDocs,
|
|
Repl,
|
|
Set,
|
|
Scoring,
|
|
StartingEnv,
|
|
StaticArrayTemplates,
|
|
StructUtils,
|
|
Sumtypes,
|
|
SymPath,
|
|
Template,
|
|
TemplateGenerator,
|
|
ToTemplate,
|
|
TypeCandidate,
|
|
TypeError,
|
|
TypePredicates,
|
|
Types,
|
|
TypesToC,
|
|
Util,
|
|
Validate
|
|
|
|
build-depends: base >= 4.7 && < 5
|
|
, parsec == 3.1.*
|
|
, mtl
|
|
, containers
|
|
, process
|
|
, directory
|
|
, filepath
|
|
, split
|
|
, hashable
|
|
, haskeline
|
|
, blaze-html
|
|
, blaze-markup
|
|
, text
|
|
, ansi-terminal >= 0.10.3
|
|
, cmark
|
|
, edit-distance
|
|
, open-browser
|
|
|
|
default-language: Haskell2010
|
|
|
|
executable carp
|
|
hs-source-dirs: app
|
|
main-is: Main.hs
|
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
|
build-depends: base
|
|
, CarpHask
|
|
, containers
|
|
, directory
|
|
, filepath
|
|
, haskeline
|
|
, process
|
|
, optparse-applicative
|
|
default-language: Haskell2010
|
|
|
|
executable carp-header-parse
|
|
hs-source-dirs: headerparse
|
|
main-is: Main.hs
|
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
|
build-depends: base
|
|
, CarpHask
|
|
, containers
|
|
, directory
|
|
, parsec
|
|
, optparse-applicative
|
|
default-language: Haskell2010
|
|
|
|
test-suite CarpHask-test
|
|
type: exitcode-stdio-1.0
|
|
hs-source-dirs: test
|
|
main-is: Spec.hs
|
|
build-depends: base
|
|
, CarpHask
|
|
, HUnit
|
|
, containers
|
|
other-modules: TestConstraints
|
|
, TestLookup
|
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
|
default-language: Haskell2010
|
|
|
|
source-repository head
|
|
type: git
|
|
location: https://github.com/carp-lang/Carp
|