Personal tools

Yhc/Javascript

From HaskellWiki

< Yhc(Difference between revisions)
Jump to: navigation, search
(Added more successful browsers from users' feedback)
(Forgot to link to Inner Workings)
Line 6: Line 6:
 
# [[Yhc/Javascript/Users_guide|'''Users Guide''']]
 
# [[Yhc/Javascript/Users_guide|'''Users Guide''']]
 
# [[Yhc/Javascript/Programmers_guide|'''Programmers Guide''']]
 
# [[Yhc/Javascript/Programmers_guide|'''Programmers Guide''']]
  +
# [[Yhc/Javascript/Inner_workings|'''Inner Workings''']]
 
# '''Examples and Demos'''
 
# '''Examples and Demos'''
 
{|
 
{|

Revision as of 19:31, 16 November 2006

1 YCR2JS, a Converter of Yhc Core to Javascript

1.1 Table of Contents

  1. Brief Overview
  2. Users Guide
  3. Programmers Guide
  4. Inner Workings
  5. Examples and Demos
Echo
Description: Type any text in the input field provided, and see it echoed right above after Enter is pressed. Just for fun, type any decimal number and see it converted to a Roman number, and vice versa.
Features: Lowest possible level of interaction with web browser:
  • Simple monadic framework
  • Wrapping Javascript functions to become Haskell functions
  • Calling Haskell functions from Javascript
  • Access to Javascript (including DOM) objects and properties
  • Handling of Javascript exceptions in Haskell
  • Events handling
  • Third party code of some "general" purpose works in web browser
Tested with: Netscape 7/Linux, MSIE 6.0/Windows 2000, Konqueror 3.5.5/Linux, Opera/Windows

feel free to add your own combination of browser/os where you got this demo working

Demo URL: http://darcs.haskell.org/yhc/web/jsdemos/Echo.html
Haskell Source: http://darcs.haskell.org/yhc/web/jsdemos/Echo.hs
http://darcs.haskell.org/yhc/web/jsdemos/Roman.hs (C) Malcolm Wallace


--DimitryGolubovsky 19:02, 6 November 2006 (UTC)