Hello,
I dont know if it has been reported, this looks like a bug in TH. The
program goes into infinite loop.
Saswat
-
instance Lift (a - b) where
lift f = [| f |]
compile :: (a - b) - ExpQ
compile p = lift p
printE :: ExpQ - IO ()
printE expQ = do exp - unQ expQ
I ran strace with -ff option. Attached is the trace file. I can see many No
such file or directory in the trace. Can you see the problem?
Thanks
Saswat
g
Description: Binary data
Hi
I am also facing the same problem. I tried to build a virgin tree,
but with no success as Simon PJ has pointed out.
I have attached my strace file.
Saswat
On Mon, 23 Sep 2002, Simon Marlow wrote:
I have been trying to build GHC, but the ghc.exe that gets built for
ghc-inplace
Thanks for the pointer. I still get the following error, when I do gmake.
echo '#!/bin/sh' ghc-inplace
echo exec /root/fptools/ghc/compiler/ghc-5.05 '-B/root/fptools' '$@'
ghc-inplace
chmod 755 ghc-inplace
Hi,
In my program I observe that, with -O2 flag turned on, Program 1 behaves
like Program 2. And without O2, their outputs are different.
Is it the desirable behaviour? For my program, I did not expect the
optimizer to do this transformation.
Thanks,
Saswat
Program 1:
eval = \..-
Hi All,
This is not a haskell problem.I
need some pointers which some of you might provide.
In program calculation community, segement problems
e.g. maximum sum problemhave been studiedextensively. The problems
involve finding a segment of the list that maximizes some objective function
Hi,
I feel embarrased when I post newbie questions after one year
of decent Haskell programming. But it feels much better to ask than to
suffer in ignorance.
My newbie question is: Could anyone explain why the second version of the
following function is better.
Is there a tutorial kind of
Hi,
I am wondering why this function should not work with input [x,y]
(list with two elements) too, since third element is not referenced. Why
is it so eager to pattern match.
fun = \list - let [a,b,c] = list
in [a,b]
Thanks,
Saswat
Hi,
Ghc doc does not say much about how to read the heap profile (.hp
file). Could somebody explain. And how can one tell from the graph
generated by hp2ps if the program has space leak.
Thanks,
Saswat
___
Glasgow-haskell-users mailing list
Unsafely you can write:
import IOExts
contents :: [String] - [String]
content = unsafePerformIO . sequence . (map readFile)
Saswat
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi,
I need some pointers and suggestion in the following problem:
I have a very large time-series data. I need to perform some operation on
that. At any instant of time, I only need a window-full of data, size of
window being known. Starting from the first point, I slide the window
towards
The downside is that accessing elements within the window will take time
O(window size). Are the windows large enough that this is a concern?
Yes windows are quite large and elements need to be accessed very
frequently.
As regard to Marcin's suggestion of using a list of compact arrays,
Hi,
In the following profile, should not the sum of %time and %alloc be less
than or equal to 100. It is not in this case. What do they mean then?
Thanks,
Saswat
total time = 324.38 secs (16219 ticks @ 20 ms)
total alloc = 4,577,009,108 bytes (excludes profiling
Hi,
I am wondering how can I pass an overloaded function as a parameter
to another function. Consider the following example. I want to tell the
compiler that the argument `fun' in `trickyFun' definition is always
either ord' or chr', and hence it can find the correct overloaded version
in
Hi,
When I am trying to compile my prgram with -prof -auto-all -O2, It fails
saying:
Failed to find interface decl for
But it is fine if I compile with either profiling or optimization options
alone. Are they not supposed to work together?
Thanks,
Saswat
Hi,I am trying to define a commutative operator
:(%+) :: a - b - c(%+) :: b - a -
c
instead of defining a class and instantiating twice
every time, I am trying to do the following:
class Commutative a b c where(%+) ::
a - b - c
class Operation a b c | a b - c
where(%+%) :: a - b - c
In ghc-5.00.1, seq (2/0) 3 gives 3. Should it not give error. Hugs does.
Thanks,
S
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
class MyShow a where
sh :: a - String
instance (Integral a) = Show a where
sh = Integer + show a
Ghc 5.00.1 (with -fglasgow-exts) does not accept the above, while hugs with
extensions has no problem with this. Is it a bug?
Thanks,
S
___
I am sorry for the typos. It should have been
instance (Integral a) = Show a where
sh a = Integer ++ (show a)
class MyShow a where
sh :: a - String
instance (Integral a) = Show a where
sh = Integer + show a
Ghc 5.00.1 (with -fglasgow-exts) does not accept the above,
does not work with ghci-5.00. Shouldn't it?
Thanks,
S
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
I get the following error with one of my programs.
ghc5.00: fatal error: interpretBCO: unknown or unimplemented opcode
Is it a bug? I am using i386-unknown-linux binary on SuSE 7.0.
Thanks,
Saswat
___
Glasgow-haskell-bugs mailing list
[EMAIL
I am trying to install ghc-5.00 from .hc files on windows NT. But I get the
following error. It seems Package.hc is missing.
Please help.
BTW when the windows binaries will be on sale?
Thanks,
Saswat
==fptools== make all
I have a need to read large lists of numbers from a file and operate on
them. I tried the following:
read' =do s - readFile "temp"
print $ sum $ map (fst.head.readDec)(lines s)
But this is quite slow even for 1000 numbers.
Are there any other ways to do it faster? Will it help
I am trying to install ghc and hdirect on windows. But I have failed
miserably. Initially I was able to install and run ghc, but after failing to
run hdirect examples i did some changes to environment settings, and now
none of them work. I also tried reinstalling both.
1. If I do mount c: /
I have a problem as follows -
type CF = Char - Float
type IF = Integer - Float
type CIF = (Char,Integer) - Float
There be two functions:
fun :: CF
fun = fromInt.ord
sun :: IF
sun = fromInteger
I want the followings to be valid.
x :: IF
x = sun \+ sun
y :: IF
y = sun \+ sun \+
sun --
Thanks a lot. It works great with Hugs.
But it has a small problem. I also want to be able
to write
4 \+ fc :: CF
fc \+ 4 :: CF
ic \+ 4 :: IF
4 \+ fc \+ ic :: CIF
Well for that I did this,
instance (Rational a) = Plus a CF CF
where --to support 4.0 \+ fc
f \+ g = \c
- (realToFrac f)
Dear All,
I have this following simplified problem. Please help.
type Formula a b = a - b
type Env = (Integer,Char)
fun :: Formula Integer Integer
fun n = n+1
sun :: Formula Char Integer
sun c = toInteger.ord c
I want to be able to write
(sun + fun) (2,'a')
(fun + sun) (2,'a')
class C a where
fun :: a - Integer
instance C Integer where
fun x = x+ 1
with these definitons:
fun 3 --gives error in Hugs
fun (3::Integer) -- OK
I am a building an embedded language, so don't want user to cast. Is there a
solution?
Thanks,
Saswat
28 matches
Mail list logo