#8840: standalone 'let' in do notation does not parse
------------------------------------+-------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
When describing to a friend "do notation" syntactic
equivalence some days ago I picked the following example:
{{{
-- valid for ghc
main = do let z = 1
print z
}}}
and tried to make it one-line for lambdabot:
{{{
-- seems to be allowed explicitly by the spec
--
http://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-470003.14
main = do { let z = 1; print z }
}}}
Bug neither ghc-7.6.3 nor ghc-7.8.1-rc2 seem to accept it as valid:
{{{
[1 of 1] Compiling Main ( a.hs, a.o )
a.hs:1:32: parse error on input ‘}’
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8840>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#5273: error and undefined should print a location
-------------------------------------+------------------------------------
Reporter: augustss | Owner:
Type: feature request | Status: new
Priority: low | Milestone: 7.6.2
Component: Compiler | Version: 7.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Changes (by MikolajKonarski):
* difficulty: => Unknown
Comment:
While we are at it, adding source position information to Debug.trace & Co
would be very useful too (how often did you write 'trace "1" ... trace
"2"', etc.?). This is done (in a hacky way, by passing assert as an
argument) in the package loch from 2007, together with hacks for 'error'
and exceptions. BTW, some support for locations in exceptions, without the
need to profile for stack traces, would be very valuable too. Perhaps
something can be done cheaply? Even just one random location sometimes?
This is all needed by people for years, because at least 3 packages
contain relevant basic hacks (in addition to other stuff):
http://hackage.haskell.org/package/lochhttp://hackage.haskell.org/package/assert-failurehttp://hackage.haskell.org/package/assert
plus there are some more that use TH for that. *shudder*
Thank you in advance!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5273#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler