...
 
Commits (4)
......@@ -31,7 +31,6 @@ import GHC.Runtime.Heap.Layout
import UniqSupply
import CostCentre
import GHC.StgToCmm.Heap
import ErrUtils
import Control.Monad
import Data.Map.Strict (Map)
......@@ -802,9 +801,6 @@ doSRTs dflags moduleSRTInfo procs data_ = do
(srt_declss, pairs, funSRTs, has_caf_refs) = unzip4 result
srt_decls = concat srt_declss
unless (null srt_decls) $
dumpIfSet_dyn dflags Opt_D_dump_srts "SRTs" FormatCMM (ppr srt_decls)
-- Next, update the info tables with the SRTs
let
srtFieldMap = mapFromList (concat pairs)
......
......@@ -758,11 +758,12 @@ positions in the kind of the tycon.
mkLHsWrap :: HsWrapper -> LHsExpr GhcTc -> LHsExpr GhcTc
mkLHsWrap co_fn (L loc e) = L loc (mkHsWrap co_fn e)
-- | Avoid @'HsWrap' co1 ('HsWrap' co2 _)@.
-- | Avoid @'HsWrap' co1 ('HsWrap' co2 _)@ and @'HsWrap' co1 ('HsPar' _ _)@
-- See Note [Detecting forced eta expansion] in "DsExpr"
mkHsWrap :: HsWrapper -> HsExpr GhcTc -> HsExpr GhcTc
mkHsWrap co_fn e | isIdHsWrapper co_fn = e
mkHsWrap co_fn (XExpr (HsWrap co_fn' e)) = mkHsWrap (co_fn <.> co_fn') e
mkHsWrap co_fn (HsPar x (L l e)) = HsPar x (L l (mkHsWrap co_fn e))
mkHsWrap co_fn e = XExpr (HsWrap co_fn e)
mkHsWrapCo :: TcCoercionN -- A Nominal coercion a ~N b
......
......@@ -1102,10 +1102,7 @@ pprIfaceForAllBndr :: IfaceForAllBndr -> SDoc
pprIfaceForAllBndr bndr =
case bndr of
Bndr (IfaceTvBndr tv) Inferred ->
sdocWithDynFlags $ \dflags ->
if gopt Opt_PrintExplicitForalls dflags
then braces $ pprIfaceTvBndr tv suppress_sig (UseBndrParens False)
else pprIfaceTvBndr tv suppress_sig (UseBndrParens True)
braces $ pprIfaceTvBndr tv suppress_sig (UseBndrParens False)
Bndr (IfaceTvBndr tv) _ ->
pprIfaceTvBndr tv suppress_sig (UseBndrParens True)
Bndr (IfaceIdBndr idv) _ -> pprIfaceIdBndr idv
......
This diff is collapsed.
......@@ -427,7 +427,6 @@ data DumpFlag
| Opt_D_dump_cmm_split
| Opt_D_dump_cmm_info
| Opt_D_dump_cmm_cps
| Opt_D_dump_srts
-- end cmm subflags
| Opt_D_dump_cfg_weights -- ^ Dump the cfg used for block layout.
| Opt_D_dump_asm
......@@ -3360,8 +3359,6 @@ dynamic_flags_deps = [
(setDumpFlag Opt_D_dump_cmm_info)
, make_ord_flag defGhcFlag "ddump-cmm-cps"
(setDumpFlag Opt_D_dump_cmm_cps)
, make_ord_flag defGhcFlag "ddump-srts"
(setDumpFlag Opt_D_dump_srts)
, make_ord_flag defGhcFlag "ddump-cfg-weights"
(setDumpFlag Opt_D_dump_cfg_weights)
, make_ord_flag defGhcFlag "ddump-core-stats"
......
......@@ -815,10 +815,8 @@ See also Note [Required, Specified, and Inferred for types] in TcTyClsDecls
Specified: a list of Specified binders is written between `forall` and `.`:
const :: forall a b. a -> b -> a
Inferred: with -fprint-explicit-foralls, Inferred binders are written
in braces:
Inferred: like Specified, but every binder is written in braces:
f :: forall {k} (a:k). S k a -> Int
Otherwise, they are printed like Specified binders.
Required: binders are put between `forall` and `->`:
T :: forall k -> *
......
......@@ -152,8 +152,7 @@ Note that ``k2`` is placed *before* ``k``, and that ``k`` is placed *before*
type and kind variables that GHC generalises
over, but not written in the original program, are not available for visible
type application. (These are called *inferred* variables.)
Such variables are written in braces with
:ghc-flag:`-fprint-explicit-foralls` enabled.
Such variables are written in braces.
The general principle is this:
......
......@@ -73,9 +73,9 @@ Because ``k`` was not written by the user, it will be unavailable for
type application in the type of the constructor ``Proxy``; only the ``a``
will be available.
When :ghc-flag:`-fprint-explicit-foralls` is enabled, inferred variables
are printed in braces. Thus, the type of the data constructor ``Proxy``
from the previous example would be ``forall {k} (a :: k). Proxy a``.
Inferred variables are printed in braces. Thus, the type of the data
constructor ``Proxy`` from the previous example is
``forall {k} (a :: k). Proxy a``.
We can observe this behavior in a GHCi session: ::
> :set -XTypeApplications -fprint-explicit-foralls
......
......@@ -220,9 +220,10 @@ of ``-W(no-)*``.
encountered on the command line.
:type: dynamic
:reverse: -Wno-unrecognised-warning-flags
:default: on
:category:
:default: on
Enables warnings when the compiler encounters a ``-W...`` flag that is not
recognised.
......@@ -252,9 +253,10 @@ of ``-W(no-)*``.
:ghc-flag:`-fdefer-typed-holes`.
:type: dynamic
:reverse: -Wno-typed-holes
:default: on
:category:
:default: on
Determines whether the compiler reports typed holes warnings. Has no
effect unless typed holes errors are deferred until runtime. See
:ref:`typed-holes` and :ref:`defer-type-errors`
......
......@@ -771,9 +771,6 @@ messages and in GHCi:
(a Data.Type.Equality.:~: b) -> b Data.Type.Equality.:~: a
-- Defined in Data.Type.Equality
This flag also enables the printing of *inferred* type variables
inside braces. See :ref:`inferred-vs-specified`.
.. ghc-flag:: -fprint-explicit-kinds
:shortdesc: Print explicit kind foralls and kind arguments in types.
See also :extension:`KindSignatures`
......
#!/usr/bin/env bash
# Make sure that the script exits if Hadrian fails to build
set -euo pipefail
# Make sure Hadrian is up-to-date
cd hadrian
stack build --no-library-profiling ${HADRIAN_NIX:+--nix}
......
......@@ -8,37 +8,37 @@ TYPE SIGNATURES
test1c ::
forall (f :: * -> *). Applicative f => (Int -> f Int) -> f Int
test2 ::
forall (f :: * -> *) t b.
forall {f :: * -> *} {t} {b}.
(Applicative f, Num t, Num b) =>
(t -> f b) -> f b
test2a ::
forall (f :: * -> *) t b.
forall {f :: * -> *} {t} {b}.
(Functor f, Num t, Num b) =>
(t -> f b) -> f b
test2b ::
forall (m :: * -> *) t a. (Monad m, Num t) => (t -> a) -> m a
forall {m :: * -> *} {t} {a}. (Monad m, Num t) => (t -> a) -> m a
test2c ::
forall (f :: * -> *) t b.
forall {f :: * -> *} {t} {b}.
(Functor f, Num t, Num b) =>
(t -> f b) -> f b
test2d ::
forall (f :: * -> *) t1 b t2.
forall {f :: * -> *} {t1} {b} {t2}.
(Functor f, Num t1, Num b) =>
(t1 -> f t2) -> f b
test3 ::
forall (m :: * -> *) t1 t2 a.
forall {m :: * -> *} {t1} {t2} {a}.
(Monad m, Num t1) =>
(t1 -> m t2) -> (t2 -> t2 -> m a) -> m a
test4 ::
forall (m :: * -> *) t a1 a2.
forall {m :: * -> *} {t} {a1} {a2}.
(Monad m, Num t) =>
(t -> m a1) -> (a1 -> a1 -> m a2) -> m a2
test5 ::
forall (m :: * -> *) t a1 a2.
forall {m :: * -> *} {t} {a1} {a2}.
(Monad m, Num t) =>
(t -> m a1) -> (a1 -> a1 -> m a2) -> m a2
test6 ::
forall (m :: * -> *) a p.
forall {m :: * -> *} {a} {p}.
(Monad m, Num (m a)) =>
(m a -> m (m a)) -> p -> m a
Dependent modules: []
......
T13233.hs:14:11: error:
Cannot use function with levity-polymorphic arguments:
GHC.Prim.(#,#) :: a -> a -> (# a, a #)
(#,#) :: a -> a -> (# a, a #)
(Note that levity-polymorphic primops such as 'coerce' and unboxed tuples
are eta-expanded internally because they must occur fully saturated.
Use -fprint-typechecker-elaboration to display the full expression.)
Levity-polymorphic arguments:
a :: TYPE rep
a :: TYPE rep
T13233.hs:22:16: error:
Cannot use function with levity-polymorphic arguments:
GHC.Prim.(#,#) :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep)
(a :: TYPE rep1) (b :: TYPE rep2).
a -> b -> (# a, b #)
(#,#) :: forall {rep1 :: RuntimeRep} {rep2 :: RuntimeRep}
{a :: TYPE rep1} {b :: TYPE rep2}.
a -> b -> (# a, b #)
(Note that levity-polymorphic primops such as 'coerce' and unboxed tuples
are eta-expanded internally because they must occur fully saturated.
Use -fprint-typechecker-elaboration to display the full expression.)
Levity-polymorphic arguments:
a :: TYPE rep1
b :: TYPE rep2
-- Same as T13233, but we compile with -fprint-typechecker-elaboration.
-- The error message should show an eta-expanded call to (#,#).
-- See comments at https://gitlab.haskell.org/ghc/ghc/merge_requests/2540
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MagicHash #-}
module Bug where
import GHC.Exts (TYPE, RuntimeRep, Weak#, State#, RealWorld, mkWeak# )
class Foo (a :: TYPE rep) where
bar :: forall rep2 (b :: TYPE rep2). (a -> a -> b) -> a -> a -> b
baz :: forall rep (a :: TYPE rep). Foo a => a -> a -> (# a, a #)
baz = bar (#,#)
obscure :: (forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep)
(a :: TYPE rep1) (b :: TYPE rep2).
a -> b -> (# a, b #)) -> ()
obscure _ = ()
quux :: ()
quux = obscure (#,#)
-- It used to be that primops has no binding. However, as described in
-- Note [Primop wrappers] in PrimOp we now rewrite unsaturated primop
-- applications to their wrapper, which allows safe use of levity polymorphism.
primop :: forall (rep :: RuntimeRep) (a :: TYPE rep) b c.
a -> b -> (State# RealWorld -> (# State# RealWorld, c #))
-> State# RealWorld -> (# State# RealWorld, Weak# b #)
primop = mkWeak#
T13233_elab.hs:17:11: error:
Cannot use function with levity-polymorphic arguments:
(#,#) @rep @rep @a @a :: a -> a -> (# a, a #)
Levity-polymorphic arguments:
a :: TYPE rep
a :: TYPE rep
T13233_elab.hs:25:16: error:
Cannot use function with levity-polymorphic arguments:
/\(@(rep1 :: RuntimeRep)).
/\(@(rep2 :: RuntimeRep)).
/\(@(a :: TYPE rep1)).
/\(@(b :: TYPE rep2)).
(#,#) @rep1 @rep2 @a @b :: forall {rep1 :: RuntimeRep}
{rep2 :: RuntimeRep} {a :: TYPE rep1} {b :: TYPE rep2}.
a -> b -> (# a, b #)
Levity-polymorphic arguments:
a :: TYPE rep1
b :: TYPE rep2
......@@ -4,3 +4,4 @@
# memcpy operations
test('T8131', [cmm_src, only_ways(llvm_ways)], compile_fail, [''])
test('T13233', normal, compile_fail, [''])
test('T13233_elab', normal, compile_fail, ['-fprint-typechecker-elaboration'])
T14066a.hs:13:3: warning:
Type family instance equation is overlapped:
forall c d (x :: c) (y :: d).
forall {c} {d} {x :: c} {y :: d}.
Bar x y = Bool -- Defined at T14066a.hs:13:3
TYPE SIGNATURES
x :: forall (x :: Bool). P (F Int) (x |> Sym (T14729.D:R:FInt[0]))
y :: forall (x :: Bool). P Bool x
y :: forall {x :: Bool}. P Bool x
TYPE CONSTRUCTORS
type family F{1} :: * -> *
roles nominal
......
BadTelescope4.hs:9:1: error:
• The kind of ‘Bad’ is ill-scoped
Inferred kind: Bad :: forall k (b :: Proxy a). forall (a :: k) ->
Inferred kind: Bad :: forall {k} (b :: Proxy a). forall (a :: k) ->
Proxy b -> forall (d :: Proxy a) -> SameKind b d -> *
NB: Inferred variables
(namely: k) always come first
......
......@@ -15,7 +15,7 @@ T14066d.hs:11:35: error:
In the expression: g y
In the expression: (fstOf3 y :: Proxy Maybe, g y)
• Relevant bindings include
y :: forall k1 k2 (a :: k1) (c :: k2). (Proxy a, Proxy c, b)
y :: forall {k1} {k2} (a :: k1) (c :: k2). (Proxy a, Proxy c, b)
(bound at T14066d.hs:15:5)
x :: b (bound at T14066d.hs:11:3)
f :: b -> (Proxy Maybe, ()) (bound at T14066d.hs:11:1)
......@@ -3,7 +3,7 @@ T14066e.hs:13:59: error:
• Couldn't match kind ‘k’ with ‘*’
‘k’ is a rigid type variable bound by
the type signature for:
j :: forall k k1 (c :: k) (b :: k1).
j :: forall {k} {k1} (c :: k) (b :: k1).
Proxy a -> Proxy b -> Proxy c -> Proxy b
at T14066e.hs:12:5-61
When matching kinds
......
T15591b.hs:9:3: error:
• The kind of ‘T4’ is ill-scoped
Inferred kind: T4 :: forall (b :: Proxy a). forall a ->
Inferred kind: T4 :: forall {b :: Proxy a}. forall a ->
Proxy b -> *
NB: Inferred variables (namely: (b :: Proxy a)) always come first
Perhaps try this order instead: a (b :: Proxy a) (c :: Proxy b)
......
T15591c.hs:9:3: error:
• The kind of ‘T5’ is ill-scoped
Inferred kind: T5 :: forall (b :: Proxy a).
Inferred kind: T5 :: forall {b :: Proxy a}.
Proxy b -> forall a -> *
NB: Inferred variables (namely: (b :: Proxy a)) always come first
Perhaps try this order instead: a (b :: Proxy a) (c :: Proxy b)
......
T15743c.hs:10:1: error:
• The kind of ‘T’ is ill-scoped
Inferred kind: T :: forall (d :: k).
Inferred kind: T :: forall {d :: k}.
forall k (c :: k) (a :: Proxy c) (b :: Proxy d) ->
SimilarKind a b -> *
NB: Inferred variables (namely: (d :: k)) always come first
......
[1 of 1] Compiling A ( A.hs, A.o )
TYPE SIGNATURES
test2 ::
forall (f :: * -> *) t b.
forall {f :: * -> *} {t} {b}.
(Applicative f, Num t, Num b) =>
(t -> f b) -> f b
Dependent modules: []
......@@ -10,7 +10,7 @@ Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
[1 of 1] Compiling A ( A.hs, A.o )
TYPE SIGNATURES
test2 ::
forall (f :: * -> *) t b.
forall {f :: * -> *} {t} {b}.
(Applicative f, Num t, Num b) =>
(t -> f b) -> f b
Dependent modules: []
......
......@@ -3,4 +3,4 @@
• Non type-variable argument in the constraint: HasField "name" r a
(Use FlexibleContexts to permit this)
• When checking the inferred type
foo :: forall r a. HasField "name" r a => r -> a
foo :: forall {r} {a}. HasField "name" r a => r -> a
......@@ -4,4 +4,4 @@
in the constraint: Num (t2 -> t1 -> t3)
(Use FlexibleContexts to permit this)
• When checking the inferred type
it :: forall t1 t2 t3. (Num t1, Num (t2 -> t1 -> t3)) => t3
it :: forall {t1} {t2} {t3}. (Num t1, Num (t2 -> t1 -> t3)) => t3
type role Foo1 phantom
type Foo1 :: forall k. k -> *
data Foo1 a where
MkFoo1a :: forall k (a :: k). Proxy a -> Int -> Foo1 a
MkFoo1b :: forall k (a :: k). {a :: Proxy a, b :: Int} -> Foo1 a
MkFoo1a :: forall {k} (a :: k). Proxy a -> Int -> Foo1 a
MkFoo1b :: forall {k} (a :: k). {a :: Proxy a, b :: Int} -> Foo1 a
-- Defined at T16030.hs:8:1
type Foo2 :: forall k. k -> *
data family Foo2 a
-- Defined at T16030.hs:12:1
data instance forall k (a :: k). Foo2 a where
MkFoo2a :: forall k (a :: k). Proxy a -> Int -> Foo2 a
MkFoo2b :: forall k (a :: k). {c :: Proxy a, d :: Int} -> Foo2 a
MkFoo2a :: forall {k} (a :: k). Proxy a -> Int -> Foo2 a
MkFoo2b :: forall {k} (a :: k). {c :: Proxy a, d :: Int} -> Foo2 a
-- Defined at T16030.hs:13:15
type role Foo1 nominal phantom
type Foo1 :: forall k. k -> *
data Foo1 @k a where
MkFoo1a :: forall k (a :: k). Proxy @{k} a -> Int -> Foo1 @k a
MkFoo1b :: forall k (a :: k).
MkFoo1a :: forall {k} (a :: k). Proxy @{k} a -> Int -> Foo1 @k a
MkFoo1b :: forall {k} (a :: k).
{a :: Proxy @{k} a, b :: Int} -> Foo1 @k a
-- Defined at T16030.hs:8:1
type Foo2 :: forall k. k -> *
data family Foo2 @k a
-- Defined at T16030.hs:12:1
data instance forall k (a :: k). Foo2 @k a where
MkFoo2a :: forall k (a :: k). Proxy @{k} a -> Int -> Foo2 @k a
MkFoo2b :: forall k (a :: k).
MkFoo2a :: forall {k} (a :: k). Proxy @{k} a -> Int -> Foo2 @k a
MkFoo2b :: forall {k} (a :: k).
{c :: Proxy @{k} a, d :: Int} -> Foo2 @k a
-- Defined at T16030.hs:13:15
......@@ -6,7 +6,7 @@ Collecting type info for 3 module(s) ...
% ^~~~~~^
>
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":uses T16804a.hs 1 8 1 14"
% file snippet:
......@@ -22,7 +22,7 @@ undefined :: forall a. a
% ^~~^
>
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 3 8 3 18 undefined"
% file snippet:
......@@ -31,7 +31,7 @@ undefined :: forall a. a
% ^~~~~~~~~~^
>
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 3 13 3 18 undefined"
% file snippet:
......@@ -40,7 +40,7 @@ undefined :: forall a. a
% ^~~~~^
>
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":uses T16804a.hs 3 8 3 11"
% file snippet:
......@@ -73,7 +73,7 @@ undefined :: forall a. a
% ^~~^
> deriving (Show)
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 5 13 5 13 undefined"
% file snippet:
......@@ -82,7 +82,7 @@ undefined :: forall a. a
% ^
> deriving (Show)
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 5 15 5 15 undefined"
% file snippet:
......@@ -91,7 +91,7 @@ undefined :: forall a. a
% ^
> deriving (Show)
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 5 17 5 17 undefined"
% file snippet:
......@@ -100,7 +100,7 @@ undefined :: forall a. a
% ^
> deriving (Show)
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 6 13 6 16 undefined"
% file snippet:
......@@ -160,7 +160,7 @@ T16804a.hs:(6,13)-(6,16)
% ^~~~~^
> mempty = A
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 7 17 7 20 undefined"
% file snippet:
......@@ -169,7 +169,7 @@ undefined :: forall a. a
% ^~~^
> mempty = A
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 7 10 7 20 undefined"
% file snippet:
......@@ -249,7 +249,7 @@ T16804a.hs:(8,3)-(8,8)
% ^~~~~~~~~~~^
> testFunction A B = True
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 13 1 13 12 undefined"
% file snippet:
......@@ -566,7 +566,7 @@ undefined :: Test
> B <> _ = B
% ^^
% output:
undefined :: forall a. a
undefined :: forall {a}. a
% executing: ":type-at T16804a.hs 29 8 29 8 undefined"
% file snippet:
......
......@@ -59,7 +59,7 @@
Type family equation violates the family's injectivity annotation.
Type/kind variable ‘k’ cannot be inferred from the right-hand side.
In the type family equation:
forall k (a :: k) (b :: k).
forall {k} {a :: k} {b :: k}.
Fc @k a b = Int -- Defined at <interactive>:64:15
<interactive>:68:15: error:
......@@ -67,7 +67,7 @@
Type/kind variables ‘k’, ‘a’, ‘b’
cannot be inferred from the right-hand side.
In the type family equation:
forall k (a :: k) (b :: k).
forall {k} {a :: k} {b :: k}.
Gc @k a b = Int -- Defined at <interactive>:68:15
<interactive>:81:15: error:
......
type role A phantom phantom
type A :: forall k k1. k -> k1 -> *
type A :: forall {k} {k1}. k -> k1 -> *
data A x y
-- Defined at <interactive>:2:1
A :: k1 -> k2 -> *
type role T phantom
type T :: forall k. k -> *
type T :: forall {k}. k -> *
data T a = forall a1. MkT a1
-- Defined at <interactive>:6:1
type D2 :: *
data D2
= forall k. MkD2 (forall (p :: k -> *) (a :: k). p a -> Int)
= forall {k}. MkD2 (forall (p :: k -> *) (a :: k). p a -> Int)
-- Defined at <interactive>:3:1
type D3 :: *
data D3 = MkD3 (forall k (p :: k -> *) (a :: k). p a -> Int)
......
type Foo :: forall k. k -> Constraint
type Foo :: forall {k}. k -> Constraint
class Foo a where
type Bar :: forall k. k -> * -> *
type Bar :: forall {k}. k -> * -> *
type family Bar a b
-- Defined at T7939.hs:6:4
Bar :: k -> * -> *
......@@ -19,13 +19,13 @@ type family H a where
H 'False = 'True
-- Defined at T7939.hs:14:1
H :: Bool -> Bool
type J :: forall k. [k] -> Bool
type J :: forall {k}. [k] -> Bool
type family J a where
J '[] = 'False
forall k (h :: k) (t :: [k]). J (h : t) = 'True
-- Defined at T7939.hs:17:1
J :: [k] -> Bool
type K :: forall a. [a] -> Maybe a
type K :: forall {a}. [a] -> Maybe a
type family K a1 where
K '[] = 'Nothing
forall a (h :: a) (t :: [a]). K (h : t) = 'Just h
......
f :: forall k1 k2 (a :: k1 -> k2 -> *) (b :: k1) (c :: k2).
f :: forall {k1} {k2} {a :: k1 -> k2 -> *} {b :: k1} {c :: k2}.
C a =>
a b c
......@@ -6,7 +6,7 @@ COERCION AXIOMS
forall k1 k2 (j :: k1) (c :: k2).
DF (Proxy c) = T15852.R:DFProxyProxy k1 k2 j c
FAMILY INSTANCES
data instance forall k1 k2 (j :: k1) (c :: k2).
data instance forall {k1} {k2} {j :: k1} {c :: k2}.
DF (Proxy c) -- Defined at T15852.hs:10:15
Dependent modules: []
Dependent packages: [base-4.14.0.0, ghc-prim-0.6.1,
......
......@@ -3,7 +3,9 @@ TYPE SIGNATURES
emptyL :: forall a. ListColl a
insert :: forall c. Coll c => Elem c -> c -> c
test2 ::
forall c a b. (Coll c, Num a, Num b, Elem c ~ (a, b)) => c -> c
forall {c} {a} {b}.
(Coll c, Num a, Num b, Elem c ~ (a, b)) =>
c -> c
TYPE CONSTRUCTORS
class Coll{1} :: * -> Constraint
associated type family Elem{1} :: * -> *
......
T15764.hs:14:2: error:
• The kind of ‘T6’ is ill-scoped
Inferred kind: T6 :: forall (a :: k) k (b :: Proxy a).
Inferred kind: T6 :: forall {a :: k} k (b :: Proxy a).
Proxy '(k, b) -> *
NB: Inferred variables
(namely: (a :: k)) always come first
......
......@@ -8,6 +8,6 @@ T1897b.hs:16:1: error:
• In the ambiguity check for the inferred type for ‘isValid’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the inferred type
isValid :: forall (t :: * -> *) a.
isValid :: forall {t :: * -> *} {a}.
(Foldable t, Bug a) =>
t (Depend a) -> Bool
TYPE SIGNATURES
bravo :: forall _. Num _ => _
bravo :: forall {_}. Num _ => _
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
bravo :: forall _. Num _ => _
bravo :: forall {_}. Num _ => _
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
barry :: forall _. _ -> (Either [Char] _, Either [Char] _)
barry :: forall {_}. _ -> (Either [Char] _, Either [Char] _)
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
every :: forall t. (t -> Bool) -> [t] -> Bool
every :: forall {t}. (t -> Bool) -> [t] -> Bool
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
every :: forall _. (_ -> Bool) -> [_] -> Bool
every :: forall {_}. (_ -> Bool) -> [_] -> Bool
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
isMeltdown :: forall param1 param2. NukeMonad param1 param2 Bool
unlessMeltdown ::
forall param1 param2.
forall {param1} {param2}.
NukeMonad param1 param2 () -> NukeMonad param1 param2 ()
TYPE CONSTRUCTORS
data type NukeMonad{3} :: * -> * -> * -> *
......
TYPE SIGNATURES
foo :: forall a. a -> a
foo :: forall {a}. a -> a
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
showTwo :: forall a. Show a => a -> String
showTwo :: forall {a}. Show a => a -> String
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
bar :: forall _. _ -> Bool
bar :: forall {_}. _ -> Bool
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
skipMany ::
forall tok st a. GenParser tok st a -> GenParser tok st ()
forall {tok} {st} {a}. GenParser tok st a -> GenParser tok st ()
skipMany' ::
forall tok st a. GenParser tok st a -> GenParser tok st ()
TYPE CONSTRUCTORS
......
TYPE SIGNATURES
unc :: forall _1 _2 _3. (_1 -> _2 -> _3) -> (_1, _2) -> _3
unc :: forall {_1} {_2} {_3}. (_1 -> _2 -> _3) -> (_1, _2) -> _3
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
unc :: forall a b _. (a -> b -> _) -> (a, b) -> _
unc :: forall {a} {b} {_}. (a -> b -> _) -> (a, b) -> _
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
TYPE SIGNATURES
bar :: forall t _. t -> (t -> _) -> _
foo :: forall a. (Show a, Enum a) => a -> String
bar :: forall {t} {_}. t -> (t -> _) -> _
foo :: forall {a}. (Show a, Enum a) => a -> String
Dependent modules: []
Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
......
......@@ -3,9 +3,9 @@ NamedExtraConstraintsWildcard.hs:5:1: error:
• Could not deduce: _0
from the context: (Eq a, _)
bound by the inferred type for ‘foo’:
forall a (_ :: Constraint). (Eq a, _) => a -> a
forall a {_ :: Constraint}. (Eq a, _) => a -> a
at NamedExtraConstraintsWildcard.hs:5:1-15
• In the ambiguity check for the inferred type for ‘foo’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the inferred type
foo :: forall a (_ :: Constraint). (Eq a, _) => a -> a
foo :: forall a {_ :: Constraint}. (Eq a, _) => a -> a
......@@ -3,10 +3,10 @@ NamedWildcardsNotInMonotype.hs:5:1: error:
• Could not deduce (Eq _0)
from the context: (Show a, Eq _, Eq a)
bound by the inferred type for ‘foo’:
forall a _. (Show a, Eq _, Eq a) => a -> a -> String
forall {a} {_}. (Show a, Eq _, Eq a) => a -> a -> String
at NamedWildcardsNotInMonotype.hs:5:1-33
The type variable ‘_0’ is ambiguous
• In the ambiguity check for the inferred type for ‘foo’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the inferred type
foo :: forall a _. (Show a, Eq _, Eq a) => a -> a -> String
foo :: forall {a} {_}. (Show a, Eq _, Eq a) => a -> a -> String
......@@ -14,7 +14,7 @@ T14584a.hs:12:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘m -> m’
Where: ‘m’, ‘k’ are rigid type variables bound by
the type signature for:
f :: forall k2 (m :: k2). ()
f :: forall {k2} (m :: k2). ()
at T14584a.hs:11:1-17
• In an expression type signature: _
In the expression: id @m :: _
......
......@@ -4,48 +4,48 @@ T11213.hs:19:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
T11213.hs:20:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Pe :: () => forall a. a -> Ex
pattern Pe :: () => forall {a}. a -> Ex
T11213.hs:21:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Pu :: forall p. p -> p
pattern Pu :: forall {p}. p -> p
T11213.hs:22:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Pue :: forall a. () => forall a1. a -> a1 -> (a, Ex)
pattern Pue :: forall {a}. () => forall {a1}. a -> a1 -> (a, Ex)
T11213.hs:23:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Pur :: forall a. (Eq a, Num a) => a -> [a]
pattern Pur :: forall {a}. (Eq a, Num a) => a -> [a]
T11213.hs:24:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Purp :: forall a1 a2.
pattern Purp :: forall {a1} {a2}.
(Eq a1, Num a1) =>
Show a2 => a1 -> a2 -> ([a1], UnivProv a2)
T11213.hs:25:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Pure :: forall a.
pattern Pure :: forall {a}.
(Eq a, Num a) =>
forall a1. a -> a1 -> ([a], Ex)
forall {a1}. a -> a1 -> ([a], Ex)
T11213.hs:26:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Purep :: forall a.
pattern Purep :: forall {a}.
(Eq a, Num a) =>
forall a1. Show a1 => a -> a1 -> ([a], ExProv)
forall {a1}. Show a1 => a -> a1 -> ([a], ExProv)
T11213.hs:27:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Pep :: () => forall a. Show a => a -> ExProv
pattern Pep :: () => forall {a}. Show a => a -> ExProv
T11213.hs:28:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Pup :: forall a. () => Show a => a -> UnivProv a
pattern Pup :: forall {a}. () => Show a => a -> UnivProv a
T11213.hs:29:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern Puep :: forall b.
pattern Puep :: forall {b}.
() =>
forall a. Show a => a -> b -> (ExProv, b)
forall {a}. Show a => a -> b -> (ExProv, b)
T12484.hs:6:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern RP :: forall a. a -> (a, Bool)
pattern RP :: forall {a}. a -> (a, Bool)
pattern Foo :: () => (b ~ a) => a :~~: b
-- Defined at <interactive>:5:1
pattern Bar
:: forall k1 k2 (a :: k1) (b :: k2).
:: forall {k1} {k2} {a :: k1} {b :: k2}.
() =>
(k2 ~ k1, b ~~ a) =>
a :~~: b
......
......@@ -4,16 +4,16 @@ T11053.hs:7:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
T11053.hs:9:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern J :: forall a. a -> Maybe a
pattern J :: forall {a}. a -> Maybe a
T11053.hs:11:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern J1 :: forall a. a -> Maybe a
pattern J1 :: forall {a}. a -> Maybe a
T11053.hs:13:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern J2 :: forall a. a -> Maybe a
pattern J2 :: forall {a}. a -> Maybe a
T11053.hs:15:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
Pattern synonym with no type signature:
pattern J3 :: forall a. a -> Maybe a
pattern J3 :: forall {a}. a -> Maybe a
......@@ -53,7 +53,7 @@ typecheckPlugin [name, "typecheck"] _ tc
typecheckPlugin _ _ tc = return tc
metaPlugin' :: [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
metaPlugin' [name, "meta"] (L l (XExpr (HsWrap w (HsPar x (L _ (HsApp noExt (L _ (HsVar _ (L _ id))) e))))))
metaPlugin' [name, "meta"] (L l (HsPar x (L _ (XExpr (HsWrap w (HsApp noExt (L _ (HsVar _ (L _ id))) e))))))
| occNameString (getOccName id) == name
= return (L l (XExpr (HsWrap w (unLoc e))))
-- The test should always match this first case. If the desugaring changes
......
T11459.hs:9:20: error:
• A newtype constructor cannot have existential type variables
Parser :: forall a k.
Parser :: forall a {k}.
(forall (f :: k -> *) (r :: k).
Failure f r -> Success a f r -> f r)
-> Parser a
......
......@@ -2,4 +2,7 @@
T14561.hs:12:9: error:
Cannot use function with levity-polymorphic arguments:
unsafeCoerce# :: a -> a
(Note that levity-polymorphic primops such as 'coerce' and unboxed tuples
are eta-expanded internally because they must occur fully saturated.
Use -fprint-typechecker-elaboration to display the full expression.)
Levity-polymorphic arguments: a :: TYPE r
......@@ -3,7 +3,7 @@ T14846.hs:38:8: error:
• Couldn't match type ‘ríki’ with ‘Hom riki’
‘ríki’ is a rigid type variable bound by
the type signature for:
i :: forall k5 k6 (cls2 :: k6 -> Constraint) (xx :: k5)
i :: forall {k5} {k6} {cls2 :: k6 -> Constraint} (xx :: k5)
(a :: Struct cls2) (ríki :: Struct cls2 -> Struct cls2 -> *).
StructI xx a =>
ríki a a
......@@ -12,11 +12,11 @@ T14846.hs:38:8: error:
Actual type: Hom riki a a
• When checking that instance signature for ‘i’
is more general than its signature in the class
Instance sig: forall k1 k2 (cls :: k2 -> Constraint) (xx :: k1)
Instance sig: forall {k1} {k2} {cls :: k2 -> Constraint} (xx :: k1)
(a :: Struct cls).
StructI xx a =>
Hom riki a a
Class sig: forall k1 k2 (cls :: k2 -> Constraint) (xx :: k1)
Class sig: forall {k1} {k2} {cls :: k2 -> Constraint} (xx :: k1)
(a :: Struct cls) (ríki :: Struct cls -> Struct cls -> *).
StructI xx a =>
ríki a a
......
......@@ -9,13 +9,13 @@ T7230.hs:48:32: error:
at T7230.hs:47:1-68
or from: xs ~ (x : xs1)
bound by a pattern with constructor:
SCons :: forall a (x :: a) (xs :: [a]).
SCons :: forall {a} (x :: a) (xs :: [a]).
Sing x -> Sing xs -> Sing (x : xs),
in an equation for ‘crash’
at T7230.hs:48:8-27
or from: xs1 ~ (x1 : xs2)
bound by a pattern with constructor:
SCons :: forall a (x :: a) (xs :: [a]).
SCons :: forall {a} (x :: a) (xs :: [a]).
Sing x -> Sing xs -> Sing (x : xs),
in an equation for ‘crash’
at T7230.hs:48:17-26
......
......@@ -4,7 +4,7 @@ T7438.hs:6:14: error:
‘p’ is untouchable
inside the constraints: b ~ a
bound by a pattern with constructor:
Nil :: forall k (a :: k). Thrist a a,
Nil :: forall {k} (a :: k). Thrist a a,
in an equation for ‘go’
at T7438.hs:6:4-6
‘p’ is a rigid type variable bound by
......
T7524.hs:5:15: error:
Conflicting family instance declarations:
forall k2 (a :: k2). F a a = Int -- Defined at T7524.hs:5:15
forall k1 k2 (a :: k1) (b :: k2).
forall {k2} {a :: k2}. F a a = Int -- Defined at T7524.hs:5:15
forall {k1} {k2} {a :: k1} {b :: k2}.
F a b = Bool -- Defined at T7524.hs:6:15
......@@ -6,7 +6,8 @@ T8566.hs:34:9: error:
bound by the instance declaration at T8566.hs:32:10-67
or from: 'AA t (a : as) ~ 'AA t1 as1
bound by a pattern with constructor:
A :: forall v (t :: v) (as :: [U (*)]) (r :: [*]). I ('AA t as) r,
A :: forall {v} (t :: v) (as :: [U (*)]) (r :: [*]).
I ('AA t as) r,
in an equation for ‘c’
at T8566.hs:34:5
The type variable ‘fs0’ is ambiguous
......
......@@ -3,7 +3,7 @@ T9017.hs:8:7: error:
• Couldn't match kind ‘k1’ with ‘*’
‘k1’ is a rigid type variable bound by
the type signature for:
foo :: forall k k1 (a :: k -> k1 -> *) (b :: k) (m :: k -> k1).
foo :: forall {k} {k1} (a :: k -> k1 -> *) (b :: k) (m :: k -> k1).
a b (m b)
at T9017.hs:7:1-16
When matching types
......
......@@ -8,7 +8,7 @@ T9222.hs:14:3: error:
at T9222.hs:14:3-43
‘c’ is a rigid type variable bound by
the type of the constructor ‘Want’:
forall i1 j1 (a :: (i1, j1)) (b :: i1) (c :: j1).
forall {i1} {j1} (a :: (i1, j1)) (b :: i1) (c :: j1).
((a ~ '(b, c)) => Proxy b) -> Want a
at T9222.hs:14:3-43
• In the ambiguity check for ‘Want’
......
......@@ -7,7 +7,7 @@ T14343.hs:10:9: error:
test1 :: Proxy '[ 'True] (bound at T14343.hs:10:1)
Valid hole fits include
test1 :: Proxy '[ 'True] (defined at T14343.hs:10:1)
Proxy :: forall k1 (k2 :: k1). Proxy k2
Proxy :: forall {k1} (k2 :: k1). Proxy k2
with Proxy @'[ 'True]
(defined at T14343.hs:8:16)
......@@ -19,7 +19,7 @@ T14343.hs:11:9: error:
test2 :: Proxy '[ '[1]] (bound at T14343.hs:11:1)
Valid hole fits include
test2 :: Proxy '[ '[1]] (defined at T14343.hs:11:1)
Proxy :: forall k1 (k2 :: k1). Proxy k2
Proxy :: forall {k1} (k2 :: k1). Proxy k2
with Proxy @'[ '[1]]
(defined at T14343.hs:8:16)
......@@ -31,6 +31,6 @@ T14343.hs:12:9: error:
test3 :: Proxy '[ '("Symbol", 1)] (bound at T14343.hs:12:1)
Valid hole fits include
test3 :: Proxy '[ '("Symbol", 1)] (defined at T14343.hs:12:1)
Proxy :: forall k1 (k2 :: k1). Proxy k2
Proxy :: forall {k1} (k2 :: k1). Proxy k2
with Proxy @'[ '("Symbol", 1)]
(defined at T14343.hs:8:16)
......@@ -7,7 +7,7 @@ T14343b.hs:10:9: error:
test1 :: Proxy '( 'True, 'False) (bound at T14343b.hs:10:1)
Valid hole fits include
test1 :: Proxy '( 'True, 'False) (defined at T14343b.hs:10:1)
Proxy :: forall k1 (k2 :: k1). Proxy k2
Proxy :: forall {k1} (k2 :: k1). Proxy k2
with Proxy @'( 'True, 'False)
(defined at T14343b.hs:8:16)
......@@ -22,7 +22,7 @@ T14343b.hs:11:9: error:
Valid hole fits include
test2 :: Proxy '( '( 'True, 'False), 'False)
(defined at T14343b.hs:11:1)
Proxy :: forall k1 (k2 :: k1). Proxy k2
Proxy :: forall {k1} (k2 :: k1). Proxy k2
with Proxy @'( '( 'True, 'False), 'False)
(defined at T14343b.hs:8:16)
......@@ -34,6 +34,6 @@ T14343b.hs:12:9: error:
test3 :: Proxy '( '[1], 'False) (bound at T14343b.hs:12:1)
Valid hole fits include
test3 :: Proxy '( '[1], 'False) (defined at T14343b.hs:12:1)
Proxy :: forall k1 (k2 :: k1). Proxy k2
Proxy :: forall {k1} (k2 :: k1). Proxy k2
with Proxy @'( '[1], 'False)
(defined at T14343b.hs:8:16)
T :: forall k j (p :: k). j -> Type -> P p -> Type
T :: forall {k} {j} (p :: k). j -> Type -> P p -> Type
C :: forall k (i :: k). Proxy i -> Constraint
C :: forall {k} (i :: k). Proxy i -> Constraint
F :: k -> Type
......@@ -6,7 +6,7 @@ Result size of Tidy Core
Rec {
-- RHS size: {terms: 4, types: 4, coercions: 0, joins: 0/0}
T13143.$wf [InlPrag=NOINLINE, Occ=LoopBreaker]
:: forall a. GHC.Prim.Void# -> a
:: forall {a}. GHC.Prim.Void# -> a
[GblId, Arity=1, Str=<B,A>b, Cpr=b, Unf=OtherCon []]
T13143.$wf = \ (@a) _ [Occ=Dead] -> T13143.$wf @a GHC.Prim.void#
end Rec }
......
......@@ -40,7 +40,7 @@ T7360.fun4 :: Int
T7360.fun4 = GHC.Types.I# 0#
-- RHS size: {terms: 16, types: 13, coercions: 0, joins: 0/0}
fun2 :: forall a. [a] -> ((), Int)
fun2 :: forall {a}. [a] -> ((), Int)
[GblId,
Arity=1,
Str=<L,1*U>,
......
==================== STG: ====================
Noinline01.f [InlPrag=INLINE (sat-args=1)]
:: forall p. p -> GHC.Types.Bool
:: forall {p}. p -> GHC.Types.Bool
[GblId, Arity=1, Str=<L,A>, Unf=OtherCon []] =
\r [eta] GHC.Types.True [];
......
......@@ -255,7 +255,7 @@ fac
}
-- RHS size: {terms: 32, types: 12, coercions: 0, joins: 1/1}
Unlifted.$wmutVar [InlPrag=NOINLINE] :: forall s a. Int# -> Int#
Unlifted.$wmutVar [InlPrag=NOINLINE] :: forall {s} {a}. Int# -> Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []]
Unlifted.$wmutVar
= \ (@ s_s2UR) (@ a_s2US) (ww_s2V0 :: Int#) ->
......@@ -296,7 +296,7 @@ mutVar
}
-- RHS size: {terms: 31, types: 10, coercions: 0, joins: 1/1}
Unlifted.$warray [InlPrag=NOINLINE] :: forall a. Int# -> Int#
Unlifted.$warray [InlPrag=NOINLINE] :: forall {a}. Int# -> Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []]
Unlifted.$warray
= \ (@ a_s2V7) (ww_s2Vf :: Int#) ->
......
......@@ -3,11 +3,11 @@ T15370.hs:14:10: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match type ‘n’ with ‘j’
‘n’ is a rigid type variable bound by
the type signature for:
mkRefl :: forall k (n :: k) (j :: k). n :~: j
mkRefl :: forall {k} (n :: k) (j :: k). n :~: j
at T15370.hs:13:1-17
‘j’ is a rigid type variable bound by
the type signature for:
mkRefl :: forall k (n :: k) (j :: k). n :~: j
mkRefl :: forall {k} (n :: k) (j :: k). n :~: j
at T15370.hs:13:1-17
Expected type: n :~: j
Actual type: n :~: n
......
......@@ -7,7 +7,7 @@ holes.hs:3:5: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: t (bound at holes.hs:3:1)
Valid hole fits include f :: forall t. t
Valid hole fits include f :: forall {t}. t
holes.hs:6:7: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Char
......@@ -17,7 +17,7 @@ holes.hs:6:7: warning: [-Wtyped-holes (in -Wdefault)]
x :: Int (bound at holes.hs:6:3)
g :: Int -> Char (bound at holes.hs:6:1)
Valid hole fits include
f :: forall t. t
f :: forall {t}. t
maxBound :: forall a. Bounded a => a
minBound :: forall a. Bounded a => a
......@@ -29,7 +29,7 @@ holes.hs:8:5: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include h :: [Char] (bound at holes.hs:8:1)
Valid hole fits include
h :: [Char]
f :: forall t. t
f :: forall {t}. t
[] :: forall a. [a]
mempty :: forall a. Monoid a => a
......@@ -47,7 +47,7 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
z :: [a] -> [a]
g :: Int -> Char
h :: [Char]
f :: forall t. t
f :: forall {t}. t
otherwise :: Bool
False :: Bool
True :: Bool
......
......@@ -7,7 +7,7 @@ holes3.hs:3:5: error:
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: t (bound at holes3.hs:3:1)
Valid hole fits include f :: forall t. t
Valid hole fits include f :: forall {t}. t
holes3.hs:6:7: error:
• Found hole: _gr :: Char
......@@ -18,7 +18,7 @@ holes3.hs:6:7: error:
x :: Int (bound at holes3.hs:6:3)
g :: Int -> Char (bound at holes3.hs:6:1)
Valid hole fits include
f :: forall t. t
f :: forall {t}. t
maxBound :: forall a. Bounded a => a
minBound :: forall a. Bounded a => a
......@@ -31,7 +31,7 @@ holes3.hs:8:5: error:
• Relevant bindings include h :: [Char] (bound at holes3.hs:8:1)
Valid hole fits include
h :: [Char]
f :: forall t. t
f :: forall {t}. t
[] :: forall a. [a]
mempty :: forall a. Monoid a => a
......@@ -50,7 +50,7 @@ holes3.hs:11:15: error:
z :: [a] -> [a]
g :: Int -> Char
h :: [Char]
f :: forall t. t
f :: forall {t}. t
otherwise :: Bool
False :: Bool
True :: Bool
......
......@@ -3,10 +3,10 @@ tc168.hs:17:1: error:
• Could not deduce (C a (a1, b0))
from the context: C a (a1, b)
bound by the inferred type for ‘g’:
forall a a1 b. C a (a1, b) => a -> a1
forall {a} {a1} {b}. C a (a1, b) => a -> a1
at tc168.hs:17:1-16
The type variable ‘b0’ is ambiguous
• In the ambiguity check for the inferred type for ‘g’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the inferred type
g :: forall a1 a2 b. C a1 (a2, b) => a1 -> a2
g :: forall {a1} {a2} {b}. C a1 (a2, b) => a1 -> a2
TYPE SIGNATURES
foo ::
forall s b chain.
forall {s} {b} {chain}.
Zork s (Z [Char]) b =>
Q s (Z [Char]) chain -> ST s ()
huh :: forall s a b chain. Zork s a b => Q s a chain -> ST s ()
......
......@@ -3,7 +3,7 @@ T10285.hs:8:17: error:
• Could not deduce: Coercible a b arising from a use of ‘coerce’
from the context: Coercible (N a) (N b)
bound by a pattern with constructor:
Coercion :: forall k (a :: k) (b :: k).
Coercion :: forall {k} (a :: k) (b :: k).
Coercible a b =>
Coercion a b,
in an equation for ‘oops’
......
......@@ -3,4 +3,4 @@ T10351.hs:6:1: error:
• Non type-variable argument in the constraint: C [a]
(Use FlexibleContexts to permit this)
• When checking the inferred type
f :: forall a. C [a] => a -> ()
f :: forall {a}. C [a] => a -> ()
......@@ -10,7 +10,7 @@ T12785b.hs:29:63: error:
at T12785b.hs:29:7-51
‘s’ is a rigid type variable bound by
a pattern with constructor:
Hide :: forall a (n :: Peano) (f :: a -> *) (s :: HTree n a).
Hide :: forall {a} (n :: Peano) (f :: a -> *) (s :: HTree n a).
STree n f s -> Hidden n f,
in an equation for ‘nest’
at T12785b.hs:29:7-12
......
......@@ -3,7 +3,7 @@ T15361.hs:13:13: error:
• Could not deduce: a ~ c
from the context: b ~ a
bound by a pattern with constructor:
HRefl :: forall k1 (a :: k1). a :~~: a,
HRefl :: forall {k1} (a :: k1). a :~~: a,
in an equation for ‘foo’
at T15361.hs:13:5-9
‘a’ is a rigid type variable bound by
......
......@@ -3,7 +3,7 @@ T17773.hs:16:22: error:
• Found hole: _Refl :: Mzero x y :~: (x <|> y)
Where: ‘x’, ‘f’, ‘k’, ‘a’, ‘y’ are rigid type variables bound by
the type signature for:
monadPlusMplus :: forall k (f :: k -> *) (a :: k) (x :: f a)
monadPlusMplus :: forall {k} (f :: k -> *) (a :: k) (x :: f a)
(y :: f a).
Proxy x -> Proxy y -> Mzero x y :~: (x <|> y)
at T17773.hs:(13,1)-(15,41)
......
......@@ -3,10 +3,10 @@ T1897a.hs:9:1: error:
• Could not deduce (Wob a0 b)
from the context: Wob a b
bound by the inferred type for ‘foo’:
forall a b. Wob a b => b -> [b]
forall {a} {b}. Wob a b => b -> [b]
at T1897a.hs:9:1-24
The type variable ‘a0’ is ambiguous
• In the ambiguity check for the inferred type for ‘foo’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the inferred type
foo :: forall a b. Wob a b => b -> [b]
foo :: forall {a} {b}. Wob a b => b -> [b]
......@@ -82,7 +82,7 @@ T6018fail.hs:68:15: error:
Type family equation violates the family's injectivity annotation.
Type/kind variable ‘k’ cannot be inferred from the right-hand side.
In the type family equation:
forall k (a :: k) (b :: k).
forall {k} {a :: k} {b :: k}.
Fc @k a b = Int -- Defined at T6018fail.hs:68:15
T6018fail.hs:72:15: error:
......@@ -90,7 +90,7 @@ T6018fail.hs:72:15: error:
Type/kind variables ‘k’, ‘a’, ‘b’
cannot be inferred from the right-hand side.
In the type family equation:
forall k (a :: k) (b :: k).
forall {k} {a :: k} {b :: k}.
Gc @k a b = Int -- Defined at T6018fail.hs:72:15
T6018fail.hs:76:15: error:
......@@ -151,7 +151,7 @@ T6018fail.hs:120:15: error:
Type/kind variables ‘k’, ‘c’
cannot be inferred from the right-hand side.
In the type family equation:
forall k a b (c :: k).
forall {k} {a} {b} {c :: k}.
G7 @k a b c = [G7a @k a b c] -- Defined at T6018fail.hs:120:15
T6018fail.hs:131:1: error:
......
......@@ -28,7 +28,7 @@ T6018failclosed.hs:25:5: error:
Type/kind variables ‘k1’, ‘b’
cannot be inferred from the right-hand side.
In the type family equation:
forall k1 k2 (b :: k1) (c :: k2).
forall {k1} {k2} {b :: k1} {c :: k2}.
JClosed @{k1} @{k2} Int b c = Char
-- Defined at T6018failclosed.hs:25:5
• In the equations for closed type family ‘JClosed’
......@@ -45,7 +45,7 @@ T6018failclosed.hs:30:5: error:
T6018failclosed.hs:35:5: error:
• Type family equation violates the family's injectivity annotation.
RHS of injective type family equation cannot be a type family:
forall k (a :: k).
forall {k} {a :: k}.
LClosed a = MaybeSynClosed a -- Defined at T6018failclosed.hs:35:5
• In the equations for closed type family ‘LClosed’
In the type family declaration for ‘LClosed’
......@@ -94,7 +94,7 @@ T6018failclosed.hs:66:5: error:
• Type family equation violates the family's injectivity annotation.
Type/kind variable ‘k’ cannot be inferred from the right-hand side.
In the type family equation:
forall k (a :: k) (b :: k).
forall {k} {a :: k} {b :: k}.
Gc @k a b = Int -- Defined at T6018failclosed.hs:66:5
• In the equations for closed type family ‘Gc’
In the type family declaration for ‘Gc’
......@@ -3,4 +3,4 @@ T6022.hs:3:1: error:
• Non type-variable argument in the constraint: Eq ([a] -> a)
(Use FlexibleContexts to permit this)
• When checking the inferred type
f :: forall a. Eq ([a] -> a) => ([a] -> a) -> Bool
f :: forall {a}. Eq ([a] -> a) => ([a] -> a) -> Bool
......@@ -58,7 +58,7 @@ T7453.hs:21:15: error:
where
aux = const v
• Relevant bindings include
aux :: forall b. b -> p (bound at T7453.hs:22:21)
aux :: forall {b}. b -> p (bound at T7453.hs:22:21)
z :: t1 (bound at T7453.hs:21:11)
v :: p (bound at T7453.hs:19:7)
cast3 :: p -> t (bound at T7453.hs:19:1)
......@@ -3,6 +3,6 @@ T8883.hs:20:1: error:
• Non type-variable argument in the constraint: Functor (PF a)
(Use FlexibleContexts to permit this)
• When checking the inferred type
fold :: forall a b.
fold :: forall {a} {b}.
(Functor (PF a), Regular a) =>
(PF a b -> b) -> a -> b
UnliftedNewtypesCoerceFail.hs:15:8:
UnliftedNewtypesCoerceFail.hs:15:8: error:
Cannot use function with levity-polymorphic arguments:
coerce :: x -> y
(Note that levity-polymorphic primops such as 'coerce' and unboxed tuples
are eta-expanded internally because they must occur fully saturated.
Use -fprint-typechecker-elaboration to display the full expression.)
Levity-polymorphic arguments: x :: TYPE rep
UnliftedNewtypesLevityBinder.hs:16:7:
UnliftedNewtypesLevityBinder.hs:16:7: error:
Cannot use function with levity-polymorphic arguments:
UnliftedNewtypesLevityBinder.IdentC :: a -> Ident a
IdentC :: a -> Ident a
(Note that levity-polymorphic primops such as 'coerce' and unboxed tuples
are eta-expanded internally because they must occur fully saturated.
Use -fprint-typechecker-elaboration to display the full expression.)
Levity-polymorphic arguments: a :: TYPE r
......@@ -3,10 +3,10 @@ tcfail080.hs:27:1: error:
• Could not deduce (Collection c0 a)
from the context: Collection c a
bound by the inferred type for ‘q’:
forall (c :: * -> *) a. Collection c a => a -> Bool
forall {c :: * -> *} {a}. Collection c a => a -> Bool
at tcfail080.hs:27:1-27
The type variable ‘c0’ is ambiguous
• In the ambiguity check for the inferred type for ‘q’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the inferred type
q :: forall (c :: * -> *) a. Collection c a => a -> Bool
q :: forall {c :: * -> *} {a}. Collection c a => a -> Bool
T12574.hs:3:1: warning: [-Wmissing-local-signatures]
Polymorphic local binding with no type signature:
T12574.id :: forall p. p -> p
T12574.id :: forall {p}. p -> p