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