Skip to content

Instantly share code, notes, and snippets.

@ridiculousfish
Created November 23, 2014 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ridiculousfish/67a4eca1d461d6b147ea to your computer and use it in GitHub Desktop.
Save ridiculousfish/67a4eca1d461d6b147ea to your computer and use it in GitHub Desktop.
{-# LANGUAGE ForeignFunctionInterface #-}
import Haste
import Haste.App
import Haste.Foreign
anything :: Server ()
anything = return ()
entry_point :: String -> String -> IO ()
entry_point regex_str lang = do
runApp def $ do
remote_anything <- remote anything
runClient $ do
onServer remote_anything
main :: IO ()
main = do
#ifdef __HASTE__
export (toJSString "hs_entry_point") entry_point
#endif
runApp def $ do
runClient $ return ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment