Skip to content

Instantly share code, notes, and snippets.

@ali-abrar
Created March 8, 2018 00:02
Show Gist options
  • Select an option

  • Save ali-abrar/e94bd975f353cbc2aae78cd65c5293be to your computer and use it in GitHub Desktop.

Select an option

Save ali-abrar/e94bd975f353cbc2aae78cd65c5293be to your computer and use it in GitHub Desktop.

Revisions

  1. ali-abrar created this gist Mar 8, 2018.
    15 changes: 15 additions & 0 deletions jsaddleWarp.hs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    {-# LANGUAGE CPP #-}
    {-# LANGUAGE OverloadedStrings #-}
    #ifdef ghcjs_HOST_OS
    import Reflex.Dom
    #else
    import Language.Javascript.JSaddle.Warp (run)
    import Reflex.Dom.Core
    #endif

    main :: IO ()
    main =
    #ifndef ghcjs_HOST_OS
    run 3911 $
    #endif
    mainWidget $ display =<< count =<< button "click"