Send Beginners mailing list submissions to
        beginners@haskell.org

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
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

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


Today's Topics:

   1.  Difference between Monad composition and transformation
      (Song Zhang)
   2. Re:  shared files / environment / portability (Henk-Jan van Tuyl)


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

Message: 1
Date: Sat, 25 Aug 2012 09:15:20 +0100
From: Song Zhang <vxan...@gmail.com>
Subject: [Haskell-beginners] Difference between Monad composition and
        transformation
To: beginners@haskell.org
Message-ID:
        <CACGMEOnGugMmzifyFR57z-mT_CFYDB5dMi3xnHsHHsi8NHC=h...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

When I use a State Monad transformer to combine with a Writer Monad
StateT s (Writer w) a. is it different from composition of State Monad and
Writer Monad. It is State s (Writer w a) ?
StateT is defined as (s -> m (a, s)), so StateT s (Writer w) a can be
regarded as (s -> Writer w a) , which is (s -> ((a,w),s)
and on the other hand State s (Writer w a) is (s -> ((a,w),s). I suppose
the are similar and if so, what is the point we still get Monad
transformers? Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120825/acd963f9/attachment-0001.htm>

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

Message: 2
Date: Sat, 25 Aug 2012 10:28:17 +0200
From: "Henk-Jan van Tuyl" <hjgt...@chello.nl>
Subject: Re: [Haskell-beginners] shared files / environment /
        portability
To: "Haskell Beginners" <beginners@haskell.org>, "Christopher Howard"
        <christopher.how...@frigidcode.com>
Message-ID: <op.wjk8hfydpz0...@zen5.arnhem.chello.nl>
Content-Type: text/plain; charset=iso-8859-15; format=flowed;
        delsp=yes

On Sat, 25 Aug 2012 10:08:01 +0200, Henk-Jan van Tuyl <hjgt...@chello.nl>  
wrote:

> On Sat, 25 Aug 2012 08:09:04 +0200, Christopher Howard  
> <christopher.how...@frigidcode.com> wrote:
>
>> I'm coding a resource tracker for a game that loads images, sounds, etc.
>> from files, and wondering how the program will know where the files are
>> located on the installation system. (With C/C++ programs I usually had
>> the build system hardcode the appropriate share/ directory into the
>> config.h file.) Assuming I package for cabal distribution, what
>> approaches to this problem are available to me?
>
>
> You can find an example in wxAsteroids[0], look at the main function.

Another example can be found in the FRP version of wxAsteroids[1], e.g.:
   rock    = bitmap $ getDataFile "rock.ico"

Regards,
Henk-Jan van Tuyl

[1]  
https://github.com/HeinrichApfelmus/reactive-banana/blob/master/reactive-banana-wx/src/Asteroids.hs

-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--



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

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 50, Issue 28
*****************************************

Reply via email to