[jhc] parse error on where with jhc

John Meacham john at repetae.net
Sat Aug 29 19:13:08 EDT 2009


On Sat, Aug 29, 2009 at 12:04:12PM -0400, David Roundy wrote:
> The following code gives a parse error on jhc:
> 
> configureFlagWithDefault :: String -> String -> String
>                          -> C () -> (String -> C ()) -> C FranchiseFlag
> configureFlagWithDefault n argname h defaultaction j =
>  do whenC amConfiguring $ addHook n defaultaction
>     return $ FF $ Option [] [n] (ReqArg (addHook n . j') argname) h
>     where j' v = do putV $ "handling configure flag --"++n++" "++v; j v
> 
> Evidently, jhc wants the where to be less indented than the do block.
> I've no idea how this compares with the language standard, but it
> certainly differs from ghc, so I thought it'd be worth mentioning.  Of
> course, it's not really a nice way to indent...

yeah, I have noticed this problem before too actually. I just
tried some simple fixes to the grammer, but that didn't seem to do it so
I am going to have to take a closer look at how the parser and lexer
interact to figure out what is wrong. Hmm...

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/


More information about the jhc mailing list