Hi,
I have the following definitions
type Zero
type Succ a
so that I can muck around with a Vector type that includes its length
encoded in its type.
I was wondering whether it was possible to use SmallCheck (or
QuickCheck) to generate random Peano numbers? Is there an issue here
in that what
Richard A. O'Keefe wrote:
- what you get is a reference to a variable (as you do in Scheme)
but loop variables really are variables, not names for values,
so lambdas created in different iterations of the same loop point
so the same loop variable, and do not remember the value it had
On 19 Jun 2008, at 5:53 pm, Jules Bean wrote:
Richard A. O'Keefe wrote:
- what you get is a reference to a variable (as you do in Scheme)
but loop variables really are variables, not names for values,
so lambdas created in different iterations of the same loop point
so the same loop
Richard A. O'Keefe wrote:
The mutablity of r here really isn't a problem. Nor is the mutability
of variables _as such_ really the problem in the PHP proposal.
The problem is that it's the *same* variable every time. If PHP
loops introduced new bindings on every iteration, this particular
On Wed, Jun 18, 2008 at 5:41 PM, Duncan Coutts
[EMAIL PROTECTED] wrote:
And isn't 100 columns a bit non-standard for a default? I thought 80
columns had more traction? I know that's what my terminals are at...
Yeah. I'd vote for 80. That's what we use in pretty printing messages in
Cabal.
Hello,
On Wednesday 18 June 2008 22:13, Alfonso Acosta wrote:
Hi,
Can anyone give a good explanation of what ribbonsPerLine means?
Maybe it would be better to simply ask for the meaning of ribbon in
this context. The documentation is totally meaningless to me:
reibbonsPerLine: Ratio of
jinjing [EMAIL PROTECTED] writes:
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
Isn't this (roughly?) the same as flip ($)?
As a side note, may I advise you to use another symbol, and leave the
poor dot alone?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
A few days ago I uploaded dataenc 0.11[1] and omnicode 0.2[2].
The short description of the (most visible) changes would be the added
support for Base85 encoding and decoding in dataenc.
The dataenc package (version 0.11)
Data encoding library
Hi
Actually, you ought to be able to pretty easily remove this tradeoff
by introducing a strict read function as a new method in your class.
So anyone who wants to strictly read lazy data can use that function
instead of the lazy one.
Not quite, the library is written so that strict fields
On Thu, 2008-06-19 at 11:33 +0800, jinjing wrote:
Hi guys,
This is my second attempt to learn Haskell :)
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
Note that if you redefine (.) composition to be
http://article.gmane.org/gmane.comp.gcc.patches/165063
--
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited.
On 2008.06.19 11:33:56 +0800, jinjing [EMAIL PROTECTED] scribbled 0.5K
characters:
Hi guys,
This is my second attempt to learn Haskell :)
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
So for example, 99
Evan Laforge schrieb:
byorgey: fons: I can't explain it, all I know is that you must set it
to 1 or else it does bizarre things
fons: hahah, ok
fons: byorgey: that's funny considering its default value is 1.5
byorgey: if you set it to 1 then lineLength means what you think it should
byorgey:
To answer the original question (in the subject line),
The ribbon ratio is the number of times the ribbon fits into a line.
The ribbon is the number of characters on a line excluding leading
and trailing white spaces.
See also the original paper on which the Text.PrettyPrint.HughesPJ
Is there a way of accessing a remote Oracle database by one of the common
Haskell database interfaces (HaskellDB, Takusen, etc.) ? I tried to get
unixODBC and Oracle's Instant Client running on a Linux machine, but I'm
trapped in the notorious error:
$ isql USER -v
[IM004][unixODBC][Driver
Hi all,
Has anyone else experienced segfaults related to network stuff? Observe:
[11:50:56 [EMAIL PROTECTED]:~]$ ghci -ignore-dot-ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude :m +Text.HTML.Download
Prelude
Cool, Either looks like what I'm looking for. I'll have to look into
that. What do I do about the fact that both HttpRequest and
HttpResponse have some of the same named fields (headers and body, for
example). Seems a pain to drop them into separate modules just so I can
keep the naming
On 2008.06.14 08:56:34 +0100, Duncan Coutts [EMAIL PROTECTED] scribbled 1.3K
characters:
On Fri, 2008-06-13 at 22:10 -0400, Gwern Branwen wrote:
I think this may be Cabal's fault anyway. The yi.cabal includes the line:
build-tools: alex = 2.0.1 3
in the 'executable yi'
On Wed, Jun 18, 2008 at 11:00 AM, Evan Laforge [EMAIL PROTECTED] wrote:
Inclusion in the official Data.Binary would be nice, especially if it
could be a drop-in replacement, say by changing the Data.Binary
instance definitions to Strict.Binary or something.
I have a class defined to abstract
On Wed, Jun 18, 2008 at 11:07 AM, Bryan O'Sullivan [EMAIL PROTECTED] wrote:
If you provide Applicative and Alternative instances for your getter
monads (perhaps you already do?)
I have Alternative instances, and they're used a fair bit in my HTTP
parser (network-minihttp). You're right that I
Hi Levi,
so that I can muck around with a Vector type that includes its length
encoded in its type.
I suppose you have some operations over these vectors, such as
nil :: Vec Zero a
(|) :: a - Vec n a - Vec (Succ n) a
If so, you could write a SmallCheck Series instance as follows.
On Thu, Jun 19, 2008 at 12:00 PM, Brent Yorgey [EMAIL PROTECTED] wrote:
Hi all,
Has anyone else experienced segfaults related to network stuff? Observe:
Well, just to keep everyone updated, I suddenly remembered that
cabal-install now writes log information! =D So I looked in the logs and
* On Thursday, June 19 2008, Ketil Malde wrote:
As a side note, may I advise you to use another symbol, and leave the
poor dot alone? Overloading it as a module separator is bad enough.
If you have a keyboard that allows greater-than-ascii input, there are
plenty of options: « » ¡ £ ¥ ł € ® ª...
On Thu, 2008-06-19 at 07:25 +0100, Jules Bean wrote:
Richard A. O'Keefe wrote:
The mutablity of r here really isn't a problem. Nor is the mutability
of variables _as such_ really the problem in the PHP proposal.
The problem is that it's the *same* variable every time. If PHP
loops
Hello
I'm using HaXml library to handle XML.
How I solve this issue when call readXml:
in score-partwise, In a sequence:
in part, In a sequence:
in measure, Too many elements inside measure at
file ../../../parsers/elite2.xml at line 75 col 15
Found excess:
Done.
I don't
Levi Stephen schrieb:
Hi,
I have the following definitions
type Zero
type Succ a
so that I can muck around with a Vector type that includes its length
encoded in its type.
I was wondering whether it was possible to use SmallCheck (or
QuickCheck) to generate random Peano numbers? Is there an
I've been looking for awhile now for a simple way to get truetype fonts into
my visualizations so I can abandon the hideous GLUT fonts and make things
that look like they were developed in the 1990s instead of back in the days
of TRON. I found FTGL, but I'm mostly a Haskell developer these days,
hi,
i'm having problems with a very simple example using conal elliott's
'reactive' library:
module Main where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Data.Reactive
import System.Random
main :: IO ()
main = do
(e, snk) - mkEvent
forkIO $
2008/6/19 jinjing [EMAIL PROTECTED]:
encode xs = xs.group.map token where token x = (x.length, x.head)
Working in this direction is a question of taste, but the choice of
the dot for the operator is a pretty bad idea...
On the other hand, my favourite would be :
encode = map (length head) .
If it helps, feel free to use a different name for the data constructors
and their data type until the difference is painfully clear to you
(maybe suffix the constructor with a C or prefix by Mk).
Data types and constructors live in different namespaces and can happily
use the same
Hello,
I am HDBC with the Postgres driver. I am trying to read a simple date column
from the DB:
stmt - DB.prepare conn SELECT date FROM my_table ORDER BY date DESC LIMIT
1
DB.execute stmt []
DB.commit conn
rows - fetchAllRows' stmt
let ((d:_):_) = rows
the d variable is of type:
SqlEpochTime
I've been looking for awhile now for a simple way to get truetype fonts into
my visualizations so I can abandon the hideous GLUT fonts and make things
that look like they were developed in the 1990s instead of back in the days
of TRON. I found FTGL, but I'm mostly a Haskell developer these days,
On Thu, Jun 19, 2008 at 3:35 AM, Ketil Malde [EMAIL PROTECTED] wrote:
jinjing [EMAIL PROTECTED] writes:
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
Isn't this (roughly?) the same as flip ($)?
As a side
for monetary reasons.
I just wanted my voice to be heard, you may pass on now.
--
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
On Mon, 2008-06-16 at 13:25 +0100, Claus Reinke wrote:
The main point of the Program abstraction is about configuring and
running programs. As it happens some programs are provided by some
haskell packages (but not all, eg ld, ar, etc).
option to get version info and code to extract it
http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse says
(and my memory seems to agree) that GHC has been changed to accept
things like
readnums f n = do eof - hIsEOF f
if eof
then return n
else do l - hGetLine f
On 2008 Jun 18, at 23:23, Tim Newsham wrote:
I can't seem to find any other way short of making a whole new GC
(as is done in Gtk2Hs/demos/graphic/Drawing.hs). Am I missing
something? Is there a reason the GC's arent retrievable?
Join the gtk2hs list (
On 2008 Jun 19, at 12:28, Stephen Howard wrote:
Cool, Either looks like what I'm looking for. I'll have to look
into that. What do I do about the fact that both HttpRequest and
HttpResponse have some of the same named fields (headers and body,
for example). Seems a pain to drop them
In the specific case of parsing --version strings, I'm not sure regexes
are any easier. Using words and then selecting the Nth word seems to do
pretty well.
for comparison, see the examples below:-) There's no reason
this can't be massaged further, but it already allows for IO if
necessary (I
On Wednesday 18 June 2008, Luke Palmer wrote:
I don't know that much PHP, but I find the lexical keyword to be a
nuisance. What are the semantics if the lexical keyword is omitted?
In PHP Variables are local by default, the keyword global defines them as
references to the global namespace.
CC to Christian Seiler
http://www.haskell.org/pipermail/haskell-cafe/2008-June/044379.html
http://www.haskell.org/pipermail/haskell-cafe/2008-June/thread.html
On Wednesday 18 June 2008, Luke Palmer wrote:
* A closure must be able to call itself recursively (via a
higher-order function
Adam Vogt wrote:
While we are kind of on this topic, what makes the characters ħ þ prefix
operator by default, while º and most other odd ones infix?
alphanumeric vs non-alphanumeric
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
If so, you could write a SmallCheck Series instance as follows.
instance Serial (Vec Zero a) where
series = cons0 nil
instance (Serial a, Serial (Vec n a)) = Serial (Vec (Succ n) a) where
series = cons2 (|)
If we have the property
prop_vector :: Vec (Succ (Succ Zero)) Bool -
On Fri, Jun 20, 2008 at 3:30 AM, Benedikt Huber [EMAIL PROTECTED] wrote:
Levi Stephen schrieb:
Hi,
I have the following definitions
type Zero
type Succ a
so that I can muck around with a Vector type that includes its length
encoded in its type.
I was wondering whether it was possible
On Thu, 2008-06-19 at 15:24 -0400, Brent Yorgey wrote:
On Thu, Jun 19, 2008 at 3:35 AM, Ketil Malde [EMAIL PROTECTED] wrote:
jinjing [EMAIL PROTECTED] writes:
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
I just upgraded to ghc-6.8.3, using a linux binary, and I am having a
problem compiling Haddock. Haddock 2.1.0 and Haddock 2.0.0.0 both
fail to build under ghc-6.8.3, but they both build successfully with
ghc-6.8.2. I don't know if this is a Haddock problem, or a GHC
problem, or perhaps
Is there a way of accessing a remote Oracle database by one of the common
Haskell database interfaces (HaskellDB, Takusen, etc.) ? I tried to get
unixODBC and Oracle's Instant Client running on a Linux machine, but I'm
trapped in the notorious error:
Takusen's Oracle backend uses the Oracle
Jefferson Heard [EMAIL PROTECTED] wrote:
I've been looking for awhile now for a simple way to get truetype
fonts into my visualizations so I can abandon the hideous GLUT fonts
and make things that look like they were developed in the 1990s
instead of back in the days of TRON. I found FTGL,
Benedikt
Despite the name, neither I nor John Hughes are actively maintaining this
library, so if you have got some better implementations of 'cat' and 'sep', do
please submit a patch. That's how it'll improve.
Do test carefully! Preferably add some Quickcheck tests too.
Thanks
Simon
|
Albert Y. C. Lai [EMAIL PROTECTED] writes:
While we are kind of on this topic, what makes the characters ħ þ
prefix operator by default, while º and most other odd ones infix?
alphanumeric vs non-alphanumeric
Testing this, I find that isAlpha is True also for 'º', but as the OP
claims,
50 matches
Mail list logo