Ruby (http://ruby-lang.org)
- “Download Ruby”
- “Installation” page
- OS X
- “brew install ruby”
Python (http://python.org)
- “Python 3.5.2”
diff -r clock-0.5.1/System/Clock.hsc clock-0.5.2/System/Clock.hsc | |
173,177c173,175 | |
< normalize (TimeSpec xs xn) | |
< | xn < 0 || xn >= 10^9 = | |
< let (q, r) = xn `divMod` (10^9) | |
< in TimeSpec (xs + q) r | |
< | otherwise = TimeSpec xs xn | |
--- | |
> normalize (TimeSpec xs xn) | xn < 0 || xn >= 10^9 = TimeSpec (xs + q) r | |
> | otherwise = TimeSpec xs xn |
(define-syntax elAttr | |
(syntax-rules () | |
((elAttr tag attrs children ...) | |
(eval-element 'tag 'attrs 'children ...)))) | |
(define-syntax el | |
(syntax-rules () | |
((el tag children ...) | |
(elAttr tag () children ...)))) |
newtype AceRef = AceRef { unAceRef :: JSVal } | |
data ACE t = ACE | |
{ aceRef :: AceRef | |
, aceValue :: Dynamic t String | |
} | |
------------------------------------------------------------------------------ | |
startACE :: String -> IO AceRef | |
#ifdef ghcjs_HOST_OS |
data CurAppState = Login | Home | Other | |
app :: MonadWidget t m => CurAppState -> m () | |
app Login = ... | |
app Home = ... | |
app Other = ... | |
navBar :: MonadWidget t m => m (Event t CurAppState) | |
navBar = do | |
a <- button "Login" |
-- Paste this into http://hsnippet.com after adding Reflex.Dom.Contrib.Widgets.DynamicList | |
-- to the imports list in HSnippet's imports tab. | |
app :: MonadWidget t m => App t m () | |
app = do | |
addItem <- button "Add Item" | |
dynamicList single snd (const never) ("edit me" <$ addItem) | |
["alpha", "bravo", "charlie"] | |
return () |
$ cabal sandbox add-source ../cabal/Cabal | |
$ cabal install | |
Warning: the --global flag is deprecated -- it is generally considered a bad | |
idea to install packages into the global store | |
Resolving dependencies... | |
Notice: installing into a sandbox located at | |
/Users/mightybyte/haskell/packunused-0.1.1.4/.cabal-sandbox | |
Configuring ansi-terminal-0.6.2.3... | |
Configuring old-locale-1.0.0.7... | |
Configuring split-0.2.3.1... |
fileLoader :: MonadWidget t m => FileInputConfig t -> m (Event t Text) | |
fileLoader cfg = do | |
fls <- fmapMaybe listToMaybe . updated . value <$> fileInput cfg | |
reader <- liftIO newFileReader | |
performEvent_ $ ffor fls $ \f -> liftIO $ | |
readAsDataURL reader (Just f) | |
wrapDomEvent reader (`on` load) $ do | |
res <- liftIO $ fromJSValUnchecked =<< getResult reader | |
let Right contents = decodeUtf8 <$> B64.decode | |
(encodeUtf8 $ snd $ T.breakOnEnd "base64," res) |
{-# LANGUAGE DeriveFunctor #-} | |
module Form where | |
import Control.Lens | |
import Data.Default | |
import Data.Functor.Compose | |
import Data.Monoid | |
import Reflex |
+_complete_debug:20> : zsh 5.0.8 | |
+_complete_debug:21> _main_complete | |
+_main_complete:11> local 'IFS= | |