@@ -5,7 +5,6 @@ import Control.Monad
55import qualified Control.Monad.State as State
66import qualified Data.Traversable as Traverse
77import qualified Data.Map as Map
8−import Data.Map ((!))
98import Data.List (isPrefixOf)
109import qualified Data.UnionFind.IO as UF
1110
@@ -61,7 +60,7 @@ makeConstructors :: Environment
6160 -> Map.Map String (IO (Int, [Variable], [Type], Type))
6261makeConstructors env datatypes = Map.fromList builtins
6362 where
64− list t = (types env ! "_List") <| t
63+ list t = (types env Map.! "_List") <| t
6564
6665 inst :: Int -> ([Type] -> ([Type], Type)) -> IO (Int, [Variable], [Type], Type)
6766 inst numTVars tipe = do
@@ -71,7 +70,7 @@ makeConstructors env datatypes = Map.fromList builtins
7170
7271 tupleCtor n =
7372 let name = "_Tuple" ++ show n
74− in (name, inst n $ \vs -> (vs, foldl (<|) (types env ! name) vs))
73+ in (name, inst n $ \vs -> (vs, foldl (<|) (types env Map.! name) vs))
7574
7675 builtins :: [ (String, IO (Int, [Variable], [Type], Type)) ]
7776 builtins = [ ("[]", inst 1 $ \ [t] -> ([], list t))