[GHC] #8581: Add support for explicitly-bidirectional pattern synonyms
GHC
ghc-devs at haskell.org
Fri Aug 22 09:17:28 UTC 2014
#8581: Add support for explicitly-bidirectional pattern synonyms
-------------------------------------+-------------------------------------
Reporter: cactus | Owner: cactus
Type: feature | Status: closed
request | Milestone: 7.10.1
Priority: normal | Version:
Component: Compiler | Keywords:
Resolution: fixed | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By: 5144
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by mpickering):
That is exactly what I mean, thank you for taking the time to clarify
my comment. To once again be more specific, the code example I posted
fails to type check with the following error message.
{{{
fix.hs:27:14:
Could not deduce (Construct a) arising from a use of ‘construct’
from the context (View a)
bound by the type signature for Main.$WAdd :: View a => a -> a -> a
at fix.hs:1:1
Possible fix:
add (Construct a) to the context of
the type signature for Main.$WAdd :: View a => a -> a -> a
In the expression: (construct (AddF a b))
In an equation for ‘$WAdd’: $WAdd a b = (construct (AddF a b))
fix.hs:30:12:
Could not deduce (Construct a) arising from a use of ‘construct’
from the context (View a)
bound by the type signature for Main.$WNum :: View a => Int -> a
at fix.hs:1:1
Possible fix:
add (Construct a) to the context of
the type signature for Main.$WNum :: View a => Int -> a
In the expression: (construct (NumF n))
In an equation for ‘$WNum’: $WNum n = (construct (NumF n))
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8581#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list