Julius Gedvilas | 30 Aug 09:21 2014
Picon

Feature request: anonymous arguments

Anonymous argument (AA) is an argument without a name. 

w/o AA:
func :: a -> a -> a -> a
func aa0 aa1 aa2 = aa0 `op` aa1 `op` aa2
\aa0 aa1 aa2 -> aa0 `op` aa1 `op` aa2

w/ AA:
func :: a -> a -> a -> a
func = \0 `op` \1 `op` \2
\-> \0 `op` \1 `op` \2

AA syntax: '\n', where n is one of the (0 1 2 3 4 5 6 7 8 9). 'n' corresponds to the position of a parameter.

I think a language shouldn't force you to invent names for things that are used only once, same philosophy as with an anonymous function.

Is this feature needed? Does something like this already exist?

<div><div dir="ltr">
<div>Anonymous argument (AA) is an argument without a name.&nbsp;<br>
</div>
<div><br></div>
<div>w/o AA:<br>
</div>
<div>func :: a -&gt; a -&gt; a -&gt; a</div>
<div>func aa0 aa1 aa2 = aa0 `op` aa1 `op` aa2</div>
<div>
\aa0 aa1 aa2 -&gt; aa0 `op` aa1 `op` aa2</div>
<div><br></div>
<div>w/ AA:</div>
<div>func :: a -&gt; a -&gt; a -&gt; a</div>
<div>func = \0 `op` \1 `op` \2</div>
<div>\-&gt; \0 `op` \1 `op` \2</div>
<div><br></div>
<div>AA syntax: '\n', where n is one of the (0 1 2 3 4 5 6 7 8 9). 'n' corresponds to the position of a parameter.</div>
<div><br></div>
<div>I think a language shouldn't force you to invent names for things that are used only once, same philosophy as with an anonymous function.</div>
<div><br></div>
<div>Is this feature needed? Does something like this already exist?<br>
</div>
<div><br></div>
</div></div>
Roger Mason | 29 Aug 21:37 2014
Picon
Picon

Can't compile Diagrams tutorial example

Hello,

I have the following code from the Diagrams package tutorial:

> {-# LANGUAGE NoMonomorphismRestriction #-}
> 
> import Diagrams.Prelude
> import Diagrams.Backend.SVG.CmdLine

> main = mainWith (example :: Diagram B R2)
> example = circle 1 # fc blue
>                    # lw veryThick
>                    # lc purple
>                    # dashing [0.2,0.05] 0

I get the following error on compilation using GHC 7.6.3:

ghc --make DiagramsTutorial-2.lhs

[1 of 1] Compiling Main             ( DiagramsTutorial-2.lhs, DiagramsTutorial-2.o )

DiagramsTutorial-2.lhs:10:33:
    Could not deduce (Fractional (Measure R2))
      arising from the literal `0.2'
    from the context (TrailLike b,
                      Transformable b,
                      HasStyle b,
                      V b ~ R2)
      bound by the inferred type of
               example :: (TrailLike b, Transformable b, HasStyle b, V b ~ R2) =>
                          b
      at DiagramsTutorial-2.lhs:(7,3)-(10,43)
    Possible fix:
      add an instance declaration for (Fractional (Measure R2))
    In the expression: 0.2
    In the first argument of `dashing', namely `[0.2, 0.05]'
    In the second argument of `(#)', namely `dashing [0.2, 0.05] 0'

DiagramsTutorial-2.lhs:10:43:
    Could not deduce (Num (Measure R2)) arising from the literal `0'
    from the context (TrailLike b,
                      Transformable b,
                      HasStyle b,
                      V b ~ R2)
      bound by the inferred type of
               example :: (TrailLike b, Transformable b, HasStyle b, V b ~ R2) =>
                          b
      at DiagramsTutorial-2.lhs:(7,3)-(10,43)
    Possible fix: add an instance declaration for (Num (Measure R2))
    In the second argument of `dashing', namely `0'
    In the second argument of `(#)', namely `dashing [0.2, 0.05] 0'
    In the expression:
      circle 1 # fc blue # lw veryThick # lc purple
      # dashing [0.2, 0.05] 0

Thanks for any help.

Roger
Peter | 28 Aug 14:18 2014
Picon

Why is cabal trying to install a particular dependency?

Sometimes I want to know why installing package X will require package Y.
After a lot of recursive manual inspection of .cabal files and --dry-run, I
discover that X depends on A, which depends on B, which depends on C, which
requires Y unless some flag is specified.

Is there a way to ask cabal to tell me this?

Frank | 27 Aug 04:33 2014
Picon

LYAHFGG, chapter 11 question

About "Learn You a Haskell ...", is it My imagination or is chapter 11 absurdly long and/or thick? I can (and have) read a 100+ page U.S. Supreme Court ruling, readily understand it, and be able to explain it in plain English, with next to zero trouble. I spend every work day reading, parsing, interpreting, and using, the ISO C++ standard. I taught My undergraduate Physics IV class while simultaneously taking it. Yet, chapter 11 feels as if it goes on and on to the point I easily forget what I read just a few lines before, rendering comprehension of the same an almost Sisyphean task. Is it just Me? Am I just tired? Is there an alternative resource for understanding the concepts that particular chapter presents?

Sincerely,
Frank D. Martinez

--
P.S.: I prefer to be reached on BitMessage at BM-2D8txNiU7b84d2tgqvJQdgBog6A69oDAx6
<div><div dir="ltr">About "Learn You a Haskell ...", is it My imagination or is chapter 11 absurdly long and/or thick? I can (and have) read a 100+ page U.S. Supreme Court ruling, readily understand it, and be able to explain it in plain English, with next to zero trouble. I spend every work day reading, parsing, interpreting, and using, the ISO C++ standard. I taught My undergraduate Physics IV class while simultaneously taking it. Yet, chapter 11 feels as if it goes on and on to the point I easily forget what I read just a few lines before, rendering comprehension of the same an almost Sisyphean task. Is it just Me? Am I just tired? Is there an alternative resource for understanding the concepts that particular chapter presents?<div>

<br>
</div>
<div>Sincerely,</div>
<div>Frank D. Martinez<br clear="all"><div><br></div>-- <br>P.S.: I prefer to be reached on BitMessage at BM-2D8txNiU7b84d2tgqvJQdgBog6A69oDAx6
</div>
</div></div>
Jeff C. Britton | 27 Aug 00:07 2014

Haskeline and forkIO

I am trying to modify an example in RealWorldHaskell from Chapter 24.
The example is the first code snippet labeled -- file: ch24/Compressor.hs

I am trying to replace the use of Readline with Haskeline.
In my code the forkIO thread does not run.
I guessed that since the result of the worker thread was thrown away that perhaps laziness was the problem.
So, I attempted to use `seq`, but that does not work either.

I am able to run the RealWorldHaskell example.
I am using GHC 7.8.3.
I have tried runhaskell with and without the -threaded option and on both Linux and Windows 7.

import Control.Concurrent (forkIO)
import Control.Exception
import qualified Data.ByteString.Lazy as L
import System.Console.Haskeline hiding (handle)

-- Provided by the 'zlib' package on http://hackage.haskell.org/
import Codec.Compression.GZip (compress)

-- Read the file, compress the data, write the compressed data
worker :: FilePath -> IO ()
worker path = L.readFile path >>= L.writeFile (path ++ ".gz") . compress

-- Run the worker on a new thread
runWorker :: FilePath -> IO()
runWorker path = handle (print :: SomeException -> IO ()) $ do
    forkIO (worker path)
    return ()

loop :: InputT IO ()
loop = do
    maybeLine <- getInputLine "Enter a file to compress> "
    case maybeLine of
      Nothing -> return ()      -- user entered EOF
      Just "" -> return ()      -- treat no name as "want to quit"
      Just path ->
          let f = runWorker path
          in
              f `seq` do
                return f
                loop

main = runInputT defaultSettings loop
Vale Cofer-Shabica | 26 Aug 20:16 2014
Picon

do notation, pattern matching, if, & case

I'm working on a cli program where I'd like to take input from a file
or stdin. I've managed to get my program to work but thought my
dispatch mechanism could be simplified. I use a scheme along the lines
of f in the following minimal example, which compiles. However, if I
try to use f' or f'', I get parse errors. Three questions:

* Is there a better way of doing this
* Are stylistic changes to f really called for?
* How can/ought I correct my syntax errors?

Many thanks,
vale

>module MinimalExample where
>import System.IO (getContents)

>f :: String -> IO ()
>f "-" = do
>  s <- getContents
>  putStrLn s
>f file = do
>  s <- readFile file
>  putStrLn s

>-- f' :: String -> IO ()
>-- f' file = do
>--   if file == "-"
>--     then s <- getContents
>--     else s <- readFile file
>--   putStrLn s

>-- f'' :: String -> IO ()
>-- f'' file = do
>--   case file of
>--     "-" -> s <- getContents
>--     _ -> s <- readFile file
>--   putStrLn s

--
vale cofer-shabica
vale.cofershabica <at> gmail.com
Madhu Babu | 26 Aug 06:51 2014
Picon

2014 haskell cabal update hangs on mac

I initially installed haskell platform ( 2013 version; 7.6.3 ghc ) on my mac. Everything was working great. Just now saw the haskell platform website again and found new version was released ( Haskell Platform 2014.2.0.0 for Mac OS X, 64bit ). I installed it, and un-installed the older version using uninstall-hs.

Now when i type "cabal" or "cabal update" on my terminal, it hangs. Actually when i look into Activity Monitor, i can see that it is invoking some "sh script & possibly some find command" infinitely. I initially guess may be it is building some indexes. but it has been running for an hr or so.

I have Xcode 5, gcc and other command line tools installed properly

Please advice. I cannot install any other package using cabal.


<div><div dir="ltr">
<p>
I initially installed haskell platform ( 2013 version; 7.6.3 ghc ) on my mac. Everything was working great. Just now saw the haskell platform website again and found new version was released ( Haskell Platform 2014.2.0.0 for Mac OS X, 64bit ). I installed it, and un-installed the older version using uninstall-hs.</p>
<p>
Now when i type "cabal" or "cabal update" on my terminal, it hangs. Actually when i look into Activity Monitor, i can see that it is invoking some "sh script &amp; possibly some find command" infinitely. I initially guess may be it is building some indexes. but it has been running for an hr or so.</p>
<p>
I have Xcode 5, gcc and other command line tools installed properly</p>
<p>
Please advice. I cannot install any other package using cabal.</p>
<p>
<br></p>
</div></div>
felipe zapata | 25 Aug 19:12 2014
Picon

Re: Beginners Digest, Vol 74, Issue 22

Dear List,
I have a problem with me new smartphone.

Sorry for the inconvenient.

Best,

FelipeZ


On 25 August 2014 08:00, <beginners-request <at> haskell.org> wrote:
Send Beginners mailing list submissions to
        beginners <at> 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-request <at> haskell.org

You can reach the person managing the list at
        beginners-owner <at> haskell.org

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


Today's Topics:

   1.  ? Beginners, Felipe left a message for you (Felipe)


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

Message: 1
Date: Sun, 24 Aug 2014 21:15:00 +0000
From: Felipe <noreply+1034183911 <at> badoo.com>
To: beginners <at> haskell.org
Subject: [Haskell-beginners] ? Beginners, Felipe left a message for
        you
Message-ID: <20140824211500.73654BE015F <at> cluster2020.monopost.com>
Content-Type: text/plain; charset="utf-8"

Felipe left a message for you

Its sender and content will be shown only to you and you can delete it at any time. You can instantly reply to it, using the message exchange system. To find out what was written to you, just follow this link:
http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=106&g=57-0-4&m=21&mid=53fa55d100000000006a004d040ac2d10195f43a0047


If clicking the links in this message does not work,
copy and paste them into the address bar of your browser.


This email is a part of delivering a message sent by Felipe on the system. If you received this email by mistake, please just ignore it. After a short time the message will be removed from the system.


Have fun!
The Badoo Team

You have received this email from Badoo Trading Limited (postal address below).
If you do not wish to receive further email communications from Badoo click here to opt out: https://us1.badoo.com/impersonation.phtml?lang_id=106&email=beginners%40haskell.org&block_code=e980da&m=21&mid=53fa55d100000000006a004d040ac2d10195f43a0047&g=0-0-4.
Badoo Trading Limited is a limited company registered in England and Wales
under CRN 7540255 with its registered office at Media Village, 131 - 151 Great Titchfield Street, London, W1W 5BB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140824/f742e623/attachment-0001.html>

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

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners <at> haskell.org
http://www.haskell.org/mailman/listinfo/beginners


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

End of Beginners Digest, Vol 74, Issue 22
*****************************************

<div>
<div dir="ltr">Dear List,<div>I have a problem with me new smartphone.</div>
<div><br></div>
<div>Sorry for the inconvenient.</div>
<div><br></div>
<div>Best,</div>
<div><br></div>
<div>FelipeZ</div>
</div>
<div class="gmail_extra">
<br><br><div class="gmail_quote">On 25 August 2014 08:00,  <span dir="ltr">&lt;<a href="mailto:beginners-request <at> haskell.org" target="_blank">beginners-request <at> haskell.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Send Beginners mailing list submissions to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:beginners <at> haskell.org">beginners <at> haskell.org</a><br><br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
or, via email, send a message with subject or body 'help' to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:beginners-request <at> haskell.org">beginners-request <at> haskell.org</a><br><br>
You can reach the person managing the list at<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:beginners-owner <at> haskell.org">beginners-owner <at> haskell.org</a><br><br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Beginners digest..."<br><br><br>
Today's Topics:<br><br>
&nbsp; &nbsp;1.&nbsp; ? Beginners, Felipe left a message for you (Felipe)<br><br><br>
----------------------------------------------------------------------<br><br>
Message: 1<br>
Date: Sun, 24 Aug 2014 21:15:00 +0000<br>
From: Felipe &lt;<a href="mailto:noreply%2B1034183911 <at> badoo.com">noreply+1034183911 <at> badoo.com</a>&gt;<br>
To: <a href="mailto:beginners <at> haskell.org">beginners <at> haskell.org</a><br>
Subject: [Haskell-beginners] ? Beginners, Felipe left a message for<br>
&nbsp; &nbsp; &nbsp; &nbsp; you<br>
Message-ID: &lt;<a href="mailto:20140824211500.73654BE015F <at> cluster2020.monopost.com">20140824211500.73654BE015F <at> cluster2020.monopost.com</a>&gt;<br>
Content-Type: text/plain; charset="utf-8"<br><br>
Felipe left a message for you<br><br>
Its sender and content will be shown only to you and you can delete it at any time. You can instantly reply to it, using the message exchange system. To find out what was written to you, just follow this link:<br><a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=106&amp;g=57-0-4&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047" target="_blank">http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=106&amp;g=57-0-4&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047</a><br><br><br>
If clicking the links in this message does not work,<br>
copy and paste them into the address bar of your browser.<br><br><br>
This email is a part of delivering a message sent by Felipe on the system. If you received this email by mistake, please just ignore it. After a short time the message will be removed from the system.<br><br><br>
Have fun!<br>
The Badoo Team<br><br>
You have received this email from Badoo Trading Limited (postal address below).<br>
If you do not wish to receive further email communications from Badoo click here to opt out: <a href="https://us1.badoo.com/impersonation.phtml?lang_id=106&amp;email=beginners%40haskell.org&amp;block_code=e980da&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047&amp;g=0-0-4" target="_blank">https://us1.badoo.com/impersonation.phtml?lang_id=106&amp;email=beginners%40haskell.org&amp;block_code=e980da&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047&amp;g=0-0-4</a>.<br>

Badoo Trading Limited is a limited company registered in England and Wales<br>
under CRN 7540255 with its registered office at Media Village, 131 - 151 Great Titchfield Street, London, W1W 5BB.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://www.haskell.org/pipermail/beginners/attachments/20140824/f742e623/attachment-0001.html" target="_blank">http://www.haskell.org/pipermail/beginners/attachments/20140824/f742e623/attachment-0001.html</a>&gt;<br><br>
------------------------------<br><br>
Subject: Digest Footer<br><br>
_______________________________________________<br>
Beginners mailing list<br><a href="mailto:Beginners <at> haskell.org">Beginners <at> haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br><br><br>
------------------------------<br><br>
End of Beginners Digest, Vol 74, Issue 22<br>
*****************************************≤br>
</blockquote>
</div>
<br>
</div>
</div>
Felipe | 24 Aug 23:15 2014

★ Beginners, Felipe left a message for you

Felipe left a message for you

You can instantly reply using our message exchange system.

Check your message



This email is part of our delivery procedure for the message sent by Felipe. If you have received this email by mistake, please ignore it. The message will be deleted soon.

Have fun!
The Badoo Team

You have received this email from Badoo Trading Limited (postal address below). If you do not wish to receive further email communications from Badoo, please click here to opt out.
Badoo Trading Limited is a limited company registered in England and Wales under CRN 7540255 with its registered office at Media Village, 131 - 151 Great Titchfield Street, London, W1W 5BB.

<div>
<div>
<table width="80%" border="0" cellpadding="0" cellspacing="0"><tr>
<td width="10%"></td>
<td align="left" width="90%">
<div>See this email in <a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=3&amp;g=57-0-1&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047">English</a>, <a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=5&amp;g=57-1-1&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047">Deutsch</a>, <a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=6&amp;g=57-2-1&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047">Fran&ccedil;ais</a>, <a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=8&amp;g=57-3-1&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047">Italiano</a>, <a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=7&amp;g=57-4-1&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047">Espa&ntilde;ol</a>, <a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=61&amp;g=57-5-1&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047">Portugu&ecirc;s</a> or <a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=106&amp;g=57-6-1&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047">36 other languages</a>.</div>
<h2>Felipe left a message for you</h2>
You can instantly reply using our message exchange system.
<br><br><table cellpadding="0" cellspacing="0"><tr>
<td><a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=106&amp;g=57-7-2&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047"></a></td>
<td><a href="http://us1.badoo.com/01300371749/in/lUW1caPE.5c/?lang_id=106&amp;g=57-8-1&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047">Check your message</a></td>
</tr></table>
<br><br><br>
This email is part of our delivery procedure for the message sent by Felipe. If you have received this email by mistake, please ignore it. The message will be deleted soon.
<br><br>
Have fun!<br>
The Badoo Team

<br><br><p>You have received this email from Badoo Trading Limited (postal address below). If you do not wish to receive further email communications from Badoo, please <a href="https://us1.badoo.com/impersonation.phtml?lang_id=106&amp;email=beginners%40haskell.org&amp;block_code=e980da&amp;m=21&amp;mid=53fa55d100000000006a004d040ac2d10195f43a0047&amp;g=0-0-1">click here</a> to opt out.<br>
Badoo Trading Limited is a limited company registered in England and Wales under CRN 7540255 with its registered office at Media Village, 131 - 151 Great Titchfield Street, London, W1W 5BB.
</p>

</td>
</tr></table>
</div>
</div>
Frank | 21 Aug 17:27 2014
Picon

Detecting duplicate code by AST?

Hi,

    Can Anyone point Me in the direction of a tool/method of detecting code duplicates based on analysis of abstract syntax trees (ASTs)? If not, is there a way to dump the ASTs of a Haskell project? Is this something for Template Haskell to handle?

Sincerely,
Frank D. Martinez


--
P.S.: I prefer to be reached on BitMessage at BM-2D8txNiU7b84d2tgqvJQdgBog6A69oDAx6
<div>
<p>Hi,<br></p>
<div>&nbsp; &nbsp; Can Anyone point Me in the direction&nbsp;<span></span>of a tool/method of detecting code duplicates based on analysis of abstract syntax trees (ASTs)? If not, is there a way to dump the&nbsp;ASTs of a Haskell project? Is this something for&nbsp;Template Haskell to handle?</div>
<div><br></div>
<div>Sincerely,</div>
<div>Frank D. Martinez</div>
<br><br>-- <br>P.S.: I prefer to be reached on BitMessage at BM-2D8txNiU7b84d2tgqvJQdgBog6A69oDAx6<br>
</div>
Chul-Woong Yang | 20 Aug 11:59 2014

Question on evaluating function compostion

Hi, all

I'm having trouble in understanding function evaluation in Haskell.
I came across the following line, which is somewhat cryptic to me.
(liftM . (+)) 1 [2]  
Could you explain how the expression evaluates?

I thought that to evalutate two composed functions,
I should apply right function to get a result and then
apply left function with the result.
e.g. f.g x y = f (g x y) = f z = result

So I guessed that Haskell evaluated above expression
as follows:
(liftM . (+)) 1 [2]   --->
  ((liftM . (+)) 1) [2]  --->       (A)
  (liftM (+1)) [2] -->
  [3]

Why did Haskell, however, not try to fully evaluate addition, 
like following?
(liftM . (+)) 1 [2]   --->
  liftM ((+) 1 [2])   --->
  error

Does (f . g) x y z equal ((((f . g) x) y) z)  in haskell?

Any guide will be appreciated.

Chul-Woong

<div><div dir="ltr">Hi, all<div><br></div>
<div>I'm having trouble in understanding function evaluation in Haskell.</div>
<div>I came across the following line, which is somewhat cryptic to me.</div>
<div>(liftM . (+)) 1 [2] &nbsp;<br>
</div>
<div><div>Could you explain how the expression evaluates?<br>
</div></div>
<div><br></div>
<div>I thought that to evalutate two composed functions,</div>
<div>I should apply right function to get a result and then</div>

<div>apply left function with the result.</div>
<div>e.g. f.g x y = f (g x y) = f z = result</div>
<div><br></div>
<div>So I guessed that Haskell evaluated above expression</div>
<div>as follows:</div>
<div>(liftM . (+)) 1 [2] &nbsp; ---&gt;<br>
</div>
<div>&nbsp; ((liftM . (+)) 1) [2] &nbsp;---&gt; &nbsp; &nbsp; &nbsp; (A)</div>
<div>&nbsp; (liftM (+1)) [2] --&gt;</div>
<div>&nbsp; [3]<br>
</div>
<div><br></div>
<div>Why did Haskell, however, not try to fully evaluate addition,&nbsp;</div>
<div>like following?<br>
</div>
<div>(liftM . (+)) 1 [2] &nbsp; ---&gt;<br>
</div>
<div>&nbsp; liftM ((+) 1 [2]) &nbsp; ---&gt;</div>
<div>&nbsp; error</div>
<div><br></div>
<div>Does (f . g) x y z equal ((((f . g) x) y) z) &nbsp;in haskell?</div>
<div><br></div>
<div>Any guide will be appreciated.</div>

<div><br></div>
<div>Chul-Woong</div>
<div><br></div>
</div></div>

Gmane