Custom Query (7507 matches)


Show under each result:

Results (19 - 21 of 7507)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Ticket Resolution Summary Owner Reporter
#21 None Can't split a string literal simonmar nobody
If I try to split a string literal across two lines,
using the syntax of two \ seperated by white space, I 
get the error mesage:
error in character literal

The code lines in question looks like:

    hPutStr h $
        "GET "++path uri++" HTTP/1.1\r\n\
        \Host: "++authority uri++"\r\n\
        \User-Agent: Haber/0.2\r\n\r\n"

#22 Invalid import leakage nobody cwitty
When I compile with ghc --make, sometimes imports from
one module "leak" into the imports list (in the .hi
file) of another, unrelated module that was compiled later.

For example:
Point.lhs is the following file:
module Point (
         module PointClass, module Point1, module Point2, 
         module Point3, module Point4, module PointN,
module Point
       ) where

import PointClass
import Point1
import Point2
import Point3
import Point4
import PointN

In one particular ghc run, files were compiled like this:
Skipping  PointClass       (
/sc/downloads/GeomAlgLib/haskell/PointClass.o )
Skipping  Point1           (
/sc/downloads/GeomAlgLib/haskell/Point1.o )
Skipping  Point2           (
/sc/downloads/GeomAlgLib/haskell/Point2.o )
Skipping  Point3           (
/sc/downloads/GeomAlgLib/haskell/Point3.o )
Skipping  PointN           (
/sc/downloads/GeomAlgLib/haskell/PointN.o )
Skipping  Point4           (
/sc/downloads/GeomAlgLib/haskell/Point4.o )
Skipping  GLExtra          ( GLExtra.hs, GLExtra.o )
Skipping  GtkExtra         ( GtkExtra.hs, GtkExtra.o )
Compiling Point            (
/sc/downloads/GeomAlgLib/haskell/Point.o )

None of the Point* modules depend on GdkPixmap (as
verified by looking in their .hi files), but GtkExtra
does.  After this run, Point.hi contains the line
import GdkPixmap !;
(This means that subsequent compiles of different
programs using Point will fail, since they don't have
the right compiler flags to find GdkPixmap.hi.)
System information:
Linux nebula 2.4.9-686 #1 Sun Aug 19 10:46:52 EST 2001
i686 unknown
gcc version 2.95.4 20011006 (Debian prerelease)

I am attaching a transcript of a compile run using -v.
#23 None fundep bug across module boundary nobody nobody
Consider these two files:


module BugImport where
import IOExts

class Monad m => RefMonad m r | m -> r where
  newRef :: a -> m (r a)
  readRef :: r a -> m a
  writeRef :: r a -> a -> m ()

instance RefMonad IO IORef where
  newRef = newIORef
  readRef = readIORef
  writeRef = writeIORef


import IOExts
import BugImport

foo () = do r <- newRef 1
               readRef r

main = do i <- foo ()
              print i

The type of foo is 

(RefMonad m r, Num a) => () -> m a

so the fundep is needed to resolve the overloading. Bug
ghc complains:

Ambiguous type variable(s) 'r' in the constraint
`RefMonad IO r'
arising from use of `foo' at Bug.hs:7
In a do statement: i <- foo ()

i.e. the fundep is lost. This is compiled with
ghc5.02.1, -package 
lang, -fglasgow-exts.

If all the definitions are placed in one module, on the
other hand,
then compilation succeeds. Alternatively, if these two
modules are
loaded into ghci, then they are accepted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Note: See TracQuery for help on using queries.