Suppose we have
newtype Foo x
instance Monad Foo
runFoo :: Foo x -> IO x
What sort of things can I do to check that I actually implemented this
correctly? I mean, ignoring what makes Foo special for a moment, how can
I check that it works correctly as a monad.
_
Excerpts from Andrew Coppin's message of Sat Oct 17 15:21:28 -0400 2009:
> Suppose we have
>
>newtype Foo x
>instance Monad Foo
>runFoo :: Foo x -> IO x
>
> What sort of things can I do to check that I actually implemented this
> correctly? I mean, ignoring what makes Foo special for
On Sat, Oct 17, 2009 at 3:21 PM, Andrew Coppin
wrote:
> Suppose we have
>
> newtype Foo x
> instance Monad Foo
> runFoo :: Foo x -> IO x
>
> What sort of things can I do to check that I actually implemented this
> correctly? I mean, ignoring what makes Foo special for a moment, how can I
> chec
Edward Z. Yang wrote:
Excerpts from Andrew Coppin's message of Sat Oct 17 15:21:28 -0400 2009:
Suppose we have
newtype Foo x
instance Monad Foo
runFoo :: Foo x -> IO x
What sort of things can I do to check that I actually implemented this
correctly? I mean, ignoring what makes Foo
On Sat, Oct 17, 2009 at 3:24 PM, Andrew Coppin
wrote:
> Edward Z. Yang wrote:
>>
>> Excerpts from Andrew Coppin's message of Sat Oct 17 15:21:28 -0400 2009:
>>
>>>
>>> Suppose we have
>>>
>>> newtype Foo x
>>> instance Monad Foo
>>> runFoo :: Foo x -> IO x
>>>
>>> What sort of things can I d
Derek Elkins wrote:
On Sat, Oct 17, 2009 at 3:24 PM, Andrew Coppin
wrote:
I'm reasonably confident it works, but not 100% sure...
newtype Foo x = Foo (M -> IO x)
In this case it is trivial, Foo = ReaderT M IO which is a monad.
Ah yes, of course... I keep forgetting that the Reader
Am Samstag 17 Oktober 2009 22:24:08 schrieb Andrew Coppin:
> Edward Z. Yang wrote:
> > Excerpts from Andrew Coppin's message of Sat Oct 17 15:21:28 -0400 2009:
> >> Suppose we have
> >>
> >>newtype Foo x
> >>instance Monad Foo
> >>runFoo :: Foo x -> IO x
Are you sure that's really the
Daniel Fischer wrote:
Am Samstag 17 Oktober 2009 22:24:08 schrieb Andrew Coppin:
Edward Z. Yang wrote:
Excerpts from Andrew Coppin's message of Sat Oct 17 15:21:28 -0400 2009:
Suppose we have
newtype Foo x
instance Monad Foo
runFoo :: Foo x -> IO x
Are you s