Maybe you want to hide the old version of regex-posix:
ghc-pkg hide regex-posix-0.94.2
http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/packages.html
Note - I don't use cabal install myself so this might not be the right
way to do things, however ghc-pkg hide ... is reversible with
Thanks Gregory!
Probably the solution would be recreating the FFI in a way that doesn't need
the StablePtr. Not sure how to do this though. I'm going to test other
things, like HashTable, before trying this. And let's see how it goes.
~dsouza
On Mon, Dec 20, 2010 at 2:40 PM, Gregory Collins
Hi,
Does anyone know how to get the parse tree of a piece of Haskell code?
Any recommended documentation?
Thanks
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi,
sorry for answering to such an old thread.
David Menendez d...@zednenem.com writes:
On Fri, Oct 29, 2010 at 8:33 AM, Tillmann Rendel
ren...@informatik.uni-marburg.de wrote:
Hi,
Uwe Schmidt wrote:
In the standard Haskell classes we can find both cases,
even within a single class.
2010/12/21 Jane Ren j2...@ucsd.edu:
Does anyone know how to get the parse tree of a piece of Haskell code?
Any recommended documentation?
ghc as a library?
http://www.haskell.org/haskellwiki/GHC/As_a_library
___
Haskell-Cafe mailing list
Monads seem to use fail in one of three ways:
-Regular monads leave it at the default definition of error
-MonadPlus sometimes redefines it to mzero
-IO redefines it to failIO
Are there any other definitions of fail? If not, does the special case of IO really need a class-level definition, or
Hi,
In a previous posting[1] I asked was there a way to achieve a proof of
mirror (mirror x) = x
in Haskell itself. The code for the tree/mirror is below:
module BTree where
data Tree a = Tip | Node (Tree a) a (Tree a)
mirror :: Tree a - Tree a
mirror (Node x y z) = Node (mirror z) y
An old problem popped up in the uu-parsinglib. When combining two parsers with
|, it is checked to see which alternative accepts the shortest input; this
is done in order to prevent infinite insertions, which may occur as a result of
choosing a recursive alternative when inserting of some
The haskell-src-exts package?
http://hackage.haskell.org/package/haskell-src-exts
On 21 Dec 2010, at 09:35, Serguey Zefirov wrote:
2010/12/21 Jane Ren j2...@ucsd.edu:
Does anyone know how to get the parse tree of a piece of Haskell
code?
Any recommended documentation?
ghc as a
Also, Scion is a library that wraps the GHC API. It already provides things
like search at location and retrieving the high level interesting elements
for an outline. See http://code.google.com/p/scion-lib/ and
https://github.com/JPMoresmau/scion (the outline code is only in the second
repo).
Hi Phil,
On 12/20/2010 10:49 PM, gutti wrote:
Hi all,
In Matlab the following line of code:
V3 = V1.*(V20)
(V20) gives a Bool-Vector with ones (trues) and zero's where elements
of V2 are 0; Then this Bool vector is used to multiply all elements in V1
to zero
where the condition V20 is not
I'm running a VM with Ubuntu 10.10 (Maverick Meerkat). I installed Darcs
2.4.4 using apt-get, but it keeps CONSTANTLY failing with the error message
darcs: bug at src/URL.hs:246 compiled Sep 12 2010 20:24:56
Another possible bug in URL.waitNextUrl: curl_multi_perform() - no
running handles
Hi. I try to use haddock (2.8.1) but it breaks with
haddock: internal Haddock or GHC error: de-package: openBinaryFile: does not
exist (No such file or directory)
Why would it want to read a file with the name de-package?
(Is de related to the locale? But the error also happens with LC_ALL=C)
On Tue, 21 Dec 2010, Alberto Ruiz wrote:
Vectorized boolean operations are not yet implemented but I hope to get them
ready soon, including a find function. In the meantime you can use
zipVectorWith, as mentioned by Henning.
I would not find it a great idea to support the MatLab style of
Hi -café,
I installed Snap 0.3 last night on my Mac, and had some problems
getting it to build with SSL support. This is just a quick note of the
extra flags I had to pass in when installing it in case someone else
has a setup similar to mine. These instructions presume that you are
using the
I have been trying to build the Scheme in 24 Hours on WikiBooks :-
http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
http://jonathan.tang.name/files/scheme_in_48/code/listing10.hs
But I am getting an error :-
scheme.hs:289:6: `noMsg' is not a (visible) method of
I'd love for the compiler to give an error (or maybe just a warning)
in the case that I have a pattern match in a monad that just blows up
(throws an exception) on a pattern match failure.
Currently there's no way to know the behavior of failed pattern match
failures without looking at the
Aaron Gray schrieb:
if I try importing them :-
import Control.Monad.Error (noMsg, strMsg)
I think it was moved to Control.Monad.Error.Class.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Tue, Dec 21, 2010 at 08:31:08AM -0700, Jonathan Geddes wrote:
I'd love for the compiler to give an error (or maybe just a warning)
in the case that I have a pattern match in a monad that just blows up
(throws an exception) on a pattern match failure.
You will be interested to know that
On Tuesday 21 December 2010 16:40:38, Henning Thielemann wrote:
Aaron Gray schrieb:
if I try importing them :-
import Control.Monad.Error (noMsg, strMsg)
I think it was moved to Control.Monad.Error.Class.
But it's still re-exported from Control.Monad.Error, so they ought to be in
everything you ask for already was in Haskell ages ago:
those were the days ... where the method in Functor method was called map,
and zero was a method of, guess what, MonadZero...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 21 December 2010 15:40, Henning Thielemann
schlepp...@henning-thielemann.de wrote:
Aaron Gray schrieb:
if I try importing them :-
import Control.Monad.Error (noMsg, strMsg)
I think it was moved to Control.Monad.Error.Class.
Great, importing Control.Monad.Error.Class does the
I'd be really interested in learning the rationale behind those changes. I'm
sure it wasn't done for capricious or arbitrary reasons, but I can't help
but see it as a step back.
--Jonathan Geddes (sent from android mobile)
On Dec 21, 2010 8:47 AM, Lauri Alanko l...@iki.fi wrote:
On Tue, Dec 21,
I don't know the formal definition, but dependent types seem analogous
to checking an invariant at runtime.
-deech
On Tue, Dec 21, 2010 at 5:53 AM, Patrick Browne patrick.bro...@dit.ie wrote:
Hi,
In a previous posting[1] I asked was there a way to achieve a proof of
mirror (mirror x) = x
in
Hi Patrick,
Indeed, you cannot really write proofs in Haskell because it is just
an ordinary (more or less) programming language and not a theorem
prover. (As an aside: you could write tests, i.e. properties which
may or may not be theorems about your program, and test them on random
data (see
This is a belated announcement of a package I uploaded to
hackage last week.
When processing a large input stream, one of the most important
techniques is to split the input into smaller pieces and process
each piece separately.
If that large input stream happens to be a lazy bytestring,
the
On Tue, Dec 21, 2010 at 4:30 AM, Jean-Marie Gaillourdet
j...@gaillourdet.net wrote:
Hi,
sorry for answering to such an old thread.
David Menendez d...@zednenem.com writes:
On Fri, Oct 29, 2010 at 8:33 AM, Tillmann Rendel
ren...@informatik.uni-marburg.de wrote:
Hi,
Uwe Schmidt wrote:
Patrick,
Dependent types are program types that depend on runtime values. That
is, they are essentially a type of the form:
f :: (a :: X) - T
where 'a' is a *value* of type 'X', which is mentioned in the *type* 'T'.
You do not see such things in Haskell, because Haskell separates
values from
On Tue, Dec 21, 2010 at 3:57 PM, austin seipp a...@hacks.yi.org wrote:
However, at one point I wrote about proving exactly such a thing (your
exact code, coincidentally) in Haskell, only using an 'extraction
tool' that extracts Isabelle theories from Haskell source code,
allowing you to prove
On Tuesday 21 December 2010 19:34:11, Felipe Almeida Lessa wrote:
Theorem mirror_mirror : forall A (x : Tree A), mirror (mirror x) = x.
induction x; simpl; auto.
rewrite IHx1; rewrite IHx2; trivial.
Qed.
Since mirror (mirror x) = x doesn't hold in Haskell, I take it that Coq
doesn't
I wrote:
On Tuesday 21 December 2010 19:34:11, Felipe Almeida Lessa wrote:
Theorem mirror_mirror : forall A (x : Tree A), mirror (mirror x) = x.
induction x; simpl; auto.
rewrite IHx1; rewrite IHx2; trivial.
Qed.
Since mirror (mirror x) = x doesn't hold in Haskell, I take it that Coq
This question is more appropriate on the darcs-users mailing list. I've
CC'd your message there.
Jason
On Tue, Dec 21, 2010 at 4:47 AM, Andrew Coppin
andrewcop...@btinternet.comwrote:
I'm running a VM with Ubuntu 10.10 (Maverick Meerkat). I installed Darcs
2.4.4 using apt-get, but it keeps
Daniel == Daniel Fischer daniel.is.fisc...@googlemail.com writes:
Daniel On Tuesday 21 December 2010 19:34:11, Felipe Almeida Lessa wrote:
Theorem mirror_mirror : forall A (x : Tree A), mirror (mirror x) = x.
induction x; simpl; auto. rewrite IHx1; rewrite IHx2; trivial.
On Tuesday 21 December 2010 20:11:37, Colin Paul Adams wrote:
Daniel == Daniel Fischer daniel.is.fisc...@googlemail.com
writes:
Daniel On Tuesday 21 December 2010 19:34:11, Felipe Almeida Lessa
wrote:
Theorem mirror_mirror : forall A (x : Tree A), mirror (mirror x) = x.
Hi Henning, Hi Alberto,
thanks for the quick and comprehensive help. - I managed to implement
Hennings suggestion with mapVector and zipWithVector. -- However have a
type inference problem with zipVectorWith -- probably a stupid beginners
mistake. (have a look below). I want to look into the
On Tue, Dec 21, 2010 at 03:28:22PM +, Aaron Gray wrote:
I have been trying to build the Scheme in 24 Hours on WikiBooks :-
http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
http://jonathan.tang.name/files/scheme_in_48/code/listing10.hs
But I am getting an error
thanks for the quick and comprehensive help. - I managed to implement
Hennings suggestion with mapVector and zipWithVector. -- However have a
type inference problem with zipVectorWith -- probably a stupid beginners
mistake. (have a look below). I want to look into the matrix thing as well,
but
Hi Henning,
Yes I just realised my mistake myself - I hand over the function instead of
the result. A really facinating concept by the way.
Thanks again for the Matrix notation - will give it a go right away now. And
the manoever critics on the code is really nice. - Helps me a lot to
embrace
- Original Message
From: Colin Paul Adams co...@colina.demon.co.uk
To: Daniel Fischer daniel.is.fisc...@googlemail.com
Cc: haskell-cafe@haskell.org
Sent: Tue, December 21, 2010 1:11:37 PM
Subject: Re: [Haskell-cafe] Proof in Haskell
Daniel == Daniel Fischer
On Tue, Dec 21, 2010 at 5:02 PM, Daniel Fischer
daniel.is.fisc...@googlemail.com wrote:
On Tuesday 21 December 2010 19:34:11, Felipe Almeida Lessa wrote:
Theorem mirror_mirror : forall A (x : Tree A), mirror (mirror x) = x.
induction x; simpl; auto.
rewrite IHx1; rewrite IHx2; trivial.
On Tue, 21 Dec 2010, gutti wrote:
One thing that still confuses me a litte:
polynom: double - double -double
polynom x y = y^2 + x^2 + 2*x*y
Type declaration for this polynom with two inputs
I guess you mean upper case Double, otherwise it's a type variable and
the compiler will ask for
First, let's make some useful operations in your GeneratorState monad:
-- State :: (s - (a,s)) - State s a
-- random :: Random a = StdGen - (a, StdGen)
genRandom :: Random a = GeneratorState a
genRandom = State random
-- similar
genRandomR :: Random a = (a,a) - GeneratorState a
genRandomR =
Thanks, Ryan.
I rewrote it yesterday. Here's my updated version.
Better?
Michael
==
import Data.Functor (($))
import System.Random
data Craps a = Roll a | Win a | Lose a deriving (Show)
-- Returns an infinite list of die throws
rollDice :: IO [Int]
rollDice = randomRs (1,6) $
I changed your die function to rollDie in function roll2Dice (I assume that's
what you meant) but get the errors listed below.
Michael
import Control.Monad.State
import Control.Monad
import System.Random
type GeneratorState = State StdGen
genRandom :: Random a =
44 matches
Mail list logo