remove type-errors-pretty to speed up release for 901

This commit is contained in:
Torsten Schmits 2021-07-10 13:14:19 +02:00
parent 6e2630fafd
commit 7a2ddc22f4
5 changed files with 17 additions and 7 deletions

View File

@ -16,7 +16,6 @@ let
hackage "first-class-families" "0.8.0.1" "0h1rxbc7zsxrlhx5xcl58wjx3qi2wny8wb3sk7c1qnydf4ckcckz";
dump-core = hackage "dump-core" "0.1.3.2" "1mi8p736yn00z549pwnjv4ydwbs8mwg6dla3ly447c027nq8py6g";
monadLib = hackage "monadLib" "3.10" "1v4ynjcb963s3lfw3v71qdzvld1mmz1faf8swhvicma5jbvwchy2";
type-errors-pretty = pkgs.haskell.lib.doJailbreak super.type-errors-pretty;
};
pkgs = import nixpkgs { inherit system; };

View File

@ -29,7 +29,6 @@ dependencies:
- unagi-chan >= 0.4.0.0 && < 0.5
- async >= 2.2 && < 3
- type-errors >= 0.2.0.0
- type-errors-pretty >= 0.0.0.0 && < 0.1
- QuickCheck >= 2.11.3 && < 3
custom-setup:

View File

@ -120,7 +120,6 @@ library
, th-abstraction >=0.3.1.0 && <0.5
, transformers >=0.5.2.0 && <0.6
, type-errors >=0.2.0.0
, type-errors-pretty >=0.0.0.0 && <0.1
, unagi-chan >=0.4.0.0 && <0.5
if impl(ghc < 8.6)
default-extensions:
@ -203,7 +202,6 @@ test-suite polysemy-test
, th-abstraction >=0.3.1.0 && <0.5
, transformers >=0.5.2.0 && <0.6
, type-errors >=0.2.0.0
, type-errors-pretty >=0.0.0.0 && <0.1
, unagi-chan >=0.4.0.0 && <0.5
if impl(ghc < 8.6)
default-extensions:
@ -250,7 +248,6 @@ benchmark polysemy-bench
, th-abstraction >=0.3.1.0 && <0.5
, transformers >=0.5.2.0 && <0.6
, type-errors >=0.2.0.0
, type-errors-pretty >=0.0.0.0 && <0.1
, unagi-chan >=0.4.0.0 && <0.5
if impl(ghc < 8.6)
default-extensions:

View File

@ -13,6 +13,8 @@ module Polysemy.Internal.CustomErrors
, UnhandledEffect
, DefiningModule
, DefiningModuleForEffect
, type (<>)
, type (%)
) where
import Data.Kind
@ -21,7 +23,6 @@ import GHC.TypeLits (Symbol)
import Polysemy.Internal.Kind
import Polysemy.Internal.CustomErrors.Redefined
import Type.Errors hiding (IfStuck, WhenStuck, UnlessStuck)
import Type.Errors.Pretty (type (<>), type (%))
------------------------------------------------------------------------------
@ -36,6 +37,20 @@ type family DefiningModuleForEffect (e :: k) :: Symbol where
DefiningModuleForEffect (e a) = DefiningModuleForEffect e
DefiningModuleForEffect e = DefiningModule e
-- These are taken from type-errors-pretty because it's not in stackage for 9.0.1
-- See https://github.com/polysemy-research/polysemy/issues/401
type family ToErrorMessage (t :: k) :: ErrorMessage where
ToErrorMessage (t :: Symbol) = 'Text t
ToErrorMessage (t :: ErrorMessage) = t
ToErrorMessage t = 'ShowType t
infixl 5 <>
type family (<>) (l :: k1) (r :: k2) :: ErrorMessage where
l <> r = ToErrorMessage l ':<>: ToErrorMessage r
infixr 4 %
type family (%) (t :: k1) (b :: k2) :: ErrorMessage where
t % b = ToErrorMessage t ':$$: ToErrorMessage b
-- TODO(sandy): Put in type-errors
type ShowTypeBracketed t = "(" <> t <> ")"

View File

@ -9,8 +9,8 @@ module Polysemy.Internal.Index where
import GHC.TypeLits (Nat)
import Type.Errors (TypeError, ErrorMessage(ShowType))
import Type.Errors.Pretty (type (<>), type (%))
import Polysemy.Internal.CustomErrors (type (<>), type (%))
import Polysemy.Internal.Sing (SList (SEnd, SCons))
------------------------------------------------------------------------------