Module ICurry.FindAllImports

Extract import-directives from Curry sources without completely parsing them This is meant to be a much faster (although not completely correct) method to just get this small piece of information

Author: Marc Andre Wittorf

Summary of exported operations:

findAllImports :: String -> [String]   

Find all import directives in a module

Adds implicit Prelude

findModuleName :: String -> Maybe String   
Find the name of a module from its contents

Exported operations:

findAllImports :: String -> [String]   

Find all import directives in a module

Adds implicit Prelude

Example call:
(findAllImports p)
Parameters:
  • p : the module text
Returns:
names of all imported modules

findModuleName :: String -> Maybe String   

Find the name of a module from its contents

Example call:
(findModuleName p)
Parameters:
  • p : the module's contents
Returns:
the module name, if it can be determined