[Haskell] Postdoctoral position in probabilistic programming languages

2014-04-26 Thread Norman Ramsey
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

Re: RFC: migrating to git

2011-01-10 Thread 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

trouble with Trac wiki

2010-03-23 Thread Norman Ramsey
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

[Haskell] recursive definitions in Haskell (inductive and coinductive)

2010-02-02 Thread Norman Ramsey
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

Re: [Haskell] recursive definitions in Haskell (inductive and coinductive)

2010-02-02 Thread Norman Ramsey
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

Re: [Haskell] ANNOUNCE: Functional Programming Bibliography

2010-01-15 Thread Norman Ramsey
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

Re: [Haskell] Announcing Haskell 2010

2009-11-24 Thread Norman Ramsey
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

Re: Should exhaustiveness testing be on by default?

2009-05-20 Thread Norman Ramsey
  ... 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

Re: Should exhaustiveness testing be on by default?

2009-05-18 Thread Norman Ramsey
... 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

[Haskell] deriving Show for GADT?

2009-04-13 Thread Norman Ramsey
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

[Haskell] how can I refer to a symbol in a module that is imported 'qualified'?

2009-04-11 Thread Norman Ramsey
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

[Haskell] seeking papers with good examples of the use of GADTs

2009-04-10 Thread Norman Ramsey
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.

[Haskell] Re: scoped type variables

2009-03-16 Thread Norman Ramsey
[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.

[Haskell] writing a shell in Haskell

2009-01-13 Thread Norman Ramsey
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

Re: [Haskell] Spam on HaskellWiki

2008-12-20 Thread Norman Ramsey
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

Re: [Haskell] Abusing quickcheck to check existential properties

2008-10-22 Thread Norman Ramsey
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

Re: [Haskell] Abusing quickcheck to check existential properties

2008-10-18 Thread Norman Ramsey
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

Re: [Haskell] Abusing quickcheck to check existential properties

2008-10-14 Thread Norman Ramsey
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))

[Haskell] Abusing quickcheck to check existential properties

2008-10-12 Thread Norman Ramsey
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

Re: [Haskell] Compiler Construction course using Haskell?

2008-08-22 Thread Norman Ramsey
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

Re: [Haskell] Compiler Construction course using Haskell?

2008-08-21 Thread Norman Ramsey
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

Re: Version control systems

2008-08-10 Thread Norman Ramsey
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

Re: Version control systems

2008-08-09 Thread Norman Ramsey
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

Re: [GHC] #2257: validate hangs in configure

2008-05-05 Thread Norman Ramsey
#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

Re: [Haskell] Fingerprints and hashing

2007-10-15 Thread Norman Ramsey
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

Re: [Haskell] pretty-printing Haskell with automatic parens?

2007-10-15 Thread Norman Ramsey
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

Re: [Haskell] question about a failure to generalize

2007-09-17 Thread Norman Ramsey
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

[Haskell] question about a failure to generalize

2007-09-15 Thread Norman Ramsey
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

Re: ghc 6.6 Debian packages

2007-07-05 Thread Norman Ramsey
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

Re: [Haskell] Re: state of HaXml?

2007-01-04 Thread Norman Ramsey
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

Re: [Haskell] Re: state of HaXml?

2006-12-30 Thread Norman Ramsey
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

[Haskell] state of HaXml?

2006-12-27 Thread Norman Ramsey
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

inlining higher-order-functions?

2006-12-21 Thread Norman Ramsey
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'.

bug in GHC master Makefile

2006-12-12 Thread Norman Ramsey
'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

[Haskell] Re: GHC Error question

2006-12-07 Thread Norman Ramsey
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

Re: [Haskell] Re: GHC Error question

2006-12-07 Thread Norman Ramsey
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

Re: [Haskell] GHC Error question

2006-12-06 Thread Norman Ramsey
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

[Haskell] Re: GHC Error question

2006-12-06 Thread Norman Ramsey
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

Re: [Haskell] GHC Error question

2006-12-05 Thread Norman Ramsey
[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.

[Haskell] GHC Error question

2006-12-05 Thread Norman Ramsey
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)

Re: darcs patch: initial, very incomplete tags generator (and 16 more)

2006-10-14 Thread Norman Ramsey
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:

Re: darcs patch: initial, very incomplete tags generator (and 16 more)

2006-10-14 Thread Norman Ramsey
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

ghci and terminal settings

2005-04-21 Thread Norman Ramsey
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

happy Haskell hacking for compiler writers

2003-11-07 Thread Norman Ramsey
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

learning to love laziness

2003-09-24 Thread Norman Ramsey
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

clueless GHCI user wishes to load QuickCheck

2003-03-11 Thread Norman Ramsey
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:

Re: seeking ideas for short lecture on type classes

2003-01-27 Thread Norman Ramsey
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

Re: seeking ideas for short lecture on type classes

2003-01-26 Thread Norman Ramsey
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

seeking ideas for short lecture on type classes

2003-01-24 Thread Norman Ramsey
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

input format for heap profiler hp2ps?

2002-07-25 Thread Norman Ramsey
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

Re: trouble with Debian package ghc5

2002-05-28 Thread Norman Ramsey
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_

trouble with Debian package ghc5

2002-05-27 Thread Norman Ramsey
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

type classes and generality

2001-07-09 Thread Norman Ramsey
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

Re: type classes and generality

2001-07-09 Thread Norman Ramsey
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

Re: Interesting: Lisp as a competitive advantage

2001-05-03 Thread Norman Ramsey
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

help wanted with type error message

2001-04-04 Thread Norman Ramsey
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 --

monadic source of randomness

2000-08-09 Thread Norman Ramsey
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

Re: monadic source of randomness

2000-08-09 Thread Norman Ramsey
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