Send Beginners mailing list submissions to
        beginners@haskell.org

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
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  error while setting it up (Abhijit Patel)
   2. Re:  wxHaskell: add an external event from another thread
      (Tilmann)
   3. Re:  stack issues (frantisek kocun)
   4. Re:  [Haskell-cafe] error while setting it up (Henk-Jan van Tuyl)


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

Message: 1
Date: Fri, 8 Jan 2016 19:12:47 +0530
From: Abhijit Patel <abhisandhyasp...@gmail.com>
To: beginners@haskell.org, haskell-c...@haskell.org
Subject: [Haskell-beginners] error while setting it up
Message-ID:
        <CAEr_=iVm3_-YnS=wJJzfRJwm6y0HwDNvZLB6yMFX=k2rmdr...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

for the below command I am getting errror !!
please suggest me a solution
$make
===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
ghc.mk:159: *** dyn is not in $(GhcLibWays), but $(DYNAMIC_GHC_PROGRAMS) is
YES.  Stop.
make: *** [all] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160108/7347b9ad/attachment-0001.html>

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

Message: 2
Date: Fri, 8 Jan 2016 17:20:23 +0100
From: Tilmann <t_g...@gmx.de>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] wxHaskell: add an external event from
        another thread
Message-ID: <568fe1c7.3020...@gmx.de>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hi,
this post might be helpful. 
http://snipplr.com/view/17538/wxhaskell-multithread--custom-event-example/

I needed something similar and came up with this. As far as I know there 
is now wxhaskell internal way of doing this.

import Graphics.UI.WX
import Graphics.UI.WXCore
import Control.Concurrent

eventId :: Int
eventId = wxID_HIGHEST + 2

main :: IO ()
main = do
   chan <- newChan
   forkIO $ externalEventLoop chan
   start $ gui chan

externalEventLoop :: Chan String -> IO ()
externalEventLoop chan = do
   writeChan chan "foobar"
   threadDelay $ 10 ^ 6
   externalEventLoop chan

gui :: Chan String -> IO ()
gui chan = do
   vCmd <- newEmptyMVar
   f <- frame []
   st <- textCtrl f []
   forkIO $ eventLoop eventId chan vCmd f
   evtHandlerOnMenuCommand f eventId $ takeMVar vCmd >>= \text -> 
appendText st $ text ++ "\n"
   set f [layout := fill $ minsize (Size 100 100) $ widget st]

eventLoop :: Int -> Chan String -> MVar String -> Frame () -> IO ()
eventLoop eventId chan vCmd f = do
   content <- readChan chan
   putMVar vCmd content
   e <- commandEventCreate wxEVT_COMMAND_MENU_SELECTED eventId
   evtHandlerAddPendingEvent f e
   eventLoop eventId chan vCmd f





Am 07.01.16 um 22:27 schrieb Puck:
> Hello all,
>
> how is it possible to process external events, for example a
> succeeded getLine or a takeMVar with its values in the wxHaskell
> framework?
>
> The reason is, that I want to connect a erlang node to wxHaskell.
>
> I have found the functions
> Graphics.UI.WX.Events.newEvent :: String -> (w -> IO a) -> (w -> a ->
> IO ()) -> Event w a
> "Create a new event from a get and set function."
>
> Beside from, that I don't know what the get and set function shall do, I
> don't know, how I can add the new event to the event-loop of wx, and
> when it "fires".
>
> Do you know any possibilities?
>
> Thank you in advance
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>



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

Message: 3
Date: Fri, 8 Jan 2016 13:25:37 -0500
From: frantisek kocun <frantisek.ko...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] stack issues
Message-ID:
        <camcun71ww8sxx7zc05kkpgczcarrxakmggbn90dqbtv5duk...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Thanks Michael

Having this in stack.yaml
extra-deps:
- gtk-0.14.2

# Override default flag values for local packages and extra-deps
flags: {
  gtk: {
    have-quartz-gtk: true
  }
}

and adding gtk to cabal file helped me to resolve this issue!

I still have different problem. I will try to find the solution or ask
later when I'm out of ideas.

[1 of 1] Compiling Main             ( app/Main.hs,
.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/ships-exe/ships-exe-tmp/Main.o
)

Linking
.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/ships-exe/ships-exe ...

Undefined symbols for architecture x86_64:

  "_shipszuKPBflZZ3qlkXJFnVVcHORae_Gtk2hsziUtils_zdwa1_closure", referenced
from:

      _SkK4_srt in libHSships-0.1.0.0-KPBflZ3qlkXJFnVVcHORae.a(GUI.o)

  "_shipszuKPBflZZ3qlkXJFnVVcHORae_Gtk2hsziUtils_zdwa1_info", referenced
from:

      _clGK_info in libHSships-0.1.0.0-KPBflZ3qlkXJFnVVcHORae.a(GUI.o)


On Fri, Jan 8, 2016 at 1:55 AM, Michael Snoyman <mich...@snoyman.com> wrote:

> You need to specify the flag in the stack.yaml file, via something like:
>
> flags:
>   gtk:
>     have-quartz-gtk: true
>
> On Fri, Jan 8, 2016 at 7:45 AM, frantisek kocun <frantisek.ko...@gmail.com
> > wrote:
>
>> Is there a way to specify these flags in cabal file? I'm sure this will
>> resolve my issue
>>
>>
>> On Fri, Jan 8, 2016 at 12:43 AM, frantisek kocun <
>> frantisek.ko...@gmail.com> wrote:
>>
>>> This works for me
>>>
>>> $ stack build gtk --flag gtk:have-quartz-gtk
>>>
>>> but I sitll need to specify gtk also in cabal file (having it only in
>>> stack.yaml do not find the package)
>>>
>>> but then I get
>>>
>>> $ stack build
>>>
>>> gtk-0.13.9: unregistering (flags changed from ["-fhave-quartz-gtk"] to
>>> [])
>>>
>>> On Fri, Jan 8, 2016 at 12:16 AM, frantisek kocun <
>>> frantisek.ko...@gmail.com> wrote:
>>>
>>>> I found this
>>>>
>>>> cabal install gtk -fhave-quartz-gtk --reinstall
>>>>
>>>> but it does not help me when I run stack build afterwards..
>>>>
>>>> On Thu, Jan 7, 2016 at 11:13 PM, frantisek kocun <
>>>> frantisek.ko...@gmail.com> wrote:
>>>>
>>>>> Found that gtk was not installed. So I did
>>>>>   brew install gtk
>>>>>
>>>>> but I got different problem
>>>>>
>>>>> [ 22 of 209] Compiling Graphics.UI.Gtk.Embedding.Plug (
>>>>> .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Graphics/UI/Gtk/Embedding/Plug.hs,
>>>>> .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Graphics/UI/Gtk/Embedding/Plug.o
>>>>> )
>>>>>
>>>>>
>>>>>
>>>>>     Graphics/UI/Gtk/Embedding/Plug.chs:120:6:
>>>>>
>>>>>         Couldn't match expected type ?Ptr ()?
>>>>>
>>>>>                     with actual type ?Maybe DrawWindow?
>>>>>
>>>>>         In the first argument of ?gtk_plug_new?, namely
>>>>>
>>>>>           ?(fromNativeWindowId (fromMaybe nativeWindowIdNone
>>>>> socketId))?
>>>>>
>>>>>         In the second argument of ?($)?, namely
>>>>>
>>>>>           ?gtk_plug_new
>>>>>
>>>>>              (fromNativeWindowId (fromMaybe nativeWindowIdNone
>>>>> socketId))?
>>>>>
>>>>> On Thu, Jan 7, 2016 at 10:46 PM, frantisek kocun <
>>>>> frantisek.ko...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm new to cabal/stack. I want to use "stack build" to build my
>>>>>> project.
>>>>>>
>>>>>> I can not use latest gkt >= 0.14.2 because of
>>>>>>    setup: The pkg-config package 'cairo' version >=1.2.0 is required
>>>>>> but it could
>>>>>>
>>>>>> Neither can I now use older version gtk >=0.12.0 && < 0.13
>>>>>>
>>>>>> While constructing the BuildPlan the following exceptions were
>>>>>> encountered:
>>>>>>
>>>>>> --  Failure when adding dependencies:
>>>>>>
>>>>>>       gtk: needed (>=0.12.0 && <0.13), 0.14.2 found (latest version
>>>>>> available)
>>>>>>
>>>>>>     needed for package: ships-0.1.0.0
>>>>>>
>>>>>>
>>>>>>
>>>>>> What can i do? Thanks
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160108/52eec0a6/attachment-0001.html>

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

Message: 4
Date: Fri, 08 Jan 2016 23:12:05 +0100
From: "Henk-Jan van Tuyl" <hjgt...@chello.nl>
To: beginners@haskell.org, haskell-c...@haskell.org, "Abhijit Patel"
        <abhisandhyasp...@gmail.com>
Subject: Re: [Haskell-beginners] [Haskell-cafe] error while setting it
        up
Message-ID: <op.yaxxak1ypz0j5l@alquantor>
Content-Type: text/plain; charset=iso-8859-15; format=flowed;
        delsp=yes

On Fri, 08 Jan 2016 14:42:47 +0100, Abhijit Patel  
<abhisandhyasp...@gmail.com> wrote:

> for the below command I am getting errror !!
> please suggest me a solution
> $make
> ===--- building phase 0
> make --no-print-directory -f ghc.mk phase=0 phase_0_builds
> ghc.mk:159: *** dyn is not in $(GhcLibWays), but $(DYNAMIC_GHC_PROGRAMS)  
> is
> YES.  Stop.
> make: *** [all] Error 2

A search on Internet for the message "dyn is not in $(GhcLibWays)" lead me  
to
   https://mail.haskell.org/pipermail/ghc-devs/2013-May/001306.html

Regards,
Henk-Jan van Tuyl


-- 
Folding@home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.
http://folding.stanford.edu/


http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--


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

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


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

End of Beginners Digest, Vol 91, Issue 15
*****************************************

Reply via email to