#4324: Template Haskell: Splicing Infinite Syntax Tree doesn't stop
-------------------------------------------+--------------------------------
Reporter: guest | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Template Haskell | Version: 6.12.3
Resolution: invalid | Keywords: template haskell
splice loop
Testcase: | Blockedby:
Difficulty: | Os: MacOS X
Blocking: | Architecture: x86
Failure: Compile-time performance bug |
-------------------------------------------+--------------------------------
Changes (by shelarcy):
* cc: shela...@… (added)
Comment:
Replying to [comment:1 igloo]:
> That's the expected behaviour. The splice is a program that is run at
compile-time, so if it doesn't terminate then neither will compilation.
Really?
GHC can check infinite loop with no action when we use compiled program.
{{{
import Data.Function
main = fix id
}}}
{{{
$ ghc --make Test.hs
[1 of 1] Compiling Main ( Test.hs, Test.o )
Linking Test.exe ...
$ ./Test.exe
Test.exe: <<loop>>
}}}
But GHCi and Template Haskell does not.
{{{
Prelude Data.Function> fix id
}}}
So, Template Haskell doesn't report this error at compile time.
I think that it is the problem what guest want to fix.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4324#comment:2>
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