Commit 4a2e4a73 authored by Joachim Breitner's avatar Joachim Breitner
Browse files

Coercible-base GND: update error messages

(unfortunately, not to the better, these might need some more
massaging.)
parent d5442607
T1496.hs:10:32:
Can't make a derived instance of ‛IsInt Moo’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
‛isInt’, at type ‛forall (c :: * -> *).
c Int -> c t’, cannot be converted safely
In the newtype declaration for ‛Moo’
No instance for (GHC.Types.Coercible (c1 Int) (c1 Moo))
because ‛c1 Int’ and ‛c1 Moo’ are different types.
arising from a use of ‛GHC.Prim.coerce’
In the expression:
GHC.Prim.coerce (isInt :: c Int -> c Int) ::
forall (c :: * -> *). c Int -> c Moo
In an equation for ‛isInt’:
isInt
= GHC.Prim.coerce (isInt :: c Int -> c Int) ::
forall (c :: * -> *). c Int -> c Moo
In the instance declaration for ‛IsInt Moo’
......@@ -3,6 +3,4 @@ T2721.hs:15:28:
Can't make a derived instance of ‛C N’
(even with cunning newtype deriving):
the class has associated types
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
‛foo’, at type ‛a -> T a’, cannot be converted safely
In the newtype declaration for ‛N’
T4846.hs:29:1:
Can't make a derived instance of ‛B BOOL’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
‛mkExpr’, at type ‛Expr a’, cannot be converted safely
In the stand-alone deriving instance for ‛B BOOL’
No instance for (GHC.Types.Coercible (Expr Bool) (Expr BOOL))
because the first type argument of ‛Expr’ has role Nominal,
but the arguments ‛Bool’ and ‛BOOL’ differ
arising from a use of ‛GHC.Prim.coerce’
In the expression:
GHC.Prim.coerce (mkExpr :: Expr Bool) :: Expr BOOL
In an equation for ‛mkExpr’:
mkExpr = GHC.Prim.coerce (mkExpr :: Expr Bool) :: Expr BOOL
When typechecking the code for ‛mkExpr’
in a standalone derived instance for ‛B BOOL’:
To see the code I am typechecking, use -ddump-deriv
In the instance declaration for ‛B BOOL’
T7148.hs:27:40:
Can't make a derived instance of ‛IsoUnit (Tagged a b)’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
‛iso1’, at type ‛forall b.
SameType () b -> SameType a b’, cannot be converted safely
‛iso2’, at type ‛forall b.
SameType b () -> SameType b a’, cannot be converted safely
In the newtype declaration for ‛Tagged’
Could not deduce (GHC.Types.Coercible
(SameType b b2) (SameType (Tagged a b) b2))
because the first type argument of ‛SameType’ has role Nominal,
but the arguments ‛b’ and ‛Tagged a b’ differ
arising from a use of ‛GHC.Prim.coerce’
from the context (IsoUnit b)
bound by the instance declaration at T7148.hs:27:40-46
In the expression:
GHC.Prim.coerce (iso1 :: SameType () b -> SameType b b) ::
forall (b :: *). SameType () b -> SameType (Tagged a b) b
In an equation for ‛iso1’:
iso1
= GHC.Prim.coerce (iso1 :: SameType () b -> SameType b b) ::
forall (b :: *). SameType () b -> SameType (Tagged a b) b
In the instance declaration for ‛IsoUnit (Tagged a b)’
T7148.hs:27:40:
Could not deduce (GHC.Types.Coercible
(SameType b2 b) (SameType b2 (Tagged a b)))
because the second type argument of ‛SameType’ has role Nominal,
but the arguments ‛b’ and ‛Tagged a b’ differ
arising from a use of ‛GHC.Prim.coerce’
from the context (IsoUnit b)
bound by the instance declaration at T7148.hs:27:40-46
In the expression:
GHC.Prim.coerce (iso2 :: SameType b () -> SameType b b) ::
forall (b :: *). SameType b () -> SameType b (Tagged a b)
In an equation for ‛iso2’:
iso2
= GHC.Prim.coerce (iso2 :: SameType b () -> SameType b b) ::
forall (b :: *). SameType b () -> SameType b (Tagged a b)
In the instance declaration for ‛IsoUnit (Tagged a b)’
T7148a.hs:19:50:
Can't make a derived instance of ‛Convert (IS_NO_LONGER a)’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
‛coerce’, at type ‛forall b.
Proxy b -> a -> Result a b’, cannot be converted safely
In the newtype declaration for ‛IS_NO_LONGER’
Could not deduce (GHC.Types.Coercible (Result a b1) b1)
because ‛Result a b1’ and ‛b1’ are different types.
arising from a use of ‛GHC.Prim.coerce’
from the context (Convert a)
bound by the instance declaration at T7148a.hs:19:50-56
In the expression:
GHC.Prim.coerce (coerce :: Proxy b -> a -> Result a b) ::
forall (b :: *).
Proxy b -> IS_NO_LONGER a -> Result (IS_NO_LONGER a) b
In an equation for ‛coerce’:
coerce
= GHC.Prim.coerce (coerce :: Proxy b -> a -> Result a b) ::
forall (b :: *).
Proxy b -> IS_NO_LONGER a -> Result (IS_NO_LONGER a) b
In the instance declaration for ‛Convert (IS_NO_LONGER a)’
CasePrune.hs:14:31:
Can't make a derived instance of ‛C A’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
‛ic’, at type ‛T a’, cannot be converted safely
In the newtype declaration for ‛A’
No instance for (GHC.Types.Coercible (T Int) (T A))
because the first type argument of ‛T’ has role Nominal,
but the arguments ‛Int’ and ‛A’ differ
arising from a use of ‛GHC.Prim.coerce’
In the expression: GHC.Prim.coerce (ic :: T Int) :: T A
In an equation for ‛ic’: ic = GHC.Prim.coerce (ic :: T Int) :: T A
In the instance declaration for ‛C A’
Roles10.hs:16:12:
Can't make a derived instance of ‛C Age’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
‛meth’, at type ‛a -> F a’, cannot be converted safely
In the newtype declaration for ‛Age’
No instance for (GHC.Types.Coercible Bool Char)
because ‛Bool’ and ‛Char’ are different types.
arising from a use of ‛GHC.Prim.coerce’
In the expression:
GHC.Prim.coerce (meth :: Int -> F Int) :: Age -> F Age
In an equation for ‛meth’:
meth = GHC.Prim.coerce (meth :: Int -> F Int) :: Age -> F Age
In the instance declaration for ‛C Age’
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment