-mc22.hs:8:11:
- No instance for (Num (t0 [Char])) arising from a use of `+'
- The type variable `t0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
- Note: there is a potential instance available:
- instance Integral a => Num (GHC.Real.Ratio a)
- -- Defined in `GHC.Real'
- Possible fix: add an instance declaration for (Num (t0 [Char]))
- In the expression: x + 1
- In the expression:
- [x + 1 | x <- ["Hello", "World"], then group using take 5]
- In an equation for `foo':
- foo = [x + 1 | x <- ["Hello", "World"], then group using take 5]
-
-mc22.hs:10:9:
- No instance for (Functor t0) arising from a use of `fmap'
- The type variable `t0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
- Note: there are several potential instances:
- instance Functor ((,) a) -- Defined in `GHC.Base'
- instance Functor ((->) r) -- Defined in `GHC.Base'
- instance Functor IO -- Defined in `GHC.Base'
- ...plus one other
- In the expression: fmap
- In a stmt of a monad comprehension: then group using take 5
- In the expression:
- [x + 1 | x <- ["Hello", "World"], then group using take 5]
-
-mc22.hs:10:26:
- Couldn't match type `a' with `t0 a'
- `a' is a rigid type variable bound by
- a type expected by the context: [a] -> [t0 a] at mc22.hs:10:9
- Expected type: [a] -> [t0 a]
- Actual type: [a] -> [a]
- In the return type of a call of `take'
- In the expression: take 5
- In a stmt of a monad comprehension: then group using take 5
+mc22.hs:10:26: error:
+ • Couldn't match type ‘a’ with ‘t a’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context:
+ forall a. [a] -> [t a]
+ at mc22.hs:(9,9)-(10,31)
+ Expected type: [a] -> [t a]
+ Actual type: [t a] -> [t a]
+ • In the expression: take 5
+ In a stmt of a monad comprehension: then group using take 5
+ In the expression:
+ [x + 1 | x <- ["Hello", "World"], then group using take 5]
+ • Relevant bindings include
+ foo :: [t [Char]] (bound at mc22.hs:8:1)