1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-27 12:42:36 +03:00

Merge pull request #2 from heliaxdev/jan

Upgrade to GHC 9 and use hpack
This commit is contained in:
Jonathan Cubides 2021-12-24 10:01:35 +01:00 committed by GitHub
commit 69d7e58b06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 89 additions and 144 deletions

2
.ghci
View File

@ -1 +1 @@
:set -isrc
:set -fdefer-type-errors

View File

@ -28,7 +28,7 @@ jobs:
rm docs/README.md
- name: Deploy HTML to github pages
if: steps.html.outputs.cache-hit != 'true'
if: steps.html.outputs.cache-hit != 'true'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

3
.gitignore vendored
View File

@ -59,4 +59,5 @@ _build/
.agda/
agda/
agda2hs/
docs/*.html
docs/*.html
*.cabal

View File

@ -1,129 +0,0 @@
cabal-version: 2.4
name: MiniJuvix
version: 0.0.0.0
license: GPL-3.0-only
license-file: LICENSE
copyright: 2021 Heliax AG
maintainer: Jonathan Prieto-Cubides <jonathan@heliax.dev>
author: [Jonathan Prieto-Cubides]
tested-with: ghc ==8.10.4 ghc ==8.10.7
homepage: https://github.com/heliaxdev/MiniJuvix
bug-reports: https://github.com/heliaxdev/MiniJuvix/issues
description:
A tiny dependent typed programming language for experimentation.
category: Compilers/Interpreters
build-type: Simple
extra-doc-files:
README.md
CHANGELOG.md
source-repository head
type: git
location: https://github.com/heliaxdev/MiniJuvix.git
library
exposed-modules:
MiniJuvix.Syntax.Core
MiniJuvix.Syntax.Eval
MiniJuvix.Utils.Prelude
MiniJuvix.Utils.Pretty
MiniJuvix.Utils.Parser
MiniJuvix.Parsing.Language
MiniJuvix.Parsing.Parser
MiniJuvix.Parsing.Error
MiniJuvix.Parsing.Location
MiniJuvix.Desugaring.Error
MiniJuvix.Typing.Typechecking
MiniJuvix.Typing.Utils
MiniJuvix.Typing.Error
MiniJuvix.Error
MiniJuvix.Pretty
MiniJuvix.Pipeline
MiniJuvix.Monad
hs-source-dirs: src
other-modules: Paths_MiniJuvix
default-language: Haskell2010
default-extensions:
NoImplicitPrelude Safe DerivingStrategies StandaloneDeriving
MultiParamTypeClasses OverloadedStrings
ghc-options:
-Wall -Wcompat -Widentities -Wincomplete-uni-patterns
-Wincomplete-record-updates -fwrite-ide-info -hiedir=.hie
-Wderiving-defaults
build-depends:
aeson >=2.0 && <=2.1,
base >=4.14 && <=4.16,
bytestring >=0.11 && <=0.12,
capability >=0.5 && <=0.6,
containers >=0.6 && <=0.7,
filepath >=1.4 && <=1.5,
megaparsec >=9.2 && <=9.3,
prettyprinter >=1.7 && <=1.8,
prettyprinter-ansi-terminal >=1.1 && <=1.2,
process >=1.6 && <=1.7,
relude >=1.0 && <=1.1,
semirings >=0.6 && <=0.7,
unordered-containers >=0.2 && <=0.3,
word8 >=0.1 && <=0.2
if impl(ghc >=8.0)
ghc-options: -Wredundant-constraints
if impl(ghc >=8.2)
ghc-options: -fhide-source-paths
if impl(ghc >=8.4)
ghc-options: -Wmissing-export-lists -Wpartial-fields
if impl(ghc >=8.8)
ghc-options: -Wmissing-deriving-strategies
executable MiniJuvix
main-is: Main.hs
hs-source-dirs: src/app
default-language: Haskell2010
ghc-options:
-Wall -Wcompat -Widentities -Wincomplete-uni-patterns
-Wincomplete-record-updates -threaded -rtsopts -with-rtsopts=-N
-fwrite-ide-info -hiedir=.hie
build-depends: base >=4.14 && <=4.16
if impl(ghc >=8.0)
ghc-options: -Wredundant-constraints
if impl(ghc >=8.2)
ghc-options: -fhide-source-paths
if impl(ghc >=8.4)
ghc-options: -Wmissing-export-lists -Wpartial-fields
if impl(ghc >=8.8)
ghc-options: -Wmissing-deriving-strategies
test-suite MiniJuvix-test
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: src/test
default-language: Haskell2010
ghc-options:
-Wall -Wcompat -Widentities -Wincomplete-uni-patterns
-Wincomplete-record-updates -threaded -rtsopts -with-rtsopts=-N
build-depends: MiniJuvix -any
if impl(ghc >=8.0)
ghc-options: -Wredundant-constraints
if impl(ghc >=8.2)
ghc-options: -fhide-source-paths
if impl(ghc >=8.4)
ghc-options: -Wmissing-export-lists -Wpartial-fields
if impl(ghc >=8.8)
ghc-options: -Wmissing-deriving-strategies

View File

@ -1 +0,0 @@
packages: .

69
package.yaml Normal file
View File

@ -0,0 +1,69 @@
name: MiniJuvix
version: 0.0.0.0
license: GPL-3.0-only
license-file: LICENSE
copyright: 2021 Heliax AG
maintainer: Jonathan Prieto-Cubides <jonathan@heliax.dev>, Jan Mas Rovira <jan@heliax.dev>
author: [Jonathan Prieto-Cubides]
tested-with: ghc == 9.0.1
homepage: https://github.com/heliaxdev/MiniJuvix
bug-reports: https://github.com/heliaxdev/MiniJuvix/issues
description: A tiny dependent typed programming language for experimentation.
category: Compilers/Interpreters
github: heliaxdev/MiniJuvix
extra-source-files:
- README.md
- CHANGELOG.md
dependencies:
- aeson == 2.0.*
- base == 4.15.*
- bytestring == 0.10.*
- containers == 0.6.*
- filepath == 1.4.*
- megaparsec == 9.2.*
- prettyprinter == 1.7.*
- prettyprinter-ansi-terminal == 1.1.*
- process == 1.6.*
- relude == 1.0.*
- semirings == 0.6.*
- unordered-containers == 0.2.*
- word8 == 0.1.*
ghc-options:
- -O2 -flate-specialise -fspecialise-aggressively
- -Wincomplete-patterns
- -Wall -Wcompat -Widentities -Wincomplete-uni-patterns
- -Wincomplete-record-updates -fwrite-ide-info -hiedir=.hie
- -Wderiving-defaults -Wredundant-constraints
- -fhide-source-paths -Wpartial-fields
- -Wmissing-deriving-strategies
default-extensions:
- DerivingStrategies
- NoImplicitPrelude
- OverloadedStrings
- Safe
- ScopedTypeVariables
- StandaloneDeriving
- UnicodeSyntax
library:
source-dirs: src
executables:
MiniJuvix:
main: Main.hs
source-dirs: src/app
dependencies:
- MiniJuvix
tests:
curry-test:
main: Spec.hs
source-dirs: src/test
dependencies:
- curry
- tasty
- tasty-hunit

View File

@ -1,2 +0,0 @@
:set -i.
:set -v

View File

@ -0,0 +1 @@
module MiniJuvix.Utils.File where

View File

@ -1,5 +1,3 @@
{-# LANGUAGE MultiWayIf #-}
-- | Adapted from heliaxdev/Juvix/library/StandardLibrary/src/Juvix/Parser*
module MiniJuvix.Utils.Parser
( Parser,

View File

@ -1,5 +1,3 @@
{-# LANGUAGE RankNTypes #-}
{-
* This Predude is =Protolude= except with a few changes
+ _Additions_

View File

@ -2,10 +2,12 @@ module MiniJuvix.Utils.Version (getVersion) where
------------------------------------------------------------------------------
import Data.List (init)
import qualified Data.List as List
import Data.Version (Version (versionTags))
import MiniJuvix.Utils.Prelude hiding (hash, tryIO)
import MiniJuvix.Utils.Prelude
import System.Process (readProcessWithExitCode)
import Control.Exception (IOException, try)
import System.Exit
------------------------------------------------------------------------------
@ -20,7 +22,7 @@ commitInfo = do
case res of
Right (ExitSuccess, hash, _) -> do
(_, _, _) <- readProcessWithExitCode "git" ["diff", "--quiet"] ""
return $ Just (init hash)
return $ Just (List.init hash)
_ -> return Nothing
gitVersion :: Version -> String -> Version

View File

@ -1,5 +1,7 @@
module Main (main) where
import Prelude
--------------------------------------------------------------------------------
-- Main
--------------------------------------------------------------------------------

View File

@ -1,5 +1,10 @@
module Options (main) where
import Prelude
--------------------------------------------------------------------------------
-- Options
--------------------------------------------------------------------------------
main :: IO ()
main = return ()

View File

@ -1,2 +1,3 @@
resolver: lts-17.4
allow-newer: true
resolver: nightly-2021-12-22
extra-deps:
- aeson-2.0.2.0