From 1a466c14c8c042763b25912c74663768314b6f6f Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 20 Jan 2021 01:15:28 +0800 Subject: [PATCH 1/3] Don't print out the error msg for pattern matching unnecessarily --- src/compiler/GF/Compile/GeneratePMCFG.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index 35c25cc0d..ab6476b31 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -622,7 +622,9 @@ ppbug msg = error completeMsg where originalMsg = render $ hang "Internal error in GeneratePMCFG:" 4 msg completeMsg = - unlines [originalMsg + case render msg of -- the error message for pattern matching a runtime string + "descend (CStr 0,CNil,CProj (LIdent (Id {rawId2utf8 = \"s\"})) CNil)" + -> unlines [originalMsg -- add more helpful output ,"" ,"1) Check that you are not trying to pattern match a /runtime string/." ," These are illegal:" @@ -633,5 +635,6 @@ ppbug msg = error completeMsg ,"2) Not about pattern matching? Submit a bug report and we update the error message." ," https://github.com/GrammaticalFramework/gf-core/issues" ] + _ -> originalMsg -- any other message: just print it as is ppU = ppTerm Unqualified From 8a85dbc66fdb72a31ce700bee027ab01415ff8d3 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 25 Jan 2021 18:43:25 +0800 Subject: [PATCH 2/3] Update Github actions to latest haskell-setup --- .github/workflows/build-all-versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index df71f0ac0..43f2cc9f4 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: actions/setup-haskell@v1.1.1 + - uses: actions/setup-haskell@v1.1.4 id: setup-haskell-cabal name: Setup Haskell with: From c6ff3e0c5ebd9bfcda05dd1199478837f09fb7e7 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 25 Jan 2021 18:48:46 +0800 Subject: [PATCH 3/3] Update also the stack setup --- .github/workflows/build-all-versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 43f2cc9f4..46bd05b23 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -73,7 +73,7 @@ jobs: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: actions/setup-haskell@v1.1 + - uses: actions/setup-haskell@v1.1.4 name: Setup Haskell Stack with: # ghc-version: ${{ matrix.ghc }}