我可以从 GHCi 中找到 GHC 版本吗?

问题描述

λ> 

我在 GHCi 中输入什么来发现它使用的是哪个 GHC 版本?

解决方法

> import System.Info
> :browse
arch :: String
compilerName :: String
compilerVersion :: Data.Version.Version
os :: String
> compilerVersion
Version {versionBranch = [8,10],versionTags = []}
> compilerName
"ghc"

最重要的是,GHCi 在启动时打印其版本:

GHCi,version 8.10.3: https://www.haskell.org/ghc/  :? for help