[Haskell-cafe] Lifted Spine View

4 views
Skip to first unread message

bob zhang

unread,
Nov 20, 2011, 11:33:41 PM11/20/11
to hcafe

Hi, all
   I tried to follow the program of the paper "Scrap your boilerpolate" Revolutions. Unfortunately,
I found the program in the section lifted spine view does not compile in my GHC, could anybody
 point out where I am wrong? Many Thanks

My code is posted here http://hpaste.org/54357

Antoine Latter

unread,
Nov 20, 2011, 11:48:52 PM11/20/11
to bob zhang, hcafe
2011/11/20 bob zhang <bobzha...@gmail.com>:

Hello!

What error do you get? Which version of GHC are you using?

Thanks,
Antoine

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

Andres Löh

unread,
Nov 21, 2011, 5:15:37 AM11/21/11
to bob zhang, hcafe
Hi there.

You have to flip the two fields of (:->), i.e., the type has to be
first and the annotated term has to be second. This is because pattern
matching on GADTs and refinement is implicitly left-to-right in GHC.
The paper presents it the other way round and remarks on the flipped
order in a footnote near the beginning.

Cheers,
Andres

bob zhang

unread,
Nov 21, 2011, 2:32:49 PM11/21/11
to Andres Löh, hcafe
Thanks,  I don't see the footnote, but that works. :-)


On Mon, Nov 21, 2011 at 5:15 AM, Andres Löh <andre...@googlemail.com> wrote:
Hi there.

>    I tried to follow the program of the paper "Scrap your boilerpolate"
> Revolutions. Unfortunately,
> I found the program in the section lifted spine view does not compile in my
> GHC, could anybody
>  point out where I am wrong? Many Thanks
>
> My code is posted here http://hpaste.org/54357

You have to flip the two fields of (:->), i.e., the type has to be
first and the annotated term has to be second. This is because pattern
matching on GADTs and refinement is implicitly left-to-right in GHC.
The paper presents it the other way round and remarks on the flipped
order in a footnote near the beginning.

Cheers,
 Andres



--
Best, bob
Reply all
Reply to author
Forward
0 new messages