I seem to remember finding a package a few days ago that would take Haskell
source with TH, then run and expand the TH macros in-place to produce
equivalent, TH-free Haskell source.
I just went through the Hackage package list and didn't find anything like that.
Did I imagine it? Or can
On Sun, Jul 1, 2012 at 1:56 PM, Eric devnull1...@yahoo.com wrote:
I seem to remember finding a package a few days ago that would take
Haskell source with TH, then run and expand the TH macros in-place to
produce equivalent, TH-free Haskell source.
It is kinda hard to find for some reason
On Sun, Jul 1, 2012 at 8:11 PM, Brandon Allbery allber...@gmail.com wrote:
On Sun, Jul 1, 2012 at 1:56 PM, Eric devnull1...@yahoo.com wrote:
I seem to remember finding a package a few days ago that would take
Haskell source with TH, then run and expand the TH macros in-place to
produce
On 08.08.2011 12:08, Bas van Dijk wrote:
Hello,
Currently it's not possible to use cabal macros like
MIN_VERSION_base(x,y,z) in .hsc files:
http://hackage.haskell.org/trac/hackage/ticket/870
Is there a workaround to get the same effect?
Writing a plain Haskell module that contains the code
Hello,
Currently it's not possible to use cabal macros like
MIN_VERSION_base(x,y,z) in .hsc files:
http://hackage.haskell.org/trac/hackage/ticket/870
Is there a workaround to get the same effect?
Regards,
Bas
___
Haskell-Cafe mailing list
Haskell
Hi all,
I'm going crazy trying to get Alex to do what I want. I have the
following regexp macros:
@octEscape = [0123]? $octdig{1,2}
@hexEscape = 'u' $hexdig{4}
@charEscape = '\\' (@octEscape | @hexEscape | b | t | n | f | r | \ | \')
and the following rules:
\' (. # [\'\\] | @charEscape
Hello Cafe,
I am trying to improve the error reporting in my sendfile library, and I
know I can find out the current file name and line number with something
like this:
{-# LANGUAGE CPP #-}
main = putStrLn (__FILE__ ++ : ++ show __LINE__)
This outputs:
test.hs:2
Unfortunately, if your file is
macros for
package and module when compiling the source?
Any help is appreciated!
For actually making use of such information, see
http://hackage.haskell.org/trac/ghc/wiki/ExplicitCallStack
http://hackage.haskell.org/trac/ghc/wiki/ExplicitCallStack/StackTraceExperience
and also
Matthew Elder wrote:
{-# LANGUAGE CPP #-}
main = putStrLn (__FILE__ ++ : ++ show __LINE__)
This outputs:
test.hs:2
Unfortunately, if your file is in a hierarchy of folders, this flat file
name doesn't give much context. Is there a macro to find out the current
module? IE if I had a
{-# LANGUAGE CPP #-}
main = putStrLn (__FILE__ ++ : ++ show __LINE__)
This outputs:
test.hs:2
if I had a module Foo.Bar.Car.MyModule, I would like to be able to
output something like this on error:
Foo.Bar.Car.MyModule:2
It works for me. If you place that text in Try/Me.hs and call
Malcolm Wallace wrote:
{-# LANGUAGE CPP #-}
main = putStrLn (__FILE__ ++ : ++ show __LINE__)
This outputs:
test.hs:2
if I had a module Foo.Bar.Car.MyModule, I would like to be able to
output something like this on error:
Foo.Bar.Car.MyModule:2
It works for me. If you place that text
Hi all,
Is it possible to expand macros defined in includes into the .hsc file? I'm
trying to call functions from a library written in C. The library can be
used with or without Unicode chars, depending on #define instructions.
The library has macros for all the standard functions used to work
Hi,
I need to use some conditional compilation in MissingH so that it can
work with GHC 6.2, 6.4, and the old/new Hugs libraries.
I found the appropriate macros to test for with ghc, but I can't for
Hugs.
The cpphs-hugs doesn't even define __HUGS__. It seems that only hugs-hc
and ffihugs
We have all the machinery available. See:
http://www.cs.uu.nl/groups/ST/Center/SyntaxMacros
It will be part of the UtrechtHaskellCompiler (UHC), that is being
constructed with our toolset, and which recently strated to produce
running code. You get the syntax macros almost for free if you build
Date: Mon, 7 May 2001 17:48:47 +0200 (CEST)
From: Michal Gajda [EMAIL PROTECTED]
* Introduction of general hygienic macro's as you propose, forces us to
cope with following problems:
1. Full typechecking of macros(in place of definition) seems to need
second-rank polymorphism
2. Macros make the parsed grammar dynamic. Usually compiler has hard-coded
parser generated by LALR parser generator(like Happy or Yacc) compiled in.
Introducing each macro like you proposed would need(I think) generating
new parser(at least for the fragment of the grammar).
Dylan has macros
Keith Wansbrough quotes :
Jerzy Karczmarczuk [EMAIL PROTECTED] writes:
Macros in Scheme are used to unfold n-ary control structures such as COND
into a hierarchy of IFs, etc. Nothing (in principle) to do with laziness
or HO functions.
Isn't this exactly the reason that macros
Simon Marlow wrote:
Well, simply extending the Haskell syntax to allow
\ p11 .. p1n - e1
..
pm1 .. pmn - em
(with appropriate layout) should be ok, but I haven't tried
it. Guarded
right-hand-sides could be allowed too.
Introducing layout after
On Fri, 4 May 2001, Alan Bawden wrote:
(...)
But I think that in many circumstances macros do
such a good job that I don't see the need to clutter up the language with
the special-prupose features needed to replace them.
(...)
I'm currently making fun by writing compiler from eager lambda
heartily at this apt analogy. I have heard
vice grips described as the wrong tool for every job. (My own
experience with vice grips backs this up).
I considered including that well-known quip in the paragraph where I tried
to make it clear that I was -not- saying the same thing about macros
Norman Ramsey writes:
When I compare Lisp and Haskell, the big question in my mind is this:
is lazy evaluation sufficient to make up for the lack of macros?
it might make sense for Haskell to have a facility that makes it
possible for the programmer to define new bits of syntactic sugar
without
On 04-May-2001, Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] wrote:
Jerzy Karczmarczuk [EMAIL PROTECTED] pisze:
In Clean there are macros. They are rather infrequently used...
I think they roughly correspond to inline functions in Haskell.
They are separate in Clean because module
Jerzy Karczmarczuk [EMAIL PROTECTED] writes:
Macros in Scheme are used to unfold n-ary control structures such as COND
into a hierarchy of IFs, etc. Nothing (in principle) to do with laziness
or HO functions.
Isn't this exactly the reason that macros are less necessary in lazy languages
simple instance declarations.
As you can probably guess, I think (3) and (4) are the most profitable
avenues of exploration. And I'm pretty sure I _don't_ want syntax
macros for these. I'm still waiting to be convinced what I do want.
-Jan-Willem Maessen
Eager Haskell project
[EMAIL PROTECTED
24 matches
Mail list logo