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: Monad instances and type synonyms (Brent Yorgey)
2. Re: Monad instances and type synonyms (Christopher Howard)
----------------------------------------------------------------------
Message: 1
Date: Tue, 16 Apr 2013 09:57:18 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] Monad instances and type synonyms
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Mon, Apr 15, 2013 at 09:51:11PM -0800, Christopher Howard wrote:
> On 04/14/2013 04:09 AM, Brent Yorgey wrote:
> > On Sat, Apr 13, 2013 at 05:03:57PM -0800, Christopher Howard wrote:
> >
> > Sorry, what you're trying to do is simply not possible. Type synonyms
> > must always be fully applied. So if you want to make Adjustment an
> > instance of Monad then you have to make it a newtype.
> >
> > However... Adjustment already *is* an instance of Monad! (In
> > particular ((->) e) is an instance for any type e.) So there's no
> > need for you to redeclare an instance yourself. These days I think
> > you just have to import Control.Monad to bring the instance in scope.
> >
> > -Brent
> >
>
> Thank you everyone for your patience. I believe what you say about it
> already being an instance of Monad, but I don't seem to have convinced
> the compiler:
What version of GHC do you have? Try 'import Control.Monad.Instances'
in place of 'Control.Monad'. The instances have moved but I don't
remember when.
-Brent
------------------------------
Message: 2
Date: Tue, 16 Apr 2013 07:49:59 -0800
From: Christopher Howard <[email protected]>
Subject: Re: [Haskell-beginners] Monad instances and type synonyms
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
On 04/16/2013 05:57 AM, Brent Yorgey wrote:
> On Mon, Apr 15, 2013 at 09:51:11PM -0800, Christopher Howard wrote:
>
> What version of GHC do you have? Try 'import Control.Monad.Instances'
> in place of 'Control.Monad'. The instances have moved but I don't
> remember when.
>
> -Brent
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
On 04/16/2013 05:57 AM, Brent Yorgey wrote:> On Mon, Apr 15, 2013 at
09:51:11PM -0800, Christopher Howard wrote:
>
> What version of GHC do you have? Try 'import Control.Monad.Instances'
> in place of 'Control.Monad'. The instances have moved but I don't
> remember when.
>
Control.Monad.Instances worked, thanks. I am running GHC 7.4.1.
--
frigidcode.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130416/2b8e059b/attachment-0001.pgp>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 58, Issue 30
*****************************************