Re: [Haskell-cafe] GHCi (7.4.2) is working on ARM

2013-02-06 Thread dude
I have also validated ghc 7.4.1 on the Ubuntu Precise distro booted on a 
BeagleXM.


There's no ghci included.

--dude

On 02/06/2013 08:15 AM, kenny lu wrote:
I've got a Cubieboard a few weeks back. I started it off with Linaro 
(Ubuntu) 12.06.
Today I started to upgrade the OS to 12.11, which surprisingly came 
with ghc 7.4.2.


And ghci magically works too.

Here are the links

http://www.cubieboard.org

sudo apt-get install update-manager-core
sudo apt-get update
sudo apt-get upgrade
sudo do-release-upgrade

Regards,
Kenny




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



--
dude

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


[Haskell-cafe] confirming order of kinds and rank of types

2012-12-04 Thread dude
I hope you can help me confirm my understanding of the order of kinds 
and rank of types as reported in [1,2]. I have been validating the 
mapping functions in Section 2 against the GHC 7.4.2 type checker by 
explicitly annotating the universal quantifiers as described in [1].


1. Just to baseline my understanding, given the following data type

data U a = UC (forall a. a)
-- :k U, U :: * - * -- order of kind = 1
-- :t UC, UC :: (forall a1. a1) - U a -- rank of type = 2

am I correct that the order of the kind is 1 and the rank of the type 
constructor is 2? See page 3 of [1] for counting the order and also page 
3 of [2] for counting rank.


2. Assuming the answer to #1 above is yes, am I also correct that the 
order of Fix is 2 and the rank of In is also 2 and the annotation to In 
does not affect its rank?


newtype Fix f = In (forall f. f (Fix f))
-- :k Fix, Fix :: (* - *) - * -- order of kind = 2
-- :t In, In :: (forall (f1 :: * - *). f1 (Fix f1)) - Fix f -- rank of 
type still = 2


3. Are the explicit annotations I added to the following fixpoint 
operator correct? Hinze indicates this is a third order kind and it 
seems that although the annotation on HIn has a higher order, the rank 
of the type hasn't changed, correct?


newtype HFix h a = HIn (forall h. (forall a. h (HFix h) a))
-- :k HFix, HFix :: ((* - *) - * - *) - * - * -- per hinze order of 
kind = 3
-- :t HIn, HIn :: (forall (h1 :: (* - *) - * - *) a1. h1 (HFix h1) 
a1) - HFix h a -- still rank of type = 2 because there's one quantifier 
to the left of the function arrow.


If all that all checks out, I have a few follow up questions:

4. Hinze reports that mapHFix is Rank3, but the following type checks 
with the Rank2Type pragma and if I remove the explicit universal 
quantifiers in HIn. Put the quantifiers back in an it does not type check.


mapHFix maph mapa (HIn v) = HIn (maph (mapHFix maph) mapa v)

5. Also, the inferred signature for mapHFix differs from the one stated 
by Hinze. It's this ...


mapHFix :: ((t2 - HFix t t1 - HFix h a) - t2 - t (HFix t) t1 - h 
(HFix h) a) - t2 - HFix t t1 - HFix h a


What is the rank of this type signature? The type variables are not in 
the same order as Hinze's and I was able to just wrap a (forall t2 t t1 
h a.) around the whole thing and it type checked. Why are they different?


6. What is the correct type signature for mapHFix? The correct type 
signature should support changing the pragma from Rank2Types to 
RankNTypes, then today's 7.4.2 type checker will succeed where it could 
not in 1999 when the paper was written, correct?


Thanks so much for helping me confirm my understanding of these issues!

--
dude


1. Polytypic Values Posess Polykinded Types. (Hinze, 1999)
2. A Direct Algorithm for Type Inference in the  Rank 2 Fragment of the 
Second Order Lambda Calculus. (Kfoury, 1993)



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


Re: [Haskell-cafe] explicit annotations on kind polymorphism for data types

2012-08-23 Thread dude

Not in 7.4.2, correct?

--
dude

On 08/22/2012 09:58 AM, Brent Yorgey wrote:

I believe in the paper it is actually a lowercase Greek chi (χ), which
should work too. ;)

-Brent

On Wed, Aug 22, 2012 at 08:15:48AM +0200, José Pedro Magalhães wrote:

Nope, but it should work on 7.6 (also on the release candidate).
The 'X' should be lowercase, though, like type variables.


Cheers,
Pedro

On Wed, Aug 22, 2012 at 12:01 AM, dude d...@methodeutic.com wrote:


Hello All:

I'm working through Giving Haskell a Promotion.

Section 2.4 presents an explicitly annotated data type declaration similar
to the following:

data EqRefl (a::X)(b::X) where
   Refl :: forall X. forall (a::X). EqRefl a a

Has this been implemented in GHC 7.4.2?

7.8.3 in the GHC User Guide leads me to believe it has not.

--
dude

__**_
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/**mailman/listinfo/haskell-cafehttp://www.haskell.org/mailman/listinfo/haskell-cafe


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






--
--
dude


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


[Haskell-cafe] explicit annotations on kind polymorphism for data types

2012-08-21 Thread dude

Hello All:

I'm working through Giving Haskell a Promotion.

Section 2.4 presents an explicitly annotated data type declaration 
similar to the following:


data EqRefl (a::X)(b::X) where
  Refl :: forall X. forall (a::X). EqRefl a a

Has this been implemented in GHC 7.4.2?

7.8.3 in the GHC User Guide leads me to believe it has not.

--
dude

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