Edson | 29 May 2013 09:03
Picon

Lista aprovados Branquinha

Lista aprovados Branquinha:

Querência: AMANDA AZEVEDO DE CASTRO FROTA ARAGAO, LEONARDO ARAUJO DE SOUSA, FRANCISCA NAGIELE SILVA,
PABLO RICHEL SOARES MENDES, JOÃO CARLOS MOREIRA DE CARVALHO, CLOVIS JOSE PINHEIRO PADILHA, MARIA DE
LOURDES CORDEIRO, IZAEL DIAS DA SILVA. SANDRO NEVES DE SILVA, EMYLIA KAROLINE ARARUNA MACEDO, MAYALLE DE
LIMA, JOSELÂNE DOS SANTOS FERREIRA, WANDERLEIYA CICERA SIQUEIRA. Junco do Maranhão.

Branquinha, ANNE KAROLYNE PEREIRA DA SILVA, LUCAS FERREIRA DANTAS, GERLAN LOPES DA COSTA, RAFAELA SOARES
DOS ANJOS, JOÃO CARLOS MOREIRA DE CARVALHO, DENIS BARROS SILVA, MARIA MICAELE ALVES DE MELO, JOEL
FERREIRA MADUREIRA. TAYANE ASSUNÇÃO NEVES, CAMILLA KEILHANY DE SOUSA CAETANO, MAIARA MUSY ARAUJO,
IALE NAIANE MARIANO DOS PASSOS, ROAN CADMUS RODRIGUES DAMASCENO. Cachoeira Dourada. 

Nova Ibiá e ANA CLEIDE PEREIRA DE VASCONCELOS, LUAN MARINHO DE SOUZA, FRANCISCO LEANDRO FIUSA DA SILVA,
PEDRO HENRIQUE ARAUJO SANTIAGO, JOÃO CARLOS MOREIRA DE CARVALHO, DANIEL DA CUNHA MAGALHAES, MARIA
IVANI DE ARAÚJO, JEANNIE PAULO DE SOUSA. SILVANA GALDINO FERREIRA, AUGUSTO BRUNO PEREIRA DOS SANTOS,
LUCIANA ESTELITA LAFAYETTE RABELO, GRACY KELLY DE LIMA MORAIS, REJANE CRISTINA SANTOS DE OLIVEIRA. Itapuranga.
ASE2013 | 28 Feb 2013 16:48
Picon
Favicon

Call for Papers - ASE 2013


                            CALL FOR PAPERS

28th IEEE/ACM International Conference on Automated Software Engineering
                               ASE 2013

                         http://ase2013.org

          November 11th - 15th 2013, Silicon Valley, California

* Conference * Tool Demos * Workshops * Tutorials * Doctoral Symposium *

IMPORTANT DATES

Abstract Submission: May 10, 2013
Paper Submission: May 17, 2013
Notification: July 24, 2013

Tool Demonstration Paper Submission: June 6, 2013
Workshop Proposal Submission: April 26, 2013
Workshop Paper Submission: August 9, 2013
Tutorial Proposal Submission: July 5, 2013
Doctoral Symposium Submission: July 10, 2013

GENERAL THEME

The IEEE/ACM Automated Software Engineering (ASE) Conference series is
the premier research forum for automating software engineering. Each
year, it brings together researchers and practitioners from academia and
industry to discuss foundations, techniques and tools for automating the
(Continue reading)

Jeremy Shaw | 7 Sep 2011 21:50
Gravatar

change in [d| |] and creating instances in template-haskell 2.7

Hello,

I have some code that likes like this, which works in template-haskell  
2.5 / GHC 7.0.3:

---------------
{-# Language TemplateHaskell, TypeFamilies #-}
module Show where

import Language.Haskell.TH

class Bar a where
   bar :: a -> String

inferBar :: Name -> Q [Dec]
inferBar typeName =
   do s <- [d| bar _ = "sucker"
             |]
      d <- instanceD (return []) (appT (conT ''Bar) (conT typeName))  
(map return s)
      return [d]

-----------------

$(inferBar ''Bool)

But, in template-haskell 2.6 / GHC 7.2.1, I get an error,

    Warning: No explicit method nor default method for `bar'
     In the instance declaration for `Bar Bool'
(Continue reading)

Leonel Fonseca | 5 May 2010 10:13
Picon

Is it evil to add "deriving Typeable" to newtype Q?

Hi everybody,

Is it reasonable to add "deriving Typeable" to newtype Q?

In case you wonder why I want to do that, it is because I've constructed a Q [Dec] inside a monad, I want to extract  it from the monad (via runIO) and the monad has constraint "Typeable" over this parameter.

I've also tried to write the Typeable instance in my own module (not Language.Haskell.TH.Syntax). But I've got no luck since the Q type constructor is exported but the data constructor is not.

Thanks.
--

Leonel Fonseca.

_______________________________________________
template-haskell mailing list
template-haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/template-haskell
jonathanGfischoff | 18 Jan 2010 00:42
Picon

Querying the instances a data type implements

Hi,

I am trying query the instances that a data type implements. Calling reify on the data type doesn't appear to return anything relating to type classes.

I am very new to Template Haskell, so I apologize if there is a easy way to do this that I missed.

-Jonathan

_______________________________________________
template-haskell mailing list
template-haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/template-haskell
Lars Kotthoff | 29 Nov 2009 17:27
Picon
Favicon

Generating function implementations from a list of patterns

Hi list,

 I'm trying to generate function implementations given a list of patters to
match the function argument. For example, given

data Foo = Foo Int | Bar Int
foobar (Foo i) = i
foobar (Bar i) = i

The body of the "foobar" function is the same for all the patterns, therefore
I'd like to generate it. In particular, I'd like to be able to write something
like (pseudo-template-haskell)

$(genFunc ''foobar [(''Foo i), (''Bar i)] i)

i.e. have a function genFunc which takes the name of the function to define, the
list of patterns and the function body as arguments. I've played around with the
example for deriving Show on the wiki, but I didn't really get anywhere.

Any pointers how to do this?

Thanks,

Lars
Vitor Rodrigues | 20 Oct 2009 16:48
Picon

Generating arithmetic expressions in TH

Hello,

I am starting using TH to generate lambda expressions representing
arithmetic expressions.
My current problem is to generate code where all the lambda
abstractions are in the top level.
For example,

I would like to have

\x -> 1 + x

instead of

1 + (\x -> x)

My problem is that I  don't know in beforehand if the second operand
is a variable or not.
If so, I would like to build a top level abstraction.

It is this possible?

Regards,
Vitor
Oscar Finnsson | 16 Oct 2009 19:47
Picon
Gravatar

How to extract name and type of exported functions in modules

Hi,

I'm trying to extract the names and types of exported functions in a module.

At the moment I've managed to get a list of all functions in a module
but I can't seem to figure out how to get their types.

Lets say I got the module

    module Foo where

    foo1 :: String -> String
    foo1 value = value

    foo2 = "hej"

and then in anothor module...

    module Bar where

    bar = $(getAllFunctions "<some-path>/Foo.hs")

At the moment I got getAllFunctions returning ["foo1","foo2"], but I
would really like to get it to return [("foo1",AppT (ConT "String")
(ConT "String")), ("foo2",ConT "String")]

Using "parseModuleWithMode" from Language.Haskell.Exts I can get hold
of the names and the type signature of foo1 (since it's specified in
the source code) but I cannot get hold of the type signature of foo2
(since it's not specified in the source code).

Is there another way to get the names/signatures of exported functions
from a module other than using parseModuleWithMode so the developer
writing the Foo-module isn't forced to explicitly supply type
signatures of the exported functions?

If I try "reify" to get information about the functions I get the error message:
"foo1 is not in scope at a reify"

This seems to be a known bug about reify (reported here
http://hackage.haskell.org/trac/ghc/ticket/2339). My problem is that I
cannot use the workaround since I don't know the name of the
functions.

Another disadvantage with this approach is that "getAllFunctions" must
have access to the source code of the module and that I must supply
the path the the module. If possible I would like to have code such as

    bar = $(getAllFunctions "Foo")

instead of "<come-path>/Foo.hs".

Regards,
Oscar Finnsson
Andy Stewart | 8 Sep 2009 09:13
Picon

How to use Template Haskell build Map ?

Hi all,

I have below instances:

       instance PageViewState DiredViewState where
       instance PageViewState StringViewState where

I can use Language.Haskell.Exts.Parser scan above instances got list:

       typeList :: [Type]
       typeList = [TyCon (UnQual (Ident "DiredViewState")),TyCon (UnQual (Ident "StringViewState"))]

So question is how to use Template Haskell and above `typeList` build
below `Map` at compile-time? 

tagmap = M.fromList [(typeIdOf StringViewState, Exists (Dict :: PageViewStateDict StringViewState))
                    ,(typeIdOf DiredViewState, Exists (Dict :: PageViewStateDict DiredViewState))]

Thanks!

  -- Andy
Robin Green | 24 Jun 2009 00:00
Gravatar

ANN: New release of ZeroTH

This announcement will only be of interest to Haskell programmers
using, or thinking of using, Template Haskell.

I am very pleased to announce a new release (2009.6.23.3) of ZeroTH
(also known as zeroth), a tool for preprocessing Haskell code to run
splices and remove Template Haskell dependencies:

 http://hackage.haskell.org/package/zeroth

For example, you could use it to reduce the size of your Haskell
program binaries, if you use Template Haskell. (zeroth now actually
uses itself on itself, for this very purpose, and you can use
the Distribution.ZeroTH module for that in your own cabal projects.)

It's still very much a hack - in that it would probably be more
efficient and clean to implement it as an option to GHC
- but hopefully now at least it's a slightly *better* hack.

Lemmih has kindly agreed to hand over the job of being maintainer
of ZeroTH to me. So please send any patches or complaints my way. The
new darcs repository for the project, which is a darcs 2 repository, is
at:

 http://patch-tag.com/publicrepos/zerothDarcs2

For this release, the "cabal" command-line tool is the only officially
supported means of installation. So you should do something like:

 cabal update
 cabal install zeroth

to install it. To get a summary of command-line options, type:

 zeroth --help

Major changes from previous releases:

* Much more Haskell code is now supported. This is partly because the
  code has been updated to work with the just-released
  haskell-src-exts 1.0.0; and partly because it supports a wider
  variety of Template Haskell code, including code which refers to
  definitions declared in the same source file.

* It is now compulsory to specify any Haskell language extensions you
  are using in the input file, with a LANGUAGE pragma. (For debugging
  purposes, zeroth prints to stderr the result of parsing the LANGUAGE
  pragma, if any. If haskell-src-exts doesn't understand the LANGUAGE
  pragma, this will be Nothing. But that shouldn't happen.)

* Template Haskell imports are now *automatically* stripped by default
  by zeroth, and so cpphs doesn't need to be run if you aren't otherwise
  using CPP.

* New command-line options have been added (see zeroth --help).

* Error messages are now more informative.

* Librification! Almost anything can benefit from being made into a
  library, and zeroth is no exception. Of course, the executable is
  still there.

* You can still use it on certain code which doesn't compile in GHC
  (yes, really, I've tested this!) but you now have to use the
  --only-splices option if you want to do this. Obviously, the splices
  themselves have to compile. --only-splices also makes zeroth faster.

It is very lightly tested, so it might not work for your code out of the
box. Please let me know if you have any problems with it, no matter how
small.

Happy hacking,
--

-- 
Robin
Manuel M T Chakravarty | 26 Mar 2009 11:31
Picon
Picon
Favicon
Gravatar

New TH features in the HEAD

I added some new language features to Template Haskell in the HEAD  
repository:

* type families, including associated types,
* kind annotations,
* INLINE and SPECIALISE pragmas, and
* bang patterns.

Especially, type families were repeatedly requested
<http://hackage.haskell.org/trac/ghc/ticket/1673 
 >.  Please give these extensions a spin and let me know of any  
problems that you may encounter.

Unfortunately, I had to change the Language.Haskell.TH API in a way  
that is not backwards compatible due to the necessary extensions in  
the Language.Haskell.TH.Syntax.  For the moment, this will only affect  
users of the development version, but I expect these changes to be in  
the next stable release, 6.12, too.

Happy Hacking!
Manuel

Gmane