summaryrefslogtreecommitdiff
path: root/compiler/utils/Encoding.hs
diff options
context:
space:
mode:
authorIavor S. Diatchki <iavor.diatchki@gmail.com>2014-06-29 17:22:16 -0700
committerIavor S. Diatchki <iavor.diatchki@gmail.com>2014-06-29 17:22:16 -0700
commit6290eeadf61a40f2eb08d0fd7ef1f3b7f9804178 (patch)
treea8b94173a7585cd1e7c543e2f76b32e7b6f31db1 /compiler/utils/Encoding.hs
parent9982715002edfd789926fd4ccd42bea284a67939 (diff)
downloadhaskell-6290eeadf61a40f2eb08d0fd7ef1f3b7f9804178.tar.gz
Overlapable pragmas for individual instances (#9242)
Programmers may provide a pragma immediately after the `instance` keyword to control the overlap/incoherence behavior for individual instances. For example: instance {-# OVERLAP #-} C a where ... I chose this notation, rather than the other two outlined in the ticket for these reasons: 1. Having the pragma after the type looks odd, I think. 2. Having the pragma after there `where` does not work for stand-alone derived instances I have implemented 3 pragams: 1. NO_OVERLAP 2. OVERLAP 3. INCOHERENT These correspond directly to the internal modes currently supported by GHC. If a pragma is specified, it will be used no matter what flags are turned on. For example, putting `NO_OVERLAP` on an instance will mark it as non-overlapping, even if `OVERLAPPIN_INSTANCES` is turned on for the module.
Diffstat (limited to 'compiler/utils/Encoding.hs')
0 files changed, 0 insertions, 0 deletions