Two addenda. I added > value::RetVal () a -> a which extracts the return value from a RetVal in a typesafe manner. Also, I figured out that exceptions work well with layout so that they form a column of exception annotations on the right hand side of the actual code. Does anyone on the list know how to modify the haskell emacs mode so that tabbing automatically aligns the exceptions column? > multiType5 x y = value $ res ++= handleLocal > where > res= show <<$ addThree << (return 1.0) <<= > (loo x) ++= handleLoo <<= > (foo (x+1) y) ++= handleFoo > addThree x y z = x + y + z > handleFoo (InfiniteBlahException x y) = throw Stupid > handleFoo SomeOtherException = return 2.4 > handleLoo LooException = throw Dumb > handleLocal Stupid = return "blah" > handleLocal x = throw Dumb -Alex- PS the type inconsistency in the last mail was an error in function names PPS the reason I am doing this is to support reliable HTTP server/CGI code. ___________________________________________________________________ S. Alexander Jacobson i2x Media 1-212-697-0184 voice 1-212-697-1427 fax