GHC 7.0.1 (or very strange dimensional-0.8.0.1) bug

Jeremy Shaw jeremy at n-heptane.com
Tue Jan 25 20:35:26 CET 2011


There is a weird type-checking bug in 7.0.1 that causes loopy behavior:

http://hackage.haskell.org/trac/ghc/ticket/4809

Not sure if that is what is happening to you or not. Though in my  
experience it did not actually print <<loop>>, it just hung.

- jeremy

On Jan 25, 2011, at 10:48 AM, Pavel Perikov wrote:

>
> On 25.01.2011, at 18:37, Bjorn Buckwalter wrote:
>> (I
>> suspect the type inferencer is looping), but maybe you've figured out
>> something workable for you already.
>
> I told you I'm exhausted right now, didn't I? :) This is definitely  
> not type inferencer. The bug causes compiled program looping. And I  
> have at least one case when let-trick fixes the behavior in compiled  
> program.
>
> Pavel.
>
>
>>
>> Thanks,
>> Bjorn
>>
>> (Sorry for the re-repost, Pavel, my incompetence is matched only by  
>> my
>> perseverance.)
>>
>>
>> On Tue, Jan 25, 2011 at 22:02, Pavel Perikov <perikov at gmail.com>  
>> wrote:
>>> in ghci:
>>> Prelude> import Numeric.Units.Dimensional.Prelude as D
>>> Prelude Numeric.Units.Dimensional.Prelude> D.sqrt $ let s = 9 *~  
>>> (meter D.*
>>> meter) in s
>>> 3.0 m
>>> Prelude Numeric.Units.Dimensional.Prelude> D.sqrt $ 9 *~ (meter  
>>> D.* meter)
>>> ghci hangs.
>>> complied and optimized code detects <<loop>> and let-trick from  
>>> the above
>>> does not help.
>>> Here's the complete ghci -v session which contains all package  
>>> versions
>>>
>>> ghci -v
>>> GHCi, version 7.0.1: http://www.haskell.org/ghc/  :? for help
>>> Glasgow Haskell Compiler, Version 7.0.1, for Haskell 98, stage 2  
>>> booted by
>>> GHC version 6.12.3
>>> Using binary package database:
>>> /Library/Frameworks/GHC.framework/Versions/7.0.1-i386/usr/lib/ 
>>> ghc-7.0.1/package.conf.d/package.cache
>>> Using binary package database:
>>> /Users/pavel/.ghc/i386-darwin-7.0.1/package.conf.d/package.cache
>>> hiding package containers-0.3.0.0 to avoid conflict with later  
>>> version
>>> containers-0.4.0.0
>>> hiding package QuickCheck-2.3.0.2 to avoid conflict with later  
>>> version
>>> QuickCheck-2.4.0.1
>>> wired-in package ghc-prim mapped to
>>> ghc-prim-0.2.0.0-0713122c5f9038c6f0355a37e294e054
>>> wired-in package integer-gmp mapped to
>>> integer-gmp-0.2.0.2-bfb191b8468e4d812a2bb92622cb246e
>>> wired-in package base mapped to
>>> base-4.3.0.0-1ea085b64a078bd9d5eaa9d8d525e35e
>>> wired-in package rts mapped to builtin_rts
>>> wired-in package template-haskell mapped to
>>> template-haskell-2.5.0.0-f262af1f92a427f5cf4133bff041044f
>>> wired-in package dph-seq not found.
>>> wired-in package dph-par not found.
>>> Hsc static flags: -static
>>> Loading package ghc-prim ... linking ... done.
>>> Loading package integer-gmp ... linking ... done.
>>> Loading package base ... linking ... done.
>>> Loading package ffi-1.0 ... linking ... done.
>>> Prelude> import Numeric.Units.Dimensional.Prelude as D
>>> hiding package containers-0.3.0.0 to avoid conflict with later  
>>> version
>>> containers-0.4.0.0
>>> hiding package QuickCheck-2.3.0.2 to avoid conflict with later  
>>> version
>>> QuickCheck-2.4.0.1
>>> wired-in package ghc-prim mapped to
>>> ghc-prim-0.2.0.0-0713122c5f9038c6f0355a37e294e054
>>> wired-in package integer-gmp mapped to
>>> integer-gmp-0.2.0.2-bfb191b8468e4d812a2bb92622cb246e
>>> wired-in package base mapped to
>>> base-4.3.0.0-1ea085b64a078bd9d5eaa9d8d525e35e
>>> wired-in package rts mapped to builtin_rts
>>> wired-in package template-haskell mapped to
>>> template-haskell-2.5.0.0-f262af1f92a427f5cf4133bff041044f
>>> wired-in package dph-seq not found.
>>> wired-in package dph-par not found.
>>> *** Parser:
>>> hiding package containers-0.3.0.0 to avoid conflict with later  
>>> version
>>> containers-0.4.0.0
>>> hiding package QuickCheck-2.3.0.2 to avoid conflict with later  
>>> version
>>> QuickCheck-2.4.0.1
>>> wired-in package ghc-prim mapped to
>>> ghc-prim-0.2.0.0-0713122c5f9038c6f0355a37e294e054
>>> wired-in package integer-gmp mapped to
>>> integer-gmp-0.2.0.2-bfb191b8468e4d812a2bb92622cb246e
>>> wired-in package base mapped to
>>> base-4.3.0.0-1ea085b64a078bd9d5eaa9d8d525e35e
>>> wired-in package rts mapped to builtin_rts
>>> wired-in package template-haskell mapped to
>>> template-haskell-2.5.0.0-f262af1f92a427f5cf4133bff041044f
>>> wired-in package dph-seq not found.
>>> wired-in package dph-par not found.
>>> Prelude Numeric.Units.Dimensional.Prelude> D.sqrt $ let s = 9 *~  
>>> (meter D.*
>>> meter) in s
>>> hiding package containers-0.3.0.0 to avoid conflict with later  
>>> version
>>> containers-0.4.0.0
>>> hiding package QuickCheck-2.3.0.2 to avoid conflict with later  
>>> version
>>> QuickCheck-2.4.0.1
>>> wired-in package ghc-prim mapped to
>>> ghc-prim-0.2.0.0-0713122c5f9038c6f0355a37e294e054
>>> wired-in package integer-gmp mapped to
>>> integer-gmp-0.2.0.2-bfb191b8468e4d812a2bb92622cb246e
>>> wired-in package base mapped to
>>> base-4.3.0.0-1ea085b64a078bd9d5eaa9d8d525e35e
>>> wired-in package rts mapped to builtin_rts
>>> wired-in package template-haskell mapped to
>>> template-haskell-2.5.0.0-f262af1f92a427f5cf4133bff041044f
>>> wired-in package dph-seq not found.
>>> wired-in package dph-par not found.
>>> *** Parser:
>>> *** Desugar:
>>> *** Simplify:
>>> *** CorePrep:
>>> *** ByteCodeGen:
>>> Loading package old-locale-1.0.0.2 ... linking ... done.
>>> Loading package time-1.2.0.3 ... linking ... done.
>>> Loading package numtype-1.0 ... linking ... done.
>>> Loading package dimensional-0.8.0.1 ... linking ... done.
>>> 3.0 m
>>> hiding package containers-0.3.0.0 to avoid conflict with later  
>>> version
>>> containers-0.4.0.0
>>> hiding package QuickCheck-2.3.0.2 to avoid conflict with later  
>>> version
>>> QuickCheck-2.4.0.1
>>> wired-in package ghc-prim mapped to
>>> ghc-prim-0.2.0.0-0713122c5f9038c6f0355a37e294e054
>>> wired-in package integer-gmp mapped to
>>> integer-gmp-0.2.0.2-bfb191b8468e4d812a2bb92622cb246e
>>> wired-in package base mapped to
>>> base-4.3.0.0-1ea085b64a078bd9d5eaa9d8d525e35e
>>> wired-in package rts mapped to builtin_rts
>>> wired-in package template-haskell mapped to
>>> template-haskell-2.5.0.0-f262af1f92a427f5cf4133bff041044f
>>> wired-in package dph-seq not found.
>>> wired-in package dph-par not found.
>>> Prelude Numeric.Units.Dimensional.Prelude> D.sqrt $ 9 *~ (meter  
>>> D.* meter)
>>> hiding package containers-0.3.0.0 to avoid conflict with later  
>>> version
>>> containers-0.4.0.0
>>> hiding package QuickCheck-2.3.0.2 to avoid conflict with later  
>>> version
>>> QuickCheck-2.4.0.1
>>> wired-in package ghc-prim mapped to
>>> ghc-prim-0.2.0.0-0713122c5f9038c6f0355a37e294e054
>>> wired-in package integer-gmp mapped to
>>> integer-gmp-0.2.0.2-bfb191b8468e4d812a2bb92622cb246e
>>> wired-in package base mapped to
>>> base-4.3.0.0-1ea085b64a078bd9d5eaa9d8d525e35e
>>> wired-in package rts mapped to builtin_rts
>>> wired-in package template-haskell mapped to
>>> template-haskell-2.5.0.0-f262af1f92a427f5cf4133bff041044f
>>> wired-in package dph-seq not found.
>>> wired-in package dph-par not found.
>>> *** Parser:
>>> *** Desugar:
>>> *** Simplify:
>>> *** CorePrep:
>>> *** ByteCodeGen:
>>> HANG!
>>>
>>>
>
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20110125/875979d8/attachment-0001.htm>


More information about the Glasgow-haskell-users mailing list