[GHC] #13778: explicitly bidirectional patterns should not report Recursive definition" when used in view pattern expression position
GHC
ghc-devs at haskell.org
Fri Jun 2 11:31:46 UTC 2017
#13778: explicitly bidirectional patterns should not report Recursive definition"
when used in view pattern expression position
-------------------------------------+-------------------------------------
Reporter: heisenbug | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.3
Keywords: | Operating System: Unknown/Multiple
PatternSynonyms |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Compile this
{{{#!hs
pattern One <- ((==One) -> True)
where One = 1
}}}
I get
{{{
test.hs:1:1: error:
Recursive pattern synonym definition with following bindings:
One (defined at test.hs:(1,1)-(1,15))
|
Compilation failed.
}}}
Note that the error is due to the usage in view pattern **expression
position**.
But for ''explicitly bidirectional'' patterns, there is no recursivity
going on. So this usage should be allowed.
I am testing with HEAD, but the issue is probably older.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13778>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list