Commit 932886e2 authored by Vaibhav Sagar's avatar Vaibhav Sagar

Update src/IHaskell/Eval/Info.hs

parent 1809f8c2
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
{-# LANGUAGE CPP, NoImplicitPrelude, OverloadedStrings #-}
{- | Description : Inspect type and function information and documentation. -}
module IHaskell.Eval.Info (info) where
......@@ -19,7 +19,11 @@ import Exception
info :: String -> Interpreter String
info name = ghandle handler $ do
dflags <- getSessionDynFlags
#if MIN_VERSION_ghc(8,2,0)
result <- exprType TM_Inst name
#else
result <- exprType name
#endif
return $ typeCleaner $ showPpr dflags result
where
handler :: SomeException -> Interpreter String
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment