[GHC] #960: Lexical call site string
#960: Lexical call site string ---+ Reporter: [EMAIL PROTECTED] | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler| Version: 6.6 Severity: normal |Keywords: Difficulty: Unknown |Testcase: Architecture: Unknown | Os: Unknown ---+ A function that returns the lexical call site of the current function when an exception occurs. I'm thinking primarily of head [], but the same principle would apply to other functions. A dynamic traceback is not necessarily possible in a lazy language, but when head gets called on an empty list there must be somewhere in the program that actually said head, even if it was not evaluated at the time or included in a closure or something. That way when I get a head: empty list I don't need to grep my program for head calls: I know where head was called from and can start looking there. Examples: * If I just have a function foo = head then it will report that the caller was foo. * If I have a function bar x y = ... and subsequntly say baz x = bar (x * 2) then an exception in bar will report the caller as baz. I know there is a -x profiler option to get a sort of dynamic traceback, but I find it frequently just tells me the error is in CAF.List, which isn't very informative. I'm guessing at a difficulty of 1 week as I don't know the GHC internals. I'm guessing that the call site is going to have to be a hidden parameter passed in to each function call, or alternatively hard-coded when a function is in-lined. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/960 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #961: Associated type synonyms not working right
#961: Associated type synonyms not working right ---+ Reporter: Samuel Bronson [EMAIL PROTECTED] | Owner: chak Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 6.5 Severity: normal |Keywords: Difficulty: Unknown |Testcase: Architecture: Unknown | Os: Unknown ---+ When I try to compile: {{{ class Foo a where type Bar a :: * aBar :: Bar a }}} I get this type error: {{{ Test.hs:1:0: Type synonym `Bar' should have 1 argument, but has been given 1 When checking the class method: aBar :: Bar a In the class declaration for `Foo' }}} I've tracked it down to this case in `typecheck/TcMType.lhs`: {{{ check_tau_type rank ubx_tup ty@(TyConApp tc tys) | isSynTyCon tc }}} which calls `tcView`, which in turn calls `tcExpandTyCon_maybe`, which doesn't handle open type synonyms. (And so `Nothing` is returned down the line, and you get this nasty error.) It should be pretty easy to fix if you actually have a clue what you are doing ;-). So, please fix it. Then I can get back to trying to reimplement the MTL with ATs ;-). -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/961 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #706: GHC uses _stub.c files regardless of whether any 'foreign import' decls remain in a .hs file
#706: GHC uses _stub.c files regardless of whether any 'foreign import' decls remain in a .hs file --+- Reporter: [EMAIL PROTECTED] | Owner: igloo Type: bug | Status: new Priority: normal| Milestone: 6.8 Component: Compiler (FFI)|Version: 6.4.1 Severity: minor | Resolution: Keywords: ffi, link | Difficulty: Moderate (1 day) Testcase:| Architecture: Multiple Os: Multiple | --+- Comment (by [EMAIL PROTECTED]): In order to repro, just install GHC in a Windows machine, unzip the attached file in some directory, and from that directory run the command: ghc -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping- instances -fno-monomorphism-restriction -threaded -lKernel32 -lUser32 -lGdi32 -lOle32 -lComctl32 -optc-D_WIN32_IE=0x700 -optc- D_WIN32_WINNT=0x600 Win32Test.hs -fforce-recomp There's a stub.c (renamed as stubBugBug.c) in the Win32 directory. There's another stub.c file in the root directory (Win32Test_stub.c). Both (the one in Win32 directory needs to be renamed back to stub.c, of course) will cause compile errors if present. Deleting them (or renaming them) will work around the issue. Both came from GHC 6.4.2. Let me know if you have any trouble reproing this. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/706 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #962: hptRules crash
#962: hptRules crash -+-- Reporter: guest | Owner: Type: bug | Status: new Priority: normal| Milestone: Component: Compiler | Version: 6.6 Severity: normal|Keywords: Difficulty: Unknown |Testcase: Architecture: Unknown | Os: Unknown -+-- I got this blowup from ghc-6.6 (ghc-6.6-2 from Debian unstable on i386). ghc-6.6: panic! (the 'impossible' happened) (GHC version 6.6 for i386-unknown-linux): hptRules Authorization [(Authorization, False), (BinParse, False), (BinaryIO, False), (BuildVersion, False), (CFreeVars, False), (CParser, False), (CSyntax, False), (CType, False), (CVParser, False), (CVParserAssertion, False), (CVParserCommon, False), (CVParserImperative, False), (CVParserUtil, False), (CVPrint, False), (Classic, False), (Error, False), (ErrorUtil, False), (Eval, False), (FStringCompat, False), (FileIOUtil, False), (FileNameUtil, False), (Fixity, False), (Flags, False), (Flexlm, False), (GHCPretty, False), (Hash, False), (IOMutVar, False), (IOUtil, False), (Id, False), (IdPrint, False), (IntLit, False), (IntMap, False), (IntegerMisc, False), (IntegerUtil, False), (Lex, False), (ListSet, False), (ListUtil, False), (Literal, False), (Log2, False), (NumType, False), (OrdMap, False), (OrdSet, False), (PFPrint, False), (PPrint, False), (PVPrint, False), (Parse, False), (Parsec, False), (ParsecChar, False), (ParsecCombinator, False), (ParsecExpr, False), (ParsecPrim, False), (Position, False), (Pragma, False), (PreIds, False), (PreStrings, False), (Pretty, False), (SEMonad, False), (SchedInfo, False), (Sort, False), (SpeedyString, False), (SystemVerilogKeywords, False), (SystemVerilogPreprocess, False), (SystemVerilogScanner, False), (SystemVerilogTokens, False), (Trace, False), (Type, False), (Util, False), (VModInfo, False), (Version, False)] Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/962 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #962: hptRules crash
#962: hptRules crash --+- Reporter: guest | Owner: Type: bug | Status: new Priority: normal| Milestone: Component: Compiler |Version: 6.6 Severity: normal| Resolution: Keywords:| Difficulty: Unknown Testcase:| Architecture: Unknown Os: Unknown | --+- Changes (by guest): * cc: = [EMAIL PROTECTED] -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/962 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #963: monadic Num instance not found in ghci
#963: monadic Num instance not found in ghci -+-- Reporter: [EMAIL PROTECTED] | Owner: Type: bug | Status: new Priority: normal| Milestone: Component: GHCi | Version: 6.6 Severity: normal|Keywords: Difficulty: Unknown |Testcase: Architecture: x86 | Os: Linux -+-- Here's my code (fun.hs): {{{ {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} import Control.Monad.Reader instance Eq (a - b) where _ == _ = error whoops instance Show (a - b) where show = const fun instance (Num a, Monad m, Eq (m a), Show (m a)) = Num (m a) where fromInteger = return . fromInteger abs = liftM abs signum = liftM signum (+) = liftM2 (+) (*) = liftM2 (*) (-) = liftM2 (-) instance (Fractional a, Monad m, Num (m a)) = Fractional (m a) where fromRational = return . fromRational (/) = liftM2 (/) instance (Floating a, Monad m, Fractional (m a)) = Floating (m a) where pi = return pi exp = liftM exp log = liftM log sin = liftM sin cos = liftM cos tan = liftM tan sinh = liftM sinh cosh = liftM cosh tanh = liftM tanh asin = liftM sin acos = liftM cos atan = liftM tan asinh = liftM sinh acosh = liftM cosh atanh = liftM tanh }}} Test session: {{{ $ ghci fun.hs ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \/\/ /_/\/|_| Type :? for help. Loading package base ... linking ... done. [1 of 1] Compiling Main ( fun.hs, interpreted ) Ok, modules loaded: Main. *Main 1 2 interactive:1:0: No instance for (Num (t1 - t)) arising from the literal `1' at interactive:1:0-2 Possible fix: add an instance declaration for (Num (t1 - t)) In the expression: 1 2 In the definition of `it': it = 1 2 }}} Expected result: {{{ Loading package mtl-1.0 ... linking ... done. 1 }}} This used to work in ghci-6.4. What's also weird is that manually lifting one number seems to help: {{{ *Main (1 + 2) undefined interactive:1:1: No instance for (Num (a - t)) arising from the literal `1' at interactive:1:1 Possible fix: add an instance declaration for (Num (a - t)) In the first argument of `(+)', namely `1' In the expression: (1 + 2) undefined In the definition of `it': it = (1 + 2) undefined *Main (1 + const 2) undefined 3 }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/963 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #964: Cross Compile and Universal Binary
#964: Cross Compile and Universal Binary +--- Reporter: [EMAIL PROTECTED] | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 6.6 Severity: critical |Keywords: Difficulty: Project ( 1 week) |Testcase: Architecture: Multiple | Os: MacOS X +--- GHC supports both PowerPC and Intel Mac. And GHC site provides both version. But it seems that there is no cross compiling feature and Universal Binary now. If someone want to build Haskell application as Universal Binary: * first he must build Power PC and Intel Mac's binary separately, * then merge two binary using lipo command by hand. http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/lipo.1.html And if someone want to build Universal Binary, he must have both machine. It's not good. This problem is critical for not only Haskell Application, but also a few Library. wxHaskell project supplies binary package, that is good for newbie. And it provides make dist command that can build binary package easyly. But If GHC doesn't support cross compile and Universal binary, it makes hard task that caused by above problems although dependencies has Universal Binary Support. So I request the feature: * support cross compile * provide GHC (core and extra) libraries as Universal Binary * and Cabal supports to build Universal Binary under Mac OS X platform. There are useful information to support Universal Binary. http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/index.html http://wiki.codeblocks.org/index.php?title=Compiling_Code::Blocks_in_Mac_OS_X -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/964 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs