There is a postdoc opening in my group for work on probabilistic
programming languages. Connections with Haskell are strong, and
several members of our team are building prototypes in Haskell.
I'd welcome applications from scientists with skills or interests
in Haskell.
Norman Ramsey
It's time to consider again whether we should migrate GHC development
from darcs to (probably) git.
I'd be thrilled to see GHC migrate to git, and I'd be much more likely
to make new contributions to the back end.
The rest of this email contains observations about my own experience
with
I'm trying to log into the trac wiki, and I'm logging in OK, but it says
my privileges are restricted until I verify my email address.
However, the promised opportunity to verify never arrives.
I've checked the spam folder and various other places---not finding it.
I could be doing something
I'd appreciate a word from the experts to see if my understanding
of recursive definitions in Haskell is correct---I would hate to
be telling my students pernicious lies.
Haskell permits recursive definitions at both the type level and the
term level. Here's an example definition at the type
AFAIK, the normal understanding is that recursive types
are the least fixed points of endofunctors on the category of CPOs,
and it is the CPO property that least upper bounds of chains exist
that forces the existence of infinite lists.
But ML has CPOs and infinite chains too! The
Allow (registered?) users to submit links to papers that are missing?
Yeah, I've certainly been thinking about that.
First, I will somehow have to overcome being a complete control freak.
The very first thought that crosses my mind is
how will I ensure that author names are well
I'm very proud to announce a new revision of the Haskell language,
Haskell 2010.
I stand up and cheer. It's great to see fruit from so many years of
effort, and I am very grateful to the Haskell-prime committee for all
this work, and for the improvements.
I look forward to using the new
... exhaustive pattern checking might well help out a lot of
people coming from untyped backgrounds...
Or even people from typed backgrounds. I worship at the altar of
exhaustiveness checking.
Do you really want exhaustiveness, or is what you actually want safety?
I want
... exhaustive pattern checking might well help out a lot of
people coming from untyped backgrounds...
Or even people from typed backgrounds. I worship at the altar of
exhaustiveness checking.
Anyone know why it isn't the default?
I have been bleating to GHC Central about the generally
I've got a fairly large GADT for which I wished to use
deriving (Show)
but I got a mysterious error message:
Exp.hs:13:11:
Can't make a derived instance of `Show (Exp a)'
(`Exp' has non-Haskell-98 constructor(s))
In the data type declaration for `Exp'
This is from GHC. Does
I need to resolve a name clash between two different Haskell modules
that want to use the same infix operator (*). The Haskell 98
report says that
modid.varsym
is permitted, but I can't get it to work.
In their entirety here are Test.hs:
module Test
where
import qualified
I have a class of beginning functional programmers; we're approaching
end of term, and I'd like them to learn about GADTs. One of my goals
in the class is to give students practice learning by reading papers,
so I am asking for recommendations of papers that have good examples
of GADTs in action.
[Opening discussion to broader audience: I asked Simon PJ about
scoped type variables and type abbreviations]
| With scoped type variables, it would be useful to be able to define
| a type abbreviation in a where clause, so that the scoped
| type variable could be used on a right-hand side.
As a demo for the first day of class, I thought I'd try to write a
simple shell in Haskell, in part so I can show algebraic data types
and monads on the first day, but also to convince potential skeptics
that functional languages can do systemsy things.
All the usual functional stuff is going
This is beginning to annoy people. Actually, someone registered several
thousand accounts (of the form XX), though almost all of them
have not been used. The others have been used to add spam.
For almost 2 years I have been working with Fidelis Assis to adapt his
email spam filter
I guess what I would like is to reuse most of the mechanisms in
QuickCheck to have it say one of these two things:
1. Found an satisfying instance after 73 tries: [gives instance]
2. After 100 tries, could not find a satisfying instance.
Like failure, the first tells
The answer is that QuickCheck can't correctly constructively verify an
existential condition without a constructive mechanism to generate the
existential (i.e. the Skolem function mentioned before).
I agree but don't think it's relevant. QuickCheck can't verify a
universal either.
If
But how do I use QuickCheck to check an existential?
The standard method in QuickCheck is to be constructive, and
actually implement the function that constructs for the value. So,
instead of
forAll x . exists y . P(x,y)
you write
forAll x . P(x, find_y(x))
I recently used QuickCheck to check on some calculations for image compression.
(I love exact rational arithmetic!) But I thought only to check for
inverse properties, and I realized afterward I had failed to check for
ranges. For example I should have checked that
boundedB block = -1 = b b
On Fri, Aug 22, 2008 at 02:46, Norman Ramsey [EMAIL PROTECTED] wrote:
In Fall 2006 I gave a graduate course in advanced functional programming
in which the default project was a compiler from a functional language of
the student's own design to the 2D circuit language invented
I plan to give a course in compiler construction,
using Haskell as the implementation language
(not as source or target language).
Something along these lines:
1. combinator parsers (Parsec),
2. simple interpreter (arithmetical expressions)
3. add algebraic data types, functions
On Sat, Aug 09, 2008 at 06:56:23PM -0400, Norman Ramsey wrote:
* Our long-term goal should be to get the *entire* Haskell
development community to agree on a version-control system---one
that is not darcs. We should expect this process to take several
years, and we
As a very part-time, temporarily inactive GHC developer I will offer
some opinions which should carry no weight:
* When I saw the announcement, I cheered! Last fall, I lost 2 weeks
of a 9-week visit to darcs hell. While the alleged features may
be alluring, the software simply doesn't
#2257: validate hangs in configure
Can you attach the exact program (using nanosleep) that's being run, and
the command line used to build and run it please?
Done.
And can you check that `timer_delete` succeeds (it should return 0).
No time; have to run to an appointment.
N
Simon Peyton Jones writes:
We are all familiar with the idea of an MD5 checksum, which provides a
reliable fingerprint for a file, usually 128 bits or so...
For various applications (including identifying common sub-expressions, and
version tracking in GHC), I'd like a Haskell library
The haskell-src package contains a pretty-printer for Haskell syntax that
requires parentheses to be explicitly placed in the (abstract) syntax
representation. I have some code for automatically inserting parentheses
where necessary (for use before pretty-printing), but I'm guessing
If so, try working around the monomorphism restriction by changing
from a pattern binding to a function binding.
fold f = foldRegsUsed f
Brilliant. I hadn't known about the monomorphism restriction.
Now I know it's a 'necessary evil'. Thanks!
Norman
Dear Haskellers,
I've had a Haskell program rejected for reasons I don't understand.
Here's the relevant bit of code; the problem is that I expected the
type-inference engine to generalize the abbreviation 'fold' to an
overloaded function, but it doesn't---to make the code work, I had to
expand
On Thu, Jul 05, 2007 at 11:15:03AM +0200, Christian Maeder wrote:
Hi,
our developers that have a debian system (i.e Ubuntu) and want to
compile our sources with ghc complain that they have to install many
extra library packages one after another.
Compiling fails at various
There seems to be a misunderstanding here: readFile in itself is not the
solution. readFile is defined thus:
readFile name= openFile name ReadMode = hGetContents
and the original code was this:
load fn = do handle - IO.openFile fn IO.ReadMode
The simplest thing is to use readFile (from the Prelude) instead of
using handles. readFile will take care of everything for you when the
time is right.
Thanks---I'll try it. Somehow my hoogle query missed readFile...
undoubtedly because I asked for 'String - IO String' instead
of
I have some XML things to take care of, and I had hoped to use
a nice functional language with combinators. But I'm having
trouble getting HaXml to do anything useful. Here is a program
that I wrote just to read in the XML and prettyprint it.
But it fails with an error message. The 'expat' tool
I've just discovered the {-# INLINE #-} pragma, but it's not
doing as much for me as I had hoped.
My example is complicated, so let me present a simpler analogy.
Suppose I defined
compose :: (b - c) - (a - b) - (a - c)
compose f g = \x - f (g x)
I can easily persuade GHC to inline 'compose'.
'make uninstall' silently does nothing:
: [EMAIL PROTECTED] 10261 ; make -n uninstall
for i in ; do \
if test $i; then\
echo rm -f /usr/local/bin/`basename $i`;\
rm -f
Regarding the quantification: in ML (OCaml) we can write
let foo (x:'a) y = (x+1,(y:'a))
That does not mean that foo has the type forall 'a. 'a - 'a - ...
Type annotations in OCaml are completely broken and always have been.
They use 'unifies with' instead of 'is an instance of' and it
The analogous declaration in *Standard* ML, which gets this right, is
fun 'a foo (x:'a) y = (x + 1, (y:'a))
Following up my own post, I thought it might be kind to explain the
arcana of the SML syntax. The explicit 'a between 'fun' and 'foo' is
SML syntax for an explicit type-lambda (or
Message- From:
| [EMAIL PROTECTED] [mailto:glasgow-haskell-users-
| [EMAIL PROTECTED] On Behalf Of Norman Ramsey Sent: 06 December 2006
| 01:41 To: Simon Peyton-Jones Cc: GHC users Subject: Re: [Haskell] GHC
| Error question
|
| [redirecting to ghc users]
|
| It looks like
Norman Ramsey wrote:
compile1 :: (Builder b box) = t - Name - Ir.ANF - b t
compile1 f x body = do env - compile body empty
wire (Arg W) (env x)
return f
class (Monad b) = Builder b box where
wire
[redirecting to ghc users]
It looks like a splendid error to me.
I'm not sure if you meant the error or the message was splendid :-)
I yelled for help because my usual strategy failed. That strategy is
1. Remove the type annotation.
2. Get ghci to tell me what the 'right type' is.
Without going too deep into the details of my type classes, I have
written the following code (focusing on compile1):
{-# OPTIONS -fglasgow-exts #-}
compile1 :: (Builder b box) = t - Name - Ir.ANF - b t
compile1 f x body = do env - compile body empty
wire (Arg W)
Hi,
since you both only mention hasktags as an alternative, I
wonder how ghctags relates to :ctags/:etags in ghci?
http://haskell.org/ghc/docs/6.6/html/users_guide/ghci-commands.html
Doco suggests that this code is just calling hasktags.
How would I know for sure?
Norman:
Hello nr,
Saturday, October 14, 2006, 12:30:54 AM, you wrote:
The ultimate goal is to replace hasktags with
a tags generator based on GHC-as-a-library.
is this working at this time? how i can download/use it?
It works, but there are two serious problems:
1. Incorrect
Folks,
I think maybe ghci is scrambling my terminal settings under Linux.
I hear if I send you some mail, I may get some useful information.
Norman
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
I'm curious about using purely functional data structures to represent
a control-flow graph in a compiler. I'm working on a compiler that
uses this model:
1. Build a control-flow graph
2. Execute a million optimization steps, each of which makes a small
mutation to the control-flow
Consider the following Haskell function:
asPair x = (fst x, snd x)
This function has type forall a b. (a, b) - (a, b)
and is almost equivalent to the identity function, except it
can be used to make programs terminate that might otherwise fall
into a black hole.
My students are extremely
Can anyone help me figure out how to load QuickCheck into GHCI?
QuickCheck is included in my Debian package, but my attempts
at loading it are bootless:
Prelude :load QuickCheck
can't find module `QuickCheck'
Prelude :load util/QuickCheck
can't find module `util/QuickCheck'
Prelude :info
syntax:
Now that I have made it abundantly clear that my understanding of type
classes is highly imperfect, perhaps I will repeat my plea:
* Can you recommend any interesting, elementary examples?
* Of all the many articles on the topic, which few might you
recommend for beginners? Would
In a fit of madness, I have agreed to deliver a 50-minute lecture
on type classes to an audience of undergraduate students. These
students will have seen some simple typing rules for F2 and will
have some exposure to Hindley-Milner type inference in the context
of ML.
Will
especially in need of a guide to the literature, as
the `Haskell bookshelf' at haskell.org is silent on the topic
of type classes.
Please send me your recommendations.
Norman Ramsey
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman
We're working on a heap profiler, and we'd like to use the hp2ps program
that was developed by David Wakeling and is distributed with GHC.
Unfortunately, the man page is, shall we way, a bit terse on the subject
of the input format expected by hp2ps. How should we discover more
information about
However, it seems you are right: whenever _some_ ghc package needs
util, it will implicitly depend on libreadline being installed, even
if readline is never really linked to.
So, what can be done?
The hot-fix is to install libreadline4-dev.
Done. Works. Thanks.
I _could_
I'm trying to compile some Haskell code using Debian package ghc5,
and it fails to find -lreadline at link time. Looks like a config
problem because hte library is sitting there in /lib.
I'm cc-ing the GHC bug list even though this looks to me like a Debian
problem.
Hope this info is what
I'm trying to model probability and leave the
representation of probability unspecified other than
it must be class Real. But I'm having trouble with
random numbers; how can I show that if a type has class Real,
it also has class Random.Random? Is there a way to accomplish
this goal other than
On 09-Jul-2001, Norman Ramsey [EMAIL PROTECTED] wrote:
I'm trying to model probability and leave the
representation of probability unspecified other than
it must be class Real. But I'm having trouble with
random numbers; how can I show that if a type has class Real,
it also has
http://www.paulgraham.com/paulgraham/avg.html
I wonder how Haskell compares in this regard.
I loved Graham's characterization of the hierarchy of power in
programming languages:
- Languages less powerful than the one you understand look impoverished
- Languages more powerful than the
I'm learning Haskell, and I'm having trouble understanding the meaning
of a `context' as applied to the declaration of an algebraic datatype.
I would like to say the following:
A formula is a predicate over environments.
class Formula f where
eval:: f a - Environment a - Bool --
Does anybody know of work using monads to encapsulate a source of
random numbers? A quick web search suggested Haskell 98 did not take
this path. I'd be curious for any insights why, or any suggestions
about a `randomness monad'.
Norman
Does anybody know of work using monads to encapsulate a source of
random numbers?
Is the global random number generator, in section 17.3 of the Haskell
98 library report, the sort of thing you're after?
No; that appears to embed a generator in the IO monad.
Not what I'd hoped
58 matches
Mail list logo