GHC.Base
的来源在开头有说明部分
The overall structure of the GHC Prelude is a bit tricky...
So the rough structure is as follows, in (linearised) dependency order
GHC.Prim Has no implementation. It defines built-in things, and
by importing it you bring them into scope.
The source file is GHC.Prim.hi-boot, which is just
copied to make GHC.Prim.hi
GHC.Base Classes: Eq, Ord, Functor, Monad
Types: list, (), Int, Bool, Ordering, Char, String
但是,虽然在该源文件中定义了Ordering
,但Ord
却没有。 Prelude doc页面没有Ord
的源链接。实际定义在哪里?