[GHC] #10382: Template Haskell (non-quasi) quotes should work with stage 1 compiler
GHC
ghc-devs at haskell.org
Tue Nov 24 02:20:09 UTC 2015
#10382: Template Haskell (non-quasi) quotes should work with stage 1 compiler
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: ezyang
Type: feature request | Status: closed
Priority: normal | Milestone: 8.0.1
Component: Template Haskell | Version: 7.11
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D876
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by osa1):
I was trying to update TH parts of user manual about which quotes can be
run by stage1 compiler, and on the way I found out that tests in `quotes/`
directory are currently not running under stage1.
I tried this:
- I run a test using top-level Makefile, e.g. `make TEST=T2632` in
`testsuite/`.
- I realized it's running using stage2 compiler. But the whole point of
moving these tests to a new directory was to test them using stage1
compiler.
- When I tried compiling the test using stage1 compiler(I copied the
command and replaced stage2 with stage1), it failed with this:
{{{
$ ./tests/quotes && "/home/omer/haskell/ghc/inplace/test spaces/ghc-
stage1" -c T2632.hs -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-
output -no-user-package-db -rtsopts -fno-warn-tabs -fno-warn-missed-
specialisations -fno-ghci-history -XTemplateHaskell -package template-
haskell
T2632.hs:10:9: error:
Can't find interface-file declaration for type constructor or class
DecsQ
Probable cause: bug in .hi-boot file, or inconsistent .hi file
Use -ddump-if-trace to get an idea of which file caused the error
In the expression: [d| func = 0 `op` 3 |]
In an equation for ‘decl1’: decl1 = [d| func = 0 `op` 3 |]
T2632.hs:12:9: error:
Can't find interface-file declaration for type constructor or class
DecsQ
Probable cause: bug in .hi-boot file, or inconsistent .hi file
Use -ddump-if-trace to get an idea of which file caused the error
In the expression:
[d| op x y = x
func = 0 `op` 3 |]
In an equation for ‘decl2’:
decl2
= [d| op x y = x
func = 0 `op` 3 |]
}}}
I also tried the same thing on some manually created simple TH code and
they all failed with same error. It seems like there's a bug somewhere.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10382#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list