| 'pattern' pattern_synonym_lhs '<-' pat_syn_pat where_decls
{% do { let (name, args, as) = $2
; mg <- mkPatSynMatchGroup name $51 }
is turned into
do { let (name, args, as) = $2
; mg <- mkPatSynMatchGroup name $51 }
instead of
do { let (name, args, as) = $2
; mg <- mkPatSynMatchGroup name $51 }
That is, try and trim a whitespace prefix from subsequent lines that corresponds to the alignment of {%.
I think we can make code blocks entirely insensitive to indentation by wrapping them in do{...}. Example:
x :: Int
x = do{ 42 } -- works on pure expressions as well
-- code block: {%do putStrLn "this is the"
-- putStrLn "code block"}
main = do
putStrLn "hi"
do{
do putStrLn "this is the"
putStrLn "code block"}
putStrLn "end"
Motivated by https://github.com/haskell/happy/issues/303, I think we should offer a command-line flag such that a code block
is turned into
instead of
That is, try and trim a whitespace prefix from subsequent lines that corresponds to the alignment of
{%
.I think we can make code blocks entirely insensitive to indentation by wrapping them in
do{...}
. Example: