Created
January 29, 2015 19:13
-
-
Save joshcough/b01b763f78faff55ae52 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
injectCycle :: ModuleGraph -> Gen ModuleGraph | |
injectCycle g = do | |
ks <- infiniteListOf (elements $ HM.keys g) | |
let cycl = zip ks (takeWhile (head ks /=) (tail ks) ++ [head ks]) | |
return $ foldl (flip addDep) g cycl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment