Re: Newtype wrappers

2013-01-14 Thread Andrea Vezzosi
On Mon, Jan 14, 2013 at 7:09 PM, Simon Peyton-Jones simo...@microsoft.comwrote: Friends ** ** I’d like to propose a way to “promote” newtypes over their enclosing type. Here’s the writeup http://hackage.haskell.org/trac/ghc/wiki/NewtypeWrappers ** ** Any

Re: Installing binary tarball fails on Linux

2012-09-27 Thread Andrea Vezzosi
On Thu, Feb 23, 2012 at 10:27 PM, Johan Tibell johan.tib...@gmail.com wrote: The 64-bit version work so I guess that means that a 32-bit GHC/64-bit OS combination only works on OS X? Did you get it working on linux? I'm getting the same error myself: ... ghc-cabal: Bad interface file:

Re: PolyKind issue in GHC 7.6.1rc1: How to make a kind a functional dependency?

2012-09-19 Thread Andrea Vezzosi
On Sun, Sep 16, 2012 at 5:49 PM, Simon Peyton-Jones simo...@microsoft.com wrote: [...] Type inference ~ I'm a little unclear about the implications for inference. One route might be this. Suppose we are trying to solve a constraint [W] (a:'(k1,ks)) ~ '( t1, t2 ) where a is

Re: [Haskell-cafe] SYB with class: Bug in Derive.hs module

2012-09-04 Thread Andrea Vezzosi
I've pushed the discussed changes to the repo[1], it'd be good if you (and other users) could test them before they get to hackage. [1] darcs get http://patch-tag.com/r/Saizan/syb-with-class/ -- Andrea ___ Haskell-Cafe mailing list

Re: PolyKind issue in GHC 7.6.1rc1: How to make a kind a functional dependency?

2012-09-03 Thread Andrea Vezzosi
(s :: *) (t :: *). s :=: t s_eq_t = cong_Bad (trans refl_Any eta) subst :: x :=: y - x - y subst Refl x = x coerce :: s - t coerce = subst s_eq_t {- GHCi, version 7.7.20120830: http://www.haskell.org/ghc/ :? for help *Main coerce (4.0 :: Double) :: (Int,Int) (Segmentation fault -} -- Andrea

Re: [Haskell-cafe] SYB with class: Bug in Derive.hs module

2012-09-03 Thread Andrea Vezzosi
hack in ghc-7.4.1 to get the instance to typecheck, so we could side-step the issue entirely by removing it from the generated code. -- Andrea Vezzosi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] SYB with class: Bug in Derive.hs module

2012-09-03 Thread Andrea Vezzosi
On Mon, Sep 3, 2012 at 2:53 PM, Roman Cheplyaka r...@ro-che.info wrote: * Andrea Vezzosi sanzhi...@gmail.com [2012-09-03 12:50:03+0200] [...] This is pretty similar to what ended up being a ghc bug, fixed in 7.0 though: http://hackage.haskell.org/trac/ghc/ticket/3731 The difference between

Re: TypeFamilies vs. FunctionalDependencies type-level recursion

2011-06-14 Thread Andrea Vezzosi
On Tue, Jun 14, 2011 at 4:40 PM, Dan Doel dan.d...@gmail.com wrote: On Tue, Jun 14, 2011 at 5:36 AM, Simon Peyton-Jones simo...@microsoft.com wrote: There was an interesting thread on haskell-prime [1], about the relationship between functional dependencies and type families.  This message is

Re: [Haskell-cafe] Set monad

2011-01-09 Thread Andrea Vezzosi
On Sun, Jan 9, 2011 at 7:45 AM, Sebastian Fischer fisc...@nii.ac.jp wrote: [...] Only conversion to the underlying Set type requires an Ord constraint.     getSet :: Ord a = Set a - S.Set a     getSet a = a - S.singleton this unfortunately also means that duplicated elements only get filtered

Re: Possible bug with GADTs?

2010-08-18 Thread Andrea Vezzosi
On Tue, Aug 17, 2010 at 8:54 PM, Dan Knapp dan...@gmail.com wrote: Below, please find a snippet from a program I'm working on, and the error it produces.  I was told in #haskell that this was pretty suspect and could conceivably be a ghc bug.  So I'm reporting it here.  I'd also be grateful

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-16 Thread Andrea Vezzosi
On Thu, May 13, 2010 at 8:13 PM, wren ng thornton w...@freegeek.org wrote: Andrea Vezzosi wrote: On Thu, May 13, 2010 at 10:51 AM, wren ng thornton w...@freegeek.org wrote: Andrea Vezzosi wrote: wren ng thornton  wrote: With this change [1] I can't notice any difference for your

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-13 Thread Andrea Vezzosi
On Thu, May 13, 2010 at 10:51 AM, wren ng thornton w...@freegeek.org wrote: Andrea Vezzosi wrote: wren ng thornton  wrote: With this change [1] I can't notice any difference for your benchmark[2]. Then again, all the runTest calls take 0 msec and I've had no luck making the computation take

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-12 Thread Andrea Vezzosi
On Wed, May 12, 2010 at 7:50 AM, wren ng thornton w...@freegeek.org wrote: wren ng thornton wrote: Here's one big difference: newtype ErrCPS e m a = ErrCPS { runErrCPS ::    forall r . (e - m r) --  error handler    - (a - m r) --  success handler    - m r } The analogous version I use

Re: [Haskell-cafe] SYB looping very, very mysteriously

2010-01-24 Thread Andrea Vezzosi
On Mon, Dec 7, 2009 at 3:38 PM, David Fox dds...@gmail.com wrote: On Sat, Dec 5, 2009 at 2:38 AM, Andrea Vezzosi sanzhi...@gmail.com wrote: On Fri, Dec 4, 2009 at 8:51 PM, Jeremy Shaw jer...@n-heptane.com wrote: I have stripped things down to the bare minimum, and test under GHC 6.10, GHC 6.12

Re: [Haskell-cafe] SYB looping very, very mysteriously

2009-12-05 Thread Andrea Vezzosi
On Fri, Dec 4, 2009 at 8:51 PM, Jeremy Shaw jer...@n-heptane.com wrote: I have stripped things down to the bare minimum, and test under GHC 6.10, GHC 6.12, Linux, and Mac OS X. Results are consistent. In the following code,  1. if you load the code into ghci and evaluate e it will hang, but

Re: haddock problem. Was: ANNOUNCE: GHC 6.12.1 Release Candidate 1

2009-10-23 Thread Andrea Vezzosi
On Mon, Oct 12, 2009 at 6:43 PM, Christian Maeder christian.mae...@dfki.de wrote: Hi, with http://darcs.haskell.org/~ghc/dist/6.12.1rc1/ghc-6.12.0.20091010-i386-unknown-linux-n.tar.bz2 installed (under /local/maeder/) I get the following internal Haddock or GHC error. I have no file  

Re: ANNOUNCE: GHC 6.10.4 Release Candidate 1

2009-07-08 Thread Andrea Vezzosi
the bug about ^C (http://hackage.haskell.org/trac/ghc/ticket/3317) doesn't look fixed to me, on amd64 linux. sai...@astarte:~/cabal$ ~/bin/ghc --version The Glorious Glasgow Haskell Compilation System, version 6.10.3.20090628 sai...@astarte:~/cabal$ ~/bin/ghc --make foo.hs [1 of 1] Compiling Main

Re: [Haskell-cafe] Re: Completely confused by cabal

2009-03-22 Thread Andrea Vezzosi
On Sun, Mar 22, 2009 at 12:51 PM, Colin Paul Adams co...@colina.demon.co.uk wrote: Achim == Achim Schneider bars...@web.de writes:    Achim Colin Paul Adams co...@colina.demon.co.uk wrote:     So why doesn't it find packages then, when they are installed?        Achim I've got no idea, what

Re: [Haskell-cafe] Re: Completely confused by cabal

2009-03-22 Thread Andrea Vezzosi
I should clarify that cabal install --global won't see the packages installed in the user db, even if not run as root. But it at least will take into consideration the available packages' cache and the config file in ~/.cabal/ ___ Haskell-Cafe mailing

Re: [Haskell-cafe] do you have to use fix with forkio?

2009-03-06 Thread Andrea Vezzosi
2009/3/6 Daryoush Mehrtash dmehrt...@gmail.com: Two questions: a)   This  chat server implementation doesn't actually close the connection as a real one would need to do.  If you use forever  is there a way to end the loop so as to end the connection? Yes, throw an exception and catch it from

Re: [Haskell-cafe] jhc speed

2009-02-25 Thread Andrea Vezzosi
2009/2/22 Luke Palmer lrpal...@gmail.com: On Sun, Feb 22, 2009 at 8:15 AM, John Meacham j...@repetae.net wrote: On Sun, Feb 22, 2009 at 03:36:34PM +0100, Peter Verswyvelen wrote: Would it be possible to separate the frontend (Haskell to Core) and backend (Core to machine code) from the

Re: [Haskell-cafe] Trying to install Cabal

2009-02-20 Thread Andrea Vezzosi
the solution here is to compile Setup.hs with ghc first, i.e. ghc --make Setup.hs and then use the produced Setup.exe, this is also recommended un linux since runghc will have to load and interpret many modules if not. However if you've already built cabal-install against 1.6.0.1 you can simply

Re: [Haskell-cafe] Re: Bug in Cabal?

2009-02-17 Thread Andrea Vezzosi
On Tue, Feb 17, 2009 at 11:50 PM, Achim Schneider bars...@web.de wrote: Martin Huschenbett hus...@gmx.org wrote: $ cabal install ghci-haskeline Resolving dependencies... cabal.exe: dependencies conflict: ghc-6.10.1 requires process ==1.0.1.1 however process-1.0.1.1 was excluded because

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-08 Thread Andrea Vezzosi
with haddock-2.x. The solution is to do the pre-processing the same for haddock-0.x and 2.x. Generally the haddock code in Cabal is a horrible inconsistent mess. I believe Andrea Vezzosi has been looking at rewriting it, which is good news. Duncan

Re: [Haskell-cafe] [ANN] Working with HLint from Emacs

2009-01-14 Thread Andrea Vezzosi
Does it also let you apply a suggestion automatically? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Staged evaluation, names?

2009-01-08 Thread Andrea Vezzosi
On Thu, Jan 8, 2009 at 5:25 AM, wren ng thornton w...@freegeek.org wrote: The question for y'all is what should I call it? I've been calling the template-function qaf (for Compiled Applicative Form ;) and the type class with that function would be the only thing in the package, but I'm not

Re: [Haskell-cafe] Threads with high CPU usage

2008-12-21 Thread Andrea Vezzosi
Tried running the program with +RTS -Nn where n = 2 or more? that should use more OS threads On Sun, Dec 21, 2008 at 10:43 PM, Günther Schmidt red...@fedoms.com wrote: Hi, in an application of mine I start a long-running operation in a thread via forkIO so that the UI process doesn't get

Re: [Haskell-cafe] Ambiguous type variable woes

2008-11-24 Thread Andrea Vezzosi
If you want to defer the choice of 's' you've to make it appear in the type signature of test1, so you've to introduce an artificial parameter even if we're interested only in its type. e.g.: data Proxy (s :: * - * - *) -- useful because we can't have an argument of type 's' directly, since it's

Re: [Haskell-cafe] Re: howto tuple fold to do n-ary cross product?

2008-11-23 Thread Andrea Vezzosi
It's more natural to consider the cross product of no sets to be [[]] so your crossr becomes: crossr [] = [[]] crossr (x:xs) = concat (map (\h -map (\t - h:t) (crossr tail)) hd) which we can rewrite with list comprehensions for conciseness: crossr [] = [[]] crossr (x:xs) = [ a:as | a - x, as

Re: [Haskell-cafe] Re: howto tuple fold to do n-ary cross product?

2008-11-23 Thread Andrea Vezzosi
On Mon, Nov 24, 2008 at 7:40 AM, Andrea Vezzosi [EMAIL PROTECTED] wrote: It's more natural to consider the cross product of no sets to be [[]] so your crossr becomes: crossr [] = [[]] crossr (x:xs) = concat (map (\h -map (\t - h:t) (crossr tail)) hd Ops, hd and tail should be x and xs here

Re: problem with echo prompting in ghci (visible in emacs)

2008-11-11 Thread Andrea Vezzosi
I get the same behaviour, and when I open ghci in xterm and press Ctrl-D it also echoes ^D before quitting, which is similar to the problem with haskell-mode which seems to don't like the echoing of ^J from ghci when one uses commands like C-u C-c C-t (which should copy the inferred type from the

Re: [Haskell-cafe] synchronous channels in STM

2008-10-09 Thread Andrea Vezzosi
I'd rather say that STM is intended to be used just for building up transactions, not to model your whole process/thread, simply because in the latter case your process couldn't have any observable intermediate state, or put in another way, between any two transactions the information can only go

Re: [Haskell-cafe] synchronous channels in STM

2008-10-08 Thread Andrea Vezzosi
2008/10/9 Claus Reinke [EMAIL PROTECTED] I was wondering if it was possible to implement synchronous channels within STM. In particular, I'd like to have CSP-like send and recv primitives on a channel that each block until the other side arrives to complete the transaction. Assuming that

Re: [Haskell-cafe] ambiguous types although 'asTypeOf'

2007-12-25 Thread Andrea Vezzosi
As i understand it, the monomorphism restriction applies to constrained type variables, but c :: forall a. a, so it remains polymorphic and each of its uses can be instantiated to a different type. 2007/12/25, Henning Thielemann [EMAIL PROTECTED]: I thought I understand monomorphism

Re: [Haskell-cafe] XmlSerializer.deserialize?

2007-06-24 Thread Andrea Vezzosi
As a side note i'd like to point out that introspectData has a problem with constructors containing Strings because show (x::String) /= x: data Foo = Foo { bar :: String } deriving (Typeable,Data) introspectData (Foo quux) -- [(bar,\quux\)] Those extras \ don't look very nice in the xml.. (the

Re: [Haskell-cafe] writer monad help

2007-05-20 Thread Andrea Vezzosi
if by figure out you meant to do what tell does without using it, you should have written: foo = Writer ((),hello) that would have had the right type, using return you are doing something different. in the Writer monad return :: Monoid w = a - Writer w a so return ((),hello) :: Monoid w = Writer