[Haskell-cafe] Equality constraint synonyms

2010-11-24 Thread Hugo Pacheco
Dear Haskellers, When programming with type functions, I often find myself with a set of invariants that are frequent in my programs and can be expressed as equality constraints on the context of the functions. I wonder if there is any way in current GHC to express some kind of synonyms for

Re: [Haskell-cafe] Equality constraint synonyms

2010-11-24 Thread Hugo Pacheco
Thank you for the info., I didn't know that it had already been proposed. The constraint families seem definitely useful. hugo On Thu, Nov 25, 2010 at 12:53 PM, Sebastian Fischer fisc...@nii.ac.jpwrote: On Thu, 2010-11-25 at 10:41 +0900, Hugo Pacheco wrote: Would this be a desired feature

Re: [Haskell-cafe] Record updates

2009-03-29 Thread Hugo Pacheco
There is a page for extensible records in the wiki: http://www.haskell.org/haskellwiki/Extensible_record Haskell's records system has many insuficiencies. Some libraries (see grapefruit or HaskellDB) encode records as classes, but although some proposals Haskell still lacks a good implementation

Re: Re[2]: [Haskell-cafe] Sugestion for a Haskell mascot

2009-03-11 Thread Hugo Pacheco
I have previously thought of something like this, when the initial idea for a sloth was suggested: I like the ideia, and could imagine something like this: http://i41.tinypic.com/se65ux.jpg Sorry for the bad drawing and scanning quality. If someone likes the ideia, I'm sure they can do

Re: [Haskell-cafe] ANN: gitit 0.5.1

2009-02-26 Thread Hugo Pacheco
Hi all, Under gitit 0.5.3 I always get Prelude.read: no parse when trying to load a configuration file. My previous file goes attached, but the sample config file from http://github.com/jgm/gitit/tree/master does not work also. Has anything changed that is not documented? Thanks, hugo On Sun,

Re: [Haskell-cafe] ANN: gitit 0.5.1

2009-02-26 Thread Hugo Pacheco
Still nothing. No matter which config file I try (deleting almost every fields, newlines, etc), I always get the no parse error. On Thu, Feb 26, 2009 at 5:47 AM, Robin Green gree...@greenrd.org wrote: On Thu, 26 Feb 2009 14:30:17 + Hugo Pacheco hpach...@gmail.com wrote: Hi all, Under

Re: [Haskell-cafe] ANN: gitit 0.5.1

2009-02-26 Thread Hugo Pacheco
made this file on OSX and forgot to invoke the Format Make Plain Text command, it'll be an RTF file which I'm sure gitit will have no clue about. -Ross On Feb 26, 2009, at 10:21 AM, Hugo Pacheco wrote: Still nothing. No matter which config file I try (deleting almost every fields

[Haskell-cafe] Re: [Haskell] ANN: HLint 1.0

2008-12-20 Thread Hugo Pacheco
((:*:)) type instance Rep Id x = x Cheers, hugo On Sat, Dec 20, 2008 at 10:21 AM, Hugo Pacheco hpach...@gmail.com wrote: I noticed that you convert point-wise into point-free.Perhaps you could add some point-free transformations to remove redundancy in certain cases

[Haskell-cafe] Re: [Haskell] ANN: HLint 1.0

2008-12-20 Thread Hugo Pacheco
On Sat, Dec 20, 2008 at 3:06 PM, Neil Mitchell ndmitch...@gmail.com wrote: Hi I noticed that you convert point-wise into point-free. Perhaps you could add some point-free transformations to remove redundancy in certain cases. Is that a goal of the library? It does some

Re: [Haskell-cafe] Logos of Other Languages

2008-12-19 Thread Hugo Pacheco
I like the ideia, and could imagine something like this: http://i41.tinypic.com/se65ux.jpg Sorry for the bad drawing and scanning quality. If someone likes the ideia, I'm sure they can do much better than me :) hugo On Fri, Dec 19, 2008 at 12:53 PM, Tobias Kräntzer i...@tobias-kraentzer.dewrote:

[Haskell-cafe] Haskell as a religion

2008-12-16 Thread Hugo Pacheco
I just found this on the web. Do you like the description of Haskell? It is not that far from true :P http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html -- www.di.uminho.pt/~hpacheco ___ Haskell-Cafe mailing list

[Haskell-cafe] ANNOUNCE: pointless-haskell 0.0.1

2008-12-06 Thread Hugo Pacheco
Dear Haskelleers, Alcino Cunha and me are pleased to announce the release of the Pointless Haskell library in Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/pointless-haskell Pointless Haskell is library for point-free programming with recursion patterns defined as

Re: [Haskell-cafe] latest Hood ?

2008-12-06 Thread Hugo Pacheco
. observe List Int .concat) [[1,2],[3,4]] I suggest you install the cabal package and try the sample module form the Hood homepage: http://www.haskell.org/hood/downloads/Main.hs Feel free to ask for anything. Cheers, hugo On Sat, Dec 6, 2008 at 9:59 PM, Simon Michael [EMAIL PROTECTED] wrote: Hugo

Re: [Haskell-cafe] Re: latest Hood ?

2008-12-06 Thread Hugo Pacheco
On Sat, Dec 6, 2008 at 11:13 PM, Simon Michael [EMAIL PROTECTED] wrote: Hugo, I thought this Hood stuff is so old, there's no point checking hackage. Silly me! I did cabal update; cabal install GHood on this mac and tried your example: As an example, just import Debug.Observe (the GHood

Re: [Haskell-cafe] Fun with type functions

2008-12-05 Thread Hugo Pacheco
Pointless Haskell a library for point-free programming with recursion patterns that uses type synonym families to provide a view of data types as the fixed points of functors. It defines two type functions type family PF a :: * - * -- returns the pattern functor for a data type type

Re: [Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
changes from 0.9.2 to 0.9.3, so I thought it best not to allow 0.9.2.x, even though it still compiles with a warning.) +++ Hugo Pacheco [Nov 09 08 20:41 ]: a new HAppS version [1]0.9.3.1 has been released, and gitit requires HApps==[2]0.9.2.1. should ti be ok just to relax the dependency

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
yes, I am talking about inserting HTML inside the wiki.Thanks, I will check on that and report back, hugo On Wed, Dec 3, 2008 at 3:44 PM, John MacFarlane [EMAIL PROTECTED] wrote: +++ Hugo Pacheco [Dec 03 08 09:36 ]: Good morning, I wonder if it is possible to embed regular HTML code

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
to be a permissions problem, I gave full permissions to all gitit files and nothing changed. Any idea why? Also being an headache is configuring apache reverse proxy for it: http://haskell.di.uminho.pt/wiki/ hugo On Wed, Dec 3, 2008 at 6:03 PM, Hugo Pacheco [EMAIL PROTECTED] wrote: yes, I am talking about

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
Solved, just something with my Safari cookies, sorry. On Wed, Dec 3, 2008 at 8:40 PM, Hugo Pacheco [EMAIL PROTECTED] wrote: On a different level, I was trying the wiki on my laptop, but have now installed it in a remote server. However, with the same configurations, I can create users

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
think this is some kind of bug with the session state. Regards, hugo On Wed, Dec 3, 2008 at 9:29 PM, Hugo Pacheco [EMAIL PROTECTED] wrote: Solved, just something with my Safari cookies, sorry. On Wed, Dec 3, 2008 at 8:40 PM, Hugo Pacheco [EMAIL PROTECTED] wrote: On a different level, I

Re: [Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
I think that Anatoly was suggestion a bridge between markdown and haddock syntax. Of course gitit would read haddock-documented sources and generate different results than haddock itself (showing highlighted source code is the most significant). Being practical, this is very close to the

[Haskell-cafe] System Fc in GHC

2008-11-21 Thread Hugo Pacheco
Since System Fc is implemented in the latest releases of GHC, is it implemented in Haskell so that I can play with the translator? Can I find it in the ghc sources? Thanks, hugo -- www.di.uminho.pt/~hpacheco ___ Haskell-Cafe mailing list

[Haskell-cafe] GHC 6.10 and scoped variables

2008-11-15 Thread Hugo Pacheco
Hi, When migrating some code with type families to GHC 6.10, I frequently get the same error. The deal is. If I define some type family and instance: *type family Rep (f :: * - *) x :: * data (g :+: h) x= Inl (g x) | Inr (h x) type instance Rep (g :+: h) x = Rep g x `Either` Rep h x* and

[Haskell-cafe] Hackage web interface

2008-11-12 Thread Hugo Pacheco
Hi, When previewing some package via the Hackage web interface, I get the following warning: Exposed modules use unallocated top-level names: AI assume that if you define some module A.B, it expects the top-level name A to be a module. Does this make sense? Thanks, hugo --

[Haskell-cafe] compiling haskell-src-exts in 6.10

2008-11-11 Thread Hugo Pacheco
When installing package haskell-src-exts via cabal install, I get the error Language/Haskell/Exts/Syntax.hs:102:7: Could not find module `Data.Data': it is a member of package base, which is hidden However, when manually installing runhaskell Setup.hs configure/build/install It works

Re: [Haskell-cafe] A video of Frag

2008-11-10 Thread Hugo Pacheco
Yes, I installed it via cabal-install.I am using GHC 6.10.1 now, but it had the same results in 6.6 (if I remember well) before. It may be a Mac issue. On Mon, Nov 10, 2008 at 1:39 PM, Korcan Hussein [EMAIL PROTECTED]wrote: Sorry I have no idea, which version of GHC are you using? did you

Re: [Haskell-cafe] A video of Frag

2008-11-10 Thread Hugo Pacheco
I read on your youtube post that you are planning to write a build-it-yourself tutorial.Perhaps this effort could be targeted at creating a cabal package in Hackage (I do not know the implications of that, just speaking out loud). Cheers, hugo 2008/11/10 Korcan Hussein [EMAIL PROTECTED] I

Re: [Haskell-cafe] GHC 6.10 / Mac OS X / Library problem

2008-11-10 Thread Hugo Pacheco
it is however. the same happened to me.you just need to run cabal install pcre-light --extra-include-dirs=/opt/local/include --extra-lib-dirs=/opt/local/lib My location is /opt/local, since I installed pcre via macports sudo port install pcre Bue I think pcre is installed by default in

[Haskell-cafe] Is there a plan for HappS and ghc-6.10.1?

2008-11-09 Thread Hugo Pacheco
Hi all, The HappS version on Hackage does not yet support ghc 6.10, since GADT pattern matching and the Exception API have changed. One sample error is: src/HAppS/Data/Xml/Base.hs:281:23: GADT pattern match with non-rigid result type `t1' Solution: add a type signature ... Adding a

Re: [Haskell-cafe] Is there a plan for HappS and ghc-6.10.1?

2008-11-09 Thread Hugo Pacheco
yes, 0.9.3 is out and it has compiled ok.thanks :) hugo On Sun, Nov 9, 2008 at 7:58 PM, Don Stewart [EMAIL PROTECTED] wrote: hpacheco: Hi all, The HappS version on Hackage does not yet support ghc 6.10, since GADT pattern matching and the Exception API have changed. One

Re: [Haskell-cafe] ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-11-09 Thread Hugo Pacheco
a new HAppS version 0.9.3.1 has been released, and gitit requires HApps== 0.9.2.1. should ti be ok just to relax the dependency? On Sat, Nov 8, 2008 at 8:32 PM, John MacFarlane [EMAIL PROTECTED] wrote: I've uploaded an early version of gitit, a Haskell wiki program, to HackageDB. Gitit uses

[Haskell-cafe] Examples of Mutually Recursive Types

2008-10-26 Thread Hugo Pacheco
Hi all, I have been searching for examples of Haskell real scenarios that employ mutually recursive datatype definitions. Does anyone know some interesting libraries or structures that I could play with? Thanks, hugo -- www.di.uminho.pt/~hpacheco ___

Re: [Haskell-cafe] Examples of Mutually Recursive Types

2008-10-26 Thread Hugo Pacheco
Probably I overdid the real part.I was thinking of examples such as ASTs (such as the Haskell one), trees and imagining more fancy things, maybe L-systems and fractal processing. I will have a look at the Haskell sources and the previous papers from Tim Sheard. Cheers, hugo On Sun, Oct 26, 2008

Re: [Haskell-cafe] Re: Code.haskell.org down

2008-09-29 Thread Hugo Pacheco
It was down for me as well, right after Neil's message and it has happened before as well.I wonder why the interruptions. hugo On Mon, Sep 29, 2008 at 4:34 PM, Achim Schneider [EMAIL PROTECTED] wrote: Dougal Stanton [EMAIL PROTECTED] wrote: (Seriously though, the above site is a great tool

[Haskell-cafe] Polymorphic QuickCheck arguments

2008-06-17 Thread Hugo Pacheco
Hi all, There is something about polymorphic tests in QuickCheck that I do not understand. If you write the simplest dummy test function tst :: a - Bool tst _ = True and evaluate it we get verboseCheck tst 0: () 1: () ... How come did the polymorphic value a get instanciated to ()? Is this

Re: [Haskell-cafe] Polymorphic QuickCheck arguments

2008-06-17 Thread Hugo Pacheco
instantiated to (). Thanks, hugo On Tue, Jun 17, 2008 at 11:05 AM, Dougal Stanton [EMAIL PROTECTED] wrote: 2008/6/17 Hugo Pacheco [EMAIL PROTECTED]: Hi all, There is something about polymorphic tests in QuickCheck that I do not understand. If you write the simplest dummy test function

Re: [Haskell-cafe] Polymorphic QuickCheck arguments

2008-06-17 Thread Hugo Pacheco
, 2008 at 12:17 PM, Sebastiaan Visser [EMAIL PROTECTED] wrote: On Jun 17, 2008, at 11:53 AM, Hugo Pacheco wrote: Hi all, There is something about polymorphic tests in QuickCheck that I do not understand. If you write the simplest dummy test function tst :: a - Bool tst _ = True

Re: [Haskell-cafe] Call for Contributions - Haskell Communities and Activities Report, May 2008 edition

2008-04-24 Thread Hugo Pacheco
se bem me lembro o 2lt já está neste report, que tal acrescentar uma referência a isto das type families ou n vale a pena? On Thu, Apr 24, 2008 at 3:01 PM, Janis Voigtlaender [EMAIL PROTECTED] wrote: Dear Haskellers, so much has happened in the Haskell world in the past months. Therefore,

[Haskell-cafe] Type Families: infinite compile process?

2008-04-07 Thread Hugo Pacheco
Hi guys, I have been experimenting some weird stuff (risky, yes I know) but the behaviour was certainly not the one I expected: {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-} module Nest where data Nest a = Nil | Cons a (Nest (a,a)) type family F a x :: * type instance F (Nest a)

[Haskell-cafe] Re: Type Families: infinite compile process?

2008-04-07 Thread Hugo Pacheco
, hugo On Mon, Apr 7, 2008 at 10:30 PM, Hugo Pacheco [EMAIL PROTECTED] wrote: Hi guys, I have been experimenting some weird stuff (risky, yes I know) but the behaviour was certainly not the one I expected: {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-} module Nest where data

Re: [Haskell-cafe] Equality constraints in type families

2008-03-30 Thread Hugo Pacheco
On Sun, Mar 30, 2008 at 3:54 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Hugo Pacheco: Yes, but doesn't the confluence problem only occur for type synonyms that ignore one or more of the parameters? If so, this could be checked... You can't check this easily (for the general

Re: [Haskell-cafe] Equality constraints in type families

2008-03-30 Thread Hugo Pacheco
synonyms in type families, otherwise code starts to get dummier in terms of type contexts and context variables. Thanks, hugo On Sun, Mar 30, 2008 at 4:14 AM, Hugo Pacheco [EMAIL PROTECTED] wrote: On Sun, Mar 30, 2008 at 3:54 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Hugo Pacheco

Re: [Haskell-cafe] Equality constraints in type families

2008-03-27 Thread Hugo Pacheco
The current implementation is wrong, as it permits type S a b = a type family F a :: * - * type instance F a = S a Why do we need to forbid this type instance? Because it breaks the confluence of equality constraint normalisation. Here are two diverging normalisations: (1)

Re: [Haskell-cafe] Equality constraints in type families

2008-03-27 Thread Hugo Pacheco
Sorry, I meant type FList a x = Either One (a,x) type instance F [a] = FList a On Thu, Mar 27, 2008 at 4:45 PM, Hugo Pacheco [EMAIL PROTECTED] wrote: The current implementation is wrong, as it permits type S a b = a type family F a :: * - * type instance F a = S a Why do

Re: [Haskell-cafe] Equality constraints in type families

2008-03-27 Thread Hugo Pacheco
2008 22:43 schrieb Wolfgang Jeltsch: Am Mittwoch, 26. März 2008 03:07 schrieb Hugo Pacheco: The extra syntax has its advantages (more local information) and disadvantages (more clutter). We weren't convinced that we need the extra syntax, so left it out for the moment. However

Re: [Haskell-cafe] Equality constraints in type families

2008-03-27 Thread Hugo Pacheco
Yes, but doesn't the confluence problem only occur for type synonyms that ignore one or more of the parameters? If so, this could be checked... On Fri, Mar 28, 2008 at 12:04 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Hugo Pacheco: Sorry, I meant type FList a x = Either One (a,x

[Haskell-cafe] Type synonyms

2008-03-26 Thread Hugo Pacheco
Hi guys, There is something I think not to fully understand: what are the differences between these two type synonyms? type FInt x = Either One x type FInt = Either One Their kind is the same, so do they differ or are exactly the same type? Thanks, hugo

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Hugo Pacheco
The extra syntax has its advantages (more local information) and disadvantages (more clutter). We weren't convinced that we need the extra syntax, so left it out for the moment. However, this is something that can always be changed if experience shows that programs are easier to understand

[Haskell-cafe] Type parameters in type families

2008-03-17 Thread Hugo Pacheco
Hi, I am trying to understand some differences of parameterizing or not some arguments of type families. I have some code such as *type family G a :: * - * instance Functor (G Int) where fmap f (Left ()) = Left () fmap f (Right x) = Right (f x) ggg :: Functor (G a) = G a x - G a x ggg =

[Haskell-cafe] Re: Type parameters in type families

2008-03-17 Thread Hugo Pacheco
I wonder if I am dealing with bugs in the type checker (replying to myself). Curiously if I have class FunctorF d where fmapF :: d - (x - y) - F d x - F d y fff a = fmapF a id it compiles correctly. If I infer the type signature of fff I get fff :: forall d x. (FunctorF d) = d - F d x - F

Re: [Haskell-cafe] Type parameters in type families

2008-03-17 Thread Hugo Pacheco
] wrote: On 3/17/08, Hugo Pacheco [EMAIL PROTECTED] wrote: type family G a :: * - * type instance G Int = Either () -- you forgot this line instance Functor (G Int) where fmap f (Left ()) = Left () fmap f (Right x) = Right (f x) One thing that you don't seem to be clear about

Re: [Haskell-cafe] Bug with GADT in function Patterns?

2008-03-13 Thread Hugo Pacheco
Submited: http://hackage.haskell.org/trac/ghc/ticket/2151#preview hugo ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Equality constraints in type families

2008-03-12 Thread Hugo Pacheco
That's simple Tom. Imagine the factorial function for Int written as a paramorphism: type instance F Int = Either One instance (Mu Int) where inn (Left _) = 0 inn (Right n) = succ n out 0 = Left () out n = Right (pred n) instance Functor (F Int) where fmap _ (Left ()) = Left

[Haskell-cafe] Bug with GADT in function Patterns?

2008-03-12 Thread Hugo Pacheco
Hi guys, I have found a bug on the compiler (at least ghc 6.8.2). For some module (yes, the example does nothing at all): *module Test where data Type a where Func :: Type a - Type b - Type (a - b) PF :: Type a - Type (PF a) data PF a where ID :: PF (a - a) test :: Type a - a - a

Re: [Haskell-cafe] Bug with GADT in function Patterns?

2008-03-12 Thread Hugo Pacheco
Hi have tried with all versions until ghci-6.9.20080303 (from the nightly builds), is that the one? I'm sorry but where in the darcs repo can I find it? I cannot find a ghc-6.9branch. Thanks, hugo ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Equality constraints in type families

2008-03-11 Thread Hugo Pacheco
I know I do not need these constraints, it was just the simplest way I found to explain the problem. I have fought about that: I was not expecting F d c ~ F a (c,a) not mean that F d ~F a /\ c ~(c,a), I thought the whole family was parameterized. If I encoded the family type family F a x :: *

Re: [Haskell-cafe] Equality constraints in type families

2008-03-11 Thread Hugo Pacheco
Yes, I have tried both implementations at the start and solved it by choosing for the following: type family F a :: * - * type FList a x = Either () (a,x) type instance F [a] = FList a instance (Functor (F [a])) where fmap _ (Left _) = Left () fmap f (Right (a,x)) = Right (a,f x) The option was:

[Haskell-cafe] Equality constraints in type families

2008-03-10 Thread Hugo Pacheco
Hi all, I have encoded a type family such that: type family F a :: * - * and a function (I know it is complicated, but I think the problem is self explanatory): hyloPara :: (Functor (F a), Functor (F d), F d a ~ F a (a,a), F d c ~ F a (c,a)) = d - (F d c - c) - (a - F d a) - a - c hyloPara d g

Re: [Haskell-cafe] Small displeasure with associated type synonyms

2008-03-06 Thread Hugo Pacheco
I don't know if this is exactly what you were expecting as a dummy argument, but I solve this kind of issues like this: _L = undefined class C a where type TT a val :: a - TT a instance C () where type TT () = () val _ = () instance (C a, C b) = C (a, b) where type TT (a,b)

Re: [Haskell-cafe] Issues(Bugs?) with GHC Type Families

2008-03-06 Thread Hugo Pacheco
If the equality does not hold, you should get a type error because your program is not type correct. So, what is it that you would like different? I would simply like the compiler not to use that instance if the equality constraint does not hold, like some another instance dependency

Re: [Haskell-cafe] Issues(Bugs?) with GHC Type Families

2008-03-06 Thread Hugo Pacheco
What I said is not true since overlapping instances are not that much decidable. Btw, in previous versions of GHC this worked well, but now I suppose order does not suffices to define instances overlapping How could I compile such an example, assuming that I want to use the instance C String for

Re: [Haskell-cafe] Issues(Bugs?) with GHC Type Families

2008-03-05 Thread Hugo Pacheco
Just something I have been wondering. I would like to implement somehting like: type family F a :: * - * ... class C a b where ... instance (F a ~ F b) = C a b where ... But apparently type equality coercions can not be used as a single context. If I enable -fallow-undecidable-instances,

[Haskell-cafe] Issues(Bugs?) with GHC Type Families

2008-03-03 Thread Hugo Pacheco
Hi all, I have recently tried to replicate some examples from in the articles about type families but found some possible bugs. In [2], the example class C a where type S a (k :: * - *) :: * instance C [a] where type S [a] k = (a,k a) does not compile under the claim that the type

Re: [Haskell-cafe] Template Haskell newbie questions

2007-09-25 Thread Hugo Pacheco
The sel function was just the simpliest example I remembered of. Yes, I would need to generate code at runtime according since the generated code would depend on the function arguments, but have already guessed It wouldn't be possible. Anyway, thanks for the clarification, hugo

Re: Re[2]: [Haskell-cafe] Template Haskell newbie questions

2007-09-25 Thread Hugo Pacheco
hs-plugins does look promising. thanks for the hint, hugo ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Template Haskell newbie questions

2007-09-22 Thread Hugo Pacheco
Hi all, I'm try to write some function in TH that I don't even know if it is possible. Consider the example from the tutorials sel 1 2 = [| \(x,_) - x |] sel 2 2 = [| \(_,x) - x |] If I want to write some function that will dynamically create a selection function according to its arguments

[Haskell-cafe] Fwd: Happy Error

2007-07-17 Thread Hugo Pacheco
I'm forwarding this mail, in case anyone might know about the bug. -- Forwarded message -- From: Hugo Pacheco [EMAIL PROTECTED] Date: Jul 18, 2007 3:45 AM Subject: Happy Error To: [EMAIL PROTECTED] Hi Simon, I'm having what I supose ti be a oarsec internal error when trying

[Haskell-cafe] Re: Happy Error

2007-07-17 Thread Hugo Pacheco
I'm sorry, it turned out to be pretty simples. The error appears when there are references to undefined terminal or non-terminal productions. That's it. Sorry for the messages, at least it might be of some help to someone else. hugo On 7/18/07, Hugo Pacheco [EMAIL PROTECTED] wrote: Hi Simon