↓ Skip to main content

Getting rid of programming JavaScript with Haskell

·1 min

For my Ex­per­i­ment­a­tion Pro­ject at Utrecht Uni­ver­sity I por­ted the “JCU” ap­plic­a­tion to Haskell. The JCU ap­plic­a­tion is used to give Dutch High school stu­dents the op­por­tun­ity to taste Pro­log.

The pro­ject uses the Utrecht Haskell Com­piler and its JavaScript backend. The UHC trans­lates Haskell to Core and then trans­lates this Core lan­guage to JavaScript. For more in­form­a­tion on this see the blog of the cre­ator of the UHC JavaScript backend.

Please read my re­port on this pro­ject. The pro­ject is hos­ted on GitHub in the fol­low­ing re­pos­it­or­ies:

Incomplete proof in the HS JCU App Complete proof in the HS JCU App

up­date 28-01-2012: The keyword jscript in the UHC has been changed to js in or­der to avoid as­so­ci­ation with Microsoft’s JScript. Also new Object syn­tax is now avail­able in the foreign import dir­ect­ives.

foreign import js "new Object()"
  newObject :: IO (JSPtr a)