on master help sign in
Allow prefixes on FFI types
commit66e2a97d2a5b26e5f76b2afe6e9143d7e8a68a68 authorEvan Czaplicki <info@elm-lang.org> dateThu 1 Aug 2013, 15:37 (13 years ago) parentf9cc451
2 files changed+16−1
compiler/Parse/Declaration.hs+1−1 compiler/Paths_El.hs+15
compiler/Parse/Declaration.hs+1−1
@@ -121,7 +121,7 @@ isExportable tipe =
121121 T.Data "JSArray" [t] -> isExportable t
122122
123123 T.Data name []
124− | name `elem` jsTypes -> Nothing
124+ | any (`List.isSuffixOf` name) jsTypes -> Nothing
125125 | otherwise -> Just $ "'" ++ name ++ "' is not an exportable type." ++ msg
126126
127127 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] []