Skip to content

Instantly share code, notes, and snippets.

@thoughtpolice
Created July 5, 2009 17:06
Show Gist options
  • Save thoughtpolice/141038 to your computer and use it in GitHub Desktop.
Save thoughtpolice/141038 to your computer and use it in GitHub Desktop.
~/code/AwesomePrelude/src $ cat test.hs
import AwesomePrelude
import HaskellPrelude
import JsPrelude
import qualified Prelude as P
test :: P.Bool
test = not false && false || true
test2 :: Js JsBool
test2 = not false && false || true
~/code/AwesomePrelude/src $ ghci test.hs
GHCi, version 6.11.20090625: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp-0.1.0.0 ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
[1 of 4] Compiling AwesomePrelude ( AwesomePrelude.hs, interpreted )
[2 of 4] Compiling HaskellPrelude ( HaskellPrelude.hs, interpreted )
[3 of 4] Compiling JsPrelude ( JsPrelude.hs, interpreted )
[4 of 4] Compiling Main ( test.hs, interpreted )
Ok, modules loaded: AwesomePrelude, HaskellPrelude, JsPrelude, Main.
*Main> test
True
*Main> test2
(function (f, t, x) x ? t : f)(true,(function (f, t, x) x ? t : f)((function (f, t, x) x ? t : f)(true,false,false),false,(function (f, t, x) x ? t : f)(true,false,false)),(function (f, t, x) x ? t : f)((function (f, t, x) x ? t : f)(true,false,false),false,(function (f, t, x) x ? t : f)(true,false,false)))
*Main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment