@@ -102,16 +102,9 @@ get env subDict key = Map.findWithDefault err key (subDict env)
102102freshDataScheme :: Environment -> String -> IO (Int, [Variable], [Type], Type)
103103freshDataScheme env name = get env constructor name
104104
105−
106−instantiateType :: Environment -> Src.Type -> IO Type
107−instantiateType env sourceType =
108− snd <$> instantiateTypeWithContext env sourceType Map.empty
109−
110−instantiateTypeWithContext :: Environment
111− -> Src.Type
112− -> Map.Map String Variable
113− -> IO ([Variable], Type)
114−instantiateTypeWithContext env sourceType dict =
105+instantiateType ::
106+ Environment -> Src.Type -> Map.Map String Variable -> IO ([Variable], Type)
107+instantiateType env sourceType dict =
115108 do (tipe, dict') <- State.runStateT (instantiator env sourceType) dict
116109 return (Map.elems dict', tipe)
117110