Database interface - would like advice on oracle library bind ing

Keith Wansbrough Keith.Wansbrough at cl.cam.ac.uk
Wed Sep 24 12:11:44 EDT 2003


> > Here's another: ...
> >     Make getInt (and friends) behave differently depending on the mode
> >     of the cursor they're passed: either allocate a buffer and return
> >     _|_, decode and return the current column of the current row, or
> >     free a buffer and return _|_.
> 
> Not wanting to sound too dumb, but how do you return _|_ ?

Return

  undefined

or better,

  error "Erroneously demanded bottom result of buffer allocation phase"

Note that

  undefined :: a
  undefined = undefined

  error :: String -> a
  {- defined internally -}

HTH.

--KW 8-)
  
-- 
Keith Wansbrough <kw217 at cl.cam.ac.uk>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.



More information about the Haskell-Cafe mailing list