On Fri, 2009-02-13 at 11:15 +1100, John Ky wrote:
> Hi Johnaton,
> 
> Ah yes.  That makes sense.  Is there a way to define type r to be all
> types except functions?

Not without overlapping instances.  I *think* if you turn on {-#
LANGUAGE OverlappingInstances #-} then

  instance Broadcast r where
    type Result = [r]
    broadcast xn = xn

should do what you want (instance resolution delayed until r has a type
constructor at top level; this instance selected if no other instance is
in scope --- should be equivalent to r not a function type unless
someone else defines an instance!); but I know that's not a pretty way
of doing things.

jcc


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to