Custom Query

Filters
 
Columns

Show under each result:


Results (31 - 33 of 5835)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#5261 fixed -pgmF messes up hpc .mix output andy@… elaforge

Reported by elaforge, 2 years ago.

description

For example:

% cat t.hs
f x = x * 20
main = print (f 20)
% cat pp
#!/bin/sh
cp $2 $3
% ghc -fhpc -F -pgmF./pp t.hs
[1 of 1] Compiling Main             ( t.hs, t.o )
Linking t ...
% cat .hpc/Main.mix
Mix "t.hs" 1308170257 1934109072 1 []

If I omit pgmF, then I get proper Boxes in the .mix file. When I run over a large code base, some scattered expressions get Boxes, but the majority don't.

I think this started showing up with ghc 7.

#625 invalid Incorrect handling of types anonymous hjgtuyl (at) chello (dot) nl

Reported by hjgtuyl (at) chello (dot) nl, 7 years ago.

description

The following program, taken from

 http://shootout.alioth.debian.org/benchmark.php?test=pidigits&lang=ghc&id=0

compiles without a problem:


import System

floor_ev (q, r, s, t) x = (q*x + r) div (s*x + t) comp (q,r,s,t) (q',r',s',t') = (q*q' + r*s', q*r' + r*t', s*q' + t*s', s*r' + t*t') next z = floor_ev z 3 safe z n = n == floor_ev z 4 prod z n = comp (10,-10 * n, 0, 1) z cons z k = let den = 2*k+1 in comp z (fromIntegral k, fromIntegral (2*den), 0, fromIntegral

den)

digit :: Int -> (Integer,Integer,Integer,Integer) -> Int -> Int -> Int -> IO () digit k z 0 row col = putStrLn (take (10-col) " "++"\t:"++show (row+col)) digit k z n row col =

if safe z y

then if col == 10 then do let row' = row + 10

putStr ("\t:"++show row'++"\n"++show y) digit k (prod z y) (n-1) row' 1

else putStr (show y) >> digit k (prod z y) (n-1) row (col+1) else digit (k+1) (cons z k) n row col

where y = next z

main =

do [n] <- getArgs

digit 1 (1,0,0,1) (read n) 0 0


When substituting "safe z y" in the function "digits" with it's definition, we get:


import System

floor_ev (q, r, s, t) x = (q*x + r) div (s*x + t) comp (q,r,s,t) (q',r',s',t') = (q*q' + r*s', q*r' + r*t', s*q' + t*s', s*r' + t*t') next z = floor_ev z 3 safe z n = n == floor_ev z 4 prod z n = comp (10,-10 * n, 0, 1) z cons z k = let den = 2*k+1 in comp z (fromIntegral k, fromIntegral (2*den), 0, fromIntegral

den)

digit :: Int -> (Integer,Integer,Integer,Integer) -> Int -> Int -> Int -> IO () digit k z 0 row col = putStrLn (take (10-col) " "++"\t:"++show (row+col)) digit k z n row col =

if n == floor_ev z 4 -- safe z y

then if col == 10 then do let row' = row + 10

putStr ("\t:"++show row'++"\n"++show y) digit k (prod z y) (n-1) row' 1

else putStr (show y) >> digit k (prod z y) (n-1) row (col+1) else digit (k+1) (cons z k) n row col

where y = next z

main =

do [n] <- getArgs

digit 1 (1,0,0,1) (read n) 0 0


The compilation then fails with the message:

Pidigits2.hs:13:19:

Couldn't match Int' against Integer'

Expected type: (Int, Int, Int, Int) Inferred type: (Integer, Integer, Integer, Integer)

In the first argument of floor_ev', namely z' In the second argument of (==)', namely floor_ev z 4'

I suppose this is a correct message, but then the first version should not have been compiled

either.

#1598 fixed Could instances of Typeable, Data be added? ashley@… igloo

Reported by igloo, 6 years ago.

description

In  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426612 Mark Carroll <mark@…> writes:

Could some of the data structures, such as Data.Time.Calendar.Day and Data.Time.LocalTime?.TimeOfDay?, be made instances of Typeable and Data so that they can be used with Data.Generics, etc.?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Note: See TracQuery for help on using queries.