@@ -45,8 +45,8 @@ import Data.List
45import Data.Maybe (maybeToList, isNothing, isJust, fromMaybe)
45import Data.Maybe (maybeToList, isNothing, isJust, fromMaybe)
46import qualified Data.Data as D
46import qualified Data.Data as D
47import Data.Generics
47import Data.Generics
48− (everythingWithContext, mkM, everywhereM, everything, mkT,
48+ (everythingWithContext, mkM, everywhereM,
49− something, everywhere, mkQ)
49+ everything, mkT, something, everywhere, mkQ)
50import Data.Generics.Extras
50import Data.Generics.Extras
52import Language.PureScript.Declarations
52import Language.PureScript.Declarations
@@ -253,7 +253,12 @@ isTyped (name, value) = (name, (value, Nothing))
253-- Map a function over type annotations appearing inside a value
253-- Map a function over type annotations appearing inside a value
255overTypes :: (Type -> Type) -> Value -> Value
255overTypes :: (Type -> Type) -> Value -> Value
256−overTypes f = everywhere (mkT f)
256+overTypes f = everywhere (mkT g)
259+ g (TypedValue checkTy val t) = TypedValue checkTy val (f t)
260+ g (TypeClassDictionary b (nm, tys) sco) = TypeClassDictionary b (nm, map f tys) sco
259-- Replace type class dictionary placeholders with inferred type class dictionaries
264-- Replace type class dictionary placeholders with inferred type class dictionaries