Is there a way to get Haskell give an arbitrary user defined compile time
error?  For example
  if true then 0 else ERROR "Fix the source!"
would return 0, but
  if false then 0 else ERROR "Fix the source!"
would give a compile time (not runtime) error and print the text.  The
reason is that for ``compiler'' functions (like say a search engine
--- String -> String -> Int  where the first String is a regex) it would
beat having to delay the errors until runtime if the first argument
guaranteed that there would always be a syntax error (from the search
engine's point of view) in the regex.

Thanks..
Jeff



Reply via email to