#4255: Give a civilised error (not seg fault) when using TH in a profiled 
compiler
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:  igloo       
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  Compiler          |      Version:  6.12.3      
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------
Changes (by simonpj):

  * owner:  => igloo


Comment:

 I think I've now done this
 {{{
 Mon Aug 23 14:33:53 BST 2010  [email protected]
   * The templateHaskellOk check should only run in stage2

   Because rtsIsProfiled is only available in stage2
 Shall I push this patch? (1/2)  [ynW...], or ? for more options: y
 Mon Aug 23 14:34:39 BST 2010  [email protected]
   * DPH should not even be built if GhcProfiled

   It's not just when cleaning!
 }}}
 Ian: can you add a test? (I'm not sure where to put it so that it'll run
 only when stage2 is profiled.)  An example is
 {{{
 {-# LANGUAGE TemplateHaskell #-}
 module Foo where

 f x = $([| x |])
 }}}
 which now gives
 {{{
 simo...@cam-04-unx:~/tmp$ ~/builds/HEAD-1/inplace/bin/ghc-stage2 -c
 T4255.hs
 ghc-stage2: T4255.hs:1:14-28: You can't use Template Haskell with a
 profiled compiler
 Usage: For basic information, try the `--help' option.
 }}}
 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4255#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to