1
1
mirror of https://github.com/anoma/juvix.git synced 2024-07-14 19:30:34 +03:00

Upgrade to ghc-9.8.2 (#2794)

haskell lsp 2.8.0.0 (available in ghc-up) is compatible with ghc-9.8.2.
I had to do some renaming in order to avoid shadowing.
This commit is contained in:
Jan Mas Rovira 2024-06-08 14:43:33 +02:00 committed by GitHub
parent 2c683a1179
commit 6622d88c3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 127 additions and 2639 deletions

View File

@ -4,7 +4,7 @@ ARG VARIANT="ubuntu-22.04"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1 ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1
ENV BOOTSTRAP_HASKELL_GHC_VERSION=9.8.1 ENV BOOTSTRAP_HASKELL_GHC_VERSION=9.8.2
ENV BOOTSTRAP_HASKELL_CABAL_VERSION=3.10.1.0 ENV BOOTSTRAP_HASKELL_CABAL_VERSION=3.10.1.0
ENV BOOTSTRAP_HASKELL_STACK_VERSION=2.11.1 ENV BOOTSTRAP_HASKELL_STACK_VERSION=2.11.1
ENV BOOTSTRAP_HASKELL_INSTALL_STACK=1 ENV BOOTSTRAP_HASKELL_INSTALL_STACK=1

View File

@ -15,7 +15,7 @@ jobs:
build: build:
name: Build static binary name: Build static binary
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: quay.io/benz0li/ghc-musl:9.8.1 container: quay.io/benz0li/ghc-musl:9.8.2
steps: steps:
- name: checkout code - name: checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -1,6 +1,6 @@
-- Generated by stack2cabal -- Generated by stack2cabal
with-compiler: ghc-9.8.1 with-compiler: ghc-9.8.2
packages: packages:
./ ./

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@ author:
Lukasz Czajka, Lukasz Czajka,
Github's contributors, Github's contributors,
] ]
tested-with: ghc == 9.8.1 tested-with: ghc == 9.8.2
homepage: https://juvix.org homepage: https://juvix.org
bug-reports: https://github.com/anoma/juvix/issues bug-reports: https://github.com/anoma/juvix/issues
description: The Juvix compiler description: The Juvix compiler
@ -47,7 +47,7 @@ extra-source-files:
dependencies: dependencies:
- aeson-better-errors == 0.9.* - aeson-better-errors == 0.9.*
- aeson == 2.2.* - aeson == 2.2.*
- ansi-terminal == 1.0.* - ansi-terminal == 1.1.*
- base == 4.19.* - base == 4.19.*
- base16-bytestring == 1.0.* - base16-bytestring == 1.0.*
- bitvec == 1.1.* - bitvec == 1.1.*
@ -70,7 +70,7 @@ dependencies:
- filelock == 0.1.* - filelock == 0.1.*
- filepath == 1.4.* - filepath == 1.4.*
- flatparse == 0.5.* - flatparse == 0.5.*
- ghc == 9.8.1 - ghc == 9.8.2
- githash == 0.1.* - githash == 0.1.*
- hashable == 1.4.* - hashable == 1.4.*
- language-c == 0.9.* - language-c == 0.9.*
@ -85,7 +85,7 @@ dependencies:
- pretty == 1.1.* - pretty == 1.1.*
- prettyprinter == 1.7.* - prettyprinter == 1.7.*
- prettyprinter-ansi-terminal == 1.1.* - prettyprinter-ansi-terminal == 1.1.*
- primitive == 0.8.* - primitive == 0.9.*
- process == 1.6.* - process == 1.6.*
- safe == 0.3.* - safe == 0.3.*
- scientific == 0.3.* - scientific == 0.3.*

View File

@ -75,7 +75,7 @@ indexTree :: [TopModulePath] -> Tree Symbol (Maybe TopModulePath)
indexTree = foldr insertModule emptyTree indexTree = foldr insertModule emptyTree
where where
insertModule :: TopModulePath -> ModuleTree -> ModuleTree insertModule :: TopModulePath -> ModuleTree -> ModuleTree
insertModule m@(TopModulePath ps s) t = go (Just t) (snoc ps s) insertModule m@(TopModulePath ps name) t = go (Just t) (snoc ps name)
where where
go :: Maybe ModuleTree -> [Symbol] -> ModuleTree go :: Maybe ModuleTree -> [Symbol] -> ModuleTree
go tree = \case go tree = \case
@ -97,7 +97,7 @@ createIndexFile ::
Sem r () Sem r ()
createIndexFile ps = do createIndexFile ps = do
outputDir <- asks (^. htmlOptionsOutputDir) outputDir <- asks (^. htmlOptionsOutputDir)
indexHtml >>= (template mempty >=> writeHtml (outputDir <//> indexFileName)) indexHtml >>= (topTemplate mempty >=> writeHtml (outputDir <//> indexFileName))
where where
indexHtml :: Sem r Html indexHtml :: Sem r Html
indexHtml = do indexHtml = do
@ -128,7 +128,7 @@ createIndexFile ps = do
return $ ul c' return $ ul c'
goChild :: Symbol -> ModuleTree -> Sem r Html goChild :: Symbol -> ModuleTree -> Sem r Html
goChild s (Tree lbl children) = node goChild sym (Tree lbl children) = node
where where
nodeRow :: Sem r Html nodeRow :: Sem r Html
nodeRow = case lbl of nodeRow = case lbl of
@ -136,7 +136,7 @@ createIndexFile ps = do
return return
$ Html.span $ Html.span
! Attr.class_ attrBare ! Attr.class_ attrBare
$ toHtml (prettyText s) $ toHtml (prettyText sym)
Just lbl' -> do Just lbl' -> do
lnk <- nameIdAttrRef lbl' Nothing lnk <- nameIdAttrRef lbl' Nothing
return return
@ -219,8 +219,8 @@ moduleDocPath m = do
topModulePath :: Module 'Scoped 'ModuleTop -> TopModulePath topModulePath :: Module 'Scoped 'ModuleTop -> TopModulePath
topModulePath = (^. modulePath . S.nameConcrete) topModulePath = (^. modulePath . S.nameConcrete)
template :: forall r. (Members '[Reader EntryPoint, Reader HtmlOptions] r) => Html -> Html -> Sem r Html topTemplate :: forall r. (Members '[Reader EntryPoint, Reader HtmlOptions] r) => Html -> Html -> Sem r Html
template rightMenu' content' = do topTemplate rightMenu' content' = do
mathJax <- mathJaxCdn mathJax <- mathJaxCdn
ayuTheme <- ayuCss ayuTheme <- ayuCss
judocTheme <- linuwialCss judocTheme <- linuwialCss
@ -309,7 +309,7 @@ goTopModule cs m = do
docHtml = do docHtml = do
content' <- content content' <- content
rightMenu' <- rightMenu rightMenu' <- rightMenu
template rightMenu' content' topTemplate rightMenu' content'
where where
rightMenu :: Sem s Html rightMenu :: Sem s Html
rightMenu = do rightMenu = do
@ -419,8 +419,8 @@ goStatement = \case
StatementInductive t -> goInductive t StatementInductive t -> goInductive t
StatementOpenModule t -> goOpen t StatementOpenModule t -> goOpen t
StatementFunctionDef t -> goFunctionDef t StatementFunctionDef t -> goFunctionDef t
StatementSyntax s -> goSyntax s StatementSyntax syn -> goSyntax syn
StatementImport s -> goImport s StatementImport t -> goImport t
StatementModule m -> goLocalModule m StatementModule m -> goLocalModule m
StatementProjectionDef {} -> mempty StatementProjectionDef {} -> mempty
where where
@ -454,8 +454,8 @@ goFixity def = do
mkPrec :: Sem r Html mkPrec :: Sem r Html
mkPrec = case info ^. fixityPrecSame of mkPrec = case info ^. fixityPrecSame of
Just txt -> do Just txt -> do
s <- ppCodeHtml defaultOptions txt d <- ppCodeHtml defaultOptions txt
return (row $ toHtml ("Same precedence as " <> s)) return (row $ toHtml ("Same precedence as " <> d))
Nothing -> Nothing ->
goPrec "Higher" (info ^. fixityPrecAbove) goPrec "Higher" (info ^. fixityPrecAbove)
<> goPrec "Lower" (info ^. fixityPrecBelow) <> goPrec "Lower" (info ^. fixityPrecBelow)

View File

@ -276,7 +276,7 @@ go sdt = case sdt of
STEmpty -> return mempty STEmpty -> return mempty
STChar c -> return (toHtml c) STChar c -> return (toHtml c)
STText _ t -> return (toHtml t) STText _ t -> return (toHtml t)
STLine s -> return ("\n" <> toHtml (textSpaces s)) STLine n -> return ("\n" <> toHtml (textSpaces n))
STAnn ann content -> go content >>= putTag ann STAnn ann content -> go content >>= putTag ann
STConcat l -> mconcatMap go l STConcat l -> mconcatMap go l
where where
@ -373,13 +373,12 @@ moduleDocRelativePath m = do
| null fixPrefix -> return relpath | null fixPrefix -> return relpath
| otherwise -> do | otherwise -> do
return $ return $
maybe fromMaybe
relpath relpath
id
(stripProperPrefix (fromJust (parseRelDir fixPrefix)) relpath) (stripProperPrefix (fromJust (parseRelDir fixPrefix)) relpath)
nameIdAttrRef :: (Members '[Reader HtmlOptions] r) => TopModulePath -> Maybe S.NameId -> Sem r AttributeValue nameIdAttrRef :: (Members '[Reader HtmlOptions] r) => TopModulePath -> Maybe S.NameId -> Sem r AttributeValue
nameIdAttrRef tp s = do nameIdAttrRef tp mid = do
prefixUrl <- unpack <$> asks (^. htmlOptionsUrlPrefix) prefixUrl <- unpack <$> asks (^. htmlOptionsUrlPrefix)
path <- toFilePath <$> moduleDocRelativePath tp path <- toFilePath <$> moduleDocRelativePath tp
noPath <- asks (^. htmlOptionsNoPath) noPath <- asks (^. htmlOptionsNoPath)
@ -388,5 +387,5 @@ nameIdAttrRef tp s = do
maybe maybe
(return mempty) (return mempty)
(((preEscapedToValue '#' <>) <$>) . nameIdAttr) (((preEscapedToValue '#' <>) <$>) . nameIdAttr)
s mid
return $ fromString prefix <> attr return $ fromString prefix <> attr

View File

@ -149,7 +149,7 @@ go fname = do
_ -> return blockStmts _ -> return blockStmts
htmlStatements :: [Html] <- htmlStatements :: [Html] <-
mapM (\s -> goRender s <> pure htmlSemicolon) stmts' mapM (\stm -> goRender stm <> pure htmlSemicolon) stmts'
resHtml <- resHtml <-
toStrict toStrict
@ -208,7 +208,7 @@ goRender xs = do
concreteOpts <- asks @ProcessJuvixBlocksArgs (^. processJuvixBlocksArgsConcreteOpts) concreteOpts <- asks @ProcessJuvixBlocksArgs (^. processJuvixBlocksArgsConcreteOpts)
HtmlRender.ppCodeHtml concreteOpts xs HtmlRender.ppCodeHtml concreteOpts xs
indModuleFilter :: [Concrete.Statement s] -> [Concrete.Statement s] indModuleFilter :: forall s. [Concrete.Statement s] -> [Concrete.Statement s]
indModuleFilter = indModuleFilter =
filter filter
( \case ( \case

View File

@ -1,6 +1,6 @@
ghc-options: ghc-options:
"$locals": -optP-Wno-nonportable-include-path "$locals": -optP-Wno-nonportable-include-path
resolver: nightly-2024-02-06 resolver: nightly-2024-05-31
extra-deps: extra-deps:
- git: https://github.com/haskell-effectful/effectful.git - git: https://github.com/haskell-effectful/effectful.git
commit: 2037be9a4f4e8f8fd280d9359b1bc7feff9b29b9 commit: 2037be9a4f4e8f8fd280d9359b1bc7feff9b29b9