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 fo
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 equal
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
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 d
de 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 f
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,
>>
>> Und
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,
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
ing ((:*:))
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
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
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@h
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 (t
ROTECTED]> 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.
>
>
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 hylomorphis
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
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 markdowni
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]> wr
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 c
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 talk
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 poss
ane 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.)
>>
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@h
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
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/~hpa
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
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
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
/Develo
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
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 d
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
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.
> >
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
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 a
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
___
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 gr
un 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 th
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
> > understa
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
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.
> Therefo
heers,
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-ins
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)
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]>
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...
>
>
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
> >
&
stag, 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
&g
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 :
>
> 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:
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
_
> 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 understa
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
> >
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
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
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
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
ht
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 ->
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
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:
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 :: *
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
hyloPa
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 S
>
>
>
> >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 dep
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
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, whene
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 varia
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
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
___
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
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]
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 erro
69 matches
Mail list logo