On Thu, Nov 17, 2011 at 1:17 PM, Brandon Allbery <allber...@gmail.com> wrote: > On Wed, Nov 16, 2011 at 23:54, Magicloud Magiclouds > <magicloud.magiclo...@gmail.com> wrote: >> >> I think this is where I did not understand from the very beginning. >> If the the declaration was correct, then why cannot b be H? >> Referring to Data.List.genericLength, I was confused. > > Because it doesn't mean that *you* get to decide what it is; it means *the > caller* gets to decide, and you are obligated to honor the caller's wishes. > Returning always an H violates this, because there is no way to prove that > H is the only possible response. > -- > brandon s allbery allber...@gmail.com > wandering unix systems administrator (available) (412) 475-9364 vm/sms > >
Ah, list and single value is a typo problem. So I think I got what you guys meant, I limited ClassB to only H. Then how to archive my requirement, that from and to only return items that instanced ClassB? -- 竹密岂妨流水过 山高哪阻野云飞 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe