Send Beginners mailing list submissions to
        [email protected]

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
        [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.  help with type error in a wxHaskell program (Jason J. Corso)
   2. Re:  help with type error in a wxHaskell program (David McBride)
   3.  NNOUNCE: Haskell Communities and Activities Report (29th
      ed., November 2015) (Mihai Maruseac)
   4.  Warning: Tab Character (Jeon-Young Kang)
   5.  could not install "process-leksah" due to        dependencies
      errors.... (Andr? Verwijs)
   6. Re:  could not install "process-leksah" due to    dependencies
      errors.... (Andr? Verwijs)
   7. Re:  Ambiguous type of WriterT result I am not using (Martin Vlk)


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

Message: 1
Date: Sat, 21 Nov 2015 08:28:01 -0500
From: "Jason J. Corso" <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] help with type error in a wxHaskell
        program
Message-ID:
        <CANYqXepp+m7EFD0SnrkUNd2EiNax4MaeOht4pKhv-6v1=re...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi:

I'm new to Haskell and to wxHaskell (but found playing with wxHaskell
to be a nice mid-ground between my years of imperative experience and
the pure functional).  Thanks for the help.

I wrote the following code to create a set of staticText widgets by
mapping the layout over a list.  Easy enough...

module Main where
import Graphics.UI.WX
main :: IO ()
main
    = start gui
gui :: IO ()
gui = do
        f <- frame
        let s = map (\t -> staticText f [text := show t]) [1..10]
        set f [layout := margin 10 ( row 2 $ map (\x -> (widget x)) s)]


But, I get a type error that I do not understand

    Couldn't match expected type ?IO (Window a0)?
                with actual type ?[Prop (Frame ())] -> IO (Frame ())?
    Probable cause: ?frame? is applied to too few arguments


Thank you in advance,
Jason


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

Message: 2
Date: Sat, 21 Nov 2015 10:02:39 -0500
From: David McBride <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] help with type error in a wxHaskell
        program
Message-ID:
        <CAN+Tr409aOy7vd=ufmdalt_2mnty-0hk5v-ueguf4mq8xqa...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The type of frame according to the documentation is frame :: [Prop
<http://hackage.haskell.org/package/wx-0.92.1.0/docs/Graphics-UI-WX-Attributes.html#t:Prop>
(Frame
<http://hackage.haskell.org/package/wx-0.92.1.0/docs/Graphics-UI-WX-Frame.html#t:Frame>
())] -> IO
<http://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO> (
Frame
<http://hackage.haskell.org/package/wx-0.92.1.0/docs/Graphics-UI-WX-Frame.html#t:Frame>
()).  Maybe the documentation you are looking at is out of date?

On Sat, Nov 21, 2015 at 8:28 AM, Jason J. Corso <[email protected]>
wrote:

> Hi:
>
> I'm new to Haskell and to wxHaskell (but found playing with wxHaskell
> to be a nice mid-ground between my years of imperative experience and
> the pure functional).  Thanks for the help.
>
> I wrote the following code to create a set of staticText widgets by
> mapping the layout over a list.  Easy enough...
>
> module Main where
> import Graphics.UI.WX
> main :: IO ()
> main
>     = start gui
> gui :: IO ()
> gui = do
>         f <- frame
>         let s = map (\t -> staticText f [text := show t]) [1..10]
>         set f [layout := margin 10 ( row 2 $ map (\x -> (widget x)) s)]
>
>
> But, I get a type error that I do not understand
>
>     Couldn't match expected type ?IO (Window a0)?
>                 with actual type ?[Prop (Frame ())] -> IO (Frame ())?
>     Probable cause: ?frame? is applied to too few arguments
>
>
> Thank you in advance,
> Jason
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20151121/fa778601/attachment-0001.html>

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

Message: 3
Date: Sat, 21 Nov 2015 13:13:36 -0500
From: Mihai Maruseac <[email protected]>
To: Haskell <[email protected]>, haskell <[email protected]>,
        Haskell Beginners <[email protected]>, Lista principala
        <[email protected]>
Subject: [Haskell-beginners] NNOUNCE: Haskell Communities and
        Activities Report (29th ed., November 2015)
Message-ID:
        <CAOMsUM+7WcK0s9OXyYM2L76S1eoqUOPqtVW=_1we4fht+h7...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On behalf of all the contributors, we are pleased to announce that the

           Haskell Communities and Activities Report
                (29th edition, November 2015)

is now available, in PDF and HTML formats:

  http://haskell.org/communities/11-2015/report.pdf
  http://haskell.org/communities/11-2015/html/report.html

Many thanks go to all the people that contributed to this report,
both directly, by sending in descriptions, and indirectly, by doing
all the interesting things that are reported. We hope you will find
it as interesting a read as we did.

If you have not encountered the Haskell Communities and Activities
Reports before, you may like to know that the first of these reports
was published in November 2001. Their goal is to improve the
communication between the increasingly diverse groups, projects, and
individuals working on, with, or inspired by Haskell. The idea behind
these reports is simple:

  Every six months, a call goes out to all of you enjoying Haskell to
  contribute brief summaries of your own area of work. Many of you
  respond (eagerly, unprompted, and sometimes in time for the actual
  deadline) to the call. The editors collect all the contributions
  into a single report and feed that back to the community.

When we try for the next update, six months from now, you might want
to report on your own work, project, research area or group as well.
So, please put the following into your diaries now:

========================================
                     End of March 2015:
           target deadline for contributions to the
             May 2015 edition of the HCAR Report
========================================

Unfortunately, many Haskellers working on interesting projects are so
busy with their work that they seem to have lost the time to follow
the Haskell related mailing lists and newsgroups, and have trouble even
finding time to report on their work. If you are a member, user or
friend of a project so burdened, please find someone willing to make
time to report and ask them to "register" with the editors for a simple
e-mail reminder in March (you could point us to them as well, and we
can then politely ask if they want to contribute, but it might work
better if you do the initial asking). Of course, they will still have to
find the ten to fifteen minutes to draw up their report, but maybe we
can increase our coverage of all that is going on in the community.

Feel free to circulate this announcement further in order to
reach people who might otherwise not see it. Enjoy!

Mihai Maruseac
<hcar at haskell.org>

-- 
Mihai Maruseac (MM)
"If you can't solve a problem, then there's an easier problem you can
solve: find it." -- George Polya


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

Message: 4
Date: Sat, 21 Nov 2015 14:13:15 -0500
From: Jeon-Young Kang <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] Warning: Tab Character
Message-ID:
        <CALWtiK_TDvEUiOW=LUyE9HYTgx9GAZaW-Pkdn1cyKtET=hu...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello everyone.


I am a newbie of Haskell, using Textmate on mac.


I got the following warning. How can I fix it?


Warning:

    Tab character

Ok, modules loaded: Main.


Sincerely,
Young
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20151121/50e139b3/attachment-0001.html>

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

Message: 5
Date: Sat, 21 Nov 2015 20:29:17 +0100
From: Andr? Verwijs <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] could not install "process-leksah" due to
        dependencies errors....
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed


remote-repos:
  hackage.haskell.org
  http://hackage.haskell.org/packages/archive


 >> cabal install leksah process-leksah

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: leksah-0.15.1.4 (user goal)
trying: hlint-1.9.23 (dependency of leksah-0.15.1.4)
next goal: haskell-src-exts (dependency of leksah-0.15.1.4)
rejecting: haskell-src-exts-1.16.0.1/installed-911... (conflict: hlint =>
haskell-src-exts>=1.17 && <1.18)
rejecting: haskell-src-exts-1.17.0 (conflict: leksah =>
haskell-src-exts>=1.13.5 && <1.17)
rejecting: haskell-src-exts-1.16.0.1, 1.16.0, 1.15.0.1, 1.15.0, 1.14.0.1,
1.14.0, 1.13.5 (conflict: hlint => haskell-src-exts>=1.17 && <1.18)
rejecting: haskell-src-exts-1.13.4, 1.13.3, 1.13.2, 1.13.1, 1.13.0, 1.12.0,
1.11.1, 1.10.2, 1.10.1, 1.10.0, 1.9.6, 1.9.5, 1.9.4, 1.9.3, 1.9.0, 1.8.2,
1.8.1, 1.8.0, 1.7.2, 1.7.1, 1.7.0, 1.6.1, 1.6.0, 1.5.3, 1.5.2, 1.5.1, 1.5.0,
1.4.0, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.0, 1.1.4, 1.1.3.1, 
1.1.3,
1.1.1, 1.1.0, 1.0.1, 1.0.0, 0.5.7, 0.5.6, 0.5.5, 0.5.4, 0.5.3, 0.5.2, 0.4.8,
0.4.6, 0.4.5, 0.4.4.1, 0.4.4, 0.4.3.1, 0.4.3, 0.4.2, 0.4.1, 0.3.12, 0.3.11,
0.3.10, 0.3.9, 0.3.7, 0.3.5, 0.3.4, 0.3.3, 0.3.2, 0.2.1 (conflict: leksah =>
haskell-src-exts>=1.13.5 && <1.17)
Backjump limit reached (change with --max-backjumps).








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

Message: 6
Date: Sat, 21 Nov 2015 20:52:57 +0100
From: Andr? Verwijs <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] could not install "process-leksah"
        due to  dependencies errors....
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

OS:
OpenSUSE tumbleweed 2015-11-18
Plasma 5.4.2
QT version: 5.5.1
Kernel: 4.3.0-2

(needed for building from source)
gtksourceview-devel 3.18.1-1.1
libwebkitgtk-devel 2.4.9-3.2


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

Message: 7
Date: Sat, 21 Nov 2015 20:09:44 +0000
From: Martin Vlk <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Ambiguous type of WriterT result I am
        not using
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

David, Kim-Ee, thank you both very much - this really helped make my
code good looking!

Martin

Kim-Ee Yeoh:
> Hi Martin,
> 
>     But the compiler complains about ambiguous type for the writer reult I
>     am ignoring (message in the above lpaste).
> 
> 
> There are a number of types going on here, and the one that's ambiguous
> is the monoid w in WriterT w m a.
>  
> 
>     Normally I think the way around this is to provide explicit type
>     annotation for "foldIt", but in this case the result type depends on the
>     type of "a" in foldrEntries type and I don't know how to express this
>     and make the compiler happy.
> 
>  
> David's ScopedTypeVariables solution is perfectly cromulent. Here's
> another one without any pragmas:
> 
> foldrEntries ::
>       (Entry -> a -> a)
>    -> a
>    -> (String -> a)
>    -> Entries
>    -> a
> foldrEntries next done fail' =
>    isoR . foldrEntriesW (isoL .: next) (isoL done) (isoL . fail')
>    where
>    isoL :: a -> WriterT () Identity a
>    isoL = return
>    isoR :: WriterT () Identity a -> a
>    isoR = fst . runIdentity . runWriterT
> 
> The (.:) is from Data.Composition.
> 
> The isoL and isoR witness the isomorphism, and foldrEntries is written
> in a point-minimized form that makes it transparent that it's a
> specialization of foldrEntriesW.
> 
> Do eschew verbosities like "return . fst =<< runWriterT". (Hlint should
> be programmed to catch this. It doesn't yet.) A return that's too near a
> monadic bind sets off alarms among professional haskell engineers.
>  
> 
>     (I was able to make it work by calling "tell ()", basically writing a
>     dummy value, which lets compiler know what the type is, but this is not
>     so good - I don't want to make artificial function calls like this.)
> 
> 
> Good call.
> 
> -- Kim-Ee
> 
> 
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
> 


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

Subject: Digest Footer

_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


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

End of Beginners Digest, Vol 89, Issue 36
*****************************************

Reply via email to