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. Output of `ghc-mod check` and `runhaskell` (Dontdie YCH)
2. Re: Deploying a haskell application (not a webapp)
(Thomas Jakway)
3. Creating Indexes (martin)
----------------------------------------------------------------------
Message: 1
Date: Sun, 14 Dec 2014 17:26:56 +0900
From: Dontdie YCH <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] Output of `ghc-mod check` and
`runhaskell`
Message-ID:
<captm4gk3xhprvpw17hxknx1dhzs808ydbtgchxgvf_g3stg...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hello,
My current setup for haskell.
Arch Linux
nix package manager - only for haskell stuff
nix-shell
vim
syntastic + ghc-mod
guard - `cabal run` on change of '*.hs'
I would like to improve readability of ghc-mod's output. Compare to
output of runhaskell, It's quite hard to understand.
~~~
% ghc-mod check LogAnalysis.hs
LogAnalysis.hs:90:25:Couldn't match expected type
?[ghc-prim:GHC.Types.Char]? with actual type
?Log.LogMessage -> [ghc-prim:GHC.Types.Char]?In the second argument of
?(ghc-prim:GHC.Classes.==)?, namely ?upcase GHC.Base..
LogAnalysis.getMsg?In the expression: str' ghc-prim:GHC.Classes.==
upcase GHC.Base.. LogAnalysis.getMsgIn the expression: str'
ghc-prim:GHC.Classes.== upcase GHC.Base.. LogAnalysis.getMsg
GHC.Base.$ x
LogAnalysis.hs:90:17:Couldn't match expected type ?s -> t?
with actual type ?ghc-prim:GHC.Types.Bool?Relevant bindings include x
:: s (bound at LogAnalysis.hs:90:13) p :: s -> t (bound at
LogAnalysis.hs:90:11)The first argument of ($) takes one argument,but
its type ?ghc-prim:GHC.Types.Bool? has noneIn the expression: str'
ghc-prim:GHC.Classes.== upcase GHC.Base.. LogAnalysis.getMsg
GHC.Base.$ xIn an equation for ?p?: p x = str'
ghc-prim:GHC.Classes.== upcase GHC.Base.. LogAnalysis.getMsg
GHC.Base.$ x
% runhaskell LogAnalysis.hs
LogAnalysis.hs:90:17:
Couldn't match expected type ?s -> t? with actual type ?Bool?
Relevant bindings include
x :: s (bound at LogAnalysis.hs:90:13)
p :: s -> t (bound at LogAnalysis.hs:90:11)
The first argument of ($) takes one argument,
but its type ?Bool? has none
In the expression: str' == upcase . getMsg $ x
In an equation for ?p?: p x = str' == upcase . getMsg $ x
LogAnalysis.hs:90:25:
Couldn't match expected type ?[Char]?
with actual type ?LogMessage -> [Char]?
In the second argument of ?(==)?, namely ?upcase . getMsg?
In the expression: str' == upcase . getMsg
In the expression: str' == upcase . getMsg $ x
~~~
How I can do either
- change ghc-mod's output like runhaskell or
- use runhaskell for vim syntastic
Thanks.
------------------------------
Message: 2
Date: Sun, 14 Dec 2014 04:21:29 -0500
From: Thomas Jakway <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Deploying a haskell application (not
a webapp)
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"
I'd be interested in reading that and am sure others would be too!
On 12/13/14 1:01 PM, Norbert Melzer wrote:
>
> I'd think the details would be of general interest, why don't write an
> article/blogpost?
>
> Am 13.12.2014 18:50 schrieb "Ryan Trinkle" <[email protected]
> <mailto:[email protected]>>:
>
> I use Nix package manager for binary deployment of Haskell
> applications, and it works great. Feel free to email me directly
> if you're interested in the specifics.
>
> On Dec 13, 2014 12:34 PM, "Alan Buxton" <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hi thanks for the input so far.
>
> See attached a zipfile of a simplified version of the app. It
> runs locally on my dev machine and I want to be able to run it
> on a separate server. I don?t want to share the app with
> anyone else.
>
> If I do ?cabal install? with this particular application then
> it creates an executable at ~/.cabal/bin/app1
>
> If I copy that file onto the target server then I get the
> following output:
>
> $ ./app1 fred
>
> Hi fred
>
> Time now is 2014-12-13 17:27:21.764048 UTC
>
> app1: /home/alan/.cabal/share/app1-0.1.0.0/data/file1.txt:
> openFile: does not exist (No such file or directory)
>
> So sort of works but in particular the file attachment piece
> doesn?t work.
>
> *From:*Beginners [mailto:[email protected]
> <mailto:[email protected]>] *On Behalf Of *Kim-Ee Yeoh
> *Sent:* 13 December 2014 16:53
> *To:* The Haskell-Beginners Mailing List - Discussion of
> primarily beginner-level topics related to Haskell
> *Subject:* Re: [Haskell-beginners] Deploying a haskell
> application (not a webapp)
>
> On Sat, Dec 13, 2014 at 8:54 PM, Alan Buxton
> <[email protected] <mailto:[email protected]>> wrote:
>
> I now want to deploy this application onto a separate server.
> This is not a webapp.
>
> Try as I might, Google will not point me in the direction of
> how to do this, apart from loads of links to Keter which is
> not what I want (there is no nginx or any other web server
> involved).
>
> Looks like there are some assumptions probably based on
> familiarity with some other language + toolchain.
>
> Of what is the haskell analogue you're looking for?
>
>
> -- Kim-Ee
>
>
> _______________________________________________
> Beginners mailing list
> [email protected] <mailto:[email protected]>
> http://www.haskell.org/mailman/listinfo/beginners
>
>
> _______________________________________________
> Beginners mailing list
> [email protected] <mailto:[email protected]>
> http://www.haskell.org/mailman/listinfo/beginners
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20141214/ab8177d7/attachment-0001.html>
------------------------------
Message: 3
Date: Sun, 14 Dec 2014 12:15:46 +0100
From: martin <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] Creating Indexes
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-15
Hello all,
I recently wrote a Haskell program, which accesses Lists extensivly. That was
okay to verify the overall idea, but
performance degraded rapidly when I made the lists bigger. There was a
quadratic effect and this was not surprizing,
given the nature of the code.
I am somewhat aware of Haskell types which offer faster access. But they all
seem to assume that I know the way data is
accessed when I write the type. A new access path may force me to rededign the
type.
What I am looking for is something which behaves like indexes in a RDBMS, i.e.
to define a list-like type on an innocent
data type (like a tuple) and then add indexes as needed. Is there such a thing?
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 78, Issue 10
*****************************************