elerea
elerea copied to clipboard
Fail on improper use
This is a feature request.
I wish elerea would fail on improper use. Of course, the best would be to fail during compilation but if it is not feasable still better to fail in runtime than silently go on. I think this way elerea users would be less surprised.
For example, consider the following code:
unspecified = do
(sg, snk) <- externalMulti
snk 0
join $ start $ do
s1 <- sg
s2 <- sg
return $ liftM2 (++) s1 s2
I think unspecified
should return [0,0]
but it returns [0]
.
This is not a bug, because the documentation of externalMulti
sais that the generator can only be used once so I cannot complain.
Well, it is true that there would be no downside to detecting this case.