[Haskell] Closed Projections on HLists?

Keean Schupke k.schupke at imperial.ac.uk
Sun Nov 21 07:15:26 EST 2004


Jared Warren wrote:

>But is there no way things could be changed so we can write (to use an
>example without projection to HNil):
>
>*> hProject (hProject (hCons hZero hNil)) :: HCons HZero HNil
>_______________________________________________
>Haskell mailing list
>Haskell at haskell.org
>http://www.haskell.org/mailman/listinfo/haskell
>  
>
Not surprising as this is just like doing: read (show x)... Project extracts
elements of the return-type, so the inner project is unconstrained. Of
course this is completely pointless as:

*> hProject (hCons hZero hNil) :: HCons HZero HNil

is what you want. Infact you can almost say that hProject . hProject = 
hProject?

    Keean


More information about the Haskell mailing list