Terminology

Project

A project is a self-contained collection of Haskell modules that are to be processed together by Programatica and the refactorer. A New project can be created and Haskell modules can be added to it from the Haskell refactorer interface.

Chase

Look for imported modules in given files/directories by Programatica.

Binding Structure

Binding structure refers to the association of uses of identifiers with their definitions in a program. The binding structure is determined by the scope of the identifiers.

Generative fold

Folding in the style of Burstall and Darlington, which aims to generates a new recursive definition of a function or constant. 

Fold

Replace an instance of the right hand side of a definition by the corresponding left hand side.

Complex Function Definition

A function definition is complex if it has pattern guards or any formal parameters that are not single variables.

Simple Function Definition

A function definition which is not complex (see above).

Simple Pattern Binding

A pattern binding is simple if the pattern consists of only a single variable (note: this excludes a single constant, or a single pattern such as (x,y)).

Complex Pattern Binding

A pattern binding which is not simple (see above).

Name Capture

Name capture occurs when an identifier that should be free in a scope becomes bound because of the declaration of the same identifier name across nested scopes.

 For instance, in the example

   g y = f y + 3
      where
      h z = z+1

renaming h to f will capture the use of free variable f in the definition of g.

Name Clash

Name Clash refers to the situation in which the same name has been declared more than once in the same module and scope.

 For instance, in the example

   g y = f y + 3
      where
      f z = z+1
   g x y = x + y

there is a name clash as the same identifier g has been defined twice.

Conflicting exports

There is a conflict in the export list if more than one entity has the same unqualified name.

For instance, in the example

module A                 module B (A.g, g)
g y = f y + 3            import qualified A
                         g x y = x + y

There is a conflict in the export list of module B, since when B is imported, the bindings A.g and g are both a variable as g and B.g, but no longer a A.g.

Ambiguity

Ambiguity occurs when the compiler can't decide which entity a top-level identifier refers to, as more than one entity associated with this identifier is in scope.

For instance, in the example

module A                       module B
h y = y + 3                    import A                  
                               g y = f y + 3
                               f y = y + 1

Renaming the identifier h in module A to f would make the highlighted occurrence of f ambiguous, as it could refer to either the f defined in module B or the f defined in module A. Ambiguity can be fixed by replacing unqualified names by qualified names. In the example, the highlighted occurrence of f can be replaced by B.f.