Skip to content

Commit

Permalink
Switch to GHC2021 (#550)
Browse files Browse the repository at this point in the history
* Switch to GHC2021

We don't support GHC < 9.2, so this is safe.

* Format
  • Loading branch information
michaelpj authored Feb 4, 2024
1 parent 794d689 commit 52607f1
Show file tree
Hide file tree
Showing 41 changed files with 16 additions and 164 deletions.
3 changes: 0 additions & 3 deletions lsp-test/func-test/FuncTest.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ViewPatterns #-}

module Main where
Expand Down
15 changes: 5 additions & 10 deletions lsp-test/lsp-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ source-repository head

library
hs-source-dirs: src
default-language: Haskell2010
default-extensions: ImportQualifiedPost
default-language: GHC2021
exposed-modules: Language.LSP.Test
reexported-modules:
lsp-types:Language.LSP.Protocol.Types
Expand Down Expand Up @@ -93,8 +92,7 @@ test-suite tests
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Test.hs
default-language: Haskell2010
default-extensions: ImportQualifiedPost
default-language: GHC2021
ghc-options: -W
other-modules: DummyServer
build-depends:
Expand All @@ -117,8 +115,7 @@ test-suite tests
test-suite func-test
type: exitcode-stdio-1.0
hs-source-dirs: func-test
default-language: Haskell2010
default-extensions: ImportQualifiedPost
default-language: GHC2021
main-is: FuncTest.hs
build-depends:
, base
Expand All @@ -136,8 +133,7 @@ test-suite func-test
test-suite example
type: exitcode-stdio-1.0
hs-source-dirs: example
default-language: Haskell2010
default-extensions: ImportQualifiedPost
default-language: GHC2021
main-is: Test.hs
build-depends:
, base
Expand All @@ -149,8 +145,7 @@ test-suite example
benchmark simple-bench
type: exitcode-stdio-1.0
hs-source-dirs: bench
default-language: Haskell2010
default-extensions: ImportQualifiedPost
default-language: GHC2021
main-is: SimpleBench.hs
ghc-options: -Wall -O2 -eventlog -rtsopts
build-depends:
Expand Down
5 changes: 0 additions & 5 deletions lsp-test/src/Language/LSP/Test.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}

{- |
Module : Language.LSP.Test
Expand Down
1 change: 0 additions & 1 deletion lsp-test/src/Language/LSP/Test/Compat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
-- For some reason ghc warns about not using
-- Control.Monad.IO.Class but it's needed for
-- MonadIO
Expand Down
3 changes: 0 additions & 3 deletions lsp-test/src/Language/LSP/Test/Files.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}

module Language.LSP.Test.Files (
swapFiles,
Expand Down
3 changes: 0 additions & 3 deletions lsp-test/src/Language/LSP/Test/Parsing.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeInType #-}

module Language.LSP.Test.Parsing (
Expand Down
7 changes: 0 additions & 7 deletions lsp-test/src/Language/LSP/Test/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,8 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}

module Language.LSP.Test.Session
( Session(..)
Expand Down
1 change: 0 additions & 1 deletion lsp-test/test/DummyServer.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeInType #-}

module DummyServer where
Expand Down
2 changes: 0 additions & 2 deletions lsp-test/test/Test.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeInType #-}

import Control.Applicative.Combinators
Expand Down
2 changes: 0 additions & 2 deletions lsp-types/generator/CodeGen.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}

{- | The main module for generating code from the metamodel
Expand Down
27 changes: 5 additions & 22 deletions lsp-types/lsp-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ flag force-ospath

library
hs-source-dirs: src generated
default-language: Haskell2010
default-language: GHC2021

-- Various things we want on by default
-- * syntactic niceties, QOL
Expand All @@ -46,27 +46,16 @@ library
default-extensions:
DataKinds
DeriveAnyClass
DeriveGeneric
DerivingStrategies
DerivingVia
DuplicateRecordFields
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
KindSignatures
MultiParamTypeClasses
NegativeLiterals
OverloadedStrings
PolyKinds
ScopedTypeVariables
StandaloneDeriving
StandaloneKindSignatures
StrictData
TypeApplications
TypeFamilies
TypeOperators
UndecidableInstances

build-depends:
Expand Down Expand Up @@ -526,9 +515,8 @@ library metamodel
-- library, but it's here if people want it
visibility: public
hs-source-dirs: metamodel
default-language: Haskell2010
default-language: GHC2021
default-extensions:
ImportQualifiedPost
StrictData

exposed-modules:
Expand All @@ -546,14 +534,11 @@ library metamodel
library lsp-types-quickcheck
visibility: public
hs-source-dirs: quickcheck generated
default-language: Haskell2010
default-language: GHC2021
default-extensions:
ImportQualifiedPost
StrictData
DerivingVia
DerivingStrategies
StandaloneDeriving
GeneralizedNewtypeDeriving

exposed-modules:
Language.LSP.Protocol.QuickCheck
Expand All @@ -576,9 +561,8 @@ library lsp-types-quickcheck

executable generator
hs-source-dirs: generator
default-language: Haskell2010
default-language: GHC2021
default-extensions:
ImportQualifiedPost
StrictData

main-is: Main.hs
Expand All @@ -597,8 +581,7 @@ executable generator
test-suite lsp-types-test
type: exitcode-stdio-1.0
hs-source-dirs: test
default-language: Haskell2010
default-extensions: ImportQualifiedPost
default-language: GHC2021
main-is: Main.hs
other-modules:
CapabilitiesSpec
Expand Down
4 changes: 0 additions & 4 deletions lsp-types/metamodel/Language/LSP/MetaModel/Types.hs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}

{- |
This defines the types of the LSP "metamodel", which is a machine-readable format specifying the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}

module Language.LSP.Protocol.QuickCheck.Common where
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
-- See Note [Arbitary Maybe Void]
{-# OPTIONS_GHC -Wno-simplifiable-class-constraints #-}
Expand Down
3 changes: 0 additions & 3 deletions lsp-types/src/Data/IxMap.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE ViewPatterns #-}
Expand Down
5 changes: 0 additions & 5 deletions lsp-types/src/Data/Row/Aeson.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}

Expand Down
5 changes: 0 additions & 5 deletions lsp-types/src/Data/Row/Hashable.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}

Expand Down
2 changes: 0 additions & 2 deletions lsp-types/src/Language/LSP/Protocol/Capabilities.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}

module Language.LSP.Protocol.Capabilities (
fullCaps,
Expand Down
4 changes: 0 additions & 4 deletions lsp-types/src/Language/LSP/Protocol/Message/Method.hs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# OPTIONS_GHC -Wno-orphans #-}

Expand Down
3 changes: 0 additions & 3 deletions lsp-types/src/Language/LSP/Protocol/Message/Parsing.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeInType #-}

module Language.LSP.Protocol.Message.Parsing where
Expand Down
5 changes: 0 additions & 5 deletions lsp-types/src/Language/LSP/Protocol/Message/Registration.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeInType #-}

Expand Down
4 changes: 0 additions & 4 deletions lsp-types/src/Language/LSP/Protocol/Message/Types.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeInType #-}

module Language.LSP.Protocol.Message.Types where
Expand Down
4 changes: 0 additions & 4 deletions lsp-types/src/Language/LSP/Protocol/Types/Common.hs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeOperators #-}

-- | Common types that aren't in the specification
module Language.LSP.Protocol.Types.Common (
Expand Down
1 change: 0 additions & 1 deletion lsp-types/src/Language/LSP/Protocol/Types/Edit.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}

module Language.LSP.Protocol.Types.Edit where

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Language.LSP.Protocol.Types.SemanticTokens where

Expand Down
5 changes: 0 additions & 5 deletions lsp-types/src/Language/LSP/Protocol/Types/Uri.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeSynonymInstances #-}

module Language.LSP.Protocol.Types.Uri (
Uri (..),
Expand Down
1 change: 0 additions & 1 deletion lsp-types/src/Language/LSP/Protocol/Types/Uri/OsPath.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{- ORMOLU_DISABLE -}

{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}

#if MIN_VERSION_filepath(1,4,100)
#define OS_PATH 1
Expand Down
1 change: 0 additions & 1 deletion lsp-types/src/Language/LSP/Protocol/Utils/Misc.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}

module Language.LSP.Protocol.Utils.Misc (
Expand Down
Loading

0 comments on commit 52607f1

Please sign in to comment.