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: T1496.hs:10:32:
Can't make a derived instance of ‛IsInt Moo’ No instance for (GHC.Types.Coercible (c1 Int) (c1 Moo))
(even with cunning newtype deriving): because ‛c1 Int’ and ‛c1 Moo’ are different types.
it is not type-safe to use GeneralizedNewtypeDeriving on this class; arising from a use of ‛GHC.Prim.coerce’
‛isInt’, at type ‛forall (c :: * -> *). In the expression:
c Int -> c t’, cannot be converted safely GHC.Prim.coerce (isInt :: c Int -> c Int) ::
In the newtype declaration for ‛Moo’ 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: ...@@ -3,6 +3,4 @@ T2721.hs:15:28:
Can't make a derived instance of ‛C N’ Can't make a derived instance of ‛C N’
(even with cunning newtype deriving): (even with cunning newtype deriving):
the class has associated types 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’ In the newtype declaration for ‛N’
T4846.hs:29:1: T4846.hs:29:1:
Can't make a derived instance of ‛B BOOL’ No instance for (GHC.Types.Coercible (Expr Bool) (Expr BOOL))
(even with cunning newtype deriving): because the first type argument of ‛Expr’ has role Nominal,
it is not type-safe to use GeneralizedNewtypeDeriving on this class; but the arguments ‛Bool’ and ‛BOOL’ differ
‛mkExpr’, at type ‛Expr a’, cannot be converted safely arising from a use of ‛GHC.Prim.coerce’
In the stand-alone deriving instance for ‛B BOOL’ 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: T7148.hs:27:40:
Can't make a derived instance of ‛IsoUnit (Tagged a b)’ Could not deduce (GHC.Types.Coercible
(even with cunning newtype deriving): (SameType b b2) (SameType (Tagged a b) b2))
it is not type-safe to use GeneralizedNewtypeDeriving on this class; because the first type argument of ‛SameType’ has role Nominal,
‛iso1’, at type ‛forall b. but the arguments ‛b’ and ‛Tagged a b’ differ
SameType () b -> SameType a b’, cannot be converted safely arising from a use of ‛GHC.Prim.coerce’
‛iso2’, at type ‛forall b. from the context (IsoUnit b)
SameType b () -> SameType b a’, cannot be converted safely bound by the instance declaration at T7148.hs:27:40-46
In the newtype declaration for ‛Tagged’ 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: T7148a.hs:19:50:
Can't make a derived instance of ‛Convert (IS_NO_LONGER a)’ Could not deduce (GHC.Types.Coercible (Result a b1) b1)
(even with cunning newtype deriving): because ‛Result a b1’ and ‛b1’ are different types.
it is not type-safe to use GeneralizedNewtypeDeriving on this class; arising from a use of ‛GHC.Prim.coerce’
‛coerce’, at type ‛forall b. from the context (Convert a)
Proxy b -> a -> Result a b’, cannot be converted safely bound by the instance declaration at T7148a.hs:19:50-56
In the newtype declaration for ‛IS_NO_LONGER’ 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: CasePrune.hs:14:31:
Can't make a derived instance of ‛C A’ No instance for (GHC.Types.Coercible (T Int) (T A))
(even with cunning newtype deriving): because the first type argument of ‛T’ has role Nominal,
it is not type-safe to use GeneralizedNewtypeDeriving on this class; but the arguments ‛Int’ and ‛A’ differ
‛ic’, at type ‛T a’, cannot be converted safely arising from a use of ‛GHC.Prim.coerce’
In the newtype declaration for ‛A’ 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: Roles10.hs:16:12:
Can't make a derived instance of ‛C Age’ No instance for (GHC.Types.Coercible Bool Char)
(even with cunning newtype deriving): because ‛Bool’ and ‛Char’ are different types.
it is not type-safe to use GeneralizedNewtypeDeriving on this class; arising from a use of ‛GHC.Prim.coerce’
‛meth’, at type ‛a -> F a’, cannot be converted safely In the expression:
In the newtype declaration for ‛Age’ 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