|Subject:||Re: [Haskell-cafe] type families and type signatures|
|Date:||Wed, 9 Apr 2008 19:39:18 +0100|
On Wed, Apr 9, 2008 at 8:53 AM, Martin Sulzmann <martin.sulzmann@xxxxxxxxx> wrote:
I'm referring to the situation where the type inferred by the type checker is illegal for me to put into the program.
In our example we can fix this in two ways, by making foo' illegal even when it has no signature, or making foo' legal even when it has a signature.
To make it illegal: If foo' has no type signature, infer a type for foo', insert this type as a signature and type check again. If this fails, foo' is illegal.
To make it legal: If foo' with a type signature doesn't type check, try to infer a type without a signature. If this succeeds then check that the type that was inferred is alpha-convertible to the original signature. If it is, accept foo'; the signature doesn't add any information.
Either of these two option would be much preferable to the current (broken) situation where the inferred signature is illegal.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/haskell-cafe
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [Haskell-cafe] instance Monad m => Functor m, Hans Aberg|
|Next by Date:||Re: [Haskell-cafe] instance Monad m => Functor m, Hans Aberg|
|Previous by Thread:||Re: [Haskell-cafe] type families and type signatures, Martin Sulzmann|
|Next by Thread:||Re: [Haskell-cafe] type families and type signatures, Manuel M T Chakravarty|
|Indexes:||[Date] [Thread] [Top] [All Lists]|