Permalink
Browse files

Rename JScript to js

  • Loading branch information...
1 parent a3d3e2f commit db0ce06d3acf29e9f16067a1875f4aa0d18af102 @spockz committed Jan 29, 2012
Showing with 260 additions and 260 deletions.
  1. 0 {uhc-jscript → uhc-js}/LICENSE
  2. 0 {uhc-jscript → uhc-js}/Makefile
  3. 0 {uhc-jscript → uhc-js}/Setup.hs
  4. 0 {uhc-jscript → uhc-js}/clean
  5. 0 {uhc-jscript → uhc-js}/make
  6. +1 −1 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Assorted.hs
  7. 0 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone.hs
  8. +23 −23 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone/Collection.hs
  9. +7 −7 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone/Events.hs
  10. +2 −2 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone/History.hs
  11. +29 −29 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone/Model.hs
  12. +5 −5 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone/Router.hs
  13. +2 −2 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone/Sync.hs
  14. +1 −1 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone/Utility.hs
  15. +9 −9 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Backbone/View.hs
  16. 0 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/ECMA.hs
  17. +38 −38 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/ECMA/Array.hs
  18. +2 −2 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/ECMA/Bool.hs
  19. +1 −1 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/ECMA/Expressions.hs
  20. +26 −26 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/ECMA/String.hs
  21. +2 −2 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/JQuery/Ajax.hs
  22. +1 −1 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/JQuery/AjaxQueue.hs
  23. +3 −3 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/JQuery/Deferred.hs
  24. +2 −2 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/JQuery/Draggable.hs
  25. +2 −2 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/JQuery/Droppable.hs
  26. +45 −45 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/JQuery/JQuery.hs
  27. +4 −4 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/JSON2/JSON2.hs
  28. +2 −2 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Prelude.hs
  29. +1 −1 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Primitives.hs
  30. +1 −1 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/SafeTypes.hs
  31. 0 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/Types.hs
  32. +37 −37 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/W3C/HTML5.hs
  33. +5 −5 {uhc-jscript → uhc-js}/src/Language/UHC/JScript/WebWorker.hs
  34. 0 {uhc-jscript → uhc-js}/src/Main.hs
  35. +9 −9 uhc-jscript/uhc-jscript.cabal → uhc-js/uhc-js.cabal
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -7,5 +7,5 @@ import Language.UHC.JScript.Primitives
alert :: String -> IO ()
alert = _alert . toJS
-foreign import jscript "alert(%*)"
+foreign import js "alert(%*)"
_alert :: JSString -> IO ()
@@ -10,10 +10,10 @@ import Language.UHC.JScript.Types
data BBCollectionPtr a
type BBCollection a = JSPtr (BBCollectionPtr a)
-foreign import jscript "Backbone.Collection.extend(%*)"
+foreign import js "Backbone.Collection.extend(%*)"
extend :: AnonObj -> IO (JSFunPtr a)
-foreign import jscript "Backbone.Collection.extend(%*)"
+foreign import js "Backbone.Collection.extend(%*)"
extend' :: AnonObj -> AnonObj -> IO (JSFunPtr a)
model :: JSFunPtr b -> BBCollection a -> IO (BBCollection a)
@@ -22,47 +22,47 @@ model = setAttr "model"
models :: BBCollection a -> IO (JSArray (BBModel b))
models = getAttr "models"
-foreign import jscript "%1.toJSON()"
+foreign import js "%1.toJSON()"
toJSON :: BBCollection a -> IO (JSArray b)
-- TODO: Underscore methods
-foreign import jscript "%1.add(%*)"
+foreign import js "%1.add(%*)"
add :: BBCollection a -> BBModel b -> IO ()
-foreign import jscript "%1.add(%*)"
+foreign import js "%1.add(%*)"
add' :: BBCollection a -> BBModel b -> AnonObj -> IO ()
-foreign import jscript "%1.add(%*)"
+foreign import js "%1.add(%*)"
addA :: BBCollection a -> JSArray (BBModel b) -> IO ()
-foreign import jscript "%1.add(%*)"
+foreign import js "%1.add(%*)"
addA' :: BBCollection a -> JSArray (BBModel b) -> AnonObj -> IO ()
-foreign import jscript "%1.remove(%*)"
+foreign import js "%1.remove(%*)"
remove :: BBCollection a -> BBModel b -> IO ()
-foreign import jscript "%1.remove(%*)"
+foreign import js "%1.remove(%*)"
remove' :: BBCollection a -> BBModel b -> AnonObj -> IO ()
-foreign import jscript "%1.remove(%*)"
+foreign import js "%1.remove(%*)"
removeA :: BBCollection a -> JSArray (BBModel b) -> IO ()
-foreign import jscript "%1.remove(%*)"
+foreign import js "%1.remove(%*)"
removeA' :: BBCollection a -> JSArray (BBModel b) -> AnonObj -> IO ()
-foreign import jscript "%1.get(%*)"
+foreign import js "%1.get(%*)"
get :: BBCollection a -> Int -> IO (BBModel b)
getByCid :: String -> BBCollection a -> IO (BBModel b)
getByCid s c = _getByCid (toJS s) c
-foreign import jscript "%1.getByCid(%*)"
+foreign import js "%1.getByCid(%*)"
_getByCid :: JSString -> BBCollection a -> IO (BBModel b)
-foreign import jscript "%1.at(%*)"
+foreign import js "%1.at(%*)"
at :: Int -> IO (BBModel a)
clength :: BBCollection a -> IO Int
@@ -72,16 +72,16 @@ setComperator :: JSFunPtr a -> BBCollection b -> IO (BBCollection b)
setComperator = setAttr "comparator"
-foreign import jscript "%1.sort()"
+foreign import js "%1.sort()"
sort :: BBCollection a -> IO ()
-foreign import jscript "%1.sort(%*)"
+foreign import js "%1.sort(%*)"
sort' :: BBCollection a -> AnonObj -> IO ()
pluck :: BBCollection a -> String -> IO (JSArray b)
pluck c s = _pluck c (toJS s)
-foreign import jscript "%1.pluck(%*)"
+foreign import js "%1.pluck(%*)"
_pluck :: BBCollection a -> JSString -> IO (JSArray b)
setUrl :: String -> BBCollection a -> IO (BBCollection a)
@@ -94,20 +94,20 @@ setUrl' = setAttr "url"
-- TODO: parse
-foreign import jscript "%1.fetch()"
+foreign import js "%1.fetch()"
fetch :: BBCollection a -> IO ()
-foreign import jscript "%1.fetch(%*)"
+foreign import js "%1.fetch(%*)"
fetch' :: BBCollection a -> AnonObj -> IO ()
-foreign import jscript "%1.reset(%*)"
+foreign import js "%1.reset(%*)"
reset :: BBCollection a -> JSArray (BBModel b) -> IO ()
-foreign import jscript "%1.reset(%*)"
+foreign import js "%1.reset(%*)"
reset' :: BBCollection a -> JSArray (BBModel b) -> AnonObj -> IO ()
-foreign import jscript "%1.create(%*)"
+foreign import js "%1.create(%*)"
create :: BBCollection a -> JSArray (BBModel b) -> IO ()
-foreign import jscript "%1.create(%*)"
+foreign import js "%1.create(%*)"
create' :: BBCollection a -> JSArray (BBModel b) -> AnonObj -> IO ()
@@ -8,42 +8,42 @@ import Language.UHC.JScript.Types
bind :: JSPtr a -> String -> JSFunPtr b -> IO ()
bind p s = _bind p (toJS s)
-foreign import jscript "%1.bind(%*)"
+foreign import js "%1.bind(%*)"
_bind :: JSPtr a -> JSString -> JSFunPtr b -> IO ()
bind' :: JSPtr a -> String -> JSFunPtr b -> JSPtr b -> IO ()
bind' p s c = _bind' p (toJS s) c
-foreign import jscript "%1.bind(%*)"
+foreign import js "%1.bind(%*)"
_bind' :: JSPtr a -> JSString -> JSFunPtr b -> JSPtr b -> IO ()
-foreign import jscript "%1.unbind()"
+foreign import js "%1.unbind()"
unbind :: JSPtr a -> IO ()
unbind' :: JSPtr a -> String -> IO ()
unbind' p s = _unbind' p (toJS s)
-foreign import jscript "%1.unbind(%*)"
+foreign import js "%1.unbind(%*)"
_unbind' :: JSPtr a -> JSString -> IO ()
unbind'' :: JSPtr a -> String -> JSFunPtr b -> IO ()
unbind'' p s f = _unbind'' p (toJS s) f
-foreign import jscript "%1.unbind(%*)"
+foreign import js "%1.unbind(%*)"
_unbind'' :: JSPtr a -> JSString -> JSFunPtr b -> IO ()
trigger :: JSPtr a -> String -> IO ()
trigger p s = _trigger p (toJS s)
-foreign import jscript "%1.trigger(%*)"
+foreign import js "%1.trigger(%*)"
_trigger :: JSPtr a -> JSString -> IO ()
trigger' :: JSPtr a -> String -> AnonObj -> IO ()
trigger' p s o = _trigger' p (toJS s) o
-foreign import jscript "%1.trigger(%*)"
+foreign import js "%1.trigger(%*)"
_trigger' :: JSPtr a -> JSString -> AnonObj -> IO ()
-- etc.
@@ -3,8 +3,8 @@ module Language.UHC.JScript.Backbone.History where
import Language.UHC.JScript.Primitives
import Language.UHC.JScript.Types
-foreign import jscript "Backbone.history.start()"
+foreign import js "Backbone.history.start()"
start :: IO ()
-foreign import jscript "Backbone.history.start(%*)"
+foreign import js "Backbone.history.start(%*)"
start' :: AnonObj -> IO ()
@@ -8,53 +8,53 @@ import Language.UHC.JScript.Types
data BBModelPtr a
type BBModel a = JSPtr (BBModelPtr a)
-foreign import jscript "Backbone.Model.extend(%*)"
+foreign import js "Backbone.Model.extend(%*)"
extend :: AnonObj -> IO (JSFunPtr b)
-foreign import jscript "Backbone.Model.extend(%*)"
+foreign import js "Backbone.Model.extend(%*)"
extend' :: AnonObj -> AnonObj -> IO (JSFunPtr b)
get :: BBModel a -> String -> IO b
get p s = _get p (toJS s)
-foreign import jscript "%1.get(%2)"
+foreign import js "%1.get(%2)"
_get :: BBModel a -> JSString -> IO b
-foreign import jscript "%1.set(%2)"
+foreign import js "%1.set(%2)"
set :: BBModel a -> AnonObj -> IO ()
-foreign import jscript "%1.set(%*)"
+foreign import js "%1.set(%*)"
set' :: BBModel a -> AnonObj -> AnonObj -> IO ()
escape :: BBModel a -> String -> IO String
escape p s = fromJSM $ _escape p (toJS s)
-foreign import jscript "%1.escape(%2)"
+foreign import js "%1.escape(%2)"
_escape :: BBModel a -> JSString -> IO JSString
has :: BBModel a -> String -> IO Bool
has p s = _has p (toJS s)
-foreign import jscript "%1.has(%2)"
+foreign import js "%1.has(%2)"
_has :: BBModel a -> JSString -> IO Bool
unset :: BBModel a -> String -> IO ()
unset p s = _unset p (toJS s)
-foreign import jscript "%1.unset(%2)"
+foreign import js "%1.unset(%2)"
_unset :: BBModel a -> JSString -> IO ()
unset' :: BBModel a -> String -> AnonObj -> IO ()
unset' p s o = _unset' p (toJS s) o
-foreign import jscript "%1.unset(%*)"
+foreign import js "%1.unset(%*)"
_unset' :: BBModel a -> JSString -> AnonObj -> IO ()
-foreign import jscript "%1.clear()"
+foreign import js "%1.clear()"
clear :: BBModel a -> IO ()
-foreign import jscript "%1.clear(%*)"
+foreign import js "%1.clear(%*)"
clear' :: BBModel a -> AnonObj -> IO ()
silentOpt :: IO AnonObj
@@ -78,28 +78,28 @@ getModelAttributes = getAttr "attributes"
-- TODO: defaults
-foreign import jscript "%1.toJSON()"
+foreign import js "%1.toJSON()"
toJSON :: BBModel a -> IO AnonObj
-foreign import jscript "%1.fetch()"
+foreign import js "%1.fetch()"
fetch :: BBModel a -> IO ()
-foreign import jscript "%1.fetch(%*)"
+foreign import js "%1.fetch(%*)"
fetch' :: BBModel a -> AnonObj -> IO ()
-foreign import jscript "%1.save()"
+foreign import js "%1.save()"
save :: BBModel a -> IO ()
-foreign import jscript "%1.save(%*)"
+foreign import js "%1.save(%*)"
save' :: BBModel a -> AnonObj -> IO ()
-foreign import jscript "%1.save(%*)"
+foreign import js "%1.save(%*)"
save'' :: BBModel a -> AnonObj -> AnonObj -> IO ()
-foreign import jscript "%1.destroy()"
+foreign import js "%1.destroy()"
destroy :: BBModel a -> IO ()
-foreign import jscript "%1.destroy(%*)"
+foreign import js "%1.destroy(%*)"
destroy' :: BBModel a -> AnonObj -> IO ()
-- TODO: validate
@@ -115,7 +115,7 @@ setValidateFn = setAttr "validate"
getUrl :: BBModel a -> IO String
getUrl = fromJSM . _getUrl
-foreign import jscript "getUrl(%1)"
+foreign import js "getUrl(%1)"
_getUrl :: BBModel a -> IO JSString
@@ -142,36 +142,36 @@ setParseFn :: (AnonObj -> AnonObj) -> BBModel a -> IO (BBModel a)
setParseFn = setAttr "parse"
-foreign import jscript "%1.clone()"
+foreign import js "%1.clone()"
clone :: BBModel a -> IO (BBModel a)
-foreign import jscript "%1.isNew()"
+foreign import js "%1.isNew()"
isNew :: BBModel a -> IO Bool
-foreign import jscript "%1.change()"
+foreign import js "%1.change()"
change :: BBModel a -> IO ()
-foreign import jscript "%1.hasChanged()"
+foreign import js "%1.hasChanged()"
hasChanged :: BBModel a -> IO Bool
hasChanged' :: BBModel a -> String -> IO Bool
hasChanged' p a = _hasChanged' p (toJS a)
-foreign import jscript "%1.hasChanged(%2)"
+foreign import js "%1.hasChanged(%2)"
_hasChanged' :: BBModel a -> JSString -> IO Bool
-foreign import jscript "%1.changedAttributes()"
+foreign import js "%1.changedAttributes()"
changedAttributes :: BBModel a -> IO AnonObj
-foreign import jscript "%1.changedAttributes(%2)"
+foreign import js "%1.changedAttributes(%2)"
changedAttributes' :: BBModel a -> AnonObj -> IO AnonObj
previous :: BBModel a -> String -> IO b
previous p a = _previous p (toJS a)
-foreign import jscript "%1.previous(%2)"
+foreign import js "%1.previous(%2)"
_previous :: BBModel a -> JSString -> IO b
-foreign import jscript "%1.previousAttributes()"
+foreign import js "%1.previousAttributes()"
previousAttributes :: BBModel a -> IO AnonObj
@@ -7,10 +7,10 @@ import Language.UHC.JScript.Types
data BBRouterPtr
type BBRouter = JSPtr BBRouterPtr
-foreign import jscript "Backbone.Router.extend(%*)"
+foreign import js "Backbone.Router.extend(%*)"
extend :: AnonObj -> IO (JSFunPtr b)
-foreign import jscript "Backbone.Router.extend(%*)"
+foreign import js "Backbone.Router.extend(%*)"
extend' :: AnonObj -> AnonObj -> IO (JSFunPtr b)
getRoutes :: BBRouter -> IO AnonObj
@@ -22,18 +22,18 @@ setRoutes = setAttr "routes"
route :: BBRouter -> String -> String -> JSFunPtr a -> IO ()
route r s1 s2 f = _route r (toJS s1) (toJS s2) f
-foreign import jscript "%1.route(%*)"
+foreign import js "%1.route(%*)"
_route :: BBRouter -> JSString -> JSString -> JSFunPtr a -> IO ()
navigate :: String -> IO ()
navigate = _navigate . toJS
-foreign import jscript "%1.navigate(%*)"
+foreign import js "%1.navigate(%*)"
_navigate :: JSString -> IO ()
navigate' :: String -> Bool -> IO ()
navigate' s b = _navigate' (toJS s) b
-foreign import jscript "%1.navigate(%*)"
+foreign import js "%1.navigate(%*)"
_navigate' :: JSString -> Bool -> IO ()
@@ -8,13 +8,13 @@ import Language.UHC.JScript.Types
sync :: String -> BBModel a -> IO ()
sync s = _sync (toJS s)
-foreign import jscript "Backbone.sync(%*)"
+foreign import js "Backbone.sync(%*)"
_sync :: JSString -> BBModel a -> IO ()
sync' :: String -> BBModel a -> AnonObj -> IO ()
sync' s = _sync' (toJS s)
-foreign import jscript "Backbone.sync(%*)"
+foreign import js "Backbone.sync(%*)"
_sync' :: JSString -> BBModel a -> AnonObj -> IO ()
-- TODO: emulateHTTP
Oops, something went wrong.

0 comments on commit db0ce06

Please sign in to comment.