1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 18:23:44 +03:00

Define console.log builtin for JavaScript

This commit is contained in:
Rick Winfrey 2018-07-06 10:34:52 -07:00
parent 970431306a
commit e621816358

View File

@ -142,7 +142,6 @@ class HasPrelude (language :: Language) where
instance HasPrelude 'Go
instance HasPrelude 'Haskell
instance HasPrelude 'Java
instance HasPrelude 'JavaScript
instance HasPrelude 'PHP
builtInPrint :: ( AbstractIntro value
@ -170,6 +169,10 @@ instance HasPrelude 'Ruby where
instance HasPrelude 'TypeScript
-- FIXME: define console.log using __semantic_print
instance HasPrelude 'JavaScript where
definePrelude _ = do
defineNamespace "console" $ do
define "log" (lambda builtInPrint)
-- Effects