On further inspection, the problem is not with TH but with family instances.
That is, suppose Library.hs is has the constructors defined in the simple
top-level style:
```
data EntityField typ where
BlobXVal :: EntityField Int
BlobYVal :: EntityField Int
```
Then when analyzing Client.hs, th
Hi all,
I am stuck on the following problem.
Suppose you have two module
Lib
Client
where Client "imports" Lib. Now, while analyzing the Core of `Client` often
I need to resolve the name of a `TyThing` defined inside `Lib`. Normally,
this is easy enough: I simply use
hscTcRcLookupNam
GHC Users,
I am working on adding proper support for GADTs in Template Haskell. By proper
I mean that GADTs
data constructors will no longer be encoded using H98 data constructors, but
will be represented
explicity.
GADTs allow to declare several constructors with the same signature:
data
ct: Re: Restricted Template Haskell
I would like to figure out how to improve the state of TTH documentation. The
GHC wiki is usually for things that are changing, and the page is written in
that future style, so it makes one wonder if all things are finished or if some
things remain unfinished
skell.html
[2] https://ghc.haskell.org/trac/ghc/wiki/TemplateHaskell/BlogPostChanges
On Mon, Feb 2, 2015 at 11:31 AM, Greg Weber wrote:
> Hi Simon,
>
> I am just starting the proposal: gathering interested parties and pointers
> to related information.
> Thanks for the pointer to
Hi Simon,
I am just starting the proposal: gathering interested parties and pointers
to related information.
Thanks for the pointer to Typed Template Haskell. I was actually unaware of
the extent to which Typed Template Haskell is restricted. I have not seen
any usage of Typed Template Haskell in
More precision please!
Simon
From: Glasgow-haskell-users [mailto:glasgow-haskell-users-boun...@haskell.org]
On Behalf Of Greg Weber
Sent: 30 January 2015 23:39
To: ghc-d...@haskell.org; GHC users
Cc: David Terei; Maxwell Swadling
Subject: Restricted Template Haskell
Hello GHC friends!
I am st
On Fri, Jan 30, 2015 at 7:05 PM, adam vogt wrote:
> Hi Greg,
>
> Perhaps a less-invasive way to implement the -XSafe part of your
> proposal would be to provide a module like:
>
> module Language.Haskell.TH.Safe (
> module Language.Haskell.TH,
> reifyWithoutNameG,
> ) where
> import Languag
But I think that design would be a step in the direction of "harder to
reason about"
Regards,
Adam
On Fri, Jan 30, 2015 at 6:39 PM, Greg Weber wrote:
> Hello GHC friends!
>
> I am starting up a proposal for variants of Template Haskell that restrict
> what operations are
Hello GHC friends!
I am starting up a proposal for variants of Template Haskell that restrict
what operations are available. The goal is to make TH easier for users to
reason about and to allow for an easier compilation story.
Here is the proposal page:
https://ghc.haskell.org/trac/ghc/wiki
On Sat, Jan 24, 2015 at 1:29 PM, John Lato wrote:
> I mean to use a ghc that's been built without dynamic support.
Oh, so if the whole compiler is not dynamic then TH no longer requires
.dyn_o files? Interesting.
I know they've put a lot of work into this and staging is hard, so I
assume there
On 21:23, Fri, Jan 23, 2015 Evan Laforge wrote:
On Sat, Jan 24, 2015 at 2:38 AM, John Lato wrote:
> I agree that mixing template haskell with -prof can be tricky. It's
easier if you turn
> off dynamic linking entirely.
But that's the thing, I do turn of dynamic linking becau
On Sat, Jan 24, 2015 at 2:38 AM, John Lato wrote:
> I agree that mixing template haskell with -prof can be tricky. It's easier
> if you turn
> off dynamic linking entirely.
But that's the thing, I do turn of dynamic linking because I have to
for -prof, but TH
I agree that mixing template haskell with -prof can be tricky. It's easier
if you turn off dynamic linking entirely.
As for multi-line string literals, I also think that an explicit syntax
would be nice. Until then, I usually use:
unlines
[ "Line 1"
, "Li
I ran into trouble compiling template haskell with -prof, and came
across the ghc manual "7.9.4. Using Template Haskell with Profiling".
Unfortunately I can't use its advice directly since I put profiling
and non-profiling .o files into different directories. But in
principle it
Thank you very much everyone. I now have a version of yarr which compiles under
ghc 7.8.3. I have yet to do the conditional compilation hackery to support back
versions but then I can make a release.
What a great community :-)
Dominic Steinitz
domi...@steinitz.org
http://idontgetoutmuch.wordpre
I forgot to mention that `cpphs' can mimick gcc's cpp, with the flag
`-cpp'. In Agda we have
ghc-options: -pgmPcpphs -optP--cpp
Francesco
On 24 December 2014 at 10:50, Francesco Mazzoli wrote:
> You can specify the pre-processor in the `ghc-options' field in the
> cabal file, e.g.
>
>
You can specify the pre-processor in the `ghc-options' field in the
cabal file, e.g.
ghc-options: -pgmPcpphs
Francesco
On 23 December 2014 at 17:14, Brandon Allbery wrote:
> On Tue, Dec 23, 2014 at 11:10 AM, Dominic Steinitz
> wrote:
>>
>> How very clever of you and thank you very much. Ch
On Tue, Dec 23, 2014 at 11:10 AM, Dominic Steinitz
wrote:
> How very clever of you and thank you very much. Changing ‘ to 1 does fix
> the problem.
>
> I would have thought this would work
>
> cabal install --with-gcc=gcc-4.9
>
>
> But sadly I still got the same error.
>
I think that changes the
leFloat#, geFloat#)
> >
> > then the module compiles but of course then the whole package does *not*
> > compile.
> >
> > Did something change in 7.8.3 with regard to CPP (this code has not been
> > modified for at least two years)?
> >
> > Thanks
How very clever of you and thank you very much. Changing ‘ to 1 does fix the
problem.
I would have thought this would work
> cabal install --with-gcc=gcc-4.9
But sadly I still got the same error.
Do I need a special version of cpphs?
Dominic Steinitz
domi...@steinitz.org
http://idontgetoutmuc
On Tue, Dec 23, 2014 at 10:46 AM, Dominic Steinitz
wrote:
> To restate the problem: this is from code that has not been changed for 2
> years. I get
>
> > Examples.hs:42:42: Parse error in pattern: con
> > Failed, modules loaded: none.
>
I think I see the problem. Are you by any chance on a mach
t; Thanks once again.
> >
> > Dominic Steinitz
> > domi...@steinitz.org
> > http://idontgetoutmuch.wordpress.com
> >
> > On 23 Dec 2014, at 13:42, Erik Hesselink wrote:
> >
> >> Hi Dominic,
> >>
> >> It looks like just a representat
>>
>> It looks like just a representation change: a TySynEqn is a data type
>> containing a [Type] and a Type, and those were the original two
>> arguments. So it looks like with a little bit of CPP, you could
>> support both versions. Something like
>>
>
wrote:
> Hello,
>
> we were trying to reify a typeclass, which had a ConstraintKind and we hit
> upon this error: "Can't represent irreducible predicates in Template
> Haskell:".
>
> It seems that there is already a ghc bug [
> https://ghc.haskell.o
Hello,
we were trying to reify a typeclass, which had a ConstraintKind and we hit
upon this error: "Can't represent irreducible predicates in Template
Haskell:".
It seems that there is already a ghc bug [
https://ghc.haskell.org/trac/ghc/ticket/7021 ] filed and its status is se
On October 20, 2014 at 2:35:27 PM, Richard Eisenberg (e...@cis.upenn.edu) wrote:
> Having done so, I'm not 100% convinced that this is the right thing to do. I
> would love feedback
> on my full, concrete proposal available at
> https://ghc.haskell.org/trac/ghc/wiki/Design/TemplateHaskellGADTs
I'm doing a bunch of bug-fixes / improvements to Template Haskell. Two of these
are to fix GHC bugs #8100 (add standalone-deriving support) and #9064 (add
`default` method type signature support), both of which introduce new
constructors for `Dec`. This got me thinking about `Dec` and the
I created a GHC patch that spits out the generated Template Haskell code to
a file with -dump-to-file -ddump-splices
https://ghc.haskell.org/trac/ghc/ticket/9126
On Sat, Jul 5, 2014 at 8:18 PM, adam vogt wrote:
> Zeroth takes the first approach. It only supports a subset of TH
> (DecsQ s
, I was looking into it a little, and template haskell could
> effectively be implemented by a pre-processor and a portable library
> that is compiler independent. If one could get ghc to spit out the
> template haskell source after it expands it then that can be fed to
> jhc as a quick
I'm not sure I correctly understand your approach, but to have the template
haskell reification work without any runtime communication with the
compiler you'd have to include the entire typechecker state, at least for
all names reachable from the splice (see
http://hackage.haskell.o
the result you pass to the compiler.
John
On Sat, Jul 5, 2014 at 1:09 PM, Luite Stegeman wrote:
> How would you do reification with that approach?
>
>
> On Sat, Jul 5, 2014 at 9:59 PM, John Meacham wrote:
>>
>> Actually, I was looking into it a little, an
How would you do reification with that approach?
On Sat, Jul 5, 2014 at 9:59 PM, John Meacham wrote:
> Actually, I was looking into it a little, and template haskell could
> effectively be implemented by a pre-processor and a portable library
> that is compiler independent. If one
Actually, I was looking into it a little, and template haskell could
effectively be implemented by a pre-processor and a portable library
that is compiler independent. If one could get ghc to spit out the
template haskell source after it expands it then that can be fed to
jhc as a quick first pass
On Sat, Jul 5, 2014 at 1:34 PM, Carter Schonwald wrote:
> does JHC support template haskell?
Pretty sure TH is too closely tied to ghc.
--
brandon s allbery kf8nh sine nomine associates
allber...@gmail.com ballb...@sinenomine.
does JHC support template haskell?
On Sat, Jul 5, 2014 at 12:02 PM, Scott Turner <2hask...@pkturner.org> wrote:
> It installed and worked on my Nexus 5.
>
> On 2014-07-04 00:43, Dominick Samperi wrote:
> > Hello John,
> > I tried to install the Haskell demo Cube on my
l
>>>> for it :) (and willing to help on concrete mechanical subtasks)
>>>>
>>>>
>>>> On Wed, Jul 2, 2014 at 12:14 PM, Luite Stegeman
>>>> wrote:
>>>>> hi all,
>>>>>
>>>>> I've adde
t;>
>>>> wow, this is great work!
>>>>
>>>> If theres a clear path to getting the generic tooling into 7.10, i'm all
>>>> for it :) (and willing to help on concrete mechanical subtasks)
>>>>
>>>>
>>>> On Wed, Jul
On Thu, Jul 3, 2014 at 6:18 PM, Simon Peyton Jones
wrote:
> Luite
>
>
>
> I lack the bandwidth to respond at any technical depth, but I’d like to
> make encouraging noises. If you can figure out a way to make GHC do these
> things without making the compiler terribly complicated and making
> ma
great work!
>>>
>>> If theres a clear path to getting the generic tooling into 7.10, i'm all
>>> for it :) (and willing to help on concrete mechanical subtasks)
>>>
>>>
>>> On Wed, Jul 2, 2014 at 12:14 PM, Luite Stegeman
>>> w
> wrote:
>>>
>>> hi all,
>>>
>>> I've added some code [1] [2] to GHCJS to make it run Template Haskell
>>> code on node.js, rather than using the GHC linker. GHCJS has supported TH
>>> for a long time now, but so far always relied on n
subtasks)
>>
>>
>> On Wed, Jul 2, 2014 at 12:14 PM, Luite Stegeman
>> wrote:
>>
>>> hi all,
>>>
>>> I've added some code [1] [2] to GHCJS to make it run Template Haskell
>>> code on node.js, rather than using the GHC linke
Yes! This would definitely be of great interest to users of the
Android cross compilers. It should be quite feasible to drive a TH
runner process on a development device or emulator. Having genuine TH
support would be a huge improvement to the usefulness of GHC in a
cross compiling scenario.
I wou
into 7.10, i'm all
> for it :) (and willing to help on concrete mechanical subtasks)
>
>
> On Wed, Jul 2, 2014 at 12:14 PM, Luite Stegeman
> wrote:
>
>> hi all,
>>
>> I've added some code [1] [2] to GHCJS to make it run Template Haskell
>>
es (packages) as native code,
> which means packages like unix or Win32 show up somewhere, depending on the
> host environment. This also limits our options in choosing JS-specific
> packages.
> - The Template Haskell code runs on the host environment, which might be
> slightly di
hi all,
I've added some code [1] [2] to GHCJS to make it run Template Haskell code
on node.js, rather than using the GHC linker. GHCJS has supported TH for a
long time now, but so far always relied on native (host) code for it. This
is the main reason that GHCJS always builds nativ
On 14-02-18 10:44 PM, Carter Schonwald wrote:
hey Albert, could you open a ticket on ghc Trac about the QuasiQuot thing?
It is now https://ghc.haskell.org/trac/ghc/ticket/8805
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
ht
hey Albert, could you open a ticket on ghc Trac about the QuasiQuot thing?
On Tue, Feb 18, 2014 at 9:48 PM, Albert Y. C. Lai wrote:
> The new dynamism is pretty nice! I even used GHC 7.6.3 to build
> cabal-install 1.18, then played with PATH so that when I said "cabal
> install mtl" it saw GHC
The new dynamism is pretty nice! I even used GHC 7.6.3 to build
cabal-install 1.18, then played with PATH so that when I said "cabal
install mtl" it saw GHC 7.8. It correctly added -dynamic-too and built
both *.a and *.so in one go. This is very user-friendly.
Still, I observed a few oddities.
TemplateHaskell is a
requirement.
Does this clear things up? My last message might give the impression
some things aren't compiled dynamically, because I merely ambiguously
referred to 'packages'.
On Sun, Feb 9, 2014 at 2:37 PM, Austin Seipp wrote:
It is correct that Template Ha
, Feb 9, 2014 at 2:37 PM, Austin Seipp wrote:
> It is correct that Template Haskell now requires dynamic objects.
> However, GHC can produce static and dynamic objects at the same time,
> so you don't have to recompile a package twice (it's a big
> optimization, basically).
&g
Hi,
Am Sonntag, den 09.02.2014, 14:37 -0600 schrieb Austin Seipp:
> There is one caveat, if I remember correctly: if a package uses
> TemplateHaskell, it must declare it as such in the Cabal file. This is
> because Cabal does not parse the source to detect if TemplateHaskell
> is needed in the dep
It is correct that Template Haskell now requires dynamic objects.
However, GHC can produce static and dynamic objects at the same time,
so you don't have to recompile a package twice (it's a big
optimization, basically).
Furthermore, if TemplateHaskell is enabled as a requirement for
Yes, in general I think the doc needs a section: Incompatible changes. The
hope is that you can take the release and just work as usual but when (for
good reasons as in this release) it is not true is is important to have
such a section. Another case that needs to be there is how to compile so
you
Indeed. The problem is that many folks might have cabal config files that
explicitly disable shared. (For the compile times!). They might need
clear information about wiping that field.
On Sunday, February 9, 2014, Brandon Allbery wrote:
> On Sun, Feb 9, 2014 at 9:28 AM, Greg Horn
>
> > wrot
On Sun, Feb 9, 2014 at 9:28 AM, Greg Horn wrote:
> Is --enable-shared off by default?
>
It's supposed to be on by default in 7.8. That said, not sure how many
people have played with ~/.cabal/config
--
brandon s allbery kf8nh sine nomine associates
allber...@gm
t; View this message in context:
> http://haskell.1045720.n5.nabble.com/7-8-1-template-haskell-and-dynamic-libraries-tp5743587p5743628.html
> Sent from the Haskell - Glasgow-haskell-users mailing list archive at
> Nabble.com.
> ___
> Glasgow-has
mpilation will have to be done with dynamic libraries, to avoid having
to do it all a second time when the user tries to use templates.
--
View this message in context:
http://haskell.1045720.n5.nabble.com/7-8-1-template-haskell-and-dynamic-libraries-tp5743587p5743628.html
Sent from the Haskell -
On Sun, Feb 9, 2014 at 10:30 AM, harry wrote:
> Carter Schonwald wrote
> > Yes. (And thence ghc itself is then invoked with dynamic or dynamic-too)
> >
> >> The docs for 7.8.1 say "Template Haskell must now load dynamic object
> >> files,
> >> not
Carter Schonwald wrote
> Yes. (And thence ghc itself is then invoked with dynamic or dynamic-too)
>
>> The docs for 7.8.1 say "Template Haskell must now load dynamic object
>> files,
>> not static ones". Does this mean that, if I'm using Template Haskell,
Yes. (And thence ghc itself is then invoked with dynamic or dynamic-too)
On Saturday, February 8, 2014, harry wrote:
> The docs for 7.8.1 say "Template Haskell must now load dynamic object
> files,
> not static ones". Does this mean that, if I'm using Template Haskel
The docs for 7.8.1 say "Template Haskell must now load dynamic object files,
not static ones". Does this mean that, if I'm using Template Haskell, every
package which the templates depend on have to be built with --enable-shared?
--
View this message in context:
http://has
Diatchki
Sent: 29 January 2013 21:25
To: GHC Users Mailing List; Eric Mertens
Subject: Proposal to extend FieldPat in Template Haskell
Hello,
(sorry for the repost, I forgot to add a subject.)
I was just doing some work with Template Haskell and I noticed that the AST
does not have support for
Hello,
(sorry for the repost, I forgot to add a subject.)
I was just doing some work with Template Haskell and I noticed that the AST
does not have support for record puns and wild-cards. I know that these
could be desugared into ordinary record patterns but I think that it would
be more
On 07/18/2012 07:25 PM, Simon Peyton-Jones wrote:
Folks
Mikhail has improved Template Haskell’s handling of INLINE pragmas,
SPECIALISE pragmas, and RULES. I plan to commit his patch:
http://hackage.haskell.org/trac/ghc/ticket/7064
Will the patch make it to 7.6? I have 6 unpublished libraries t
On 20/07/2012 03:33, Mikhail Vorozhtsov wrote:
Hi Simon.
On Wed, Jul 18, 2012 at 7:25 PM, Simon Peyton-Jones
wrote:
Mikhail has improved Template Haskell’s handling of INLINE pragmas,
SPECIALISE pragmas, and RULES. I plan to commit his patch
BTW, is there a reason why you use commit messages
Hi Simon.
On Wed, Jul 18, 2012 at 7:25 PM, Simon Peyton-Jones
wrote:
> Mikhail has improved Template Haskell’s handling of INLINE pragmas,
> SPECIALISE pragmas, and RULES. I plan to commit his patch
BTW, is there a reason why you use commit messages to attribute other
people's work instead of `g
TH's
> > Type datatype?
> >
> > Also, is the Constraint kind already in TH? If not, this might be a good
> > time to add it too.
> >
> >
> > Cheers,
> > Pedro
> >
> > On Mon, Mar 19, 2012 at 03:09, Richard Eisenberg > <mailt
tuples) in TH's
> Type datatype?
>
> Also, is the Constraint kind already in TH? If not, this might be a good
> time to add it too.
>
>
> Cheers,
> Pedro
>
> On Mon, Mar 19, 2012 at 03:09, Richard Eisenberg <mailto:e...@seas.upenn.edu>> wrote:
>
&
9, 2012 at 03:09, Richard Eisenberg wrote:
> Hi all,
>
> I'm working on bringing Template Haskell up to speed with the new
> extensions for polymorphic kinds and promoted data kinds. This requires a
> few small, non-breaking changes to TH datatypes. I've
Hi all,
I'm working on bringing Template Haskell up to speed with the new
extensions for polymorphic kinds and promoted data kinds. This requires
a few small, non-breaking changes to TH datatypes. I've made a (short)
wiki page at
http://hackage.haskell.org/tra
On 27 January 2012 15:14, Felipe Almeida Lessa wrote:
> On Fri, Jan 27, 2012 at 12:06 PM, Bas van Dijk wrote:
>> $ cabal configure --ghc-options="-O2 -prof -auto-all -caf-all"
>
> Why aren't you using the specific options for profiling?
>
> $ cabal configure --help | grep profiling
> -p --enable
On Fri, Jan 27, 2012 at 12:06 PM, Bas van Dijk wrote:
> $ cabal configure --ghc-options="-O2 -prof -auto-all -caf-all"
Why aren't you using the specific options for profiling?
$ cabal configure --help | grep profiling
-p --enable-library-profiling Enable Library profiling
--disable-libr
Hello,
I would like to profile a cabal package that contains template haskell
code. However I get the following error:
$ cabal configure --ghc-options="-O2 -prof -auto-all -caf-all"
...
$ cabal build
...
Dynamic linking required, but this is a non-standard build (eg. prof).
Y
| Would making a template-haskell-ghc package make sense? Might be
| overkill just for my requirement but there could be other things like
| support for GHC-specific language extensions that might also logically
| belong there.
I don't know -- I don't know what it would look like. By
Would making a template-haskell-ghc package make sense? Might be
overkill just for my requirement but there could be other things like
support for GHC-specific language extensions that might also logically
belong there.
On 16/09/2011 08:21, Simon Peyton-Jones wrote:
> The difficulty here is t
ell.org] On Behalf Of Ganesh Sittampalam
| Sent: 16 September 2011 06:42
| To: GHC users
| Subject: accessing compilation parameters from template haskell
|
| Hi,
|
| It would be useful to access the current compilation parameters or even
| an entire RunGhc monad from inside a Template Haskell spli
Hi,
It would be useful to access the current compilation parameters or even
an entire RunGhc monad from inside a Template Haskell splice. Is there
any way to do this?
The reason I want to do this is I'm using the ghc API at runtime to
dynamically execute code, and I want both the dynami
Ah cool.
I just patched the code so that it uses mkName explicitly for now
since it is Happstack related code and I want it to work the most
places possible.
Thanks!
- jeremy
On Sep 8, 2011, at 12:07 PM, Simon Peyton-Jones wrote:
| Yeah. I would expect this to work:
|
| inferBar2 :: Name
| Yeah. I would expect this to work:
|
| inferBar2 :: Name -> Q [Dec]
| inferBar2 typeName =
|[d| instance Bar $(conT typeName) where
| bar _ = "sucker"
| |]
|
| But I get the same error:
|
| inferBar2 'Bool
|==>
| show-test.hs:4:3-18
| instance Bar Bool
code pretty / easily readable.
But, as you point out, making bar not be a fresh name there creates a
'special case'. So, that is not great either..
When you saw inferBar2, did you find it somewhat 'surprising' that it
didn't work ?
- jeremy
User advice welc
It
would be convenient; but another weirdness too.
User advice welcome!
Simon
| -Original Message-
| From: template-haskell-boun...@haskell.org [mailto:template-haskell-
| boun...@haskell.org] On Behalf Of Jeremy Shaw
| Sent: 07 September 2011 20:50
| To: template-hask...@haskell.org
| Su
Folks
Following lots of feedback from users, especially at ICFP, I've evolved some
proposals for Template Haskell, that should make it both more expressive, and
more secure.
http://hackage.haskell.org/trac/ghc/blog/Template%20Haskell%20Proposal
Do let me know what you think. Discussi
...@haskell.org] On Behalf Of Jonas Almström
Duregård
Sent: 17 September 2010 21:48
To: glasgow-haskell-users@haskell.org
Subject: Template Haskell and linking
Hi GHC users!
Does anyone know if an import that is only used by Template Haskell (i.e. not
in "actual" code) is reflected i
Hi GHC users!
Does anyone know if an import that is only used by Template Haskell (i.e.
not in "actual" code) is reflected in the produced executable?
Example:
import LargeModule(thFunction)
$thfunction
...
Is LargeModule linked in the executable file? (Assume thFunction is not
ref
Dear TH users
In Template Haskell, it's not currently possible to say "give me all the
instances of this class"; it's a long-standing feature request.
Sam Anklesaria has come up with a design and implemented it. Before committing
to it, I want to check that other Templa
efault value. A second advantage is that an unused annotation does
not add any clutter to the code at all -- it can be completely optional.
So in my eyes this feature would be ideal for specifying exceptional
handling of a few data types (or functions or constructors) from
Template Haskell code.
Of c
users@haskell.org
| Subject: Annotations and Template Haskell
|
| Hello,
|
| I'm wondering whether annotations [1] could be made available to
| Template Haskell users as a ghc specific extension.
|
| Would that be feasible? Would it be useful?
|
| An example use would be annotating a t
Hello,
I'm wondering whether annotations [1] could be made available to
Template Haskell users as a ghc specific extension.
Would that be feasible? Would it be useful?
An example use would be annotating a type with a representation of a
default value that could be used in generating inst
On Thu, Feb 4, 2010 at 5:47 AM, Sebastian Fischer
wrote:
>
> On Feb 4, 2010, at 8:58 AM, Simon Peyton-Jones wrote:
>
>> Unless I have a sudden revelation I don't expect to implement pattern
>> splices anytime soon.
>>
>> On the other hand, pattern *quasiquotes* are fine; they are run by the
>> ren
| If I understand Brad correctly, then what he needs is what he called
| pattern quotation rather than splicing.
...
|
| Is there a problem with adding support for pattern brackets on the
| right-hand side of function definitions in order to simplify the
| definition of quasi quoters?
Oh, thank y
On Feb 4, 2010, at 8:58 AM, Simon Peyton-Jones wrote:
Unless I have a sudden revelation I don't expect to implement
pattern splices anytime soon.
On the other hand, pattern *quasiquotes* are fine; they are run by
the renamer before scope analysis is done. So you can certainly say
| My question: Are Template Haskell pattern quotations (i.e., [p| ...
| |]) not implemented in GHC because they are rather tricky to
| implement, or because there has not been demand for them?
They are tricky! The trouble is that patterns *bind variables*. I don't know
how to deal cl
icing. That's my
non-expert take on the issue.
On Wed, Feb 3, 2010 at 7:32 PM, Brad Larsen wrote:
> I'll put my question at the very front of this message, and then give
> the context.
>
> My question: Are Template Haskell pattern quotations (i.e., [p| ...
> |]) not imple
I'll put my question at the very front of this message, and then give
the context.
My question: Are Template Haskell pattern quotations (i.e., [p| ...
|]) not implemented in GHC because they are rather tricky to
implement, or because there has not been demand for them?
And now, the contex
Sorry for posting this on the wrong mailing list.
I added the bug to the tracker here:
http://hackage.haskell.org/trac/ghc/ticket/3845
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgo
] = [t|HNil|]
$ ghc -c THBug1.hs
THBug1.hs:12:61:
GHC internal error: `foldThing' is not in scope during type
checking, but it passed the renamer
tcg_type_env of environment: []
In the expression: foldThing xs
In the Template Haskell quotation
[t| HCons (LVPai
All: as Robert says, I keep meaning to close the template-haskell list
altogether; but I am not sure how to do so.
Jonathan: where did you find a pointer to the mailing list? I should remove
those too.
Returning to the question, sadly there's no way to do what you want right now.
There
| First I thought I would examine the source code of template-haskell
| (more specifically qLocation and qReify) to figure out how to do it
| but got stuck. Obviously I have still much to learn when it comes to
| Haskell.
|
| Could someone explain how Quasi works?
Have you read the paper
| -- If it exports any prelude indentifiers (not only the Prelude itself,
|but also for example Data.List), I have no idea how to get at
|their types --- lookupGlobalName does not find them.
Well, it claims that it should find them. Would you like to make a
reproducible test case and fi
1 - 100 of 167 matches
Mail list logo