+
+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 the file ".htsnrc" in the
+-- user's home directory.
+--
+-- We make an attempt at cross-platform compatibility; we will try
+-- to find the correct directory even on Windows. But if the call
+-- to getHomeDirectory fails for whatever reason, we fall back to
+-- using the environment variable $HOME.
+--