curry.utility.curryname module

curry.utility.curryname.getModuleName(name, is_sourcefile)[source]

Interpret name as a modulename, removing the suffix from source files.

Raises:
  • ValueError – The name is a source file with the wrong suffix.

  • ModuleLookupError – An invalid module name was provided.

curry.utility.curryname.isLegalModulename(name)[source]
curry.utility.curryname.makeCurryPath(currypath)[source]

Validate the given Curry path and return it as a list. Each part of the supplied path will be interpreted as a string and converted to an absolute path.

Parameters:

currypath – A colon-delimited string or list of strings.

Returns:

A list of absolute paths.

curry.utility.curryname.prefixes(name, sep='.')[source]

Yields the prefixes of name, separated on sep.

Examples

‘Prelude’ yields ‘Prelude’. ‘Data.Maybe’, yields ‘Data’ followed by ‘Data.Maybe’.

curry.utility.curryname.removeSuffix(name, suffix)[source]
curry.utility.curryname.validateModulename(name)[source]