Is there in Haskell a non monadic function of type a - a - Bool which
test for physical equality of two values? It would return True if only
if both values are the same object in memory.
For instance:
value1 = good
value2 = good
eq value1 value2 = False
value1 = good
value2 = value1
2010/6/28 José Romildo Malaquias j.romi...@gmail.com:
Is there in Haskell a non monadic function of type a - a - Bool which
test for physical equality of two values? It would return True if only
if both values are the same object in memory.
For instance:
value1 = good
value2 = good
eq
On 28 Jun 2010, at 09:38, José Romildo Malaquias wrote:
Is there in Haskell a non monadic function of type a - a - Bool which
test for physical equality of two values? It would return True if only
if both values are the same object in memory.
For instance:
value1 = good
value2 = good
On Mon, Jun 28, 2010 at 08:51:45AM +0400, Victor Nazarov wrote:
What we get with this instances is following code.
main =
do print (sizeof :: Sizeof Word16)
Let's try it.
$ runhaskell this.lhs
this.lhs:78:14:
Couldn't match expected type `Int'
against
I don't know the answer to your questions, but just wanted to note
that you will probably get a better response on the
glasgow-haskell-users mailing list.
http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/mailing-lists-GHC.html
-Brent
On Fri, Jun 25, 2010 at 08:56:09PM -0700, braver
On Fri, Jun 25, 2010 at 02:26:54PM -0700, Walt Rorie-Baety wrote:
I've noticed over the - okay, over the months - that some folks enjoy the
puzzle-like qualities of programming in the type system (poor Oleg, he's
become #haskell's answer to the Chuck Norris meme commonly encountered in
Dear Haskellers,
As part of our project on Refactoring Functional Programs
http://www.cs.kent.ac.uk/projects/refactor-fp/
we are pleased to announce the availability of HaRe 0.6 (also known as
HaRe 28/06/2010), a snapshot of our Haskell Refactorer prototype. Apart
from bug-fixes, there are
On Sun, Jun 27, 2010 at 4:44 PM, Alexey Khudyakov
alexey.sklad...@gmail.com wrote:
Dependent types would be nice but there isn't anything usable out there.
Newtype wrapper parametrized by type level number works fine so far.
If you interested sources are available here:
hi,
On 25.06.2010 11:07, corentin.dup...@ext.mpsa.com wrote:
Another couple of reflexions (sorry for monopolizing):
1. Since i am making a Nomic game, players will have to submit rules. These
rules will be written in a sub-set of haskell.
Instead of writing my own reader/interpreter, i'd
On Mon, Jun 28, 2010 at 7:02 PM, Jake McArthur jake.mcart...@gmail.com wrote:
On Sun, Jun 27, 2010 at 4:44 PM, Alexey Khudyakov
alexey.sklad...@gmail.com wrote:
Dependent types would be nice but there isn't anything usable out there.
Newtype wrapper parametrized by type level number works fine
While working this weekend on the Snap web framework, I ran into a
problem. Snap implements MonadCatchIO, so I thought I could just use
bracket to handle resource acquisition/release in a safe manner.
Imagine my surprise when bracket simply failed to run the release
action sometimes.
I quickly
So is there a specific reason why Haskell isn't dependently typed then?
Or you could ask, So is there a specific reason why C isn't a functional
language?
More to the point, Haskell was a bit too frozen in stone when dependent type
theory reached the point of being implementable.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 6/28/10 15:04 , Andrew Coppin wrote:
More to the point, Haskell was a bit too frozen in stone when dependent type
theory reached the point of being implementable.
Right. So, in summary, the answer is historical circumstance?
(I was
wren ng thornton wrote:
Andrew Coppin wrote:
I think I looked at Coq (or was it Epigram?) and found it utterly
incomprehensible. Whoever wrote the document I was reading was
obviously very comfortable with advanced mathematical abstractions
which I've never even heard of.
One of the things
Claus -- cafe5 is pretty much where it's at. You're right, the proggy
was used as the bug finder, actually at cafe3, still using ByteString.
It would be useful to have a really tiny data source - no more than
100 entries per Map should be sufficient to confirm or reject hunches
about
claus.reinke:
To binary package users/authors: is there a typed version of binary (that
is, one that records and checks a representation of the serialized type
before actual (de-)serialization)? It
would be nice to have such a type check, even though it
wouldn't protect against missing
Brent Yorgey wrote:
As several people have pointed out, type-level programming in Haskell
resembles logic programming a la Prolog -- however, this actually only
applies to type-level programming using multi-parameter type classes
with functional dependencies [1] (which was until recently the
Some docs are in a miserable state of being incomplete.
And then some programmers are in a miserable state of not respecting docs
when the docs are complete.
Why should anyone expect
deleteBy (=) 5 [0..10]
to accomplish anything meaningful, if he/she respects the written docs?
Today someone
On 28/06/2010 20:02, Carl Howells wrote:
While working this weekend on the Snap web framework, I ran into a
problem. Snap implements MonadCatchIO, so I thought I could just use
bracket to handle resource acquisition/release in a safe manner.
Imagine my surprise when bracket simply failed to run
On Mon, Jun 28, 2010 at 10:02 PM, Carl Howells chowell...@gmail.com wrote:
While working this weekend on the Snap web framework, I ran into a
problem. Snap implements MonadCatchIO, so I thought I could just use
bracket to handle resource acquisition/release in a safe manner.
Imagine my
On Sun, 27 Jun 2010, Henning Thielemann wrote:
Maybe I can combine splitAtLazy and (++) to a function like
splitAtAndAppend :: [x] - ([a] - [b]) - ([a] - [b]) - [a] - [b]
but I'm afraid I will need pairs temporarily and then I run into the same
problems.
I have now implemented a solution
On Mon, Jun 28, 2010 at 1:44 PM, Albert Y.C.Lai tre...@vex.net wrote:
Why should anyone expect
deleteBy (=) 5 [0..10]
to accomplish anything meaningful, if he/she respects the written docs?
I proposed the following solution:
http://lukepalmer.wordpress.com/2009/07/01/on-the-by-functions/
On Monday, June 28, 2010 10:38:33 am José Romildo Malaquias wrote:
Is there in Haskell a non monadic function of type a - a - Bool which
test for physical equality of two values? It would return True if only
if both values are the same object in memory.
IIRC observable sharing does similar
reallyUnsafePointerEquality :: a - a - Int#
but don't use as it can give both false negatives (i.e. GC in the middle of
evaluation) and false positives (that GC just finished and put one object
right where the other was.)
The better model to obtain what you want to use StableNames and seq and,
Hi all,
I'll admit, the original idea for this package was something to place in
ACME ;). However, it's goal is to solve a real problem: the lack of good
instances on the Either type. As a brief summary, Either has no Applicative
or Monad instances in the base library, has 2 reasonable
There’s a history of rich debate and discussion on these issues coming
from the scheme world, where it takes the guise of implementing
unwind-protect in the presence of call/cc. Kent Pitman’s take is
presented here:
http://www.nhplace.com/kent/PFAQ/unwind-protect-vs-continuations-overview.html
It looks like good work, but I would be hesitent about depending on a
package which pulled in both mtl and tranformers.
Maybe that's just superstition - I haven't tried it.
Antoine
On Jun 28, 2010 5:51 PM, Michael Snoyman mich...@snoyman.com wrote:
Hi all,
I'll admit, the original idea for
Hi,
Quick question about ghci: when I do this at the prompt:
ghci :m +Control.Monad.Cont
I get
Ambiguous module name `Control.Monad.Cont':
it was found in multiple packages: mtl-1.1.0.2 monads-fd-0.0.0.1
Is there any way to fix this from within ghci (i.e. not involving
mucking
On Mon, Jun 28, 2010 at 2:32 PM, Don Stewart d...@galois.com wrote:
claus.reinke:
To binary package users/authors: is there a typed version of binary (that
is, one that records and checks a representation of the serialized type
before actual (de-)serialization)? It
would be nice to have such
In the case of 'deleteBy' we can improve an API.
deleteBy eq x xs == deletePred (eq x) xs
@deletePred pred xs@ removes the first element of @xs@ which satisfies a
predicate @p...@.
Your solution is more general. :)
On 28.06.10 22:44, Albert Y.C.Lai wrote:
And then some programmers are in a
Wow! great to see Haskellers from B'lore. I'll be interested too.
On Mon, Jun 21, 2010 at 10:00 AM, C K Kashyap ckkash...@gmail.com wrote:
Hi,
I was wondering if it would be a good idea for the folks interested in
Haskell in Bangalore to get together. Especially if there are folks at EGL,
On Jun 28, 2010, at 2:29 PM, Luke Palmer wrote:
I proposed the following solution:
http://lukepalmer.wordpress.com/2009/07/01/on-the-by-functions/
Seconded! I always want xxxOn and I almost never (perhaps never*) want xxxBy
for xxx in sort, maximum, group and nub.
- Mark
(*) A
As far as I know, the only issue with depending on both is the conflicting
orphan Monad instance for Either. Can anyone either confirm or deny this?
On Tue, Jun 29, 2010 at 5:11 AM, Antoine Latter aslat...@gmail.com wrote:
It looks like good work, but I would be hesitent about depending on a
On 29 June 2010 15:20, Michael Snoyman mich...@snoyman.com wrote:
As far as I know, the only issue with depending on both is the conflicting
orphan Monad instance for Either. Can anyone either confirm or deny this?
Since you're being naughty and using package-qualified imports, it
should be OK
Albert Y.C.Lai tre...@vex.net writes:
The doc of deleteBy states: The deleteBy function behaves like delete, but
takes a user-supplied equality predicate. A precondition is that the
user-supplied predicate is an equality predicate. (=) is not an equality
predicate, be it in the layperson
On Tue, Jun 29, 2010 at 8:24 AM, Ivan Miljenovic
ivan.miljeno...@gmail.comwrote:
On 29 June 2010 15:20, Michael Snoyman mich...@snoyman.com wrote:
As far as I know, the only issue with depending on both is the
conflicting
orphan Monad instance for Either. Can anyone either confirm or deny
On 29 June 2010 15:38, Michael Snoyman mich...@snoyman.com wrote:
On Tue, Jun 29, 2010 at 8:24 AM, Ivan Miljenovic ivan.miljeno...@gmail.com
wrote:
On 29 June 2010 15:20, Michael Snoyman mich...@snoyman.com wrote:
As far as I know, the only issue with depending on both is the
conflicting
37 matches
Mail list logo