Examples of Haskell Type Errors

One in the wild:

<interactive>:2:1: error:
    • Couldn't match representation of type ‘a0’
                               with that of ‘haskell-gi-base-0.26.8:Data.GI.Base.BasicTypes.ManagedPtr
                                               ()’
        arising from a superclass required to satisfy ‘Coercible
                                                         a0
                                                         (haskell-gi-base-0.26.8:Data.GI.Base.BasicTypes.ManagedPtr
                                                            ())’,
        arising from a superclass required to satisfy ‘haskell-gi-base-0.26.8:Data.GI.Base.BasicTypes.ManagedPtrNewtype
                                                         a0’,
        arising from a superclass required to satisfy ‘haskell-gi-base-0.26.8:Data.GI.Base.BasicTypes.GObject
                                                         a0’,
        arising from a use of ‘passwordLookupSync’
    • In the expression:
        passwordLookupSync
          Nothing (Map.fromList [("key", "value")]) Nothing
      In an equation for ‘it’:
          it
            = passwordLookupSync
                Nothing (Map.fromList [("key", "value")]) Nothing

It is still being diagnosed, I would have no idea where to start with this.

3 Likes