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:  install wxHaskell on osx 10.7 64bit (Miguel Negrao)
   2. Re:  install wxHaskell on osx 10.7 64bit (Miguel Negrao)
   3. Re:  install wxHaskell on osx 10.7 64bit (Miguel Negrao)
   4. Re:  install wxHaskell on osx 10.7 64bit (Heinrich Apfelmus)


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

Message: 1
Date: Sun, 8 Apr 2012 11:09:51 +0100
From: Miguel Negrao <[email protected]>
Subject: Re: [Haskell-beginners] install wxHaskell on osx 10.7 64bit
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252


A 08/04/2012, ?s 10:44, Heinrich Apfelmus escreveu:

> Miguel Negrao wrote:
>> I did:
>> cabal unpack reactive-banana-wx-0.5.0.0
>> cd reactive-banana-wx-0.5.0.0/
>> edited reactive-banana-wx.cabal cabal install
>> Resolving dependencies...
>> [1 of 1] Compiling Main             ( Setup.hs, dist/setup/Main.o )
>> Linking ./dist/setup/setup ...
>> ld: warning: could not create compact unwind for _ffi_call_unix64: does not 
>> use RBP or RSP based frame
>> Configuring reactive-banana-wx-0.5.0.0...
>> Preprocessing library reactive-banana-wx-0.5.0.0...
>> Preprocessing executables for reactive-banana-wx-0.5.0.0...
>> Building reactive-banana-wx-0.5.0.0...
>> [1 of 1] Compiling Reactive.Banana.WX ( src/Reactive/Banana/WX.hs, 
>> dist/build/Reactive/Banana/WX.o )
>> [1 of 1] Compiling Reactive.Banana.WX ( src/Reactive/Banana/WX.hs, 
>> dist/build/Reactive/Banana/WX.p_o )
>> Registering reactive-banana-wx-0.5.0.0...
>> Creating application bundle directory dist/build/Asteroids.app
>> Copying executable Asteroids into place
>> setup: dist/build/Asteroids/Asteroids: does not exist
>> cabal: Error: some packages failed to install:
>> reactive-banana-wx-0.5.0.0 failed during the building phase. The exception
>> was:
>> ExitFailure 1
> 
> Looks like it's an issue with the cabal-macosx package, which will be fixed 
> soon. You probably also want to install the examples, so try
> 
>    cabal install -fbuildExamples
> 
> instead. The  buildExamples  flag is also mentioned in the package 
> description.

Ok, so that means there?s nothing to be done for now, I just have to wait ?

Some other small questions, not directly related:

I?m using leksah to edit code. How do I:

- Browse the source of reactive-banana from leksah ? I would like to check for 
instance how the Applicative of Behaviour is implemented.
- Is it possible to check the type of statements from the gui ?
- Is it possible to pull up the documentation of a function directly from the 
gui ?
- Is it possible to to the definition of a function, including the ones in 
other packages (like the ones of reactive-banana) directly from the gui ?

thanks !
Miguel Negr?o


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

Message: 2
Date: Sun, 8 Apr 2012 23:29:08 +0100
From: Miguel Negrao <[email protected]>
Subject: Re: [Haskell-beginners] install wxHaskell on osx 10.7 64bit
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1


A 08/04/2012, ?s 10:44, Heinrich Apfelmus escreveu:
> 
> Looks like it's an issue with the cabal-macosx package, which will be fixed 
> soon. You probably also want to install the examples, so try
> 
>  cabal install -fbuildExamples

Not sure if I was suppose to try with that command, but If I do I get:

miguelnegrao@Mac-Miguel:~/Development/Haskell/Libs/reactive-banana/reactive-banana-wx
 (master *)$ cabal install -fbuildExamples
Resolving dependencies...
Configuring reactive-banana-wx-0.6.0.0...
Preprocessing library reactive-banana-wx-0.6.0.0...
Preprocessing executables for reactive-banana-wx-0.6.0.0...
Building reactive-banana-wx-0.6.0.0...
Registering reactive-banana-wx-0.6.0.0...
[2 of 2] Compiling Main             ( src/Arithmetic.hs, 
dist/build/Arithmetic/Arithmetic-tmp/Main.o )

src/Arithmetic.hs:30:21: Not in scope: `behaviorText'

src/Arithmetic.hs:31:21: Not in scope: `behaviorText'
cabal: Error: some packages failed to install:
reactive-banana-wx-0.6.0.0 failed during the building phase. The exception
was:
ExitFailure 1

Also wxHaskell seems to be properly installed since I can run the hello world 
app.

best,
Miguel Negr?o



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

Message: 3
Date: Mon, 9 Apr 2012 00:50:42 +0100
From: Miguel Negrao <[email protected]>
Subject: Re: [Haskell-beginners] install wxHaskell on osx 10.7 64bit
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

Ok, by deleting all the examples I managed to install reactive-banana-wx. The 
Couter.hs example runs fine.

I?m now trying to do a example where the value of a slider is posted to text 
box, but I can?t get it to work. event0 is for events that don?t ouput 
anything, but slider has a value.... what should I do ?

{-----------------------------------------------------------------------------  
  
   A slider and a text box
------------------------------------------------------------------------------}
{-# LANGUAGE ScopedTypeVariables #-} -- allows "forall t. NetworkDescription t"


import Graphics.UI.WX hiding (Event)
import Reactive.Banana
import Reactive.Banana.WX

{-----------------------------------------------------------------------------
   Main
------------------------------------------------------------------------------}
main:: IO()
main = start $ do
   f       <- frame [text := "A slider"]
   sl      <- hslider f False 0 100 []
   output  <- staticText f []

   set f [layout := margin 10 $
           column 25 [widget sl, widget output]]

   let networkDescription :: forall t. NetworkDescription t ()
       networkDescription = do

       esl   <- event0 sl command
       let b = stepper 0 esl    -- this doesn?t work off course...
       sink output [text :== show <$> b] 

   network <- compile networkDescription    
   actuate network

thanks
Miguel Negr?o





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

Message: 4
Date: Mon, 09 Apr 2012 09:12:41 +0200
From: Heinrich Apfelmus <[email protected]>
Subject: Re: [Haskell-beginners] install wxHaskell on osx 10.7 64bit
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

Miguel Negrao wrote:
> A 08/04/2012, ?s 10:44, Heinrich Apfelmus escreveu:
>> Looks like it's an issue with the cabal-macosx package, which will be fixed 
>> soon. You probably also want to install the examples, so try
>>
>>  cabal install -fbuildExamples
> 
> Not sure if I was suppose to try with that command, but If I do I get:
> 
> miguelnegrao@Mac-Miguel:~/Development/Haskell/Libs/reactive-banana/reactive-banana-wx
>  (master *)$ cabal install -fbuildExamples
> Resolving dependencies...
> Configuring reactive-banana-wx-0.6.0.0...
> Preprocessing library reactive-banana-wx-0.6.0.0...
> Preprocessing executables for reactive-banana-wx-0.6.0.0...
> Building reactive-banana-wx-0.6.0.0...
> Registering reactive-banana-wx-0.6.0.0...
> [2 of 2] Compiling Main             ( src/Arithmetic.hs, 
> dist/build/Arithmetic/Arithmetic-tmp/Main.o )
> 
> src/Arithmetic.hs:30:21: Not in scope: `behaviorText'
> 
> src/Arithmetic.hs:31:21: Not in scope: `behaviorText'
> cabal: Error: some packages failed to install:
> reactive-banana-wx-0.6.0.0 failed during the building phase. The exception
> was:
> ExitFailure 1

Errm, reactive-banana-0.6.0.0 is the current development branch which is 
definitely not going to compile. I meant the tarball from hackage, i.e.

http://hackage.haskell.org/packages/archive/reactive-banana-wx/0.5.0.0/reactive-banana-wx-0.5.0.0.tar.gz


> I?m now trying to do a example where the value of a slider is posted
> to text box, but I can?t get it to work. event0 is for events that
> don?t ouput anything, but slider has a value.... what should I do ?

You can use  fromPoll  as the NetMonitor.hs examples demonstrates. Or 
you have to get an event from wx that indicates when the slider is 
moved, then you can use  stepper  or the  fromChanges  function.


Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com




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

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


End of Beginners Digest, Vol 46, Issue 10
*****************************************

Reply via email to