#3645: Layout and pragmas
--------------------------------+-------------------------------------------
  Reporter:  igloo              |          Owner:                  
      Type:  feature request    |         Status:  new             
  Priority:  normal             |      Milestone:  7.2.1           
 Component:  Compiler (Parser)  |        Version:  6.10.4          
Resolution:                     |       Keywords:                  
  Testcase:                     |      Blockedby:                  
Difficulty:  Unknown            |             Os:  Unknown/Multiple
  Blocking:                     |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown       |  
--------------------------------+-------------------------------------------
Changes (by igloo):

  * status:  patch => new


Comment:

 I'm not sure what the spec is.

 Should this be rejected (as the `#-}` starts a new decl)?
 {{{
 foo = 'a'

 {-# INLINE bar
 #-}
 bar = 'b'
 }}}

 Should this be rejected (as the `{-#` decl doesn't have the correct
 indentation)?
 {{{
 foo = 'a'

    {-# INLINE bar #-}
 bar = 'b'
 }}}

 The `INLINE` pragma looks like a declaration, but the `SCC` pragma looks
 like an expression, so how about this?:
 {{{
 foo = {-# SCC bar
 #-} 'a'
 }}}
 ?

 Should the layout rule apply to the `LANGUAGE` pragma in any way? I assume
 not, as we haven't had the `where` from the `module` line yet.

 IMO, the particular bug in this ticket is that GHC thinks it is doing
 implicit layout, when it shouldn't be.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3645#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to