mirror of
https://github.com/anoma/juvix.git
synced 2024-12-26 17:13:35 +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:
parent
2c683a1179
commit
6622d88c3b
@ -4,7 +4,7 @@ ARG VARIANT="ubuntu-22.04"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
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_STACK_VERSION=2.11.1
|
||||
ENV BOOTSTRAP_HASKELL_INSTALL_STACK=1
|
||||
|
2
.github/workflows/linux-static-binary.yaml
vendored
2
.github/workflows/linux-static-binary.yaml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
build:
|
||||
name: Build static binary
|
||||
runs-on: ubuntu-latest
|
||||
container: quay.io/benz0li/ghc-musl:9.8.1
|
||||
container: quay.io/benz0li/ghc-musl:9.8.2
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- Generated by stack2cabal
|
||||
|
||||
with-compiler: ghc-9.8.1
|
||||
with-compiler: ghc-9.8.2
|
||||
|
||||
packages:
|
||||
./
|
||||
|
2715
cabal.project.freeze
2715
cabal.project.freeze
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@ author:
|
||||
Lukasz Czajka,
|
||||
Github's contributors,
|
||||
]
|
||||
tested-with: ghc == 9.8.1
|
||||
tested-with: ghc == 9.8.2
|
||||
homepage: https://juvix.org
|
||||
bug-reports: https://github.com/anoma/juvix/issues
|
||||
description: The Juvix compiler
|
||||
@ -47,7 +47,7 @@ extra-source-files:
|
||||
dependencies:
|
||||
- aeson-better-errors == 0.9.*
|
||||
- aeson == 2.2.*
|
||||
- ansi-terminal == 1.0.*
|
||||
- ansi-terminal == 1.1.*
|
||||
- base == 4.19.*
|
||||
- base16-bytestring == 1.0.*
|
||||
- bitvec == 1.1.*
|
||||
@ -70,7 +70,7 @@ dependencies:
|
||||
- filelock == 0.1.*
|
||||
- filepath == 1.4.*
|
||||
- flatparse == 0.5.*
|
||||
- ghc == 9.8.1
|
||||
- ghc == 9.8.2
|
||||
- githash == 0.1.*
|
||||
- hashable == 1.4.*
|
||||
- language-c == 0.9.*
|
||||
@ -85,7 +85,7 @@ dependencies:
|
||||
- pretty == 1.1.*
|
||||
- prettyprinter == 1.7.*
|
||||
- prettyprinter-ansi-terminal == 1.1.*
|
||||
- primitive == 0.8.*
|
||||
- primitive == 0.9.*
|
||||
- process == 1.6.*
|
||||
- safe == 0.3.*
|
||||
- scientific == 0.3.*
|
||||
|
@ -75,7 +75,7 @@ indexTree :: [TopModulePath] -> Tree Symbol (Maybe TopModulePath)
|
||||
indexTree = foldr insertModule emptyTree
|
||||
where
|
||||
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
|
||||
go :: Maybe ModuleTree -> [Symbol] -> ModuleTree
|
||||
go tree = \case
|
||||
@ -97,7 +97,7 @@ createIndexFile ::
|
||||
Sem r ()
|
||||
createIndexFile ps = do
|
||||
outputDir <- asks (^. htmlOptionsOutputDir)
|
||||
indexHtml >>= (template mempty >=> writeHtml (outputDir <//> indexFileName))
|
||||
indexHtml >>= (topTemplate mempty >=> writeHtml (outputDir <//> indexFileName))
|
||||
where
|
||||
indexHtml :: Sem r Html
|
||||
indexHtml = do
|
||||
@ -128,7 +128,7 @@ createIndexFile ps = do
|
||||
return $ ul c'
|
||||
|
||||
goChild :: Symbol -> ModuleTree -> Sem r Html
|
||||
goChild s (Tree lbl children) = node
|
||||
goChild sym (Tree lbl children) = node
|
||||
where
|
||||
nodeRow :: Sem r Html
|
||||
nodeRow = case lbl of
|
||||
@ -136,7 +136,7 @@ createIndexFile ps = do
|
||||
return
|
||||
$ Html.span
|
||||
! Attr.class_ attrBare
|
||||
$ toHtml (prettyText s)
|
||||
$ toHtml (prettyText sym)
|
||||
Just lbl' -> do
|
||||
lnk <- nameIdAttrRef lbl' Nothing
|
||||
return
|
||||
@ -219,8 +219,8 @@ moduleDocPath m = do
|
||||
topModulePath :: Module 'Scoped 'ModuleTop -> TopModulePath
|
||||
topModulePath = (^. modulePath . S.nameConcrete)
|
||||
|
||||
template :: forall r. (Members '[Reader EntryPoint, Reader HtmlOptions] r) => Html -> Html -> Sem r Html
|
||||
template rightMenu' content' = do
|
||||
topTemplate :: forall r. (Members '[Reader EntryPoint, Reader HtmlOptions] r) => Html -> Html -> Sem r Html
|
||||
topTemplate rightMenu' content' = do
|
||||
mathJax <- mathJaxCdn
|
||||
ayuTheme <- ayuCss
|
||||
judocTheme <- linuwialCss
|
||||
@ -309,7 +309,7 @@ goTopModule cs m = do
|
||||
docHtml = do
|
||||
content' <- content
|
||||
rightMenu' <- rightMenu
|
||||
template rightMenu' content'
|
||||
topTemplate rightMenu' content'
|
||||
where
|
||||
rightMenu :: Sem s Html
|
||||
rightMenu = do
|
||||
@ -419,8 +419,8 @@ goStatement = \case
|
||||
StatementInductive t -> goInductive t
|
||||
StatementOpenModule t -> goOpen t
|
||||
StatementFunctionDef t -> goFunctionDef t
|
||||
StatementSyntax s -> goSyntax s
|
||||
StatementImport s -> goImport s
|
||||
StatementSyntax syn -> goSyntax syn
|
||||
StatementImport t -> goImport t
|
||||
StatementModule m -> goLocalModule m
|
||||
StatementProjectionDef {} -> mempty
|
||||
where
|
||||
@ -454,8 +454,8 @@ goFixity def = do
|
||||
mkPrec :: Sem r Html
|
||||
mkPrec = case info ^. fixityPrecSame of
|
||||
Just txt -> do
|
||||
s <- ppCodeHtml defaultOptions txt
|
||||
return (row $ toHtml ("Same precedence as " <> s))
|
||||
d <- ppCodeHtml defaultOptions txt
|
||||
return (row $ toHtml ("Same precedence as " <> d))
|
||||
Nothing ->
|
||||
goPrec "Higher" (info ^. fixityPrecAbove)
|
||||
<> goPrec "Lower" (info ^. fixityPrecBelow)
|
||||
|
@ -276,7 +276,7 @@ go sdt = case sdt of
|
||||
STEmpty -> return mempty
|
||||
STChar c -> return (toHtml c)
|
||||
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
|
||||
STConcat l -> mconcatMap go l
|
||||
where
|
||||
@ -373,13 +373,12 @@ moduleDocRelativePath m = do
|
||||
| null fixPrefix -> return relpath
|
||||
| otherwise -> do
|
||||
return $
|
||||
maybe
|
||||
fromMaybe
|
||||
relpath
|
||||
id
|
||||
(stripProperPrefix (fromJust (parseRelDir fixPrefix)) relpath)
|
||||
|
||||
nameIdAttrRef :: (Members '[Reader HtmlOptions] r) => TopModulePath -> Maybe S.NameId -> Sem r AttributeValue
|
||||
nameIdAttrRef tp s = do
|
||||
nameIdAttrRef tp mid = do
|
||||
prefixUrl <- unpack <$> asks (^. htmlOptionsUrlPrefix)
|
||||
path <- toFilePath <$> moduleDocRelativePath tp
|
||||
noPath <- asks (^. htmlOptionsNoPath)
|
||||
@ -388,5 +387,5 @@ nameIdAttrRef tp s = do
|
||||
maybe
|
||||
(return mempty)
|
||||
(((preEscapedToValue '#' <>) <$>) . nameIdAttr)
|
||||
s
|
||||
mid
|
||||
return $ fromString prefix <> attr
|
||||
|
@ -149,7 +149,7 @@ go fname = do
|
||||
_ -> return blockStmts
|
||||
|
||||
htmlStatements :: [Html] <-
|
||||
mapM (\s -> goRender s <> pure htmlSemicolon) stmts'
|
||||
mapM (\stm -> goRender stm <> pure htmlSemicolon) stmts'
|
||||
|
||||
resHtml <-
|
||||
toStrict
|
||||
@ -208,7 +208,7 @@ goRender xs = do
|
||||
concreteOpts <- asks @ProcessJuvixBlocksArgs (^. processJuvixBlocksArgsConcreteOpts)
|
||||
HtmlRender.ppCodeHtml concreteOpts xs
|
||||
|
||||
indModuleFilter :: [Concrete.Statement s] -> [Concrete.Statement s]
|
||||
indModuleFilter :: forall s. [Concrete.Statement s] -> [Concrete.Statement s]
|
||||
indModuleFilter =
|
||||
filter
|
||||
( \case
|
||||
|
@ -1,6 +1,6 @@
|
||||
ghc-options:
|
||||
"$locals": -optP-Wno-nonportable-include-path
|
||||
resolver: nightly-2024-02-06
|
||||
resolver: nightly-2024-05-31
|
||||
extra-deps:
|
||||
- git: https://github.com/haskell-effectful/effectful.git
|
||||
commit: 2037be9a4f4e8f8fd280d9359b1bc7feff9b29b9
|
||||
|
Loading…
Reference in New Issue
Block a user