...(continued)...
Sorry, I forgot to include my references:
[1]
@InProceedings{oka95b,
author = "Chris Okasaki",
title ="Purely functional random-access lists",
pages ="86--95",
booktitle ="Conference Record of FPCA '95",
year = 1995,
publisher =
| Starts a comment: `--', `---', `--Hello', `--(', `--;', `--_'
|
| Does not start a comment: `--', `--=', `--\', `--.', `--|', `---',
| `--? What is this', `--! Amazing', `--½ done', `--® Microsoft',
| `--© 1998 Microsoft', `--«Nothing»'.
|
|Yes, these are correct.
So no one minds that
| {- A comment, isn't it? -}
|despite the unmatched single quote.
Actually, shouldn't "isn't" be parsed as a single varid? From the 1.4
report:
"An identifier consists of a letter followed by zero or more letters,
digits, underscores, and single quotes."
I don't know of anywhere in the
.
We hope to extend this functionality in future versions.
Contributions are welcome!
Current contributors: Graeme Moss, Tommy Thorn, Hans-Wolfgang Loidl,
and Guy Lapalme.
See the following home page:
http://www.haskell.org/haskell-mode/
for a demonstration of the mode in action
Is there anything wrong with the following program?
test :: Bool
test | True = True
test = False
main :: IO ()
main = print test
(Apart from it's apparent uselessness. :-)
ghc and hbc reject it on grounds of multiple/conflicting definitions,
but Hugs and nhc accept it.
Here's a
A question born out only of curiosity:
Can anyone provide a definition of `thread' equivalent to this:
thread :: Monad m = [a - m a] - a - m a
thread [] a = return a
thread (k:ks) a = k a = thread ks
not using pattern matching (eg. using map or fold) that does not have
a space leak?
Is there any reason for not allowing:
data Test = Test {}
in Haskell? I am generating programs where I pattern match on this
constructor: (an artificial example follows)
main = print (case Test {} of Test {} - True)
and am currently forced to make a special case of no fields, and
instead
I'm sure this must have been thought of before, but I couldn't find
any literature discussing it so...
Two questions:
1) Is it possible for a set to define a monad?
2) Does anyone know if it's possible to define an instance of monads
for sets in Haskell? Even with multi-parameter type
The Report says (Section 5.3.1 of Haskell 1.4 Report):
The Prelude module is imported automatically into all modules as if
by the statement `import Prelude', if and only if it is not imported
with an explicit import declaration. This provision for explicit
import allows values defined in
(Usual apologies if this has been noted/solved since 2.05.)
The following program (which sums [1..n] by brute force):
import System(getArgs)
data Test = Test !Int
f :: Test - Int - Test
f (Test n) i = Test (n+i)
g :: Test - Int
g (Test n) = n
sfoldl :: Eval a = (a - b - a) - a - [b] - a
(Apologies if you're aware of/fixed this problem, I have GHC 2.05 and
haven't kept up with bug fix news.)
Exporting a constructor like (:..:) seems to cause an interface file
that fails to be parsed. Hand-editing out the offending portion that
looks something like:
_exports_
Auburn_CoreGen
The Good News
-
I've tried GHC for IRIX 6.2 on my IRIX 5.3 machine and all seems well
so far, hurrah! (Thanks go to Fuad Abdallah for pointing this
possibility out and the work I know he did in helping to bring GHC
2.xx to IRIX.)
The version I used was obtained at:
I'm trying to get a version of GHC later than 0.26 up and running on
IRIX 5.3. Has anyone done this? The web material suggests they have
but no binary bundle is available yet.
I decided to have a go at compiling 0.29 with 0.26 (I presume this is
possible) as 0.26 is the only binary bundle
Has anyone written a parser for Haskell 1.4 in Haskell 1.4? Or even
for a subset of Haskell 1.4? I'm currently facing the daunting task
of doing so (admittedly only for a very small subset of Haskell).
Even just a lexer for Haskell (including the layout rule) would be
very helpful.
Has Happy
I have a small question about defining functions over types declared
with "newtype". Consider the following:
newtype MyList a = MyList [a]
myMap1 :: (a - b) - MyList a - MyList b
myMap1 f (MyList []) = MyList []
myMap1 f (MyList (x:xs)) =
case myMap1 f (MyList xs) of MyList
15 matches
Mail list logo