haskell / haskell/error-messages
could not deduce [instance]
- Dominant language
- No language data
- Stars
- 76
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
```src/Telomare/Possible.hs:663:17: error:
• Could not deduce (PrettyPrintable a)
arising from a use of ‘cleanA’
from the context: (Traversable f, Show s, Show1 f, Eq s, Eq1 f,
PrettyPrintable1 f)
bound by the type signature for:
sizeTerm :: forall (f :: * -> *) s.
(Traversable f, Show s, Show1 f, Eq s, Eq1 f,
PrettyPrintable1 f) =>
Integer
-> StuckExpr (SizeStuck s) (StuckUnsizedBase f)
-> Either
UnsizedRecursionToken
(StuckExpr (SetStuck s) (StuckAbortBase f))
at src/Telomare/Possible.hs:(564,1)-(565,133)
Possible fix:
add (PrettyPrintable a) to the context of
a type expected by the context:
forall a.
Base
(EnhancedExpr
(SplitFunctor
(SplitFunctor
(SplitFunctor (SplitFunctor f UnsizedRecursionF) AbortableF)
SuperPositionF)
(StuckF
(SetStuck (Either s StuckNeedsSizing))
(StuckExpr
(SetStuck (Either s StuckNeedsSizing))
(SplitFunctor
(SplitFunctor (SplitFunctor f UnsizedRecursionF) AbortableF)
SuperPositionF)))))
a
-> Base
(EnhancedExpr
(SplitFunctor
(StuckAbortBase f)
(StuckF (SetStuck s) (StuckExpr (SetStuck s) (StuckAbortBase f)))))
a
• In the first argument of ‘hoist’, namely ‘cleanA’
In the expression: hoist cleanA
In an equation for ‘clean’: clean = hoist cleanA
|
663 | clean = hoist cleanA
```
This seems bad to me for at least two reasons. The first is that the type variable `a` is only made clear in the possible fix. The second is that the possible fix is not a fix.
Original post on reddit:
https://www.reddit.com/r/haskell/comments/y40ydi/ghc_could_not_deduce_instance/
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.