A peer-to-peer stack for code collaboration
Update stackage base snapshot to LTS 13.2
Thomas Scholtes3da6be318862
diff --git a/cloudbuild.yaml b/cloudbuild.yamlindex b54697d..4fa4b7f 100644--- a/cloudbuild.yaml+++ b/cloudbuild.yaml@@ -12,7 +12,7 @@ steps:load-cache- id: "Build deps"- name: 'haskell:8.4.3'+ name: 'haskell:8.6.3'env: ['STACK_ROOT=/workspace/.stack']entrypoint: 'bash'args:@@ -26,17 +26,17 @@ steps:stack build stylish-haskell hlint weeder- id: "Format"- name: 'haskell:8.4.3'+ name: 'haskell:8.6.3'env: ['STACK_ROOT=/workspace/.stack']args: ['./scripts/check-fmt.sh']- id: "Lint"- name: 'haskell:8.4.3'+ name: 'haskell:8.6.3'env: ['STACK_ROOT=/workspace/.stack']args: ['stack', 'exec', '--', 'hlint', '.']- id: "Build & Test"- name: 'haskell:8.4.3'+ name: 'haskell:8.6.3'env: ['STACK_ROOT=/workspace/.stack']entrypoint: bashargs:@@ -54,14 +54,14 @@ steps:- id: "Lint (weeder)"waitFor: ["Build & Test"]- name: 'haskell:8.4.3'+ name: 'haskell:8.6.3'env: ["STACK_ROOT=/workspace/.stack"]args: ["stack", "exec", "--", "weeder", "--match"]- id: "Build reference document"waitFor:- "Build & Test"- name: 'haskell:8.4.3'+ name: 'haskell:8.6.3'env: ['STACK_ROOT=/workspace/.stack']entrypoint: bashargs:@@ -79,7 +79,7 @@ steps:- id: "Check tutorial"waitFor:- "Build & Test"- name: 'haskell:8.4.3'+ name: 'haskell:8.6.3'env: ['STACK_ROOT=/workspace/.stack']entrypoint: bashargs:@@ -138,7 +138,7 @@ steps:- id: "radicle-server integration test"waitFor:- "Start and expose radicle-server"- name: 'haskell:8.4.3'+ name: 'haskell:8.6.3'env: ['STACK_ROOT=/workspace/.stack']entrypoint: 'bash'args:diff --git a/docs/source/reference.rst b/docs/source/reference.rstindex 362d2a8..5bd034c 100644--- a/docs/source/reference.rst+++ b/docs/source/reference.rst@@ -504,7 +504,7 @@ Close a handle~~~~~~~~~~~(system! proc) execute a system process. Returns the dict with the form-``{ :stdin maybe-handle :stdout maybe-handle :stderr maybe-handle :proc prochandle }``+``{ :stdin maybe-handle :stdout maybe-handle :stderr maybe-handle :proc prochandle }``Where ``maybe-handle`` is either ``[:just handle]`` or ``:nothing``.Note that this is quite a low-level function; higher-level ones are moreconvenient.diff --git a/scripts/ci.sh b/scripts/ci.shindex 3caddb2..be6abde 100755--- a/scripts/ci.sh+++ b/scripts/ci.sh@@ -4,7 +4,7 @@ set -euo pipefaildependency_hash=$( (cat package.yaml; cat snapshot.yaml) | sha256sum | cut -d ' ' -f 1)-remote="gs://radicle-build-cache/v2"+remote="gs://radicle-build-cache/v3"local_cache_archive="stack-root.tar.gz"remote_cache_master="$remote/stack-root-master.tar.gz"diff --git a/snapshot.yaml b/snapshot.yamlindex 2439ddb..e07c151 100644--- a/snapshot.yaml+++ b/snapshot.yaml@@ -5,10 +5,10 @@## See https://docs.haskellstack.org/en/stable/custom_snapshot/#-name: radicle-deps-12.9-resolver: lts-12.9+name: radicle-deps-13.2+resolver: lts-13.2packages:-- acid-state-0.14.3-- cborg-0.2.0.0-- serialise-0.2.0.0+- cborg-0.2.1.0+- serialise-0.2.1.0+- github-0.20diff --git a/src/Radicle/Internal/Core.hs b/src/Radicle/Internal/Core.hsindex 78e448b..3721875 100644--- a/src/Radicle/Internal/Core.hs+++ b/src/Radicle/Internal/Core.hs@@ -76,7 +76,7 @@ data LangErrorData r =| NonHashableKey| ModuleError ModuleError| OtherError Text- | ParseError (Par.ParseError Char Void)+ | ParseError (Par.ParseErrorBundle Text Void)-- | Raised if @(throw ident value)@ is evaluated. Arguments are-- provided by the call to @throw@.| ThrownError Ident rdiff --git a/src/Radicle/Internal/Orphans.hs b/src/Radicle/Internal/Orphans.hsindex e64cabb..8e500ca 100644--- a/src/Radicle/Internal/Orphans.hs+++ b/src/Radicle/Internal/Orphans.hs@@ -2,19 +2,11 @@module Radicle.Internal.Orphans () whereimport Codec.Serialise (Serialise(..))-import Codec.Serialise.Decoding (Decoder)import Data.Scientificimport Prelude (fail)import Protoludeimport Text.Megaparsec- ( ErrorFancy- , ErrorItem- , ParseError(..)- , Pos- , SourcePos- , mkPos- , unPos- )+ (ErrorFancy, ErrorItem, Pos, SourcePos, mkPos, unPos)instance Serialise Scientific whereencode = encode . (show :: Scientific -> Text)@@ -26,14 +18,3 @@ instance Serialise SourcePosinstance Serialise Pos whereencode = encode . unPosdecode = mkPos <$> decode--instance {-# OVERLAPPABLE #-} (Serialise a, Ord a, Serialise b, Ord b) => Serialise (ParseError a b)-instance {-# OVERLAPPING #-} (Serialise a, Ord a) => Serialise (ParseError a Void) where- encode = encode . unvoidParseError- where- unvoidParseError x = case x of- FancyError{} -> panic "impossible"- _ -> x- decode = (decode :: Decoder s (ParseError a ())) >>= \case- TrivialError a b c -> pure $ TrivialError a b c- _ -> fail "Expecting Trivial Error"diff --git a/src/Radicle/Internal/Parse.hs b/src/Radicle/Internal/Parse.hsindex 31be7e2..cdad873 100644--- a/src/Radicle/Internal/Parse.hs+++ b/src/Radicle/Internal/Parse.hs@@ -10,14 +10,15 @@ import Text.Megaparsec, between, choice, eof- , getPosition+ , getSourcePos, manyTill+ , satisfy, sepBy, try, (<?>))import qualified Text.Megaparsec as M-import Text.Megaparsec.Char (char, satisfy, space1, string)+import Text.Megaparsec.Char (char, space1, string)import qualified Text.Megaparsec.Char.Lexer as Limport qualified Text.Megaparsec.Error as Par@@ -38,7 +39,7 @@ spaceConsumer = L.space space1 lineComment blockCommenttag :: ValueF Value -> VParsertag v = do- pos <- getPosition -- N.B. in megaparsec 7 this is called getSourcePos+ pos <- getSourcePos -- N.B. in megaparsec 7 this is called getSourcePospure $ Ann.Annotated (Ann.WithPos (Ann.SrcPos pos) v)symbol :: Text -> Parser Text@@ -146,7 +147,7 @@ valueP = doparseValues:: Text -- ^ Name of source file (for error reporting)-> Text -- ^ Source code to be parsed- -> Either (Par.ParseError Char Void) [Value]+ -> Either (Par.ParseErrorBundle Text Void) [Value]parseValues sourceName srcCode= M.parse (spaceConsumer *> many valueP <* eof) (toS sourceName) srcCode@@ -166,7 +167,7 @@ parse :: MonadError Text mparse file src = dolet res = runIdentity (M.runParserT (spaceConsumer *> valueP <* eof) (toS file) src)case res of- Left err -> throwError . toS $ M.parseErrorPretty' src err+ Left err -> throwError . toS $ M.errorBundlePretty errRight v -> pure v-- | Smart constructor for Ident.diff --git a/src/Radicle/Internal/Pretty.hs b/src/Radicle/Internal/Pretty.hsindex 329d2a5..b4244af 100644--- a/src/Radicle/Internal/Pretty.hs+++ b/src/Radicle/Internal/Pretty.hs@@ -13,7 +13,7 @@ import Data.Text.Prettyprint.Docimport Data.Text.Prettyprint.Doc.Render.Terminal (Color(..), color)import qualified Data.Text.Prettyprint.Doc.Render.Terminal as Termimport Data.Text.Prettyprint.Doc.Render.Text-import Text.Megaparsec.Error (parseErrorPretty)+import Text.Megaparsec.Error (errorBundlePretty)import Text.Megaparsec.Pos (sourcePosPretty)import qualified Radicle.Internal.Annotation as Ann@@ -116,7 +116,7 @@ instance PrettyV r => PrettyV (LangErrorData r) where<+> sep (prettyV . asValue . Atom <$> is)OtherError t -> "Error:" <+> pretty tSpecialForm f t -> "Error using special form" <+> pretty f <> ":" <+> pretty t <> "."- ParseError t -> "Parser error:" <+> pretty (parseErrorPretty t)+ ParseError t -> "Parser error:" <+> pretty (errorBundlePretty t)Exit code -> "Exit with code " <+> pretty codeThrownError i val -> "Exception" <+> pretty i <+> prettyV valPatternMatchError e -> case e ofdiff --git a/src/Radicle/Internal/PrimFns.hs b/src/Radicle/Internal/PrimFns.hsindex 1c2258e..ed34f99 100644--- a/src/Radicle/Internal/PrimFns.hs+++ b/src/Radicle/Internal/PrimFns.hs@@ -11,7 +11,7 @@ import qualified Data.Sequence as Seqimport qualified Data.Set as Setimport qualified Data.Text as Timport GHC.Exts (IsList(..), sortWith)-import Text.Megaparsec (parseErrorPretty)+import Text.Megaparsec (errorBundlePretty)import qualified Radicle.Internal.Annotation as Annimport Radicle.Internal.Core@@ -713,7 +713,7 @@ readValuesreadValues sourceFile code = docase parseValues sourceFile code ofRight vs -> pure vs- Left e -> throwErrorHere $ ThrownError (Ident "parse-error") (String . toS $ parseErrorPretty e)+ Left e -> throwErrorHere $ ThrownError (Ident "parse-error") (String . toS $ errorBundlePretty e)allDocs :: [(Text, Text, a)] -> [(Ident, Maybe Text, a)]allDocs = fmap $ \(x,y,z) -> (unsafeToIdent x, Just y, z)