Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/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:  trees on Haskell : Do I understand it right ? (Roelof Wobben)
   2. Re:  trying to install libraries for Haskell School of
      Expression (DJ)
   3. Re:  trying to install libraries for Haskell School of
      Expression (DJ)
   4. Re:  trying to install libraries for Haskell      School of
      Expression (Thomas Bach)


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

Message: 1
Date: Sun, 01 Mar 2015 20:02:42 +0100
From: Roelof Wobben <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] trees on Haskell : Do I understand it
        right ?
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed

Here the diagram for 1 messages : http://imgur.com/yuzXUNB

In haskell it would be  Node Message1 leaf leaf

Roelof


Roelof Wobben schreef op 1-3-2015 om 19:08:
> Hello,
>
> Im looking for goofd online software to make the diagrams.
> As soon as I find it . I will publish them on the ML.
>
> Roelof
>
> Joel Neely schreef op 1-3-2015 om 14:45:
>> Roelof,
>>
>> Perhaps it would help for you to draw diagrams for the cases you're 
>> working.
>> If a leaf has nothing below it, and a node always has exactly three 
>> things below it (the left child, the message, and the right child),
>> what would your picture look like for 1, 2, and 3 nodes?
>> And how would you write out constructor expressions that match those 
>> shapes?
>>
>> Hope that helps,
>> -jn-
>>
>>
>> On Thu, Feb 26, 2015 at 12:32 PM, Roelof Wobben <[email protected] 
>> <mailto:[email protected]>> wrote:
>>
>>     Oke,
>>
>>     I send it a second time but now in plain text.
>>
>>     So for 3 it will be like this :
>>
>>     Node = Node  (Node Leaf "msg1" Leaf) (Node Leaf "msg2") (Node     
>> "msg3" Leaf)  ???
>>
>>
>>     Roelof
>>
>>
>>
>>>
>>>
>>>     Konstantine Rybnikov schreef op 26-2-2015 om 15:08:
>>>>     In my second example you can see a minimal node with a message:
>>>>
>>>>     node = Node Leaf "msg" Leaf
>>>>
>>>>     Instead of either left or right Leaf you can put another value
>>>>     of type MessageTree, for example:
>>>>
>>>>     node = Node Leaf "msg1" (Node Leaf "msg2" Leaf)
>>>>
>>>>     On Thu, Feb 26, 2015 at 4:01 PM, Roelof Wobben <[email protected]
>>>>     <mailto:[email protected]>> wrote:
>>>>
>>>>         Oke,
>>>>
>>>>         So a leaf is a node which has no "branch"
>>>>
>>>>         I have made a exercise where I have to made the logMessages.
>>>>         Now I have to turn them into a tree
>>>>
>>>>         Where does the second entry goes then ?
>>>>
>>>>         Roelof
>>>>
>>>>
>>>>         Konstantine Rybnikov schreef op 26-2-2015 om 14:56:
>>>>>         Hi Roelof,
>>>>>
>>>>>         I think you misunderstood it.
>>>>>
>>>>>         There are two things here: types and values
>>>>>         (value-constructors). They exist in different world, not
>>>>>         touching each other.
>>>>>
>>>>>         In Haskell, you define a type as:
>>>>>
>>>>>         data <Type_Name> = <ValueConstructor_Name> <Type_Name>
>>>>>         <Type_Name> <Type_Name>
>>>>>
>>>>>         You can create values as:
>>>>>
>>>>>         let varName = <ValueConstructor_Name> <Value> <Value> <Value>
>>>>>
>>>>>         You need to put <Value> of some type, not type name itself
>>>>>         in place of those <Value>s.
>>>>>
>>>>>         So, with datatype you provided, you have two 
>>>>> data-constructors:
>>>>>
>>>>>         Leaf
>>>>>
>>>>>         and
>>>>>
>>>>>         Node <val> <val> <val>
>>>>>
>>>>>         You can create a leaf:
>>>>>
>>>>>         let leaf = Leav
>>>>>
>>>>>         or a node:
>>>>>
>>>>>         let node = Node Leaf "msg" Leaf
>>>>>
>>>>>         You can see that Node is a data-constructor that takes 3
>>>>>         values, not type-names as it's parameters.
>>>>>
>>>>>         Hope this helps.
>>>>>
>>>>>         On Thu, Feb 26, 2015 at 3:21 PM, Roelof Wobben
>>>>>         <[email protected] <mailto:[email protected]>> wrote:
>>>>>
>>>>>             Hello,
>>>>>
>>>>>             Suppose we have this definition of a tree :
>>>>>
>>>>>             data MessageTree = Leaf
>>>>>                              | Node MessageTree LogMessage 
>>>>> MessageTree
>>>>>               deriving (Show, Eq)
>>>>>
>>>>>             let Message  = LogMessage "E 1 this is a test error"
>>>>>             let Message = LogMessage "e 2 this is the second test
>>>>>             error "
>>>>>
>>>>>             As I understand it right I can make the first entry
>>>>>             like this : first_entry = Node Messagetree Message
>>>>>             Messagetree
>>>>>
>>>>>             And the second one like this second_entry = Node
>>>>>             Message Messagetree Message2 Messagetree ??
>>>>>
>>>>>             Roelof
>>>>>
>>>>> _______________________________________________
>>>>>             Beginners mailing list
>>>>>             [email protected] <mailto:[email protected]>
>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>         _______________________________________________
>>>>>         Beginners mailing list
>>>>>         [email protected] <mailto:[email protected]>
>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>>>
>>>>
>>>>         _______________________________________________
>>>>         Beginners mailing list
>>>>         [email protected] <mailto:[email protected]>
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>>>
>>>>
>>>>
>>>>
>>>>     _______________________________________________
>>>>     Beginners mailing list
>>>>     [email protected] <mailto:[email protected]>
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>>
>>
>>
>>     _______________________________________________
>>     Beginners mailing list
>>     [email protected] <mailto:[email protected]>
>>     http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>>
>>
>>
>> -- 
>> Beauty of style and harmony and grace and good rhythm depend on 
>> simplicity. - Plato
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>



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

Message: 2
Date: Sun, 01 Mar 2015 14:27:51 -0500
From: DJ <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] trying to install libraries for
        Haskell School of Expression
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

Yeah. I think there are a lot of us out there. I won't rant (much) here, 
because I hope to get some help from time to time. Alienating people is 
not a good way to get help.

But:

There are many things I like about the language, but I have always been 
perplexed by the haskell ecosystem in a couple of ways. However good 
and/or interesting a language might be, it is not possible to do meat 
and potatoes development unless there is a good supply of 
packages/libraries.

My first problem was that I often just could not get stuff to install. 
The second problem was documentation. I hope it has improved a bit. I 
was always flabbergasted at the (apparent) belief that a few lines of 
API documentation coughed out by haddock are enough. But that's all 
there was in a lot of cases. That, and "refer to xxxx research paper" 
and "figure it out from the types". Hah. Any math paper that consisted 
of just the equations sorted in alphabetical order would not be well 
received, I think.

I really admired that fact that Michael Snoyman wrote a book about 
Yesod. For all I know he may not have kept the book up, but at least he 
realized that people needed an explanation of how to use his software.

Well, back to work. I am going to give haskell another try for sure. 
It's just too tempting to give up on. If it doesn't work, the next stop 
will be sml or ocaml.

Best,

- DJ -

On 15-03-01 09:56 AM, emacstheviking wrote:
> I feel your pain...
>
>     Confession: I abandoned Haskell two years ago because of
>     frustration with cabal and hackage. I decided to get back to the
>     language today, and to start with Haskell School of Expression. I
>     immediately run into the problem that the first thing I try to
>     install with cabal does not work.
>
> It is the same reason I have stopped using it. It's a real shame. 
> Those with better education and understanding than mine should be 
> concerned that the uptake of the language is stunted by its package 
> manager.
>
> I love Haskell. I have taught myself (the beginnings at least) of 
> group theory just to better comprehend the mindset of monads. For that 
> alone I am glad I learned Haskell as it has rekindled my interest in 
> maths!
>
>     Thanks for any help. Please tell me things are not just as bad now
>     as they were when I left ;-)
>
> This mail seems to indicate to me that "cabal hell" is here for some 
> time to come...
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20150301/d3d93d65/attachment-0001.html>

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

Message: 3
Date: Sun, 01 Mar 2015 14:31:58 -0500
From: DJ <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] trying to install libraries for
        Haskell School of Expression
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

Brandon: Thanks. I did have to install some gtk libraries. I am also 
working in a sandbox now. This moved things ahead somewhat. But I am 
getting this now from 'cabal install soegtk':

Graphics/SOE/Gtk.hs:94:18:
     Could not find module `System.Time'
     It is a member of the hidden package `old-time-1.1.0.1'.
     Perhaps you need to add `old-time' to the build-depends in your 
.cabal file.
     Use -v to see a list of the files searched for.
Failed to install soegtk-0.9.12.2

I have forgotten anything I once knew about using cabal. I apologize for 
not learning how to deal with the above on my own, but I am hoping to 
get over this hump as quickly and painlessly as possible so I don't lose 
my momentum getting back to Haskell.

So, can anyone give me a hint how to fix the above?

Best,

- DJ -


On 15-03-01 02:29 AM, Brandon Allbery wrote:
> On Sat, Feb 28, 2015 at 11:40 PM, DJ <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     I am running linux mint 17 with the latest (as of Feb. 28) haskell
>     platform and cabal-install.
>     I did install gtk2hs-buildtools and put the .cabal/bin in my path.
>
>
> Do you have the devel libraries needed by gtk installed? cabal cannot 
> install them for you, and the runtime libraries are not sufficient. 
> You'll want libcairo2-dev for this, and others for other gtk 
> components (notably libgtk-3-dev but there will be others as well).
>
> -- 
> brandon s allbery kf8nh sine nomine associates
> [email protected] <mailto:[email protected]> 
> [email protected] <mailto:[email protected]>
> unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20150301/7f55a2dc/attachment-0001.html>

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

Message: 4
Date: Sun, 1 Mar 2015 21:07:52 +0100
From: Thomas Bach <[email protected]>
To: DJ <[email protected]>
Cc: [email protected]
Subject: Re: [Haskell-beginners] trying to install libraries for
        Haskell School of Expression
Message-ID: <[email protected]>
Content-Type: text/plain

DJ <[email protected]> writes:

> Graphics/SOE/Gtk.hs:94:18:
> Could not find module `System.Time'
> It is a member of the hidden package `old-time-1.1.0.1'.
> Perhaps you need to add `old-time' to the build-depends in your .cabal
> file.

That is actually all you have to do: in the cabal file of your package
you have either a 'library' section or an 'executable' section. These
should have a field 'build-depends' simply add 'old-time >= 1.1 && <
1.2' their.

See for example the cabal file of the lens package:
https://github.com/ekmett/lens/blob/master/lens.cabal

If you don't have a cabal file you can initialize one via 'cabal init'
or simply install the package in the sandbox via running 'cabal install
old-time-1.1' in your sandbox, i.e. the directory you ran 'cabal sandbox
init' beforehand.


Regards
        Thomas.


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

Subject: Digest Footer

_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


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

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

Reply via email to