Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created February 12, 2017 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/307e2d2c870ead3b61fcbc0bb2c725af to your computer and use it in GitHub Desktop.
Save deque-blog/307e2d2c870ead3b61fcbc0bb2c725af to your computer and use it in GitHub Desktop.
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