I’m trying to find the actual Implementation of so called “List” data type in the GHC.
What I found are the following two places.
Here you can find it by searching (Ctrl + F) for data [] a = [] | a : [a]
.
Nearby the above code line, it says that “NB: lists are built-in syntax, and hence not explicitly exported”, which seems to suggests that the actual implementation is implemented somewhere else where built-in syntaxes are implemented, but I could not find it.
Here you can find it by searching (Ctrl + F) for data [] a = MkNil
.
Nearby the above code line, it says that “-- for use when compiling GHC.Base itself doesn’t work”, which seems to suggest that this also is not the actual implementation.
Where can I find the original actual source code implementation of List?