[GHC] #13046: TH Names can't be used in patterns
GHC
ghc-devs at haskell.org
Fri Dec 30 18:26:57 UTC 2016
#13046: TH Names can't be used in patterns
-------------------------------------+-------------------------------------
Reporter: Artyom.Kazak | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: GHC rejects
Unknown/Multiple | valid program
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Here's an example where I try to use a `Name` (with double ticks) as a
pattern:
{{{#!hs
{-# LANGUAGE TemplateHaskell #-}
foo :: Name -> ()
foo ''Int = ()
}}}
It fails with this error:
{{{#!text
test.hs:4:5-9: Parse error in pattern: ''Int
}}}
Seems like a bug to me (if we can compare `Name`s, why can't we pattern-
match on them?).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13046>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list