#904: :e test.hs overwrites test.hs with emacs tags
+---
Reporter: guest|Owner:
Type: bug | Status: new
Priority: normal |Milestone:
Component: GHCi
On 19.09 21:28, Tomasz Zielonka wrote:
On Tue, Sep 19, 2006 at 09:13:56PM +0200, Rene de Visser wrote:
I would suggest -fforce-recomp for force recompilation.
-frecompile-all
- Einar Karttunen
___
Glasgow-haskell-users mailing list
Hello glasgow-haskell-users,
7.4.10 of user guide say:
-- f and g assume that 'a' is already in scope
f = \(x::Int, y) - x
g (x::a) = x
seems that f definition should contain 'a'
--
Best regards,
Bulat mailto:[EMAIL PROTECTED]
Hello glasgow-haskell-users,
can someone try to compile this one-line module:
import Control.Concurrent.STM.TArray
with a recent 6.5 builds, preferably mingw32 ones?
it doesn't work for me, although TVar and other modules import
without any problems; and i see TArray.hi module along with
Hi,
I get the exact same thing with ghc-6.5.20060914.
Weird.
Josef
On 9/20/06, Bulat Ziganshin [EMAIL PROTECTED] wrote:
Hello glasgow-haskell-users,
can someone try to compile this one-line module:
import Control.Concurrent.STM.TArray
with a recent 6.5 builds, preferably mingw32 ones?
it
Malcolm Wallace schrieb:
I think there is a wrapper somewhere that provides the old
Data.FiniteMap in terms of the Data.Map implementation.
Darcs patch attached, if it is of interest.
This patch does not have the functions:
foldFM_GE, fmToList_GE, keysFM_GE, eltsFM_GE,
Hello glasgow-haskell-users,
attached module compiles fine with ghc 6.4.2, hugs 2003+, but not with
my ghc 6.5 snapshot. it says:
66.hs:9:0:
Illegal instance declaration for `Stream m (StringReader r)'
(the Coverage Condition fails for one of the functional dependencies)
In the
I've copied the old code from Data.FiniteMap and only implemented:
foldFM_LE f v k =
Map.foldWithKey (\ i w c - if i k then c else f i w c) v
Christian Maeder schrieb:
Malcolm Wallace schrieb:
I think there is a wrapper somewhere that provides the old
Data.FiniteMap in terms of the Data.Map
Quite right; that's just as specified. The coverage condition is
documented in the manual. (GHC 6.4 and Hugs are too liberal, and
thereby risk divergence during type checking.) If you want this
program to work, use -fallow-undecidable-instances
Simon
| -Original Message-
| From:
How can I convince ghc version 6.5.20060919 to accept latin1 characters
in literals?
I wish to keep source files (containing umlauts in strings) that can be
compiled by either ghc-6.4.2 and ghc-6.6.
Christian
___
Glasgow-haskell-users mailing list
Hello Simon,
Wednesday, September 20, 2006, 7:35:39 PM, you wrote:
Quite right; that's just as specified. The coverage condition is
documented in the manual. (GHC 6.4 and Hugs are too liberal, and
thereby risk divergence during type checking.) If you want this
program to work, use
Hello all,
I made another update to the notes on Replacing GMP, at http://
hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes . It's pretty
basic and you'd probably find it shabby, but comments, modifications
appreciated. I am still in the throes of trying to *portably* beat
GMP for
On Wed, Sep 20, 2006 at 02:54:57PM +0200, Christian Maeder wrote:
This patch does not have the functions:
foldFM_GE, fmToList_GE, keysFM_GE, eltsFM_GE,
foldFM_LE, fmToList_LE, keysFM_LE, eltsFM_LE,
It should be quite easy to do with split or splitLookup.
Best regards
Tomasz
On Wed, 2006-09-20 at 18:14 +0200, Christian Maeder wrote:
How can I convince ghc version 6.5.20060919 to accept latin1 characters
in literals?
I wish to keep source files (containing umlauts in strings) that can be
compiled by either ghc-6.4.2 and ghc-6.6.
You can use numeric escapes like
* Rich Fought [EMAIL PROTECTED]:
I've got some unit test code that forks off test processes using the
'system' function and then delays using 'threadDelay' to synchronize
with the test process.
This has worked fine until I upgraded to 6.4.2, now some of the
'threadDelay' calls never
Third Call for Papers and Software Demonstrations
P L A N - X 2 0 0 7
Programming Language Techniques for XML
An ACM SIGPLAN Workshop colocated with POPL 2007
Nice, France -- January 20, 2007
Hello,
I'm a newcomer to Haskell and I've been typing some simple
expressions into Hugs in an attempt to understand how the built-in
numeric types work . However, I'm puzzled by the following example:
k = 2
f :: Int - Int - Int
f x y = x * y
After loading a file containing this code into
Hi Robert,
I'm a newcomer to Haskell and I've been typing some simple
expressions into Hugs in an attempt to understand how the built-in
numeric types work . However, I'm puzzled by the following example:
k = 2
f :: Int - Int - Int
f x y = x * y
After loading a file containing this
* Strong Types for Relational Databases . Alexandra Silva and Joost
Visser [33]presented a relational database Using the type system
to encode not only the types of fields it was joining, but a bit
more about their meaning and role in the key.
Type-level
Arie Peterson wrote:
However, if I type an apparently equivalent let expression into Hugs
directly, then I get the value 4 as expected
let k = 2 ; f :: Int - Int - Int ; f x y = x * y in f k k
Why is there a difference in behaviour?
Here, there is no defaulting, 'k' has the
Robert Stroud wrote:
However, I still think there's a bit of an inconsistency here. I
understand that if k had the type Num a = a, then the expression
show k would be ambiguous, but unless I write that expression,
there's no ambiguity...
Actually, you can give k that type, and thanks
Hello haskell,
i definitely think that to rise up Haskell popularity we need now to
create web forum. comparing to mail lists, it allows to faster
include in communication because all previous discussions are easily
available and simplifies participation for strangers that just have
several
On 9/20/06, Bulat Ziganshin [EMAIL PROTECTED] wrote:
i definitely think that to rise up Haskell popularity we need now to
create web forum.
I disagree with this. I don't like web forums, I don't use web forums
if I can avoid it. They're way more work than mailing lists. Plenty of
popular
On Wed, 2006-09-20 at 14:02 -0500, Taral wrote:
Plenty of popular languages out there with no web forum.
Haskell is more than just a language - it's the community ;)
Sincerely,
Gour
signature.asc
Description: This is a digitally signed message part
i definitely think that to rise up Haskell popularity we need now to
create web forum.
I disagree with this. I don't like web forums, I don't use web forums
if I can avoid it. They're way more work than mailing lists.
And I disagree with you. I don't like mailing lists, and I don't use
them
On 2006-09-20 at 21:19+0200 Niklas Broberg wrote:
A mailing list will never be enough.
Really?
A forum has way way more potential.
More potential than what we have already: URL:
http://dir.gmane.org/gmane.comp.lang.haskell.general ?
Jón
--
Jón Fairbairn
On 2006-09-20, Niklas Broberg [EMAIL PROTECTED] wrote:
i definitely think that to rise up Haskell popularity we need now to
create web forum.
I disagree with this. I don't like web forums, I don't use web forums
if I can avoid it. They're way more work than mailing lists.
And I disagree
On 9/20/06, Niklas Broberg [EMAIL PROTECTED] wrote:
It is much easier to keep conversations in context in a forum, and to
search for old conversations. It's all there, all the time.
Eh, I don't have this problem. I use gmail.
--
Taral [EMAIL PROTECTED]
You can't prove anything.
-- Gödel's
More potential than what we have already: URL:
http://dir.gmane.org/gmane.comp.lang.haskell.general ?
Yes. How could we use that to create subforums for particular projects
or subcommunities?
/Niklas
___
Haskell mailing list
Haskell@haskell.org
On 9/20/06, Aaron Denney [EMAIL PROTECTED] wrote:
And I disagree with you. Web forums are usenet reinvented poorly.
It's impossible to keep track of what's new, threading is either poor or
nonexistent. Mailing lists with searchable archives work well. gmane
provides a nice usenet interface to
Can I suggest that this thread about a Haskell forum migrate to Haskell-café?
Starting on the Haskell mailing list is a good plan -- but discussion belongs
in the Café. Accompanied by caffine!
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Arie Peterson wrote:
You absolutely right about this defaulting breaking referential transparency.
Do you know if it can be switched off in GHC? I know one can switch on
warnings when it happens, but I don't think that's the same thing.
--
Ashley Yakeley
hello all,
I asked this question on haskell-cafe once, but my post didn't get any
responses, so I try once again here explaining a bit more where my
problem comes from.
Suppose I have a monomorphic datatype, say T and want to do something
with it, which depends on an instance of class C
On 9/20/06, Misha Aizatulin [EMAIL PROTECTED] wrote:
What I need it for is serialization of datatypes with existential
constructors (see
http://haskell.org/pipermail/haskell-cafe/2006-September/018041.html)
I am having a box like
data Box = forall a. Cxt a = Box a
and want to write a Read
The program is written in Haskell, hence my shameless ad here:
http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html
GaBuZoMeu is a set of programs to parse and check language tags (see
the RFC 4646 produced by the IETF Working Group LTRU - Language Tag
Registry Update).
Language tags
Vivian McPhail wrote:
class Forkable a where
fork :: String - a - a - a
What I would like to be able to do is
differentiate between Forkable (m a -
b) and Forkable (function type - b).
Have you tried this combination of instances?
instance Forkable (IO a) where ...
--
On 2006-09-12, Brian Hulley [EMAIL PROTECTED] wrote:
Bryan Burgers wrote:
That being said, I'll have to play the other side of the coin: it
would probably be a little bit of a pain to have to define instances
of each data declaration (Integer, Int, Float, Matrix, Complex, etc.)
on each of
On 2006-09-12, Jacques Carette [EMAIL PROTECTED] wrote:
First, as already pointed out in
http://www.haskell.org/pipermail/haskell-cafe/2006-April/015404.html
there is a lot of relevant previous work in this area.
I'm afraid I don't see the relevance.
This is very easy to do in 'raw' category
I'm trying to write in Haskell a function that in Java would be something
like this:
char find_match (char[] l1, char[] l2, char e){
//l1 and l2 are not empty
int i = 0;
while (l2){
char aux = l2[i];
char[n] laux = l2;
crespi.albert:
I'm trying to write in Haskell a function that in Java would be something
like this:
char find_match (char[] l1, char[] l2, char e){
//l1 and l2 are not empty
int i = 0;
while (l2){
char aux = l2[i];
char[n] laux = l2;
On Wed, Sep 20, 2006 at 01:31:22AM -0700, Carajillu wrote:
I'm trying to write in Haskell a function that in Java would be something
like this:
char find_match (char[] l1, char[] l2, char e){
//l1 and l2 are not empty
int i = 0;
while (l2){
char aux =
dons:
crespi.albert:
I'm trying to write in Haskell a function that in Java would be something
like this:
char find_match (char[] l1, char[] l2, char e){
//l1 and l2 are not empty
int i = 0;
while (l2){
char aux = l2[i];
char[n] laux = l2;
On Wed, Sep 20, 2006 at 01:31:22AM -0700, Carajillu wrote:
compare function just compares the two lists and return true if they are
equal, or false if they are not.
it is really a simple function, but I've been thinking about it a lot of
time and I can't get the goal.
I forgot, obviously,
wow, the simpliest ever!
Andrea Rossato wrote:
On Wed, Sep 20, 2006 at 01:31:22AM -0700, Carajillu wrote:
compare function just compares the two lists and return true if they are
equal, or false if they are not.
it is really a simple function, but I've been thinking about it a lot of
mailing_list:
On Wed, Sep 20, 2006 at 01:31:22AM -0700, Carajillu wrote:
compare function just compares the two lists and return true if they are
equal, or false if they are not.
it is really a simple function, but I've been thinking about it a lot of
time and I can't get the goal.
I
That works good, but I have a problem with the return type, I forgot to
mention... can it be a [char]??
Donald Bruce Stewart wrote:
crespi.albert:
I'm trying to write in Haskell a function that in Java would be something
like this:
char find_match (char[] l1, char[] l2, char e){
Yes, they must be equal the whole way, I like this recursive solution :)
Ketil Malde-3 wrote:
Carajillu [EMAIL PROTECTED] writes:
compare function just compares the two lists and return true if they are
equal, or false if they are not.
find_match 4*ha 4*5a 'h' returns '5' (5
Andrea Rossato [EMAIL PROTECTED] writes:
I forgot, obviously, that lists are an instance of the Eq class...
so, this is enough:
comp l1 l2 = if l1 == l2 then True else False
Or why not:
comp l1 l2 = l1 == l2
Or simply:
comp = (==)
:-)
-k
--
If I haven't seen further, it is by
On Wed, Sep 20, 2006 at 07:20:23PM +1000, Donald Bruce Stewart wrote:
comp l1 l2 = if l1 == l2 then True else False
You never stop learning!
andrea
which you would just write as:
comp = (==)
and then you'd just use == anyway :)
this is why I came to love haskell: it remembers
On Tue, 2006-09-19 at 19:45 -0700, Lyle Kopnicky wrote:
Hi folks,
I'm working on a project for which the solution is highly
parallelizable. I've been writing it so far for GHC as a single-threaded
app. I'd like to be able to split the job into multiple pieces, and
spawn different system
On Tue, Sep 19, 2006 at 08:06:07PM +0200, [EMAIL PROTECTED] wrote:
For our optimization problem, it's only a matter of constructors on the
right hand side. They should pop out before do not look on any
arguments, so it's safe to cry so you just know, i'm a Just.
It seems the appropriate
Hello Tim,
Wednesday, September 20, 2006, 1:28:47 AM, you wrote:
rec {field=val}
but there is no settor function. It would be nice if there was some
sort of section-like syntax to access the settor function, like:
you can use DriFT which generates setter, isA and many other functions
Carajillu [EMAIL PROTECTED] writes:
That works good, but I have a problem with the return type, I forgot to
mention... can it be a [char]??
If that's what you want, how about this:
import Maybe
find_match l1 l2 c
= fmap catMaybes . sequence $ zipWith match l1 l2
where
... and if you want to search strings not single characters:
findmatch s t e = take m . drop n $ t
where
m' = length e
(n, m) = f 0 s
f i s | take m' s == e = (i, m')
| null s = (0, 0)
| otherwise = f (i+1) (tail s)
findmatch asdfasdf
Vivian McPhail wrote:
class Forkable a where
fork :: String - a - a - a
What I would like to be able to do is
differentiate between Forkable (m a -
b) and Forkable (function type - b).
Have you tried this combination of instances?
instance Forkable (IO a) where
Hello,
I'm trying to use haskell to put together a TCP proxy I can put
between my browser and my webserver.
This is as far as I got. The webserver isn't returning my request:
listen = withSocketsDo $ do
putStrLn Listening...
socket - listenOn $ PortNumber 8082
(handleToClient,
Actually, it blocks on:
putStrLn contents
It even blocks if I replace it with:
print $ length contents
Is there some kind of magic happening here?
-John
On 9/20/06, John Ky [EMAIL PROTECTED] wrote:
Hello,
I'm trying to use haskell to put together a TCP proxy I can put
between my
On Wed, 20 Sep 2006, John Ky wrote:
Actually, it blocks on:
putStrLn contents
It even blocks if I replace it with:
print $ length contents
Is there some kind of magic happening here?
No, but you're trying to do magic - it can't get all of contents until the
connection's
Hello John,
Wednesday, September 20, 2006, 3:59:36 PM, you wrote:
I'm trying to use haskell to put together a TCP proxy I can put
between my browser and my webserver.
This is as far as I got. The webserver isn't returning my request:
hSetBuffering handleToServer LineBuffering
may help
Hi Bulat,
Thanks. Yes it helps with an earlier implementation I wrote (below).
But surely there must be a better way to write this. My code is way
to verbose.
-John
---
doProxyServer handleToClient handleToServer = do
eof - hIsEOF handleToServer
if not eof
then do
ready -
Hi again,
Given that putStrLn contents did manage to print out the HTTP header
before blocking, am I correct in coming to the conlusion that
'contents' is evaluated lazily? So Monads don't actually eliminate
laziness?
-John
On 9/20/06, Philippa Cowderoy [EMAIL PROTECTED] wrote:
On Wed, 20
Malcolm Wallace has recorded the ICFP programming contest results
announcement as video, straight from the ICFP conference in Portland.
He's posted it to Google Video, and it's available to download (120M) or
stream from Google video, here:
How about something like this?
import Data.List
findMatch xs ys k = lookup k . concat $ zipWith zip (substrings xs)
(substrings ys)
where substrings = nonempty . map (nonempty . inits) . tails
where nonempty = filter (not . null)
On 20/09/06, Matthias Fischmann [EMAIL
Whenever people start discussing the Numeric type classes, the true
scope of what a refactoring can (and should?) be is frequently
under-estimated. The 'structure' of algebraic objects in mathematics
has been studied quite a lot (in mathematics and in CS, but not so much
by programming
On 2006-09-20, Jacques Carette [EMAIL PROTECTED] wrote:
[Hopefully this answers your 'relevance' question].
Yes. I was focusing on the more narrow aspect, rather than what had
started this thread.
In other words, the specification language people have been down this
road quite some time
On Thu, Sep 21, 2006 at 12:26:03AM +1000, John Ky wrote:
Given that putStrLn contents did manage to print out the HTTP header
before blocking, am I correct in coming to the conlusion that
'contents' is evaluated lazily?
hGetContents breaks the rules of the IO monad - it returns a value (the
Michael Shulman wrote:
Ah, excellent. So it sounds like at least in Haskell prime, I'll
probably be able to use MonadPlus to do what I want, because MaybeT
and ErrorT will be instances of MonadOr instead.
I'm not sure if this is part of Haskell Prime, though.
--
Ashley Yakeley
On Tuesday 19 September 2006 09:40, Deokhwan Kim wrote:
Albert Lai wrote:
Deokhwan Kim [EMAIL PROTECTED] writes:
Where is the Monad instance declaration of Either e?
It is in Control.Monad.Error as well. Strange: the doc doesn't state
it.
Thanks a lot, Albert! I found the
I'm just tried writing a function to allow convenient embedding of shell
commands, but I'm running into behavior I don't really understand
somewhere at the intersection of lazy evaluation, IO, and threading.
The function in question is:
sh :: String - String - IO String
sh cmd = \input -
I've written a function that looks similar to this one
getList = find 5 where
find 0 = return []
find n = do
ch - getChar
if ch `elem` ['a'..'e'] then do
tl - find (n-1)
return (ch : tl) else
find n
First, how do I fix the identation of the
br1:
I've written a function that looks similar to this one
getList = find 5 where
find 0 = return []
find n = do
ch - getChar
if ch `elem` ['a'..'e'] then do
tl - find (n-1)
return (ch : tl) else
find n
First, how do I fix the
dons:
br1:
Second, I want to test this function, without hitting the filesystem. In
C++ I would use a istringstream. I couldn't find a function that returns
a Handle from a String. The closer thing that may work that I could find
was making a pipe and convertind the file
dons:
br1:
Second, I want to test this function, without hitting the filesystem. In
C++ I would use a istringstream. I couldn't find a function that returns
a Handle from a String. The closer thing that may work that I could find
was making a pipe and convertind the file
73 matches
Mail list logo