On Tue, Jan 3, 2012 at 05:50, Yucheng Zhang <yczhan...@gmail.com> wrote:
> On Tue, Jan 3, 2012 at 6:44 PM, Brandon Allbery <allber...@gmail.com> > wrote: > > On Tue, Jan 3, 2012 at 05:17, Yucheng Zhang <yczhan...@gmail.com> wrote: > >> > >> subsome :: [RRule nt t s] -> Either String ([t], s) > >> > >> It seems to me that the compiler is not sure the two 'nt' are equal. > >> The ScopedTypeVariables can make the compiler believe they are equal. > > > > But ScopedTypeVariables is enabled already. > > Sorry, I meant actually using ScopedTypeVariables as in the first function, > which compiles well: > > legSome :: LegGram nt t s -> nt -> Either String ([t], s) > Except he's not; an explicit "forall" is needed to indicate the type variables to be brought into scope. It would need to be > legSome :: forall nt t s. LegGram nt t s -> nt -> Either String ([t], s) -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe