Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread David Menendez
AppError String test = appFunc -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

RE: [Haskell] Annoying naming clashes

2004-06-17 Thread David Menendez
implementing it? Did some technical obsticle arise, or have people simply been busy elsewhere? [2] Warren Burton, Erik Meijer, Patrick Sansom, Simon Thompson, and Philip Wadler. Views: An extension to Haskell pattern matching, 1996. http://www.haskell.org/development/views.html -- David Menendez

Re: [Haskell] Do the libraries define S' ?

2004-07-08 Thread David Menendez
/pubs/composing.html -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

[Haskell] BBEdit syntax highlighting for Haskell

2004-08-30 Thread David Menendez
. -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics! ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Help on Arrows

2005-01-15 Thread David Menendez
runKleisli myAdd1A :: (Monad m, Num b) = b - m b More interesting arrows, like the signal processors in Yampa [4], may not have a meaningful concept of application. [4] http://www.haskell.org/yampa/ -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem

Re: [Haskell] Type of y f = f . f

2005-02-28 Thread David Menendez
] would give us: y :: (a - b b - c) - a - c where a b is the intersection of types a and b. The advantage of System E over, say, System F, is that type inferencing is decidable. The downside is that the inferred types can be pretty long. [1] http://www.macs.hw.ac.uk/~sebc/ -- David

Re: [Haskell] Arrows GUI Library Based on GTK+

2005-03-19 Thread David Menendez
on wxHaskell. [1] http://zoo.cs.yale.edu/classes/cs490/03-04b/bartholomew.robinson/ -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem/ ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Control.Monad.Writer as Python generator

2005-04-13 Thread David Menendez
Control.Monad.Cont yield :: a - Cont [a] () yield x = Cont (\c - x : c ()) asGenerator :: Cont [a] v - [a] asGenerator (Cont f) = f (const []) -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics

Re: [Haskell] Y in haskell?

2005-04-17 Thread David Menendez
Trevion writes: On 4/18/05, Lloyd Allison [EMAIL PROTECTED] wrote: Is it possible to define Y in Haskell (pref' H98) -- and get it to pass type checking? I believe that y f = f (y f) is the normal way to do it. I've also seen this: y f = g where g = f g -- David

[Haskell] Fixed-length vectors in Haskell, Part 1: Using GADTs

2005-05-07 Thread David Menendez
In the definition of `it': it = idMat :: Matrix Two Three Int -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem/ ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Fixed-length vectors in Haskell, Part 2: Using no extensions

2005-05-07 Thread David Menendez
y' = transpose y -- newtype IdMat a v = IdMat { runIdMat :: v (v a) } idMat :: (Vec v, Num a) = v (v a) idMat = runIdMat vecCase instance Num a = VecCase (IdMat a) where caseNil = IdMat Nil caseCons = IdMat (Cons (Cons 1 (vec 0)) (fmap (Cons 0) idMat)) -- -- David Menendez

Re: [Haskell] Paper: The essence of dataflow programming

2005-09-25 Thread David Menendez
/kieburtz99codata.html [2] http://haskell.org/yampa/ [3] http://haskell.org/arrows/arrows/Control.Arrow.Transformer. Automaton.html [4] http://haskell.org/hawiki/TheZipper -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem/ ___ Haskell mailing

Re: [Haskell] getArgs, maxBound, float division: pure functions?

2005-10-11 Thread David Menendez
be difficult or annoying to implement. -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem/ ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] PROPOSAL: class aliases

2005-10-13 Thread David Menendez
. For example, class Monoid m where { ... } class CommutativeMonoid m where {} The idea being that instances of CommutativeMonoid satisfy additional laws. -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics

Re: [Haskell] really undecidable instances?

2005-10-30 Thread David Menendez
(Pretty a, Pretty'1 tree) = Pretty (Node23 tree a) where ... Your typical Pretty'1 instance will look like this: instance Pretty'1 T where pretty'1 = pretty prettyList'1 = prettyList -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http

Re: [Haskell] GADT type inference problem

2005-11-30 Thread David Menendez
are involved. It should work if shw has an explicit type signature, e.g. shw :: Term a - ShowS What's strange is that GHC accepted the code at all. There would probably be less confusion if GADT arguments always required a signature, like arguments involving higher-rank polymorphism. -- David

Re: [Haskell] A collection of related proposals regarding monads

2006-01-04 Thread David Menendez
without that, it's probably excessive. -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics! ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell] Re: haskell.org Public Domain

2006-01-10 Thread David Menendez
monad. If I use that in a project, do I need to credit Ralf? The person who typed it into the wiki? Anyone who modified it? The wiki itself? How much code do you need to borrow from the wiki before you need to provide an acknowledgement? -- David Menendez [EMAIL PROTECTED] | In this house, we obey

Re: [Haskell] generic catch in a MonadIO

2006-02-07 Thread David Menendez
) (unIO' . h) -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics! ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Long live Edison

2006-02-20 Thread David Menendez
. xs `rcons` x. -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics! ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString

2007-02-05 Thread David Menendez
-- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics! ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] ST vs State

2007-05-30 Thread David Menendez
because the Store is implicit and used single-threadedly. -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics! ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org

Re: [Haskell] ST vs State

2007-05-30 Thread David Menendez
David Menendez writes: It's also possible to write ST in terms of State. Assume we have a Store ADT with this interface: data Store r data STRef r a withStore :: (forall r. Store r - a) - a newRef:: a - Store r - (STRef r a, Store r) readRef :: STRef r

Re: [Haskell] Haskell Applications - reg

2007-10-04 Thread David Menendez
On 10/4/07, Ganesh Narayan [EMAIL PROTECTED] wrote: True, but I was of the opinion that -O0, -fno-state-hack and -fno-full-laziness would preserve the calling structure with minimal perturbance. Wouldn't it? Besides, I am hardly aware of any utility that generates source level call

Re: [Haskell] detecting existing instances

2008-01-09 Thread David Menendez
On Jan 9, 2008 3:10 PM, Ralf Laemmel [EMAIL PROTECTED] wrote: Type-level type cast is the type-level programmer's swiss army knife. See the illustration below. Does this get any easier with type families? Your (TypeCast a b) seems similar in intent to (a ~ b), but I'm not familiar enough

Re: [Haskell] An Alternative Data.List.Zipper

2009-01-17 Thread David Menendez
On Sat, Jan 17, 2009 at 4:32 PM, Jeff Wheeler j...@nokrev.com wrote: On Sat, 2009-01-17 at 21:55 +0100, Jean-Philippe Bernardy wrote: I think it should admit empty, and the traversable instance should traverse the first list in reverse. I fixed the latter issue so that the behavior is

Re: [Haskell] An Alternative Data.List.Zipper

2009-01-17 Thread David Menendez
On Sat, Jan 17, 2009 at 7:49 PM, Jeff Wheeler j...@nokrev.com wrote: On Sat, 2009-01-17 at 17:41 -0500, David Menendez wrote: That's correct, but I think you'd be better off defining OpApplicative (or Backward, as I call it) locally and avoiding the two reverses. I'll have to look

Re: [Haskell] An Alternative Data.List.Zipper

2009-01-17 Thread David Menendez
On Sat, Jan 17, 2009 at 9:13 PM, rocon...@theorem.ca wrote: On Sat, 17 Jan 2009, David Menendez wrote: instance Applicative f = Applicative (Backwards f) where pure = B . pure f * x = B (unB f ** unB x) probably should be f * x = B (unB x ** unB f) I always get that backwards

Re: [Haskell] string type class

2009-03-06 Thread David Menendez
On Fri, Mar 6, 2009 at 12:05 PM, Wolfgang Jeltsch g9ks1...@acme.softbase.org wrote: Am Freitag, 6. März 2009 17:31 schrieben Sie: What name would you suggest? If we wouldn’t have to care about compatibility, I would name the class String and drop the type alias String. It’s hard to come up

Re: GADTs and functional dependencies

2008-09-23 Thread David Menendez
On Tue, Sep 23, 2008 at 1:44 PM, Chris Kuklewicz [EMAIL PROTECTED] wrote: You cannot create a normal function fun. You can make a type class function fun :: Class a b = GADT a - b data GADT a where GADT :: GADT () GADT2 :: GADT String -- fun1 :: GADT () - () -- infers type fun1

Re: Illegal type synonym family application in instance (Was: Breakage with 6.10)

2008-10-10 Thread David Menendez
On Fri, Oct 10, 2008 at 8:40 PM, Niklas Broberg [EMAIL PROTECTED] wrote: src\HSX\XMLGenerator.hs:71:0 Illegal type synonym family application in instance: XML m In the instance declaration for `EmbedAsChild m (XML m)´ --- Could someone help me point out the problem here?

Re: base-3 vs base-4 (Was: Breakage with 6.10)

2008-10-11 Thread David Menendez
2008/10/11 José Pedro Magalhães [EMAIL PROTECTED]: In base4, no Data.Generics.* modules were kept. Instead, a new module, Data.Data, contains all that was in Data.Generics.Basics and most of Data.Generics.Instances. Data.Data? Surely we can come up with something better than that. -- Dave

Re: Control.Exception

2008-11-03 Thread David Menendez
On Mon, Nov 3, 2008 at 12:53 PM, Duncan Coutts [EMAIL PROTECTED] wrote: On Mon, 2008-11-03 at 09:26 -0800, Sigbjorn Finne wrote: One way to do this now is to use Control.Exception.catches: catches :: IO a - [Handler a] - IO a data Handler a where Handler :: forall a e. (Exception e) =

Re: No atomic read on MVar?

2008-11-03 Thread David Menendez
On Mon, Nov 3, 2008 at 6:29 AM, Philip K.F. Hölzenspies [EMAIL PROTECTED] wrote: I have now implemented my variable as a pair of MVars, one of which serves as a lock on the other. Both for performance reasons and for deadlock analysis, I would really like an atomic read on MVars, though. Does

Re: Control.Exception

2008-11-03 Thread David Menendez
On Mon, Nov 3, 2008 at 7:27 PM, shelarcy [EMAIL PROTECTED] wrote: On Tue, 04 Nov 2008 07:40:50 +0900, David Menendez [EMAIL PROTECTED] wrote: ie: action `catches` [ \(e :: ExitCode) - ... , \(e :: PatternMatchFail) - ... ] or just by using multiple catch clauses: action

Re: Unicode's greek lambda

2008-11-19 Thread David Menendez
On Wed, Nov 19, 2008 at 5:24 PM, Duncan Coutts [EMAIL PROTECTED] wrote: On Wed, 2008-11-19 at 15:01 +, Tony Finch wrote: On Wed, 19 Nov 2008, Simon Marlow wrote: Tue Jan 16 16:11:00 GMT 2007 Simon Marlow [EMAIL PROTECTED] * Remove special lambda unicode character, it didn't work

Re: Lazy minimum

2008-11-19 Thread David Menendez
On Wed, Nov 19, 2008 at 8:06 PM, Dave Bayer [EMAIL PROTECTED] wrote: What I'm wondering, however, is if there is a way to code minimum efficiently in general, minimum :: Ord a = [a] - a where one knows absolutely nothing further about the type a, but one believes that lazy evaluation will

Re: Lazy minimum

2008-11-19 Thread David Menendez
On Thu, Nov 20, 2008 at 12:18 AM, Dan Doel [EMAIL PROTECTED] wrote: On Wednesday 19 November 2008 11:38:07 pm David Menendez wrote: One possibility would be to add minimum and maximum to Ord with the appropriate default definitions, similar to Monoid's mconcat. This is probably the most

Re: Differences in pattern matching syntax?

2009-01-16 Thread David Menendez
On Fri, Jan 16, 2009 at 11:07 AM, Simon Peyton-Jones simo...@microsoft.com wrote: So, clearly not a bug in GHC; but it would be more felicitous if it gave you a warning about the instance declaration for Eq RuleType. The difficulty is that it's not clear when to warn; it's ok to use default

Re: Changes in scoped type variable behavior?

2009-01-23 Thread David Menendez
2009/1/23 Austin Seipp mad@gmail.com: The code is attached to this message; the problem is in the normalize function: normalize :: (Modular s a, Integral a) = a - M s a normalize a = M (mod a (modulus (u :: s))) s isn't scoped over the definition of normalize in this definition. You

Segmentation fault trying to build ghc 6.10.1 using macports, Mac OS X 10.5, PPC

2009-01-31 Thread David Menendez
I'm trying to upgrade GHC to 6.10.1 using macports on a PowerBook G4 running OS X 10.5.5. From what I can tell, I'm getting a segmentation fault from cabal-bin. This is possibly related to http://trac.macports.org/ticket/15142 and http://hackage.haskell.org/trac/ghc/ticket/2380. cd

Re: Segmentation fault trying to build ghc 6.10.1 using macports, Mac OS X 10.5, PPC

2009-02-03 Thread David Menendez
On Mon, Feb 2, 2009 at 9:58 AM, Gregory Wright gwri...@comcast.net wrote: On Feb 2, 2009, at 4:48 AM, Christian Maeder wrote: David Menendez wrote: I'm trying to upgrade GHC to 6.10.1 using macports on a PowerBook G4 running OS X 10.5.5. From what I can tell, I'm getting a segmentation

Re: [Fwd: OSX installer -- first draft]

2009-06-03 Thread David Menendez
On Tue, Jun 2, 2009 at 5:38 AM, Duncan Coutts duncan.cou...@worc.ox.ac.uk wrote: OSX users, please could you try out Gregory's Haskell Platform package below and send commentary to the platform list, or file tickets in the platform trac, that'd be great.

Re: [Haskell-cafe] Re: FlexibleContexts and FlexibleInstances

2009-06-11 Thread David Menendez
On Thu, Jun 11, 2009 at 4:16 AM, Claus Reinkeclaus.rei...@talk21.com wrote: |What you describe is exactly how I would *want* things to work. It's |nice to hear my wishes echoed from a user perspective. :-) actually, I was describing how things seem to work right now. | Only

Re: Could not deduce (MArray (STUArray s) Int (ST s)) from context () when applying runST

2009-07-21 Thread David Menendez
On Tue, Jul 21, 2009 at 5:30 PM, Christian Klauserch27...@gmail.com wrote: Hi, I'm in the process of learning haskell and came across this problem: Using `Glasgow Haskell Compiler, Version 6.10.4, for Haskell 98, stage 2 booted by GHC version 6.10.1` Common beginning of the file

GHC on Snow Leopard: best practices?

2009-10-06 Thread David Menendez
Is there any consensus about what needs to be done to get a working ghc installation on a Snow Leopard (Mac OS X 10.6) system? The Mac OS X wiki page[1] currently links to a blog post[2] that recommends manually patching /usr/bin/ghc, but I have also seen recommendations that people patch ghci,

Re: Type checker's expected and inferred types (reformatted)

2009-10-23 Thread David Menendez
On Fri, Oct 23, 2009 at 9:46 PM, Isaac Dupree m...@isaac.cedarswampstudios.org wrote: C Rodrigues wrote: fun1 produces the error message: Couldn't match expected type `Maybe a' against inferred type `IO ()' In the first argument of `(=)', namely `bar' fun2 produces the error message:

Re: Type checker's expected and inferred types (reformatted)

2009-10-25 Thread David Menendez
On Sun, Oct 25, 2009 at 1:37 PM, Isaac Dupree m...@isaac.cedarswampstudios.org wrote: David Menendez wrote: The expected type is what the context wants (it's *ex*ternal). The inferred type is what the expression itself has (it's *in*ternal). So inferring the type Maybe () for bar seems wrong

Re: inferred type doesn't type-check (using type families)

2009-11-03 Thread David Menendez
On Tue, Nov 3, 2009 at 3:20 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: 2009/11/3 Daniel Fischer daniel.is.fisc...@web.de: Am Dienstag 03 November 2009 19:28:55 schrieb Roland Zumkeller: Hi, Compiling class WithT a where   type T a f :: T a - a - T a f = undefined g x

Re: Inliner behaviour - tiny changes lead to huge performance differences

2009-11-13 Thread David Menendez
On Fri, Nov 13, 2009 at 2:04 AM, Bryan O'Sullivan b...@serpentine.com wrote: And the lengthI function is defined more generally, in the hope that I could use it for both Int and Int64 lengths: lengthI :: Integral a = Stream Char - a lengthI (Stream next s0 _len) = loop_length 0 s0     where

Re: Implicit 'forall' in data declarations

2010-10-22 Thread David Menendez
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

Re: Implicit 'forall' in data declarations

2010-10-25 Thread David Menendez
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.        

Error building GHC from darwin ports

2005-06-16 Thread David Menendez
. _opt_local_var_db_dports_sources_rsync.rsync.opendarwin. org_dpupdate_dports_lang_ghc/work/ghc-6.4/happy/src/happy-inplace] Error 2 Warning: the following items did not execute (for ghc): com.apple.destroot com.apple.build Error: Unable to upgrade port: 1 -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org

Re: Automatically derived instances

2005-08-28 Thread David Menendez
t where c = a instance B t = C t where c = b instance A Char where a = 'a' instance B Char where b = 'b' What should c :: Char evaluate to? -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem/ ___ Glasgow-haskell-users

Re: Simple GADTs Question

2005-10-07 Thread David Menendez
- DFExpr t - DFExpr t - DFExpr t Ignorning the other clauses, it's equivalent to data DFExpr t = Deriv Int (DFExpr t) (DFExpr t) -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics

Re: forall a (Ord a = a- a) - Int is an illegal type???

2006-02-09 Thread David Menendez
_:T. U and forall a. T is short for Pi a:*. T. Using that syntax, the types above become: Pi a:*. Pi _:(Pi _:a. a). Int and Pi _:(Pi a:*. Pi _:a. a). Int -- David Menendez [EMAIL PROTECTED] | In this house, we obey the laws http://www.eyrie.org/~zednenem |of thermodynamics

Re: forall a (Ord a = a- a) - Int is an illegal type???

2006-02-09 Thread David Menendez
) - Int Inferred type: (a - b) - Int In the definition of `f': f = undefined I think there would need to be a top-level constraint on |a| to guarantee that an instance of |Foo a b| exists, like forall a. (exists c. Foo a c) = (forall b. Foo a b = a - b) - Int -- David Menendez

Re: [Haskell-cafe] class default method proposal

2007-12-11 Thread David Menendez
On Dec 11, 2007 9:20 AM, Duncan Coutts [EMAIL PROTECTED] wrote: So my suggestion is that we let classes declare default implementations of methods from super-classes. snip. Does this proposal have any unintended consequences? I'm not sure. Please discuss :-) It creates ambiguity if two

Re: [Haskell-cafe] class default method proposal

2007-12-11 Thread David Menendez
On Dec 11, 2007 1:29 PM, apfelmus [EMAIL PROTECTED] wrote: Without the automatic search, this is already possible class Functor f where fmap :: (a - b) - f a - f b class Functor m = Monad m where return :: a - m a (=) :: m a - (a - m b) - m b --

Re: Arrow without `'

2008-01-23 Thread David Menendez
On Jan 23, 2008 12:20 PM, Valery V. Vorotyntsev [EMAIL PROTECTED] wrote: I've built GHC from darcs, and... Could anybody tell me, what's the purpose of Arrow[1] not having `' method? It's derived from the Category superclass. -- Dave Menendez [EMAIL PROTECTED]

Re: Unit unboxed tuples

2011-12-24 Thread David Menendez
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:                 (,,) :: * - * - * - *                 (,) :: * - * - *                

Known problems with promoted tuples and lists in GHC 7.4.1?

2012-06-06 Thread David Menendez
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

Re: Known problems with promoted tuples and lists in GHC 7.4.1?

2012-06-06 Thread David Menendez
internally. On Wed, Jun 6, 2012 at 5:43 PM, José Pedro Magalhães j...@cs.uu.nl wrote: Hi David, Are you using HEAD? If so, and you run into problems, please report them (either here or as bugs in trac). Thanks, Pedro On Wed, Jun 6, 2012 at 9:37 PM, David Menendez d...@zednenem.com wrote

Re: Known problems with promoted tuples and lists in GHC 7.4.1?

2012-06-07 Thread David Menendez
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

Re: default roles

2013-10-10 Thread David Menendez
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

Re: default roles

2013-10-10 Thread David Menendez
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

Re: default roles

2013-10-11 Thread David Menendez
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 =

Re: Suggestion regarding (.) and map

2008-04-24 Thread David Menendez
On Thu, Apr 24, 2008 at 6:06 PM, Twan van Laarhoven [EMAIL PROTECTED] wrote: Cale Gibbard wrote: Hello, In keeping with my small but seemingly extremely controversial suggestions for changes to the Prelude, here's a suggestion which I think is elegant and worth considering for the

Re: patch applied (haskell-prime-status): add Make $ left associative, like application

2008-04-24 Thread David Menendez
On Wed, Apr 23, 2008 at 6:21 PM, Niklas Broberg [EMAIL PROTECTED] wrote: I'm very suspicious about the power/weight ratio of this change. Normally, for simple value-level stuff like this, provide both options: mapM / forM. = = So how about, rather than break things, just

Re: Haskell 2010: libraries

2009-07-16 Thread David Menendez
On Thu, Jul 16, 2009 at 4:36 AM, Simon Marlowmarlo...@gmail.com wrote: On 15/07/2009 18:10, David Menendez wrote: On Wed, Jul 15, 2009 at 11:33 AM, Simon Marlowmarlo...@gmail.com  wrote: On 15/07/2009 15:54, Ian Lynagh wrote: On Wed, Jul 15, 2009 at 03:39:55PM +0100, Simon Marlow wrote

Re: Haskell 2010 libraries

2010-04-30 Thread David Menendez
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

Re: Proposal to solve Haskell's MPTC dilemma

2010-05-27 Thread David Menendez
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

[Haskell-cafe] Haddock/hscolour integration broken on Hackage?

2007-09-10 Thread David Menendez
I was looking at the Data.Binary documentation[1] on Hackage, and I've noticed some problems with the associated source listings[2]. First, none of the Source links work. They all refer to fragment IDs (e.g., #Binary) that are not defined. I'm not sure if this is a problem with hscolor, haddock,

Re: [Haskell-cafe] Can somebody give any advice for beginners?

2007-09-11 Thread David Menendez
On 9/11/07, Andrew Coppin [EMAIL PROTECTED] wrote: Dougal Stanton wrote: On 11/09/2007, Peter Verswyvelen [EMAIL PROTECTED] wrote: To me, Haskell was a bit like climbing a mountain which is largely covered by fog; you don't see anything until you've climbed high enough, and then the

Re: [Haskell-cafe] Type-Marking finite/infinte lists?

2007-09-15 Thread David Menendez
On 9/15/07, Joachim Breitner [EMAIL PROTECTED] wrote: today while mowing the lawn, I thought how to statically prevent some problems with infinte lists. I was wondering if it is possible to somehow mark a list as one of finite/infinite/unknown and to mark list-processing functions as whether

Re: [Haskell-cafe] Library Process (was Building production stable software in Haskell)

2007-09-20 Thread David Menendez
On 9/18/07, Sven Panne [EMAIL PROTECTED] wrote: Although this statement might be a bit heretical on this list, I'll have to repeat myself again that Cabal, cabal-install, cabal-whatever will *never* be the right tool for the end user to install Haskell packages on platforms with their own

Re: [Haskell-cafe] Library Process (was Building production stable software in Haskell)

2007-09-23 Thread David Menendez
On 9/23/07, Sven Panne [EMAIL PROTECTED] wrote: On Thursday 20 September 2007 16:33, David Menendez wrote: Does RPM, etc., deal with the fact that Haskell library installations are specific to a particular platform? It depends what you mean with deal: If it is only making sure that a given

Re: [Haskell-cafe] Library Process (was Building production stable software in Haskell)

2007-09-23 Thread David Menendez
On 9/23/07, Isaac Dupree [EMAIL PROTECTED] wrote: Bulat Ziganshin wrote: Hello David, Sunday, September 23, 2007, 10:28:41 PM, you wrote: Let's say I have more than one Haskell implementation on my computer, e.g. GHC 6.6, GHC 6.7, and Hugs. (In MacPorts, these are the ghc,

Re: [Haskell-cafe] Re: Very crazy

2007-09-25 Thread David Menendez
On 9/25/07, Andrew Coppin [EMAIL PROTECTED] wrote: This is why I found it so surprising - and annoying - that you can't use a 2-argument function in a point-free expression. [...] I can't figure out why map . map works, but sum . zipWith (*) doesn't work. As I say, the only reason I can see is

Re: [Haskell-cafe] 'data' syntax - a suggestion

2007-09-27 Thread David Menendez
On 9/27/07, Albert Y. C. Lai [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Data with where? You haven't heard about GADTs? To avoid clashing with GADT's where, I propose to rename ok's keyword to wherein, or wheretype, or something data B k v = E | F b b wherein type b = B k v

Re: [Haskell-cafe] Type-level arithmetic

2007-10-06 Thread David Menendez
On 10/6/07, Dan Piponi [EMAIL PROTECTED] wrote: I'm guessing you're talking about a language that makes it easier to fake your own dependent types without properly implementing dependent types. If you find one, I could use it right now - the details of embedding the gaussian integers in

Re: [Haskell-cafe] New slogan for haskell.org

2007-10-08 Thread David Menendez
On 10/8/07, Alistair Bayley [EMAIL PROTECTED] wrote: I realise that a large influx of mediocre programmers will have a negative effect on the community, but is that a reasonable price to pay? I understand that may of you love a small, intimate, high-quality community, but perhaps that will

Re: [Haskell-cafe] New slogan for haskell.org

2007-10-08 Thread David Menendez
On 10/8/07, Henning Thielemann [EMAIL PROTECTED] wrote: Thus, what happens today? People ask Haskell-Cafe how to implement global variables and they are advised to use IORefs and unsafePerformIO, although the better answer is: Why do you want to do this? Even Tackling the awkward squad

Re: [Haskell-cafe] Let's do ListT right, finally

2007-10-14 Thread David Menendez
On 10/14/07, Dan Piponi [EMAIL PROTECTED] wrote: On 10/14/07, Yitzchak Gale [EMAIL PROTECTED] wrote: Not very much, I suspect. That monad really is broken - it's not a monad at all. Depending on your point of view, ListT isn't broken. It correctly transforms commutative monads into monads.

Re: [Haskell-cafe] Categories in base

2007-10-14 Thread David Menendez
On 10/14/07, Jean-Philippe Bernardy [EMAIL PROTECTED] wrote: instance Arrow a = Functor (a r) where -- (not defined as such in base, but ad-hoc) f $ g = pure f . g Similarly: instance Arrow a = Applicative (a r) where return a = pure (const a) a * b = pure (\(f,x) - f x) . a b

Re: [Haskell-cafe] Re: [Haskell] Announce: generating free theorems, online and offline

2007-10-18 Thread David Menendez
On 10/18/07, Stefan O'Rear [EMAIL PROTECTED] wrote: On Thu, Oct 18, 2007 at 03:36:01AM -0400, [EMAIL PROTECTED] wrote: (As an aside: The H98 report still list the right-zero law as being a law for MonadPlus, even though most MonadPlus instances don't obey it. That's actually a defect in

Re: [Haskell-cafe] Re: Existential types (Was: Type vs TypeClass duality)

2007-10-24 Thread David Menendez
On 10/24/07, Peter Hercek [EMAIL PROTECTED] wrote: I do not see why forall can be lifted to the top of function arrows. I probably do not understand the notation at all. They all seem to be different to me. Consider this simple function: \b x y - if b then x else y Let's say we

Re: [Haskell-cafe] Showing Data.Ratio - different on GHC vs Hugs/Yhc

2007-11-16 Thread David Menendez
On Nov 16, 2007 2:12 PM, Neil Mitchell [EMAIL PROTECTED] wrote: Under Hugs and Yhc, showing a Ratio 1%2 gives 1 % 2. Under GHC showing 1%2 gives 1%2. Does the standard say anything about this? Is someone wrong? And how do Yhc/nhc/Hugs pass Bernouilli in the Nofib suite given that the output

Re: [Haskell-cafe] What is the role of $!?

2007-11-18 Thread David Menendez
On Nov 18, 2007 9:23 AM, Paul Johnson [EMAIL PROTECTED] wrote: Obviously there is a strong correspondance between a thunk and a partly-evaluated expression. Hence in most cases the terms lazy and non-strict are synonyms. But not quite. For instance you could imagine an evaluation engine on

Re: [Haskell-cafe] expanded standard lib

2007-11-21 Thread David Menendez
On Nov 21, 2007 5:59 AM, Simon Peyton-Jones [EMAIL PROTECTED] wrote: 2. We absolutely must not conflate GHC releases with QA-stamped library bundles. The latter would be great, but the two must be separate. (For reasons given by others in this thread.) Someone in a previous thread made an

Re: [Haskell-cafe] New slogan for haskell.org

2007-11-27 Thread David Menendez
On Nov 26, 2007 1:44 PM, Thomas Davie [EMAIL PROTECTED] wrote: But the point is that this section of the site is the bit that's meant to be an advertisement -- we're trying to encourage people to read more, Are we? I thought Haskell.org was intended to describe what Haskell *is*. There are

Re: [Haskell-cafe] return in Monad class necessary?

2007-11-27 Thread David Menendez
On Nov 27, 2007 4:45 AM, Chris Eidhof [EMAIL PROTECTED] wrote: First, some people want to use return just as an imperative programmer would use it: to exit from a function. So the programmer doesn't expect the commands after that return are executed. This is more a problem with the name. I

Re: [Haskell-cafe] foild function for expressions

2007-12-04 Thread David Menendez
On Dec 3, 2007 12:18 PM, Carlo Vivari [EMAIL PROTECTED] wrote: Hi! I'm a begginer in haskell and I have a problem with an exercise, I expect someone could help me: In one hand I have a declaration of an algebra data, like this: data AlgExp a = AlgExp { litI :: Int - a, litB :: Bool -

Re: [Haskell-cafe] IO is a bad example for Monads

2007-12-10 Thread David Menendez
On Dec 10, 2007 1:44 PM, Dan Piponi [EMAIL PROTECTED] wrote: When someone comes to me and says I have this Python script that scans through these directories and finds the files that meet these criteria and generates a report based on this template, could I do it better in Haskell? it'd be

Re: [Haskell-cafe] class default method proposal

2007-12-11 Thread David Menendez
On Dec 11, 2007 9:20 AM, Duncan Coutts [EMAIL PROTECTED] wrote: So my suggestion is that we let classes declare default implementations of methods from super-classes. snip. Does this proposal have any unintended consequences? I'm not sure. Please discuss :-) It creates ambiguity if two

Re: [Haskell-cafe] class default method proposal

2007-12-11 Thread David Menendez
On Dec 11, 2007 1:29 PM, apfelmus [EMAIL PROTECTED] wrote: Without the automatic search, this is already possible class Functor f where fmap :: (a - b) - f a - f b class Functor m = Monad m where return :: a - m a (=) :: m a - (a - m b) - m b --

Re: [Haskell-cafe] Monads that are Comonads and the role of Adjunction

2007-12-14 Thread David Menendez
On Dec 14, 2007 5:14 AM, Jules Bean [EMAIL PROTECTED] wrote: There are two standard ways to decompose a monad into two adjoint functors: the Kleisli decomposition and the Eilenberg-Moore decomposition. However, neither of these categories is a subcategory of Hask in an obvious way, so I

Re: [Haskell-cafe] Questions about the Functor class and it's use in Data types à la carte

2007-12-14 Thread David Menendez
On Dec 14, 2007 9:44 PM, Benja Fallenstein [EMAIL PROTECTED] wrote: data Val a = Val Int instance Functor Val where fmap f (Val x) = f `seq` Val x Ah, good old seq. How I loathe it. Seriously, though, good catch. I always forget about seq when I'm doing stuff like this. -- Dave

Re: [Haskell-cafe] Re: Monads that are Comonads and the role of Adjunction

2007-12-17 Thread David Menendez
On Dec 17, 2007 4:34 AM, Yitzchak Gale [EMAIL PROTECTED] wrote: Derek Elkins wrote: There is another very closely related adjunction that is less often mentioned. ((-)-C)^op -| (-)-C or a - b - C ~ b - a - C This gives rise to the monad, M a = (a - C) - C this is also exactly

Re: [Haskell-cafe] Re: OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread David Menendez
On Dec 17, 2007 8:18 AM, Nicholls, Mark [EMAIL PROTECTED] wrote: The approach is deliberate...but I accept may be harder than it needs to be...I'm interested in Haskell because of the alleged power/formality of it's type system against the relatively weakness of OO ones...the irony at the

  1   2   3   4   5   >