From c5910fd179d374f644ab3c843b243a51a7df9b24 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Apr 2015 00:38:29 -0400 Subject: removed all uses of undefined from code base It's a code smell, can lead to hard to diagnose error messages. --- Utility/DirWatcher.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Utility/DirWatcher.hs') diff --git a/Utility/DirWatcher.hs b/Utility/DirWatcher.hs index 3d3c14619..bde710626 100644 --- a/Utility/DirWatcher.hs +++ b/Utility/DirWatcher.hs @@ -57,7 +57,7 @@ eventsCoalesce = False #if (WITH_KQUEUE || WITH_FSEVENTS) eventsCoalesce = True #else -eventsCoalesce = undefined +eventsCoalesce = error "eventsCoalesce not defined" #endif #endif @@ -78,7 +78,7 @@ closingTracked = True #if WITH_KQUEUE closingTracked = False #else -closingTracked = undefined +closingTracked = error "closingTracked not defined" #endif #endif @@ -93,7 +93,7 @@ modifyTracked = True #if WITH_KQUEUE modifyTracked = False #else -modifyTracked = undefined +modifyTracked = error "modifyTracked not defined" #endif #endif @@ -131,7 +131,7 @@ watchDir dir prune scanevents hooks runstartup = #else type DirWatcherHandle = () watchDir :: FilePath -> Pruner -> Bool -> WatchHooks -> (IO () -> IO ()) -> IO DirWatcherHandle -watchDir = undefined +watchDir = error "watchDir not defined" #endif #endif #endif @@ -150,7 +150,7 @@ stopWatchDir = FSEvents.eventStreamDestroy #if WITH_WIN32NOTIFY stopWatchDir = Win32Notify.killWatchManager #else -stopWatchDir = undefined +stopWatchDir = error "stopWatchDir not defined" #endif #endif #endif -- cgit v1.2.3