WIP: Default IsStatic constraints to StaticPtr with -XMonomorphismRestriction
fix #20727
(hls and/or emacs very helpfully auto-reformatted a bunch of code, which i'll return to the original state before i put this up for review)
test with:
{-# LANGUAGE StaticPointers #-}
{-# LANGUAGE MonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
import GHC.StaticPtr
xyz_integer = 1
xyz_string = "a"
xyz_static = static 'a'
doesn't work currently:
disambigGroup {
Integer
t_aA9[tau:0]
[[W] $dIsStatic_aA6 {0}:: IsStatic t_aA9[tau:0] (CDictCan)]
newTcEvBinds unique = aJi
disambigGroup failed, will try other default types } Integer
disambigGroup {
Double
t_aA9[tau:0]
[[W] $dIsStatic_aA6 {0}:: IsStatic t_aA9[tau:0] (CDictCan)]
newTcEvBinds unique = aJj
disambigGroup failed, will try other default types } Double
disambigGroup {
String
t_aA9[tau:0]
[[W] $dIsStatic_aA6 {0}:: IsStatic t_aA9[tau:0] (CDictCan)]
newTcEvBinds unique = aJk
disambigGroup failed, will try other default types } String
disambigGroup {
StaticPtr
t_aA9[tau:0]
[[W] $dIsStatic_aA6 {0}:: IsStatic t_aA9[tau:0] (CDictCan)]
newTcEvBinds unique = aJl
disambigGroup failed, will try other default types } StaticPtr
disambigGroup
in GHC.Tc.Solver sees the new default but doesn't use it (sanity check: it does fire for String
with OverloadedStrings
enabled)