Skip to content
Snippets Groups Projects
Commit 96d09440 authored by Oleg Grenrus's avatar Oleg Grenrus Committed by Alec Theriault
Browse files

Comment C, which clarifies why e.g. ReadP is not enough

parent 622ea3f4
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,13 @@ parseModuleHeader dflags pkgName str0 =
-- the value will be "this is a .. description" and the rest will begin
-- at "The module comment".
-- | 'C' is a 'Char' carrying its column.
--
-- This let us make an indentation-aware parser, as we know current indentation.
-- by looking at the next character in the stream ('curInd').
--
-- Thus we can munch all spaces but only not-spaces which are indented.
--
data C = C {-# UNPACK #-} !Int Char
newtype P a = P { unP :: [C] -> Maybe ([C], a) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment