Skip to content

Instantly share code, notes, and snippets.

@ali-abrar
Created March 8, 2018 00:02
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 ali-abrar/e94bd975f353cbc2aae78cd65c5293be to your computer and use it in GitHub Desktop.
Save ali-abrar/e94bd975f353cbc2aae78cd65c5293be to your computer and use it in GitHub Desktop.
reflex-dom + jsaddle-warp
{-# 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment