fay 0.19.0.2 → 0.19.1
raw patch · 6 files changed
+75/−7 lines, 6 filesdep ~Cabaldep ~process
Dependency ranges changed: Cabal, process
Files
- CHANGELOG.md +10/−0
- fay.cabal +3/−3
- src/Fay/Compiler.hs +1/−1
- src/Fay/Compiler/Packages.hs +6/−3
- tests/Char.hs +29/−0
- tests/Char.res +26/−0
CHANGELOG.md view
@@ -2,10 +2,20 @@ See full history at: <https://github.com/faylang/fay/commits> +### 0.19.1 (2014-03-13)++* Added Data.Char to fay-base++Dependency bumps:+* Allow `Cabal 1.19.*`+* Allow `Process 1.2.*`++ #### 0.19.0.2 (2014-01-30) Bugfixes: * Don't export transcoding information for fay-base packages when compiling with --no-stdlib+* Better error messages when forgetting the type signature in an FFI declaration #### 0.19.0.1 (2014-01-15)
fay.cabal view
@@ -1,5 +1,5 @@ name: fay-version: 0.19.0.2+version: 0.19.1 synopsis: A compiler for Fay, a Haskell subset that compiles to JavaScript. description: Fay is a proper subset of Haskell which is type-checked with GHC, and compiled to JavaScript. It is lazy, pure, has a Fay monad,@@ -106,7 +106,7 @@ , Paths_fay ghc-options: -O2 -Wall -fno-warn-name-shadowing build-depends: base >= 4 && < 5- , Cabal < 1.19+ , Cabal < 1.20 , aeson < 0.8 , attoparsec < 0.12 , bytestring < 0.11@@ -122,7 +122,7 @@ , language-ecmascript >= 0.15 && < 1.0 , mtl < 2.2 , pretty-show >= 1.6 && < 1.7- , process < 1.2+ , process < 1.3 , safe < 0.4 , split < 0.3 , syb < 0.5
src/Fay/Compiler.hs view
@@ -213,4 +213,4 @@ -- | Is the module a standard module, i.e., one that we'd rather not -- output code for if we're compiling separate files. anStdlibModule :: ModuleName a -> Bool-anStdlibModule (ModuleName _ name) = name `elem` ["Prelude","FFI","Fay.FFI","Data.Data","Data.Ratio","Debug.Trace"]+anStdlibModule (ModuleName _ name) = name `elem` ["Prelude","FFI","Fay.FFI","Data.Data","Data.Ratio","Debug.Trace","Data.Char"]
src/Fay/Compiler/Packages.hs view
@@ -40,9 +40,12 @@ exists <- mapM doesSourceDirExist includes if or exists then return (addConfigDirectoryIncludes (map (Just nameVer,) includes) config)- else error $ "unable to find (existing) package's share dir: " ++ name ++ "\n" ++- "tried: " ++ unlines includes ++ "\n" ++- "but none of them seem to have Haskell files in them."+ else error $ concat+ [ "unable to find (existing) package's share dir: ", name, "\n"+ , "tried: ", unlines includes, "\n"+ , "but none of them seem to have Haskell files in them.\n"+ , "If you are using a sandbox you need to specify the HASKELL_PACKAGE_SANDBOX environment variable or use --package-conf."+ ] -- | Does a directory exist and does it contain any Haskell sources? doesSourceDirExist :: FilePath -> IO Bool
tests/Char.hs view
@@ -2,8 +2,37 @@ import FFI +import Data.Char+ main :: Fay () main = do print 'a' putStrLn ('a' : "bc") print (head "abc")+ print (ord 'a')+ print (chr 97)+ print (chr (ord 'a'))+ print (ord (chr 97))+ print (isAscii 'a')+ print (isAscii (chr 128))+ print (isLatin1 (chr 255))+ print (isLatin1 (chr 256))+ print (toUpper 'a')+ print (toLower 'A')+ print (toLower (toUpper 'a'))+ print (isAsciiLower 'a')+ print (isAsciiLower 'A')+ print (isAsciiUpper 'Z')+ print (isAsciiUpper 'z')+ print (isAsciiUpper (toUpper 'a'))+ print (isAsciiUpper (toLower 'A'))+ print (isAsciiLower (toLower 'Z'))+ print (isAsciiLower (toUpper 'z'))+ print (all isDigit "0123456789")+ print (isDigit 'a')+ print (all isOctDigit "01234567")+ print (any isOctDigit ['8', '9'])+ print (all isHexDigit "0123456789ABCDEFabcdef")+ print (any isHexDigit "ghijklmnopqrstuvwxyzGHIJKLMNOPQRSTUVWXYZ")+ print (all isSpace [' ', '\t', '\n', '\r', '\f', '\v', '\xa0', '\x3000'])+
tests/Char.res view
@@ -1,3 +1,29 @@ a abc a+97+a+a+97+true+false+true+false+A+a+a+true+false+true+false+true+false+true+false+true+false+true+false+true+false+true