[GHC] #8081: let form in do block requires in?

GHC ghc-devs at haskell.org
Mon Jul 22 06:47:02 CEST 2013


#8081: let form in do block requires in?
----------------------------+----------------------------------------------
       Reporter:  dsamperi  |             Owner:
           Type:  bug       |            Status:  new
       Priority:  normal    |         Milestone:
      Component:  Compiler  |           Version:  7.6.3
       Keywords:            |  Operating System:  Linux
   Architecture:  x86_64    |   Type of failure:  GHC rejects valid program
  (amd64)                   |         Test Case:
     Difficulty:  Unknown   |          Blocking:
     Blocked By:            |
Related Tickets:            |
----------------------------+----------------------------------------------
 According to the 2010 Haskell spec the following should be equivalent:
 do1 = do { let x = 3.14 ; return x }
 and
 do2 = let x = 3.14 in do { return x }

 But ghc 7.6.3 chokes on the first (do1) with "parse error on input '}'"
 On the other hand, if I use layout and set
 do3 = do
   let x = 3.14
   return x

 there is no problem. Also, the compiler doesn't complain if I insert
 "in" in place of the semicolon in do1 (but this doesn't seem to
 follow the spec).

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8081>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list