2011/10/18 Roel van Dijk <vandijk.r...@gmail.com>:
> Maybe we [can] create an example program which would fail with the
> more general type.

Migrating the function "foo" from bytestring to vector-bytestring
would fail with more general types:

> import Data.ByteString
> foo = print empty
Ok, modules loaded: Test.

With vector:
> import Data.Vector.Storable
> foo = print empty
    Ambiguous type variable `a0' in the constraints:
      (Show a0) arising from a use of `print'
                at /home/roelvandijk/development/test.hs:5:7-11
      (Storable a0) arising from a use of `empty'
                    at /home/roelvandijk/development/test.hs:5:13-17
    Probable fix: add a type signature that fixes these type variable(s)
    In the expression: print empty
    In an equation for `foo': foo = print empty
Failed, modules loaded: none.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to