File: consts.h

package info (click to toggle)
haskell-file-location 0.4.9.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 112 kB
  • sloc: haskell: 282; ansic: 13; makefile: 2; sh: 1
file content (16 lines) | stat: -rw-r--r-- 667 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#define LOGLEVEL DEBUG
#define LOG_NAME "server"
#define LOG(p) liftIO . Log.logM LOG_NAME Log.p $ \
  (( __BASE_FILE__ ++ ":" ++ show ( __LINE__ :: Int ) ++ ":") ++)

#define _UNDEF error ( "UNDEFINED AT: " ++ __FILE__ ++ ":" ++ show (__LINE__ :: Int) )
#define _ERROR(msg) error ( "FATAL ERROR: " ++ msg ++ "AT: " ++ __FILE__ ++ ":" ++ show (__LINE__ :: Int) )
#define _THROW(e) Control.throwIO $ e $ "AT: " ++ __FILE__ ++ ":" ++ show ( __LINE__ :: Int)
#define _THROWS(e,s) (( LOG(ERROR) (show (e (s)) ) ) >> (Control.throwIO $ e $ (s) ++ " AT: " ++ __FILE__ ++":" ++ show ( __LINE__ :: Int) ))

#if GHC7
#define HAMLET hamlet
#else
#define HAMLET $hamlet
#endif