Re: Safe Haskell trust

2014-03-17 Thread Daniel Gorín
Hi Fabian, In general, the behavior you get from hint should be more or less the same one you would observe in ghci, the mapping being roughly: loadModules ~~~> :load setImports > :module In ghci, if you have a package installed (and is not hidden in your session), then I believe you can u

Re: A language extension for dealing with Prelude.foldr vs Foldable.foldr and similar dilemmas

2013-05-28 Thread Daniel Gorín
but the proposed extension >> seems complicated to avoid some qualified imports/hidings. If we really want >> people to use Foldable's foldr by default, then make it the default and let >> beginners add a magic line once per file to get simpler types. >> >> Andrew

Re: A language extension for dealing with Prelude.foldr vs Foldable.foldr and similar dilemmas

2013-05-27 Thread Daniel Gorín
Hi Iavor, On May 27, 2013, at 6:18 PM, Iavor Diatchki wrote: > Hello, > > > On Fri, May 24, 2013 at 12:42 AM, Daniel Gorín wrote: > On May 24, 2013, at 9:28 AM, Simon Peyton-Jones wrote: > >> > How about (in Haskell98) >> > >> > mod

Re: A language extension for dealing with Prelude.foldr vs Foldable.foldr and similar dilemmas

2013-05-25 Thread Daniel Gorín
> Simon > | -Original Message- > | From: Daniel Gorín [mailto:dgo...@dc.uba.ar] > | Sent: 24 May 2013 08:42 > | To: Simon Peyton-Jones > | Cc: glasgow-haskell-users@haskell.org > | Subject: Re: A language extension for dealing with Prelude.foldr vs > | Foldable.fold

Re: A language extension for dealing with Prelude.foldr vs Foldable.foldr and similar dilemmas

2013-05-24 Thread Daniel Gorín
lto:glasgow-haskell- > | users-boun...@haskell.org] On Behalf Of Daniel Gorín > | Sent: 24 May 2013 01:27 > | To: glasgow-haskell-users@haskell.org > | Subject: A language extension for dealing with Prelude.foldr vs > Foldable.foldr > | and similar dilemmas > | > |

A language extension for dealing with Prelude.foldr vs Foldable.foldr and similar dilemmas

2013-05-23 Thread Daniel Gorín
Hi all, Given the ongoing discussion in the libraries mailing list on replacing (or removing) list functions in the Prelude in favor of the Foldable / Traversable generalizations, I was wondering if this wouldn't be better handled by a mild (IMO) extension to the module system. In a nutshell,

Re: [Haskell-cafe] ghc-mtl and ghc-7.2.1

2011-09-07 Thread Daniel Gorín
Hi Romildo, you can try the darcs version of ghc-mtl [1], I don't know if that will be enough to build lambdabot, though Best, Daniel [1] http://darcsden.com/jcpetruzza/ghc-mtl On Sep 7, 2011, at 1:34 PM, José Romildo Malaquias wrote: > Hello. > > In order to compile ghc-mtl-1.0.1.0 (the late

problem running ghc-api code in ghci 7.0.x

2011-03-02 Thread Daniel Gorín
Hi I have code using the ghc-api that could be run in interactive mode prior to version 7 but now makes ghci crash with a linker error. Everything works fine if compiled before running. I don't know if this is a known issue or if I'm just using the api in the wrong way, but I thought that I mig

panic parsing a stmt in ghc 7 (possible regression?)

2011-01-31 Thread Daniel Gorín
Hi I'm trying to make the hint library work also with ghc 7 and I'm having problems with some test-cases that are now raising exceptions. I've been able to reduce the problem to a small example. The program below runs ghc in interpreter-mode and attempts to parse an statement using ghc's parseS

Re: [Haskell-cafe] Hint causes GHCi linker error under Windows

2009-12-12 Thread Daniel Gorín
Hi, Martin Do you have a complete example one can use to reproduce this behavior? (preferably a short one! :P) In any case, I'm resending your message to the glasgow-haskell-users list to see if a ghc guru recognize the error message. It is strange that the problem only manifests on Windo

Re: Using the ghc-api to run more than one instance of ghc simultaneously

2009-07-14 Thread Daniel Gorín
On Jul 13, 2009, at 10:53 PM, Marc Weber wrote: Yes, it is a known limitation. It ought to be documented somewhere. There are two problems: 1. GHC is not thread-safe. [...] 2. There is only one RTS linker with a single symbol table. [...] Are there already bug tracker items for these

Using the ghc-api to run more than one instance of ghc simultaneously

2009-07-12 Thread Daniel Gorín
Hi I'm trying to use the GHC API to have several instances of GHC's interpreter loaded simultaneously; each with its own loaded modules, etc. However, this doesn't seem to work well when two instances have loaded modules with the same name. I'm including the code of a small(ish) example o

Re: length of module name affecting performance??

2009-02-09 Thread Daniel Gorín
http://hackage.haskell.org/trac/ghc/ticket/2884 On Feb 9, 2009, at 10:53 AM, Wolfgang Jeltsch wrote: Am Montag, 29. Dezember 2008 12:54 schrieb Simon Peyton-Jones: What a great bug -- I would never have predicted it, but in retrospect it makes perfect sense. Record selectors had better get f

Re: length of module name affecting performance??

2008-12-15 Thread Daniel Gorín
On Dec 15, 2008, at 10:43 PM, Don Stewart wrote: dons: Running time as a function of module name length, http://galois.com/~dons/images/results.png 10 is the magic threshold, where indirections start creeping in. Codegen cost heuristic fail? Given this, could you open a bug ticket for i

length of module name affecting performance??

2008-12-15 Thread Daniel Gorín
Hi While trying to see if I could make some code run faster I stumbled upon something that looks weird to me: 2x-3x performance loss when a module is renamed to a longer name! Here's what I see with the attached examples: #diff long-modname-ver.hs short-modname-ver.hs 2c2 < import VeryLong

Re: GADT Type Checking GHC 6.10 versus older GHC

2008-11-21 Thread Daniel Gorín
On Nov 21, 2008, at 2:04 PM, Jason Dagit wrote: Hello, [...] My understanding was that from 6.6 to 6.8, GADT type checking was refined to fill some gaps in the soundness. Did that happen again between 6.8 and 6.10 or is 6.10 being needlessly strict here? Thanks, Jason typing rules for gad

Re: gadt changes in ghc 6.10

2008-10-15 Thread Daniel Gorín
Hi, Simon Thanks a lot for your mail. It turns out I could have resolved this by myself (with the help of this thread http://thread.gmane.org/gmane.comp.lang.haskell.glasgow.user/15153 , to be honest). What I was missing was this key part: bind :: forall a b t. W t a -> (a -> W t b) -> W_ t

Re: gadt changes in ghc 6.10

2008-10-14 Thread Daniel Gorín
On Oct 14, 2008, at 10:19 PM, Jason Dagit wrote: On Tue, Oct 14, 2008 at 7:27 AM, Daniel Gorín <[EMAIL PROTECTED]> wrote: Hi After installing ghc 6.10-rc, I have a program that no longer compiles. I get the dreaded "GADT pattern match" error, instead :) Here

Re: gadt changes in ghc 6.10

2008-10-14 Thread Daniel Gorín
On Oct 14, 2008, at 7:48 PM, Don Stewart wrote: dgorin: I've tried adding some signatures (together with - XScopedTypeVariables), but with no luck. Why is it that this no longer compiles? More importantly, how can I make it compile again? :) If you work out how to make it compile, can you

gadt changes in ghc 6.10

2008-10-14 Thread Daniel Gorín
Hi After installing ghc 6.10-rc, I have a program that no longer compiles. I get the dreaded "GADT pattern match" error, instead :) Here is a boiled-down example: {-# OPTIONS_GHC -XGADTs -XEmptyDataDecls #-} module T where data S data M data Wit t where S :: Wit S M :: Wit M d

Re: ghci and source files

2008-07-29 Thread Daniel Gorín
On Jul 29, 2008, at 2:43 PM, Johannes Waldmann wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 data Target = Target TargetId (Maybe (StringBuffer,ClockTime)) looks great. How is this intended to be used, i.e. what should happen if there is an "edit/save" event in the IDE? Then the IDE

Re: ghci and source files

2008-07-29 Thread Daniel Gorín
Hi If you just want to compile from (Eclipse) edit buffers instead of source files, I think you can do this with the ghc api. Look at the Target type. The following is pasted from main/HscTypes.lhs -- | A compilation target. -- -- A target may be supplied with the actual text of the -- mod

Re: [Haskell-cafe] hint / ghc api and reloading modules

2008-05-31 Thread Daniel Gorín
(Since this can be of interest to those using the ghc-api I'm cc-ing the ghc users' list.) Hi, Evan The odd behavior you spotted happens only with hint under ghc-6.8. It turns out the problem was in the session initialization. Since ghc-6.8 the newSession function no longer receives a GhcM

Re: Problem with functional dependencies

2007-11-16 Thread Daniel Gorín
Hi, Chris Thanks for your answer. I guess that my intuitions of what functional dependencies and context meant were not very accurate (see below) class C m f n | m -> n, f -> n where c :: m -> f -> Bool The "m->n" functional dependency means that I tell you "C x _ z" is an instance th

Problem with functional dependencies

2007-11-16 Thread Daniel Gorín
Hi I have some code that uses MPTC + FDs + flexible and undecidable instances that was working fine until I did a trivial modification on another part of the project. Now, GHC is complaining with a very confusing (for me, at least) error message. I've been finally able to reproduce the pr

Re: module containing GADTs no longer compiles in ghc 6.8.0

2007-09-27 Thread Daniel Gorín
> but there isn't yet. Would someone like to start one? > > sorry brevity, rushing to get to icfp > > Simon > > | -Original Message- > | From: [EMAIL PROTECTED] > | [mailto:[EMAIL PROTECTED] On Behalf Of Daniel > | Gorín > | Sent: 26 September 2007

module containing GADTs no longer compiles in ghc 6.8.0

2007-09-26 Thread Daniel Gorín
Hi I just tried to compile a project of mine that builds fine using ghc 6.6.1 and got many errors like this: src/HyLo/Formula/NNF.hs:247:48: GADT pattern match in non-rigid context for `Opaque' Tell GHC HQ if you'd like this to unify the context In the pattern: Opaque f' In the