Re: #4316: Getting the lexer state to check for "AlternativeLayoutMode"

2010-10-19 Thread Simon Marlow
On 18/10/2010 05:53, Vivian McPhail wrote: On 18 October 2010 15:37, Vivian McPhail mailto:haskell.vivian.mcph...@gmail.com>> wrote: Hi, In attempting to use the lexer to see whether we are within an alternative layout context: [..] I have a function which tells us if there

Re: #4316: Getting the lexer state to check for "AlternativeLayoutMode"

2010-10-17 Thread Vivian McPhail
On 18 October 2010 15:37, Vivian McPhail wrote: > Hi, > > In attempting to use the lexer to see whether we are within an alternative > layout context: > > [..] > > I have a function which tells us if there is layout going on: > > activeContext :: P Bool > activeContext = do > ctxt <- getALRCont

#4316: Getting the lexer state to check for "AlternativeLayoutMode"

2010-10-17 Thread Vivian McPhail
Hi, In attempting to use the lexer to see whether we are within an alternative layout context: ALR: True means that we are "Alternative Layout Mode" which happens when we run the lexer. The False instances are from when the parser runs (after we have done our checking). Prelude Control.Monad.S