> > In that sense every value in maths is a function. In other words: Your > extension of everything (!) to functions is redundant. >
And function is not unique in this way. All types can be embedded into pairs also, e.g., newtype MyInt = MyInt ((),Int), or newtype MyInt = MyInt (((),Int),()), etc. - Conal 2011/12/31 Ertugrul Söylemez <e...@ertes.de> > Yves Parès <limestrael+hask...@gmail.com> wrote: > > > But still, I maintain my previous view. I could clarify that by saying > > that (e.g. for Maybe) we could separate it in two types, Maybe itself > > and its monad: > > > > -- The plain Maybe type > > data Maybe a = Just a | Nothing > > > > -- The MaybeMonad > > newtype MaybeMonad a = MM ( () -> Maybe a ) > > > > That's what using Maybe as a monad semantically means, doesn't it? > > That's a statement like "the sky is blue". You can represent any value > as a function of (). You are saying that every integer is a function. > > newtype MyInt = MyInt (() -> Int) > newtype My a = My (() -> a) > > Think of it this way: There is something like a canonical > representation of every monad. If you let that one be the one with the > least order (which is reasonable), then no, not every monad's canonical > representation is a function, because the base library definition of > Maybe is the canonical one (order zero). > > In that sense every value in maths is a function. In other words: Your > extension of everything (!) to functions is redundant. > > You get the idea. > > > Greets, > Ertugrul > >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe