<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.haskell.beginners">
    <title>gmane.comp.lang.haskell.beginners</title>
    <link>http://blog.gmane.org/gmane.comp.lang.haskell.beginners</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12208"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12207"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12206"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12205"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12204"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12203"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12202"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12201"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12200"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12199"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12198"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12197"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12196"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12195"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12194"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12193"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12192"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12191"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12190"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12189"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12208">
    <title>Yesod error</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12208</link>
    <description>&lt;pre&gt;I am working my way through the Yesod book and I am having trouble 
writing any code that uses persist.  I am consistently getting

Not in scope: 'persist'

at the point I am invoking the persist quasiquoter.  This even happens 
when I am using the example code verbatim.  Tried updating to the latest 
versions of yesod, persist, etc.  Didn't help.  The Hackage docs don't 
show any info on the quasiquoters in found in a package (presumably 
because they are a language extensio).

Anybody seen this before?  Or got any ideas how I could debut this?

thanks,
Lee


&lt;/pre&gt;</description>
    <dc:creator>Lee Short</dc:creator>
    <dc:date>2013-06-19T21:43:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12207">
    <title>Recursive XML schema and feeding into data model</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12207</link>
    <description>&lt;pre&gt;Hi,

I have a recursive schema whose data model looks like the following

{-data InformationField = InformationField { name, value :: String }-}
        {-deriving (Show, Eq) -}

{-data Fields = Fields { fields :: [InformationField] }-}
        {-deriving (Show, Eq)-}

{-data Children = Children { childNodes :: [BuildInformationNode] }-}

{-data BuildInformationNode = BuildInformationNode { field :: Fields,
children :: Children }-}


BuildInformationNode has children which has multiple BuildInformationNode.

I am getting started on HXT, using the samples that they had provided i was
able to pull up individual nodes from xml.

I am having difficult in starting to read the entire xml into the data
model and have one single BuildInformationNode created which represents the
entire xml.

The idea is to implement a show on BuildInformationNode wherein i can
implement for displaying the  tree in a format that i require.

Any pointers regarding this would be great.

&lt;/pre&gt;</description>
    <dc:creator>ashwin sathya</dc:creator>
    <dc:date>2013-06-19T07:06:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12206">
    <title>Re: iterateM</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12206</link>
    <description>&lt;pre&gt;`iterateM_` is in the monad-loops package[1].
Like you suggested, this version returns `m b` and doesn't build up any
list at all.

You can search for functions by name and even type signature on
Hackage[2] or Hayoo[3].

On a different note, for code such as your `iterateM` you should use
do-notation instead of manually writing out the lambdas. It's much
easier on the eyes and this is what do-notation is there for.

[1] http://hackage.haskell.org/packages/archive/monad-loops/latest/doc/html/Control-Monad-Loops.html#v:iterateM_
[2] http://www.haskell.org/hoogle/
[3] http://holumbus.fh-wedel.de/hayoo/hayoo.html

&lt;/pre&gt;</description>
    <dc:creator>Lukas Braun</dc:creator>
    <dc:date>2013-06-18T18:51:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12205">
    <title>Re: iterateM</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12205</link>
    <description>&lt;pre&gt;Hi Volker,

In the meantime I did something very simple. I just have a step function
taking a maybe state parameter which recurses until the state is nothing.
Then main = step init

Adrian.
 On 18 Jun 2013 13:29, "Karl Voelker" &amp;lt;ktvoelker&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Adrian May</dc:creator>
    <dc:date>2013-06-18T09:53:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12204">
    <title>TLS with RSA_PSK</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12204</link>
    <description>&lt;pre&gt;Hey,

is it possible to use RSA_PSK as a TLS-ciphersuit in any TLS library?
I didnt found such a ciphersuit in Network.TLS.

Thanks in advance,
Friedrich

&lt;/pre&gt;</description>
    <dc:creator>Friedrich Wiemer</dc:creator>
    <dc:date>2013-06-18T09:37:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12203">
    <title>Re: iterateM</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12203</link>
    <description>&lt;pre&gt;I would use the State monad rather than passing the state explicitly. Then
the "body of the loop" is of type "m a" rather than "a -&amp;gt; m a", and you can
use "sequence . repeat" on it.

-Karl
&lt;/pre&gt;</description>
    <dc:creator>Karl Voelker</dc:creator>
    <dc:date>2013-06-18T05:28:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12202">
    <title>Re: Reform and blaze: trouble with example code</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12202</link>
    <description>&lt;pre&gt;Hello,

label has the type:

label :: (Monad m, ToMarkup children) =&amp;gt; children -&amp;gt; Form m input error
Html () ()

Meaning the argument to 'label' can be anything which can be embedded as
markup. Unfortunately, when you use OverloadedStrings and write:


label "username: "

It doesn't know if it should treat "username: " as a String value or an
Html value -- as both have IsString instances. You can fix it by typing:

label ("username: " :: String)

So that it knows. That is pretty annoying, and so we should probably have a
function like:


labelString :: (Monad m) =&amp;gt; String -&amp;gt; Form m input error Html () ()

which is not ambiguous, and you can do:

labelString "username: "

I believe I have added that to the reform-hsp library, but not reform-blaze.

In your second attempt, you imported the functions from .Common. But
inputtext takes an extra parameter there:

inputText :: (Monad&amp;lt;http://hackage.haskell.org/packages/archive/base/4.6.0.1/doc/html/Control-Monad.html#t:Monad&amp;gt;
 m, FormError&amp;lt;http://hackage.haskell.org/packages/archive/reform/0.1.2/doc/html/Text-Reform-Backend.html#t:FormError&amp;gt;
 error, ToValue&amp;lt;http://hackage.haskell.org/packages/archive/blaze-markup/0.5.1.4/doc/html/Text-Blaze.html#t:ToValue&amp;gt;
text)
=&amp;gt; (input -&amp;gt; Either&amp;lt;http://hackage.haskell.org/packages/archive/base/4.6.0.1/doc/html/Data-Either.html#t:Either&amp;gt;
error
text) -&amp;gt; text -&amp;gt;
Form&amp;lt;http://hackage.haskell.org/packages/archive/reform/0.1.2/doc/html/Text-Reform-Core.html#t:Form&amp;gt;
m
input error Html&amp;lt;http://hackage.haskell.org/packages/archive/blaze-html/0.6.0.0/doc/html/Text-Blaze-Html.html#t:Html&amp;gt;
()
text

The .Common module is really only for common code that is shared between
.String, .Text, and whatever may come in the future. It should have a
comment at the top explaining its purpose. Sorry about that.

- jeremy




On Sat, Jun 15, 2013 at 4:19 AM, Adrian May
&amp;lt;adrian.alexander.may&amp;lt; at &amp;gt;gmail.com&amp;gt;wrote:

&lt;/pre&gt;</description>
    <dc:creator>Jeremy Shaw</dc:creator>
    <dc:date>2013-06-18T05:17:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12201">
    <title>Re: Recommended DB layer?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12201</link>
    <description>&lt;pre&gt;On Mon, Jun 17, 2013 at 6:36 AM, Erik de Castro Lopo
&amp;lt;mle+hs&amp;lt; at &amp;gt;mega-nerd.com&amp;gt; wrote:

That's correct.  Esqueleto is, and always will be, SQL-only.  Its goal
is to be as close to SQL as possible.

Cheers,

--
Felipe.

&lt;/pre&gt;</description>
    <dc:creator>Felipe Almeida Lessa</dc:creator>
    <dc:date>2013-06-17T16:00:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12200">
    <title>Re: Recommended DB layer?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12200</link>
    <description>&lt;pre&gt;
now), persistent could not do SQL-level joins -- because not all backends
could support joins..

I don't know how persistent is implemented, but the usual solution to a
problem like that is that the capable backends will implement joins in SQL,
while the others fake it in code.


&lt;/pre&gt;</description>
    <dc:creator>harry</dc:creator>
    <dc:date>2013-06-17T13:56:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12199">
    <title>Re: Recommended DB layer?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12199</link>
    <description>&lt;pre&gt;

Queries written with Esqueleto support joins:

    http://hackage.haskell.org/packages/archive/esqueleto/latest/doc/html/Database-Esqueleto.html

in a relatively elegant way.


It is my understanding that esqueleto only supports SQL databases

Erik
&lt;/pre&gt;</description>
    <dc:creator>Erik de Castro Lopo</dc:creator>
    <dc:date>2013-06-17T09:36:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12198">
    <title>Re: Recommended DB layer?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12198</link>
    <description>&lt;pre&gt;I have not looked at persistent in AGES. So, my information is horribly out
of date. But I think the issue with 'lowest common denominator' is that it
means you can not exploit the useful power of the underlying database. For
example, I believe that at one point in time (no idea about right now),
persistent could not do SQL-level joins -- because not all backends could
support joins..

Now, for a vast majority of websites, that is not an issue --  because most
websites are lucky to get hundreds of hits *per day*. So, making it easier
to implement bug free code is a huge win! But, if you care a lot about
performance, then that could be a problem.

If persistent aims to be able to target wildly different backends, some of
which are not even SQL based, then it seems like it would hard for it to
also have optimal performance. Though, good enough performance for most
people is quite obtainable.

There are, of course, many other attempts to bring type-safe to database in
Haskell. Ranging from things that bind to SQL, like haskelldb, to native
persistance layers like acid-state. They all have their strengths and
weaknesses.

- jeremy



On Mon, Jun 17, 2013 at 2:02 AM, harry &amp;lt;voldermort&amp;lt; at &amp;gt;hotmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Jeremy Shaw</dc:creator>
    <dc:date>2013-06-17T08:05:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12197">
    <title>Re: Recommended DB layer?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12197</link>
    <description>&lt;pre&gt;

Thanks for the heads up, I should give Esqueleto a look. The "lowest common
denominator" complaint did seem a bit strange to me, because it's exactly
what I'm used to doing in LINQ.


&lt;/pre&gt;</description>
    <dc:creator>harry</dc:creator>
    <dc:date>2013-06-17T07:02:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12196">
    <title>Re: Recommended DB layer?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12196</link>
    <description>&lt;pre&gt;

I am a very experienced programmer (20+ years of coding, doing Haskell
since 2008) but had not done much with database before starting a
project with Yesod and Persistent. Obvioulsy I don't really know
what "best practices" are.

However, I have found Persistent along with Esqueleto a most pleasant
experience. My app is only targeting Postgresql. I did some reading
on database design, specifically about the importance of normailizing
the data. I then designed the the schema and started writing inserts
(using Persistent) and queries and updates (using Esqueleto). I am
100% certain that the type safety these languages of these interfaces
has prevented numerous bugs.

The only pain point has been breaking updates in the API causing me
to have to fix my code.

HTH,
Erik
&lt;/pre&gt;</description>
    <dc:creator>Erik de Castro Lopo</dc:creator>
    <dc:date>2013-06-16T20:40:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12195">
    <title>Recommended DB layer?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12195</link>
    <description>&lt;pre&gt;I've seen yesod-persistent described as "worst practices", e.g.
http://www.reddit.com/r/haskell/comments/1dk73s/web_frameworks_benchmark_4_includes_wai/c9rt80t.
Is this just a one-off poster, or do others agree with it? What are
considered best practices?


&lt;/pre&gt;</description>
    <dc:creator>harry</dc:creator>
    <dc:date>2013-06-16T14:49:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12194">
    <title>iterateM</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12194</link>
    <description>&lt;pre&gt;Hi All,

I just wrote a function to repeatedly transform something inside a monad
using the same transforming function every time. I feel it might be dodgy
though:

iterateM :: (Monad m) =&amp;gt; (a -&amp;gt; m a) -&amp;gt; m a -&amp;gt; m [a]
iterateM f sm =
  sm &amp;gt;&amp;gt;= \s -&amp;gt;
  iterateM f (f s) &amp;gt;&amp;gt;= \ss -&amp;gt;
  return (s:ss)

The context is that I was trying to write a state machine that responded to
keyboard input:

data Event = LoYes | LoNo | LoNum -- buttons on your phone
           | ReYes | ReNo | ReNum -- buttons on his phone

data State = State { handler :: Event -&amp;gt; IO State }

main =
  hSetBuffering stdin NoBuffering &amp;gt;&amp;gt; -- so you don't have to hit return
  iterateM (\st -&amp;gt; getEvent &amp;gt;&amp;gt;= handler st) (return idle)


getEvent :: IO Event
getEvent =
  getChar &amp;gt;&amp;gt;= \c -&amp;gt; case c of
  'y' -&amp;gt; return LoYes
  'n' -&amp;gt; return LoNo
  '0' -&amp;gt; return LoNum
  'Y' -&amp;gt; return ReYes
  'N' -&amp;gt; return ReNo
  '1' -&amp;gt; return ReNum
  _   -&amp;gt; getEvent

idle, ringing, waiting, talking :: State
idle = State $ \e -&amp;gt; case e of
  LoYes -&amp;gt; return idle
  LoNo  -&amp;gt; return idle
  LoNum -&amp;gt; putStrLn "\tCalling somebody" &amp;gt;&amp;gt;
           return waiting
  ReYes -&amp;gt; return idle
  ReNo  -&amp;gt; return idle
  ReNum -&amp;gt; putStrLn "\tIt's for you-hoo" &amp;gt;&amp;gt;
           return ringing

&lt;/pre&gt;</description>
    <dc:creator>Adrian May</dc:creator>
    <dc:date>2013-06-16T08:00:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12193">
    <title>Re: Haskell Platform: Troubleshooting package configuration errors?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12193</link>
    <description>&lt;pre&gt;Apparently, "network" is a tricky package (emphasis mine):

Quote: "The library situation is great, with the exception of GUI and
***networking*** utilities, which are notorious for not compiling on all
platforms and breaking on compiler upgrades."
(source: 
http://www.reddit.com/r/haskell/comments/14nj0r/what_doesnt_haskell_do_well/c7etz7n)

Well, since Debian 7 has been released already, until I'll upgrade my
Debian 6 box, I'll content myself with the old Haskell environment
(GHC 6.12.1) that ships with Debian 6's package manager.

Thanks everybody for your attention.

Cheers.

-------- Original Message --------
Subject: Re: [Haskell-beginners] Haskell Platform: Troubleshooting 
package configuration errors?
Date: Sat, 15 Jun 2013 00:09:21 +0200
From: egarrulo &amp;lt;egarrulo&amp;lt; at &amp;gt;gmail.com&amp;gt;
To: beginners&amp;lt; at &amp;gt;haskell.org

On 14/06/13 23:30, Peter Jones wrote:


&lt;/pre&gt;</description>
    <dc:creator>egarrulo</dc:creator>
    <dc:date>2013-06-15T16:49:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12192">
    <title>Re: Reform and blaze: trouble with example code</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12192</link>
    <description>&lt;pre&gt;Now I fixed it in a slightly different way:


{-# LANGUAGE FlexibleContexts, FlexibleInstances, TypeFamilies,
OverloadedStrings #-}
module Main where

import Control.Applicative
import Control.Applicative.Indexed
import Control.Monad
import qualified Data.ByteString.Char8 as C
import Text.Blaze
import Text.Blaze.Html
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import Text.Blaze.Renderer.Utf8 (renderHtml)
import Text.Reform
import Text.Reform.Blaze.Common
import Text.Reform.Happstack
import Happstack.Server
import SharedForm

instance ToMarkup (DemoFormError [Input]) where
    toMarkup InvalidEmail    = "Email address must contain a &amp;lt; at &amp;gt;."
    toMarkup InvalidUsername = "Username must not be blank."
    toMarkup (CommonError (InputMissing fid))        = H.toHtml $ "Internal
Error. Input missing: " ++ show fid
    toMarkup (CommonError (NoStringFound input))     = H.toHtml $ "Internal
Error. Could not extract a String from: " ++ show input
    toMarkup (CommonError (MultiStringsFound input)) = H.toHtml $ "Internal
Error. Found more than one String in: " ++ show input

usernameForm :: (Monad m, FormInput input, ToMarkup (DemoFormError input))
=&amp;gt;
                     String
                  -&amp;gt; Form m input (DemoFormError input) Html () Username
usernameForm initialValue =
    Username &amp;lt;$&amp;gt; *inputText initialValue*

emailForm :: (Monad m, FormInput input, ToMarkup (DemoFormError input)) =&amp;gt;
                  String
               -&amp;gt; Form m input (DemoFormError input) Html ValidEmail Email
emailForm initialValue    =
    errorList ++&amp;gt; (label "email: " ++&amp;gt; (Email    &amp;lt;&amp;lt;$&amp;gt;&amp;gt; *inputText
initialValue* `prove` (validEmailProof InvalidEmail)))


 and got something even stranger:


Taser.hs:32:18:
    Couldn't match expected type `Form
                                    m input (DemoFormError input) Html ()
String'
                with actual type `text0 -&amp;gt; Form m0 input0 error0 Html ()
text0'
    In the return type of a call of `inputText'
    Probable cause: `inputText' is applied to too few arguments
    In the second argument of `(&amp;lt;$&amp;gt;)', namely `inputText initialValue'
    In the expression: Username &amp;lt;$&amp;gt; inputText initialValue

Taser.hs:38:56:
    Couldn't match expected type `Form
                                    m input (DemoFormError input) Html q0
a0'
                with actual type `text0 -&amp;gt; Form m0 input0 error0 Html ()
text0'
    In the return type of a call of `inputText'
    Probable cause: `inputText' is applied to too few arguments
    In the first argument of `prove', namely `inputText initialValue'
    In the second argument of `(&amp;lt;&amp;lt;$&amp;gt;&amp;gt;)', namely
      `inputText initialValue `prove` (validEmailProof InvalidEmail)'


Please would somebody explain what's going on?
Adrian.





On 15 June 2013 17:19, Adrian May &amp;lt;adrian.alexander.may&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Adrian May</dc:creator>
    <dc:date>2013-06-15T10:55:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12191">
    <title>Reform and blaze: trouble with example code</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12191</link>
    <description>&lt;pre&gt;Hi All,

I'm trying to get this example working:

http://patch-tag.com/r/stepcut/reform/snapshot/current/content/pretty/examples/BlazeMain.hs

It emitted what I took to be bitrot about ToHtml having apparently been
generallised to ToMarkup and similar stuff, so I banged it into this form:

    {-# LANGUAGE FlexibleContexts, FlexibleInstances, TypeFamilies,
OverloadedStrings #-}
    module Main where

    import Control.Applicative.Indexed
    import Control.Monad
    import qualified Data.ByteString.Char8 as C
*    import Text.Blaze *
    import qualified Text.Blaze.Html5 as H
    import qualified Text.Blaze.Html5.Attributes as A
    import Text.Blaze.Renderer.Utf8 (renderHtml)
    import Text.Reform
*    --import Text.Reform.Blaze.Common*
*    --import Text.Reform.Blaze.Text*
*    import Text.Reform.Blaze.String*
    import Text.Reform.Happstack
    import Happstack.Server
    import SharedForm

    instance *ToMarkup* (DemoFormError [Input]) where
*toMarkup* InvalidEmail    = "Email address must contain a &amp;lt; at &amp;gt;."
*toMarkup* InvalidUsername = "Username must not be blank."
*toMarkup* (CommonError (InputMissing fid))        = H.toHtml $ "Internal
Error. Input missing: " ++ show fid
*toMarkup* (CommonError (NoStringFound input))     = H.toHtml $ "Internal
Error. Could not extract a String from: " ++ show input
*toMarkup* (CommonError (MultiStringsFound input)) = H.toHtml $ "Internal
Error. Found more than one String in: " ++ show input

    usernameForm :: (Monad m, FormInput input, *ToMarkup* (DemoFormError
input)) =&amp;gt;
String
      -&amp;gt; Form m input (DemoFormError input) *Markup* NotNull Username
    usernameForm initialValue =
( *label "username: " ++&amp;gt;* (Username &amp;lt;&amp;lt;$&amp;gt;&amp;gt; inputText initialValue `prove`
(notNullProof InvalidUsername)))
    {-
    usernameForm :: (Monad m, FormInput input, ToMarkup (DemoFormError
input)) =&amp;gt;
String
      -&amp;gt; Form m input (DemoFormError input) Markup NotNull Username
    usernameForm initialValue =
errorList ++&amp;gt; (*label "username: " ++&amp;gt; *(Username &amp;lt;&amp;lt;$&amp;gt;&amp;gt; inputText
initialValue `prove` (notNullProof InvalidUsername)))
    -}
    blazeResponse :: *Markup* -&amp;gt; Response
    blazeResponse html = toResponseBS (C.pack "text/html;charset=UTF-8") $
renderHtml html

    blazeForm :: *Markup* -&amp;gt; *Markup*
    blazeForm html =
H.form ! A.action "/"
      ! A.method "POST"
      ! A.enctype "multipart/form-data" $
do html
    H.input ! A.type_ "submit"

    formHandler :: (*ToMarkup* error, Show a) =&amp;gt; Form (ServerPartT IO)
[Input] error *Markup* proof a -&amp;gt; ServerPart Response
    formHandler form =
    msum [ do method GET
      html &amp;lt;- viewForm "user" form
      ok $ blazeResponse $ blazeForm html

, do method POST
      r &amp;lt;- eitherForm environment "user" form
      case r of
(Right a) -&amp;gt; ok $ toResponse $ show a
(Left view) -&amp;gt;
  ok $ blazeResponse $ blazeForm view

]

    main :: IO ()
    main =
do let form = usernameForm ""
  simpleHTTP nullConf $ do decodeBody (defaultBodyPolicy "/tmp" 0 10000
10000)
    formHandler form


where *italics* indicate the bits I changed, but now I'm stumped by the *
bold* bit barfing with:

Taser.hs:30:13:
    Ambiguous type variable `children0' in the constraints:
      (Data.String.IsString children0)
        arising from the literal `"username: "' at Taser.hs:30:13-24
      (ToMarkup children0)
        arising from a use of `label' at Taser.hs:30:7-11
    Probable fix: add a type signature that fixes these type variable(s)
    In the first argument of `label', namely `"username: "'
    In the first argument of `(++&amp;gt;)', namely `label "username: "'
    In the expression:
      (label "username: "
       ++&amp;gt;
         (Username
          &amp;lt;&amp;lt;$&amp;gt;&amp;gt;
            inputText initialValue `prove` (notNullProof InvalidUsername)))

If I take out label "username: " ++&amp;gt;, then it all works fine, except I
don't have a label. I also tried putting the label inside the Username
constructor with the same result.

I have the following versions installed:

* blaze-markup     (library)
    Versions installed: 0.5.1.5
* blaze-html       (library)
    Versions installed: 0.6.1.1
* reform           (library)
    Versions installed: 0.1.2
* reform-blaze     (library)
    Versions installed: 0.1.2
The Glorious Glasgow Haskell Compilation System, version 7.4.2

Perhaps the markup thing is what broke it, but I can't see ToHtml in any of
those modules.

Thanks in advance,
Adrian.
&lt;/pre&gt;</description>
    <dc:creator>Adrian May</dc:creator>
    <dc:date>2013-06-15T09:19:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12190">
    <title>Re: System administration using Haskell</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12190</link>
    <description>&lt;pre&gt;

As someone who writes system scripts using Haskell (instead of what I used to
use, Python), I can highly recommend these two with the addition of
system-fileio.

&lt;/pre&gt;</description>
    <dc:creator>John Wiegley</dc:creator>
    <dc:date>2013-06-15T07:36:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12189">
    <title>Re: Haskell Platform: Troubleshooting package configuration errors?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12189</link>
    <description>&lt;pre&gt;
Thank you, Peter, but that didn't solve the issue.

Meanwhile I've discovered that I was wrong and there is an automatic way 
to install "cabal":

http://www.haskell.org/cabal/download.html

However, building it with the included "bootstrap.sh" fails with:

------------
Linking Setup ...
Configuring Cabal-1.14.0...
Setup: At least the following dependencies are missing:
base &amp;gt;=4 &amp;amp;&amp;amp; &amp;lt;3 &amp;amp;&amp;amp; &amp;gt;=2 &amp;amp;&amp;amp; &amp;lt;5, unix &amp;gt;=2.0 &amp;amp;&amp;amp; &amp;lt;2.6

Error during cabal-install bootstrap:
Configuring the Cabal package failed
------------

Still, according to cabal's homepage, "bootstrap.sh" should manage 
dependencies:

Quote: "To make the process easier the cabal-install tarball contains a 
bootstrap.sh script which downloads and installs all the dependencies."

Shouldn't it?

Thanks for your attention.

&lt;/pre&gt;</description>
    <dc:creator>egarrulo</dc:creator>
    <dc:date>2013-06-14T22:09:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12188">
    <title>Re: System administration using Haskell</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/12188</link>
    <description>&lt;pre&gt;Hello Kevin,

In conjunction with general haskell tutorials, you might be interested in
the following libraries on hackage:

* shelly - convenience functions for systems programming
* hsshellscript - similar
* system-filepath - high-level interface for manipulating directories
* shqq - run shell commands using quasi-quoting, like perl's backtick
  operator
* process - spawn external commands (supplying command name, arguments,
   environment variables, etc

These are mostly under category 'System' on hackage, here: 
http://hackage.haskell.org/packages/archive/pkg-list.html#cat:system

There are many other libraries that facilitate interacting with the OS
(especially if the OS is Unix), if you browse around hackage. Additionally,
the System.Posix.* modules provide direct bindings to POSIX services (fork,
nice, setenv, semaphores, shared memory, and so on), if that's what you
need. 

StackOverflow is pretty good for finding example code for "how do I do
X in Haskell", so by all means search there as well.

I've found that writing "shell scripts" or small unix tools in Haskell is a
bit slower at first than writing them in, say, perl, but the payoff in 1)
avoiding bugs and 2) maintainability is gigantic. Give it a try -- you may
be impressed. These days I turn to haskell for all but the smallest of
scripts. 

Good luck on your quest.

On Fri, Jun 14, 2013 at 05:29:08PM +0000, Kelleher, Kevin wrote:

&lt;/pre&gt;</description>
    <dc:creator>Dominic Espinosa</dc:creator>
    <dc:date>2013-06-14T21:54:56</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.haskell.beginners">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.haskell.beginners</link>
  </textinput>
</rdf:RDF>
