mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-04 01:25:04 +03:00
ee0aa59c28
* refactor: move primitive errors; refactor primtiveInfo This commit is the first in what will hopefully be a series of helpful primitive refactors. To start, we: - Move some inline `evalError` strings into a `PrimitiveError` module, (similar to the `TypeError`/`Types` module relationship - Add `Reifiable` instances for String and Int types to take these types to their XObj representation. - Add info utility functions for converting Info data to an XObj - Refactor the `info` primitive: - Use monadic combinators + `maybe` instead of nested cases. - Use helper lookup functions that take a *context*--nearly *all* lookup calls currently extract some env, typically without doing anything to it, to pass it to lookup. This is a sign the boundary is incorrect and lookups should take the context instead--this will allow us to eliminate a ton of local `globalEnv`, `typeEnv`, etc. bindings. - Don't print hidden bindings - Indent printed meta information. - Color bindings blue * chore: format code * refactor: improve names for lookups that take a context * feat: print hidden binders when calling info Someone calling info might be interested in hidden binders as well, for debugging purposes, etc. To enable this, we provide a version of show for binders that prints hidden binders. I've also made the printing of meta values in info more generic.
127 lines
3.9 KiB
Plaintext
127 lines
3.9 KiB
Plaintext
name: CarpHask
|
|
version: 0.4.2.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: Info,
|
|
Obj,
|
|
Meta,
|
|
Project,
|
|
Parsing,
|
|
Infer,
|
|
Emit,
|
|
ColorText,
|
|
Constraints,
|
|
Deftype,
|
|
Sumtypes,
|
|
SumtypeCase,
|
|
Commands,
|
|
Template,
|
|
ToTemplate,
|
|
SymPath,
|
|
Types,
|
|
TypesToC,
|
|
Util,
|
|
Eval,
|
|
TypeError,
|
|
InitialTypes,
|
|
AssignTypes,
|
|
GenerateConstraints,
|
|
Polymorphism,
|
|
Concretize,
|
|
ArrayTemplates,
|
|
StaticArrayTemplates,
|
|
Expand,
|
|
Scoring,
|
|
Lookup,
|
|
Context,
|
|
Qualify,
|
|
Repl,
|
|
StartingEnv,
|
|
RenderDocs,
|
|
StructUtils,
|
|
Path,
|
|
Interfaces,
|
|
PrimitiveError
|
|
Primitives,
|
|
Validate,
|
|
Reify,
|
|
Env,
|
|
TypePredicates,
|
|
Managed
|
|
|
|
build-depends: base >= 4.7 && < 5
|
|
, parsec == 3.1.*
|
|
, mtl
|
|
, containers
|
|
, process
|
|
, directory
|
|
, filepath
|
|
, split
|
|
, 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
|