on master help sign in
Allow prefixes on FFI types
66e2a97Evan Czaplicki
compiler/Parse/Declaration.hs+1−1
@@ -121,7 +121,7 @@ isExportable tipe =
121 T.Data "JSArray" [t] -> isExportable t
121 T.Data "JSArray" [t] -> isExportable t
122
122
123 T.Data name []
123 T.Data name []
124− | name `elem` jsTypes -> Nothing
124+ | any (`List.isSuffixOf` name) jsTypes -> Nothing
125 | otherwise -> Just $ "'" ++ name ++ "' is not an exportable type." ++ msg
125 | otherwise -> Just $ "'" ++ name ++ "' is not an exportable type." ++ msg
126
126
127 T.Data name _ ->
127 T.Data name _ ->
compiler/Paths_El.hsnew file+15
@@ -0,0 +1,15 @@
1+-- This is a dummy file, but it should not be removed.
2+-- It makes it possible to build the compiler in GHCi, so you
3+-- can do some testing from within emacs (or whatever inferior
4+-- editor you use instead).
5+
6+module Paths_Elm where
7+
8+import Data.Version
9+import System.FilePath
10+
11+getDataFileName :: FilePath -> IO FilePath
12+getDataFileName path = return ("dist" </> "data" </> path)
13+
14+version :: Version
15+version = Version [0,8,0,3] []