summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/free_monad_hole_fits.stderr
blob: eee461b708823ef0bb97b97665fd5c07e3112540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

free_monad_hole_fits.hs:14:28: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole:
        _a :: (Free f a -> Free f b) -> f (Free f a) -> f (Free f b)
      Where: ‘a’, ‘b’ are rigid type variables bound by
               the type signature for:
                 fmap :: forall a b. (a -> b) -> Free f a -> Free f b
               at free_monad_hole_fits.hs:11:5-8
             ‘f’ is a rigid type variable bound by
               the instance declaration
               at free_monad_hole_fits.hs:10:10-38
      Or perhaps ‘_a’ is mis-spelled, or not in scope
    • In the first argument of ‘Free’, namely ‘(_a go fa)’
      In the expression: Free (_a go fa)
      In an equation for ‘go’: go (Free fa) = Free (_a go fa)
    • Relevant bindings include
        fa :: f (Free f a) (bound at free_monad_hole_fits.hs:14:16)
        go :: Free f a -> Free f b (bound at free_monad_hole_fits.hs:12:7)
        f :: a -> b (bound at free_monad_hole_fits.hs:11:10)
        fmap :: (a -> b) -> Free f a -> Free f b
          (bound at free_monad_hole_fits.hs:11:5)
      Constraints include
        Functor f (from free_monad_hole_fits.hs:10:10-38)
      Valid hole fits include
        fmap :: forall (f :: * -> *) a b.
                Functor f =>
                (a -> b) -> f a -> f b
        (<$>) :: forall (f :: * -> *) a b.
                 Functor f =>
                 (a -> b) -> f a -> f b
      Valid refinement hole fits include
        ($) (_ :: (Free f a -> Free f b) -> f (Free f a) -> f (Free f b))
          where ($) :: forall a b. (a -> b) -> a -> b
        pure (_ :: f (Free f a) -> f (Free f b))
          where pure :: forall (f :: * -> *) a. Applicative f => a -> f a

free_monad_hole_fits.hs:25:31: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _a :: Free f a -> Free f b
      Where: ‘a’, ‘b’ are rigid type variables bound by
               the type signature for:
                 (>>=) :: forall a b. Free f a -> (a -> Free f b) -> Free f b
               at free_monad_hole_fits.hs:23:12-14
             ‘f’ is a rigid type variable bound by
               the instance declaration
               at free_monad_hole_fits.hs:22:10-40
      Or perhaps ‘_a’ is mis-spelled, or not in scope
    • In the first argument of ‘fmap’, namely ‘_a’
      In the first argument of ‘Free’, namely ‘(fmap _a f)’
      In the expression: Free (fmap _a f)
    • Relevant bindings include
        g :: a -> Free f b (bound at free_monad_hole_fits.hs:25:16)
        f :: f (Free f a) (bound at free_monad_hole_fits.hs:25:10)
        (>>=) :: Free f a -> (a -> Free f b) -> Free f b
          (bound at free_monad_hole_fits.hs:23:12)
      Constraints include
        Applicative f (from free_monad_hole_fits.hs:22:10-40)
      Valid refinement hole fits include
        fmap (_ :: a -> b)
          where fmap :: forall (f :: * -> *) a b.
                        Functor f =>
                        (a -> b) -> f a -> f b
        (<*>) (_ :: Free f (a -> b))
          where (<*>) :: forall (f :: * -> *) a b.
                         Applicative f =>
                         f (a -> b) -> f a -> f b
        (<$>) (_ :: a -> b)
          where (<$>) :: forall (f :: * -> *) a b.
                         Functor f =>
                         (a -> b) -> f a -> f b
        (=<<) (_ :: a -> Free f b)
          where (=<<) :: forall (m :: * -> *) a b.
                         Monad m =>
                         (a -> m b) -> m a -> m b
        ($) (_ :: Free f a -> Free f b)
          where ($) :: forall a b. (a -> b) -> a -> b
        pure (_ :: Free f b)
          where pure :: forall (f :: * -> *) a. Applicative f => a -> f a