#NEWLINE# def ghci_package_db( cabal = None ) : #NEWLINE# #INDENT# if ( ( not cabal ) or ( cabal == 'cabal' ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# package_conf = ( filter ( ( lambda x : re . match ( 'packages-(.*)\\.conf' , x ) ) , os . listdir ( cabal ) ) + [ None ] ) [ 0 ] #NEWLINE# if package_conf : #NEWLINE# #INDENT# return os . path . join ( cabal , package_conf ) #NEWLINE# #UNINDENT# return None