Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RecInfo
- mkRecInfo :: BindingMap -> RecInfo
- isRecursive :: Id -> RecInfo -> Bool
- recursiveGroup :: Id -> RecInfo -> Maybe VarSet
Documentation
mkRecInfo :: BindingMap -> RecInfo Source #
Given a map of top-level bindings, identify which terms are recursive and organize them into groups of mutually recursive bindings. For example, calling mkRecInfo on a BindingMap with the definitions
f [] = [] f (x:xs) = g x : h xs
g x = x + 1
h [] = [] h (x:xs) = x : f xs
i [] = [] i (x:xs) = x * 2 : i xs
would identify [f, g] and [i] as recursive groups, and g as non-recursive.