Created
February 12, 2017 14:04
-
-
Save deque-blog/307e2d2c870ead3b61fcbc0bb2c725af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
makeEnvWith :: Set.Set String -> Gen Env | |
makeEnvWith deps = do | |
let n = Set.size deps | |
values <- replicateM n arbitrary | |
return $ Map.fromList (zip (Set.toList deps) values) | |
genTotalEnv :: Gen Env | |
genTotalEnv = makeEnvWith (Set.fromList varNames) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment