diff options
author | Bodigrim <andrew.lelechenko@gmail.com> | 2022-12-18 02:27:47 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-20 21:16:37 -0500 |
commit | 5d96fd5060958238d5b5c98f14a8b9221c87df93 (patch) | |
tree | b7aaf8832158d93dc82d0125ce770cbefb0fa39a /compiler/GHC/Runtime/Eval.hs | |
parent | 666d0ba72b946721a900ff3e803d4b73879c8fbf (diff) | |
download | haskell-5d96fd5060958238d5b5c98f14a8b9221c87df93.tar.gz |
Make GHC.Driver.Main.hscTcRnLookupRdrName to return NonEmpty
Diffstat (limited to 'compiler/GHC/Runtime/Eval.hs')
-rw-r--r-- | compiler/GHC/Runtime/Eval.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Runtime/Eval.hs b/compiler/GHC/Runtime/Eval.hs index 0b62544433..74eba30421 100644 --- a/compiler/GHC/Runtime/Eval.hs +++ b/compiler/GHC/Runtime/Eval.hs @@ -121,6 +121,7 @@ import Data.Either import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.List (find,intercalate) +import Data.List.NonEmpty (NonEmpty) import Control.Monad import Control.Monad.Catch as MC import Data.Array @@ -903,7 +904,7 @@ getRdrNamesInScope = withSession $ \hsc_env -> do -- | Parses a string as an identifier, and returns the list of 'Name's that -- the identifier can refer to in the current interactive context. -parseName :: GhcMonad m => String -> m [Name] +parseName :: GhcMonad m => String -> m (NonEmpty Name) parseName str = withSession $ \hsc_env -> liftIO $ do { lrdr_name <- hscParseIdentifier hsc_env str ; hscTcRnLookupRdrName hsc_env lrdr_name } |