On Fri, Sep 23, 2016 at 3:00 PM, Simon Peyton Jones
wrote:
> Interesting. Is this case also an example, or is it a non-feature?
>
>
>
> class C t where
>
> type K t :: Type
>
> type T t :: K t -> Type
>
>
>
> m :: t -> T t a
>
>
>
>
>
> Ah, that’s quite
On Fri, Sep 23, 2016 at 3:19 AM, Simon Peyton Jones
wrote:
> This is an example of https://ghc.haskell.org/trac/ghc/ticket/12088.
>
Interesting. Is this case also an example, or is it a non-feature?
class C t where
type K t :: Type
type T t :: K t -> Type
m
On Thu, Oct 10, 2013 at 10:09 PM, Edward Kmett ekm...@gmail.com wrote:
Wait, that sounds like it induces bad semantics.
Can't we use that as yet another way to attack the sanctity of Set?
class Ord a = Foo a where
badInsert :: a - Set a - Set a
instance Foo Int where
badInsert =
On Wed, Oct 9, 2013 at 3:21 PM, Richard Eisenberg e...@cis.upenn.edu wrote:
Now I think we're on the same page, and I *am* a little worried about the
sky falling because of this. (That's not a euphemism -- I'm only a little
worried.)
Well, maybe I should be more worried.
The whole idea of
On Thu, Oct 10, 2013 at 12:11 PM, Simon Peyton-Jones
simo...@microsoft.comwrote:
Does GND make sense in cases where the superclasses aren't also derived?
If I had a type T whose Ord instance made use of the Eq instance for some
reason, and then I made a newtype T' with a new Eq instance and a
On Tue, Sep 10, 2013 at 1:31 AM, Charlie Paul charli...@gmail.com wrote:
I've been looking through Edward Kmett's lens library, and I'm a bit
befuddled about Getters. In my own code, why would I want to have something
be a Getter instead of a plain function? As far as I can see, a plain
On Sat, Aug 17, 2013 at 8:23 AM, Mathijs Kwik math...@bluescreen303.nlwrote:
damodar kulkarni kdamodar2...@gmail.com writes:
Thanks for this nice analogy and explanation. This brings monad
transformers to my mind.
without monad transformers, the monads are bit crippled in their
On Thu, Nov 29, 2012 at 7:50 AM, Dmitry Kulagin dmitry.kula...@gmail.comwrote:
Thank you, MigMit!
If I replace your type FoldSTVoid with:
data FoldMVoid = FoldMVoid {runFold :: Monad m = (Int - m ()) - m ()}
then everything works magically with any monad!
That is exactly what I wanted,
I'm not sure I understand
On Tue, Sep 11, 2012 at 11:06 AM, Corentin Dupont
corentin.dup...@gmail.com wrote:
Yes.
That's fantastic! This GADT is the missing piece of my puzzle. I transformed
a bit your solution, polluting it with some classes instances and fleshing
the functions:
data
As I see it, there are four possibilities for a given version of dependency:
1. The version DOES work. The author (or some delegate) has compiled
the package against this version and the resulting code is considered
good.
2. The version SHOULD work. No one has tested against this version,
but the
On Sun, Jun 17, 2012 at 2:26 AM, Tillmann Rendel
ren...@informatik.uni-marburg.de wrote:
Hi,
David Menendez wrote:
As you noticed, you can get somewhat better performance by using the
combinators that convert to S.Set internally, because they eliminate
redundant computations later
On Sat, Jun 16, 2012 at 3:57 AM, Tillmann Rendel
ren...@informatik.uni-marburg.de wrote:
George Giorgidze wrote:
I would like to announce the first release of the set-monad library.
On Hackage: http://hackage.haskell.org/package/set-monad
Very cool. Seems to work fine. But I am wondering
Message-
| From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-
| users-boun...@haskell.org] On Behalf Of David Menendez
| Sent: 06 June 2012 23:50
| To: José Pedro Magalhães
| Cc: glasgow-haskell-users@haskell.org Mailing List
| Subject: Re: Known problems with promoted
Are there any known issues involving type-level pairs and lists? I've
hit a few baffling type errors that went away when I refactored my
code to use locally-defined pairs and lists instead of those provided
by the prelude.
More worryingly, I had one function that would stop passing the type
On Sat, Jan 21, 2012 at 1:45 PM, David Barbour dmbarb...@gmail.com wrote:
On Sat, Jan 21, 2012 at 10:08 AM, Roman Cheplyaka r...@ro-che.info wrote:
* David Barbour dmbarb...@gmail.com [2012-01-21 10:01:00-0800]
As noted, IO is not strict in the value x, only in the operation that
generates
On Sat, Dec 24, 2011 at 7:15 AM, Duncan Coutts
duncan.cou...@googlemail.com wrote:
On 23 December 2011 20:09, Stefan Holdermans ste...@vectorfabrics.com wrote:
Here are the kinds of the type constructors:
(,,) :: * - * - * - *
(,) :: * - * - *
On Wed, Dec 21, 2011 at 12:20 PM, Conor McBride
co...@strictlypositive.org wrote:
On 21 Dec 2011, at 14:07, Erik Hesselink hessel...@gmail.com wrote:
On Wed, Dec 21, 2011 at 14:10, Bas van Dijk v.dijk@gmail.com wrote:
The semantics of Maybe are
clear: it's
On Wed, Dec 21, 2011 at 12:37 PM, wren ng thornton w...@freegeek.org wrote:
On 12/19/11 10:20 PM, David Menendez wrote:
On Mon, Dec 19, 2011 at 6:37 PM, wren ng thorntonw...@freegeek.org
wrote:
On 12/14/11 10:58 PM, Gregory Crosswhite wrote:
Of course, this is not a simple change at all
On Wed, Dec 21, 2011 at 8:10 AM, Bas van Dijk v.dijk@gmail.com wrote:
On 16 December 2011 16:26, Yves Parès limestr...@gmail.com wrote:
1) What about the First type? Do we {-# DEPRECATE #-} it?
Personnaly, I'm in favor of following the same logic than Int:
Int itself is not a monoid. You
On Mon, Dec 19, 2011 at 6:37 PM, wren ng thornton w...@freegeek.org wrote:
On 12/14/11 10:58 PM, Gregory Crosswhite wrote:
Of course, this is not a simple change at all because it would have to
be done in such a way as to respect the ordering of actions --- that
is, we can't have each action
On Sat, Dec 3, 2011 at 3:55 PM, Antoine Latter aslat...@gmail.com wrote:
On Sat, Dec 3, 2011 at 10:55 AM, edgar klerks edgar.kle...@gmail.com wrote:
Hi list,
I am using MonadSplit
(from http://www.haskell.org/haskellwiki/New_monads/MonadSplit ) for a
project and now I want to make a library
On Mon, Nov 21, 2011 at 2:13 PM, Tim Baumgartner
baumgartner@googlemail.com wrote:
Free Monads. It's amazing to be confronted again with notions I learned more
than ten years ago for groups. I have to admit that I'm probably not yet
prepared for a deeper understanding of this, but hopefully
On Sat, Nov 19, 2011 at 3:29 PM, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
On Sat, Nov 19, 2011 at 6:08 PM, Tim Baumgartner
baumgartner@googlemail.com wrote:
I have not yet gained a good understanding of the continuation monad, but I
wonder if it could be used here. What would a
On Tue, Jun 21, 2011 at 12:14 PM, Edward Kmett ekm...@gmail.com wrote:
The essence of data flow programming describes how you can use comonads to
model the semantics of dataflow languages.
One of the best stops from there is probably, Dave Menendez's response on
the Haskell mailing list back
GHC 6.12 introduces MonoLocalBinds, which disables polymorphic values
in let statements.
Your original code works for me if I use -XNoMonoLocalBinds
-XNoMonomorphismRestriction.
On Mon, Jun 20, 2011 at 9:02 AM, Serguey Zefirov sergu...@gmail.com wrote:
The fact is that (Num a) context works and
On Wed, Jun 8, 2011 at 3:15 PM, Malcolm Wallace malcolm.wall...@me.com wrote:
data Bar f a = Foo f = Bar {bar :: f a}
The class context on the data constructor buys you nothing extra in terms of
expressivity in the language. All it does is force you to repeat the context
on every function
On Thu, Mar 31, 2011 at 11:01 AM, Matthew Steele mdste...@alum.mit.edu wrote:
On Mar 30, 2011, at 5:29 PM, Mathijs Kwik wrote:
So loop really doesn't seem to help here, but I couldn't find another
way either to feed outputs back into the system.
What I need is:
Either A B ~ Either C B - A ~
On Thu, Mar 17, 2011 at 2:35 PM, wren ng thornton w...@freegeek.org wrote:
Another question on particulars. When dealing with natural numbers, we run
into the problem of defining subtraction. There are a few reasonable
definitions:
(1) If the result would drop below zero then throw an
On Sat, Jan 8, 2011 at 12:05 PM, Conor McBride
co...@strictlypositive.org wrote:
On 8 Jan 2011, at 15:27, Henning Thielemann wrote:
On Sat, 8 Jan 2011, Conor McBride wrote:
On 8 Jan 2011, at 11:14, Henning Thielemann wrote:
For me, the solutions of Dave Menendez make most sense:
On Sat, Jan 8, 2011 at 5:07 PM, Tony Morris tonymor...@gmail.com wrote:
Thanks guys for all the solutions. A slight correction below.
On 09/01/11 03:54, David Menendez wrote:
Naturally, if you also have pure and fmap, you also have a monad.
You have a pointed functor but not necessarily
On Sat, Jan 8, 2011 at 4:53 PM, Lennart Augustsson
lenn...@augustsson.net wrote:
It so happens that you can make a set data type that is a Monad, but it's
not exactly the best possible sets.
There's also the infinite search monad, which allows you to search
infinite sets in finite time,
On Fri, Jan 7, 2011 at 9:56 PM, Tony Morris tonymor...@gmail.com wrote:
I am wondering if it possible to generalise catMaybes:
(Something f, SomethingElse t) = t (f a) - t a
I have being doing some gymnastics with Traversable and Foldable and a
couple of other things from category-extras
On Sun, Dec 26, 2010 at 2:00 PM, michael rice nowg...@yahoo.com wrote:
instance Monad m = MonadPlus (MaybeT m) where
mzero = MaybeT $ return Nothing
mplus x y = MaybeT $ do maybe_value - runMaybeT x
case maybe_value of
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
On Thu, Nov 11, 2010 at 8:16 PM, John Lask jvl...@hotmail.com wrote:
consider length ...
I have records with the attribute length, length can be given as an Int,
Double, Float or maybe as a constructed type Length, length's use as a
record selector would also clash with List.length. All these
On Thu, Nov 11, 2010 at 10:00 PM, John Lask jvl...@hotmail.com wrote:
On Thu, Nov 11, 2010 at 8:16 PM, John Laskjvl...@hotmail.com wrote:
consider length ...
I have records with the attribute length, length can be given as an Int,
Double, Float or maybe as a constructed type Length,
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.
Eq with (==) as f and (/=) as g belongs to the 1. case
Note that the case of (==) and (/=)
On Mon, Oct 25, 2010 at 3:16 AM, Simon Peyton-Jones
simo...@microsoft.com wrote:
| On a related note, these are also apparently allowed (in 6.10.4):
| f :: forall a. (Eq a = a - a) - a - a
| -- the Eq context prevents the function from ever being called.
That's not true. E.g.
On Fri, Oct 22, 2010 at 4:20 AM, Simon Peyton-Jones
simo...@microsoft.com wrote:
Does anyone listening to this thread have an opinion? Just to summarise,
Sebastian's
proposal is that Haskell's implicit quantification (adding foralls) would
occur *only* right
at the top of a type
On Thu, Sep 9, 2010 at 11:33 PM, wren ng thornton w...@freegeek.org wrote:
On 9/9/10 1:04 AM, David Menendez wrote:
Fascinating. I figured there might be a counter-example involving seq,
but this is pretty subtle.
In particular, would it be fair to say that in Haskell-without-seq, E
(f
On Wed, Sep 8, 2010 at 11:17 PM, wren ng thornton w...@freegeek.org wrote:
On 9/7/10 4:21 AM, Daniel Fischer wrote:
On Tuesday 07 September 2010 05:22:55, David Menendez wrote:
In fact, I think *every* appropriately-typed function satisfies that
law. Does anyone know of a counter-example
On Mon, Sep 6, 2010 at 7:51 AM, John Lato jwl...@gmail.com wrote:
On Sun, Sep 5, 2010 at 7:18 PM, David Menendez d...@zednenem.com wrote:
On Sun, Sep 5, 2010 at 8:40 AM, John Lato jwl...@gmail.com wrote:
On Sat, Sep 4, 2010 at 12:34 PM, David Menendez d...@zednenem.com
wrote:
On Fri
On Mon, Sep 6, 2010 at 1:37 PM, michael rice nowg...@yahoo.com wrote:
A concrete library?
I'm playing around with Data.Bits. It has .. and .|. which I assume are
functions
(rather than operators) because I don't see and infix statement for them.
Correct?
.|. and .. are operators because
On Mon, Sep 6, 2010 at 2:21 PM, Daniel Díaz danield...@asofilak.es wrote:
El Lun, 6 de Septiembre de 2010, 7:50 pm, David Menendez escribió:
Operators default to infixl 9 unless specified otherwise,
so no infix declaration is needed.
Why there is a default infix? Why it is 9?
That's what
On Mon, Sep 6, 2010 at 10:22 PM, wren ng thornton w...@freegeek.org wrote:
On 9/6/10 1:33 PM, David Menendez wrote:
For that matter, can you even describe what pure is intended to do
without reference to* or join?
As already stated: fmap f . pure = pure . f
That's pretty general. For lists
On Sun, Sep 5, 2010 at 8:40 AM, John Lato jwl...@gmail.com wrote:
On Sat, Sep 4, 2010 at 12:34 PM, David Menendez d...@zednenem.com wrote:
On Fri, Sep 3, 2010 at 8:23 AM, John Lato jwl...@gmail.com wrote:
+1 for using the proper constraints, and especially for bringing over
Pointed
On Sun, Sep 5, 2010 at 8:47 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
I _can_ think of a data type that could conceivably be an instance of
Pointed but not Applicative: a BloomFilter (though there's not really
any point in having a BloomFilter with only one value that I can
On Sat, Sep 4, 2010 at 11:07 AM, John Millikin jmilli...@gmail.com wrote:
On Fri, Sep 3, 2010 at 23:02, David Menendez d...@zednenem.com wrote:
Yes, using foreign namespaces is one of the things recommended against
when serving XHTML as text/html. This says nothing about documents
following
On Fri, Sep 3, 2010 at 8:23 AM, John Lato jwl...@gmail.com wrote:
Do you have a kind * implementation of Foldable? I'd be interested in
seeing it, because I was unable to create a usable implementation (based
upon the RMonad scheme) on my last attempt.
I always figured it would look something
On Sat, Sep 4, 2010 at 2:06 PM, michael rice nowg...@yahoo.com wrote:
The two myAction functions below seem to be equivalent and, for this small
case, show an interesting economy of code, but being far from a Haskell
expert, I have to ask, is the first function as small (code wise) as it
On Fri, Sep 3, 2010 at 12:40 AM, John Millikin jmilli...@gmail.com wrote:
Haddock is generating files with an .html extension, which causes
webservers to serve it using text/html, the incorrect MIME-type.
Secton 5.1 of the XHTML recommendation states: XHTML Documents which
follow the
On Thu, Sep 2, 2010 at 10:45 AM, michael rice nowg...@yahoo.com wrote:
Can you think of a situation for
\x - f x
or
\x y z - x + ord y - head z
that would require x (y z) to have their type(s) declared (ala Pascal), or
is it always
inferred by what appears to the right of -?
I think
On Thu, Sep 2, 2010 at 9:16 PM, michael rice nowg...@yahoo.com wrote:
This may be a dumb question, but here goes.
Types Maybe, Either, List, are types and also instances of Functor (and
Monad).
Assuming (-) is also a type, where can I find its type definition?
(-) is a built-in type. You
On Tue, Aug 31, 2010 at 2:07 PM, Permjacov Evgeniy permea...@gmail.com wrote:
A Control.Arrow in base package introduces an arrow type, and ghc have
good support for arrow notation. Many things, avaible in monads, are
avaible in arrows as well. There is an arrows package, that introduces
some
On Fri, Aug 13, 2010 at 10:43 AM, Johan Tibell johan.tib...@gmail.com wrote:
Here's a rule of thumb: If you have binary data, use Data.ByteString. If you
have text, use Data.Text. Those libraries have benchmarks and have been well
tuned by experienced Haskelleres and should be the fastest and
2010/7/25 Eugeny N Dzhurinsky b...@redwerk.com:
Hello, everybody!
I am trying to develop some sort of library, which supposed to sign into a WEB
service, then perform some requests with it.
Initially I designed methods in the following way
data DServError = InvalidCredentials |
On Sat, Jul 17, 2010 at 2:10 PM, Don Stewart d...@galois.com wrote:
andrewcoppin:
Don Stewart wrote:
allbery:
like to repeat one request: Please, please, please make it easier to
- Download older versions of HP.
- Find out which HP release contains what.
- Figure out what the difference
On Sun, Jul 11, 2010 at 3:25 PM, d...@patriot.net wrote:
Prelude Haskore :l Haskore
no location info: module `Haskore' is a package module
Failed, modules loaded: none.
You need to use :m here.
--
Dave Menendez d...@zednenem.com
http://www.eyrie.org/~zednenem/
On Sat, Jul 3, 2010 at 3:32 AM, Kevin Quick qu...@sparq.org wrote:
On Wed, 23 Jun 2010 00:14:03 -0700, Simon Peyton-Jones
simo...@microsoft.com wrote:
I'm interested in situations where you think fundeps work and type
families don't. Reason: no one knows how to make fundeps work cleanly with
On Sat, Jul 3, 2010 at 7:20 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Serguey Zefirov sergu...@gmail.com writes:
I cannot directly create my own class instances for them because of
that. But I found that I can write Template Haskell code that could do
that - those data types
On Thu, Jul 1, 2010 at 2:09 PM, Andrew Coppin
andrewcop...@btinternet.com wrote:
Consider the following:
class Path p where ...
class Path p = CompletePath p where ...
class Path p = IncompletePath p where
type CompletedPath p :: *
Obviously, the idea is that CompletedPath Foo
On Thu, Jul 1, 2010 at 2:35 PM, Christopher Lane Hinson
l...@downstairspeople.org wrote:
On Thu, 1 Jul 2010, Christopher Lane Hinson wrote:
Something like this should work:
class (Path p, CompletePath (CompletedPath p)) = IncompletePath p where
type CompletedPath p :: *
AIUI, this
On Sun, Jun 27, 2010 at 1:26 PM, Sebastian Fischer
s...@informatik.uni-kiel.de wrote:
Hi Max,
very interesting observations!
By the way, you can use this stuff to solve the restricted monad
problem (e.g. make Set an instance of Monad). This is not that useful
until we find out what the
On Fri, Jun 25, 2010 at 12:58 AM, Ivan Miljenovic
ivan.miljeno...@gmail.com wrote:
On 25 June 2010 14:41, David Menendez d...@zednenem.com wrote:
On Thu, Jun 24, 2010 at 3:08 AM, Ivan Miljenovic
ivan.miljeno...@gmail.com wrote:
As an aside, Alex Mason and I are discussing the possibility
On Thu, Jun 24, 2010 at 3:08 AM, Ivan Miljenovic
ivan.miljeno...@gmail.com wrote:
As an aside, Alex Mason and I are discussing the possibility of taking
advantage of AusHack *shameless plug* to write some kind of classes
for the different types of containers with a hierarchy. I know about
On Mon, Jun 21, 2010 at 7:04 AM, Neil Brown nc...@kent.ac.uk wrote:
Here's my speculation, based on glancing at the libraries involved: I
believe the reason for this may be the MonadCatchIO instance for ContT:
===
instance MonadCatchIO m = MonadCatchIO (ContT r m) where
m `catch` f =
On Fri, Jun 18, 2010 at 12:44 PM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Sebastian Fischer wrote:
Edward Kmett wrote:
Sebastian Fischer wrote:
Heinrich Apfelmus wrote:
newtype CMaybe a = CMaybe (forall r. (a - Maybe r) - Maybe r)
Yes, with this type `orElse` has the same type as
On Thu, May 27, 2010 at 10:39 AM, Carlos Camarao
carlos.cama...@gmail.com wrote:
Isaac Dupree:
Your proposal appears to allow /incoherent/ instance selection.
This means that an expression can be well-typed in one module, and
well-typed in another module, but have different semantics in the
On Thu, May 27, 2010 at 10:39 AM, Carlos Camarao
carlos.cama...@gmail.com wrote:
Isaac Dupree:
Your proposal appears to allow /incoherent/ instance selection.
This means that an expression can be well-typed in one module, and
well-typed in another module, but have different semantics in the
On Fri, May 21, 2010 at 3:56 AM, Max Bolingbroke
batterseapo...@hotmail.com wrote:
On 21 May 2010 01:58, Carlos Camarao carlos.cama...@gmail.com wrote:
But this type-correct program would become not typeable if
instances such as the ones referred to before (by Daniel Fischer)
I was thinking
2010/5/21 R J rj248...@hotmail.com:
Why does the following, trivial code snippet below hang GHCi when I type
Scalene Failure, and what's the fix?
An instance of Ord must declare compare or (=). You only defined (),
so () is using the default definition. Here are the defaults:
compare x y
On Mon, May 10, 2010 at 5:51 AM, Milind Patil milind_pa...@hotmail.com wrote:
For a function
f :: a - m b
f = undefined
I am having trouble understanding how the type of
(= f)
is
(= f) :: m a - m b
where, by definition, type of (=) is
(=) :: (Monad m) = m a - (a - m b) - m b
I
On Sat, May 8, 2010 at 1:16 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
David Menendez d...@zednenem.com writes:
On Sat, May 8, 2010 at 12:15 AM, Ivan Lazar Miljenovic
Well, any time you have a do-block like this you're using failable
patterns:
maybeAdd :: Maybe Int
On Fri, May 7, 2010 at 10:26 PM, John Meacham j...@repetae.net wrote:
On Fri, May 07, 2010 at 08:27:04PM -0400, Dan Doel wrote:
Personally, I don't really understand why unfailable patterns were canned
(they don't seem that complicated to me), so I'd vote to bring them back, and
get rid of
On Sat, May 8, 2010 at 12:15 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
David Menendez d...@zednenem.com writes:
I wonder how often people rely on the use of fail in pattern matching.
Could we get by without fail or unfailable patterns?
ensureCons :: MonadPlus m = [a] - m
On Fri, Apr 30, 2010 at 8:19 AM, Malcolm Wallace
malcolm.wall...@cs.york.ac.uk wrote:
Because I suggest that portablebase re-export the haskell2010 API in its
entirety, it would be impossible to use both packages explicitly at the same
time from a single module - users would need to choose one
On Mon, Apr 26, 2010 at 2:55 PM, Thomas van Noort tho...@cs.ru.nl wrote:
On 26-4-2010 20:12, Daniel Fischer wrote:
Am Montag 26 April 2010 19:52:23 schrieb Thomas van Noort:
...
Yes, y's type is more general than the type required by f, hence y is an
acceptable argument for f - even z ::
On Sat, Apr 24, 2010 at 5:56 AM, Barak A. Pearlmutter ba...@cs.nuim.ie wrote:
Even deriving(Ord) only produces compare and relies on standard
definitions for other methods.
I don't think that's actually a problem. Surely the IEEE Floating
Point types would give their own definitions of not
On Fri, Apr 23, 2010 at 10:11 PM, John Goerzen jgoer...@complete.org wrote:
Don Stewart wrote:
Oh, the Platform has very strict standards about APIs,
When a package may be added:
http://trac.haskell.org/haskell-platform/wiki/AddingPackages
That looks like a very solid document. Does it
On Sun, Apr 18, 2010 at 5:02 PM, wren ng thornton
w...@community.haskell.org wrote:
Heinrich Apfelmus wrote:
Anders Kaseorg wrote:
This concept can also be generalized to monad transformers:
class MonadTrans t = MonadTransMorph t where
morph :: Monad m = (forall b. (t m a - m b) - m b)
On Thu, Apr 1, 2010 at 5:27 AM, Jens Blanck jens.bla...@gmail.com wrote:
I was wondering if someone could give me some references to when and why the
choice was made to default integral numerical literals to Integer rather
than to Int in Haskell. Also, if you are aware of similar discussions in
On Sat, Mar 27, 2010 at 12:56 AM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
Using bang patterns didn't help almost anything here. Using rem
instead of mod made the time go from 45s to 40s. Now, using -fvia-C
really helped (when I used rem but not using mod). It went down to
10s.
On Sat, Mar 27, 2010 at 1:45 PM, Tillmann Rendel
ren...@mathematik.uni-marburg.de wrote:
Jan-Willem Maessen wrote:
It's worth pointing out that there's a bit of bang-pattern mysticism going
on in this conversation (which has not been uncommon of late!). A non-buggy
strictness analyzer should
On Fri, Mar 26, 2010 at 11:07 AM, Edward Kmett ekm...@gmail.com wrote:
On Fri, Mar 26, 2010 at 11:04 AM, Edward Kmett ekm...@gmail.com wrote:
-- as long as you're ignoring 'seq'
terminateSeq :: a - Unit
terminateSeq a = a `seq` unit
Er ignore that language about seq. a `seq` unit is
On Fri, Mar 26, 2010 at 8:20 PM, zaxis z_a...@163.com wrote:
In 6.12.1 under archlinux
let f x y z = x + y + z
:t f
f :: (Num a) = a - a - a - a
:t (=) . f
(=) . f :: (Num a) = a - ((a - a) - a - b) - a - b
((=) . f) 1 (\f x - f x) 2
5
In 6.10.4_1 under freebsd
let f x y z = x + y + z
On Fri, Mar 26, 2010 at 8:59 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
zaxis z_a...@163.com writes:
In 6.10.4_1 under freebsd
let f x y z = x + y + z
*Money :t f
f :: (Num a) = a - a - a - a
:t (=) . f
(=) . f :: (Monad ((-) a), Num a) = a - ((a - a) - a - b) - a - b
On Fri, Mar 26, 2010 at 9:13 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
David Menendez d...@zednenem.com writes:
On Fri, Mar 26, 2010 at 8:59 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Some definitions and exports got changed, so in 6.12 the (- a) Monad
On Sun, Mar 21, 2010 at 11:31 PM, adamtheturtle kill2thr...@hotmail.com wrote:
So I have the code
shuffle :: Int - [a] - [a]
shuffle i [] = []
shuffle i cards = (cards!!i) : shuffle (fst pair) (delete (cards!!i) cards)
where pair = randomR (0, 51) (mkStdGen 42)
and it doesn't work, am I
On Fri, Feb 5, 2010 at 3:39 PM, Ryan Ingram ryani.s...@gmail.com wrote:
On Fri, Feb 5, 2010 at 5:19 AM, Martijn van Steenbergen
mart...@van.steenbergen.nl wrote:
Ryan Ingram wrote:
Unfortunately, this makes things like
infinite_xs - sequence (repeat arbitrary)
no longer work, since the
On Tue, Feb 2, 2010 at 1:48 PM, Ryan Ingram ryani.s...@gmail.com wrote:
Gen slightly breaks the monad laws:
arbitrary = return
is not the same as
return () = const arbitrary
because each bind splits the generator, so you end up with a different
seed passed to arbitrary in these two cases.
2010/2/1 Günther Schmidt gue.schm...@web.de:
Hi all,
I know this sounds daft but I do have good reason to ask.
Is it possible that GHC's core itself has a problem with a particular Umlaut
only?
HDBC-ODBC won't read in data from an SQLite database as soon as it comes
accross a *lowercase*
On Fri, Jan 8, 2010 at 6:38 PM, John Millikin jmilli...@gmail.com wrote:
Earlier today I uploaded the capped-list package; I didn't think there
would be any interest, since it's a relatively trivial data structure,
but already there's been three emails and an IRC convo about it.
In short,
On Tue, Dec 29, 2009 at 12:24 PM, Stephen Tetley
stephen.tet...@gmail.com wrote:
oo is one of of a family of functions I use often to avoid
sectioning/composing mania. It's known to Raymond Smullyan fans as
'blackbird', though I call it oo as a pun on Standard MLs o (which is
Haskells (.) of
On Mon, Dec 21, 2009 at 11:14 PM, joeltt j...@harpsoft.com wrote:
I'm trying to write my first Haskell program. The below is the first real
logic block I've tried to write, unfortunately I get a The last statement
in a 'do' construct must be an expression error when loading the method.
On Tue, Dec 8, 2009 at 4:25 PM, Vitaliy Akimov vitaliy.aki...@gmail.com wrote:
Hi John,
I don't know if this is useful for you, but these are instances of
Cofunctor's comap. For example if we use TypeCompose package we have:
rebox f = unFlip . cofmap f . Flip
Alternately, rebox = flip (.)
On Sun, Dec 6, 2009 at 8:39 AM, Dan Doel dan.d...@gmail.com wrote:
Apologies for the double-reply...
Your mail prompted me to finally get around to adding a mono/polytype system
to an interpreter I've been working on for pure type systems, to see what a
GHC-alike type system would look like.
On Fri, Dec 4, 2009 at 1:14 PM, Jason McCarty jmcca...@sent.com wrote:
wren ng thornton wrote:
concat1 :: T a b - (b - T a b) - T a b
This could just as easily be
concat :: T a b - (b - T a c) - T a c
right? It's a little weird to call this concatenation, but I bet it
could come in
On Thu, Dec 3, 2009 at 12:32 PM, Alec Berryman a...@thened.net wrote:
Emmanuel CHANTREAU on 2009-12-03 13:03:02 +0100:
In my futur program, it use a lot of binary trees with strings (words)
as leaf. There is just arround 1000 words and they will appear a lot of
times. The program will
On Thu, Dec 3, 2009 at 6:28 AM, Joachim Breitner
m...@joachim-breitner.de wrote:
Hi,
Am Donnerstag, den 03.12.2009, 11:13 + schrieb Matthew Pocock:
Perhaps what you are looking for is a more powerful defining
semantics?
newtype MyFoo = Foo defining (Foo(..)) -- all class instances that
On Wed, Dec 2, 2009 at 7:16 PM, Martijn van Steenbergen
mart...@van.steenbergen.nl wrote:
So here's a totally wild idea Sjoerd and I came up with.
What if newtypes were unwrapped implicitly?
As several have suggested, this creates ambiguity.
But it might be handy to have a way to declare a
1 - 100 of 447 matches
Mail list logo