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: A post about Currying and Partial application (Rustom Mody)
2. Trying out GuiTV (Martin Baldan)
3. Re: Trying out GuiTV (Brandon Allbery)
4. Re: Trying out GuiTV (Antoine Latter)
----------------------------------------------------------------------
Message: 1
Date: Sun, 2 Oct 2011 19:43:05 +0530
From: Rustom Mody <[email protected]>
Subject: Re: [Haskell-beginners] A post about Currying and Partial
application
To: [email protected]
Message-ID:
<CAJ+TeoccC9ouSTEAK=NfNwj198VaP2qC=yyyr074ktqsa2r...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On Sun, Oct 2, 2011 at 9:00 AM, Felipe Almeida Lessa <[email protected]
> wrote:
> On Sun, Oct 2, 2011 at 12:04 AM, Rustom Mody <[email protected]>
> wrote:
> > How would you classify a function of type (Int, Int) -> Int -> Int ?
>
> It's curried. Uncurried would be:
>
> ((Int, Int), Int) -> Int
>
Yes, if you mean that uncurrying it gives the type ((Int, Int), Int) -> Int
But it can also be curried to get the type Int -> Int -> Int -> Int
Does that not make it uncurried as well?
> > Likewise if we have a polymorphic foo: Int -> a and we instantiate a to
> Int
> > -> Int does foo suddenly get curried?
>
> Int -> a is both curried and uncurried. Int -> Int -> Int is just curried.
>
> --
> Felipe.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20111002/ff169572/attachment-0001.htm>
------------------------------
Message: 2
Date: Mon, 3 Oct 2011 02:53:14 +0200
From: Martin Baldan <[email protected]>
Subject: [Haskell-beginners] Trying out GuiTV
To: [email protected]
Message-ID:
<camxdz4ev5thpbsyeke7frjqj5tacwo_5s3oa9gksxbnvn0a...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hello all,
I hope this is the right place to ask :)
I'm very new to Haskell, but I'm intrigued with the concept of
"tangible values". I'm trying to run the examples from Conal Elliott's
TV library. I did Cabal install TV and GuiTV. Then I tried to compile
the examples from the GuiTV package, but no luck, so I decided to go
for something simpler, so I took the examples from the TV site
http://haskell.org/haskellwiki/TV
but I used the imports from the GuiTV package. I called the file
"myexample.hs" and it looks like this:
------------------
{-# LANGUAGE OverlappingInstances, UndecidableInstances
?????????? , IncoherentInstances, FlexibleContexts
?????????? , TypeSynonymInstances, FlexibleInstances
?????????? , MultiParamTypeClasses
?????????? #-}
-- For ghc 6.6 compatibility
{-# OPTIONS -fglasgow-exts -fallow-overlapping-instances
-fallow-incoherent-instances #-}
---- Some GuiTV examples.? See also the examples in TV.
import Data.List (sort)
-- my addition
import Data.Monoid
-- end my addition
import Interface.TV.UI
import Control.Arrow.DeepArrow
import Data.FunArr
-- TypeCompose
import Data.Title
-- To pick up the FunArr instance for OFun.
import Interface.TV.OFun()
reverseT :: CTV (String -> String)
reverseT = tv (oTitle "reverse" defaultOut) reverse
main = runUI reverseT
-----------------------
I don't understand the "#LANGUAGE" and "#OPTIONS" parts, I just left
them as they were. I assume that they don't influence the result,
since they are comments.
I also added the "import Data.Monoid" line, because of a previous
error message. I guess it doesn't hurt.
Then I type "ghc ./myexample.hs" and the output is:
------------------
myexample.o: In function `s2oa_info':
(.text+0x2b): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziDefaults_zdfDefaultOutsrcsnkZMZN0_closure'
myexample.o: In function `s2ob_info':
(.text+0x61): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziDefaults_zdfDefaultInsrcZMZN0_closure'
myexample.o: In function `s2od_info':
(.text+0xc6): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziDefaults_zdfDefaultOutsrcsnkZLzmzgZR_closure'
myexample.o: In function `s2of_info':
(.text+0x169): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziOutput_oTitle_closure'
myexample.o: In function `r1jF_info':
(.text+0x1b7): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziTangible_tv_closure'
myexample.o: In function `r2nX_info':
(.text+0x224): undefined reference to
`GuiTVzm0zi4_InterfaceziTVziUI_zdfCommonOutsZCzi_closure'
myexample.o: In function `r2nX_info':
(.text+0x22b): undefined reference to
`GuiTVzm0zi4_InterfaceziTVziUI_zdfCommonInsZCzi_closure'
myexample.o: In function `r2nX_info':
(.text+0x28a): undefined reference to
`GuiTVzm0zi4_InterfaceziTVziUI_runUI_closure'
myexample.o: In function `r2nX_info':
(.text+0x325): undefined reference to `__stginit_GuiTVzm0zi4_InterfaceziTVziUI_'
myexample.o: In function `r2nX_info':
(.text+0x32f): undefined reference to
`__stginit_TVzm0zi4zi7_InterfaceziTVziOFun_'
myexample.o: In function `r2nX_info':
(.text+0x339): undefined reference to
`__stginit_DeepArrowzm0zi3zi3_ControlziArrowziDeepArrow_'
myexample.o: In function `r2nX_info':
(.text+0x343): undefined reference to
`__stginit_DeepArrowzm0zi3zi3_DataziFunArr_'
myexample.o: In function `r2nX_info':
(.text+0x34d): undefined reference to
`__stginit_TypeComposezm0zi8zi3_DataziTitle_'
myexample.o: In function `s2oc_info':
(.text+0x7c): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziDefaults_defaultOut_info'
myexample.o: In function `r1jF_srt':
(.data+0x8): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziOutput_oTitle_closure'
myexample.o: In function `r1jF_srt':
(.data+0xc): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziTangible_tv_closure'
myexample.o: In function `r1jF_srt':
(.data+0x10): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziDefaults_zdfDefaultOutsrcsnkZMZN0_closure'
myexample.o: In function `r1jF_srt':
(.data+0x14): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziDefaults_zdfDefaultOutsrcsnkZLzmzgZR_closure'
myexample.o: In function `r1jF_srt':
(.data+0x18): undefined reference to
`TVzm0zi4zi7_InterfaceziTVziDefaults_zdfDefaultInsrcZMZN0_closure'
myexample.o: In function `r2nX_srt':
(.data+0x24): undefined reference to
`GuiTVzm0zi4_InterfaceziTVziUI_zdfCommonOutsZCzi_closure'
myexample.o: In function `r2nX_srt':
(.data+0x28): undefined reference to
`GuiTVzm0zi4_InterfaceziTVziUI_zdfCommonInsZCzi_closure'
myexample.o: In function `r2nX_closure':
(.data+0x40): undefined reference to
`GuiTVzm0zi4_InterfaceziTVziUI_runUI_closure'
collect2: ld returned 1 exit status
------------------
I have no clue what the problem may be. Any ideas? Thanks in advance!
------------------------------
Message: 3
Date: Sun, 2 Oct 2011 21:16:09 -0400
From: Brandon Allbery <[email protected]>
Subject: Re: [Haskell-beginners] Trying out GuiTV
To: Martin Baldan <[email protected]>
Cc: [email protected]
Message-ID:
<CAKFCL4V5E=smhq93wr_4hzy2sqve7lzjztwanahn8abhtmh...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Sun, Oct 2, 2011 at 20:53, Martin Baldan <[email protected]> wrote:
> Then I type "ghc ./myexample.hs" and the output is:
This should be
> ghc --make myexample.hs
(I have no idea why --make is *still* not the default... without it, you
need to link in every package explicitly.)
--
brandon s allbery [email protected]
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20111002/13d672ab/attachment-0001.htm>
------------------------------
Message: 4
Date: Sun, 2 Oct 2011 21:18:19 -0500
From: Antoine Latter <[email protected]>
Subject: Re: [Haskell-beginners] Trying out GuiTV
To: Brandon Allbery <[email protected]>
Cc: [email protected]
Message-ID:
<cakjsnqgyo+hynan_pzuutvhn5rtlctw7xjlvrciaycknrud...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On Sun, Oct 2, 2011 at 8:16 PM, Brandon Allbery <[email protected]> wrote:
> On Sun, Oct 2, 2011 at 20:53, Martin Baldan <[email protected]> wrote:
>>
>> Then I type "ghc ./myexample.hs" and the output is:
>
> This should be
>> ghc --make myexample.hs
>
> (I have no idea why --make is *still* not the default... without it, you
> need to link in every package explicitly.)
It is the default, starting with the 7.0 compiler line :-)
Antoine
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 40, Issue 3
****************************************