adding Get logging level

This commit is contained in:
Nicolas Rolland 2015-10-31 18:22:05 +01:00
parent d0ea69b61b
commit 1a8020774e

View File

@ -45,6 +45,11 @@ gmSetLogLevel :: GmLog m => GmLogLevel -> m ()
gmSetLogLevel level = gmSetLogLevel level =
gmlJournal $ GhcModLog (Just level) (Last Nothing) [] gmlJournal $ GhcModLog (Just level) (Last Nothing) []
gmGetLogLevel :: forall m. GmLog m => m GmLogLevel
gmGetLogLevel = do
GhcModLog { gmLogLevel = Just level } <- gmlHistory
return level
gmSetDumpLevel :: GmLog m => Bool -> m () gmSetDumpLevel :: GmLog m => Bool -> m ()
gmSetDumpLevel level = gmSetDumpLevel level =
gmlJournal $ GhcModLog Nothing (Last (Just level)) [] gmlJournal $ GhcModLog Nothing (Last (Just level)) []