Re: Class op rules

2020-03-06 Thread Conal Elliott
Thank you for raising this issue, Christiaan! The current policy (very early class-op inlining) is a major difficulty and the main source of fragility in my compiling-to-categories implementation. I have a tediously programmed and delicately balanced collection of techniques to intercept and

eqType modulo associated types?

2019-09-15 Thread Conal Elliott
It looks to me like `eqType` accounts for type synonyms but not associated types. Is there a variant that compares modulo associated types, or perhaps a type normalizing operation to apply before `eqType`? Thanks, - Conal ___ ghc-devs mailing list

Re: GHC rewrite rule type-checking failure

2017-10-16 Thread Conal Elliott
nd I’m not sure what >exactly that is. > > > > I’m unlikely to do all of this myself, but I’m happy advise; but without > making a prior commitment to incorporating the result in GHC. We’d have to > see how it goes. > > > > Simon > > > > *From:* conal.ell

Re: GHC rewrite rule type-checking failure

2017-10-12 Thread Conal Elliott
. On Thu, Oct 12, 2017 at 11:07 AM, Conal Elliott <co...@conal.net> wrote: > Thanks for the helpful reply, Simon! > > > > The new bit here is that `$dC'` is not found via matching in the LHS, > but > > > rather by instance resolution from `k`, which does appear expli

Re: GHC rewrite rule type-checking failure

2017-10-12 Thread Conal Elliott
variable t, and > some variable of type (C t) was in scope. Should that work too? > > > > I’m highly dubious. > > > > Happily it sounds as if you are making progress with help from Joachim. > > > > Simon > > > > *From:* conal.elli...@gmail.com [mailto:cona

Re: GHC rewrite rule type-checking failure

2017-10-03 Thread Conal Elliott
all the type and dictionary abstractions written > explicitly… > > > > S > > > > *From:* conal.elli...@gmail.com [mailto:conal.elli...@gmail.com] *On > Behalf Of *Conal Elliott > *Sent:* 03 October 2017 15:56 > *To:* Simon Peyton Jones <simo...@microsoft.com> > >

Spurious recompilations when using a compiler plugin

2017-09-18 Thread Conal Elliott
It appears that use of GHC plugins causes client code to get needlessly recompiled. (See Trac issues 12567 and 7414 .) It’s becoming more of a problem for usability of the plugin

Job opening: compiling to categories

2017-08-05 Thread Conal Elliott
I have a job opening to work closely with me (at Target Digital) on the GHC plugin described in the paper *Compiling to Categories* as well as on applications, including machine learning. I’m especially looking for someone used to working inside of

Re: Repeated computations under a lambda

2017-07-19 Thread Conal Elliott
m...@joachim-breitner.de> wrote: > Hi, > > Am Dienstag, den 18.07.2017, 17:01 -0700 schrieb Conal Elliott: > > Here's the code in question, slightly rephrased: > > > > > exampleC t = \ x -> x + s where s = sin t > > > > I wrote it this way so that `sin t`

Re: Repeated computations under a lambda

2017-07-18 Thread Conal Elliott
2017 at 4:52 PM, David Feuer <da...@well-typed.com> wrote: > On Tuesday, July 18, 2017 3:55:28 PM EDT Conal Elliott wrote: > > Hi Sebastian, > > > > Thanks for the reply. It's that I don't want `exampleC` to be > eta-expanded. > > Apparently GHC does by defau

Re: Repeated computations under a lambda

2017-07-18 Thread Conal Elliott
d with two arguments, so > that no binding of `s` is shared, for example. > Could you maybe post a complete module/expression representative of all > uses of `exampleC`? > > If it's the latter, I'm afraid I can't really help, but surely someone > else can. > > Cheers,

Re: Repeated computations under a lambda

2017-07-18 Thread Conal Elliott
y much for these tips. Regards, - Conal On Tue, Jul 18, 2017 at 3:44 PM, Joachim Breitner <m...@joachim-breitner.de> wrote: > Hi Conal, > > Am Dienstag, den 18.07.2017, 15:35 -0700 schrieb Conal Elliott: > > Thanks very much for this reply, Joachim. I see that `-fno-do-lambda- > &g

Re: Repeated computations under a lambda

2017-07-18 Thread Conal Elliott
Am Dienstag, den 18.07.2017, 08:34 -0700 schrieb Conal Elliott: > > I'm seeing what looks like repeated computation under a lambda with > > `-O` and `-O2`. The following definition: > > > > > exampleC :: Double -> Double -> Double > > > exampleC = \ t ->

Re: How to inline early in a GHC plugin?

2016-12-07 Thread Conal Elliott
:: Id -> Unfolding > > -- Expose the unfolding if there is one, including for loop breakers > > realIdUnfolding id = unfoldingInfo (idInfo id) > > > > > > Does that help? > > > > Simon > > > > > > *From:* conal.elli...@gmail.com [mailt

Re: How to inline early in a GHC plugin?

2016-12-02 Thread Conal Elliott
nfo). Apart from INLINE pragmas, that’s about the only place > it happens. > > > > Does that help? > > > > S > > > > *From:* ghc-devs [mailto:ghc-devs-boun...@haskell.org] *On Behalf Of *Conal > Elliott > *Sent:* 01 December 2016 21:51 > *To

How to inline early in a GHC plugin?

2016-12-01 Thread Conal Elliott
I'm implementing a GHC plugin that installs a `BuiltInRule` that does the work, and I'd like to learn how to inline more flexibly. Given an identifier `v`, I'm using `maybeUnfoldingTemplate (realIdUnfolding v)` to get a `Maybe CoreExpr`. Sometimes this recipe yields `Nothing` until a later

Re: Broken haddock in new GHC HEAD build

2016-04-11 Thread Conal Elliott
Thanks for the reply, Ben. I guess I'm not 100% sure, as I tried a few variations. Next time I rebuild GHC, I'll take care to record my steps and see what happens. - Conal On Thu, Apr 7, 2016 at 1:52 AM, Ben Gamari <b...@well-typed.com> wrote: > Conal Elliott <co...@conal.net>

Broken haddock in new GHC HEAD build

2016-04-06 Thread Conal Elliott
I built GHC HEAD from git yesterday (using GHC 7.10.3 on Mac OS 10.9.5), and the haddock I got dies with bash-3.2$ haddock --version dyld: Symbol not found: _ghc_GHC_modInfoExportszugo_info Referenced from: /Users/conal/git-repos/ghc-2016-04-05/inplace/lib/bin/haddock Expected

Re: Trouble with first GHC patch submission: uncommitted changes

2016-04-06 Thread Conal Elliott
Thanks again, Austin, for all the help in this exchange and on #ghc, leading to https://phabricator.haskell.org/D2088. Looking forward to more GHC involvement. - Conal On Wed, Apr 6, 2016 at 5:21 PM, Austin Seipp <aus...@well-typed.com> wrote: > On Wed, Apr 6, 2016 at 7:11 PM, Conal El

Trouble with first GHC patch submission: uncommitted changes

2016-04-06 Thread Conal Elliott
I'm trying to get through my first GHC patch submission, using git and Phabricator, following directions at https://ghc.haskell.org/trac/ghc/wiki/Phabricator. "git status" shows two unstaged changes: "deleted:test spaces" and "modified: ../libraries/bytestring (modified content)" (in a

Re: "opt_univ fell into a hole"

2016-04-06 Thread Conal Elliott
Thanks! Will do. On Tue, Apr 5, 2016 at 12:55 AM, Richard Eisenberg <e...@cis.upenn.edu> wrote: > No -- that's the one you want. Either wrap your EvBinds in some structure > that you can zonk, or submit a patch exporting zonkEvBinds. :) > > Richard > > On Apr 4, 2016, at

Re: "opt_univ fell into a hole"

2016-04-04 Thread Conal Elliott
if predTy > is an equality constraint, your CtWanted will be ill-formed, as all > equality constraints should have HoleDests, not EvVarDests. Using > TcMType.newWanted will simplify and improve your code. > > I hope this helps, > Richard > > On Apr 4, 2016, at 7:16 PM, Conal Elli

Re: "opt_univ fell into a hole"

2016-04-04 Thread Conal Elliott
It definitely should not do so; see > the notes with that constructor. > > > > Lint checks for this – did you run with –dcore-lint? > > > > Simon > > > > *From:* ghc-devs [mailto:ghc-devs-boun...@haskell.org] *On Behalf Of *Conal > Elliott > *Sent:* 02 Ap

"opt_univ fell into a hole"

2016-04-02 Thread Conal Elliott
I'm getting the following error message from a GHC plugin I'm developing (note GHC version): ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.1.20160307 for x86_64-apple-darwin): opt_univ fell into a hole {aD1S} I don't get this error when compiling without my

Re: GHC HEAD compile failure at ghctags: "missing: Cabal >=1.25 && <1.27"

2016-03-30 Thread Conal Elliott
Oh, yeah. Thanks! - Conal On Wed, Mar 30, 2016 at 10:54 AM, Edward Z. Yang wrote: > Don't forget to "git submodule update" > > Edward > > Excerpts from Conal Elliott's message of 2016-03-30 10:02:20 -0700: > > I'm trying to recompile GHC (via GHC 7.10.3) from freshly git-pulled

GHC HEAD compile failure at ghctags: "missing: Cabal >=1.25 && <1.27"

2016-03-30 Thread Conal Elliott
I'm trying to recompile GHC (via GHC 7.10.3) from freshly git-pulled HEAD, and "make" keeps dying at ghctags: Configuring ghctags-0.1... ghc-cabal: At least the following dependencies are missing: Cabal >=1.25 && <1.27 According to ghc-pkg I have Cabal 1.25.0.0 (compiled from a

Re: lookupRdrNameInModuleForPlugins with constructors

2016-03-23 Thread Conal Elliott
! -- Conal On Wed, Mar 23, 2016 at 1:32 AM, Simon Peyton Jones <simo...@microsoft.com> wrote: > Start with the Class. Use classTyCon to get the TyCon. Use tyConDataCons > to get the data constructor. > > > > Simon > > > > *From:* ghc-devs [mailto:ghc-devs-boun.

Re: lookupRdrNameInModuleForPlugins with constructors

2016-03-22 Thread Conal Elliott
S, which constructs an OccName in the > > varName namespace. You need to construct your RdrName via mkTyVarOcc, > > which picks the Type/Class namespace. > > > > On Tue, Mar 22, 2016 at 5:09 PM, Conal Elliott <co...@conal.net> wrote: > >> I'm try

lookupRdrNameInModuleForPlugins with constructors

2016-03-22 Thread Conal Elliott
I'm trying to construct a dictionary in a GHC plugin. I'm stuck on finding the constructor for the dictionary. When I use `-ddump-simpl` on the module that defines the class, I see "Circat.Rep.C:HasRep". To try finding that constructor, I say > lookupRdrNameInModuleForPlugins hsc_env >

Re: Disappearing case alternative?

2016-03-12 Thread Conal Elliott
simplifier > somehow > figured that `evalP @ (Pair Int) ds` is bottom, and generated an empty > case. > > Is the linter complaining about this case expression? (you can try it using > CoreLint.lintExpr) > > 2016-03-11 16:49 GMT-05:00 Conal Elliott <co...@conal.net>: >

Disappearing case alternative?

2016-03-11 Thread Conal Elliott
I'm working on a GHC plugin, mainly in the form of a "builtin" rewrite rule, and I'm seeing a strange disappearance of a case alternative. With -ddump-rule-rewrites, I can see before & after the disappearance: Here's one rule firing with the alternative present: Rule fired Rule: reify

Re: "token is not a valid binary operator in a preprocessor subexpression" in GHC HEAD build

2016-03-07 Thread Conal Elliott
I installed a newer Xcode, and now GHC HEAD is building fine for me. - Conal On Sun, Mar 6, 2016 at 1:46 PM, Conal Elliott <co...@conal.net> wrote: > I'm trying to build GHC HEAD on Mac OS after a fresh git-pull, and I'm > getting the following: > > libraries/binary/src/

"token is not a valid binary operator in a preprocessor subexpression" in GHC HEAD build

2016-03-06 Thread Conal Elliott
I'm trying to build GHC HEAD on Mac OS after a fresh git-pull, and I'm getting the following: libraries/binary/src/Data/Binary/Put.hs:38:27: error: token is not a valid binary operator in a preprocessor subexpression #if MIN_VERSION_bytestring(0,10,4) Any insights/suggestions?

Re: Adding rules in a plugin?

2016-02-10 Thread Conal Elliott
More study of GHC source code answered my question: when I generate a rule, set ru_auto to False rather than True, so that findExternalRules won't delete the rule. On Tue, Feb 9, 2016 at 6:47 PM, Conal Elliott <co...@conal.net> wrote: > I'm writing a GHC plugin that generates new rules

Adding rules in a plugin?

2016-02-09 Thread Conal Elliott
I'm writing a GHC plugin that generates new rules. The top-level identifier for the new rules' LHSs is always the same and is imported from another module. One of the arguments in the rule's LHSs, however, is defined in that module. I'm creating rules and adding them to the mg_rules of the

Re: Specializing expressions beyond names?

2016-02-03 Thread Conal Elliott
oo.) > > > > But that explanation is fundamentally about named functions, so I don’t > understand this “general expression” bit. Sorry! > > > > Simon > > > > *From:* ghc-devs [mailto:ghc-devs-boun...@haskell.org] *On Behalf Of *Conal > Elliott > *Sent:* 01 February 201

Re: More aggressive dictionary removal?

2016-01-28 Thread Conal Elliott
> > *From:* ghc-devs [mailto:ghc-devs-boun...@haskell.org] *On Behalf Of *Conal > Elliott > *Sent:* 28 January 2016 00:05 > *To:* ghc-devs@haskell.org > *Subject:* More aggressive dictionary removal? > > > > I'm looking for pointers on getting GHC to eliminate more overloading &

More aggressive dictionary removal?

2016-01-27 Thread Conal Elliott
I'm looking for pointers on getting GHC to eliminate more overloading & polymorphism. I think this sort of thing mainly happens in the Specialise module. The default GHC flag settings get me a couple levels of monomorphization and dictionary removal, but I want to go further. I've tried

Re: ghci and unfoldings?

2016-01-18 Thread Conal Elliott
> > Simon > > | -Original Message- > | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of > | Edward Z. Yang > | Sent: 18 January 2016 06:37 > | To: Conal Elliott <co...@conal.net> > | Cc: Andrew Farmer <afar...@ittc.ku.edu>; ghc-devs@h

Re: ghci and unfoldings?

2016-01-18 Thread Conal Elliott
The minimum flags I've found to get ghci to provide unfoldings are -O and -object-code. And it appears that both flags need to be present the first time I load a module into GHCi. (I'm putting the flags in an OPTIONS_GHC pragma.) On Mon, Jan 18, 2016 at 9:46 AM, Conal Elliott <co...@conal.

Re: ghci and unfoldings?

2016-01-17 Thread Conal Elliott
ion clarifies my goals and motivation. I hope > there’s a > > way to access unfoldings from ghci currently or with a small amount of > > effort. > > > > Regards, - Conal > > > > On Sun, Jan 17, 2016 at 7:00 PM, Brandon Allbery <allber...@gmail.com> > &g

Re: ghci and unfoldings?

2016-01-17 Thread Conal Elliott
Oh! I spoke too soon. Yes, that flag does seem to make unfoldings available. Thanks! Now more experimentation. Thanks again! -- Conal On Sun, Jan 17, 2016 at 10:45 PM, Conal Elliott <co...@conal.net> wrote: > Thanks for the suggestion. That flag doesn't appear to help. Still no > un

Plugin from ghci REPL?

2016-01-17 Thread Conal Elliott
Is it possible to have GHC plugins get invoked from the ghci *REPL* (in addition to loaded source modules)? I'm doing some monomorphization-based transformation, and currently I write scads of trivial monomorphic specialization definitions like > sumt6 = sum :: Tree 6 Int -> Int I'd instead love

Re: ghci and unfoldings?

2016-01-17 Thread Conal Elliott
I hope this explanation clarifies my goals and motivation. I hope there’s a way to access unfoldings from ghci currently or with a small amount of effort. Regards, - Conal On Sun, Jan 17, 2016 at 7:00 PM, Brandon Allbery <allber...@gmail.com> wrote: > On Sun, Jan 17, 2016 at 9:40 PM, Co

ghci and unfoldings?

2016-01-17 Thread Conal Elliott
I'm developing a GHC plugin (using HERMIT), and I'd like to use ghci to speed up development. I'm able to do so, except that my plugin critically needs access to unfoldings, which appear to be unavailable in ghci. A little experimenting with ghc shows me that "-O" is the key, but "-O" is

Re: Inlining of methods (dictionary accessors) in GHC 7.10?

2016-01-12 Thread Conal Elliott
, and the supporting HERMIT code is reasonably simple. Cheers, - Conal On Wed, Jan 6, 2016 at 1:25 AM, Simon Peyton Jones <simo...@microsoft.com> wrote: > Quite possibly. Maybe you can give a tiny concrete example? > > > > *From:* ghc-devs [mailto:ghc-devs-boun...@haskell.org] *On Behal

Re: Inlining of methods (dictionary accessors) in GHC 7.10?

2016-01-05 Thread Conal Elliott
Sorry for the editing error. I meant "Did something about change with ...". On Tue, Jan 5, 2016 at 9:38 PM, Conal Elliott <co...@conal.net> wrote: > Did something about change with method inlining between GHC 7.8.2 and > 7.10.3? I don't mean methods attached to instances,

Inlining of methods (dictionary accessors) in GHC 7.10?

2016-01-05 Thread Conal Elliott
Did something about change with method inlining between GHC 7.8.2 and 7.10.3? I don't mean methods attached to instances, but rather the method name itself, which I understand is defined as simple field accessors into a dictionary. I do inlining indirectly via HERMIT, and the method names are no

Re: Pruning GADT case alternatives with uninhabitable coercion parameters

2014-06-24 Thread Conal Elliott
it is given come from HsSyn or Core) it would be easy to give source-localised error messages Simon *From:* Dimitrios Vytiniotis *Sent:* 24 June 2014 11:58 *To:* Simon Peyton Jones; Conal Elliott; ghc-devs@haskell.org *Cc:* Nikolaos S. Papaspyrou (nic...@softlab.ntua.gr); George

Re: Pruning GADT case alternatives with uninhabitable coercion parameters

2014-06-24 Thread Conal Elliott
My first go is at https://github.com/conal/hermit-extras/blob/master/src/HERMIT/Extras.hs#L1030 . It type-checks. I haven't tried running it yet. Comments most welcome! -- Conal On Tue, Jun 24, 2014 at 4:10 PM, Conal Elliott co...@conal.net wrote: I'm glad for the interest and help. I can

Pruning GADT case alternatives with uninhabitable coercion parameters

2014-06-20 Thread Conal Elliott
I'm looking for tips on pruning away impossible branches in `case` expressions on GADTs, due to uninhabited coercion parameter types. Here's a simple example (rendered by HERMIT) from a type-specializion of the Foldable instance a GADT for perfect leaf trees in which the tree depth is part of the

Constructing coercions for associated type?

2014-05-25 Thread Conal Elliott
I'm working on a GHC plugin in which I need to programmatically construct a coercion for an associated type, given the type function name and the type argument. For instance, I have the following class: class Encodable a where type Encode a encode :: a - Encode a decode :: Encode a - a

Re: Constructing coercions for associated type?

2014-05-25 Thread Conal Elliott
. FamInst.tcGetFamInstEnvs may also be helpful. FamInst is in the typecheck/ directory. Richard On May 25, 2014, at 12:42 PM, Conal Elliott co...@conal.net wrote: I'm working on a GHC plugin in which I need to programmatically construct a coercion for an associated type, given the type function name

Re: Simplifying casts and beta-reduction

2014-05-08 Thread Conal Elliott
-07 11:18 PM, Conal Elliott wrote: I'm still sorting through how to optimize these almost-beta-redexes in the form `((\ x - u) | co) v`, shifting coercions to enable beta-reduction (as described in section 3.1 of Evidence normalization). Is it done by `simplCast` (with help from `simplCoercion

Re: Simplifying casts and beta-reduction

2014-05-08 Thread Conal Elliott
] *On Behalf Of *Conal Elliott *Sent:* 08 May 2014 04:19 *To:* Simon Peyton Jones *Cc:* ghc-devs@haskell.org *Subject:* Re: Simplifying casts and beta-reduction I'm still sorting through how to optimize these almost-beta-redexes in the form `((\ x - u) | co) v`, shifting coercions

Re: Simplifying casts and beta-reduction

2014-05-07 Thread Conal Elliott
/ext-f/ http://research.microsoft.com/en-us/um/people/simonpj/papers/ext-f/* I hope that’s useful. Simon *From:* ghc-devs [mailto:ghc-devs-boun...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 07 May 2014 04:50 *To:* ghc-devs@haskell.org *Subject:* Simplifying casts and beta

Re: Simplifying casts and beta-reduction

2014-05-07 Thread Conal Elliott
`simplifyExpr` in `SimplCore`? I think I'm now calling `simplifyExpr` from HERMIT but I'm not getting the cast-shifting I'm looking for. -- Conal On Wed, May 7, 2014 at 1:02 PM, Conal Elliott co...@conal.net wrote: Very useful, indeed! Exactly what I was looking for. Thanks, Simon. Now I've read

Simplifying casts and beta-reduction

2014-05-06 Thread Conal Elliott
I'm looking for tools to help simplify Core terms that involve casts. In particular, I want to beta-reduce when the function is wrapped with a cast. Do the GHC sources have such utility functions? Here is an example of a lambda expression with a cast. In context, it's applied to two type

Re: Simplifying casts and beta-reduction

2014-05-06 Thread Conal Elliott
P.S. Never mind the remark about `(--)`. I inlined and simplified it away in the example code. On Tue, May 6, 2014 at 8:50 PM, Conal Elliott co...@conal.net wrote: I'm looking for tools to help simplify Core terms that involve casts. In particular, I want to beta-reduce when the function

GHC rewrite rules and constructor wrappers?

2014-04-29 Thread Conal Elliott
I'm trying to sort out the relationship of GHC rewrite rules and constructor wrappers. I have rules like reify/(:) reifyEP (:) = kPrim VecSP This rule seems to fire for `reifyEP ($W:)` rather than `reifyEP (:)`. If I'm tracking (uncertain), `($W:)` inlines to `(:)`. Sometimes I'm able to

Re: Help with cast error

2014-04-24 Thread Conal Elliott
...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 24 April 2014 01:29 *To:* glasgow-haskell-us...@haskell.org; ghc-devs@haskell.org; Richard Eisenberg; Simon Peyton Jones *Subject:* Help with cast error I'd appreciate help with a cast-related Core Lint error I'm getting with a GHC plugin I'm

Re: Help with coercion roles?

2014-04-14 Thread Conal Elliott
*From:* Glasgow-haskell-users [mailto:glasgow- haskell-users-boun...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 14 April 2014 06:00 *To:* ghc-devs@haskell.org; glasgow-haskell-us...@haskell.org *Subject:* Help with coercion roles? I’m working on a GHC plugin (as part of my Haskell

Re: Help with coercion roles?

2014-04-14 Thread Conal Elliott
proving `EP (Bool - Bool - Bool - Bool) ~R EP (HasIf Bool)`, but if EP's role is nominal, then this is indeed bogus.) Richard On Apr 14, 2014, at 2:23 PM, Conal Elliott co...@conal.net wrote: Thanks for the pointers! I don't quite know how to get to the form you recommend from the existing

Re: Help with coercion roles?

2014-04-14 Thread Conal Elliott
, I would like to help you with a way forward -- let me know if there's a way I can. Richard On Apr 14, 2014, at 4:12 PM, Conal Elliott co...@conal.net wrote: Hi Richard, I'm working on compiling Haskell to hardware, as outlined at https://github.com/conal/lambda-ccc/blob/master/doc

Help with coercion roles?

2014-04-13 Thread Conal Elliott
I’m working on a GHC plugin (as part of my Haskell-to-hardware work) and running into trouble with coercions roles. Error message from Core Lint: Warning: In the expression: LambdaCCC.Lambda.lamvP# @ (GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool) @ (Simple.HasIf

Re: Finding assembling class dictionaries from GHC plugins?

2013-11-12 Thread Conal Elliott
...@gmail.com [mailto:conal.elli...@gmail.com] *On Behalf Of *Conal Elliott *Sent:* 07 November 2013 18:15 *To:* Simon Peyton-Jones *Cc:* Nicolas Frisby; ghc-devs@haskell.org *Subject:* Re: Finding assembling class dictionaries from GHC plugins? On Wed, Nov 6, 2013 at 11:44 PM, Simon Peyton

Re: Things stopping pure Haskell code from having a cross-platform single semantics?

2013-11-11 Thread Conal Elliott
For a few more such leaks, see http://hackage.haskell.org/package/base-4.6.0.1/docs/System-Info.html , as mentioned in http://conal.net/blog/posts/notions-of-purity-in-haskell . -- Conal On Mon, Nov 11, 2013 at 7:01 AM, Ryan Newton rrnew...@gmail.com wrote: Haskell isn't like Java byte code

Re: Finding assembling class dictionaries from GHC plugins?

2013-11-06 Thread Conal Elliott
...@gmail.com [mailto:conal.elli...@gmail.com] *On Behalf Of *Conal Elliott *Sent:* 05 November 2013 23:41 *To:* Simon Peyton-Jones *Cc:* Nicolas Frisby; ghc-devs@haskell.org *Subject:* Re: Finding assembling class dictionaries from GHC plugins? Hi Simon, Here's some context on what I'm

Re: Finding assembling class dictionaries from GHC plugins?

2013-11-05 Thread Conal Elliott
. There are some new plug-in hooks that fit earlier in the pipeline, which can. Maybe you can use that, and generate a data type decl with “deriving Typeable”? Simon *From:* ghc-devs [mailto:ghc-devs-boun...@haskell.org] *On Behalf Of *Conal Elliott *Sent:* 04 November 2013 20:08 *To:* ghc

Re: Finding assembling class dictionaries from GHC plugins?

2013-11-05 Thread Conal Elliott
*From:* Nicolas Frisby [mailto:nicolas.fri...@gmail.com] *Sent:* 05 November 2013 14:36 *To:* Simon Peyton-Jones *Cc:* ghc-devs@haskell.org; Conal Elliott *Subject:* RE: Finding assembling class dictionaries from GHC plugins? On Nov 5, 2013 3:14 AM, Simon Peyton-Jones simo

Finding assembling class dictionaries from GHC plugins?

2013-11-04 Thread Conal Elliott
I'm working on a GHC plugin (for compiling Haskell to hardware), and I need to synthesize Typeable (and maybe other) class dictionaries for a wide range of types, including composite types (functions, pairs, lists, etc). Can it be done, and how? I think I'm mainly looking for mechanics of finding

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-02 Thread Conal Elliott
again? (I’m guessing that the latter might be hard.) Thanks Simon -Original Message- From: Haskell-Cafe [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Paul Liu Sent: 30 September 2013 07:18 To: Conal Elliott Cc: Haskell Cafe

Module import and use in GHC plugin?

2013-05-29 Thread Conal Elliott
In writing GHC plugins, how can I (a) add a module import (preferably qualified) and (b) make vars/ids for names imported from the newly imported module (to insert in the transformed Core code)? If it's not possible to do what I want, I'd be willing to require an explicit import (say import