Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to use senders in perprop #122

Closed
wants to merge 3 commits into from

Conversation

ggrieco-tob
Copy link
Member

No description provided.

perprop/Main.hs Outdated
@@ -113,7 +113,7 @@ readConf :: FilePath -> IO (Maybe (Config, [Property]))
readConf f = decodeEither <$> BS.readFile f >>= \case
Left e -> putStrLn ("couldn't parse config, " ++ e) >> pure Nothing
Right (PerPropConf t s p) -> pure . Just . (,p) $
defaultConfig & addrList ?~ (view address <$> s) & range .~ t & epochs .~ 1 & outputJson .~ True
defaultConfig & addrList ?~ (view address <$> s) & range .~ t & Echidna.Config.sender .~ (head $ view address <$> s) & epochs .~ 1 & outputJson .~ True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we import sender unqualified + avoid the use of head?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to use sender unqualified:

    Ambiguous occurrence ‘sender’
    It could refer to either ‘Echidna.Config.sender’,
                             imported from ‘Echidna.Config’ at perprop/Main.hs:27:1-21
                          or ‘Main.sender’, defined at perprop/Main.hs:90:1

To avoid the use of head (or any arbitrary way of selecting an element), we should decide which address from the sender list we should use (and this will be fixed during all the calls).

@ggrieco-tob ggrieco-tob changed the title Workaround to use the (first) sender from the list of addresses in perprop Workaround to use senders in perprop Aug 10, 2018
@ggrieco-tob
Copy link
Member Author

Superseded by #128

@ggrieco-tob ggrieco-tob closed this Sep 4, 2018
@japesinator japesinator deleted the workaround-sender-perprop branch November 20, 2018 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants