Recursive

Plain source file: base/lib/Recursive.hs (2002-10-23)

Recursive is imported by: DefinedNames, FreeNames, NameMaps, ReAssoc, ReAssocBase, ScopeNames, SyntaxRec, MapDeclM, RemoveListComp, RemoveListCompBase, SimpPatMatch, SimpPatMatchBase, Substitute, SubstituteBase, SubstituteBaseStruct, PropSyntaxStruct, RemoveListCompProp, SimpPatMatchProp, SubstituteProp.

module Recursive where

This module defines a general class for converting to/from a recursive type and its underlying structure.

class Rec rec struct | rec->struct where
  rec    :: struct -> rec
  struct :: rec    -> struct

  mapRec :: (struct->struct) -> rec -> rec
  mapRec f = rec . f . struct

Index

(HTML for this module was generated on 2006-08-12. About the conversion tool.)