From the user manual, it sounds like a clause of a closed type family should
be rejected once no subsitution of the type could make it unify with the
clause. If so, it doesn't seem to do an occurs check:
type family IsEq a b :: Bool where
IsEq a a = True
IsEq a b = False
:kind! forall a
It is conceivable that some restrictions around UndecidableInstances (short of
banning it in a whole program, including all importing modules) can mitigate
this problem, but no one I know has gotten to the bottom of it.
Richard
On Jul 2, 2014, at 4:19 AM, Brandon Moore brandon_m_mo...@yahoo.com wrote
From: Adam Megacz meg...@cs.berkeley.edu
Hrm, it seems that I hit send instead of save draft when
shutting down my computer last night.
On 2011-10-22 22:48:55 -0700, Adam Megacz said:
I've written up a short example of the problems that happen here:
Here is the link which was missing
From: kolli kolli nammukoll...@gmail.com
Subject: [Haskell-cafe] Fwd: how to increase the stack size
when I am running the program in my terminal on ubuntu its showing me
GHC stack-space overflow: current limit is 536870912 bytes.
Use the `-Ksize' option to increase it.
how can i increase the
From: Peter Gammie pete...@gmail.com Oct 6. 2011 6:58 PM
Ben,
On 07/10/2011, at 8:55 AM, Benjamin Redelings I wrote:
My question is, roughly, is there already an existing framework for
incremental
evaluation in Haskell?
Margnus Carlsson did something monadic several years ago.
From: Sean Leather leat...@cs.uu.nl
I would like to ask GHCi for the type that a type expression will evaluate to,
once all definitions of type synonyms and (when possible) type families have
been inlined.
It appears that I can do some part of this for type T by using :t undefined
:: T:
...
From: Evan Laforge qdun...@gmail.com
Sent: Friday, August 26, 2011 6:35 PM
Subject: Re: GHC build times on newer MacBook Pros?
On Tue, Aug 23, 2011 at 10:24 AM, David Terei davidte...@gmail.com
wrote:
I have a 16 core machine at work (with 48GB of ram, a perk of the job
:)). GHC can
- Original Message -
From: Johannes Waldmann waldm...@imn.htwk-leipzig.de
Sent: Tuesday, June 7, 2011 8:22 AM
Here's source and logs:
http://www.imn.htwk-leipzig.de/~waldmann/draft/skpp11/subseqsum/Subseqsum.hs
The program is meant to show an application of the third
From: Chris Smith cdsm...@gmail.com June 6, 2011 8:58 AM
On Mon, 2011-06-06 at 08:51 +0100, Malcolm Wallace wrote:
In paying for XCode 4, you are getting a lot of proprietary code in
addition to gcc.
True... but not *using* it.
However, XCode 3 remains free to download, if you are a
I can't reproduce heap usage growing with the
size of the input file.
I made a word list from Project Gutenberg's
copy of War and Peace by
tr -sc '[[:alpha:]]' '\n' pg2600.txt words.txt
Using 1, 25, or 1000 repetitions of this ~3MB wordlist
shows about 100MB of address space used according
to
Wait, do ByteStrings show up on a heap profile, if the space is
allocated with malloc?
Anyway, I think my tests still show that the memory used by the
process doesn't grow simply by adding more data, if you
are no longer added keys to the map.
- Original Message -
From: Brandon Moore
From: John Ky newho...@gmail.com
Sent: Monday, May 30, 2011 8:01 AM
Hi all,
I'm trying to learn about enumerators by reading this paper and came across
some code on page 2 that I found hard to digest, but I think I finally got it:
Hi John. These programs should behave identically, and I think
From: Patrick Brown; Sent: Sunday, May 29, 2011 5:42 PM
Subject: Re: [Haskell-cafe] Sub class and model expansion
Ryan,
Thank you for your helpful reply.
I have no real understanding of dependent types (DT)
From the web is seems that DTs are types that depend on *values*.
How does the
From: michael rice, Thursday, May 26, 2011
Subject: Re: [Haskell-cafe] Parallel compilation and execution?
Thank, Daniel
Multiple threads are in evidence in my system monitor, but I wonder why I'm
getting two different answers, one twice the other. The first is the parallel
solution and the
From: Jacek Generowicz Sent: May 25, 2011 2:45 PM
On 2011 May 25, at 17:42, Gwern Branwen wrote:
On Wed, May 25, 2011 at 11:08 AM, Jacek Generowicz
jacek.generow...@cern.ch wrote:
I've already stumbled across mueval and hoogle as things that need
to be
installed separately before
Henning Thielemann, Tuesday, May 24, 2011
On Tue, 24 May 2011, Jacek Generowicz wrote:
On 2011 May 24, at 11:12, Jacek Generowicz wrote:
I have found an {-# OPTION -fvia-C #-} deep inside the lambdabot code
in Plugin/Pl/Common.hs. How can I tell cabal install to ignore this? Is
- Original Message -
From: max ulidtko ulid...@gmail.com
To: haskell-cafe@haskell.org
Cc:
Sent: Monday, May 23, 2011 11:38 PM
Subject: [Haskell-cafe] Cabal: wrapping namespace of a package into top-level
module
Hi haskell-cafe.
I have a package which builds with cabal pretty
From: Jacek Generowicz jacek.generow...@cern.ch
Sent: Monday, May 23, 2011 4:17 AM
[TL;DR: there's a concrete question at the bottom.]
Once again I find myself in the pleasant situation where the slings and
arrows
of life in general are slightly less intense, and I manage to find a few
Hello!
I've just started using parallel computations in Haskell. parMap works fine,
it is so easy to use. However, parMap fails with functions returning lazy
structures, e.g. tuples.
This code works as expected:
(parMap rpar) bm tvalues
Using rpar is redundant. That strategy
From: Albert Y. C. Lai tre...@vex.net
To: glasgow-haskell-users@haskell.org
Sent: Wed, April 27, 2011 9:53:38 PM
Subject: Re: Package management
On 11-04-26 05:05 PM, Brandon Moore wrote:
There are already hashes to keep incompatible builds of a package separate.
Would anything break
Based on my own misadventures and Albert Y. C. Lai's SICP
(http://www.vex.net/~trebla/haskell/sicp.xhtml)
it seems the that root of all install problems is that reinstalling a
particular
version of a particular package
deletes any other existing builds of that version, even if other packages
Thanks.
It was the no computation needed difference that I was missing, and was
including (falsely) in my expectations for same result, i.e. including the
same traces.
To be clear, Debug.trace is not referentially transparent. It's only supposed
to
be used for debugging.
Brandon
From: Yves Parès limestr...@gmail.com
Sent: Wed, April 6, 2011 1:57:51 PM
Hello Café,
I'm trying to get some modular data types.
The idea that came to me is that I could stack them, for instance :
data Character a = Character { life :: Int,
charaInner :: a }
data
From: Michael Snoyman mich...@snoyman.com
Sent: Mon, April 4, 2011 5:22:02 AM
Firstly, I personally would love to insist on using UTF-8 and be done with it.
I
see no reason to bother with other character encodings.
If by insist, you mean the standard insist that implementations support
UTF-8
From: Patrick Browne patrick.bro...@dit.ie
Sent: Sun, April 3, 2011 9:04:22 AM
...
2)My second question is more theoretical. It is stated by the author
that type checking and excitability provide verification.
I don't know what excitability has to do with verification.
Type checking in
From: Gregory Collins g...@gregorycollins.net
Sent: Thu, March 31, 2011 5:03:09 AM
I find this behaviour a little annoying. Sometimes I *want* the thread
to block indefinitely! I.e. I want it to block until it receives a
KillThread exception. Is there a better way to accomplish that
- Original Message
From: Mitar mmi...@gmail.com
To: Brandon Moore brandon_m_mo...@yahoo.com
Cc: Gregory Collins g...@gregorycollins.net; Edward Z. Yang
ezy...@mit.edu;
Haskell Cafe haskell-cafe@haskell.org
Sent: Thu, March 31, 2011 2:06:31 PM
Subject: Re: [Haskell-cafe
On 2011-03-28 20:19:15PM Brandon S Allbery KF8NH allber...@gmail.com wrote:
On 3/28/11 21:15 , Ivan Lazar Miljenovic wrote:
On 29 March 2011 12:10, Brandon S Allbery KF8NH allber...@gmail.com
wrote:
On 3/28/11 17:06 , Ivan Lazar Miljenovic wrote:
On 29 March 2011 06:40, Jeff Wheeler
From: Jan-Willem Maessen jmaes...@alum.mit.edu
Sent: Wed, March 23, 2011 8:43:14 PM
Hi all -
I've been trying to construct a class declaration with an associated
type synonym, but I'd like to constrain that type to belong to a
particular class.
Consider the following class:
On Tue, March 22, 2011 21:00:29 Tim Docker t...@dockerz.net wrote:
I'm a bit shocked at the amount of wasted memory here. The sample data file
has ~61k key/value pair. Hence ~122k ByteStrings - as you point out
many of these are very small (1500 of them are empty). Assuming it's the
You want polymorphic variants. Check out O'Caml, or MLPolyR.
Subtyping is not very compatible with first-class functions. If you have
subtype-bounded polymorphism
(forall A a subtype of T, ...), and your subtype relation says A - B is a
subtype of C -D whenever
A is a supertype of C and B is a
I recently upgraded to ghc 7.0.2 from 6.12.3, along with the Haskell platform,
and noticed that the following code no longer works as expected:
waitFor tvar = atomically $ do
count - readTVar tvar
check (count == 0)
worker tchan tvar = loop
where loop = do
putStrLn
It is a goal of the ByteString library that you should almost never need to work
directly with the PS constructor and the things used in that definition. If you
find
some task involving IO or string manipulation that seems to require using the
internal operations, it's probably worth bringing it
Hi Bas
If you want to use your own C main(), that's documented here:
http://www.haskell.org/ghc/docs/7.0-latest/html/users_guide/ffi-ghc.html#using-own-main
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
From: Evgeny Grablyk evgeny.grab...@gmail.com
Hello!
I was wondering if it was possible to convert a function (which may
also call functions) to a plain list of operators on parameters.
Example:
If your operators are only things in Num (or maybe some other
typeclasses), the
From: Yitzchak Gale g...@sefer.org
Brandon Moore wrote:
This code produces and uses a table of all
allowed combinations. I think this makes it easier
to understand why the code works (and is H98).
It's just as easy to make a direct version that
produces one requested composition
From: Yitzchak Gale g...@sefer.org
To: haskell-cafe@haskell.org
Cc: Heinrich Apfelmus apfel...@quantentunnel.de; Lennart Augustsson
lennart.augusts...@gmail.com
Sent: Wed, March 2, 2011 9:45:15 AM
Subject: Re: [Haskell-cafe] A practical Haskell puzzle
Thanks to everyone for the nice
I assume there's a LINE directive in the file it's actually reading.
Run ghci with -v to see what file it's actually trying to read.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
From Kurt Stutsman kstuts...@gmail.com on Wed, February 23, 2011 9:40:09 AM
Daniel Fischer wrote:
No, it's not. The language report says an instance head must have the form
(tyCon a1 ... an),
where tyCon is a type constructor and a1 ... an are *distinct* type
variables
From: Alberto G. Corona agocor...@gmail.com
Sent: Tue, February 22, 2011 3:03:56 PM
Recently I had to navigatate trough data structures chained with mutable
referenes in th STM monad. The problem is that their values are enveloped in
Either or Maybe results.
...
to summarize, given:
foo, :
From: Job Vranish jvran...@gmail.com
On Sun, Feb 20, 2011 at 8:56 PM, Brandon Moore brandon_m_mo...@yahoo.com
wrote:
Typechecking with regular types isn't hard.
So do I have the right idea then? To check against a signature, I can just
unify
the two types and then check if the unified type
From: Job Vranish jvran...@gmail.com
Sorry for bringing back an ancient thread but I'd still like to understand
this
better.
It is still not obvious to me why typechecking infinite types is so hard. Is
determining type 'equivalence' the hard part? or is that a separate issue?
Typechecking
From: C K Kashyap ckkash...@gmail.com
Hi,
I tried the first example from A tutorial on Parallel and Concurrent
programming in Haskell but I cant seem to get sparks to get converted to OS
threads.
Below is the program I am using.
I did ghc --make -threaded program.hs
then
./program +RTS
From: David Leimbach, Sent: Tue, February 8, 2011 8:07:39 AM
On Monday, February 7, 2011, C K Kashyap ckkash...@gmail.com wrote:
Hi,I found that on windows and my ubuntu box, when I did this
ghci t - forkIO someAction
someAction started executing in the foreground - as in, the ghci
Hi,
I am looking for a way to extend GHCI such that I can do something like this
startMyFunction will do a forkIO and listen on a network port for interaction
with a remote process and will drop back to GHCI prompt where I can invoke
haskell functions that'll control the way the interaction
OK, what about this as a use case then. I want to create a type class 'Term'
with only one function in it. The function returns a 'termTag' which labels
the
kind of a value in a DSL.
class Term a where
termTag :: a - String
A user of this type-class can happily provide an instance
The darcs 2.5 package uses the flat -fglasgow-exts, so it picks up
MonoLocalBinds. This causes quite a few errors.
The error messages are particularly bad in
src/Darcs/Commands/Convert.lhs
there is code of the form
explicitlyPolyMorphicFun arg $- \local -
...
very long body
...
- 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
From: Roman Cheplyaka r...@ro-che.info
Sent: Wed, December 15, 2010 1:36:55 AM
* Jonathan Geddes geddes.jonat...@gmail.com [2010-12-14 19:59:14-0700]
Quick question:
Why do I need the $ in the following bits of code?
main = withSocketsDo $ do
--do something with sockets
Hi Peter
I beg your pardon? I didn't say anything about 32M. I said that
designing software to rely on a GHC-enforced memory limit as a means of
dealing with infinite loops feels really not like a particularly good
solution.
As I understand the discussion, it's not about infinite loops.
On Dec 13, 2010, at 6:15 PM, wren ng thornton w...@freegeek.org wrote:
On 12/13/10 8:25 AM, Paul Sargent wrote:
How about, as a cheep and cheerful method to get up running. If the premise
is that the original server is trustworthy and the mirrors aren't, then:
1) Hash all packages on the
I may be missing something, but it is not clear to me if you want
cryptographic security. If you do, then the only safe choice
is to use a standard algorithm (or block cipher construction,
perhaps). Sorry if that's already what you are discussing -
I don't know whether there are any established
- Original Message
From: aditya siram aditya.si...@gmail.com
To: Haskell Café haskell-cafe@haskell.org
Cc: hask...@haskell.org; Marcus Sundman sund...@iki.fi
Sent: Tue, November 16, 2010 8:18:33 AM
Subject: Re: [Haskell-cafe] Re: [Haskell] intent-typing
That was a great
Henning Thielemann, Tue, November 2, 2010 6:11:02 AM
Yves Parès schrieb:
Because he would have either to recompile the whole program or to use
things like hint, both implying that GHC must be installed on the user
side (600Mo+ for GHC 6.12.3)
Hugs is great for running small Haskell
) succeed)
Brandon Moore
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I would like to make a two-parameter type class where
some choices of the first type uniquely determine the second
type, and other choices of the first type promise to work
with any choice of the second type.
This code seems a bit suspicious, but is accepted thanks to
UndecidableInstances.
{-#
On Oct 27, 2010, at 12:43 PM, cas...@istar.ca wrote:
:)
I will point out that Python Haskell Interface has an excellent axiom.
Unfortunately, my attempt to write a nice wrapper around the Python FFI
foundered years ago chasing segfaults. It doesn't seem like it should be too
hard, if you
From: Brandon Moore brandon_m_mo...@yahoo.com
On Oct 27, 2010, at 12:43 PM, cas...@istar.ca wrote:
:)
I will point out that Python Haskell Interface has an excellent axiom.
Unfortunately, my attempt to write a nice wrapper around the Python FFI
foundered years ago chasing segfaults
You have to figure out here how you can use the function which is the argument
to map.
It seems you want to end up with a function of type a - Evaluator b, to be
used as an argument to mapM.
One idea is to add a new constructor Var to represent variables, and something
like
evalVar :: Obs b -
On Oct 23, 2010, at 2:57 PM, Claude Heiland-Allen claudiusmaxi...@goto10.org
wrote:
On 23/10/10 17:42, Gregory Crosswhite wrote:
On 10/23/10 7:54 AM, John Lato wrote:
On Fri, Oct 22, 2010 at 6:16 PM, Bulat Ziganshin
bulat.zigans...@gmail.com mailto:bulat.zigans...@gmail.com wrote:
Hello John,
From: Simon Peyton-Jones simo...@microsoft.com
Sent: Mon, October 18, 2010 5:02:57 PM
Folks
Following lots of feedback from users, especially at ICFP, I’ve evolved some
proposals for Template Haskell, that should make it both more expressive, and
more secure.
Thank you all for your contributions so far. Plenty of food for thought.
I though I'd try to put it into practice and have a go at the motivating
example I gave: essentially a EDSL for defining simple maths tests.
If you have a Python version that has other features you would like, you
If you just want instances of questions you can keep it simple. How about
something isomorphic to
data Instance = Instance { question : String, answer : String, check : String
- Bool }
You could make helper functions similar to your old code, like
addition : (Int , Int) - Instance
You might
On Oct 13, 2010, at 7:44 PM, Jacek Generowicz jacek.generow...@cern.ch wrote:
On 2010 Oct 14, at 01:32, Evan Laforge wrote:
I think I'm starting too see what my problem is. I think it boils down to
hankering for Duck Typing and variadic functions. I fully appreciate that
passing functions is
While I can see your point about potentially introducing new security holes,
and producing much less trusted code, I feel having tidy, pure libraries that
we can all integrate into our Haskell is a benefit that far outweighs this.
Especially when we have nice things like the type system,
On Oct 8, 2010, at 2:18 PM, Florian Weimer f...@deneb.enyo.de wrote:
* Ben Franksen:
You might be interested in Lightweight Monadic Regions
http://okmij.org/ftp/Haskell/regions.html#light-weight
which solve the problem (IMHO) in a much cleaner way, i.e. w/o explicit
closing and also w/o
On Sep 28, 2010, at 6:36 PM, Tom Hawkins tomahawk...@gmail.com wrote:
Thanks for the responses, but I think I should explain a bit more.
I'm not interested in being able to read the live value of a TVar at
any arbitrary time (via. unsafeIOToSTM). But rather I would like
looslyReadTVar to have
Setzer, Sebastian (ext) wrote:
Hi,
How do you wait on multiple channels, but read only from one of them
(the first that gets an entry)? Is there a library-function I missed
which already does this?
This is pretty hard with Control.Concurrent.Chan. They are simply not
very easy to compose.
Alfonso Acosta wrote:
Ok, instead of pushing about why I want to use unsafeCoerce (which I
know it's not a good thing) I decided (as suggested by Taral) to paste
a simplified example of my code.
If anyone finds a way of implementing something equivalent to this
code without
unsafeCoerce# and
Justin Bailey wrote:
I'm reading Chris Okasaki's Purely Functional Data Structures, and
some of his Haskell is confusing me. He defines the type Color and
RedBlackSet as:
data Color = R | B
data RedBlackSet a = E | T Color (RedBlackSet a) a (RedBlackSet a)
and then later he defines a
Justin Bailey wrote:
As part of the Ruby Quiz in Haskell solutions appearing on the wiki
recently, I just a solution to Ruby Quiz #100 - create a bytecode
interpreter for a simple expression language.
Like I said, the code below parses simple integer arithmetic
expressions and generates byte
Justin Bailey wrote:
As part of the Ruby Quiz in Haskell solutions appearing on the wiki
recently, I just a solution to Ruby Quiz #100 - create a bytecode
interpreter for a simple expression language.
Like I said, the code below parses simple integer arithmetic
expressions and generates byte
Steve Schafer wrote:
I have a list of text strings:
[Alice, Bob, Cindy, Bob, Bob, Dave, Cindy]
As you can see, some of the strings occur only once; others appear two
or more times.
I would like to end up with a new list, according to the following
rules:
1) If a string occurs only once in
Thinking to take advantage of fortuitous heap layout of some Haskell
values for interfacing with C, I've written the following function:
addressOf :: a - Ptr ()
addressOf x = x `seq` unsafeCoerce# (Box x)
data Box x = Box x
For example,
data A = A {-# UNPACK #-} !(Ptr Word8) {-# UNPACK #-}
.
Stable pointers might help with the GC relocating things, except I don't think
having a stable pointer guarantees that the object won't be moved around, just
that the stable pointer won't be invalidated by GC.
On Mon, Oct 23, 2006 at 06:43:26PM -0700, Brandon Moore wrote:
A different and in all
Greg Fitzgerald wrote:
Does DB.getTables use 'unsafeInterleaveIO'?
I would think that if an unsafe operation was *not* used,
DB.disconnect could *not* execute before DB.getTables has returned
every row.
Either way, by the Principle of Least Surprise
Nicolas Frisby wrote:
I may have missed this in the discussion so far, but it seems we could
use a summary.
In short: isIdentity does not check for exact equivalence, only a
prefix equivalence. That's why it doesn't exhibit the same time/space
behavior as a reformulation based on full
Philippa Cowderoy wrote:
I've done a bit more thinking about partial type annotations (as proposed
on the Haskell' list), and I have a somewhat more concrete proposals for
some of the extensions to them that perhaps also makes more sense of the
original basic idea as well. I'm sending it to
[EMAIL PROTECTED] wrote:
...
So far I never considered it important to devise a concrete syntax for PMC,
but triggered by the current pattern guards thread on haskell-prime,
I now try to give a PMC syntax that blends well with Haskell.
I think with some alterations your syntax would blend
Bryan Burgers wrote:
Hang on, hang on, now I'm getting confused.
First you asked for the smallest (positive) x such that
1+x /= x
which is around x=4.5e15.
1 + 0 /= 0
0 is smaller than 4.5e15
So I don't understand this at all...
But then 0 isn't positive.
Why not?
In any case
Andrew Pimlott wrote:
This is a follow-up to a thread from June-July[1]. The question was how to
write the function
initlast :: [a] - ([a], a)
initlast xs = (init xs, last xs)
so that it can be consumed in fixed space:
main = print $ case initlast [0..10] of
Andrew Pimlott wrote:
This is a follow-up to a thread from June-July[1]. The question was how to
write the function
initlast :: [a] - ([a], a)
initlast xs = (init xs, last xs)
so that it can be consumed in fixed space:
main = print $ case initlast [0..10] of
Ketil Malde wrote:
Lyle Kopnicky [EMAIL PROTECTED] writes:
If you have some other metric other than prefix in mind for partial
matches, then things probably get a lot more complicated. You're
probably looking at calculating minimum distances in some
feature-space, which calls for pretty
Brian Hulley wrote:
Hi -
Consider the scenario when you want to find a function that returns
the i'th element of an array but all you know is that there is a
module called Data.Array.IArray that will probably have such a
function in it. So you start typing in your program:
let
ith
Greg Fitzgerald wrote:
Since there's talk of removal of the composition operator in
Haskell-prime
http://hackage.haskell.org/trac/haskell-prime/wiki/CompositionAsDot,
how about this:
Instead of:
foo = f . g
you write:
foo = .g.f
A leading dot would mean, apply all unnamed parameters to the
Brandon Moore wrote:
Greg Fitzgerald wrote:
Since there's talk of removal of the composition operator in
Haskell-prime
http://hackage.haskell.org/trac/haskell-prime/wiki/CompositionAsDot,
how about this:
Instead of:
foo = f . g
you write:
foo = .g.f
A leading dot would mean, apply all
Tim Newsham wrote:
I was rewriting some non-haskell code in haskell and came up with this
construct:
foreach l f = mapM_ f l
main = do
args - getArgs
foreach args (\arg - do
foreach [1..3] (\n - do
putStrLn ((show n) ++ ) ++ arg)
)
)
which is reminiscent of foreach in other languages. Seems
George Young wrote:
[linux, ghci 6.4.3.20060820, hugs May 2006]
I have just started learning Haskell. I have hugs and ghci under
linux, and I'm going through the Gentle Introduction to
Haskellhttp://www.haskell.org/tutorial, so far through section 4,
case expressions and pattern matching. I'm
Bulat Ziganshin wrote:
Hello Malcolm,
Tuesday, August 22, 2006, 4:22:50 PM, you wrote:
2) allow to use type classes in type declarations like the types
itself. for example, allow the following:
f :: Num a = a - Int
write as
f :: Num - Int
and following:
sequence :: Monad m = [m a] - m
Bulat Ziganshin wrote:
Subtyping introduced in very natural (at least for OOP souls) way. We
may, for example, have functions:
doit :: MemBuf - IO Int
hRequestBuf :: MemoryStream - IO Int
hTell :: SeekableStream - IO Integral
and call doit - hRequestBuf - hTell and then return result, and all
Arie Peterson wrote:
Hello Brandon,
This could be handled with existential wrappers, except that the
wrapping is annoying, and probably interferes with optimizing when a
concrete type is known. Instead, a few changes to type synonyms handle
Bulat's cases.
With the proper interpretation,
Hans van Thiel wrote:
Hello All,
I'm wondering why I can't find any commercial Haskell applications on
the Internet. Is there any reason for this?
I can think of the following possibilities only:
1) Haskell is too slow for practical use, but the benchmarks I found
appear to contradict this.
2)
Martin Percossi wrote:
Hi, I'm wondering what the rationale was for not allowing capitalized
variable names (and uncapitalized type names and constructors). I can
only think of two arguments, and IMHO both of them are bad:
I'm not so sure about variable names and constructors, but the type
David House wrote:
How about we drop the idea of an auxilary cond function, and instead
just use a Boolean typeclass?
class Boolean b where
isTrue :: b - Bool
isFalse :: b - Bool
I don't think this covers embedded languages. If everything lives in
some monad it might be useful to rebind the
Joel Reymont wrote:
Is anyone using Haskell for heavy numerical computations? Could you
share your experience?
My app will be mostly about running computations over huge amounts of
stock data (time series) so I'm thinking I might be better of with OCaml.
If you are really serious about
Joel Björnson wrote:
Hi. I came a cross the following phenomena which, at least to me, occurs
kind
of awkward. The code below :
data MyData a where
DC1 :: (Show a ) = a - MyData a
instance Show (MyData a) where
show (DC1 a ) = show a
yields the ghci error :
'Could not deduce (Show
Clifford Beshers wrote:
Sara Kenedy wrote:
Hi all,
I want to write a function to separate a string into a list of strings
separated by commas.
Example:
separate :: String - [String]
separate Haskell, Haskell, and Haskell = [Haskell, Haskell, and
Haskell]
If anyone has some ideas, please
Sorry, I meant to send this to the whole list.
Brock Peabody wrote:
Please excuse my newbiness, but in this snippet:
data (Monad m) = DataType m = DataType { f :: Char - m () }
test_function :: (Monad m) = DataType m - m ()
I don't quite understand the problem, but maybe an example involving an
explicit recursion operator will help.
class Foo a where
foo :: a
instance Foo a = Foo (Maybe a) where
foo = Just foo
data Rec f = In (f (Rec f))
instance Foo (f (Rec f)) = Foo (Rec f) where
foo = In foo
compile
Data.Dynamic:
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-
Dynamic.html
Or carry an instance in along with a type parameter, using existentials
or GADT.
Brandon Moore
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
1 - 100 of 105 matches
Mail list logo