forked from codedownio/aeson-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from bitnomial/ghc-9.6.4
Sync from Source Repo and Upgrade to GHC 9.6.4
- Loading branch information
Showing
58 changed files
with
2,303 additions
and
607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
((haskell-mode | ||
. ( | ||
(haskell-process-args-stack-ghci . ("--ghci-options=-ferror-spans" "--no-build" "--no-load" | ||
"aeson-typescript:lib" | ||
"aeson-typescript:aeson-typescript-tests" | ||
)) | ||
))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: aeson-typescript | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
cabal: | ||
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest] | ||
ghc: | ||
- "8.10.7" | ||
- "9.0.2" | ||
- "9.2.8" | ||
- "9.4.7" | ||
- "9.6.3" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: haskell/actions/setup@v2 | ||
id: setup-haskell-cabal | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: "latest" | ||
|
||
- name: Freeze | ||
run: | | ||
cabal freeze | ||
- uses: actions/cache@v3 | ||
name: Cache ~/.cabal/store | ||
with: | ||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install TSC | ||
run: | | ||
npm install -g typescript | ||
- name: Build | ||
run: | | ||
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct | ||
cabal build all | ||
- name: Test | ||
run: | | ||
cabal test all | ||
stack: | ||
name: stack / ghc ${{ matrix.ghc }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- ghc: "8.10.7" | ||
yaml: "stack-8.10.7.yaml" | ||
- ghc: "9.0.2" | ||
yaml: "stack-9.0.2.yaml" | ||
- ghc: "9.2.8" | ||
yaml: "stack-9.2.8.yaml" | ||
- ghc: "9.4.7" | ||
yaml: "stack-9.4.7.yaml" | ||
- ghc: "9.6.3" | ||
yaml: "stack.yaml" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: haskell/actions/setup@v2 | ||
name: Setup Haskell Stack | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
enable-stack: true | ||
stack-version: "latest" | ||
|
||
- uses: actions/cache@v3 | ||
name: Cache ~/.stack | ||
with: | ||
path: ~/.stack | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.yaml }} | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install TSC | ||
run: | | ||
npm install -g typescript | ||
- name: Build | ||
run: | | ||
stack build --stack-yaml ${{matrix.yaml}} --system-ghc --test --bench --no-run-tests --no-run-benchmarks | ||
- name: Test | ||
run: | | ||
stack test --stack-yaml ${{matrix.yaml}} --system-ghc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.stack-work/ | ||
*~ | ||
.dir-locals.el | ||
dist-newstyle | ||
dist-newstyle | ||
*.hie | ||
dev/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# HLint configuration file | ||
# https://github.com/ndmitchell/hlint | ||
########################## | ||
|
||
# This file contains a template configuration file, which is typically | ||
# placed as .hlint.yaml in the root of your project | ||
|
||
|
||
# Warnings currently triggered by your code | ||
- ignore: {name: "Redundant bracket"} | ||
- ignore: {name: "Redundant do"} | ||
- ignore: {name: "Use if"} | ||
- ignore: {name: "Move brackets to avoid $"} | ||
- ignore: {name: "Use <$>"} | ||
- ignore: {name: "Reduce duplication"} | ||
- ignore: {name: "Redundant multi-way if"} | ||
|
||
# Specify additional command line arguments | ||
# | ||
# - arguments: [--color, -XQuasiQuotes] | ||
|
||
|
||
# Control which extensions/flags/modules/functions can be used | ||
# | ||
# - extensions: | ||
# - default: false # all extension are banned by default | ||
# - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used | ||
# - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module | ||
# | ||
# - flags: | ||
# - {name: -w, within: []} # -w is allowed nowhere | ||
# | ||
# - modules: | ||
# - {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set' | ||
# - {name: Control.Arrow, within: []} # Certain modules are banned entirely | ||
# | ||
# - functions: | ||
# - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules | ||
|
||
|
||
# Add custom hints for this project | ||
# | ||
# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar" | ||
# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x} | ||
|
||
|
||
# Turn on hints that are off by default | ||
# | ||
# Ban "module X(module X) where", to require a real export list | ||
# - warn: {name: Use explicit module export list} | ||
# | ||
# Replace a $ b $ c with a . b $ c | ||
# - group: {name: dollar, enabled: true} | ||
# | ||
# Generalise map to fmap, ++ to <> | ||
# - group: {name: generalise, enabled: true} | ||
|
||
|
||
# Ignore some builtin hints | ||
# - ignore: {name: Use let} | ||
# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules | ||
|
||
|
||
# Define some custom infix operators | ||
# - fixity: infixr 3 ~^#^~ | ||
|
||
|
||
# To generate a suitable file for HLint do: | ||
# $ hlint --default > .hlint.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Change log | ||
|
||
## Unreleased | ||
|
||
## 0.7.0.0 | ||
|
||
Represents optional fields (according to the Haskell model) as required fields | ||
with type `A | null` rather than optional fields. | ||
|
||
## 0.6.2.0 | ||
|
||
* Expose generic type constructors `T4` through `T10`. (We only exposed `T`, `T1`, `T2`, and `T3` before.) | ||
|
||
## 0.6.1.0 | ||
|
||
* Fix a bug which caused enum formatting mode to turn off when multiple declarations were provided (#41) | ||
* Fix some mismatch issues where an enum value doesn't match the desired string. | ||
|
||
## 0.6.0.0 | ||
|
||
* New word instances: Word, Word16, Word32, Word64 | ||
* New instances from Data.Functor: Compose, Const, Identity, Product | ||
|
||
## 0.5.0.0 | ||
|
||
* [#35](https://github.com/codedownio/aeson-typescript/pull/35) | ||
* Add `Data.Aeson.TypeScript.LegalName` module for checking whether a name is a legal JavaScript name or not. | ||
* The `defaultFormatter` will `error` if the name contains illegal characters. | ||
* Be able to transfer Haddock comments to emitted TypeScript (requires GHC >= 9.2 and `-haddock` flag) | ||
* Add support for @no-emit-typescript in Haddocks for constructors and record fields (requires GHC >= 9.2 and `-haddock` flag) | ||
* Support GHC 9.6.1 | ||
|
||
## 0.4.2.0 | ||
|
||
* Fix TypeScript (A.KeyMap a) instance | ||
|
||
## 0.4.1.0 | ||
|
||
* Add TypeScript Int16 | ||
* Add TypeScript (A.KeyMap a) instance for aeson 2 | ||
|
||
## 0.4.0.0 | ||
|
||
* Add new built-in instances (Word8, Int32, Int64, Map, HashSet) | ||
* Export TSField in the Internal module | ||
* Avoid producing redundant constraints (for fewer warnings when using -Wredundant-constraints) | ||
* Encode maps as mapped types (allows you to have unions as keys) | ||
* Support mapping open type families to lookup types (+ progress on handling promoted types) | ||
* Improve propagation of T variables in declarations | ||
* Add support for "key types", in case you have custom implementations of FromJSONKey/ToJSONKey | ||
* Add ability to recursively derive missing instances (fragile) | ||
|
||
## 0.3.0.1 | ||
|
||
* Support GHC 9.0.1 | ||
|
||
## 0.3.0.0 | ||
|
||
* Update th-abstraction dependency to < 0.5 to support working with newer Stack LTS. | ||
* Major refactors to improve TH quality. | ||
* Tracking of parent types to allow recursive deriving | ||
* The `getParentTypes` function was added to the main typeclass. | ||
* The new `Data.Aeson.TypeScript.Recursive` module for working with recursive definitions. | ||
* New support for mapping Haskell closed type families to TypeScript lookup types. | ||
|
||
## 0.2.0.0 | ||
|
||
* New formatting option `interfaceNameModifier`. | ||
|
||
## 0.1.0.0 | ||
|
||
* Initial release. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright Tom McLaughlin (c) 2017 | ||
Copyright Tom McLaughlin (c) 2022 | ||
|
||
All rights reserved. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.