Languages Features Creators Calendar CSV Resources Blog About Pricing Add Language
GitHub icon

fay

fay - Programming language

< >

fay is a programming language created in 2012 by Chris Done.

#600on PLDB 11Years Old 1.5kUsers
0Books 0Papers

A proper subset of Haskell that compiles to JavaScript


Example from the web:
{-# LANGUAGE EmptyDataDecls #-} module Hello where import FFI data Event alert :: String -> Fay () alert = ffi "alert(%1)" setBodyHtml :: String -> Fay () setBodyHtml = ffi "document.body.innerHTML = %1" addWindowEvent :: String -> (Event -> Fay ()) -> Fay () addWindowEvent = ffi "window.addEventListener(%1, %2)" greet :: Event -> Fay () greet event = do putStrLn "The document has loaded" setBodyHtml "Hello HTML!" main :: Fay () main = do putStrLn "Hello Console!" alert "Hello Alert!" addWindowEvent "load" greet
act-iii.html 路 fay.html 路 json-stat.html

View source

- Build the next great programming language Search v2023 Day 208 Docs Acknowledgements Traffic Traffic Today Mirrors GitHub feedback@pldb.com