Am Mittwoch, 7. Januar 2004 20:37 schrieb Alastair Reid:
I want to use Haskell files with #ifdef, #else and #endif preprocessor
directives. I tried hugs -F cpp -P source_file_name but cpp
complains about unterminated character constants. What is wrong?
ANSI C preprocessors tend to get
Hi Wolfgang,
Thanks for your informative reply. At first I didn't
understand it, but a search on StateT lead me to the
paper Monad Transformers and Modular Interpreters by
Liang, Hudak and Jones, which clarified some of the
ideas for me.
The state transformer approach seems to have
advantageous
How do I instruct Haddock to preprocess the Haskell files.
From your mail I
thought that Haddock would do so by default but it complains
at the first
#ifdef it sees. Unfortunately, I didn't find any Haddock
option similar to Hugs' -F.
I should really put this in the manual, since
Am Donnerstag, 8. Januar 2004 03:20 schrieben Sie:
[...]
Thanks for your informative reply.
You're welcome.
[...]
One disadvantage is that it lacks symmetry in that one monad is arbitrarily
chosen to sit inside the other.
Yes, I see this as a disadvantage, too.
I found another approach
Am Donnerstag, 8. Januar 2004 11:02 schrieb Simon Marlow:
How do I instruct Haddock to preprocess the Haskell files. From your mail
I thought that Haddock would do so by default but it complains at the
first #ifdef it sees. Unfortunately, I didn't find any Haddock option
similar to Hugs'
Hi Mark,
The state transformer approach seems to have
advantageous in that it provides a framework for
building new monads from old, and accessing the
components. One disadvantage is that it lacks
symmetry in that one monad is arbitrarily chosen
to sit inside the other.
You may want to read
!! We apologize for multiple copies of this message !!
SECOND CALL FOR PAPERS
ESSLLI-2004 STUDENT SESSION
9-20 August, 2004 in Nancy, France
Deadline: February 22, 2004
Am Mittwoch, 7. Januar 2004 21:46 schrieb Wolfgang Jeltsch:
[...]
I tried hugs -F cpp -P -traditional but got the same error message as
without -traditional. This message is, suprisingly,
sh: line 1: /usr/lib/hugs/libraries/Hugs/Prelude.hs: Permission denied
ERROR
Am Donnerstag, 8. Januar 2004 11:02 schrieben Sie:
[...]
Anyway, you can use GHC to preprocess your source files before feeding
them to Haddock:
$ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs
This only replaces all __HADDOCK__ occurences with 1 but doesn't process
#ifdefs.
[...]
Am Donnerstag, 8. Januar 2004 11:02 schrieben Sie:
[...]
Anyway, you can use GHC to preprocess your source files
before feeding
them to Haddock:
$ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs
This only replaces all __HADDOCK__ occurences with 1 but
doesn't process
Am Donnerstag, 8. Januar 2004 11:02 schrieben Sie:
[...]
Anyway, you can use GHC to preprocess your source files
before feeding
them to Haddock:
$ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs
This only replaces all __HADDOCK__ occurences with 1 but
doesn't
Am Donnerstag, 8. Januar 2004 17:39 schrieb Simon Marlow:
[...]
$ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs
This only replaces all __HADDOCK__ occurences with 1 but doesn't process
#ifdefs.
Are you sure? It works for me, and it's what we use in GHC's libraries.
I found the
Am Donnerstag, 8. Januar 2004 17:44 schrieb Simon Marlow:
[...]
One thing I forgot to mention is that you also need to remove the pesky
lines beginning with '#' that the C preprocessor leaves behind. Here's what
we do in GHC:
$ ghc -D__HADDOCK__ -E -cpp Foo.hs -o Foo.tmp
$ sed
is there a function, related to getProgName, which returns the (absolute)
path to the current program?
basically, i want to be able to read a file which i know will be in the
same directory as the current program, but not necessarily in the same
directory that we're running it from.
--
Hal
Sadly, this doesn't seem to work:
9:26am albini:SVMseq/ cat Foo.hs
module Main where
import System.Environment
main = getEnv _ = putStrLn
9:27am albini:SVMseq/ ghc Foo.hs -o foo
9:27am albini:SVMseq/ ./foo
Fail: does not exist
Action: getEnv
Reason: no environment variable
File: _
On Thu, 8
On Thu, Jan 08, 2004 at 09:06:44AM -0800, Hal Daume III wrote:
is there a function, related to getProgName, which returns the (absolute)
path to the current program?
A non-portable Linux solution:
System.Posix.readSymbolicLink /proc/self/exe
Best regards,
Tom
--
.signature: Too many
On Thursday 08 January 2004 18.06, Hal Daume III wrote:
is there a function, related to getProgName, which returns the (absolute)
path to the current program?
basically, i want to be able to read a file which i know will be in the
same directory as the current program, but not necessarily in
On Thu, Jan 08, 2004 at 07:02:04PM +0100, Tomasz Zielonka wrote:
On Thu, Jan 08, 2004 at 09:06:44AM -0800, Hal Daume III wrote:
is there a function, related to getProgName, which returns the (absolute)
path to the current program?
A non-portable Linux solution:
Hal Daume III wrote:
is there a function, related to getProgName, which returns the (absolute)
path to the current program?
Well, the absolute path name is not necessarily unique, nor is it
guaranteed to exist. :)
-- Lennart
___
Haskell mailing list
True. Replace the with a and ? with , if it exists?.
On Thu, 8 Jan 2004, Lennart Augustsson wrote:
Hal Daume III wrote:
is there a function, related to getProgName, which returns the (absolute)
path to the current program?
Well, the absolute path name is not necessarily unique, nor is it
Hal Daume III [EMAIL PROTECTED] writes:
True. Replace the with a and ? with , if it exists?.
On Thu, 8 Jan 2004, Lennart Augustsson wrote:
Hal Daume III wrote:
is there a function, related to getProgName, which
returns the (absolute) path to the current program?
Well, the absolute path
Hi, I'm trying to use the new GHC -main-is flag to compile
programs from
files with module names other than Main, but it doesn't seem
to be working.
I've tried this under Windows 2000 and Windows XP.
Here's my test program:
[[
-- HelloWorld.hs
-- module HelloWorld where
module
Aha. Got it.
Consider
case f x of
(# a,b #) - if a0
then f x -- CSE opportunity
else (# b,a #)
GHC 6.2's CSE pass wrongly optimised this to:
case f x of t
(# a,b #) - if a0 then
t
Hello,
A port of ghc-6.2 for Mac OS X (both Jaguar and Panther) is available
from the
darwinports system.
Information on obtaining darwinports is available from
http://darwinports.opendarwin.org.
Once darwinports is installed, building ghc is done by changing to the
lang/ghc directory and
I have a question which came up as a result of some attempts
to enforce
seperate compilation. Suppose we have two modules as follows:
-- A.hs
module A (AbstractType) where
data AbstractType = it's hidden implementation
f :: AbstractType - String
f _ = foo
g ::
I'm trying to use the new GHC -main-is flag to compile programs under
Windows from source files with module names other than Main, but it doesn't
seem to be working.
Details of my problem are at:
http://haskell.org/pipermail/haskell/2004-January/013332.html
Is it a bug, or something I'm
Hi,
I'm using POpen to shell out to a command several hundreds or thousands of
times per call (none of them simultaneous, though, this is completely
serial). After running my program for a while, I get:
Fail: resource exhausted
Action: forkProcess
Reason: Resource temporarily unavailable
Hal Daume III wrote:
I'm using POpen to shell out to a command several hundreds or thousands of
times per call (none of them simultaneous, though, this is completely
serial). After running my program for a while, I get:
Fail: resource exhausted
Action: forkProcess
Reason: Resource
Hal Daume III [EMAIL PROTECTED] writes:
On Thu, 8 Jan 2004, Glynn Clements wrote:
What does the output from ps indicate?
It lists all the processes as defunct:
19981 pts/5Z 0:00 [suffixtree defunct]
19982 pts/5Z 0:00 [suffixtree defunct]
19983 pts/5Z 0:00
Hal Daume III wrote:
What does the output from ps indicate?
It lists all the processes as defunct:
19981 pts/5Z 0:00 [suffixtree defunct]
19982 pts/5Z 0:00 [suffixtree defunct]
19983 pts/5Z 0:00 [suffixtree defunct]
19984 pts/5Z 0:00 [suffixtree
On Tue, 2004-01-06 at 22:58, Graham Klyne wrote:
I'm not an expert in this, but I think what you are proposing is possible,
to a point, possibly assuming that your monads have associated functions to
combine and separate the monadic parts.
Thanks for the below illustration of how this
Hi Guys,
Im a fourth year computer science in Ireland and Im doing my final year project on Haskell programming. What Im doing is writing a program in Haskell for the maths department for my college. What it involves is this: There is a class of 50 students and there are about 25 staff members.
htmldiv style='background-color:'PHi Guys,/P
PIm a fourth year computer science in Ireland and Im doing my
final year project on Haskell programming. What Im doing is writing a
program in Haskell for the maths department for my college. What it
involves is this: There is a class of 50
I have two thoughts:
It sounds as if you are using an algorithm that is inherently
inefficient. It may be that you need to re-think the algorithm used to
optimize assignment of projects for students based on their ranking. If
the aggregate ranking is based on a linear combination of
34 matches
Mail list logo