on master help sign in
Explicitly list imports for a module.
0354fadevancz
compiler/Language/Elm.hs+1−1
@@ -23,7 +23,7 @@ import qualified Ast as Ast
23import qualified Libraries as Libraries
23import qualified Libraries as Libraries
24import Data.List (intercalate)
24import Data.List (intercalate)
25import Data.Version (showVersion)
25import Data.Version (showVersion)
26−import CompileToJS
26+import CompileToJS (showErr, jsModule)
27import ExtractNoscript
27import ExtractNoscript
28import GenerateHtml
28import GenerateHtml
29import Initialize
29import Initialize
compiler/Types/Constrain.hs+2−1
@@ -25,7 +25,8 @@ getAliases imports hints = hints ++ concatMap aliasesFrom imports
25 where aliasesFrom (name,method) =
25 where aliasesFrom (name,method) =
26 let values = concatMap (getValue name) hints
26 let values = concatMap (getValue name) hints
27 in case method of
27 in case method of
28+ As alias -> if alias == name then [] else
28− As alias -> map (\(n,t) -> (alias ++ "." ++ n, t)) values
29+ map (\(n,t) -> (alias ++ "." ++ n, t)) values
29 Hiding vs -> filter (\(n,t) -> n `notElem` vs) values
30 Hiding vs -> filter (\(n,t) -> n `notElem` vs) values
30 Importing vs -> filter (\(n,t) -> n `elem` vs) values
31 Importing vs -> filter (\(n,t) -> n `elem` vs) values
31 getValue inModule (name,tipe) =
32 getValue inModule (name,tipe) =
libraries/List.elm+1−1
@@ -9,7 +9,7 @@ import Native.List as L
9(::) : a -> [a] -> [a]
9(::) : a -> [a] -> [a]
10
10
11-- Appends two lists.
11-- Appends two lists.
12−(++) : [a] -> [a] -> [a]
12+-- (++) : [a] -> [a] -> [a]
13
13
14-- Extract the first element of a list. List must be non-empty.
14-- Extract the first element of a list. List must be non-empty.
15head : [a] -> a
15head : [a] -> a