On Sun, 2 Jan 2005 [EMAIL PROTECTED] wrote:
> I tried to generalize one of my old
> packages for quantum *abstract* computations, where state vectors are
> defined as functional objects, whose codomain has some arithmetic.
> It is easy to see that you can define (f <+> g) = \x -> f x + g x
> etc.
Conor McBride has pointed out a really interesting issue with
macro-expressing GADT in typeclasses, outlined in the previous
message. Suppose we have a GADT "OpenExpression env r" for
lambda-expressions, and we define
newtype Expression r = MkExpression (forall env. OpenExpression env r)
to ab
G'day all.
Quoting Conor McBride <[EMAIL PROTECTED]>:
> Where now? Well, counterexample fiends who want to provoke Oleg into
> inventing a new recipe had better write down a higher-order example.
> I just did, then deleted it. Discretion is the better part of valour.
Thankfully, I'm the sort of
In article
<[EMAIL PROTECTED]
ft.com>,
"Don Syme" <[EMAIL PROTECTED]> wrote:
> We still frequently talk about doing either Haskell.NET or a strict
> language much closer to Haskell (perhaps as a stepping stone to doing
> Haskell). But neither are currently active projects.
I've heard complaint
That's out of date - I abandoned my first effort to do ghc.net in favour
of doing a strict functional language first - F# is the result
(http://research.microsoft.com/projects/fsharp).
We still frequently talk about doing either Haskell.NET or a strict
language much closer to Haskell (perhaps as
From the GHC docs:
type ReadS a = String -> [(a, String)]
A parser for a type a, represented as a function that takes a String and
returns a list of possible parses (a,String) pairs.
So it returns all possible parses, hence the list. This is useful if
the encoding is ambiguous.
Henning Thielem
What is the reason for the definition
ReadS a = [(a, String)]
not being
ReadS a = Maybe (a, String)
? The latter one reflects that either one or no value is read, whereas the
first definition allows an arbitrary number of read values which is
confusing and unsafe in my opinion.
Hi!
I'm also interested, how to get this example working:
http://www.haskell.org/pipermail/haskell/2001-November/008336.html
This seems to be an old discussion:
http://www.haskell.org/pipermail/libraries/2001-April/000358.html
Was a strictReadFile implemented in the meantime?
Here's my implemen
Does someone know more about the Haskell interface to the Structured Audio
Orchestra Language as presented at
http://sourceforge.net/projects/hassoal/ ?
I was not able to contact the author.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
htt
I'm also interested, how to get this example working:
http://www.haskell.org/pipermail/haskell/2001-November/008336.html
This seems to be an old discussion:
http://www.haskell.org/pipermail/libraries/2001-April/000358.html
Was a strictReadFile implemented in the meantime?
___
Conor,
I thought you might like this... It shows how to do this without
phantom types! (we just use scoped type variables to help the
typechecker sort things out)... What do you think? Does this overcome
all the problems with Olegs approach? (the only slight problem I have
found is that you
Henning Thielemann cites myself
I am afraid that something is wrong with my understanding of multi-
param classes with dependencies. I tried to generalize one of my old
packages for quantum *abstract* computations, where state vectors are
defined as functional objects,...
class Vspace a v | v -> a
Hi again
Actually, things are a little weirder than I first thought...
Me:
The latter also means that the existential type encoding of 'some good
term' doesn't give you a runnable term. There is thus no useful
future-proof way of reflecting back from the type level to the term
level. Any existentia
On Sun, 2 Jan 2005 [EMAIL PROTECTED] wrote:
> I am afraid that something is wrong with my understanding of multi-
> param classes with dependencies. I tried to generalize one of my old
> packages for quantum *abstract* computations, where state vectors are
> defined as functional objects, whose c
I would suggest defining types for unit and functions...
data Scalar a = Scalar a
data Function c v = Function c v
instance VSpace a (Scalar a) ... -- replaces 'a'
instance VSpace a (Function c a) ... -- replaces c -> a
instance VSpace a v => a (Function c v) ... -- replaces c -> v
Here Scalar is j
Hello again,
Actually ran the original code (on the same file, still using
gnome-terminal). I noticed that it sped up as it went along, so it
didn't actually take quite as much time as I originally thought it
might.
real 13m5.190s
user6m1.595s
sys 0m3.061s
By the way, the finitemap code
Hello,
I found the following implementation using finite maps to work rather
well. (See
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data.FiniteMap.html)
---
import Char
import Data.FiniteMap
isLetter c = isAlphaNum c || c=='\''
normalize = map toLower . filter isL
17 matches
Mail list logo