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
Compiler time errors for fun a profit
Jeff P. Burdges (Weasel) Fri, 29 Aug 1997 06:21:03 -0400 (EDT)