[Haskell-cafe] A Tool To Show Functions Relationship?

Dimitry Golubovsky golubovsky at gmail.com
Mon Jun 6 10:30:04 EDT 2005

Does there exist a tool which given a Haskell source, shows functions
that are mutually recursive (i. e. call each other, even via calling
third, etc. functions)? Knowledge of that would help to split the
module into smaller modules without risk to create recursive modules.

For example (slightly artificial, from a parsec-based C syntax parser):

declarator = 
  try (do ps <- pointer
          id <- idd
          cp <- many cpi
          return (Declarator ps id cp))
  <?> "declarator"

idd = 
  try (do s <- anyIdString
          return (Left s))
  try (do tkOp "("
          d <- declarator
          tkOp ")"
          return (Right d))
  <?> "idd"

`declarator' and `idd' are mutually recursive, so placing them into
different modules would create recursive modules.
Dimitry Golubovsky

Anywhere on the Web

More information about the Haskell-Cafe mailing list