Skip to content

Commit

Permalink
upgrade to ghc-9.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Jun 4, 2024
1 parent 371f8f2 commit edeca8f
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-static-binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- Generated by stack2cabal

with-compiler: ghc-9.8.1
with-compiler: ghc-9.8.2

packages:
./
Expand Down
8 changes: 4 additions & 4 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.*
Expand All @@ -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.*
Expand All @@ -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.*
Expand Down
22 changes: 11 additions & 11 deletions src/Juvix/Compiler/Backend/Html/Translation/FromTyped.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -128,15 +128,15 @@ 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
Nothing ->
return
$ Html.span
! Attr.class_ attrBare
$ toHtml (prettyText s)
$ toHtml (prettyText sym)
Just lbl' -> do
lnk <- nameIdAttrRef lbl' Nothing
return
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -388,5 +387,5 @@ nameIdAttrRef tp s = do
maybe
(return mempty)
(((preEscapedToValue '#' <>) <$>) . nameIdAttr)
s
mid
return $ fromString prefix <> attr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit edeca8f

Please sign in to comment.