isInfixOf is defined in the Data.List that comes with ghc-6.6,
but it is not in the libs that come with ghc-6.4.1.

>myIsInfixOfsrchlist=or(map(isPrefixOfsrch)(tailslist))

Parses ISO format datetimes, and also the variation that PostgreSQL uses.

>pgDatetimeToParts::String->(Int,Int,Int,Int,Int,Double,Int)>pgDatetimeToPartss=>let>predc=isAlphaNumc||c=='.'>ws=wordsBypreds>parts::[Int];parts=mapread(take5ws)>secs::Double;secs=read(ws!!5)>hasTZ=myIsInfixOf"+"s>tz::Int;tz=ifhasTZthenread(ws!!6)else0>isBC=myIsInfixOf"BC"s>-- It seems only PostgreSQL uses the AD/BC suffix.>-- If BC is present then we need to do something odd with the year.>year::Int;year=ifisBCthen(-((parts!!0)-1))elseparts!!0>in(year,(parts!!1),(parts!!2)>,(parts!!3),(parts!!4),secs,tz)