Re: Enabling TypeHoles by default

2014-01-13 Thread Edward Kmett
I have to admit, I rather like this suggestion. -Edward On Mon, Jan 13, 2014 at 1:42 PM, Krzysztof Gogolewski krz.gogolew...@gmail.com wrote: Hello, As discussed on ghc-devs, I propose to enable -XTypeHoles in GHC by default. Rationale: (1) This way holes are far easier to use; just

Re: Enabling TypeHoles by default

2014-01-13 Thread Edward Kmett
Heck if we wanted to bikeshed the name, even 'Holes' would do. ;) On Mon, Jan 13, 2014 at 4:30 PM, Daniil Frumin difru...@gmail.com wrote: On ghc-dev Dominique Devriese has actually proposed changing TypeHoles to TypedHoles or to something similar, because TypeHoles sounds like you can have

Re: Enabling TypeHoles by default

2014-01-14 Thread Edward Kmett
It actually can affect what code compiles with -fdefer-type-errors, but I don't feel terribly strongly about that. -Edward On Tue, Jan 14, 2014 at 12:23 PM, Joachim Breitner m...@joachim-breitner.de wrote: Hi, heh, I wanted to throw in the same argument: If its just more elaborate error

Re: PROPOSAL: Literate haskell and module file names

2014-03-16 Thread Edward Kmett
One problem with Foo.*.hs or even Foo.md.hs mapping to the module name Foois that as I recall JHC will look for Data.Vector in Data.Vector.hs as well as Data/Vector.hs This means that on a case insensitive file system Foo.MD.hs matches both conventions. Do I want to block an change to GHC

Re: Safe Haskell trust

2014-03-16 Thread Edward Kmett
Not directly. You can, however, make a Trustworthy module that re-exports the (parts of) the Unsafe ones you want to allow yourself to use. -Edward On Sun, Mar 16, 2014 at 12:57 PM, Fabian Bergmark fabian.bergm...@gmail.com wrote: Im using the Hint library in a project where users are able

Re: PROPOSAL: Literate haskell and module file names

2014-03-17 Thread Edward Kmett
. Patching tools to support whatever solution we pick should be trivial. Cheers, Merijn On Mar 16, 2014, at 16:41 , Edward Kmett wrote: One problem with Foo.*.hs or even Foo.md.hs mapping to the module name Foois that as I recall JHC will look for Data.Vector in Data.Vector.hs as well as Data

Re: [Haskell-cafe] Eta Reduction

2014-04-01 Thread Edward Kmett
John, Check the date and consider the process necessary to enumerate all Haskell programs and check their types. -Edward On Tue, Apr 1, 2014 at 9:17 AM, John Lato jwl...@gmail.com wrote: I think this is a great idea and should become a top priority. I would probably start by switching to a

Re: [Haskell-cafe] Eta Reduction

2014-04-01 Thread Edward Kmett
that on a different day, +1 from me. John On Apr 1, 2014 10:32 AM, Edward Kmett ekm...@gmail.com wrote: John, Check the date and consider the process necessary to enumerate all Haskell programs and check their types. -Edward On Tue, Apr 1, 2014 at 9:17 AM, John Lato jwl...@gmail.com wrote: I

Re: [core libraries] Tightening up on inferred type signatures

2014-04-21 Thread Edward Kmett
No objections here. The types involved really *do* have FlexibleContexts in them, so it makes sense to require the extension. The upgrade path for library authors is also clear. It'll complain to add the extension, and they'll fix it by adding the line of code suggested and perhaps realize

Re: [core libraries] Re: Tightening up on inferred type signatures

2014-04-23 Thread Edward Kmett
You can wind up in perfectly legitimate situations where the name for the type you are working with isn't in scope, but where you can write a combinator that would infer to have that type. I'd hate to lose that. It is admittedly of marginal utility at first glance, but there are some tricks that

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Edward Kmett
+1 from me. I have a lot of projects that suffer with 4 levels of vacuous subdirectories just for this. In theory cabal could support this on older GHC versions by copying all of the files to a working dir in dist with the expected layout on older GHCs. That would enable this to get much

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Edward Kmett
25, 2014, at 12:01 PM, Felipe Lessa felipe.le...@gmail.com wrote: Em 25-04-2014 12:22, Edward Kmett escreveu: +1 from me. I have a lot of projects that suffer with 4 levels of vacuous subdirectories just for this. In theory cabal could support this on older GHC versions by copying all

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Edward Kmett
You can actually make symbolic links (as well as hard links and directory junctions) on windows. -Edward On Apr 25, 2014, at 12:51 PM, Roman Cheplyaka r...@ro-che.info wrote: * Felipe Lessa felipe.le...@gmail.com [2014-04-25 13:01:43-0300] Em 25-04-2014 12:22, Edward Kmett escreveu: +1

Re: [core libraries] Re: Tightening up on inferred type signatures

2014-04-30 Thread Edward Kmett
without extra imports, just to avoid cluttering the namespace. -Edward On Wed, Apr 30, 2014 at 2:10 AM, Ganesh Sittampalam gan...@earth.li wrote: On 23/04/2014 20:04, dm-list-haskell-librar...@scs.stanford.edu wrote: Edward Kmett ekm...@gmail.com writes: You can wind up in perfectly

Re: [core libraries] Re: Tightening up on inferred type signatures

2014-04-30 Thread Edward Kmett
Er.. my mistake. Control.Applicative. That is what it is we don't re-export that is used in Traversal. =) On Wed, Apr 30, 2014 at 2:47 AM, Edward Kmett ekm...@gmail.com wrote: Not sure. An even simpler case is something like exporting a Traversal but not exporting Data.Traversable, which

Re: Monomorphizing GHC Core?

2014-06-19 Thread Edward Kmett
Might you have more success with a Reynolds style defunctionalization pass for the polymorphic recursion you can't eliminate? Then you wouldn't have to rule out things like data Complete a = S (Complete (a,a)) | Z a which don't pass that test. -Edward On Thu, Jun 19, 2014 at 3:28 PM, Conal

Re: Monomorphizing GHC Core?

2014-06-19 Thread Edward Kmett
On Thu, Jun 19, 2014 at 1:22 PM, Edward Kmett ekm...@gmail.com wrote: Might you have more success with a Reynolds style defunctionalization pass for the polymorphic recursion you can't eliminate? Then you wouldn't have to rule out things like data Complete a = S (Complete (a,a)) | Z a which

Re: Overlapping and incoherent instances

2014-07-31 Thread Edward Kmett
Now if only we could somehow find a way to do the same thing for AllowAmbiguousTypes. :) I have a 2500 line file that I'm forced to turn on AllowAmbiguousTypes in for 3 definitions, and checking that I didn't accidentally make something else ambiguous to GHC's eyes is a rather brutal affair. (I

Re: Old code broken by new Typeable class

2014-08-05 Thread Edward Kmett
If you can't change the definition you can use the syntax Björn Bringert added back in 2006 or so for StandaloneDeriving. Just turn on {-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-} and then you can use deriving instance Typeable Foo -Edward On Tue, Aug 5, 2014 at 1:47 PM, Volker

Re: Permitting trailing commas for record syntax ADT declarations

2014-09-29 Thread Edward Kmett
Not a concrete suggestion, but just a related data point / nod to the sanity of the suggestion: I'm not sure I'd remove them entirely either, but FWIW, we don't require commas in fixity declarations in Ermine and it works well. On the other hand, our import lists are rather more complicated than

Re: String != [Char]

2012-03-23 Thread Edward Kmett
Allbery allber...@gmail.com wrote: On Fri, Mar 23, 2012 at 13:05, Edward Kmett ekm...@gmail.com wrote: Isn't it enough that it is part of the platform? As long as the entire Prelude and large chunks of the bootlibs are based around String, String will be preferred. String as a boxed singly

Re: String != [Char]

2012-03-23 Thread Edward Kmett
On Fri, Mar 23, 2012 at 4:21 PM, Nate Soares n...@so8r.es wrote: Note that this might be a good time to consider re-factoring the list operations, for example, making ++ operate on monoids instead of just lists. Note: we have () for Monoid, which was deliberately chosen rather than

Re: String != [Char]

2012-03-25 Thread Edward Kmett
On Sun, Mar 25, 2012 at 11:42 AM, Gabriel Dos Reis g...@integrable-solutions.net wrote: Perhaps we are underestimating their competences and are complicating their lives unnecessarily... Have you ever actually taught an introductory languages course? If anything we delude ourselves by

Re: Proposal: Scoping rule change

2012-07-24 Thread Edward Kmett
+1 from me I can't count the number of times I've had this bite me when writing ByteString-like APIs that pun names from the Prelude. On Jul 23, 2012, at 8:28 PM, Lennart Augustsson lenn...@augustsson.net wrote: It's not often that one gets the chance to change something as fundamental as

Re: In opposition of Functor as super-class of Monad

2012-10-25 Thread Edward Kmett
Tony, I think you misparsed the proposal. The ...'s were for specific monads indicating the additional work required for each Monad. I think the only real proposal on the table is the obvious one of adding Applicative as a superclass of monad. From there there are a couple of incremental

Re: Status of Haskell'?

2012-11-27 Thread Edward Kmett
I think it has proven out pretty well in practice that probably want both in the surface language. I know minimalists on the TF side of the debate have tried to make the case that you don't even need FDs in the surface syntax, but there are lots of places where it having a class with multiple

Re: Bang patterns

2013-02-04 Thread Edward Kmett
If space sensitivity or () disambiguation is being used on !, could one of these also be permitted on ~ to permit it as a valid infix term-level operator? That would be an amazingly valuable symbol to be able to reclaim for the term level for equivalences, and for folks who come from other

Re: Bang patterns

2013-02-05 Thread Edward Kmett
5, 2013 at 8:42 AM, Ian Lynagh i...@well-typed.com wrote: On Mon, Feb 04, 2013 at 07:26:16PM -0500, Edward Kmett wrote: If space sensitivity or () disambiguation is being used on !, could one of these also be permitted on ~ to permit it as a valid infix term-level operator? I don't think

Re: relaxing instance declarations

2013-04-28 Thread Edward Kmett
You can always put those helper functions in the class and then just not export them from the module. On Sun, Apr 28, 2013 at 10:49 AM, Doug McIlroy d...@cs.dartmouth.eduwrote: Is there any strong reason why the where clause in an instance declaration cannot declare anything other than class

Re: relaxing instance declarations

2013-04-28 Thread Edward Kmett
, Doug McIlroy d...@cs.dartmouth.edu wrote: Not always. For example, you can't mess with the declaration of a standard class, such as Num. On Sun, Apr 28, 2013 at 12:06 PM, Edward Kmett ekm...@gmail.com wrote: You can always put those helper functions in the class and then just not export them

Re: relaxing instance declarations

2013-04-30 Thread Edward Kmett
On Mon, Apr 29, 2013 at 2:41 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: You could probably get away with just using two where clauses: instance Foo a where bar = ... where auxilliary = ... On 28 April 2013 18:42, Edward Kmett ekm...@gmail.com wrote

Re: Is it time to start deprecating FunDeps?

2013-04-30 Thread Edward Kmett
It seems to be my day to be the villain crying out against everything someone proposes. ;) I for one would be strongly against a proposal that started actively deprecating the use of functional dependencies in user code. There are a number of situations where the sheer amount of code you're

Re: proposal for trailing comma and semicolon

2013-05-17 Thread Edward Kmett
My main concern is its a really weird corner case for the grammar to remember for tuple sections and it does have very weird grammar specification issues. I really have no objection to it for the other cases. It'd make export lists cleaner, maybe a few other cases, but how often can you really

Re: Proposal: NoImplicitPreludeImport

2013-05-28 Thread Edward Kmett
I'm definitely in favor of having the *option* to shut off the import of the Prelude without entangling the notion of overriding all of the desugarings. I do, however, feel that removing the Prelude from base is a rather strong step, which hasn't seen much support. On Tue, May 28, 2013 at 11:23

Re: Proposal: NoImplicitPreludeImport

2013-05-28 Thread Edward Kmett
totally for it! As a source of *mandatory* boilerplate at the head of each module? It doesn't strike me as a good trade-off. On Tue, May 28, 2013 at 11:52 AM, Ian Lynagh i...@well-typed.com wrote: On Tue, May 28, 2013 at 11:41:44AM -0400, Edward Kmett wrote: I'm definitely in favor of having

Re: PROPOSAL: Literate haskell and module file names

2014-03-16 Thread Edward Kmett
One problem with Foo.*.hs or even Foo.md.hs mapping to the module name Foois that as I recall JHC will look for Data.Vector in Data.Vector.hs as well as Data/Vector.hs This means that on a case insensitive file system Foo.MD.hs matches both conventions. Do I want to block an change to GHC

Re: PROPOSAL: Literate haskell and module file names

2014-03-17 Thread Edward Kmett
. Patching tools to support whatever solution we pick should be trivial. Cheers, Merijn On Mar 16, 2014, at 16:41 , Edward Kmett wrote: One problem with Foo.*.hs or even Foo.md.hs mapping to the module name Foois that as I recall JHC will look for Data.Vector in Data.Vector.hs as well as Data

Re: Proposal - Foreign enum support

2014-04-19 Thread Edward Kmett
-1 from me. Your first example even provides a counter-example. typedef enum { IMG_INIT_JPG = 0x0001, IMG_INIT_PNG = 0x0002, IMG_INIT_TIF = 0x0004, IMG_INIT_WEBP = 0x0008 } IMG_InitFlags; Those are defined as powers of two because

Proposal: Treat OtherLetter as lower case in the grammar

2014-08-12 Thread Edward Kmett
bringing it up to Haskell' but here we are 6 years later. -Edward Kmett ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime

[Haskell-cafe] Google Summer of Code 2010.

2010-03-12 Thread Edward Kmett
! -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [Haskell.org Google Summer of Code] trac signup issues

2010-03-12 Thread Edward Kmett
, please email me with your name and desired contact email address, and I'll make sure your name winds up on the list. I apologize for the inconvenience. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] ANN: data-category, restricted categories

2010-03-26 Thread Edward Kmett
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 either another bottom or undefined, so there remains one canonical morphism

Re: [Haskell-cafe] my gsoc project topic

2010-03-29 Thread Edward Kmett
this kind of project could look really good, the community could not benefit from it. [..] While I personally enjoy working on 3d graphics in general, it is hard to sell the community benefit. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Re: Garbage collecting pointers

2010-03-29 Thread Edward Kmett
for Java, and bringing your own linker into the mix is a decidedly unpleasant option. I'm continuing to play with them in a JIT-only environment but they don't play nice with compilation. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Programming with categories

2010-03-29 Thread Edward Kmett
://hackage.haskell.org/package/data-category Beyond that feel free to ask questions. -Edward Kmett On Mon, Mar 29, 2010 at 6:09 AM, Francisco Vieira de Souza vieira.u...@gmail.com wrote: Hi Haskell-cafe. I'm trying to use Haskell to program with Categories, but I didn't have seeing some works in this area nor

Re: [Haskell-cafe] Haskell.org re-design

2010-03-29 Thread Edward Kmett
The main issue I would have with the site design proposed here is that the Download Haskell link that is currently fairly prominent on the page gets shuffled off into oblivion in the footer. However, overall, I think it serves as a good starting point for discussion. -Edward Kmett On Sun, Mar 28

Re: [Haskell-cafe] Re: ANN: data-category, restricted categories

2010-03-30 Thread Edward Kmett
put on his fuzzy goggles and just say that they are all the same up to isomorphism. =) -Edward Kmett On Tue, Mar 30, 2010 at 3:45 PM, wagne...@seas.upenn.edu wrote: Quoting Ashley Yakeley ash...@semantic.org: data Nothing I avoid explicit undefined in my programs, and also hopefully non

Re: [Haskell-cafe] ANN: data-category, restricted categories

2010-03-30 Thread Edward Kmett
to me. 2010/3/26 David Menendez d...@zednenem.com 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

Re: [Haskell-cafe] Data.Graph?

2010-03-31 Thread Edward Kmett
There are a number of us over on #hnn on freenode hacking away on the beginnings of a shiny new graph library based on some new tricks for annotated structures. Feel free to swing by the channel. -Edward Kmett On Tue, Mar 30, 2010 at 10:23 PM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote

[Haskell-cafe] [haskell.org Google Summer of Code] Student Applications Due Friday!

2010-04-06 Thread Edward Kmett
-projects/ I'd also recommend taking a look through the trac at http://hackage.haskell.org/trac/summer-of-code/report/1 to gauge interest. Please email me if you have any questions or concerns. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Suitable structure to represents lots of similar lists

2010-04-07 Thread Edward Kmett
I've been meaning to generalize Data.Rope in my rope library to use Vector rather than ByteString. Ultimately it looks like a FingerTree of Vector's using length as the monoid. The vectors can be sliced cheaply and the fingertree as a whole supports cheap splicing. -Edward Kmett On Wed, Apr 7

Re: [Haskell-cafe] haskell gsoc proposal for richer numerical type classes and supporting algorithms

2010-04-08 Thread Edward Kmett
with the Prelude is a major concern. Ultimately your code has to talk to other people's code, and the impedence mismatch can be high. -Edward Kmett On Thu, Apr 8, 2010 at 1:23 AM, Carter Schonwald carter.schonw...@gmail.com wrote: Hello All, I would like to know if there is enough community interest

Re: [Haskell-cafe] haskell gsoc proposal for richer numerical type classes and supporting algorithms

2010-04-08 Thread Edward Kmett
On Thu, Apr 8, 2010 at 3:25 PM, Casey McCann syntaxgli...@gmail.com wrote: On Thu, Apr 8, 2010 at 2:09 PM, Edward Kmett ekm...@gmail.com wrote: Template Haskell can help dull the pain, but the result seems hardly idiomatic. Well, since this is dealing with types and type classes, much

Re: [Haskell-cafe] Re: GSoC: Hackage 2.0

2010-04-09 Thread Edward Kmett
to the documentation of other peoples packages :) You mean turn every hackage project page into a mini wiki? Yep. How would such annotations/snippets/changes react to the next release of the package? Would they be per-package? per version? -Edward Kmett

Re: [Haskell-cafe] Re: instance Eq (a - b)

2010-04-19 Thread Edward Kmett
Because it is the most utilitarian way to get a bunch of strict ByteStrings out of a lazy one. Yes it exposes an implementation detail, but the alternatives involve an unnatural amount of copying. -Edward Kmett On Sat, Apr 17, 2010 at 6:37 PM, Ashley Yakeley ash...@semantic.org wrote: Ketil

[Haskell-cafe] Re: Re: instance Eq (a - b)

2010-04-20 Thread Edward Kmett
, and toChunks can only 'safely' be used in a manner that is oblivious to the structural partitioning of the lazy bytestring. -Edward Kmett On Mon, Apr 19, 2010 at 6:02 PM, Ashley Yakeley ash...@semantic.org wrote: Why is a function that gets a bunch of strict ByteStrings out of a lazy one exposed

Re: [Haskell-cafe] Re: Re: instance Eq (a - b)

2010-04-21 Thread Edward Kmett
On Wed, Apr 21, 2010 at 5:25 AM, Max Rabkin max.rab...@gmail.com wrote: On Wed, Apr 21, 2010 at 1:44 AM, Edward Kmett ekm...@gmail.com wrote: Eq doesn't state anywhere that the instances should be structural, though in general where possible it is a good idea, since you don't have to worry

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Edward Kmett
Data.Text.Lazy.Internal.Text = Data.Text.Lazy.Text Data.Text.Internal.Text = Data.Text.Text You can use fromChunks/toChunks from Data.Text.Lazy to break it up into strict Text fragments. The lazy version returns a Lazy Text value, which is isomorphic to [Data.Text.Text]. The strict version just

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Edward Kmett
On Fri, Apr 30, 2010 at 5:09 PM, Daniel Fischer daniel.is.fisc...@web.dewrote: and how can I get from internal type to regular type when using Data.Text? Use id :: a - a ;) Not quite, there is still a distinction between Data.Text(.Internal).Text and Data.Text.Lazy(.Internal).Text. but

Re: [Haskell-cafe] MonadPlus or Alternative or ...?

2010-05-03 Thread Edward Kmett
exactly the subset of functionality that you want. Whether or not category-extras can be considered a light weight dependency on the other hand is another thing entirely. ;) -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] MonadPlus or Alternative or ...?

2010-05-03 Thread Edward Kmett
that makes the Alternative and Monoid instances agree on all Applicatives. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-05-03 Thread Edward Kmett
is the signature there? applyLN :: Int - StreamStateT arr a b - [m a] . ?? It shouldn't be appreciably different, perhaps just: applyLN :: Arrow arr = Int - StreamStateT arr a b - [m a] - m ([b], StreamStateT arr a b, [m a]) -Edward Kmett ___ Haskell-Cafe

Re: [Haskell-cafe] Strict type system allows for a maximum number of programming errors to be caught at compile time.

2010-05-03 Thread Edward Kmett
, but the types help inform you as to what the shape of a correct implementation should be. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell and the Software design process

2010-05-04 Thread Edward Kmett
, so you can mix and match this style with traditional code. The fact that you get compile time stack traces is what made me fall in love with the approach. Dana used to have (most of) a port of ghc to support SCC on darcs.haskell.org, but I don't know what happened to it. -Edward Kmett On Tue

Re: [Haskell-cafe] Functions of type foo :: f a - g a

2010-05-11 Thread Edward Kmett
. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: [Haskell] ANN: Monad.Reader Issue 16

2010-05-12 Thread Edward Kmett
, and the fast construction of minimum spanning trees. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Functions of type foo :: f a - g a

2010-05-13 Thread Edward Kmett
, I'd need to know more about the problem domain. -Edward Kmett On Thu, May 13, 2010 at 3:32 PM, Stephen Tetley stephen.tet...@gmail.comwrote: On 13 May 2010 20:25, Gordon J. Uszkay uszka...@mcmaster.ca wrote: [SNIP] The f container is a potentially infinite stream of data obtained from

Re: [Haskell] Re: [Haskell-cafe] Work on Video Games in Haskell

2010-05-26 Thread Edward Kmett
. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell] Re: [Haskell-cafe] Work on Video Games in Haskell

2010-05-26 Thread Edward Kmett
environment emerging, because no sound business plan can be built on I hope my major and only possible distributor doesn't figure out what I'm doing! -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Efficient string construction

2010-06-03 Thread Edward Kmett
if the current API falls short of your needs. -Edward Kmett On Thu, Jun 3, 2010 at 10:03 AM, Kevin Jardine kevinjard...@yahoo.comwrote: (I've done a basic Google search on this with no results. Apologies if this has been asked before.) I am coding a web application in which the content is a Unicode

[Haskell-cafe] A Finally Tagless Pi Calculus

2010-06-09 Thread Edward Kmett
/tagless/jfp.pdf Of course, Keegan went farther and defined an encoding of the lambda calculus into the pi calculus, but I leave that as an exercise for the reader. ;) -Edward Kmett {-# LANGUAGE Rank2Types, TypeFamilies, FlexibleInstances #-} module Pi where import Control.Applicative import

Re: [Haskell-cafe] A Finally Tagless Pi Calculus

2010-06-10 Thread Edward Kmett
it would be untype because of the occurs check. If you look in category-extras under Control.Morphism.* you'll find a lot of other uses of the types Mu/Nu though there the type is called FixF. -Edward Kmett On Wed, Jun 9, 2010 at 6:20 PM, Edward Kmett ekm...@gmail.com wrote: Keegan McAllister

Re: [Haskell-cafe] The Arrow class (was: Vague: Assembly line process)

2010-06-16 Thread Edward Kmett
families at the time, and intend to swap back at some point in the future. Unfortunately, I don't see how to define fst and snd for the Iso example, so I wonder whether Iso has products? It does not. =) -Edward Kmett ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-16 Thread Edward Kmett
I have an article describing catamorphisms in some detail that is available online at http://knol.google.com/k/catamorphisms I hereby give whatever rights I need to give to whomever I need to give them to so that it might be used as a basis for a HaskellWiki entry. I realize that this

Re: [Haskell-cafe] Re: Different choice operations in a continuation monad

2010-06-16 Thread Edward Kmett
to the original Maybe type, with its same limitations. A definition that is equivalent to this is in my monad-ran package, along with definitions CPS/right-kan-extension-based definitions for other common monads, including the MTL, IO, ST s, and STM. -Edward Kmett

Re: [Haskell-cafe] The Arrow class (was: Vague: Assembly line process)

2010-06-18 Thread Edward Kmett
, let bindings tend to be a lot lighter than the accompanying arrow sugar. You might find Andy Gill's write-up on type safe observable sharing in kansas lava to be useful. http://www.ittc.ku.edu/~andygill/papers/reifyGraph.pdf -Edward Kmett ___ Haskell

Re: [Haskell-cafe] TH instance code.

2010-06-22 Thread Edward Kmett
What you're looking for is something like: deriveVariable _t = [d| instance Variable $t where toVariant = toVariant . show fromVariant x = fmap (\v - read v :: $t) $ fromVariant x|] deriveVariable (conT ''PageType) deriveVariable (conT ''Int) deriveVariable (conT ''Maybe

Re: [Haskell-cafe] TH instance code.

2010-06-22 Thread Edward Kmett
v-- I had accidentally elided the _'s before the t's in the quasiquotation before. What you're looking for is something like: deriveVariable _t = [d| instance Variable $_t where toVariant = toVariant . show fromVariant x = fmap (\v - read v :: $_t) $ fromVariant x|]

Re: [Haskell-cafe] Rewriting a famous library and using the same name: pros and cons

2010-06-22 Thread Edward Kmett
are not the answer. -Edward Kmett On Tue, Jun 8, 2010 at 2:21 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: Or you just put an upper bound on the versions of the fgl library that your program will build against, as you should be doing anyway, and then nothing breaks. Cheers, Greg On Jun 8

Re: [Haskell-cafe] Huffman Codes in Haskell

2010-06-22 Thread Edward Kmett
://hackage.haskell.org/packages/archive/monoids/0.1.36/doc/html/src/Data-Generator-Compressive-LZ78.html -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Rewriting a famous library and using the same name: pros and cons

2010-06-23 Thread Edward Kmett
the other way. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Rewriting a famous library and using the same name: pros and cons

2010-06-23 Thread Edward Kmett
On Wed, Jun 23, 2010 at 2:57 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: On 6/23/10 2:13 PM, Edward Kmett wrote: On Tue, Jun 22, 2010 at 4:54 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: There is no reason that your program couldn't link to multiple versions

Re: [Haskell-cafe] Read instance for GATD

2010-06-25 Thread Edward Kmett
this time around. I will check with him to see if I can get permission to host them somewhere and post a link to them here. -Edward Kmett On Fri, Jun 25, 2010 at 5:04 AM, corentin.dup...@ext.mpsa.com wrote: Hello Haskellers, I'm having trouble writing a Read Instance for my GATD. Arg this GATD

Re: [Haskell-cafe] Manual Type-Checking to provide Read instances for GADTs. (was Re: [Haskell-cafe] Read instance for GATD)

2010-06-25 Thread Edward Kmett
I've obtained permission to repost Gershom's slides on how to deserialize GADTs by typechecking them yourself, which are actually a literate haskell source file, that he was rendering to slides. Consequently, I've just pasted the content below as a literate email. -Edward Kmett - Deserializing

Re: [Haskell-cafe] Re: The mother of all functors/monads/categories

2010-06-27 Thread Edward Kmett
that Codensity Reader ~ State. Take a look at the code in monad-ran on hackage for how Ran (StateT s m) is implemented for an example. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] The mother of all functors/monads/categories

2010-06-27 Thread Edward Kmett
to have the constraint Y d. The above code then stays the same, only with Yoneda removed and constraints added. This is an encoding of the fact that all Functors in Haskell are strong, and that Yoneda i is a Functor for any i :: * - *. -Edward Kmett

Re: [Haskell-cafe] Re: The mother of all functors/monads/categories

2010-06-27 Thread Edward Kmett
On Sun, Jun 27, 2010 at 6:45 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: On 27 June 2010 22:20, Edward Kmett ekm...@gmail.com wrote: I've pointed out the Codensity Set monad on the Haskell channel. I spend no time on #haskell but clearly I should :) It is an interesting

Re: [Haskell-cafe] Physical equality

2010-06-28 Thread Edward Kmett
with. Typically you can construct something purely and inspect the result using IO all in one go, so the unsafePerformIO machinery isn't required. -Edward Kmett 2010/6/28 José Romildo Malaquias j.romi...@gmail.com Is there in Haskell a non monadic function of type a - a - Bool which test

Re: [Haskell-cafe] Associated types

2010-07-01 Thread Edward Kmett
. This much works. However equality constraints in the body still blow up at last check. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How easy is it to hire Haskell programmers

2010-07-02 Thread Edward Kmett
or ways to implement memoization in a purely functional setting, or how to abuse side effects to do so in a less pure way. Those are the kinds of things you get exposed to through actually using Haskell, rather than through reading a monad tutorial. -Edward Kmett

Re: [Haskell-cafe] Re: Transformers versus monadLib versus...

2010-07-06 Thread Edward Kmett
flipping its lid. Of course, adding support for monadLib, which doesn't conflict with any of this is a completely concern. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-07-06 Thread Edward Kmett
we're on the topic, does anyone else get funny looks when they say monads? Sadly, yes. ;) -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Transformers versus monadLib versus...

2010-07-06 Thread Edward Kmett
On Tue, Jul 6, 2010 at 10:01 PM, Ertugrul Soeylemez e...@ertes.de wrote: Edward Kmett ekm...@gmail.com wrote: You may want to review the thread here: http://www.haskell.org/pipermail/libraries/2009-November/012833.html The gist of it is, I would recommend sticking with MTL for right

Re: [Haskell-cafe] Memoization in Haskell?

2010-07-09 Thread Edward Kmett
' 1230891823091823018203123 93721573993600178112200489 *Main fastest_f' 12308918230918230182031231231293810923 11097012733777002208302545289166620866358 -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Memoization in Haskell?

2010-07-09 Thread Edward Kmett
a good idea to either filter the negative case like you do here, or, since it is well defined, extend the scope of the memo table to the full Int range by explicitly memoizing negative vales as well. -Edward Kmett On Fri, Jul 9, 2010 at 11:51 AM, Mike Dillon m...@embody.org wrote: begin Edward

Re: [Haskell-cafe] Re: Transformers versus monadLib versus...

2010-07-09 Thread Edward Kmett
On Thu, Jul 8, 2010 at 12:37 PM, Yitzchak Gale g...@sefer.org wrote: Hi Edward, Edward Kmett wrote: It looks like there is a fairly strong effort to fix most of the most egregious warts in the mtl. btw, does this overhaul include adding Applicative instances, perchance

Re: [Haskell-cafe] bug in ghci ?

2010-07-09 Thread Edward Kmett
could prove or disprove. ;-) I hope the above demonstrate that there are at least some fairly reasonable (and, given your request, appropriately category theoretic!) examples where one would want the ability to specify that there is more than one member of a minimal mutual definition. =) -Edward

Re: new haskell project (Was Re: [Haskell-cafe] Subtype polymorphism in Haskell)

2010-07-10 Thread Edward Kmett
of overloading and polymorphic instantiation in Haskell, e.g. dealing with portfolios that span multiple currencies, so take care with shackling yourself to the current design. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Edward Kmett
mechanism. That way hot-swapping the current process would leave your GUI (and the pipe/IPC mechanism) intact. You may then need to pass along whatever changes affect the gui over the pipe in a fairly manual fashion. -Edward Kmett On Thu, Jul 15, 2010 at 11:05 PM, Andy Stewart lazycat.mana

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Edward Kmett
runhaskell Setup.hs foo instead of cabal foo. You just need to tell cabal if you want to delegate to Setup.hs, by using something other than Simple as a build-type. The vast majority of the users of cabal never bother changing the behavior of Setup.hs. -Edward Kmett On Thu, Jul 22, 2010 at 11:58 PM

<    1   2   3   4   5   >