Skip to content

User guide section on AllowAmbiguousTypes should mention TypeApplications

https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html?highlight=allowambiguoustypes#ghc-flag--XAllowAmbiguousTypes

With type applications it is tempting to write

class C x a where
    meth :: a

which will fail the ambiguity check as x is not used in any methods. One way to get around this is to use TypeApplications in order to specify what x should be at each usage of meth. A small section in the user guide explaining this and linking to the section on TypeApplications would be useful.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information