mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-19 12:56:08 +00:00
Update src/IHaskell/Eval/Info.hs
This commit is contained in:
parent
1809f8c2c0
commit
932886e218
@ -1,4 +1,4 @@
|
||||
{-# 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user