From 009534dbc31e9f623d9a932fc5b5b656593205d2 Mon Sep 17 00:00:00 2001 From: Callum Lowcay Date: Sun, 20 Mar 2022 14:37:23 +1300 Subject: [PATCH] Upgrade to GHC 9 --- core/package.yaml | 60 +++++++++++++++---------------- hgbc.code-workspace | 8 ----- main/hgbc-main.cabal | 6 ++-- main/package.yaml | 68 ++++++++++++++++++------------------ main/src/HGBC/Config/File.hs | 1 - main/src/HGBC/Keymap.hs | 2 +- sdl/hgbc-sdl.cabal | 17 ++------- sdl/package.yaml | 65 ++++++++++++++-------------------- stack.yaml | 6 +++- stack.yaml.lock | 24 ++++++++++--- testing/package.yaml | 40 ++++++++++----------- 11 files changed, 140 insertions(+), 157 deletions(-) delete mode 100644 hgbc.code-workspace diff --git a/core/package.yaml b/core/package.yaml index 7efb397..ed46b30 100644 --- a/core/package.yaml +++ b/core/package.yaml @@ -1,13 +1,13 @@ -name: hgbc-core -version: 0.1.0.0 -github: "CLowcay/hgbc" -license: BSD3 -author: "Callum Lowcay" -maintainer: "cwslowcay@gmail.com" -copyright: "2019-2020 Callum Lowcay" +name: hgbc-core +version: 0.1.0.0 +github: "CLowcay/hgbc" +license: BSD3 +author: "Callum Lowcay" +maintainer: "cwslowcay@gmail.com" +copyright: "2019-2020 Callum Lowcay" extra-source-files: -- ../README.md + - ../README.md # Metadata used when publishing your package # synopsis: Short description of your package @@ -16,23 +16,23 @@ extra-source-files: # To avoid duplicated efforts in documentation and dealing with the # complications of embedding Haddock markup inside cabal files, it is # common to point users to the README.md file. -description: Please see the README on GitHub at +description: Please see the README on GitHub at dependencies: -- base >= 4.7 && < 5 -- binary -- bytestring -- containers -- directory -- filepath -- hashable -- mmap -- mtl -- primitive -- resourcet -- text -- time -- vector + - base >= 4.7 && < 5 + - binary + - bytestring + - containers + - directory + - filepath + - hashable + - mmap + - mtl + - primitive + - resourcet + - text + - time + - vector library: source-dirs: src @@ -50,12 +50,12 @@ library: tests: hgbc-core-test: - main: Spec.hs - source-dirs: test + main: Spec.hs + source-dirs: test ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N + - -threaded + - -rtsopts + - -with-rtsopts=-N dependencies: - - hgbc-core - - hspec + - hgbc-core + - hspec diff --git a/hgbc.code-workspace b/hgbc.code-workspace deleted file mode 100644 index 6e12a8c..0000000 --- a/hgbc.code-workspace +++ /dev/null @@ -1,8 +0,0 @@ -{ - "folders": [ - { - "path": "." - } - ], - "settings": {} -} \ No newline at end of file diff --git a/main/hgbc-main.cabal b/main/hgbc-main.cabal index 0b0a266..a48601e 100644 --- a/main/hgbc-main.cabal +++ b/main/hgbc-main.cabal @@ -1,10 +1,10 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack -- --- hash: 2899039651917745480fc34f2a14400eda0aa6521dd875111c164fdd00cb5e40 +-- hash: a277b79373b1f287a7222187de2665a2009801760679286b77e9ba024a2348a7 name: hgbc-main version: 0.1.0.0 @@ -70,7 +70,7 @@ library , hashable , hashtables , hgbc-core - , htoml + , htoml-megaparsec , http-types , mtl , optparse-applicative diff --git a/main/package.yaml b/main/package.yaml index 543c752..6bd596b 100644 --- a/main/package.yaml +++ b/main/package.yaml @@ -1,13 +1,13 @@ -name: hgbc-main -version: 0.1.0.0 -github: "CLowcay/hgbc" -license: BSD3 -author: "Callum Lowcay" -maintainer: "cwslowcay@gmail.com" -copyright: "2019-2020 Callum Lowcay" +name: hgbc-main +version: 0.1.0.0 +github: "CLowcay/hgbc" +license: BSD3 +author: "Callum Lowcay" +maintainer: "cwslowcay@gmail.com" +copyright: "2019-2020 Callum Lowcay" extra-source-files: -- ../README.md + - ../README.md # Metadata used when publishing your package # synopsis: Short description of your package @@ -16,34 +16,34 @@ extra-source-files: # To avoid duplicated efforts in documentation and dealing with the # complications of embedding Haddock markup inside cabal files, it is # common to point users to the README.md file. -description: Please see the README on GitHub at +description: Please see the README on GitHub at dependencies: -- aeson -- async -- attoparsec -- base >= 4.7 && < 5 -- bytestring -- containers -- directory -- file-embed -- filepath -- hashable -- hashtables -- hgbc-core -- htoml -- http-types -- mtl -- optparse-applicative -- resourcet -- stm -- text -- time -- unliftio -- unordered-containers -- vector -- wai -- warp + - aeson + - async + - attoparsec + - base >= 4.7 && < 5 + - bytestring + - containers + - directory + - file-embed + - filepath + - hashable + - hashtables + - hgbc-core + - htoml-megaparsec + - http-types + - mtl + - optparse-applicative + - resourcet + - stm + - text + - time + - unliftio + - unordered-containers + - vector + - wai + - warp library: source-dirs: src diff --git a/main/src/HGBC/Config/File.hs b/main/src/HGBC/Config/File.hs index b756086..8484f52 100644 --- a/main/src/HGBC/Config/File.hs +++ b/main/src/HGBC/Config/File.hs @@ -28,7 +28,6 @@ import qualified HGBC.Keymap as Keymap import qualified Machine.GBC.Color as Color import Machine.GBC.Mode (EmulatorMode) import qualified Text.Toml as Toml -import qualified Text.Toml.Types as Toml type family HKD f a where HKD Identity a = a diff --git a/main/src/HGBC/Keymap.hs b/main/src/HGBC/Keymap.hs index a393660..a38fdad 100644 --- a/main/src/HGBC/Keymap.hs +++ b/main/src/HGBC/Keymap.hs @@ -19,7 +19,7 @@ import qualified Data.HashMap.Strict as HM import qualified Data.Map.Strict as M import qualified Data.Text as T import qualified Machine.GBC.Keypad as GBC -import qualified Text.Toml.Types as Toml +import qualified Text.Toml as Toml import Prelude hiding (lookup) type ScancodeDecoder k = T.Text -> Maybe (k, [Modifier]) diff --git a/sdl/hgbc-sdl.cabal b/sdl/hgbc-sdl.cabal index 36ead39..eb18138 100644 --- a/sdl/hgbc-sdl.cabal +++ b/sdl/hgbc-sdl.cabal @@ -1,10 +1,10 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack -- --- hash: b5edbf657de9a3aa6607063afa22abd4d242e59cdc23e8af739309946b2b000c +-- hash: fde6181214b262062cf45b49d7cde5fe337be254c2bb42114558f234b6427183 name: hgbc-sdl version: 0.1.0.0 @@ -40,31 +40,18 @@ executable hgbc-sdl build-depends: OpenGLRaw , StateVar - , aeson - , async , base >=4.7 && <5 , bytestring , containers - , directory , file-embed , filepath - , hashable - , hashtables , hgbc-core , hgbc-main - , htoml - , http-types , megaparsec , mtl , optparse-applicative - , parser-combinators , resourcet , sdl2 - , stm , text - , time - , unordered-containers , vector - , wai - , warp default-language: Haskell2010 diff --git a/sdl/package.yaml b/sdl/package.yaml index 882c5a8..607b6a0 100644 --- a/sdl/package.yaml +++ b/sdl/package.yaml @@ -1,13 +1,13 @@ -name: hgbc-sdl -version: 0.1.0.0 -github: "CLowcay/hgbc" -license: BSD3 -author: "Callum Lowcay" -maintainer: "cwslowcay@gmail.com" -copyright: "2019-2020 Callum Lowcay" +name: hgbc-sdl +version: 0.1.0.0 +github: "CLowcay/hgbc" +license: BSD3 +author: "Callum Lowcay" +maintainer: "cwslowcay@gmail.com" +copyright: "2019-2020 Callum Lowcay" extra-source-files: -- ../README.md + - ../README.md # Metadata used when publishing your package # synopsis: Short description of your package @@ -16,42 +16,29 @@ extra-source-files: # To avoid duplicated efforts in documentation and dealing with the # complications of embedding Haddock markup inside cabal files, it is # common to point users to the README.md file. -description: Please see the README on GitHub at +description: Please see the README on GitHub at dependencies: -- OpenGLRaw -- StateVar -- aeson -- async -- base >= 4.7 && < 5 -- bytestring -- containers -- directory -- file-embed -- filepath -- hashable -- hashtables -- hgbc-core -- hgbc-main -- htoml -- http-types -- megaparsec -- mtl -- optparse-applicative -- parser-combinators -- resourcet -- sdl2 -- stm -- text -- time -- unordered-containers -- vector -- wai -- warp + - OpenGLRaw + - StateVar + - base >= 4.7 && < 5 + - bytestring + - containers + - file-embed + - filepath + - hgbc-core + - hgbc-main + - megaparsec + - mtl + - optparse-applicative + - resourcet + - sdl2 + - text + - vector executables: hgbc-sdl: - main: Main.hs + main: Main.hs source-dirs: src ghc-options: - -threaded diff --git a/stack.yaml b/stack.yaml index ee79684..d85f9d9 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-18.10 +resolver: lts-19.0 packages: - core @@ -6,6 +6,10 @@ packages: - testing - sdl +extra-deps: + - htoml-megaparsec-2.1.0.4@sha256:6c2d9e3d747567c21f5f847317ec62b45143b9d8a01573e3759372c19ae2f16b,3504 + - composition-prelude-3.0.0.2@sha256:1ffed216bd28d810fce0b5be83a661e2a892696d73b3f8de5c0f5edb9b5f0090,1216 + # Override default flag values for local packages and extra-deps flags: sdl2: diff --git a/stack.yaml.lock b/stack.yaml.lock index 1756465..063fe97 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -3,10 +3,24 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: [] +packages: +- completed: + hackage: htoml-megaparsec-2.1.0.4@sha256:6c2d9e3d747567c21f5f847317ec62b45143b9d8a01573e3759372c19ae2f16b,3504 + pantry-tree: + size: 10518 + sha256: 9cc332c7ff4ce73d79832d7024a5223e55726dc916a65057fa72cbb478974a97 + original: + hackage: htoml-megaparsec-2.1.0.4@sha256:6c2d9e3d747567c21f5f847317ec62b45143b9d8a01573e3759372c19ae2f16b,3504 +- completed: + hackage: composition-prelude-3.0.0.2@sha256:1ffed216bd28d810fce0b5be83a661e2a892696d73b3f8de5c0f5edb9b5f0090,1216 + pantry-tree: + size: 284 + sha256: 94fc1c55e9065ae575315ac52a552d0e03beaefef4669a58a9745c6d71b4dd6b + original: + hackage: composition-prelude-3.0.0.2@sha256:1ffed216bd28d810fce0b5be83a661e2a892696d73b3f8de5c0f5edb9b5f0090,1216 snapshots: - completed: - size: 587546 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/10.yaml - sha256: 88b4f81e162ba3adc230a9fcccc4d19ac116377656bab56c7382ca88598b257a - original: lts-18.10 + size: 616897 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/0.yaml + sha256: bbf2be02f17940bac1f87cb462d4fb0c3355de6dcfc53d84f4f9ad3ee2164f65 + original: lts-19.0 diff --git a/testing/package.yaml b/testing/package.yaml index e96ac43..0724d86 100644 --- a/testing/package.yaml +++ b/testing/package.yaml @@ -1,13 +1,13 @@ -name: hgbc-testing -version: 0.1.0.0 -github: "CLowcay/hgbc" -license: BSD3 -author: "Callum Lowcay" -maintainer: "cwslowcay@gmail.com" -copyright: "2019-2020 Callum Lowcay" +name: hgbc-testing +version: 0.1.0.0 +github: "CLowcay/hgbc" +license: BSD3 +author: "Callum Lowcay" +maintainer: "cwslowcay@gmail.com" +copyright: "2019-2020 Callum Lowcay" extra-source-files: -- ../README.md + - ../README.md # Metadata used when publishing your package # synopsis: Short description of your package @@ -16,23 +16,23 @@ extra-source-files: # To avoid duplicated efforts in documentation and dealing with the # complications of embedding Haddock markup inside cabal files, it is # common to point users to the README.md file. -description: Please see the README on GitHub at +description: Please see the README on GitHub at dependencies: -- ansi-terminal -- base >= 4.7 && < 5 -- bytestring -- directory -- filepath -- hgbc-core -- mtl -- temporary -- time -- unliftio + - ansi-terminal + - base >= 4.7 && < 5 + - bytestring + - directory + - filepath + - hgbc-core + - mtl + - temporary + - time + - unliftio executables: hgbc-tester: - main: Main.hs + main: Main.hs source-dirs: src ghc-options: - -threaded