Commit Graph

782 Commits (ChickenProp/promoted-type-applications)

Author SHA1 Message Date
Phil Hazelden b613ebaac2 Support promoted type applications.
Closes #370.

Up to GHC 8.10,

    foo @ 'Bar

was a valid type application. In GHC 9 it's not, which means brittany
needs to allow

    foo @'Bar

which it now does.

The reason the space was needed was to allow a promoted type variable at
the head of a type-level list. That is,

    '['Foo]

is invalid syntax, because it initially parses as the character `'['`.
So the promoted type variable was always given a separator at the
beginning, and we'd get

    '[ 'Foo]

which was valid. Now we handle this case by specifically examining the
head of a type-level list; if it's promoted we introduce spaces, so

    '[ 'Foo ]
    '[Foo]

I've added tests for this and some related cases. In doing so I noticed
that unnecessary spaces get added in front of commas in these lists; I
believe that's a separate bug, and I've written a comment explaining why
it happens, but I haven't tried to fix it.

I'm not sure when the first alternates in the `FirstLastSingleton`
and `FirstLast` branches would ever be hit, so I'm not entirely sure if
the separators are necessary there. But since `docSeparator` disappears
at the end of a line and merges with adjacent separators, they should be
harmless.
2022-11-01 13:20:38 +00:00
Taylor Fausak 0aa04af4eb
Version 0.14.0.2 2022-01-13 09:28:26 -05:00
Taylor Fausak 93a43bf28d Revert "Remove `Language.Haskell.` from module names"
This reverts commit 2fe1432631.
2022-01-13 14:16:14 +00:00
Taylor Fausak 29814f919e
Version 0.14.0.1 2022-01-11 08:49:47 -05:00
Taylor Fausak 97da38fab7 Merge remote-tracking branch 'upstream/master' into main 2022-01-11 13:48:58 +00:00
Taylor Fausak b59f885987
Merge pull request #363 from sergv/master
Fix warnings when building with GHC 9.0.2
2022-01-11 07:46:42 -06:00
Sergey Vinokurov 3996efd5eb
Use defaultDynFlags to obtain ghc’s DynFlags
This way brittany can avoid dealing with incompatibilities in DynFlags
structure between ghc versions (e.g. different versions having
different fields).
2022-01-09 20:11:23 +00:00
Taylor Fausak ad88ba3f57
Update Stack resolver
Fixes #361.
2022-01-05 07:48:36 -05:00
Taylor Fausak 46bf450530
Merge pull request #360 from fendor/patch-1
Update README to mention HLS instead of HIE
2021-12-01 15:19:56 -05:00
fendor 6b1e6fa73a
Update README to mention HLS instead of HIE 2021-12-01 20:51:51 +01:00
Taylor Fausak 2fe1432631 Remove `Language.Haskell.` from module names 2021-11-29 12:25:00 +00:00
Taylor Fausak 6151ba5825 Upgrade to ghcup 0.1.17.4 2021-11-29 12:21:18 +00:00
Taylor Fausak 9e12a36a4f Also build on `master` branch 2021-11-29 12:20:51 +00:00
Taylor Fausak ccabed9d7b Use new czipwith from Hackage 2021-11-29 12:18:38 +00:00
Taylor Fausak 7399b75388
Merge pull request #359 from tfausak/gh-238-format-self
Format Brittany with Brittany
2021-11-29 07:14:35 -05:00
Taylor Fausak 7fa2a85b30 Format Brittany with Brittany
Fixes #238.
2021-11-29 02:31:50 +00:00
Taylor Fausak a15eed5f36
Merge pull request #357 from tfausak/main
Support only GHC 9.0
2021-11-28 09:42:35 -05:00
Taylor Fausak 339d2ebf23 Version 0.14.0.0 2021-11-28 14:08:58 +00:00
Taylor Fausak 8f2625dc87 Simplify test suite 2021-11-28 13:24:11 +00:00
Taylor Fausak cddb98b124 Run tests in serial 2021-11-25 14:16:22 +00:00
Taylor Fausak 21e86adf6e Split tests into individual files 2021-11-23 22:41:01 +00:00
Taylor Fausak 89a9f47b72 Ignore warnings when parsing modules 2021-11-21 23:40:15 +00:00
Taylor Fausak ab59e9acc3 Parse modules "purely", without ghc-paths 2021-11-21 22:58:07 +00:00
Taylor Fausak b8532ca631 Fix release job dependency 2021-11-21 14:05:37 +00:00
Taylor Fausak cdc8405b10 Remove mentions of GHC 8.x 2021-11-21 13:59:35 +00:00
Taylor Fausak fa8365a7fa Set up release job 2021-11-21 13:53:46 +00:00
Taylor Fausak 8fadac8b2e Format imports 2021-11-21 13:44:06 +00:00
Taylor Fausak ccd09ba40a Remove obsolete Stack configuration 2021-11-21 13:28:15 +00:00
Taylor Fausak 8d7b46b9e9 Fix handling of comments 2021-11-07 13:01:54 +00:00
Taylor Fausak 4079981b1d Revert "Format Brittany with Brittany"
This reverts commit 4398b5880d.
2021-11-07 12:37:49 +00:00
Taylor Fausak 4398b5880d Format Brittany with Brittany 2021-11-06 22:29:34 +00:00
Taylor Fausak ac81c5ce90 Update Stack config 2021-11-06 21:44:30 +00:00
Taylor Fausak 208240b62f Remvoe old Stack configs 2021-11-06 21:36:35 +00:00
Taylor Fausak fdbbe9803d Try to spend less time compressing binaries 2021-11-06 21:33:44 +00:00
Taylor Fausak 4ee386a323 Remove unnecessary setup script 2021-11-06 21:32:54 +00:00
Taylor Fausak a1cd4c5ed5 Remove Make configuration 2021-11-06 21:32:31 +00:00
Taylor Fausak 51ca8fd5d7 Remove Nix configuration 2021-11-06 21:31:55 +00:00
Taylor Fausak 694ce973f4 Remove Travis CI config 2021-11-06 21:31:23 +00:00
Taylor Fausak 93172bfd21 Add flag for turning warnings into errors 2021-11-06 21:30:05 +00:00
Taylor Fausak e22a647baa Move literate test files 2021-11-06 21:28:23 +00:00
Taylor Fausak 79be0ed200 Move test suite 2021-11-06 21:25:04 +00:00
Taylor Fausak 93ba90e646 Rename test suite 2021-11-06 21:23:49 +00:00
Taylor Fausak 5631e2500f Merge interface tests into literate tests 2021-11-06 21:23:24 +00:00
Taylor Fausak 9a9b67d410 Merge unit tests into literate tests 2021-11-06 21:21:11 +00:00
Taylor Fausak d879125264 Combine unit test modules 2021-11-06 21:17:57 +00:00
Taylor Fausak c2248cb99c Ignore missed specializations 2021-11-06 21:15:03 +00:00
Taylor Fausak 0c720ee032 Remove unnecessary flags 2021-11-06 21:12:57 +00:00
Taylor Fausak 75aed1cb8a Remove unnecessary GHC version parsing 2021-11-06 21:11:27 +00:00
Taylor Fausak 2ab406471b Move library 2021-11-06 21:07:34 +00:00
Taylor Fausak 95017640a8 Move executable 2021-11-06 21:06:23 +00:00