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 wrote:

> On Thu, 2010-11-25 at 10:41 +0900, Hugo Pacheco wrote:
> > Would this be a desired feature for other people?
>
> I'd like to have Haskell Type Constraints Unleashed
>
> http://users.ugent.be/~tschrijv/Research/papers/constraint_families.pdf
>
> which includes equality constraint synonyms.
>
> Sebastian
>
>
>


-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 equality constraints, to avoid a fixed set of constraints for a smaller
expression. The natural way for type classes would be to create a superclass
containing all the desired instances

class (A a, B a) => C a where {}

but as from http://hackage.haskell.org/trac/ghc/ticket/2715, equality
constraints are currently not supported in class contexts, what might be
reasonable.
However, in fact I am just looking for some kind syntactic sugar. Would this
be a desired feature for other people?

Regards,
hugo

-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 for extensible and updatable records.

On Sun, Mar 29, 2009 at 10:41 AM, Andrew Coppin
 wrote:
> Ryan Ingram wrote:
>>
>> Take a look at Data.Accessor on hackage:
>>
>> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/data-accessor
>>
>> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/data-accessor-template
>>
>
> So, to summarise, it provides a datatype to encapsulate a pair of get/set
> functions, some infix sugar for using it, and some TH for autogenerating
> said data. Is that about right?
>
> I'll have a go at trying this later... Thanks.
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 much better than me :)
>
> hugo

On Wed, Mar 11, 2009 at 1:52 PM, Deniz Dogan  wrote:
> 2009/3/11 minh thu :
>> 2009/3/11 Bulat Ziganshin :
>>> Hello Wolfgang,
>>>
>>> Wednesday, March 11, 2009, 1:06:37 PM, you wrote:
>>>
> Hehe, I love it. Sloth is a synonym for Lazyness in English too, and
> they're so freaking cute... :)
>>>
 Same in German: The german “Faultier” means “lazy animal”.
>>>
>>> russian too, if that matter. i was really amazed by this idea.
>>> pure, lazy and fun! :)
>>
>> Same in french : 'paresseux' just means lazy.
>>
>> Thu
>
> In Swedish it translates to "late walker" (?) and in Turkish it's "lazy 
> animal".
>
> Deniz
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: gitit 0.5.1

2009-02-26 Thread Hugo Pacheco
Yes I am.
I just copy/pasted the text from the server where it is plain text, so
that shall not be the problem.

On Thu, Feb 26, 2009 at 3:23 PM, Ross Mellgren  wrote:
> Are you by chance using OSX? The file you attached was not a plain text file
> -- it was an RTF file.
>
> If you 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, newlines, etc), I always get the no parse error.
>>
>> On Thu, Feb 26, 2009 at 5:47 AM, Robin Green  wrote:
>>>
>>> On Thu, 26 Feb 2009 14:30:17 +
>>> Hugo Pacheco  wrote:
>>>
>>>> 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.
>>>
>>> I don't think you can actually do multiplication in the config file, as
>>> the sample config file tries to. Replace 2 * 1024 * 1024 with 200,
>>> and the sample config should work.
>>> --
>>> Robin
>>> ___
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe@haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>
>>
>>
>>
>> --
>> www.di.uminho.pt/~hpacheco
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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  wrote:
> On Thu, 26 Feb 2009 14:30:17 +
> Hugo Pacheco  wrote:
>
>> 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.
>
> I don't think you can actually do multiplication in the config file, as
> the sample config file tries to. Replace 2 * 1024 * 1024 with 200,
> and the sample config should work.
> --
> Robin
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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, Feb 1, 2009 at 5:07 PM, John MacFarlane  wrote:
> I've just uploaded gitit 0.5.1 to HackageDb. Gitit is a wiki program
> that uses git or darcs as a filestore and HAppS as a server.
>
> Changes:
>
> * Major code reorganization, making gitit more modular.
> * Gitit can now optionally be built using Happstack instead of HAppS
>  (just use -fhappstack when cabal installing).
> * Fixed bug with directories that had the same names as pages.
> * Added code from HAppS-Extra to fix cookie parsing problems.
> * New command-line options for --port, --debug.
> * New debug feature prints the date, the raw request, and
>  the processed request data to standard output on each request.
> * Files with ".page" extension can no longer be uploaded.
> * Apostrophes and quotation marks now allowed in page names.
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural

\f0\fs24 \cf0 Config \{\
repositoryPath  = "/var/www/wiki/wikidata",\
userFile= "/var/www/wiki/gitit-users",\
templateFile= "/var/www/wiki/template.html",\
staticDir   = "/var/www/wiki/static",\
tableOfContents = False,\
maxUploadSize   = 10,\
portNumber  = 8080,\
passwordSalt= "l91snthoae8eou2340987",\
debugMode   = True,\
frontPage   = "Front Page",\
noEdit  = ["Help"],\
noDelete= ["Help", "Front Page"],\
accessQuestion  = Nothing\
\}\
}___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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  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 transformations of th at nature, but the idea isn't to
> remove redundancy, its to make the code clearer. Do you have any
> suggestions for things it could easily do to remove redundancy?


There are many simple ones, such as:
f . id -> f
filter true -> id
map id -> id
... etc


> It
> already does a few relating to if expressions.
>

Yes, like map f . map g -> map (f . g)

You can find more in Transformation of Structure-Shy Programs - Applied to
XPath Queries and Strategic
Functions,
page
4.

>
> > a suggestion for a rule: dollar eta: f $ x -> f x
>
> That can easily be added.
>
> > Why not:
> > ("TAG " `isPrefixOf` just_name pinfo)
>
> That's an open bug:
> http://code.google.com/p/ndmitchell/issues/detail?id=109
>
> In general, most of the hints are "replace this with this" -
> evaluating the new bit (even to remove easy constants) is beyond it
> for the moment. Some people theorised it might be too hard,
> non-terminating, or incorrect. As it happens this rule only fires when
> "TAG " is either a string literal or a list literal, and when the
> number is a constant, so its always safe and the guard could always be
> eliminated.
>
> > 1) How does one actually use the CLI tool? You didn't say. It *seems*
> > that one just feeds it a list of random filepaths, so on Mueval, say,
> > the command would be 'hlint main.hs Mueval/*.hs' (and not, say, 'hlint
> > mueval.cabal'). But I'm not actually sure.
>
> The filenames are either filenames, or directories which are
> recursively searched, i.e cd mueval && hlint . is probably sufficient.
> I should document it more clearly in the manual.
>
> Thanks
>
> Neil
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2008-12-20 Thread Hugo Pacheco
Hi again,

I have run HLint against my libraries and found lots of suggestions, mainly
excessive brackets.

This is what I suggest from my experience:
. a suggestion for a rule: dollar eta: f $ x -> f x. some parser errors I
encountered: import Data.Generics hiding ((:*:))
type instance Rep Id x =
x

Cheers,
hugo

On Sat, Dec 20, 2008 at 10:21 AM, Hugo Pacheco  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.
> Is that a goal of the library?
>
> Cheers,
> hugo
>
>
> On Sat, Dec 20, 2008 at 9:55 AM, Neil Mitchell wrote:
>
>> Hi,
>>
>> I am pleased to announce HLint, a tool for making suggestions to
>> improve your Haskell code. Previously this tool was called Dr Haskell
>> and depended on a working installation of Yhc - both of those have now
>> changed. HLint requires GHC 6.10*, and to install simply type:
>>
>> cabal update && cabal install hlint
>>
>> If you haven't yet installed the cabal command, instructions are here:
>> http://ghcmutterings.wordpress.com/2008/11/10/bootstrapping-cabal-install/
>>
>> As an example of what HLint does, running "hlint darcs-2.1.2" over the
>> latest stable release of darcs gives 385 suggestions, including:
>>
>> darcs-2.1.2\src\CommandLine.lhs:46:1: Use a string literal
>> Found:
>>  [' ', '\t', '"', '%']
>> Why not:
>>  " \t\"%"
>>
>> darcs-2.1.2\src\CommandLine.lhs:49:1: Eta reduce
>> Found:
>>  quotedArg ftable
>>= between (char '"') (char '"') $ quoteContent ftable
>> Why not:
>>  quotedArg = between (char '"') (char '"') . quoteContent
>>
>> darcs-2.1.2\src\CommandLine.lhs:94:1: Use concatMap
>> Found:
>>  concat $ map escapeC s
>> Why not:
>>  concatMap escapeC s
>>
>> To see all the hints in a nice interactive document visit
>> http://www-users.cs.york.ac.uk/~ndm/hlint/hlint-report.htm
>> (recommended if you are thinking of trying out hlint)
>>
>> All necessary links, including a manual, hackage links, bug tracker
>> and source code can be found from the tool website:
>> http://www-users.cs.york.ac.uk/~ndm/hlint/
>>
>> Acknowledgements: Niklas Broberg and the haskell-src-exts package have
>> both been very helpful. The darcs users mailing list gave many good
>> suggestions which I've incorportated.
>>
>> Please direct any follow up conversations to haskell-cafe@
>>
>> Thanks
>>
>> Neil
>>
>> * Why GHC 6.10? View patterns.
>> ___
>> Haskell mailing list
>> hask...@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell
>>
>
>
>
> --
> www.di.uminho.pt/~hpacheco
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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
wrote:

>
> Am 19.12.2008 um 11:43 schrieb Paulo Tanimoto:
>
>> * an insect or animal: don't know which one, and I assume that beetle
>> in the new book is trademarked by O'Reilly.  Maybe something like
>> FalconNL's Monica Monad, but a little more serious.
>>
>
>
> Just as an idea: http://en.wikipedia.org/wiki/Sloth
>
> These animals are very lazy and very cool ;-)
>
> . . . Tobias
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 one), run ghci and
>> type
>>
>>  runO $ print $ (length . observe "List Int" .concat) [[1,2],[3,4]]
>>>
>>
> and it fired up the graphical Java applet without any further setup. Very
> nice!
>
> I don't yet know what a hylomorphism is and thought your pointless-haskell
> package might be one of those semi-joke projects, but now I wonder if it's
> something that I'll need in order to use (G)Hood with real-world code.
>

It shouldn't be. Pointless Haskell is for point-free programming and it is
quite arguable if that is real-world Haskell. The main advantage is that it
is easier to reason about programs, that is why it recursion patterns such
as hylomorphisms are fun.
But by no means you need it for using (G)Hood in your applications.


>
> I guess I'll find out. Thank you!


You can always run some of the examples from the Pointless Haskell library
or just have a quick look at
http://haskell.di.uminho.pt/wiki/Pointless+Haskell/Examples.

Cheers,
hugo

>
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] latest Hood ?

2008-12-06 Thread Hugo Pacheco
In fact, Hood is just the module Debug.Observe.GHood just extends
Debug.Observe with some more constructs to handle visualizations, for
instance, it adds a temporal dimension to observations.
This means that you can use the GHood cabal package nonetheless, and be able
to use both GHood graphically or textually (the features of Hood). GHood
gives you both.

Whenever you use runO, it will call the Java applet with the graphical
visualization but still output the textual trace from Hood.

As an example, just import Debug.Observe (the GHood one), run ghci and type

> runO $ print $ (length . 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 Pacheco wrote:
> > The library also features the visualization of the intermediate data
> > structure of hylomorphisms with GHood.
>
> I hadn't come across GHood and Hood before, and they look quite a useful
> addition to the toolbox.
>
> http://www.haskell.org/hood says "The current released version of HOOD is
> the July 2000 release, but there is also a patch to all HOOD to work with
> GHC 5.00.". The Observe.lhs there doesn't immediately work with current GHC.
> Has anyone got an updated version, or is this available in some more recent
> library or package ?
>
> Or, I may have misunderstood, and Debug.Trace may do everything that Hood
> did. Still, a working Hood would be useful to get the nice visualisations of
> GHood.
>
> Thanks - Simon
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 hylomorphisms, inspired in ideas from the PolyP library.
The re-implementation of the library using type functions (in opposition to
classes with functional dependencies) enables a type-level view of data
types as the fixed points of functors and  provides a better experience to
the users in terms of code sanity.
The library also features the visualization of the intermediate data
structure of hylomorphisms with GHood.

I am giving birth to a website with some examples:
http://haskell.di.uminho.pt/wiki/Pointless+Haskell

Any feedback is welcome.

Cheers,
hugo

-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 family Rep (f :: * -> *) x :: *  -- returns the result type of applying
a functor to a type argument

that can be combined to derive the structurally equivalent sum of products
for some type:

type F a x = Rep (PF a) x

class Mu a where
inn :: F a a -> a
out :: a -> F a a

For Haskell polymorphic lists, we need to define:

type instance PF [a] = Const One :+: Const a :*: Id

instance Mu [a] where
inn (Left _) = []
inn (Right (x,xs)) = x:xs
out [] = Left _L
out (x:xs) = Right (x,xs)

Some of the typical recursion patterns are:

hylo :: Functor (PF b) => b -> (F b c -> c) -> (a -> F b a) -> a -> c
cata :: (Mu a,Functor (PF a)) => a -> (F a b -> b) -> a -> b
ana :: (Mu b,Functor (PF b)) => b -> (a -> F b a) -> a -> b

One simple example is the foldr (catamorphism) for calculating the lenght of
a list:

length :: [a] -> Int
length = cata (_L::[a]) f
where f = zero \/ succ . snd

> length [1,2,3,4]
4


I have promoted the library into a cabal package (pointless-haskell) today
and am creating an homepage (
http://haskell.di.uminho.pt/wiki/Pointless+Haskell) with examples.

cheers,
hugo

On Thu, Nov 27, 2008 at 9:29 AM, Simon Peyton-Jones
<[EMAIL PROTECTED]>wrote:

> Friends
>
> GHC has embodied data type families since 6.8, and now type synonym
> families (aka type functions) in 6.10.  However, apart from our initial
> papers there isn't much published material about how to *use* type families.
>  But that hasn't stopped you: quite a few people are using them already, and
> of course there is a rich seam of work on using functional dependencies to
> express type-level computation.
>
> Ken Shan and Oleg Kiselyov and I are collaborating to write a paper for an
> upcoming workshop, under the general rubric of "Fun with type functions" (in
> homage to Thomas Hallgren's paper "Fun with functional dependencies" and
> Ralf Hinze's paper "Fun with phantom types").
>
> So this message is to ask you:
>
>can you tell us about the most persuasive, fun application
>you've encountered, for type families or functional dependencies?
>
> Simple is good.  It doesn't have to be elaborate: just something that does
> something useful you could not have done otherwise.  Pointers to email
> threads are fine.  Don't assume we already know about them (even if we
> participated in the thread :-)  Part of what we're interested in is that
> *you* found the example compelling.
>
> Many thanks
>
> Simon, Ken, Oleg
>
> PS: I'm broadcasting this message to GHC-users and Haskell-cafe, but to
> avoid deluging ghc-users, please reply just to us and Haskell cafe.
>  (Interested ghc-users can follow the threads there from the archives if
> they want.)
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 markdownish literate haskell you
are suggesting.

hugo

On Thu, Dec 4, 2008 at 1:54 AM, John MacFarlane <[EMAIL PROTECTED]> wrote:

> +++ Anatoly Yakovenko [Dec 03 08 17:03 ]:
> > This is pretty cool.  I was wondering how much work would it be for
> > gitit to be able to use markdown from the comment sections in source
> > files?  It would be a really good way to manage documentation.
> >
> > Basically I would like to be able to point gitit at an existing git
> > repo, and have it provide a wiki interface to all the documentation so
> > developers can view and modify it.
>
> You can do something like that now. You can specify the repository
> directory in a configuration file. Anything in the repository (even
> in subdirectories) with a ".page" extension will be served up as a
> wiki page. So you'd have to use a ".page" extension for your markdown
> documentation. Everything else in the repository will appear in the
> index. Source code files will be automatically syntax-highlighted, and
> you can even view history and diffs through the wiki interface.
>
> But I guess what you want is for the documentation to be in comments
> in the source files themselves, not in separate files.  I'm not sure
> how to do that -- would the idea be to show just the documentation,
> perhaps marked off with some special notation, and not the source?
> But then we lose a nice feature, the ability to view source files.
> I'm open to ideas.
>
> Soon, gitit will contain support for pages in markdownish literate
> Haskell, which might be the best of both worlds for Haskell projects.
> (They'd still need the .page extension, since some .lhs files are
> LaTeX lhs, but one could use hard links, or there could be a
> configuration option to treat .lhs files as wiki pages.)
>
> John
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2008-12-03 Thread Hugo Pacheco
Hmm, I think I finally see the real problem.
At some point when logged in, the session expires and the wiki prompts again
for the login information. However, the cookies still assume we are logged
in and do not allow me to log in again.

The solution is to remove the cookies for the wiki server.
I 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 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 but not log in,
>> it simply returns to the front page. It is hosted at
>> http://haskell.di.uminho.pt:8080
>>
>> It does not seem 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 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 inside gitit
>>>> (on
>>>> >0.3.2) pages, such as java applets like the following.
>>>> >>>> HEIGHT =
>>>> >400 ALT = "you should see an instance of GHood here, as an applet">
>>>> >>> >NAME = "eventSource" VALUE ="factHylo.log"> >>> VALUE
>>>> >="150">  
>>>> >I am assuming that as a wiki, it is only possible to point to
>>>> external
>>>> >pages.
>>>> >Thanks,
>>>> >hugo
>>>>
>>>> Of course you can put any HTML you like in the page template
>>>> (template.html).  But I assume you are asking about HTML inside the wiki
>>>> pages themselves. Although markdown allows embedded HTML, gitit uses
>>>> pandoc's
>>>> HTML sanitization feature, so things that might be dangerous (like
>>>> applets) will be filtered out and replaced by comments.
>>>>
>>>> You could easily modify the code to remove the santitization feature.
>>>> Just change the textToPandoc function so that stateSanitizeHtml is set
>>>> to
>>>> False.
>>>>
>>>> John
>>>>
>>>>
>>>
>>>
>>> --
>>> www.di.uminho.pt/~hpacheco
>>>
>>
>>
>>
>> --
>> www.di.uminho.pt/~hpacheco
>>
>
>
>
> --
> www.di.uminho.pt/~hpacheco
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 but not log in,
> it simply returns to the front page. It is hosted at
> http://haskell.di.uminho.pt:8080
>
> It does not seem 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 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 inside gitit
>>> (on
>>> >0.3.2) pages, such as java applets like the following.
>>> >>> HEIGHT =
>>> >400 ALT = "you should see an instance of GHood here, as an applet">
>>> >> >NAME = "eventSource" VALUE ="factHylo.log"> >> VALUE
>>> >="150">  
>>> >I am assuming that as a wiki, it is only possible to point to
>>> external
>>> >pages.
>>> >Thanks,
>>> >hugo
>>>
>>> Of course you can put any HTML you like in the page template
>>> (template.html).  But I assume you are asking about HTML inside the wiki
>>> pages themselves. Although markdown allows embedded HTML, gitit uses
>>> pandoc's
>>> HTML sanitization feature, so things that might be dangerous (like
>>> applets) will be filtered out and replaced by comments.
>>>
>>> You could easily modify the code to remove the santitization feature.
>>> Just change the textToPandoc function so that stateSanitizeHtml is set to
>>> False.
>>>
>>> John
>>>
>>>
>>
>>
>> --
>> www.di.uminho.pt/~hpacheco
>>
>
>
>
> --
> www.di.uminho.pt/~hpacheco
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2008-12-03 Thread Hugo Pacheco
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 but not log in, it
simply returns to the front page. It is hosted at
http://haskell.di.uminho.pt:8080

It does not seem 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 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 inside gitit
>> (on
>> >0.3.2) pages, such as java applets like the following.
>> >> HEIGHT =
>> >400 ALT = "you should see an instance of GHood here, as an applet">
>> > >NAME = "eventSource" VALUE ="factHylo.log"> > VALUE
>> >="150">  
>> >I am assuming that as a wiki, it is only possible to point to
>> external
>> >pages.
>> >Thanks,
>> >hugo
>>
>> Of course you can put any HTML you like in the page template
>> (template.html).  But I assume you are asking about HTML inside the wiki
>> pages themselves. Although markdown allows embedded HTML, gitit uses
>> pandoc's
>> HTML sanitization feature, so things that might be dangerous (like
>> applets) will be filtered out and replaced by comments.
>>
>> You could easily modify the code to remove the santitization feature.
>> Just change the textToPandoc function so that stateSanitizeHtml is set to
>> False.
>>
>> John
>>
>>
>
>
> --
> www.di.uminho.pt/~hpacheco
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 inside gitit (on
> >0.3.2) pages, such as java applets like the following.
> > =
> >400 ALT = "you should see an instance of GHood here, as an applet">
>  >NAME = "eventSource" VALUE ="factHylo.log">  VALUE
> >="150">  
> >I am assuming that as a wiki, it is only possible to point to external
> >pages.
> >Thanks,
> >hugo
>
> Of course you can put any HTML you like in the page template
> (template.html).  But I assume you are asking about HTML inside the wiki
> pages themselves. Although markdown allows embedded HTML, gitit uses
> pandoc's
> HTML sanitization feature, so things that might be dangerous (like
> applets) will be filtered out and replaced by comments.
>
> You could easily modify the code to remove the santitization feature.
> Just change the textToPandoc function so that stateSanitizeHtml is set to
> False.
>
> John
>
>


-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2008-12-03 Thread Hugo Pacheco
Good morning,
I wonder if it is possible to embed regular HTML code inside gitit (on
0.3.2) pages, such as java applets like the following.

  
 

I am assuming that as a wiki, it is only possible to point to external
pages.

Thanks,
hugo


On Sun, Nov 9, 2008 at 10:01 PM, Chris Eidhof <[EMAIL PROTECTED]> wrote:

> If anyone else has problems installing gitit, try updating your
> cabal-install (and cabal). I had "old" versions on my computer, and updating
> them solved my gitit build-problems.
>
> -chris
>
>
> On 9 nov 2008, at 22:41, John MacFarlane wrote:
>
>  I've just uploaded a new version (0.2.1) that requires HAppS >= 0.9.3 &&
>> < 0.9.4. (There are small API 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?
>>>
>>>  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 HAppS as a webserver, git for file storage,
>>>pandoc for rendering the (markdown) pages, and highlighting-kate for
>>>highlighted source code.
>>>
>>>Some nice features of gitit:
>>>
>>> - Pages and uploaded files are stored in a git repository and may
>>>   be added, deleted, and modified directly using git.
>>> - Pages may be organized into subdirectories.
>>> - Pandoc's extended version of markdown is used, so you can do
>>> tables,
>>>   footnotes, syntax-highlighted code blocks, and LaTeX math. (And
>>>   you can you pandoc to convert pages into many other formats.)
>>> - Math is rendered using jsMath (which must be installed
>>>   separately).
>>> - Source code files in the repository are automatically rendered with
>>>   syntax highlighting (plain/text version is also available).
>>>
>>>You can check it out on my webserver: [4]
>>> http://johnmacfarlane.net:5001/
>>>Or try it locally:
>>>
>>>   cabal update
>>>   cabal install pandoc -fhighlighting
>>>   cabal install gitit
>>>   gitit  # note: this will create two subdirectories in the working
>>>directory
>>>   # then browse to [5]http://localhost:5001.
>>>
>>>There's a git repository at [6]
>>> http://github.com/jgm/gitit/tree/master.
>>>Comments and patches are welcome.
>>>
>>>John
>>>___
>>>Haskell-Cafe mailing list
>>>[EMAIL PROTECTED]
>>>[8]http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>
>>>  --
>>>  [9]www.di.uminho.pt/~hpacheco
>>>
>>> References
>>>
>>>  Visible links
>>>  1. http://0.9.3.1/
>>>  2. http://0.9.2.1/
>>>  3. mailto:[EMAIL PROTECTED]
>>>  4. http://johnmacfarlane.net:5001/
>>>  5. http://localhost:5001/
>>>  6. http://github.com/jgm/gitit/tree/master
>>>  7. mailto:Haskell-Cafe@haskell.org
>>>  8. http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>  9. http://www.di.uminho.pt/~hpacheco
>>>
>>
>>  ___
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe@haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>
>>
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 then define a function that has a scoped argument:

*test :: Rep (g :+: h) x -> y
test (Left x :: Rep (g :+: h) x) = undefined*

I get the error:

* Pattern signature must exactly match: Rep (g :+: h) x
In the pattern: Left x :: Rep (g :+: h) x
In the definition of `test':
test (Left x :: Rep (g :+: h) x) = undefined*

Is this error expected? At least the error message is not clear...

Interestingly, when experimenting with a different functor, I get the
impossible:
*
newtype Const t x   = Const {unConst :: t}
type instance Rep (Const t) x = t**

**test2 :: Rep (Const t) x -> y
test2 x = undefined*

*ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.1 for i386-unknown-linux):
readFilledBox x{tv aoB} [box]
Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
> *

Sorry for the extensiveness. Thanks,
hugo

-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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

-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 fine
Somehow package base is not available in cabal.. don't know why.

hugo

-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell source packages in Hackage

2008-11-10 Thread Hugo Pacheco
Hi guys,
I am having an hard time installing the haskell-src and haskell-src-exts
packages, since both seem to have problems with happy.
I have installed happy 1.18.2 successfully, but it does not seem to be
visible (although the happy executable is in my path).

I get the errors:

$ cabal install haskell-src
Resolving dependencies...
'haskell-src-1.0.1.3' is cached.
Configuring haskell-src-1.0.1.3...
Preprocessing library haskell-src-1.0.1.3...
cabal: The program happy is required but it could not be found
cabal: Error: some packages failed to install:
haskell-src-1.0.1.3 failed during the building phase. The exception was:
exit: ExitFailure 1


$ cabal install haskell-src-exts
Resolving dependencies...
'haskell-src-exts-0.3.9' is cached.
Configuring haskell-src-exts-0.3.9...
cabal: happy version >=1.17 is required but it could not be found.
cabal: Error: some packages failed to install:
haskell-src-exts-0.3.9 failed during the configure step. The exception was:
exit: ExitFailure 1

Is this some kind of bug in cabal, or in the packages themselves?

Thanks,
hugo

-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

/Developer/SDKs/MacOSX10.5.sdk/usr/

Just check it out and report back.

Good luck,
hugo

On Mon, Nov 10, 2008 at 10:12 PM, Don Stewart <[EMAIL PROTECTED]> wrote:

> pieter:
> > Hello,
> >
> > I've got a problem when I want to install pcre-light on OS X, with the
> > latest version of GHC (binary package from haskell.org).
> >
> > It is not clear to me which flags to pass to ghc, to tell it to look
> > at /opt/local/include for the pcre-light.h header.
> >
>
> Looks like pcre.h (the libpcre C library ) isn't installed.
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 try
>> using cabal-install? (
>> http://hackage.haskell.org/trac/hackage/wiki/CabalInstall)
>>
>> --
>> Date: Mon, 10 Nov 2008 10:46:45 +
>>
>> From: [EMAIL PROTECTED]
>> To: [EMAIL PROTECTED]
>> Subject: Re: [Haskell-cafe] A video of Frag
>>
>> Oh, sorry I haven't noticed.Trying to compile in my OS X machine, all
>> compiles ok via cabal, but then I get
>>
>> $ ./frag ../share/frag-1.1.2/leveleg
>> Bus error
>>
>> I remember compiling frag 1/2 years ago and getting the same result.
>> It is not windows, but do you have any hint?
>>
>> On Mon, Nov 10, 2008 at 10:12 AM, Korcan Hussein <[EMAIL PROTECTED]>wrote:
>>
>>  Actually such a package already exists, it's quite a simple procedure as
>> long as you have the right tools and and setup but for windows  platform
>> this information is a bit scattered/dispersed and there is no central
>> information about getting such a thing up and running from complete scratch.
>> This is what i'm referring to in my comment.
>>
>> --
>> Date: Mon, 10 Nov 2008 09:15:14 +
>> From: [EMAIL PROTECTED]
>> To: [EMAIL PROTECTED]
>> Subject: Re: [Haskell-cafe] A video of Frag
>> CC: haskell-cafe@haskell.org
>>
>>
>> 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 don't understand why there is no video of Frag online so I made one
>> here: http://uk.youtube.com/watch?v=0jYdu2u8gAU
>>
>> --
>> Click here for FREE customisable desktop wallpapers. Get them 
>> Now!
>>
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>
>>
>>
>> --
>> www.di.uminho.pt/~hpacheco 
>>
>> --
>> Click here for FREE customisable desktop wallpapers. Get them 
>> Now!
>>
>>
>>
>>
>> --
>> www.di.uminho.pt/~hpacheco 
>>
>> --
>> Get the best wallpapers on the Web - FREE. Click 
>> here!
>>
>
>
>
> --
> www.di.uminho.pt/~hpacheco
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 don't understand why there is no video of Frag online so I made one
> here: http://uk.youtube.com/watch?v=0jYdu2u8gAU
>
> --
> Click here for FREE customisable desktop wallpapers. Get them 
> Now!
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 HAppS as a webserver, git for file storage,
> pandoc for rendering the (markdown) pages, and highlighting-kate for
> highlighted source code.
>
> Some nice features of gitit:
>
>  - Pages and uploaded files are stored in a git repository and may
>be added, deleted, and modified directly using git.
>  - Pages may be organized into subdirectories.
>  - Pandoc's extended version of markdown is used, so you can do tables,
>footnotes, syntax-highlighted code blocks, and LaTeX math. (And
>you can you pandoc to convert pages into many other formats.)
>  - Math is rendered using jsMath (which must be installed
>separately).
>  - Source code files in the repository are automatically rendered with
>syntax highlighting (plain/text version is also available).
>
> You can check it out on my webserver: http://johnmacfarlane.net:5001/
> Or try it locally:
>
>cabal update
>cabal install pandoc -fhighlighting
>cabal install gitit
>gitit  # note: this will create two subdirectories in the working
> directory
># then browse to http://localhost:5001.
>
> There's a git repository at http://github.com/jgm/gitit/tree/master.
> Comments and patches are welcome.
>
> John
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 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 type signature via an auxiliary function instead of a case
> >expression, the problem goes away.
> >readElementRigidity :: (Monad m,Xml t) => Rigidity m -> m
> ([Element],t) ->
> >Maybe  t
> >readElementRigidity Rigid m = ...
> >readElementRigidity Flexible m = ...
> >Is there a plan to update the version on Hackage to support ghc
> 6.10.1?
> >I don't know either if it may break backwards compatibility.
>
> Check again. Lemmih updated HAppS to 6.10 today, and already it is in
> Arch Linux :-)
>
> -- Don
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 type signature via an auxiliary function instead of a case
expression, the problem goes away.

readElementRigidity :: (Monad m,Xml t) => Rigidity m -> m ([Element],t) ->
Maybe  t
readElementRigidity Rigid m = ...
readElementRigidity Flexible m = ...

Is there a plan to update the version on Hackage to support ghc 6.10.1?
I don't know either if it may break backwards compatibility.

Cheers,
hugo

-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 at 6:07 PM, Niklas Broberg <[EMAIL PROTECTED]>wrote:

> > Think of any "real" programming language out there. For example, in many
> > languages statements may contain expressions, and expressions in turn may
> > contain statements (in Java through anonymous inner classes, for
> example).
>
> ... and as an example of this you could have a look at the
> haskell-src(-exts) package that encodes the Haskell syntax as an AST.
> For example there are expressions containing statements (e.g. the
> do-expression) and statements containing expressions (obviously).
>
> Cheers,
>
> /Niklas
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 for such
> > circumstances.)
> >
> I like this one:
>
> http://downforeveryoneorjustme.com/downforeveryoneorjustme.com
>
> --
> (c) this sig last receiving data processing entity. Inspect headers
> for copyright history. All rights reserved. Copying, hiring, renting,
> performance and/or broadcasting of this signature prohibited.
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Polymorphic QuickCheck arguments

2008-06-17 Thread Hugo Pacheco
You are right!
If I try to compile it, then it complains about a Show instance for a, what
in fact forces a monomorphic type signature for t.

I have found under Test.Quickcheck.Poly a way to generate Int values for a
polymorphic type, but because it  requires an abstraction Poly a for some
type a I do not see how it can improve.

What it concretely states the module is

- This is the basic pseudo-polymorphic object.

- The idea is you can't cheat, and use the integer

- directly, but need to use the abstraction.

Is it possible to cheat? I would like to...

Thanks,

hugo


On Tue, Jun 17, 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
>>
>> and evaluate it we get
>>
>> > verboseCheck tst
>> 0:
>> ()
>> 1:
>> ()
>> ...
>>
>
>
>  How come did the polymorphic value a get instanciated to ()? Is this done
>> via the Testable type class?
>> Could someone please explain this to me? I'm not saying it does not make
>> sense, but I would like to understand how it works. Being possible to change
>> this behavior, this is, assign another "default type" whenever polymorphic
>> types occur, would be awesome.
>>
>
> I think it is GHCi that is instantiating the type with (). Try compiling
> the program, it will probably be rejected by the compiler when you do not
> specify a concrete type.
>
> You can, for example, try this:
>
> verboseCheck (tst :: [Int] -> Bool)
>
>  Cheers,
>> hugo
>>
>


-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Polymorphic QuickCheck arguments

2008-06-17 Thread Hugo Pacheco
It does not seem like printing the result value from IO (), because with a
more complicated example for lists.
t :: [a] -> Bool
t x = True

then it randomly generates values of type [()].

*Quick> verboseCheck t
0:
[]
1:
[()]
2:
[(),(),()]
3:
[]
4:
[()]
5:
[(),(),(),()]

I just wonder how the a got 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
> > 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 done
> > via the Testable type class?
>
> I haven't got something here to check with, but from the formatting it
> looks like every odd line is a randomly-chosen boolean value, and the
> following line is the result? It might be just printing the result
> value of IO (). Maybe try a more complete test to see how that looks?
>
> Cheers,
>
> D
>
>
> --
> Dougal Stanton
> [EMAIL PROTECTED] // http://www.dougalstanton.net
>



-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 done
via the Testable type class?
Could someone please explain this to me? I'm not saying it does not make
sense, but I would like to understand how it works. Being possible to change
this behavior, this is, assign another "default type" whenever polymorphic
types occur, would be awesome.

Cheers,
hugo

-- 
www.di.uminho.pt/~hpacheco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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, we would very much like to collect contributions for
> the 14th edition of the
>
>  
>  Haskell Communities & Activities Report
>http://www.haskell.org/communities/
>
>   Submission deadline: 10 May 2008
>
>  (please send your contributions to hcar at haskell.org, in
> plain text or LaTeX format)
>  
>
> This is the short story:
>
> * If you are working on any project that is in some way related
>  to Haskell, please write a short entry and submit it to the us. Even if
>  the project is very small or unfinished or you think it is not important
>  enough -- please reconsider and submit an entry anyway!
>
> * If you are interested in any project related to Haskell that has not
>  previously been mentioned in the HC&A Report, please tell us, so that we
>  can contact the project leaders and ask them to submit an entry.
>
> * Feel free to pass on this call for contributions to others that
>  might be interested.
>
> More detailed information:
>
> The Haskell Communities & Activities Report is a bi-annual overview of
> the state of Haskell as well as Haskell-related projects over the
> last, and possibly the upcoming 6 months. If you have only recently
> been exposed to Haskell, it might be a good idea to browse the
> December 2007 edition -- you will find interesting topics described as
> well as several starting points and links that may provide answers to
> many questions.
>
> Contributions will be collected until the submission deadline. They
> will then be compiled into a coherent report that is published online
> as soon as it is ready. As always, this is a great opportunity to
> update your webpages, make new releases, announce or even start new
> projects, or to talk about developments you want every Haskeller to
> know about!
>
> As the purpose of the report is to collect recent or current
> activities, we encourage you to update all existing summaries and
> reports. We will probably drop any topics that have not had any
> activity for the past year, i.e., since May 2007, but we would
> very much prefer you to present an updated description of the
> topic. Of course, new entries are more than welcome.  Reports should
> generally be kept brief and informative, ranging from a few sentences
> to a few hundred words, to keep the whole report reasonably sized.
>
> Looking forward to your contributions,
>
> Andres and Janis (current editors)
>
>
> FAQ:
>
> Q: Which topics are relevant?
>
> A: *All* topics which are related to Haskell in some way are relevant.  We
> usually had reports from users of Haskell (private, academic, or
> commercial), from authors or contributors to projects related to Haskell,
> from people working on the Haskell language, libraries, on language
> extensions or variants. We also like reports over distributions of Haskell
> software, Haskell infrastructure, books and tutorials on Haskell. Reports
> on past and upcoming events related to Haskell are also relevant. Finally,
> there might be new topics we don't even think about. As a rule of thumb: if
> in doubt, then it probably is relevant and has a place in the HCAR. You can
> also ask the editors.
>
> Q: Is unfinished work relevant? Are ideas for projects relevant?
>
> A: Yes! You can use the HCAR to talk about projects you are currently
> working on. You can use it to look for other developers that might help
> you. You can use it to write ``wishlist'' items for libraries and language
> features you would like to see implemented.
>
> Q: How much should I write?
>
> A: There's no formal limit. But generally, entries should be short and
> to the point. A general introduction is helpful. Apart from that, you
> should focus on recent or upcoming developments. There also is no minimum
> length of an entry! The report aims at being as complete as possible, so
> please consider writing an entry, even if it's only a few lines long.
>
> Q: If I don't update my entry, but want to keep it in the report, what
> should I do?
>
> A: Tell us that there are no changes. We will reuse the old entry in this
> case, but we might drop it if it's older than a year, to give more room and
> more attention to projects that change a lot. Don't resent complete entries
> if you haven't changed them.
>
> Q: What format should I write in?
>
> A: The best format is a LaTeX source file, adhering to the template
> that's available at:
>
>  http://haskell.org/communities/05-2008/template.tex
>
> There's also a LaTeX style file at
>
>  http://haskell.org/communities/05-2008/hcar.

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

2008-04-07 Thread Hugo Pacheco
The problem is that the representation probably does not reduce to a normal
form.
Say, for the case

type instance F (Nest a) x = Either() (a,F a x)

fnn :: F (Nest a) (Nest a)
fnn = Left ()

it compiles ok.

But why can't the representation be infinite, like any other infinite data
type?
Cheers,
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 Nest a = Nil | Cons a (Nest (a,a))
>
> type family F a x :: *
> type instance F (Nest a) x = Either () (a,F (Nest (a,a)) x)
>
> fnn :: F (Nest Int) (Nest Int)
> fnn = Left ()
>
> The following module fails to compile (or better, compilation never ends).
>
> Maybe there is something very bad going on due to the
> undecidable-instances extension?
>
> Any clue?
> hugo
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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) x = Either () (a,F (Nest (a,a)) x)

fnn :: F (Nest Int) (Nest Int)
fnn = Left ()

The following module fails to compile (or better, compilation never ends).

Maybe there is something very bad going on due to the undecidable-instances
extension?

Any clue?
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-30 Thread Hugo Pacheco
Anyway, do you think it is feasible to have a flag such as
-fallow-unsafe-type-families for users to use at their own risk? (supposing
we know how to guarantee these constraints).
I speak for my own, there are currently some nice thinks that I can only
accomplish with partially applied type 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:
> > > 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 case).
> >
>
> I was most interested in knowing that this assumption was enough, and it
> looks like it does.
>
>
> >
> > Given
> >
> >   type family G a b
> >type FList a x = G a x
> >type instance F [a] = FList a
> >
> > Does FList ignore its second argument?  Depends on the type instances
> > of G.
> >
> > Manuel
> >
>
> I haven't thought of that, thanks for the example.
>
> 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-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 case).
>

I was most interested in knowing that this assumption was enough, and it
looks like it does.


>
> Given
>
>   type family G a b
>type FList a x = G a x
>type instance F [a] = FList a
>
> Does FList ignore its second argument?  Depends on the type instances
> of G.
>
> Manuel
>

I haven't thought of that, thanks for the example.

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-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)
> > type instance F [a] = FList a
>
> We should not allow such programs.
>
> Manuel
>
> >
> >
> > 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 we need to forbid this type instance?  Because it breaks the
> > confluence of equality constraint normalisation.  Here are two
> > diverging normalisations:
> >
> >   (1)
> >
> > F Int Bool  ~  F Int Char
> >
> >   ==> DECOMP
> >
> > F Int ~ F Int, Bool ~ Char
> >
> >   ==> FAIL
> >
> >
> >   (2)
> >
> > F Int Bool  ~  F Int Char
> >
> >   ==> TOP
> >
> > S Int Bool  ~  S Int Char
> >
> >   ==> (expand type synonym)
> >
> > Int  ~  Int
> >
> >   ==> TRIVIAL
> >
> > This does mean that a program such as
> >
> > type FList a = Either One ((,) a)
> > type instance F [a] = FList a
> >
> > will be disallowed in further versions?
> > Doesn't this problem occur only for type synonyms that ignore one or
> > more of the parameters? If so, this could be checked...
> >
> > 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-27 Thread Hugo Pacheco
The reason for the braces in type families is because type indices are
treated differently than normal parameters. I don't think this should be
adopted for type synonyms either.

Cheers,
hugo

On Thu, Mar 27, 2008 at 9:48 PM, Wolfgang Jeltsch <
[EMAIL PROTECTED]> wrote:

> Am Donnerstag, 27. März 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, this is
> > > > something that can always be changed if experience shows that
> programs
> > > > are easier to understand with extra syntax.  It doesn't affect the
> > > > type theory and is really a pure language design question.  I'd be
> > > > glad to hear some more opinions about this matter.
> > >
> > > I would go for the braces as Claus suggested,
> >
> > I would do so, too.
>
> Hmm, but then we should also introduce braces for ordinary type synonyms:
>
>type ReaderWriterT m = ReaderT (WriterT m)
>
>x :: {ReaderWriterT IO} Char
>
> > […]
>
> Best wishes,
> Wolfgang
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
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-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 we need to forbid this type instance?  Because it breaks the
> > confluence of equality constraint normalisation.  Here are two
> > diverging normalisations:
> >
> >   (1)
> >
> > F Int Bool  ~  F Int Char
> >
> >   ==> DECOMP
> >
> > F Int ~ F Int, Bool ~ Char
> >
> >   ==> FAIL
> >
> >
> >   (2)
> >
> > F Int Bool  ~  F Int Char
> >
> >   ==> TOP
> >
> > S Int Bool  ~  S Int Char
> >
> >   ==> (expand type synonym)
> >
> > Int  ~  Int
> >
> >   ==> TRIVIAL
> >
> > This does mean that a program such as
>
> type FList a = Either One ((,) a)
> type instance F [a] = FList a
>
> will be disallowed in further versions?
> Doesn't this problem occur only for type synonyms that ignore one or more
> of the parameters? If so, this could be checked...
>
> 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-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)
>
> F Int Bool  ~  F Int Char
>
>   ==> DECOMP
>
> F Int ~ F Int, Bool ~ Char
>
>   ==> FAIL
>
>
>   (2)
>
> F Int Bool  ~  F Int Char
>
>   ==> TOP
>
> S Int Bool  ~  S Int Char
>
>   ==> (expand type synonym)
>
> Int  ~  Int
>
>   ==> TRIVIAL
>
> This does mean that a program such as

type FList a = Either One ((,) a)
type instance F [a] = FList a

will be disallowed in further versions?
Doesn't this problem occur only for type synonyms that ignore one or more of
the parameters? If so, this could be checked...

hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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
___
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-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 with extra syntax.  It doesn't affect the
> type theory and is really a pure language design question.  I'd be


I would go for the braces as Claus suggested, although not necessary they
would have helped me to better understand how type family application
behaves.

> | The most clean solution may indeed be to outlaw partial
> > applications of
> > | vanilla type synonyms in the rhes of type instances.  (Which is
> > what I
> > | will implement unless anybody has a better idea.)
> >
> > i always dislike losing expressiveness, and ghc does almost seem
> > to behave as i would expect in those examples, so perhaps there
> > is a way to fit the partial applications into the theory of your TLDI
> > paper.
>
> I don't think we can avoid losing that expressiveness, as you
> demonstrated that it leads to non-confluence of type term
> normalisation - see also my reply to SimonPJ's message in this thread.
> glad to hear some more opinions about this matter.


Since I was the one to start this thread, I have managed to implement what I
initially wanted as F a :: *->* with F a x::*, and the cost of not having
partially applied type synonyms was not much apart from some more equality
coercions that I wasn't expecting.
The most relevant tradeoffs are some more extra parameters in type classes
(notice the d in fmapF) and having to bind explicit signatures to variables
that only occur as a type-index to the type family (notice id::x->x).

class FunctorF x where fmapF :: d -> (a -> b) -> F x a -> F x b
fff :: forall d x. (FunctorF d) => d -> F d x -> F d x
fff a = fmapF a (id::x->x)

Generally, I love type-indexed types.
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2008-03-17 Thread Hugo Pacheco
But by doing so I am changing type equality to the same as having "type
family F a :: * -> *"

F' a x ~ F' b y <=> F' a ~ F' b /\ x ~ y (equality for ADTs)

 and I would like this "decomposition rule not to apply" so.

Thanks though,
hugo

On Tue, Mar 18, 2008 at 1:12 AM, Ryan Ingram <[EMAIL PROTECTED]> 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 is that there is
> something slightly magic going on in this Functor definition; you are
> not declaring Functor (G Int) but rather Functor (whatever (G Int)
> turns into).  This is using a GHC extension "TypeSynonymInstances".
> The extension allows you to use type synonyms when declaring
> instances, but only if they are fully applied, and the compiler is
> simply applying the substitution for you.
>
> That is to say, this code is no different than the following:
>
> type family G a :: * -> *
> type instance G Int = Either ()
> instance Functor (Either ()) where
> fmap f (Left ()) = Left ()
>fmap f (Right x) = Right (f x)
>
> Once you declare a more complicated type function, such as
>type family F a x :: *
> this extension can no longer come into play.
>
> You can get around this restriction with a newtype:
>
> type family F a x :: *
> type instance F Int x = Either () x
>
> newtype F' a b = F' (F a b)
>
> instance Functor (F' Int) where
>   fmap f (F' (Left ())) = F' (Left ())
>   fmap f (F' (Right x)) = F' (Right $ f x)
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 d x

On the other side, it fails to compile when this signature is explicit:

fff :: forall d x. (FunctorF d) => d -> F d x -> F d x
fff a = fmapF a id

I am repeating myself in
http://hackage.haskell.org/trac/ghc/ticket/2157#comment:6.

Sorry for the cascaded messages,
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 = fmap id*

and it works fine.
However, I need to parameterize one extra argument (due to type equality):

*type family F a x :: *

class FunctorF d where
fmapF :: (x -> y) -> F d x -> F d y

fff :: (FunctorF a) => F a b -> F a b
fff = fmapF id*

This second scenario fails to compile because the compiler cannot unify
types a and b with types d and x from the fmapF declaration.
Is there any other option than passing dummy variables to fmapF?
*
class FunctorF d where
fmapF :: d -> x -> (x -> y) -> F d x -> F d y

fff :: (FunctorF a) => a -> b -> F a b -> F a b
fff a b = fmapF a b id*

Thanks,
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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] 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
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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
test (PF (Func _ _)) ID = ID*

I get the impossible:

*$ ghci Test.hs -fglasgow-exts
GHCi, version 6.9.20080303: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
[1 of 1] Compiling Test ( Test.hs, interpreted )
ghc-6.9.20080303: panic! (the 'impossible' happened)
  (GHC version 6.9.20080303 for i386-apple-darwin):
Coercion.splitCoercionKindOf
$co${tc aog} [tv]
t_ao8{tv} [tau] ~ a{tv aob} [sk] -> a{tv aob} [sk]
Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug*

However, the following implementations of *test* compile ok:

*test :: Type a -> a -> a
test (PF _) ID = ID

test :: Type a -> a -> a
test (PF (Func _ _)) x = x*

It has something to do with mixing different GADTs contructors.

Should this be submitted as a bug as it is?

Cheers,
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 ()
fmap f (Right n) = Right (f n)

fact :: Int -> Int
fact = para (const 1 \/ (uncurry (*)) . (id >< succ))

If we consider that the paramorphism is implemented as an hylomorphism, then
an intermediate virtual type (d in the hylo definition) [Int]

If you test the constraints for d = [Int], a = Int and c = Int

F d c ~ F a (c,a)

F d a = F [Int] Int = Either One (Int,Int)
F a (c,a) = F Int (Int,Int) = Either One (Int,Int)

F d a ~ F a (a,a)

F d a = F a (a,a) -- pure substitution of the above case

Hope this helps.
Thanks again for you patience,
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-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:

type family F a x :: *
type instance F [a] x = Either() (a,x)

instance (Functor (F [a])) where -- error, not enough parameters passed to F
fmap _ (Left _) = Left ()
fmap f (Right (a,x)) = Right (a,f x)

So, indeed, with either implementation I have a problem.

>I have my suspicions about your mentioning of both Functor (F d) and
>Functor (F a) in the signature. Which implementation of fmap do you want?
>Or should they be both the same (i.e. F d ~ F a)?

This is an hard question to which the answer is both.

In the definition of an hylomorphism I want the fmap from (F d):

hylo :: (Functor (F d)) => d -> (F d c -> c) -> (a -> F d a) -> a -> c
hylo d g h = g . fmap (hylo d g h) . h

However, those constraints I have asked about would allow me to encode a
paramorphism as an hylomorphism:

class Mu a where
inn :: F a a -> a
out :: a -> F a a

para :: (Mu a, Functor (F a),Mu d, Functor (F d),F d a ~ F a (a,a), F d c ~
F a (c,a)) => d -> (F a (c,a) -> c) -> a -> c
para d f = hylo d f (fmap (id /\ id) . out)

In para, I would want the fmap from (F a) but that would be implicitly
forced by the usage of out :: a -> F a a

Sorry for all the details, ignore them if they are too confusing.
Do you think there might be a definition that would satisfy me both Functor
instances and equality?

Thanks for your pacience,
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-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 :: *

F d c ~  F a (c,a) would be semantically different, meaning that this
"decomposition rule" does not apply?

Thanks,
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 h = g . fmap (hyloPara d g h) . h

it all works fine.

However, if I change the declaration to (changed F d c for the
"supposedly equivalent" F a (c,a)):

hyloPara :: (Functor (F a), Functor (F d), F d a ~ F a (a,a), F d c ~ F a
(c,a)) => d -> (F a (c,a) -> c) -> (a -> F d a) -> a -> c

and I get

Occurs check: cannot construct the infinite type: c = (c, a)
When generalising the type(s) for `hyloPara'

This really messes up my notions on equality constraints, is it the expected
behavior? It would be essential for me to provide this definition.

Thanks,
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 Strings only and the more general instance for the
rest?

class C a where
c :: a

instance C Char where
c = 'a'

instance C a => C [a] where
c = [c :: a,c :: a]

instance C String where
c = "a"

cc = c :: String

Sorry for the newbie question.
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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 constraint,
> but I assume that is not possible.


hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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) = (TT a, TT b)
val _ = (val (_L :: a),val (_L :: b))

Why normal unification (val :: TT a) does not work I can't say why, but this
kind of behavior is not solely for type families.

Cheers,
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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, whenever the equality does not
hold, the instance returns a compile error, what does make sense.

Is there any way I could overcome this?

Thanks,
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 variable k is not in scope.

However, if we extract the type family from the class

type family S a (k :: * -> *) :: *
type instance S [a] k = (a, k a)
class C a

it compiles correctly.
According to [3], the difference is purely syntactic sugar, does that mean
that both examples should compile and behave the same or is there some
subtlety that justifies the class example not to compile?

Another issue is that data kinds (used in both [2] and [3]) do not seem to
be supported at all by the compiler, are they already implemented in GHC?

Simple examples such as

datakind Nat = Zero
or
datakind Nat = Zero | Succ Nat

fail to compile.

Perhaps some of these should be submitted to the GHC Bug Tracker. I have
tested both GHC 6.8.2 and 6.9.20080218.


References:

   1. Associated Types with
Class. Manuel
   M. T. Chakravarty, Gabriele Keller, Simon Peyton Jones, and Simon Marlow.
   In *Proceedings of The 32nd Annual ACM SIGPLAN-SIGACT Symposium on
   Principles of Programming Languages (POPL'05)*, pages 1-13, ACM Press,
   2005.
   2. Associated Type
Synonyms. Manuel
   M. T. Chakravarty, Gabriele Keller, and Simon Peyton Jones. In *Proceedings
   of The Tenth ACM SIGPLAN International Conference on Functional Programming
   *, ACM Press, pages 241-253, 2005.
   3. Towards Open Type Functions for
Haskell. Tom
   Schrijvers, Martin Sulzmann, Simon Peyton-Jones, and Manuel M. T.
   Chakravarty. Unpublished manuscript, 2007.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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


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
___
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 and do something with it.


fsel :: Int -> Int -> x
fsel x y = $(sel x y) ...

Imagine a stupid case for

fsel :: Int -> Int -> Int
fsel x y = $(sel x y) (x,y)

The compiler complains that

GHC stage restriction: `x'
  is used in a top-level splice, and must be imported, not defined
locally
In the first argument of `sel', namely `x'
In the expression: $[splice](sel x y) (x, y)
In the definition of `fsel': fsel x y = $[splice](sel x y) (x, y)

what, indeed, makes sense.

However, is there a possible way to generate Haskell functions from TH
without having to instanciate its arguments?

Thanks,
hugo
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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,

I'm having what I supose ti be a oarsec internal error when trying to
compile some grammar.


I get:
$ happy -g -a -c Parser.y
happy: parE


Is this a known bug? I could find no reference to it.


I'm using happy version 1.16 and I can't reduce the problem to a single
production.
The grammar file is attached.


Thanks in advance,
hugo






___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[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 to
compile some grammar.


I get:
$ happy -g -a -c Parser.y
happy: parE


Is this a known bug? I could find no reference to it.


I'm using happy version 1.16 and I can't reduce the problem to a single
production.
The grammar file is attached.


Thanks in advance,
hugo


Parser.y
Description: Binary data
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe