on master help sign in
Style change
commitce527c0c072acc5850ffd47987807dd07cf3e737 authorEvan Czaplicki <info@elm-lang.org> dateWed 31 Jul 2013, 12:12 (13 years ago) parent4f595c2
1 file changed+2−3
compiler/Type/Environment.hs+2−3
compiler/Type/Environment.hs+2−3
@@ -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))