Skip to content

Commit

Permalink
Land on ghc-8.4.8. Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Sabanov committed Oct 21, 2024
1 parent daf5d73 commit 13b0558
Show file tree
Hide file tree
Showing 8 changed files with 187 additions and 219 deletions.
3 changes: 2 additions & 1 deletion hibet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tested-with:
, GHC==8.10.7
, GHC==9.0.2
, GHC==9.2.8
, GHC==9.4.8

source-repository head
type: git
Expand Down Expand Up @@ -222,7 +223,7 @@ test-suite hibet-env
, containers
, text
, unordered-containers
-- , directory
, effectful-core

other-modules: Paths_hibet
Paths
Expand Down
4 changes: 2 additions & 2 deletions src/Effects/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import Type (HibetError(..))
import Utility ( showT )

import Effectful ( MonadIO(liftIO), type (:>), Eff, IOE )
import Effectful.Error.Static ( Error, catchError, throwError )
import Effectful.Error.Static ( Error, catchError, throwError, prettyCallStack )

adapt ::
( IOE :> es
, Error HibetError :> es
)
=> IO a -> Eff es a
adapt m = catchError (liftIO m) $
\stack err -> throwError $ EffectError (showT err) stack
\stack err -> throwError $ EffectError (showT err) (showT $ prettyCallStack stack)
5 changes: 2 additions & 3 deletions src/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ module Type
import Data.Text (Text)
import Data.Void (Void)
import Text.Megaparsec.Error (ParseErrorBundle)
import GHC.Stack ( CallStack )


data HibetError
= EffectError Text CallStack
= EffectError Text Text
| MegaError (ParseErrorBundle Text Void)
| NotFound
| NotSyllable Text
| UnknownError Text
deriving stock Show
deriving stock (Eq, Show)
6 changes: 3 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-20.26
resolver: lts-21.25

packages:
- .
Expand All @@ -7,15 +7,15 @@ extra-deps:
- radixtree-0.6.0.0

- tomland-1.3.3.2
- validation-selective-0.1.0.2
- validation-selective-0.2.0.0
- log-effectful-1.0.0.0
- log-base-0.12.0.1
- resourcet-effectful-1.0.1.0

ghc-options:
"$locals": -fhide-source-paths

system-ghc: true
notify-if-nix-on-path: false

# build:
# library-profiling: true
Expand Down
375 changes: 178 additions & 197 deletions test/env/Main.hs

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion test/labels/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import qualified Data.Set as Set
import Test.Hspec (Spec, describe, hspec, it, shouldBe)



main :: IO ()
main = hspec $ do
getLabelsSpec
Expand Down
4 changes: 0 additions & 4 deletions test/parse/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import Parse.Type ( parseEither )
import Test.Hspec (Spec, describe, hspec, it, shouldBe)
import Data.Either ( isLeft )

-- import Text.Megaparsec (parseTest)
-- import qualified Text.Megaparsec.Char as MC


main :: IO ()
main = hspec $ do
tibetan
Expand Down
8 changes: 0 additions & 8 deletions test/pretty/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ import Prettyprinter.Render.Text (renderStrict)

import Test.Hspec (Spec, describe, hspec, it, shouldBe)

-- import Hedgehog (Gen, PropertyT, forAll, (===))
-- import Hedgehog.Gen (alphaNum, choice, element, frequency, sample, text)
-- import qualified Hedgehog.Gen as G
-- import Hedgehog.Range (constant)
-- import Test.Hspec.Hedgehog (hedgehog)



main :: IO ()
main = hspec $ do
viewTranslationsSpec
Expand Down

0 comments on commit 13b0558

Please sign in to comment.