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: what is a qualified type? (Heinrich Apfelmus)
2. cabal errors.. (Gregory Guthrie)
3. Re: cabal errors.. (Stephen Tetley)
----------------------------------------------------------------------
Message: 1
Date: Fri, 10 Aug 2012 13:29:47 +0200
From: Heinrich Apfelmus <[email protected]>
Subject: Re: [Haskell-beginners] what is a qualified type?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed
Christopher Howard wrote:
> In short, what is a qualified type and how is it used? (Any examples
> would be appreciated.)
>
> I feel somewhat embarrassed asking, as I used to know. I dropped Haskell
> a while ago and am just now picking it up again, and unfortunately I
> have forgotten many concepts.
>
> If someone could point me to the appropriate tutorial that might be
> enough. For some reason, all my StartPage searches are only bringing me
> to documents that assume I already understand qualified types, or to
> books I can't afford to buy.
This is a type:
[a] -> a
This is a qualified type:
Num a => [a] -> a
You can say that qualified types are types that include constraints via
the => symbol.
In Haskell, you will mostly see type class constraints, but there are
other possibilities as well. They are all grouped together in the notion
of "qualified types".
http://www.haskell.org/haskellwiki/Research_papers/Type_systems#Qualified_types
As a practicing Haskell programmer, you don't actually need to know how
the theory of qualified types works. The only thing you need to be aware
of the expression "ambiguous constraint", because that's an occasional
error message in GHC. Here an example:
Show a => Int -> Bool -- ambiguous constraint
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
------------------------------
Message: 2
Date: Fri, 10 Aug 2012 21:14:18 -0500
From: Gregory Guthrie <[email protected]>
Subject: [Haskell-beginners] cabal errors..
To: "[email protected]" <[email protected]>
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="us-ascii"
I am (again) running into cabal install issues; which have been all too common
for me.
In this case as an example, I tried this:
C:\Users\haskell>Cabal install buildwrapper
.....
buildwrapper-0.6.0 depends on regex-tdfa-1.1.8 which failed to install.
regex-tdfa-1.1.8 failed during the building phase. The exception was:
ExitFailure 1
So I tried this:
C:\Users\haskell>cabal install regex-tdfa
Resolving dependencies...
In order, the following would be installed:
regex-base-0.93.2 (reinstall) changes: array-0.3.0.2 -> 0.4.0.0,
base-4.3.1.0
-> 4.5.0.0, bytestring-0.9.1.10 -> 0.9.2.1, containers-0.4.0.0 -> 0.4.2.1,
mtl-2.0.1.0 -> 2.1.2
regex-tdfa-1.1.8 (new package)
cabal: The following packages are likely to be broken by the reinstalls:
regex-posix-0.95.1
regex-compat-0.95.1
haskell-platform-2011.3.0.0
regex-posix-0.94.4
regex-compat-0.93.1
haskell-platform-2011.2.0.1
regex-posix-0.95.1
regex-compat-0.95.1
haskell-platform-2012.2.0.0
Use --force-reinstalls if you want to install anyway.
So what to do?
Last time I got into a situation like this I tried to start-over with cabal,
remove all local cache and rebuild the library.
>From a suggestion in SO; delete the ~/ghc & ~/cabal files and restart cabal,
>by a "cabal install cabal-install".
Didn't help much, still stuck. Any hints?
I find that library issues like this with cabal are the biggest time-soak I
have with using Haskell, and I usually have to abandon attempts to try some new
library for various examples.
"Ghc-pkg check" lists lots of warnings, but all from haddock-html or
haddock-interface; not sure what to make of that but I think it just means that
somehow documentation was not installed for these packages.
>>cabal -V
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library
GHCi version 7.4.1
HaskellPlatform-2012.2.0.0
-------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120810/31721615/attachment.htm>
------------------------------
Message: 3
Date: Sat, 11 Aug 2012 07:00:50 +0100
From: Stephen Tetley <[email protected]>
Subject: Re: [Haskell-beginners] cabal errors..
To: Gregory Guthrie <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID:
<CAB2TPRCZpoAoiTuv1REUpMu5BjN6QYrL0ua=hwytrnb+zjp...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
>From the cabal file accessible on Hackage it looks like you need to
build regex-tfda with the build flag "base4".
I don't uses cabal-install so can't say how to send it build flags
(hopefully should be very simple), but downloading and untarring the
archive and using the "runhaskell Setup ..." steps lets you use build
flags in the configure step.
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 50, Issue 11
*****************************************