Luke Palmer wrote:
It would be nice if typeclass authors could somehow declare the minimal
complete definition, so we could get a warning in this case.
Or the minimal complete definitions. Since there can be more than one
covering set.
--
Live well,
~wren
2008/12/7 John Ky <[EMAIL PROTECTED]>:
> Thanks for the clarification.
>
> They're all the same, as you've explained:
>
> Prelude> putStrLn $ (show . read) "123"
> *** Exception: Prelude.read: no parse
>
> Prelude> putStrLn $ show $ read "123"
> *** Exception: Prelude.read: no parse
>
> Prelude> pu
claus.reinke:
> > For this purpose, the only thing better is if we could somehow
> > get them to mention Microsoft everywhere they mention Haskell.
> > Any actual explaining would just get in the way :)
>
> Doesn't quite work without explaining, because one would have
> to be very careful not to m
For this purpose, the only thing better is if we could somehow
get them to mention Microsoft everywhere they mention Haskell.
Any actual explaining would just get in the way :)
Doesn't quite work without explaining, because one would have
to be very careful not to mis-represent financial supp
solistic:
> Hello List,
> when I try to install the package "plugins" with cabal i get the following
> error.
>
> cabal: dependencies conflict: ghc-6.8.3 requires Cabal ==1.2.4.0 however
> Cabal-1.2.4.0 was excluded because plugins-1.3.1 requires Cabal ==1.4.*
>
> Is there a way to resolve this?
2008/12/8 Joachim Breitner <[EMAIL PROTECTED]>:
> So A^(B+C) = A^B × A^C ?
That's part of the basis for Hinze's paper on memoization:
http://www.informatik.uni-bonn.de/~ralf/publications/WGP00b.ps.gz
> It's always nice to see that I havn't learned the elementary power
> calculation rules for noth
It's just there so you can show your boss it was in Dr. Dobbs,
and so your boss can think "Wow, I know what FP is -- thank
you, Dr. Dobbs!".
For this purpose, the only thing better is if we could somehow
get them to mention Microsoft everywhere they mention Haskell.
Any actual explaini
That "article" is an incredibly half-assed job. It reads like a
high-school essay, thrown together in a hurry before a 1 hour
deadline. Maybe it's a good sign that people think they have to do
this, but it really doesn't help anyone who wants to know why FP might
be worth learing.
2008/12/8 Stef
Hi,
Am Montag, den 08.12.2008, 15:59 -0600 schrieb Nathan Bloomfield:
> Slightly off topic, but the A^B notation for hom-sets also makes the
> natural isomorphism we call currying expressable as A^(BxC) = (A^B)^C.
So A^(B+C) = A^B × A^C ?
Oh, right, I guess that’s actually true:
uncurry either
>
>
>> In set theory, and sometimes in category theory, A^B is just another
> notation for Hom(B, A), and the latter might be given the alternate notation
> B -> A. And th reason is that for finite sets, computing cardinalities
> result in the usual power function of natural numbers - same as Churc
> (...) The reason why I'm asking is that I've just created a
> Setup.hs with 'defaultMainNoRead', and 'Setup build' complains
> it can't find A.B.C. When I copy (move doesn't work) C.hs from
> /A/B to /A.B.C.hs, it doesn't complain,
> although it fails to generate my library sayin
On 8 Dec 2008, at 19:36, Dan Piponi wrote:
On Sun, Dec 7, 2008 at 2:05 AM, Hans Aberg <[EMAIL PROTECTED]> wrote:
As for the operator itself, it appears in Alonzo Church, "The
Calculi of
Lambda-Conversion", where it is written as exponentiation, like x^f
That's reminiscent of the notation in
On Sun, Dec 7, 2008 at 2:05 AM, Hans Aberg <[EMAIL PROTECTED]> wrote:
> As for the operator itself, it appears in Alonzo Church, "The Calculi of
> Lambda-Conversion", where it is written as exponentiation, like x^f
That's reminiscent of the notation in Lambek and Scott where (roughly
speaking) the
On Mon, Dec 8, 2008 at 4:43 AM, Tobias Bexelius
<[EMAIL PROTECTED]> wrote:
> {-# LANGUAGE OverlappingInstances #-}
>
> With this extension, the most specific instance will be used, i.e.
> "instance TShow Engine" for Engine's, no matter if it is an instance of
> Show.
Of course, down this way madne
On Sun, Dec 7, 2008 at 1:51 AM, Fraser Wilson <[EMAIL PROTECTED]> wrote:
> (I know you know this, I just have this weird fascination with the showList
> wart, although for the life of me I can't think of a better way of doing it)
Well, if you extend the compiler's core language with "typecase", yo
On Mon, 2008-12-08 at 09:58 -0800, Mark P. Jones wrote:
> Don Stewart wrote:
> > Which suggests that $ was already in the 1.0 report going to SIGPLAN.
> > Perhaps Paul or Simon could shed light on it? Anyone have the 1.0 report
> > lying around to check if it was in earlier?
>
> As far as Haskell
Don Stewart wrote:
Which suggests that $ was already in the 1.0 report going to SIGPLAN.
Perhaps Paul or Simon could shed light on it? Anyone have the 1.0 report
lying around to check if it was in earlier?
As far as Haskell is concerned, the first "report"-ed occurrence
of the $ operator was in
> http://www.ddj.com/development-tools/212201710;jsessionid=3MQLTTYJRPL3CQSNDLRSKH0CJUNN2JVN
Do they purposefully obfuscate names?
I mean who are those "Martin Obersky" and "Don Sype"?
Stefan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.
Hi,
I've just seen this from Distribution.ModuleName (ghc 6.10):
toFilePath $ ( simple "A.B.C" )
to which ghci answers: "A.B.C".
Shouldn't it say "A/B/C"? The reason why I'm asking is that I've
just created a Setup.hs with 'defaultMainNoRead', and 'Setup
build' complains it can't find
Hi,
I have a small problem with System.Random.randoms. I need a rather
large number of random numbers but the following program consumes a
huge amount of memory. I terminated it when it used up more than 2 Gb:
Interesting. Well, if you don't solve this problem,
I recently needed random numbers
The problem is that Engine *could* be made an instance of Show (remember
that any user of the module can create that instance later).
What you need is the overlappinginstances extension:
{-# LANGUAGE OverlappingInstances #-}
With this extension, the most specific instance will be used, i.e.
"inst
Hi,
I've got the following code which tries to implement a TShow class, which is
equivalent to Show, except it is supposed to work on TVar types as well.
import GHC.Conc
createEngine :: String -> Int -> Int -> IO Engine
createEngine name major minor = do
tUsers <- newTVarIO []
return $ Eng
John Ky wrote:
Having created a new class is it possible to do some magic so that it
can be put it into a deriving clause?
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/derive
--
Dr. Janis Voigtlaender
http://wwwtcs.inf.tu-dresden.de/~voigt/
mailto:[EMAIL PROTECTED]
_
Hi,
I've defined a class and some instances, which I'm hoping would help me
"show" values of types that may include transactional elements.
class TShow a where
tshow :: a -> IO String
instance Show (TVar a) where
show = "%"
instance (Show a) => TShow a where
tshow a = return $ show a
On 06/12/2008, at 6:32 AM, Andrew Coppin wrote:
Tim Docker wrote:
If you implement your drawing logic as a
function from time to the appropriate render actions, ie
| import qualified Graphics.Rendering.Cairo as C
| | type Animation = Time -> C.Render ()
then you just need to call this functi
* Neil Mitchell <[EMAIL PROTECTED]> [2008-12-08 08:29:03+]
> > Apart from this, HSE now also parses any unrecognized pragma in option
> > (e.g. LANGUAGE), declaration (e.g. RULES) or expression (e.g. SCC)
> > position, allowing user-customized pragmas. Unrecognized pragmas in
> > other position
Thanks a lot for the quick replies. Indeed that was not clear to me.
Cheers,
Martin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hello Martin,
Monday, December 8, 2008, 12:04:06 PM, you wrote:
> Now it took me about a week to realise, that 'instance Ord Pat' causes
> ghc to loop.
> naive Ord
>
>> instance Ord Exp
>> instance Ord Pat
i think you just don't learned this part of Haskell. empty
instance declarations like
On Mon, Dec 8, 2008 at 2:04 AM, Martin Hofmann <
[EMAIL PROTECTED]> wrote:
> I am storing the TH data types 'Exp' and 'Pat' in Maps and Sets. As a
> first attempt to quickly get rid of typechecker's complaints I defined
> some naive instances of Ord for Exp and Pat.
>
> Now it took me about a week
On Mon, Dec 8, 2008 at 2:04 AM, Martin Hofmann <
[EMAIL PROTECTED]> wrote:
> I am storing the TH data types 'Exp' and 'Pat' in Maps and Sets. As a
> first attempt to quickly get rid of typechecker's complaints I defined
> some naive instances of Ord for Exp and Pat.
>
> Now it took me about a week
I am storing the TH data types 'Exp' and 'Pat' in Maps and Sets. As a
first attempt to quickly get rid of typechecker's complaints I defined
some naive instances of Ord for Exp and Pat.
Now it took me about a week to realise, that 'instance Ord Pat' causes
ghc to loop. Apparently, there is a reaso
Hi Niklas,
> Apart from this, HSE now also parses any unrecognized pragma in option
> (e.g. LANGUAGE), declaration (e.g. RULES) or expression (e.g. SCC)
> position, allowing user-customized pragmas. Unrecognized pragmas in
> other positions will (unfortunately) give a parse error. If this ever
> m
32 matches
Mail list logo