My understanding of OutsideIn leads me to believe that GHC 7.8 has the behavior
closer to that spec. See Section 5.2 of that paper
(http://research.microsoft.com/en-us/um/people/simonpj/Papers/constraints/jfp-outsidein.pdf),
which is a relatively accessible explanation of this phenomenon.
I just hit a similar error the other day. I think the gist of it is that
there are two perfectly good types, and neither is more general than the
other. A slightly different example shows why more clearly:
foo (AInt i) = (3 :: Int)
Now, what type should this have?
foo :: Any a - a
foo :: Any
Hi.
Daniel is certainly right to point out general problems with GADT
pattern matching and principal types. Nevertheless, the changing
behaviour of GHC over time is currently a bit confusing to me.
In GHC-6.12.3, Doaitse's program fails with three errors (demo1,
demo2, demo4, all the GADT
-Jones [mailto:simo...@microsoft.com]
Sent: dinsdag 10 september 2013 14:19
To: Holzenspies, P.K.F. (EWI)
Cc: glasgow-haskell-users@haskell.org
Subject: RE: Question about correct GHC-API use for type checking (or zonking,
or tidying)
What goes wrong if you follow my suggestion below
...@utwente.nl [mailto:p.k.f.holzensp...@utwente.nl]
Sent: 03 September 2013 14:18
To: Simon Peyton-Jones; glasgow-haskell-users@haskell.org
Subject: RE: Question about correct GHC-API use for type checking (or zonking,
or tidying)
Dear Simon, et al,
I had a chance to try it now. The strange thing
; glasgow-haskell-users@haskell.org
Subject: Re: Question about correct GHC-API use for type checking (or zonking,
or tidying)
I feel so unbelievably ignorant now. I thought with all the IORefs in the type
checking process that zonking did this in these refs. Somehow I started
thinking that some
...@utwente.nl,glasgow-haskell-users@haskell.org
Subject: RE: Question about correct GHC-API use for type checking (or zonking,
or tidying)
Haskell is a *functional* language. Consider
say $ pre-zonk: ++ pp all_expr_ty
zonkTcType all_expr_ty
say $ post-zonk: ++ pp all_expr_ty
pp
Haskell is a *functional* language. Consider
say $ pre-zonk: ++ pp all_expr_ty
zonkTcType all_expr_ty
say $ post-zonk: ++ pp all_expr_ty
pp is a pure function; it is given the same input both times, so of course it
produces the same output.
If you collect the result of
Hi Jane,
On Mon, Feb 21, 2011 at 11:46:16PM -0800, Jane Ren wrote:
Did you mean I have to include the dflags like below to get the parsetree of
a base library file like libraries/base/GHC/List.lhs
I am stilling getting the same error
AstWalker: panic! (the 'impossible' happened)
-users@haskell.org
| Subject: Re: Question about Haskell AST
|
|
| Hi Jane,
|
| On Mon, Feb 21, 2011 at 11:46:16PM -0800, Jane Ren wrote:
|
| Did you mean I have to include the dflags like below to get the parsetree
| of a base library file like libraries/base/GHC/List.lhs
|
| I am stilling
-
| From: Jane Ren [mailto:j2...@ucsd.edu]
| Sent: 24 January 2011 17:20
| To: Simon Peyton-Jones; glasgow-haskell-users@haskell.org
| Subject: RE: Question about Haskell AST
|
| Hi Simon,
|
| That is exactly what I needed. However, although I was able to get the
| patterns from the parse tree for test
Does the following code help you out? (Do note it's for the GHC 6.12.* API)
It just uses the the default GHC driver, meaning you don't have to separately
call the desugerar, simplifier, etc.
It's what I use for my CλaSH tool.
Cheers, Christiaan
-- External Modules
import qualified GHC.Paths
On Mon, Jan 10, 2011 at 9:21 AM, Jane Ren j2...@ucsd.edu wrote:
Hi,
I need to be able to take a piece of Haskell source code and get an
simplified, typed, intermediate representation of the AST, which means I need
to use compiler/coreSyn/CoreSyn.lhs
So I'm first trying to get the
]
Sent: Tuesday, January 25, 2011 1:34 AM
To: Jane Ren
Cc: Simon Peyton-Jones; glasgow-haskell-users@haskell.org
Subject: Re: Question about Haskell AST
On 24 January 2011 17:20, Jane Ren j2...@ucsd.edu wrote:
When I try this, I get
AstWalker: panic! (the 'impossible' happened)
(GHC version
On 24 January 2011 17:20, Jane Ren j2...@ucsd.edu wrote:
When I try this, I get
AstWalker: panic! (the 'impossible' happened)
(GHC version 7.0.1 for x86_64-apple-darwin):
lexical error at character 'i'
It looks like you need to add the CPP extension to the DynFlags:
...@ucsd.edu]
| Sent: 24 January 2011 17:20
| To: Simon Peyton-Jones; glasgow-haskell-users@haskell.org
| Subject: RE: Question about Haskell AST
|
| Hi Simon,
|
| That is exactly what I needed. However, although I was able to get the
| patterns from the parse tree for test modules that I wrote, I
augment that wiki page.
Thanks
Jane
From: Simon Peyton-Jones [simo...@microsoft.com]
Sent: Tuesday, January 11, 2011 12:06 AM
To: Jane Ren; glasgow-haskell-users@haskell.org
Subject: RE: Question about Haskell AST
desugarModule returns a GHC.DesugaredModule
desugarModule returns a GHC.DesugaredModule
Inside a DesugaredModule is a field dm_core_module :: HscTypes.ModGuts
Inside a ModGuts is a field mg_binds :: [CoreSyn.CoreBind]
And there are your bindings! Does that tell you what you wanted to know?
Simon
PS: When you have it clear, would you
Ross Paterson r...@soi.city.ac.uk writes:
If you compile your C program with -D_FILE_OFFSET_BITS=64 you'll get the
same numbers that hsc2hs does.
Aha, that was the key to solve my problem: programs or libraries
compiled with that flag must use statfs64() instead of statfs(). Binding
to the
On Tue, Feb 02, 2010 at 03:51:18PM +0100, Jose A. Ortega Ruiz wrote:
[...] The problem is that the size and
some of the offsets of the C struct statfs computed by hsc2c are wrong:
i'm in a 32bit linux system, and i've checked, using a C program, that
sizeof(struct statfs) is 64 (hsc2 is giving
Ross Paterson r...@soi.city.ac.uk writes:
On Tue, Feb 02, 2010 at 03:51:18PM +0100, Jose A. Ortega Ruiz wrote:
[...] The problem is that the size and
some of the offsets of the C struct statfs computed by hsc2c are wrong:
i'm in a 32bit linux system, and i've checked, using a C program, that
On 29/01/2010 21:02, Tyson Whitehead wrote:
I was looking through the code for 6.12.1 and am a bit confused about 11.1.3
in the runtime system documentation docs/rts/rts.tex.
That's a very old document and is inaccurate in various ways. The
Commentary is more up to date:
On February 1, 2010 06:43:40 Simon Marlow wrote:
That's a very old document and is inaccurate in various ways. The
Commentary is more up to date:
http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts
That's good to know. Thanks for the link. : )
Cheers! -Tyson
signature.asc
Hi Tyson,
I don't think this is a bug.
type family F a b :: * - * -- F's arity is 2,
-- although its overall kind is * - * - * - *
F Char [Int] -- OK! Kind: * - *
Char :: *
[Int] :: *
So we can fill in the first two * in the kind * - * - * - * to
get *
type family F a b :: * - * -- F's arity is 2,
-- although its overall kind is * - * - * - *
I believe what you're missing is that with the definition F a b :: *
- *, F needs three arguments (of kind *) in order to become kind *.
If F a b :: * - * as stated, then F
Hi Max and Niklas,
Thank you both for your answers. I get it now.
I didn't read carefully enough to note that the explicit type on F a b was the
type of F and the type of F (although, in retrospect, this last interpretation
wouldn't have worked as we would have need at least * - * - *).
Today I received the request below. At first the URL confused me, but
apparently www.haskell.org is known under two names :-)
The request should probably be handled by someone involved in ICFP.
/M
On Wed, Sep 16, 2009 at 11:53 PM, Peter Green peter.gr...@frixo.com wrote:
Hi,
I was wondering
In case anyone else was following this, I've discovered the source of
the differing output. I had made some assumptions about when some
code would be executed based upon faulty reasoning. Without
pre-inlining those assumptions happened to hold, but they did not when
pre-inlining was enabled.
John
| When compiled with -fno-pre-inlining, my test program gives a
| different result than compiled without (0.988... :: Double, compared
| to 1.0). It's numerical code, and was originally compiled with
That's entirely unexpected. I am very surprised that turning off pre-inlining
a) affects
Simon,
Thanks for the quick reply, and also the link. I'll be sure to read
it. I don't know what pre-inlining is; I was testing different
compiler options with acovea, which indicated the performance boost.
When I tried it myself, I noticed the differing value.
I'm pretty sure the affected
Ryan Ingram discussed a question of writing
fs f g = (f fst, g snd)
so that fs ($ (1, 2)) type checks.
This is not that difficult:
{-# LANGUAGE RankNTypes, MultiParamTypeClasses -#}
{-# LANGUAGE FunctionalDependencies, FlexibleInstances #-}
class Apply f x y | f x - y where
apply ::
David Leimbach leim...@gmail.com wrote:
main = interact (unlines . lines)
This *appears* to somewhat reliably get me functionality that looks like
take a line of input, and print it out.
Is this behavior something I can rely on working?
I like the idea that lines can pull lines lazily from
Don Stewart wrote:
vigalchin:
Hello,
With Haskell Foundation,
1) Can we still publish packages on Hackage?
2) Is Hackage going away?
???
-- Don
Don, I think he's referring to your recent announcement about the
Haskell platform. And, at that thread you also mentioned
Patrick Perry wrote:
I have the following code:
IOVector n e = IOVector !ConjEnum !Int (ForeignPtr e)! (Ptr e)! Int!
newtype Vector n e = IOVector n e
unsafeAtVector :: Vector n e - Int - e
unsafeAtVector (Vector (IOVector c _ f p inc)) i =
let g = if c == Conj then conjugate else id
Er, no. A fastcgi executable is (like a cgi executable) controlled by the front
end web server. I run my fastcgi using Apache as the front end. The front
end web server will control things like the port number.
Mauricio wrote:
Hi,
I'm learnng to use fastcgi and, reading the examples,
I
ChrisK == ChrisK [EMAIL PROTECTED] writes:
ChrisK Er, no. A fastcgi executable is (like a cgi executable)
ChrisK controlled by the front end web server. I run my fastcgi
ChrisK using Apache as the front end. The front end web server
ChrisK will control things like the port
I have only used this, all of these are from Haskell:
pamac-cek10:~ chrisk$ cat /etc/apache2/other/httpd-fastcgi.conf
IfModule mod_fastcgi.c
Alias /fcgi-bin/ /Library/WebServer/FastCGI-Executables/
Directory /Library/WebServer/FastCGI-Executables/
AllowOverride None
Options None
I was able to get this working with lighttpd, and
I did had to choose a port, but only at lighttpd
configuration, not at the Haskell source.
Thanks,
Maurício
ChrisK a écrit :
I have only used this, all of these are from Haskell:
pamac-cek10:~ chrisk$ cat /etc/apache2/other/httpd-fastcgi.conf
david48 wrote:
for each package you have to type (*) :
runhaskell Setup.hs configure
runhaskell Setup.hs build
sudo runhaskell Setup.hs install
(*) sometimes it'll be Setup.lhs, I'm annoyed that it's not always the
same name, can't rely on shell history :(
Same here; my solution is to
Galchin Vasili wrote:
Let's take a concrete but made up case .. suppose we want to call
through to pthread_create and pass the (void *) argument to pthread_create
which in turn gets interpreted by the pthread that is launched. How would
one populate the C struct that is passed to the launched
On Sun, Mar 11, 2007 at 08:43:51PM +, Frederik Eaton wrote:
I am looking at version 6.6. (is there a newer one in Debian?)
(no)
Thanks for the bug report and testcase; I've filed a trac bug for it:
http://hackage.haskell.org/trac/ghc/ticket/1221
I hope that this isn't again something
Couldn't match expected type `Bool - [a]'
against inferred type `()'
In the first argument of `a', namely `()'
In the expression: a ()
In the definition of `d': d = a ()
Also, I don't know what other people will think, but something bothers
me about the In on the
Hi Simon,
I've attached a program which exhibits the error. Here is what I get
when compiling with ghc 6.6:
$ ghc6 --version
The Glorious Glasgow Haskell Compilation System, version 6.6
$ ghc6 bar.hs
bar.hs:7:6:
Couldn't match expected type `[a]' against inferred type `()'
In the first
Eric wrote:
So I'm wondering -- in practice, what do people actually use? Is
there a more-or-less generally accepted standard database library for
Haskell?
In practice I am using HDBC for a PostgreSQL database and it is very
easy to use and works great.
http://gopher.quux.org:70/devel/hdbc
Tamas K Papp wrote:
Hi,
I have a computation where a function is always applied to the
previous result. However, this function may not return a value (it
involves finding a root numerically, and there may be no zero on the
interval). The whole problem has a parameter c0, and the function
Martin Percossi wrote:
matMul a b = do { let foo = 2*5; return a }
probably
{ let {foo = 2*5}; return a }
will work (untested)
your ; indicates a further let-equation, but the possibility to use
; without { and } is a bit pathologic (and haddock used to reject it)
Christian
Christian Maeder wrote:
Martin Percossi wrote:
matMul a b = do { let foo = 2*5; return a }
probably
{ let {foo = 2*5}; return a }
will work (untested)
your ; indicates a further let-equation, but the possibility to use
; without { and } is a bit pathologic (and haddock used to
reject
John Meacham [EMAIL PROTECTED] wrote:
I generalized this primitive to
drop__ :: a - b - b
Also known in the Prelude as const...
The difference is that you propose it be primitive, with the intention
that a clever compiler should not be able to bypass it by inlining its
definition and
On Tue, Feb 21, 2006 at 10:15:59AM +, Malcolm Wallace wrote:
John Meacham [EMAIL PROTECTED] wrote:
I generalized this primitive to
drop__ :: a - b - b
Also known in the Prelude as const...
well, 'flip const' but yes.
The difference is that you propose it be primitive, with the
John Meacham wrote:
On Tue, Feb 21, 2006 at 10:15:59AM +, Malcolm Wallace wrote:
John Meacham [EMAIL PROTECTED] wrote:
I generalized this primitive to
drop__ :: a - b - b
Also known in the Prelude as const...
well, 'flip const' but yes.
The difference is that you propose it be
On Tue, Feb 21, 2006 at 11:04:40PM +, Simon Marlow wrote:
Your drop__ reminds me of GHC's touch#, which is like drop__ in the IO
monad. We use it to control lifetimes, eg. inside withForeignPtr. You
could implement drop in terms of touch#:
drop__ a b = case touch# a realworld# of
John Meacham wrote:
So, I finally decided that jhc needs real arrays, but am running into an
issue and was wondering how other compilers solve it, or if there is a
general accepted way to do so.
here is what I have so far
-- The opaque internal array type
data Array__ a
-- the array
After reading all the interesting responses I decided to go with a
slight generalization of my original idea, and it surprisingly turns out
to have other generally useful unintended uses, which is the point that a 'hack'
becomes a 'feature'. :)
before I had a primitive:
newWorld__ :: a - World__
Data.Array.ST has
runSTArray :: Ix i = (forall s . ST s (STArray s i e)) - Array i e
I think if you can implement that, then all your problems will be solved.
-- Ben
___
Haskell mailing list
Haskell@haskell.org
On 09 August 2005 12:25, Adrian Hey wrote:
Well this is actually a couple of questions..
First question is how does ghc do case analysis on algebraic
data type constructors. I always assumed it was by using some
kind of jump table on a tag field, but I don't know really (I'm
not even sure
I think you'll maximise your chances by sending mail about GUM and
Glasgow Parallel Haskell to the GpH mailing list
http://www.macs.hw.ac.uk/~dsg/gph/
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Yang, Qing
| Sent: 12 November 2003
Yes, it's probably garbage collection. To be sure, you can
run your program
with the -t RTS option, which will create a file in the
current working
directory named foo.stat if the executable is named foo.
The resulting
file will contain the total amount of time spent, the mutator
On Mon, Oct 27, 2003 at 12:00:04PM -0500, [EMAIL PROTECTED] wrote:
When I compile my program without -prof -auto-all option (no
profiling support), its execution time is about 140s (compiled with
-O2). When compiled with profiling support, the time spent by the
Pratik Bhadra wrote:
Hi
I have a data type Expr for handling Expressions
data Expr = Lit1 Int | Lit2 Bool | Var String | BinOp Op Expr Expr
As you can see, I am trying to have an Expression have both Int and Bool
values so that I can work with both arithmetic (+,-,*,/) and
logical(and,or,,=,,=)
At 9:20 PM -0500 10/22/03, Pratik Bhadra wrote:
Hi
I have a data type Expr for handling Expressions
data Expr = Lit1 Int | Lit2 Bool | Var String | BinOp Op Expr Expr
As you can see, I am trying to have an Expression have both Int and Bool
values so that I can work with both arithmetic
Thanks, Artie and thanks to Dr Richards! I figured it out. I was not
correlating the Exprs properly. Now that I broke it up into Lit1 and Lit2 and am
returning a Lit1 or a Lit2
which will return an Expr, it works! :)
Pratik
Pratik Bhadra
Undergraduate Section
On Mon, 15 Sep 2003, Yu Di wrote:
data MyArrow a b = MyArrow ((String, a) - (String,
b))
i.e. there is an information asscioated with each
piece of data (represented by the string), and I want
to pass it around. And often the arrow's processing
logic will depend on the input information,
On Sun, Jul 06, 2003 at 05:31:59PM +0100, MR K P SCHUPKE wrote:
I am trying to define the left operator for a CPS arrow of type:
newtype CPSFunctor ans a b c = CPS ((a c ans) - (a b ans))
[...]
So I try and apply this to left and get:
left (CPS f) = CPS $ \k - arr (\z - case z of
Question is really about layout rules.
If the first lexeme of a module is not a module keyword, we insert
{n}, where n is the indentation of first lexeme. Then we apply
function L to the list of lexemes and stack of layouts:
L ({n}:lexemes) []
One of first case definitions of L
[Hal Daume III [EMAIL PROTECTED]]
It is not. Lets are expressions. Wheres are part of declarations. In a
grammar sense, you have something like:
funcdef ::= name = expr (where decls)?
expr::= let decls in expr
so the declarations inside a let are internal to the expression and
No, that's not legal. You'll get an unbound variable error on the use of
'a' in the definition of 'b'. This doesn't really have anything to do
with layout. Consider the following definition:
f x =
case x of
Nothing - ...
Just (y,z) - let Just q = z
in b
[Hal Daume III [EMAIL PROTECTED]]
No, that's not legal. You'll get an unbound variable error on the use of
'a' in the definition of 'b'. This doesn't really have anything to do
with layout. Consider the following definition:
f x =
case x of
Nothing - ...
Just (y,z) -
Hi,
f x = let ...
in
...
where
...
Assuming that all the ...s are legal, is this OK? Should it be? It
really makes the 'where' clause look like it's inside the 'let', when
in fact it can't be.
Ah, sorry. Yes, this is legal. However, if you
At 22:00 16/03/2003 -0800, Hal Daume III wrote:
It is not. Lets are expressions. Wheres are part of declarations. In a
grammar sense, you have something like:
funcdef ::= name = expr (where decls)?
expr::= let decls in expr
so the declarations inside a let are internal to the expression and
It is not. Lets are expressions. Wheres are part of declarations. In a
grammar sense, you have something like:
funcdef ::= name = expr (where decls)?
expr::= let decls in expr
so the declarations inside a let are internal to the expression and can't
go outside into the where clause.
--
On Wed, 26 Feb 2003 00:54:13 +
Cesar Augusto Acosta Minoli [EMAIL PROTECTED] wrote:
¿There's a way to input/output data from the computers' port in
Haskell? ¿What about LPT1 or Com?
I guess the fastest way is to create a C library and use the FFI. If you
are on linux, you can as
http://www.haskell.org/ghc/docs/latest/html/network/Network.CGI.html
This make me curious, and the following just made me curiouser...
Forbidden
You don't have permission to access
/ghc/docs/latest/html/network/Network.CGI.html on this server.
*Sigh* That's because Apache thinks it's a
On Mon, Feb 17, 2003 at 11:00:13AM -, Simon Marlow wrote:
I have some CGI programs running with Hugs and I want to use GHC
instead.
What changes must I do to the .hs file?
Is it an easy job?
Depends on lots of things really.
The CGI library that comes with GHC is
System.Time.getClockTime, IIRC. A quick browse through the libraries
confirms this.
--
Hal Daume III
Computer science is no more about computers| [EMAIL PROTECTED]
than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume
On Wed, 22 Jan 2003, Cesar Augusto Acosta Minoli wrote:
cris cris wrote:
We can represent a matrix as a list of lists...
which means that
1 2 3
4 7 6
2 5 1
could be written as follows: [[1,2,3],[4,7,6],[2,5,1]]
The question is how can I reverse the matrix (each row becomes a column)
Sounds like homework time again.
At the risk of being
I'm working at comparing the ghc-core-language with another
lambda-calculus.
This calculus has no unboxed values, but normal constructors
are available.
My problem is now: How can I represent the unboxed values in
my calculus.
More precisely: Can I represent the unboxed values by a
1. Haskell 98 does not explicitly mandate tail recursion optimisation.
However, in practice Haskell compilers must provide this since it is
impossible to write a loop without using recursion and if your loops
don't use constant stack space, you're not going to run for very long.
(In
G'day all.
On Thu, Jan 02, 2003 at 08:39:18AM +, Alastair Reid wrote:
Please note that this is NOT TRUE!
Whoops, you're right. Sorry, my mistake.
Cheers,
Andrew Bromage
___
Haskell mailing list
[EMAIL PROTECTED]
On Wed, 1 Jan 2003, Andrew J Bromage wrote:
G'day all.
On Mon, Dec 30, 2002 at 01:47:37PM -0600, Artie Gold wrote:
One suggestion, though is that you're working too hard; there's really
no reason to define a locally defined function. The much simpler:
long [] = 0
long (x:xs) = 1 +
G'day all.
On Wed, 1 Jan 2003, Andrew J Bromage wrote:
It has quite different performance characteristics, though. In
particular, this uses O(n) stack space whereas the accumulator one
uses O(1) stack space.
On Wed, Jan 01, 2003 at 12:17:10PM +0200, Shlomi Fish wrote:
This is assuming
G'day all.
On Mon, Dec 30, 2002 at 01:47:37PM -0600, Artie Gold wrote:
One suggestion, though is that you're working too hard; there's really
no reason to define a locally defined function. The much simpler:
long [] = 0
long (x:xs) = 1 + long xs
will do quite nicely.
It has quite
Hi Cesar
If you check the prelude, you will find the definition (something like):
length::[a]-Int
length= foldl' (\n _ - n + 1) 0
and the definition of foldl'
foldl' :: (a - b - a) - a - [b] - a
foldl' f a [] = a
foldl' f a (x:xs) = (foldl' f $! f a x) xs
Which also
On Mon, 30 Dec 2002, Cesar Augusto Acosta Minoli wrote:
Hello! I'm Working with Lists in Haskell, I´m a Beginner in Functional
Programming and I would like to know if there is a way to write a more
efficient function that return the length of a list, I wrote this one:
long :: [a]-Int
Cesar Augusto Acosta Minoli wrote:
Hello! I'm Working with Lists in Haskell, I´m a Beginner in Functional
Programming and I would like to know if there is a way to write a more
efficient function that return the length of a list, I wrote this one:
long:: [a]-Int
long p =
On Mon, Dec 30, 2002 at 01:47:37PM -0600, Artie Gold wrote:
One suggestion, though is that you're working too hard; there's really
no reason to define a locally defined function. The much simpler:
long [] = 0
long (x:xs) = 1 + long xs
will do quite nicely.
HTH,
--ag
There is already a
long = sum . map (const 1)
How's this?
/JongKeun
-Original Message-
From: William Lee Irwin III [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 5:18 AM
To: Artie Gold
Cc: Cesar Augusto Acosta Minoli; [EMAIL PROTECTED]
Subject: Re: Question About lists
On Mon, Dec 30, 2002
Cesar Augusto Acosta Minoli wrote:
PHello! I just Wanna Know, What should I do, to build a List of
random Numbers, withoutnbsp; IO type, just Float or Int/P
Use randoms or randomRs in conjunction with either mkStdGen or your
own instance of RandomGen, all from the Random module.
You only get
Hello,
Hello! I just Wanna Know, What should I do, to build a List of random
Numbers,
without IO type, just Float or Int
the answer for this is either you can't, read something about IO and monads
(good starting places are http://haskell.org/wiki/wiki?UsingIo and
Bernard James wrote:
In section 4.4.3 Function and Pattern Bindings of the Haskell 98
Report,
it gives the following translation:
[ the pattern lambda construction to case expression conversion from the
Report]
What does it mean by semantically equivalent. A rough approximation
is
has the
For example:
foo x = show x
versus
foo = \x - show x
And, why not the simplest version: foo = show...
If we call these three versions foo1, foo2 and foo3, then they are
semantically equivalent because, besides having the same type, one can
substitute one with anyone of
This means its an unboxed tuple. See recent thread about boxed
vs. unboxed.
--
Hal Daume III
Computer science is no more about computers| [EMAIL PROTECTED]
than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume
On Fri, 4 Oct 2002, David Sabel wrote:
Hi,
can somebody
On Wed, Oct 02, 2002 at 07:01:50AM -0400, David Roundy wrote:
I was wondering if anyone knows what sort of algorithm the 'sort' function
in the List module actually uses? In The Haskell 98 Library Report, they
give an insertion sort implementation, but I find it hard to believe that
the
List [EMAIL PROTECTED]
Sent: Thursday, August 29, 2002 4:10 PM
Subject: RE: Question aboutthe use of an inner forall
Now fixed in the 5.04 branch. The fix will get into the HEAD when
I merge in the Template Haskell stuff.
Thanks for the report
Simon
| -Original Message-
| From
No, this is a bug, thank you. Will fix.
Simon
| -Original Message-
| From: Ashley Yakeley [mailto:[EMAIL PROTECTED]]
| Sent: 19 August 2002 11:31
| To: Jay Cox; Haskell Cafe List
| Subject: Re: Question aboutthe use of an inner forall
|
|
| At 2002-08-18 20:19, Jay Cox wrote
find reference to this in any of my standard Haskell tutorials, nor the
Haskell 98 report. Any references?
cheers,
Simon
-Original Message-
From: Andrew J Bromage [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2002 04:19
To: [EMAIL PROTECTED]
Subject: Re: Question about sets
Hal Daume III wrote:
This is a functional dependency. You can probably find informationin the
GHC docs. It's a way of telling the compiler how to derive type
information on multiparameter classes.
Oh, can you?
Here what the User's Guide says:
Functional dependencies are implemented as
Here what the User's Guide says:
Functional dependencies are implemented as described by
Mark Jones in
Type Classes with Functional Dependencies, Mark P. Jones,
In Proceedings
of the 9th European Symposium on Programming, ESOP 2000,
Berlin, Germany,
March 2000,
Simon Guest asked:
Please could someone explain the meaning of | in this class declaration (from
Andrew's example):
class (Ord k) = Map m k v | m - k v where
lookupM :: m - k - Maybe v
I couldn't find reference to this in any of my standard Haskell tutorials, nor the
On Wed, 21 Aug 2002, Christian Sievers wrote:
(snip)
It might not have become clear from the previous answers:
this construction is not Haskell 98, but an extension.
That's why it's not in the report.
(snip)
One issue we have here is that any Haskell we write is stuff we'll
probably want to
G'day all.
On Wed, Aug 21, 2002 at 02:46:16PM -0400, Mark Carroll wrote:
One issue we have here is that any Haskell we write is stuff we'll
probably want to keep using for a while so, although we've only just got
most of the bugs out of the H98 report, I'll certainly watch with interest
as
1 - 100 of 173 matches
Mail list logo