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:  How to compile stub? (Haisheng Wu)
   2.  yesod dependency hell (Michael Litchard)
   3. Re:  [web-devel] yesod dependency hell (Michael Snoyman)
   4. Re:  [web-devel] yesod dependency hell (Michael Litchard)
   5.  Homework help - calculator function (SM Design)


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

Message: 1
Date: Wed, 22 Jun 2011 22:30:35 +0800
From: Haisheng Wu <[email protected]>
Subject: Re: [Haskell-beginners] How to compile stub?
To: Zhi-Qiang Lei <[email protected]>
Cc: Haskell Beginer <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Not quite understand...
You might like to parse full code to somewhere like http://hpaste.org/ and
provide url..
-Haisheng


On Wed, Jun 22, 2011 at 4:54 PM, Zhi-Qiang Lei <[email protected]>wrote:

> Hi,
>
> My attempt which compiles some files with stub failed. Can you tell me how
> to compile them? Thanks.
>
> PrettyJSON.hs:
>
> renderJValue :: JValue -> Doc
> renderJValue (JBool True)  = text "true"
> renderJValue (JBool False) = text "false"
> renderJValue JNull         = text "null"
> renderJValue (JNumber num) = double num
> renderJValue (JString str) = string str
>
> PrettyStub.hs:
>
> import SimpleJSON
>
> data Doc = ToBeDefined
>         deriving (Show)
>
> string :: String -> Doc
> string str = undefined
>
> text :: String -> Doc
> text str = undefined
>
> double :: Double -> Doc
> double num = undefined
>
>
> Result:
>
> bogon% ghc -c PrettyJSON.hs PrettyStub.hs SimpleJSON.o
> Warning: the following files would be used as linker inputs, but linking is
> not being done: SimpleJSON.o
>
> PrettyJSON.hs:1:16:
>    Not in scope: type constructor or class `JValue'
>
> PrettyJSON.hs:1:26: Not in scope: type constructor or class `Doc'
>
> PrettyJSON.hs:2:14: Not in scope: data constructor `JBool'
>
> PrettyJSON.hs:2:29: Not in scope: `text'
>
> PrettyJSON.hs:3:14: Not in scope: data constructor `JBool'
>
> PrettyJSON.hs:3:29: Not in scope: `text'
>
> PrettyJSON.hs:4:13: Not in scope: data constructor `JNull'
>
> PrettyJSON.hs:4:29: Not in scope: `text'
>
> PrettyJSON.hs:5:14: Not in scope: data constructor `JNumber'
>
> PrettyJSON.hs:5:29: Not in scope: `double'
>
> PrettyJSON.hs:6:14: Not in scope: data constructor `JString'
>
> PrettyJSON.hs:6:29: Not in scope: `string'
>
> Best regards,
> Zhi-Qiang Lei
> [email protected]
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110622/80fcb7f0/attachment-0001.htm>

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

Message: 2
Date: Wed, 22 Jun 2011 12:29:40 -0700
From: Michael Litchard <[email protected]>
Subject: [Haskell-beginners] yesod dependency hell
To: web-devel <[email protected]>, [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

I need to use yesod-form 0.2.0. The problem is that the yesod package,
and the yesod-auth package expect yesod-form to be 0.1.0*
I tried changing the .cabal files but that breaks in ways that makes
me think the fix is not so simple. How do I go about being able to use
yesod-form 0.2.0



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

Message: 3
Date: Wed, 22 Jun 2011 22:32:18 +0300
From: Michael Snoyman <[email protected]>
Subject: Re: [Haskell-beginners] [web-devel] yesod dependency hell
To: Michael Litchard <[email protected]>
Cc: [email protected], web-devel <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Have a look at the yesodwiki[1]; basically, you can't use the yesod
package itself, only the subpackages. This is by design so that a
single Yesod release will keep API stability, while users can still
experiment with newer versions of underlying packages.

Michael

[1] https://github.com/snoyberg/yesodwiki/blob/master/yesodwiki.cabal

On Wed, Jun 22, 2011 at 10:29 PM, Michael Litchard <[email protected]> wrote:
> I need to use yesod-form 0.2.0. The problem is that the yesod package,
> and the yesod-auth package expect yesod-form to be 0.1.0*
> I tried changing the .cabal files but that breaks in ways that makes
> me think the fix is not so simple. How do I go about being able to use
> yesod-form 0.2.0
>
> _______________________________________________
> web-devel mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/web-devel
>



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

Message: 4
Date: Wed, 22 Jun 2011 13:30:42 -0700
From: Michael Litchard <[email protected]>
Subject: Re: [Haskell-beginners] [web-devel] yesod dependency hell
To: Michael Snoyman <[email protected]>
Cc: [email protected], web-devel <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Configuring Aframe-0.0.1...
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package yesod-auth-0.4.0.2 requires yesod-form-0.1.0.1
package yesod-0.8.2.1 requires yesod-form-0.1.0.1
package Aframe-0.0.1 requires yesod-form-0.2.0

I specified in Aframe.cabal yesod-form 0.2.0. The above warning is
what I was looking to avoid. What is the solution to this problem? I
could not find an obvious solution in yesodwiki.cabal, even though I
see it's doing something similar to what I want. How did you deal with
the above warning message?

On Wed, Jun 22, 2011 at 12:32 PM, Michael Snoyman <[email protected]> wrote:
> Have a look at the yesodwiki[1]; basically, you can't use the yesod
> package itself, only the subpackages. This is by design so that a
> single Yesod release will keep API stability, while users can still
> experiment with newer versions of underlying packages.
>
> Michael
>
> [1] https://github.com/snoyberg/yesodwiki/blob/master/yesodwiki.cabal
>
> On Wed, Jun 22, 2011 at 10:29 PM, Michael Litchard <[email protected]> 
> wrote:
>> I need to use yesod-form 0.2.0. The problem is that the yesod package,
>> and the yesod-auth package expect yesod-form to be 0.1.0*
>> I tried changing the .cabal files but that breaks in ways that makes
>> me think the fix is not so simple. How do I go about being able to use
>> yesod-form 0.2.0
>>
>> _______________________________________________
>> web-devel mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/web-devel
>>
>



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

Message: 5
Date: Wed, 22 Jun 2011 23:38:21 +0300 (EEST)
From: SM Design <[email protected]>
Subject: [Haskell-beginners] Homework help - calculator function
To: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="utf-8"

 
 I have a homework which is very important to be done but I can't complete the 
task at all. The program i should write is:       Make calculator-   function 
in  
Haskell.     The function argument is a list of strings and also form such
    list, as each string of the argument made definite action.     ? If the 
string has the form of an arithmetic expression - calculate this
    expression.
    The string result becomes part of the list-    result.
    If the expression contains a variable which is not
    assigned value, the result is displayed "undefined".     ? If the string 
has the form     Name =
          value calculated from the last expression is
    assigned to the variable with the corresponding name in the list, and in 
the result list    
is formed a string with type     name = ...     where the site stands blank 
corresponding value.     If there is not a calculated expression to be assigned 
to form a
    string "no value".     ? If the string is non-blank, but there is a species 
different from the above two
    case, form the string "error".     ? If the string is empty, incl.
    when it contains only spaces, in the result there is    
not form a string.     Expressions consist of integers without sign variables, 
operations
    + (Addition), - (subtraction), * (multiplication) and / (divide) and 
parentheses.
    Where no brackets, the operations are performed from left to right, but * 
and /
    precede the + and -.
    Implementation of any operation gives integer;
     in 
 the division 
 rejected 
 the fractional 
 part  , if 
 any .      Variables 
 have 
 names 
 of 
 one 
 letter 
 - 
 from the 
 Latin 
 small 
 letter  . 
    In the beginning, end or between the elements of each row can have
    spaces - they are irrelevant to its correctness.     Example: the 
list-argument     ["3 +7 / 2" "2 + x", "= s", "2 * s +4", "", "2 + +4 / 5]     
function should provide a result-list     ["6", "undefined", "s = 6", "16", 
"error"].                    Thank you an advance!   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110622/2a53749c/attachment.htm>

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

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


End of Beginners Digest, Vol 36, Issue 53
*****************************************

Reply via email to