Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Boilerplate Code (Alex Rozenshteyn)
   2.  Yezod and Snap deployments to ISP (MH)


----------------------------------------------------------------------

Message: 1
Date: Tue, 3 Aug 2010 16:19:58 +0300
From: Alex Rozenshteyn <[email protected]>
Subject: Re: [Haskell-beginners] Boilerplate Code
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="utf-8"

I have never used Data.Typeable, but maybe it could be made relevant here?

On Tue, Aug 3, 2010 at 4:18 PM, Brent Yorgey <[email protected]> wrote:

> On Tue, Aug 03, 2010 at 09:51:45PM +1000, Matt Andrew wrote:
> > Hi all,
> >
> > I am in the process of writing a Scheme interpreter/compiler in Haskell
> as my first serious project after learning the basics of Haskell. The goal
> is to really get a feel for Haskell. I am trying to accomplish this as much
> as I can on my own, but am referring to Jonathan Tang's 'Write Yourself a
> Scheme in 48 hours' whenever I get really stuck.
> >
> > I have a question regarding a pattern that I have found within my code
> for which I cannot seem to find an abstraction.
> >
> > I am implementing some of the primitive Scheme type-checker functions
> with the following code:
> >
> > numberP :: SchemeVal -> SchemeVal
> > numberP (Number _) = Bool True
> > numberP _          = Bool False
> >
> > boolP :: SchemeVal -> SchemeVal
> > boolP (Bool _) = Bool True
> > boolP _        = Bool False
> >
> > symbolP :: SchemeVal -> SchemeVal
> > symbolP (Atom _) = Bool True
> > symbolP _        = Bool False
> >
> > This is a pattern that I could easily provide an abstraction for with a
> Lisp macro, but I'm having trouble discovering if/how it's possible to do so
> elegantly in Haskell. The closest (but obviously incorrect) code to what I'm
> trying to accomplish would be:
>
> It isn't really possible to abstract this any further in Haskell.
> Constructors are rather magical functions, but they are still
> functions, and like other functions cannot be compared for equality
> directly.  Pattern-matching them is the only sort of equality
> comparison you get.
>
> With that said, your intuition to use Lisp macros is a good one.
> Haskell has a similar metaprogramming facility called Template
> Haskell, which could easily be used to automatically generate these
> sorts of functions.  Of course, it's a little more complicated than
> Lisp macros since Haskell syntax is so much more complex than Lisp's
> -- but given that, on the whole it's not so bad.  I wouldn't use TH to
> generate just the three functions you showed -- but I would certainly
> consider it for ten.
>
> -Brent
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>



-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

          Alex R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20100803/92a24d10/attachment-0001.html

------------------------------

Message: 2
Date: Tue, 3 Aug 2010 12:48:21 -0400
From: MH <[email protected]>
Subject: [Haskell-beginners] Yezod and Snap deployments to ISP
To: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

I want to build a website using haskell and deploy it to some ISP. I
appreciate if you help me understand the following:
1. Do I need to consider using special ISP to deploy Yezod or Snap?
2. Do I need to consider using special ISP to deploy any other Haskell based
web app?
3. To start with I need to display a static content and ability to send
email from user submitted form. Can I send email with these Web frameworks
(I would appreciate the samples)?
4. Can you recommend me any ISP in USA?

Thanks a lot.

Malik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20100803/f6c1ff06/attachment-0001.html

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 26, Issue 4
****************************************

Reply via email to