[Haskell-beginners] Trying out GuiTV

Martin Baldan martinobal at gmail.com
Mon Oct 3 02:53:14 CEST 2011


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!



More information about the Beginners mailing list