[Haskell-cafe] FP relates events in NYC

2013-10-09 Thread Dan Frumib
inars, user groups, etc Thanks - Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANN: E-book version of the Typeclassopedia

2013-10-05 Thread Dan Frumib
Thanks, that looks useful! :) > On 04 Oct 2013, at 17:13, Erlend Hamberg wrote: > > While re-reading Brent Yorgey's Excellent Typeclassopedia I converted it > to Pandoc Markdown in order to be able to create an EPUB version. Having > a “real” e-book meant that I could comfortably read it on my e

Re: [Haskell-cafe] Lifting IO actions into Applicatives

2013-10-01 Thread Dan Burton
Interesting. It's similar in spirit to basically a safe Coerce typeclass, but for * -> * types. class Coerce a b where coerce :: a -> b class Coerce1 f g where coerce1 :: f a -> g a -- Dan Burton On Tue, Oct 1, 2013 at 11:00 AM, John Wiegley wrote: &g

Re: [Haskell-cafe] Haskell.org design is broken

2013-10-01 Thread Dan Burton
Apparently that element is generated by the wiki software, since most pages want the "view source / history" buttons above the rest of the content. jQuery('#mw-content-text > p:first').hide() -- Dan Burton On Tue, Oct 1, 2013 at 8:17 AM, Dan Burton wrote: > The of

Re: [Haskell-cafe] Haskell.org design is broken

2013-10-01 Thread Dan Burton
The offending HTML is on line 93: When I delete this paragraph element from the DOM, the ugly white bar goes away. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Lifting IO actions into Applicatives

2013-10-01 Thread Dan Burton
tentsForm Could you abstract `serverSide` out into a typeclass, such as ApplicativeIO? Sure. but why bother? The point is, you've got the specialization you need already. -- Dan Burton On Tue, Oct 1, 2013 at 1:20 AM, Tom Ellis < tom-lists-haskell-cafe-2...@jaguarpaw.co.uk> wrote: &g

Re: [Haskell-cafe] Music update

2013-09-22 Thread Dan Krol
Will there be a video of the live premier? On Fri, Sep 20, 2013 at 12:14 PM, Mark Lentczner wrote: > Some might remember me asking about music packages a while back... An > update: > > I ended up using Euterpea, which in turn uses both Codec.Midi and > Sound.PortMidi. My working environment was

Re: [Haskell-cafe] Reasoning about performance

2013-09-03 Thread Dan Burton
rsion would use twice as much memory as allPairs3. See also: http://www.haskell.org/haskellwiki/Tail_recursion Here's a fun alternative for you to benchmark, using an old trick. I kind of doubt that this one will optimize as nicely as the others, but I am by no means an optimization guru: a

Re: [Haskell-cafe] inv f g = f . g . f

2013-08-17 Thread Dan Burton
ns/3.9.0.2/doc/html/Control-Lens-Iso.html#v:involuted -- Dan Burton On Sat, Aug 17, 2013 at 1:43 PM, Dan Burton wrote: > This is indeed a job for lens, particularly, the Iso type, and the "under" > function. Lens conveniently comes with a typeclassed isomorphism called > "

Re: [Haskell-cafe] inv f g = f . g . f

2013-08-17 Thread Dan Burton
This is indeed a job for lens, particularly, the Iso type, and the "under" function. Lens conveniently comes with a typeclassed isomorphism called "reversed", which of course has a list instance. >>> under reversed (take 10) ['a'.. 'z'] "qrstu

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Dan Burton
appear during the execution of the Arrow are > also in scope. This really helped solidify the idea in my head that the "shape of the factory" only makes static choices, because all of the Arrow-y "processing" happens between <- and -< -- Dan Burton On Fri, Aug

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Dan Burton
, you also have an automatic instance for Applicative, which I brought up about a month ago on reddit: http://www.reddit.com/r/haskell/comments/1ivd23/default_functor_and_applicative_instances_for/ -- Dan Burton On Fri, Aug 16, 2013 at 7:52 AM, Brandon Allbery wrote: > On Fri, Aug 16, 2013 at

Re: [Haskell-cafe] One-element tuple

2013-08-15 Thread Dan Burton
ues as their own one-tuples. I imagine you could write some fancy hack that uses the type system to automatically promote values to Oneples of the given value when an "expected: Oneple Foo, actual: Foo" error occurs. But this would not be very useful in general. An uglier option: type Onep

Re: [Haskell-cafe] ScopedTypeVariables

2013-08-06 Thread Dan Doel
This is already a separate extension: PatternSignatures. However, that extension is deprecated for some reason. On Tue, Aug 6, 2013 at 2:46 PM, Evan Laforge wrote: > Occasionally I have to explicitly add a type annotation, either for > clarity or to help choose a typeclass instance. Usually to

Re: [Haskell-cafe] Alternative name for return

2013-08-06 Thread Dan Burton
ry of Hask. However, it is convenient to have both in scope unqualified, so maybe lift would not be the best choice. -- Dan Burton On Aug 6, 2013 7:38 AM, "Tom Ellis" < tom-lists-haskell-cafe-2...@jaguarpaw.co.uk> wrote: > On Tue, Aug 06, 2013 at 04:26:05PM +0200, Jerzy Karczm

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Dan Doel
let Just x | b = Just 1 where b = x > 0 let Just x | b = Just 1 b = x > 0 These all behave the same way now. Which ones should change? If Haskell had a non-recursive let, that'd probably be a different story. But it doesn't. On Tue, Jul 9, 2013 at 1:

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Dan Doel
The definition Just x | x > 0 = Just 1 is recursive. It conditionally defines Just x as Just 1 when x > 0 (and as bottom otherwise). So it must know the result before it can test the guard, but it cannot know the result until the guard is tested. Consider an augmented definition: Just x

Re: [Haskell-cafe] Subclass or no subclass?

2013-06-30 Thread Dan Burton
> > I am not trying to say "every building is a shelter", rather "anything > that is a building must provide sheltering services". Well if it walks like a shelter and quacks like a shelter... /shrug The "is a" relationship is not a good way to think about type classes, in my opinion. The "interf

Re: [Haskell-cafe] Int is broken [Was: Different answers on different machines]

2013-06-02 Thread Dan Doel
There is a package that implements an Int that throws an exception on overflow: http://hackage.haskell.org/package/safeint Since Int's existence is pretty much all about trading for performance, I wouldn't recommend holding your breath on the above becoming the default. If you want things to

Re: [Haskell-cafe] Propositions in Haskell

2013-05-16 Thread Dan Mead
maybe this will help? Haskell code in and of itself isn't special. proofs can happen with the type system, but typically you'd want to define a target language and do assertions about it, similar to how a compiler inspects it's input programs. Haskell is not homoiconic nor is it like coq or prolog

Re: [Haskell-cafe] Propositions in Haskell

2013-05-15 Thread Dan Mead
i don't understand what you're trying to do with that code, however you seem to be asking about theorem proving in general check out http://www.haskell.org/haskellwiki/Libraries_and_tools/Theorem_provers and http://en.wikipedia.org/wiki/Automated_theorem_proving hope it helps On Wed, May 1

Re: [Haskell-cafe] Interfacing Java/Haskell

2013-05-09 Thread Dan Mead
(oops, forgot to reply all) if you're on the jvm already why not consider clojure? it lacks static typing, but S expressions can stand in for haskell types if you really need them to. otherwise you'll have to do some fancy JNI calls and worry about calling haskell from C, like this http://www.

Re: [Haskell-cafe] Hackage checking maintainership of packages

2013-05-06 Thread Dan P.
On Monday 06 May 2013 14:34:13 Tobias Dammers wrote: > The problem is that people tend to (truthfully) check such a box, then > stop maintaining the package for whatever reasons, and never bother > unchecking the box. I think there should be just one mail per maintainer mail address, not per pack

Re: [Haskell-cafe] Stream fusion and span/break/group/init/tails

2013-04-29 Thread Dan Doel
lement this with sensible > characteristics > > > within the fusion framework. > > > > > > > If you could "solve" concat, might that also lead to be being able to do > > without the Skip constructor? > > Dan is right, we still need Skip. My suggested

Re: [Haskell-cafe] Why were datatype contexts removed instead of "fixing them"?

2013-04-25 Thread Dan Doel
really think they're worth saving in general, though. I haven't missed them, at least. -- Dan On Thu, Apr 25, 2013 at 3:19 PM, Gábor Lehel wrote: > Good point, again. Is that the only problem with it? > > > On Thu, Apr 25, 2013 at 5:57 PM, Dan Doel wrote: > >> It

Re: [Haskell-cafe] Why were datatype contexts removed instead of "fixing them"?

2013-04-25 Thread Dan Doel
It is not completely backwards compatible, because (for instance) the declaration: newtype C a => Foo a = Foo a was allowed, but: newtype Foo a where Foo :: C a => a -> Foo a is an illegal definition. It can only be translated to a non-newtype data declaration, which changes the s

Re: [Haskell-cafe] Stream fusion and span/break/group/init/tails

2013-04-24 Thread Dan Doel
like: Yield 1, Yield 2, Yield 3, Skip, Yield 4, Yield 5, Skip, Skip, Yield 6, Yield 7, Skip, Done -- Dan On Wed, Apr 24, 2013 at 6:52 PM, Gábor Lehel wrote: > > > On Wed, Apr 24, 2013 at 7:56 PM, Bryan O'Sullivan wrote: > >> On Wed, Apr 24, 2013 at 10:47 AM, Duncan

[Haskell-cafe] Unit Testing with Control.Proxy

2013-04-16 Thread Dan
Hi all, I've discovered the excellent proxy library recently and one thing strikes me. How do you unit test a proxy? Are there any specific methods or workflows for doing this cleanly and consistently? Daniel -- ~~ Whatever happens, the sun's still gonna come up tomorrow ~~

Re: [Haskell-cafe] Need some advice around lazy IO

2013-03-18 Thread Dan Doel
Do note that deepSeq alone won't (I think) change anything in your current code. bug will deepSeq the file contents. And the cons will seq bug. But nothing is evaluating the cons. And further, the cons isn't seqing the tail, so none of that will collapse, either. So the file descriptors will still

Re: [Haskell-cafe] Need some advice around lazy IO

2013-03-17 Thread Dan Doel
ne. As an aside, you should never use hClose when doing lazy I/O. That's kind of like solving the above, "i've allocated too much memory," problem with, "just overwrite some expensive stuff with some other cheap stuff to free up space." -- Dan On Sun, Mar 17, 2013 a

Re: [Haskell-cafe] Haskell + RankNTypes + (forall p. p Char -> p Bool) sound?

2013-03-05 Thread Dan Doel
Just because you can't use the 'magic primitive' in question to produce an element of the empty type doesn't mean the system is sound (nor does type soundness have anything to do with proving 'false'). The question is what the primitive is supposed to do. If it's supposed to work as a witness of e

Re: [Haskell-cafe] Haskell syntax/indentation for vim

2013-03-04 Thread Dan Doel
do block ending in a return > > Even that last one is slightly questionable, I feel, but probably works > for almost all cases. Are there any others? > > On Mon, Mar 04, 2013 at 12:20:12PM -0500, Dan Doel wrote: >> I hadn't seen this before, but I tried it out, and the p

Re: [Haskell-cafe] Haskell syntax/indentation for vim

2013-03-04 Thread Dan Doel
ion mode I use frequently outdents when I type '=>' (which annoys the hell out of me, because it's almost never correct), but I don't know if it can be done intelligently enough to be useful (which would be important). Something to keep in mind, though. -- Dan On Sun, Mar

Re: [Haskell-cafe] ifdef based on which OS you're on

2013-02-24 Thread Dan Cross
Why not just write code that writes out the path you want to take and link against it? - Dan C. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Maintaining lambdabot

2013-02-20 Thread Dan Burton
least the next few weeks. I can promise to occasionally throw my opinion around as if it mattered, though. ;) -- Dan Burton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Maintaining lambdabot

2013-02-17 Thread Dan Burton
Sounds great. Lambdabot is an important icon to the Haskell community; it will be nice to brush off the bitrot and make lambdabot easier for the average Haskeller to install without having to rely on Cale keeping it running on irc (grateful, though we are). -- Dan Burton On Feb 17, 2013 3:04 PM

Re: [Haskell-cafe] ifdef based on which OS you're on

2013-02-15 Thread Dan Cross
system at compile time. E.g., a Darwin and Win32 modules that provide a function that calls 'SSL.contextSetVerificationMode ctx SSL.VerifyNone', and some kind of Generic module that provides a function that does the rest. - Dan C. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Inference for RankNTypes

2013-01-02 Thread Dan Doel
with a higher-rank type (whether because it inferred it separately, or you gave it), and that does trigger the alternate code path. If that's still too vague, you'll have to refer to the paper. -- Dan * http://research.microsoft.com/en-us/um/people/simonpj/papers/constraints/jfp-outsidei

Re: [Haskell-cafe] Inference for RankNTypes

2013-01-02 Thread Dan Doel
On Wed, Jan 2, 2013 at 11:20 AM, Dan Doel wrote: > Note that even left-to-right behavior covers all cases, as you might have: > > f x y > > such that y requires x to be checked polymorphically in the same way. > There are algorithms that can get this right in general,

Re: [Haskell-cafe] Inference for RankNTypes

2013-01-02 Thread Dan Doel
Your example doesn't work for the same reason the following doesn't work: id runST () It requires the inferencer to instantiate certain variables of id's type to polymorphic types based on runST (or flip's based on one), and then use that information to check (id in your example) as a polymo

Re: [Haskell-cafe] lambda case (was Re: A big hurray for lambda-case (and all the other good stuff))

2012-12-30 Thread Dan Burton
s too powerful, nor *how *that would lead to extensive abuse. Well, "too powerful" or not, meta-programming should be more easily available at least at *some *layer of language development without having to resort to hacking the compiler. -- Dan Burton ___

Re: [Haskell-cafe] lambda case (was Re: A big hurray for lambda-case (and all the other good stuff))

2012-12-30 Thread Dan Burton
from the flexibility proffered to the rest of the language. tl;dr give me easily extensible syntax, rather than having to run to GHC devs every time I want a new or different flavor of sugar. -- Dan Burton ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-11-30 Thread Dan Doel
Lists! The finite kind. This could mean Seq for instance. On Nov 30, 2012 9:53 AM, "Brent Yorgey" wrote: > On Fri, Nov 30, 2012 at 02:33:54AM +0100, Ben Franksen wrote: > > Brent Yorgey wrote: > > > On Thu, Nov 29, 2012 at 03:52:58AM +0100, Ben Franksen wrote: > > >> Tony Morris wrote: > > >> >

Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?

2012-11-24 Thread Dan
7;ll add the VS option next time we run it (I assume they are a small number (?) ) --- On Sat, 11/24/12, Malcolm Wallace wrote: From: Malcolm Wallace Subject: Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ? To: "Dan" Cc: haskell-cafe@haskell.org Date: Saturday

Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?

2012-11-24 Thread Dan
Yes Janek, I will post the results in a few days/one week max, once we get enough data in. Dan --- On Sat, 11/24/12, Janek S. wrote: From: Janek S. Subject: Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ? To: haskell-cafe@haskell.org Cc: "Dan" Date

[Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?

2012-11-23 Thread Dan
Because I see there are many preferences on what IDE to use for Haskell I've created a quick survey on this topic. Please click here and select your choices from the lists. http://kwiksurveys.com/s.asp?sid=oqr42h4jc8h0nbc53652 Any comments/suggestions are welcome. (if any is missing, etc) Apo

Re: [Haskell-cafe] mtl-2.1 severly broken, cabal needs blacklisting

2012-11-13 Thread Dan Burton
log/2012/11/solving-cabal-hell -- Dan Burton (801-513-1596) On Tue, Nov 13, 2012 at 9:27 AM, Andreas Abel wrote: > After 2 days of shrinking 251 modules of source code to a few lines I > realized that modify in MonadState causes <> in mtl-2.1. > > > http://hackage.haskell.or

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-10-16 Thread Dan Doel
ion. This is true in category theory, when you talk about algebraic theories, and it's true in Haskell when you start noticing that various little languages are described by algebraic theories. But from this angle, I see no reason why it's _better_ to split variable

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-10-15 Thread Dan Doel
n disguise. (And, amusingly, we're even using polymorphic recursion, so if this isn't in a class, or given an explicit type signature, inference will silently get the wrong answer.) So, there are good reasons for making (>>=) primitive, and not really any (that I can see) for makin

[Haskell-cafe] OpenGL library will not load into GHCi 7.6.1 on Win7 x86-64

2012-10-09 Thread Dan Haraj
This is a regression of some sort since the library operates fine within GHCi for previous versions of GHC. I don't know whether it is a problem with GHCi, the OpenGL library, or some third party. This is the error encountered when a module that uses OpenGL tries to load: Prelude Main> main Loadin

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-25 Thread Dan Doel
re (map g xs f = xs (f . g) ; map h (map g xs) = \f -> xs (f . g . h)). -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-19 Thread Dan Doel
A a c -> A a c consA x xs = Roll $ \k -> k x xs -- nilB :: B a c nilB _ _ = nil -- consB :: b -> B a c -> B a c consB y ys x xs = f x y `cons` unroll xs ys snip This traverses each list only once. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Dan Doel
t paper (that's impossible). But parametricity can be used to prove statements _about_ the encodings that imply the induction principle. > On Tue, Sep 18, 2012 at 4:09 PM, Dan Doel wrote: >> >> This paper: >> >> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=1

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Dan Doel
paper above, which I was pointed to recently). -- Dan On Tue, Sep 18, 2012 at 5:41 PM, Ryan Ingram wrote: > Oleg, do you have any references for the extension of lambda-encoding of > data into dependently typed systems? > > In particular, consider Nat: > > nat_elim :: forall P

[Haskell-cafe] Fwd: How Type inference work in presence of Functional Dependencies

2012-09-13 Thread Dan Doel
ith a constraint 'Foo Int a' which it _won't_ use to determine that a ~ Float. This is not inherent to fundeps. One could make a version of fundeps that has the local constraint rules (easily so by translating to the new type families stuff). But, the difference is also the

[Haskell-cafe] ANNOUNCE basic-prelude-0.3

2012-08-23 Thread Dan Burton
us know how it goes! {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} import BasicPrelude -- Dan Burton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] ANNOUNCE: tardis

2012-08-06 Thread Dan Burton
small, it can also serve as a simple demonstration of how to use a cabal flag in conjunction with CPP to selectively include swaths of code (see Control/Monad/Tardis.hs and tardis.cabal). I'm not entirely sold on the naming conventions for the package (including the package name), and am open t

Re: [Haskell-cafe] [Haskell] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-07 Thread Dan Burton
> > >>> I don't know if it is possible to add haddock to functions whose type >>> signatures are generated by template haskell. >>> >> >> Could the documentation be an argument of mkLenses? >> > > Does haddock run on the template-haskell expanded code? TH macros must have type Q [Dec]. Dec has no

[Haskell-cafe] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-06 Thread Dan Burton
e the lens definitions. Type inference should correctly determine the type of the generated lenses, but I have structured the library code so that in the future, type signatures can also be generated. Patches welcome! http://hackage.haskell.org/package/lens-family-th -- Dan B

Re: [Haskell-cafe] [Haskell] ANNOUNCE: set-monad

2012-06-20 Thread Dan Burton
a = 1, b = 1},Foo {a = 2, b = 2},Foo {a = 3, b = 3},Foo {a = 4, b = 4}] The data seems to pop out of nowhere. Even if Ord instances like the one for Foo shouldn't exist, they almost certainly will anyways, because the Haskell type system doesn't prevent them. Users of the library should be

Re: [Haskell-cafe] open source project for student

2012-04-13 Thread Dan Cristian Octavian
t's a reasonable thing to do, I might as well try that. I have already started checking out the larger Haskell projects. On Thu, Apr 12, 2012 at 12:04 PM, Jeremy O'Donoghue < jeremy.odonog...@gmail.com> wrote: > Hi Dan, > > I am the maintainer of wxHaskell, but please don&

[Haskell-cafe] open source project for student

2012-04-11 Thread Dan Cristian Octavian
Hello, I am a second year computer science student who is very interested in working on a haskell open source project. I have no particular focus on a certain type of application. I am open to ideas and to exploring new fields. What kind of project should I look for considering that I am a beginn

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Dan Doel
places for metaprogramming, or perhaps even a type of algorithms that can be distinguished by means other than the functions they compute. But to say that functions are that type is false, and that functions should mean that is, I think, wrong headed. -- Dan __

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread Dan Doel
allowed to throw away the components for such a product, because given a homomorphism f that maps everything to a0, pi_B . maps everything to b0, regardless of what g is. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread Dan Doel
this is that you can easily build up a product that is a bunch of thunks and cause a stack overflow; I _think_ that's more of a concern than doing the same with a function. So in practice it might be harder to do without seq on tuples. -- Dan

Re: [Haskell-cafe] Undocumented cost-centres (.\) using auto-all, and SCC pragma not being honored

2012-02-16 Thread Dan Maftei
On Wed, Feb 15, 2012 at 9:51 PM, Thomas Schilling wrote: > On 15 February 2012 16:17, Dan Maftei wrote: > > > > 1 When profiling my code with -auto-all, my .prof file names some > sub-expressions with a backslash. Cf. below. What are these? > > > >

[Haskell-cafe] Undocumented cost-centres (.\) using auto-all, and SCC pragma not being honored

2012-02-15 Thread Dan Maftei
> > 1 When profiling my code with -auto-all, my .prof file names some sub-expressions with a backslash. Cf. below. What are these? e_step e_step.ewords e_step.\ e_step.\.\ e_step.update_counts e_step.fwords My e_step function binds seven expressions inside a

Re: [Haskell-cafe] Why were unfailable patterns removed and "fail" added to Monad?

2012-01-19 Thread Dan Doel
On Thu, Jan 19, 2012 at 11:11 PM, Dan Doel wrote: > No, this is not correct. Unfailable patterns were specified in Haskell > 1.4 (or, they were called "failure-free" there; they likely existed > earlier, too, but I'll leave the research to people who are > interest

Re: [Haskell-cafe] Why were unfailable patterns removed and "fail" added to Monad?

2012-01-19 Thread Dan Doel
t;failure-free" there; they likely existed earlier, too, but I'll leave the research to people who are interested). They were "new" in the sense that they were introduced only for the purposes of desugaring do/comprehensions, whereas refutable vs. irrefutable patterns need to be

Re: [Haskell-cafe] Not an isomorphism, but what to call it?

2012-01-19 Thread Dan Doel
A is a retract of B. http://nlab.mathforge.org/nlab/show/retract g is the section, f is the rectraction. You seem to have it already. The definition needn't be biased toward one of the functions. On Thu, Jan 19, 2012 at 4:24 PM, Sean Leather wrote: > I have two types A and B, and I want to

Re: [Haskell-cafe] On the purity of Haskell

2012-01-01 Thread Dan Doel
uff that shows up on stdout/stderr typically is something we care about, so it's sensible to include that. If you don't care what happens there, go ahead and use Debug.Trace. It's pure/referentially transparent modulo stuff you don't care about. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-24 Thread Dan Doel
On Sun, Dec 25, 2011 at 12:14 AM, Eugene Kirpichov wrote: > On Sat, Dec 24, 2011 at 10:49 PM, Dan Doel wrote: >> I think it's good to be clear on all these specifics, and people could >> do with a better recognition of the difference between (non-)strict >> and (lazy)ea

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-24 Thread Dan Doel
azy)eager (hint: you can have an eager, non-strict language). But it isn't necessarily a problem that people speak in terms of more than one at once. The different kinds of semantics aren't in conflict with one another. The main problem would be that such casual mixing

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-22 Thread Dan Doel
then you in fact get induction principles based on those models (see for instance, Fibrational Induction Rules for Initial Algebras). You need to prove two or three additional cases, but it works roughly the same as the plain ol' induction you seem to lose for having non-strict evaluation. And th

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Dan Rosén
Thank you very much for your answers. Felipe's suggestion to use waitForProcess after terminateProcess did the trick. No more zombies around :) Best regards, Dan Rosén On Wed, Dec 7, 2011 at 4:39 PM, Donn Cave wrote: > Quoth Felipe Almeida Lessa , > > On Wed, Dec 7, 2011 at 1:

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Dan Doel
x27;d cascade into some thorny issues. Hopefully that covers all the other subsequent stuff folks have been talking about. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Dan Rosén
, but the timeout resolution is in seconds (same with eprover's flag --cpu-limit). Any ideas how I could write my code to get a clean termination of this process? Best, Dan Rosén ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.h

[Haskell-cafe] More liberal than liberal type synonyms

2011-12-06 Thread Dan Doel
o me after a little thought), and thought I'd float the idea out to the GHC developers, in case they're interested in picking it up. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Smarter do notation

2011-09-04 Thread Dan Doel
anyone's looking for motivation, ask yourself if you've ever found let or where useful. And of course, in this case, we can't just beta reduce the desugared expression, because of the types involved. Comprehensions are rather like an expression with a where: [ x*x + y*y + z*z |

[Haskell-cafe] ANNOUNCE: vector-algorithms 0.5.2

2011-08-03 Thread Dan Doel
rrays of variable-length (O(1) lookup) strings. To this end, there is a (strict) ByteString instance for the relevant class, and possibly more such instances to come. Bug reports, patches, requests, etc. can be sent to me at this address. Enjoy, -

Re: [Haskell-cafe] Simple GADTs, type families and type classes combination with type error.

2011-07-22 Thread Dan Doel
way to specify what type certain variables are instantiated to, but it's sort of understandable that there isn't, because it'd be difficult to do in a totally satisfactory way. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Simple GADTs, type families and type classes combination with type error.

2011-07-22 Thread Dan Doel
of types, not a function that computes. So it would be impossible for CPUFunc a = CPUFunc b unless a = b. Also, if you have a class whose only content is an associated type, there's really no need for the class at all. It desugars into: type family CPUFunc a :: *

Re: [Haskell-cafe] Is fusion overrated?

2011-05-18 Thread Dan Doel
ine. You'll see O(1) space usage, but your time usage has a c*k*n term simply from being expressed by a composition pipeline, where c is the cost of the unnecessary boxing. Fusion eliminates this term. -- Dan ___ Haskell-Cafe mailing list Haskel

Re: [Haskell-cafe] Robert Harper on monads and laziness

2011-05-03 Thread Dan Doel
lazy for efficiency, even if you aren't obligated to do it to determine whether your optimizations are semantics-preserving. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-28 Thread Dan Doel
sier with Haskell/GHC. Features like this would be pretty killer to have for Haskell development; then I wouldn't have to prototype in Agda. :) -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Higher-kinded Quantification

2011-04-12 Thread Dan Doel
-> Iterator i o (forall m :: (* -> *). m) a > -> Iterator i o (forall m :: (* -> *). m) a > > Is impredicative polymorphism restricted to the kind *? The problem is that (forall (m :: * -> *). m) is not a valid type, and forall is not a valid way to

Re: [Haskell-cafe] Higher-kinded Quantification

2011-04-12 Thread Dan Doel
ce. However, another option is probably: [i] -> (forall m. Iterator i o m a) -> (forall m. Iterator i o m a) which will still have the 'this is impossible' case. You know that the incoming iterator can't take advantage of what m is, though, so it will be impossible. -- Dan _

Re: [Haskell-cafe] [Agda] Defining subtraction for naturals

2011-03-19 Thread Dan Doel
ation we want. I think this article is relevant: http://existentialtype.wordpress.com/2011/03/15/boolean-blindness/ Inasmuch as we shouldn't be throwing away all propositional information by crushing to a boolean, we also shouldn't be throwing away information that we will

Re: [Haskell-cafe] linear logic

2011-02-22 Thread Dan Doel
sing above, but I don't know the categorical analogues off the top of my head. Searching for 'closed monoidal' or 'symmetric monoidal closed' along with linear logic may be fruitful, though. -- Dan ___ Haskell-Cafe mailing lis

Re: [Haskell-cafe] linear and dependent types

2011-02-19 Thread Dan Doel
ght extensions enabled). ATS would easily be a nicer language in that respect, though. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [Cabal-devel] Cabal && license combinations

2011-02-09 Thread Dan Knapp
one. Indeed, I would argue that this is far more important than any hypothetical per-file licensing. -- Dan Knapp "An infallible method of conciliating a tiger is to allow oneself to be devoured." (Konrad Adenauer) ___ Haskell-Cafe mailing

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Dan Doel
eption: *** Exception: foo Actually compiling seems to remove the difference in 7.0.1, at least, because the output is always: Foo: foo regardless of ($) or not ('fix error' hangs without output as well, which isn't what I thought would happen). Anyhow, that rules out most general-purpose optimizations (including strictness analysis, I thought). - Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] What's the motivation for η rules?

2011-01-03 Thread Dan Doel
sition that those types aren't reducible. For instance, maybe we have: data T (f : Nat -> Nat) : Set where whatever : T f Without eta, the types aren't equal, so this results in a type error. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Proof in Haskell

2010-12-23 Thread Dan Doel
that you can write functions on that Agda type that would have no corresponding implementation in Haskell is kind of irrelevant. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-06 Thread Dan Knapp
is one reason I posted here. Is there some other way I should contact them? I will talk to dcoutts, and see what the current status of the distributed-operation code is and figure out how much time I can devote to helping with that. -- Dan Knapp "An infallible meth

[Haskell-cafe] Offer to mirror Hackage

2010-12-04 Thread Dan Knapp
e happy just knowing I'd given something back to the Haskell community, which has given a lot to me. -- Dan Knapp "An infallible method of conciliating a tiger is to allow oneself to be devoured." (Konrad Adenauer) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Categorical description of systems with dependent types

2010-12-02 Thread Dan Doel
F[x] has an A-indexed family of projections: proj a : (Π x:A. F[x]) -> F[a] The A-indexed sum Σ x:A. F[x] has an A-indexed family of injections: in a : F[a] -> (Σ x:A. F[x]) Which are visibly generalizations of the definitions of (co)products you'd encounter modelling non-dependently t

Re: [Haskell-cafe] Categorical description of systems with dependent types

2010-12-02 Thread Dan Doel
n Closed Categories Locally Cartesian Closed Categories and Type Theory but I can't say that any one paper made everything snap into place. More that reading quite a few gradually soaked in. And I still feel rather hazy on the subject. Hope that helps some. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-12 Thread Dan Doel
t the Church-Turing axiom. I have no problem with serialize :: (Nat -> Nat) -> IO Nat. The problem is with (Nat -> Nat) -> Nat. The former can respect the quotient in question via IO hand waving. Perhaps this distinction is frivolous, but it seems wrong to make the language in general a

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-12 Thread Dan Doel
> oh yeah. > > serialize :: (a -> b) -> IO String > > I still don't really get what we're arguing about. I don't know. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

  1   2   3   4   5   6   7   8   9   10   >