-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] GHC 8.10.7 #1522
base: master
Are you sure you want to change the base?
[WIP] GHC 8.10.7 #1522
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ packages: | |
codeworld-server/ | ||
codeworld-base/ | ||
funblocks-client/ | ||
|
||
constraints: | ||
ghcjs-dom ==0.9.* | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ Library | |
mtl >= 2.2.1 && < 2.3, | ||
random >= 1.1 && < 1.2, | ||
ref-tf >= 0.4 && < 0.5, | ||
reflex >= 0.6.3 && < 0.7, | ||
reflex >= 0.6.3, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe we need upper bounds on versions to upload to hackage. So feel free to relax bounds, but let's leave them in place for codeworld-api. Other packages don't need upper bounds, since they don't get released to hackage. |
||
template-haskell >= 2.8 && < 2.18, | ||
text >= 1.2.2 && < 1.3, | ||
time >= 1.8 && < 2.0, | ||
|
@@ -73,7 +73,7 @@ Library | |
ghcjs-prim, | ||
codeworld-game-api, | ||
codeworld-prediction, | ||
ghcjs-dom >= 0.9 && < 0.9.4, | ||
ghcjs-dom >= 0.9, | ||
transformers | ||
else | ||
Build-depends: blank-canvas >= 0.6 && < 0.8, | ||
|
@@ -122,7 +122,7 @@ Test-suite unit-tests | |
mtl >= 2.2.1 && < 2.3, | ||
random >= 1.1 && < 1.2, | ||
ref-tf >= 0.4 && < 0.5, | ||
reflex >= 0.6.3 && < 0.7, | ||
reflex >= 0.6.3, | ||
template-haskell >= 2.8 && < 2.18, | ||
text >= 1.2.2 && < 1.3, | ||
time >= 1.8 && < 2.0, | ||
|
@@ -134,7 +134,7 @@ Test-suite unit-tests | |
ghcjs-prim, | ||
codeworld-game-api, | ||
codeworld-prediction, | ||
ghcjs-dom >= 0.9 && < 0.9.4, | ||
ghcjs-dom >= 0.9, | ||
transformers | ||
else | ||
Build-depends: blank-canvas >= 0.6 && < 0.8, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,16 +54,18 @@ Library | |
directory, | ||
exceptions, | ||
filepath, | ||
ghc == 8.6.5, | ||
ghc-boot-th == 8.6.5, | ||
ghc == 8.10.*, | ||
ghc-boot, | ||
ghc-boot-th == 8.10.*, | ||
ghc-lib-parser, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see where this is used. If it's needed, ghc-lib-parser changes dramatically between versions (it's just a copy of parts of ghc), so it needs version bounds. But it would be better to leave it out and update the ghc code, if it's not too difficult. |
||
hashable, | ||
haskell-src-exts >= 1.20, | ||
megaparsec >= 7.0.0 && < 8.0.0, | ||
memory, | ||
mtl, | ||
process, | ||
regex-base, | ||
regex-tdfa, | ||
regex-tdfa-text, | ||
split, | ||
syb, | ||
temporary, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,16 +56,22 @@ import qualified "ghc" FastString as GHC | |
import qualified "ghc" Fingerprint as GHC | ||
import qualified "ghc-boot-th" GHC.LanguageExtensions.Type as GHC | ||
import qualified "ghc" HeaderInfo as GHC | ||
import qualified "ghc" HsExtension as GHC | ||
import qualified "ghc" HsSyn as GHC | ||
import qualified "ghc" GHC.Hs.Extension as GHC | ||
import qualified "ghc" GHC.Hs as GHC | ||
import qualified "ghc" RdrHsSyn as GHC | ||
import qualified "ghc" TcHsSyn as GHC | ||
import qualified "ghc" HscTypes as GHC | ||
import Language.Haskell.Exts | ||
import qualified "ghc" Lexer as GHC | ||
import qualified "ghc" Fingerprint as GHC | ||
import qualified "ghc" Module as GHC | ||
import qualified "ghc" Outputable as GHC | ||
import qualified "ghc" Panic as GHC | ||
import qualified "ghc" Parser as GHC | ||
import qualified "ghc" Platform as GHC | ||
import qualified "ghc" GhcNameVersion as GHC | ||
import qualified "ghc" FileSettings as GHC | ||
import qualified "ghc" ToolSettings as GHC | ||
import qualified "ghc-boot" GHC.Platform as GHC | ||
import qualified "ghc" SrcLoc as GHC | ||
import qualified "ghc" StringBuffer as GHC | ||
import System.Directory | ||
|
@@ -305,32 +311,95 @@ ghcParseCode extraExts src = do | |
state = GHC.mkPState dflagsWithPragmas buffer location | ||
return $ case GHC.unP GHC.parseModule state of | ||
GHC.POk _ (GHC.L _ mod) -> GHCParsed mod | ||
GHC.PFailed _ _ _ -> GHCNoParse | ||
GHC.PFailed _ -> GHCNoParse | ||
|
||
fakeDynFlags :: GHC.DynFlags | ||
fakeDynFlags = GHC.defaultDynFlags fakeSettings fakeLlvmConfig | ||
|
||
fakePlatformMisc :: GHC.PlatformMisc | ||
fakePlatformMisc = GHC.PlatformMisc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I almost cringe to ask it, but can you include field names here so the reader has some hope of finding what they need to change in the future? |
||
mempty | ||
mempty | ||
GHC.IntegerSimple | ||
False | ||
False | ||
False | ||
mempty | ||
False | ||
False | ||
False | ||
False | ||
False | ||
False | ||
mempty | ||
|
||
fakeToolSettings :: GHC.ToolSettings | ||
fakeToolSettings = GHC.ToolSettings | ||
True | ||
True | ||
True | ||
True | ||
True | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
(GHC.Fingerprint (read mempty) (read mempty)) | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
mempty | ||
|
||
fakeSettings :: GHC.Settings | ||
fakeSettings = | ||
GHC.Settings | ||
{ GHC.sProgramName = "ghcjs", | ||
GHC.sProjectVersion = GHC.cProjectVersion, | ||
{ GHC.sGhcNameVersion = GHC.GhcNameVersion "foo" "foo", | ||
GHC.sFileSettings = GHC.FileSettings mempty mempty Nothing mempty mempty mempty, | ||
GHC.sToolSettings = fakeToolSettings, | ||
GHC.sTargetPlatform = | ||
GHC.Platform | ||
{ GHC.platformWordSize = 8, | ||
GHC.platformOS = GHC.OSUnknown, | ||
GHC.platformUnregisterised = True | ||
{ GHC.platformWordSize = GHC.PW8, | ||
GHC.platformMini = GHC.PlatformMini GHC.ArchX86_64 GHC.OSUnknown, | ||
GHC.platformUnregisterised = True, | ||
GHC.platformHasGnuNonexecStack = True, | ||
GHC.platformIsCrossCompiling = True, | ||
GHC.platformHasSubsectionsViaSymbols = True | ||
}, | ||
GHC.sPlatformConstants = | ||
GHC.PlatformConstants | ||
{ GHC.pc_DYNAMIC_BY_DEFAULT = False, | ||
GHC.pc_WORD_SIZE = 8 | ||
}, | ||
GHC.sOpt_P_fingerprint = GHC.fingerprint0 | ||
GHC.sPlatformMisc = fakePlatformMisc | ||
} | ||
|
||
fakeLlvmConfig :: (GHC.LlvmTargets, GHC.LlvmPasses) | ||
fakeLlvmConfig = ([], []) | ||
fakeLlvmConfig :: GHC.LlvmConfig | ||
fakeLlvmConfig = GHC.LlvmConfig mempty mempty | ||
|
||
parsePragmasIntoDynFlags :: | ||
GHC.DynFlags -> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ Executable codeworld-server | |
fast-logger, | ||
filelock, | ||
filepath, | ||
haskell-src-exts < 1.21, | ||
haskell-src-exts, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! I looked up the history, and this was originally added to keep hindent working, but CodeWorld now uses Ormolu instead of hindent, so dropping the restriction is fine. |
||
http-conduit, | ||
lifted-base, | ||
memory, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather keep all the version constraints in one place. Can this be kept in the cabal file?