+
+instance DCT.Configured Priority where
+ -- | This allows us to read a Priority level out of a Configurator
+ -- config file. By default Configurator wouldn't know what to do,
+ -- so we have to tell it that we expect one of the valid Priority
+ -- constructors.
+ convert (DCT.String "INFO") = Just INFO
+ convert (DCT.String "WARNING") = Just WARNING
+ convert (DCT.String "ERROR") = Just ERROR
+ convert _ = Nothing
+
+
+-- | Obtain an OptionalConfiguration from htsnrc in either the global
+-- configuration directory or the user's home directory. The one in
+-- $HOME is prefixed by a dot so that it is hidden.
+--
+-- We make an attempt at cross-platform compatibility; we will try
+-- to find the correct directory even on Windows. But if the calls
+-- to getHomeDirectory/getSysconfDir fail for whatever reason, we
+-- fall back to using the Unix-specific /etc and $HOME.
+--