[英]How to see code of Monad Reader?
I am a beginner in Haskell, and I want to understand Reader Monad. 我是Haskell的初学者,我想了解Reader Monad。 I know how to use this monad.
我知道如何使用这个monad。 But I want to see the implementation of monad (particularly code of function "return").
但我希望看到monad的实现(特别是函数代码“return”)。 How can I see this code?
我怎么能看到这段代码?
I have downloaded the ghc source from here It contains the definition of all the base functions Then I open the folder in Sublime text editor which will index the source files. 我从这里下载了ghc源它包含了所有基本函数的定义然后我在Sublime文本编辑器中打开文件夹,它将索引源文件。 Then you can type
F12
on a function or Ctrl+Shift+F
to find the implementation. 然后,您可以在函数上键入
F12
,或者Ctrl+Shift+F
来查找实现。 You can jump back with Alt+-
. 你可以用
Alt+-
跳回来。
I actually downloaded many other Haskell libraries for easy reference. 我实际上下载了许多其他Haskell库以便于参考。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.