Re: [Haskell-cafe] ghc 7.2.1 Generics problem

2011-10-31 Thread Andres Löh
Hi. >  I do not know why, my ghc 7.2.1 does not seem to support > DeriveRepresentable. I compiled the ghc 7.2.1 myself by ghc 7.0.4. All > options default. > > $ ghc Types/TopTalkerRecord.hs > > Types/TopTalkerRecord.hs:2:14: >    Unsupported extension: DeriveRepresentable There's no extension of

Re: [Haskell-cafe] Lifted Spine View

2011-11-21 Thread Andres Löh
Hi there. >    I tried to follow the program of the paper "Scrap your boilerpolate" > Revolutions. Unfortunately, > I found the program in the section lifted spine view does not compile in my > GHC, could anybody >  point out where I am wrong? Many Thanks > > My code is posted here http://hpaste.o

[Haskell-cafe] Well-Typed are hiring: Haskell consultant

2012-01-12 Thread Andres Löh
e to start. We are more than happy to answer informal enquiries. Contact Duncan Coutts, Ian Lynagh or Andres Löh (http://www.well-typed.com/who_we_are/) for further information, either by email or IRC. The deadline for applications is Friday 27th January 2012. == About Well-Typed Well-Typed LLP is

Re: [Haskell-cafe] Again, version conflicting problem with cabal-install

2012-02-03 Thread Andres Löh
Hi. On Fri, Feb 3, 2012 at 7:44 AM, Ivan Lazar Miljenovic wrote: > On 3 February 2012 17:29, Magicloud Magiclouds > wrote: >> Thank you. The document does say it more clearly than me. >> But still, currently, ghc only gives me one option: cannot be built. >> How about giving me another one: thro

Re: [Haskell-cafe] Again, version conflicting problem with cabal-install

2012-02-03 Thread Andres Löh
> I am just wanting an option (ignore versions) to take that risk in > develop environment. A controlled way of ignoring version constraints (mainly upper bounds, actually) is certainly on my TODO list for the new solver. The main issue to work out is a good way how to control the disabled bounds

Re: [Haskell-cafe] Again, version conflicting problem with cabal-install

2012-02-03 Thread Andres Löh
Hi. >>  --force-allow=foo-1.3 >> >> with the semantics that all dependencies on foo will be changed to >> allow foo-1.3 to be chosen. Would that be ok? Other suggestions? > > Can't this be integrated with the current --constraint flag? It could be, but ... > If the > constraint is able to be sat

Re: [Haskell-cafe] ANN: generic-deepseq 1.0.0.0

2012-02-24 Thread Andres Löh
I don't understand what's going on here. Instances for V1 should of course be defined if they can be! And in this case, a V1 instance makes sense and should be defined. The definition itself doesn't matter, as it'll never be executed. Cheers, Andres _

Re: [Haskell-cafe] ANN: generic-deepseq 1.0.0.0

2012-02-24 Thread Andres Löh
Hi. >> I don't understand what's going on here. Instances for V1 should of >> course be defined if they can be! And in this case, a V1 instance >> makes sense and should be defined. The definition itself doesn't >> matter, as it'll never be executed. > > > The definition certainly matters: [...]

Re: [Haskell-cafe] ANN: generic-deepseq 1.0.0.0

2012-02-25 Thread Andres Löh
> Would you have an example of a type for which it would be useful to have > a DeepSeq instance, and that would require a V1 instance? I cannot think > of one now; I originaly thought it would be necessary to permit deriving > DeepSeq instances for types tagged with "void" types, but as José > expl

Re: [Haskell-cafe] library conflicts and how to resolve them

2012-05-06 Thread Andres Löh
Hi. > $ cabal install persistent > Resolving dependencies... > In order, the following would be installed: > aeson-0.6.0.2 (reinstall) changes: mtl-2.1.1 -> 2.0.1.0 > persistent-0.9.0.3 (new package) > cabal: The following packages are likely to be broken by the reinstalls: > buildwrapper-0.5.2 >

Re: [Haskell-cafe] HPC question

2012-05-23 Thread Andres Löh
dumping to get at the > instrumented code before the simplifier's had a go at it. For the datatype, your use of field labels causes GHC to generate accessor functions. These aren't covered by your tests. Therefore the datatype shows as not completely covered. HTH, Andres -- Andres L

Re: [Haskell-cafe] Extending constraints

2012-06-05 Thread Andres Löh
a instance (c1 a, c2 a) => Ext c1 c2 a typeOfInnerProxy :: ProxyWrapper (Ext Typeable constraint) -> TypeRep typeOfInnerProxy (ProxyWrapper p) = typeOfArg p This will certainly require all sorts of undecidable instances :) But does it work for you? Cheers, Andres -- Andres Löh, Haskell Con

Re: [Haskell-cafe] Extending constraints

2012-06-05 Thread Andres Löh
peable Num)' and it would work. > then the following would give a type error: > > oops :: TypeRep > oops = typeOfInnerProxy p Yes, and correctly so. Because Typeable isn't even a superclass of Num. So there's no way to know that p actually contains a Typeable proxy.

Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-16 Thread Andres Löh
Hi Chris. [Sorry if I'm slow responding, but I'm at a summer school right now and have relatively little time to follow my email.] > At issue is whether the JustHub Haskell distribution for Enterprise Linux > and > the hub hackage for sandboxing development projects and integrating multiple > GHC

Re: [Haskell-cafe] Again, version conflicting problem with cabal-install

2012-06-19 Thread Andres Löh
Hi. > Hackage A depends on magicloud (any) and container (0.4.0.0), and > hackage magicloud depends on container (any). > Now I've installed magicloud, using container 0.5.0.0. Then I failed > to install A, with any solver. > > So the solvers are using the status that is installed, not the > defin

Re: [Haskell-cafe] cabal doens't forget old dependencies

2012-06-27 Thread Andres Löh
So try "-f-UseExtensions" if you really want that? Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] cabal doens't forget old dependencies

2012-06-27 Thread Andres Löh
;. I see that it lists only some of the dependencies. It's a general phenomenon. I don't understand the way Hackage lists package dependencies. I'd appreciate if it'd actually show the whole conditional tree of dependencies. Cheers, Andres -- Andres Löh, Haskell

Re: [Haskell-cafe] sample terms and interpreting program output from Tc Monad

2012-07-09 Thread Andres Löh
) -> sigma_1 -> c ~> forall c. (forall a. a -> a) -> sigma_1 -> c ~> forall c. (forall a. a -> a) -> (forall b. sigma_1) -> c ~> forall c. (forall a. a -> a) -> (forall b. sigma_0) -> c ~> forall c. (forall a. a -> a) -> (forall b. b) -&g

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-17 Thread Andres Löh
--avoid-reinstalls blindly or as a default flag is also unfortunately not a good idea in general. There are simply too many cases where installing older versions of packages (which is often the only thing that helps) is not really the solution you want. That's also the reason why it's no

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Andres Löh
at using --force-reinstalls on Hackage might be an acceptable option, and it's probably better than using --avoid-reinstalls by default. However, it may still send the misleading message that a package "builds just fine" when it practice it doesn't. C

Re: [Haskell-cafe] Detecting numeric overflows

2012-07-31 Thread Andres Löh
kill any > performance, if needed. There's http://hackage.haskell.org/package/safeint/ It's not implemented quite as efficiently as it theoretically could be, but it might do more or less what you want. Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, htt

Re: [Haskell-cafe] [Haskell] Well-Typed and Skills Matter offer Haskell courses in London in October

2012-09-19 Thread Andres Löh
ence. Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [Haskell] Well-Typed and Skills Matter offer Haskell courses in London in October

2012-09-19 Thread Andres Löh
ink there is or was a Haskell User Group as well, but it's currently listed as "not active" on http://www.haskell.org/haskellwiki/User_groups. Perhaps there's a chance to bring it back to life? Cheers, Andres -- Andres Lö

Re: [Haskell-cafe] Cabal dependencies

2012-10-06 Thread Andres Löh
>>> Do you have any suggestions to install xmobar in this particular case? >> >> In case of executables I usually rm -rf ~/.ghc, cabal install, >> and rm -rf ~/.ghc again. Executables are still here (in ~/.cabal/bin), >> but all libraries are lost. Warning: it may break your development >> environm

Re: [Haskell-cafe] Type-directed functions with data kinds

2012-10-25 Thread Andres Löh
Hi Iavor. > If you don't want to use the class system, you could write `repeat` with a > type like this: > > repeat :: Proxy n -> a -> Vector n a > > (`Proxy` is the singleton family 'data Proxy n = Proxy`). How is the polymorphism becoming any less parametric by using this particular Proxy t

Re: [Haskell-cafe] non-uniform recursive Trie

2012-10-29 Thread Andres Löh
Hi Kazu. > I'm now studying Trie in Okasaki's "Purely Functional Data Structure". > Attached is the program in its appendix. I cannot understand how to > use "empty", "look" and "bind". For instance, if I type 'look "" empty', > I got an error: > >> look "" empty > :2:1: > No instance for (Fin

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Andres Löh
Hi Johan. I haven't looked in detail at the overall problem, but: > Flags chosen: base3=True, base4=True > > Why is Cabal setting both base3 and base4 to True? This looks completely fine to me. The Cabal .cabal file is stating: if flag(base4) { build-depends: base >= 4 } else { build-depends

Re: [Haskell-cafe] Generics & pattern matching

2012-12-06 Thread Andres Löh
f What is anything but None: > rewrite w (K1 x) | w /= None, Just val <- cast x = K1 val > rewrite _ _ = K1 "NIL" Does this help you? (I'm attaching the full code.) Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com GRewrite

Re: [Haskell-cafe] why GHC cannot infer type in this case?

2013-01-31 Thread Andres Löh
iginal "Decl". This works because on the outside, no GADT pattern matches are involved, and within the type class instances, the necessary type information is present. This is certainly harder to understand than your original version. On the other hand, it's

Re: [Haskell-cafe] Why does not zipWith' exist

2013-02-01 Thread Andres Löh
Hi Kazu. I'd be surprised if zipWith' yields significant improvements. In the case of foldl', the strictness affects an internal value (the accumulator). However, in the case of zipWith', you're just forcing the result a bit more, but I guess the "normal" use pattern of fibs is that you want to se

Re: [Haskell-cafe] Why does not zipWith' exist

2013-02-01 Thread Andres Löh
> Well, it took a little bit of persuasion to let GHC not cache the list(s), but > with > > > fibs :: Int -> Integer > fibs k = igo i !! k > where > i | k < 100 = 1 > | otherwise = 2 > igo :: Integer -> [Integer] > igo i = let go = 0 : i : zipWith (+) go (tail go) in go >

Re: [Haskell-cafe] Structured Graphs

2013-02-13 Thread Andres Löh
Hi John. > What are the prospects for Haskell supporting Structured Graphs as defined > here? > http://www.cs.utexas.edu/~wcook/Drafts/2012/graphs.pdf > > Is there an interest by developers of GHC in doing this? Could you be more specific about the kind of "support" you'd expect from GHC? Basical

Re: [Haskell-cafe] generalized, tail-recursive left fold that can finish tne computation prematurely

2013-02-18 Thread Andres Löh
Hi. > while playing with folds and trying to implement `!!` by folding, I came to > the conclusion that: > > - `foldr` is unsuitable because it counts the elements from the end, while > `!!` needs counting from the start (and it's not tail recursive). What is the problem with the following defini

Re: [Haskell-cafe] Haskell is a declarative language? Let's see how easy it is to declare types of things.

2013-04-03 Thread Andres Löh
all" rather than "RankNTypes", which indeed does not enable rank-n types, but only allows you to use the "forall" syntax. Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com ___ Ha

Re: [Haskell-cafe] Derving NFData via Generics from a type that has a vector doesn't work. (was trying to understand out of memory exceptions)

2013-04-16 Thread Andres Löh
tional packages that implement such functionality, though. By using deepseq-generics, you can import Control.DeepSeq.Generics and then define > instance NFData Simple where rnf = genericRnf Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://

Re: [Haskell-cafe] version of containers fixed by template-haskell?

2013-04-17 Thread Andres Löh
>> ghc is installed globally, and local packages should not "break" it. > > still cabal-install says so (and I don't dare to test ...) If you're installing locally or (even better) in a sandbox, then you cannot completely (i.e., irrevocably) break your compiler. You can always remove the package d

Re: [Haskell-cafe] Derving NFData via Generics from a type that has a vector doesn't work. (was trying to understand out of memory exceptions)

2013-04-17 Thread Andres Löh
" So it's there, and even in the current Haskell Platform. Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] GSoC - A Cabal Project

2013-04-30 Thread Andres Löh
e the code easier to understand. (And yes, I would be willing to be mentor for this project.) Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskel

Re: [Haskell-cafe] A use case for *real* existential types

2013-05-10 Thread Andres Löh
in = init $ \ nd0 -> do > wd0 <- addWatch nd0 "foo" > wd1 <- addWatch nd0 "bar" > init $ \ nd1 -> do > wd3 <- addWatch nd1 "baz" > printInotifyDesc nd0 > printInotifyDesc nd1 > rmWatch nd0 wd0 > rmWatch nd1 wd3 > -