You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model :: ExampleModel ()
model _ = exists $ \col -> do
[x1,x2,x3,x4,x5,x6,x7,x8,x9,x10] <- colList col 10
...
I am seeing
examples/Olympic.hs:40:3: error:
• Could not deduce (MonadFail m)
arising from a do statement
with the failable pattern ‘[x1, ...
from the context: (Show (Control.CP.FD.FD.FDIntTerm s), FDSolver s,
Control.CP.SearchTree.MonadTree m,
Control.CP.SearchTree.TreeSolver m ~ FDInstance s)
...
the suggested fix seems impossible (there is no m)
Possible fix:
add (MonadFail m) to the context of
the type signature for:
model :: ExampleModel ()
But still, someone needs to get a MonadFail instance.
The text was updated successfully, but these errors were encountered:
class (MonadFail m, Solver (TreeSolver m)) => MonadTree m
...
exists :: ...
instance Solver solver => MonadFail (Tree solver)
fail = error
then a failed match will produce
olympic: Pattern match failure in do expression at examples/Olympic.hs:40:3-36
CallStack (from HasCallStack):
error, called at src/Control/CP/SearchTree.hs:198:10 in monadiccp-0.7.7-inplace:Control.CP.SearchTree
jwaldmann
added a commit
to jwaldmann/monadiccp
that referenced
this issue
Oct 31, 2020
(with ghc-9.0.1-alpha1) when compiling
I am seeing
the suggested fix seems impossible (there is no
m
)But still, someone needs to get a
MonadFail
instance.The text was updated successfully, but these errors were encountered: