From 1a8020774e085b08d82db039ecd64ff71ad6b393 Mon Sep 17 00:00:00 2001 From: Nicolas Rolland Date: Sat, 31 Oct 2015 18:22:05 +0100 Subject: [PATCH] adding Get logging level --- Language/Haskell/GhcMod/Logging.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Language/Haskell/GhcMod/Logging.hs b/Language/Haskell/GhcMod/Logging.hs index edc4135..2ac76c3 100644 --- a/Language/Haskell/GhcMod/Logging.hs +++ b/Language/Haskell/GhcMod/Logging.hs @@ -45,6 +45,11 @@ gmSetLogLevel :: GmLog m => GmLogLevel -> m () gmSetLogLevel level = 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 level = gmlJournal $ GhcModLog Nothing (Last (Just level)) []