[GHC] #8459: Role of TExp
GHC
ghc-devs at haskell.org
Tue Oct 22 07:55:25 UTC 2013
#8459: Role of TExp
-------------------------------+-------------------------------------------
Reporter: monoidal | Owner: monoidal
Type: bug | Status: new
Priority: normal | Milestone:
Component: Template | Version: 7.7
Haskell | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Easy (less than 1 hour)
Unknown/Multiple | Blocked By:
Type of failure: Other | Related Tickets:
Test Case: |
Blocking: |
-------------------------------+-------------------------------------------
Comment (by simonpj):
Richard is right. Consider
{{{
e :: TExp Age
e = MkAge 3
foo = $(coerce e) + 4::Int
}}}
The splice will evaluate to `(MkAge 3)` and you can't add that to
`4::Int`. So you can't `coerce` a `(TExp Age)` to a `(TExp Int)`.
Nominal! I'll change it, via a role signature in `TH.Syntax`.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8459#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list