Hello all,
I'm very new to Haskell, but still I'd like to play with "tangible values", which I find really intriguing. After getting some kind help in haskell-beginners, I managed to compile and run a small example. Which is as follows:
------------------
{-# 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
-----------------------
There were some warnings during compilation:
-----
[1 of 1] Compiling Main ( myexample.hs, myexample.o )
myexample.hs:7:11:
Warning: -fallow-overlapping-instances is deprecated: use
-XOverlappingInstances or pragma {-# LANGUAGE OverlappingInstances #-}
instead
myexample.hs:7:11:
Warning: -fallow-incoherent-instances is deprecated: use
-XIncoherentInstances or pragma {-# LANGUAGE IncoherentInstances #-}
instead
Linking myexample ...
martin@martin-desktop:/media/