X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fprelude%2FGHCerr.hs;fp=ghc%2Flib%2Fprelude%2FGHCerr.hs;h=0000000000000000000000000000000000000000;hb=b437dc065099e891083dde8549e06d824461e2d2;hp=202fee26beae1e61a4fba7f1f4aefc03cc5a945e;hpb=8fe90ccbca78fe4c00537f1679a7106b4ed14454;p=ghc-hetmet.git diff --git a/ghc/lib/prelude/GHCerr.hs b/ghc/lib/prelude/GHCerr.hs deleted file mode 100644 index 202fee2..0000000 --- a/ghc/lib/prelude/GHCerr.hs +++ /dev/null @@ -1,66 +0,0 @@ -{- The GHCerr module defines the code for the - wired-in error functions, which have a special - type in the compiler (with "open tyvars"). - - We cannot define these functions in a module where they might be - used (e.g., GHCbase), because the magical wired-in type will get - confused with what the typechecker figures out. --} -module GHCerr where - -import GHCbase (error__) - ---------------------------------------------------------------- --- HACK: Magic unfoldings not implemented for unboxed lists --- Need to define a "build" to avoid undefined symbol --- in this module to avoid .hi proliferation. - -build = error "GHCbase.build" -augment = error "GHCbase.augment" ---{-# GENERATE_SPECS build a #-} ---build :: ((a -> [a] -> [a]) -> [a] -> [a]) -> [a] ---build g = g (:) [] - - ---------------------------------------------------------------- -cannon_fodder_to_avoid_empty__versions__ = (1::Int) - --- Used for compiler-generated error message; --- encoding saves bytes of string junk. - -absentErr, parError :: a -irrefutPatError - , noDefaultMethodError - , noExplicitMethodError - , nonExhaustiveGuardsError - , patError - , recConError - , recUpdError :: String -> a - -absentErr = error "Oops! The program has entered an `absent' argument!\n" -parError = error "Oops! Entered GHCbase.parError (a GHC bug -- please report it!)\n" - -noDefaultMethodError s = error ("noDefaultMethodError:"++s) -noExplicitMethodError s = error ("noExplicitMethodError:"++s) - -irrefutPatError s = patError__ (untangle s "irrefutable pattern") -nonExhaustiveGuardsError s = patError__ (untangle s "non-exhaustive guards") -patError s = patError__ (untangle s "pattern-matching") - -patError__ = error__ (\ x -> _ccall_ PatErrorHdrHook x) - -recConError s = error (untangle s "record constructor") -recUpdError s = error (untangle s "record update") - -untangle coded in_str - = "In " ++ in_str - ++ (if null msg then "" else (": " ++ msg)) - ++ "; at " ++ file - ++ ", line " ++ line - ++ "\n" - where - (file,line,msg) - = case (span not_bar coded) of { (f, (_:rest)) -> - case (span not_bar rest) of { (l, (_:m)) -> - (f,l,m) }} - not_bar c = c /= '|'