-
Notifications
You must be signed in to change notification settings - Fork 16
Update ghc to 9.10.2 #203
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
Merged
Merged
Update ghc to 9.10.2 #203
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,6 +1,6 @@ | ||
| { | ||
| pkgs ? import ./nixpkgs.nix { }, | ||
| ghcAttr ? "ghc902", | ||
| ghcAttr ? "ghc9102", | ||
| }: | ||
|
|
||
| with pkgs; | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,4 @@ | ||
| resolver: nightly-2025-07-12 | ||
|
|
||
| packages: | ||
| - linear-base-0.5.0 |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -9,13 +9,15 @@ | |
| {-# LANGUAGE ViewPatterns #-} | ||
| module Language.Java.Inline.Plugin (plugin) where | ||
|
|
||
| import Control.Applicative ((<|>)) | ||
| import Control.Monad.Writer hiding ((<>)) | ||
| import Control.Monad (forM, when, zipWithM) | ||
| import Control.Monad.Writer | ||
| import qualified Data.ByteString as BS | ||
| import Data.ByteString.Builder (Builder) | ||
| import qualified Data.ByteString.Builder as Builder | ||
| import Data.Char (chr, ord) | ||
| import Data.List (find, intersperse, isSuffixOf) | ||
| import Data.Maybe (fromMaybe) | ||
| import Data.Monoid (Endo(..)) | ||
| import qualified Data.Text as Text | ||
| import qualified Data.Text.Encoding as Text | ||
| import Foreign.JNI.Types (JType(..)) | ||
|
|
@@ -83,9 +85,12 @@ plugin = defaultPlugin | |
| return guts | ||
| { mg_binds = binds | ||
| , mg_foreign = appendStubC (mg_foreign guts) $ | ||
| text bctable_header | ||
| CStub | ||
| ( text bctable_header | ||
| $$ dotClasses dcs | ||
| $$ cConstructors | ||
| ) | ||
| [] [] | ||
|
Comment on lines
+88
to
+93
Member
Author
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. This is the most uncertain part of the change. It seems to work, but the documentation of |
||
| } | ||
|
|
||
| -- The contents of bctable.h | ||
|
|
@@ -159,7 +164,7 @@ buildJava guts qqOccs jimports = do | |
| p_fam_env <- getPackageFamInstEnv | ||
| let fam_envs = (p_fam_env, mg_fam_inst_env guts) | ||
| methods <- forM qqOccs $ \QQOcc {..} -> do | ||
| let (_, normty) = normaliseType fam_envs Nominal (expandTypeSynonyms qqOccResTy) | ||
| let Reduction _ normty = normaliseType fam_envs Nominal (expandTypeSynonyms qqOccResTy) | ||
| jTypeNames <- findJTypeNames | ||
| resty <- case toJavaType jTypeNames normty of | ||
| Just resty -> return resty | ||
|
|
@@ -202,8 +207,8 @@ buildJava guts qqOccs jimports = do | |
| (expandTypeSynonyms -> toJavaType jTypeNames -> Just jtype) = | ||
| return $ mconcat | ||
| ["final ", Builder.byteString jtype, " $", Builder.byteString name] | ||
| getArg _ line name t = GhcPlugins.Extras.failWith $ hsep | ||
| [ parens (text "line" <+> integer line) <> ":" | ||
| getArg _ lineN name t = GhcPlugins.Extras.failWith $ hsep | ||
| [ parens (text "line" <+> integer lineN) <> ":" | ||
| , quotes (ftext (mkFastStringByteString name) <+> "::" <+> ppr t) | ||
| , text "is not sufficiently instantiated to infer a java type." | ||
| ] | ||
|
|
@@ -228,7 +233,7 @@ mangle m = mangleClassName (unitIdString $ moduleUnitId m) | |
| -- Call the java compiler and feeds it the given Java code in Builder form. | ||
| buildBytecode :: [CommandLineOption] -> Builder -> CoreM [DotClass] | ||
| buildBytecode args unit = do | ||
| let Just javac = find ("javac" `isSuffixOf`) args <|> return "javac" | ||
| let javac = fromMaybe "javac" $ find ("javac" `isSuffixOf`) args | ||
| m <- getModule | ||
| liftIO $ withSystemTempDirectory "inlinejava" $ \dir -> do | ||
| let src = dir </> mangle m <.> "java" | ||
|
|
@@ -393,7 +398,7 @@ collectQQMarkers qqMarkerNames p0 = do | |
| expMarkers (Let bnd e) = Let <$> bindMarkers bnd <*> expMarkers e | ||
| expMarkers (Case e0 b t alts) = do | ||
| e0' <- expMarkers e0 | ||
| let expAlt (a, bs, e) = (,,) a bs <$> expMarkers e | ||
| let expAlt (Alt a bs e) = Alt a bs <$> expMarkers e | ||
| alts' <- mapM expAlt alts | ||
| return (Case e0' b t alts') | ||
| expMarkers (Cast e c) = flip Cast c <$> expMarkers e | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.