<commit_before>module Main where

import Compiler.Compiler
import Compiler.Raw
import Generic.Prelude
import Lang.JavaScript
import qualified Prelude as P

mylist :: (NumC j, ListC j, FunC j) => j [Num]
mylist = 1 `cons` (2 `cons` (3 `cons` (4 `cons` nil)))

sumList :: (NumC j, ListC j, FunC j) => j Num
sumList = sum mylist

jsList :: Js [Num]
jsList = mylist

jsSumList :: Js Num
jsSumList = sum jsList

jsApp :: Js Num
jsApp = id 4

test :: P.IO ()
test = compiler jsSumList P.>>= P.putStrLn

test2 :: P.IO ()
test2 = P.print (raw jsApp)
<commit_msg>new examples<commit_after>module Main where

import Compiler.Compiler
import Compiler.Raw
import Generic.Prelude
import Lang.JavaScript
import qualified Prelude as P

mylist :: (NumC j, ListC j, FunC j) => j [Num]
mylist = 1 `cons` (2 `cons` (3 `cons` (4 `cons` nil)))

sumList :: (NumC j, ListC j, FunC j) => j Num
sumList = sum mylist

jsList :: Js [Num]
jsList = mylist

jsSumList :: Js Num
jsSumList = sum jsList

jsApp :: Js Num
jsApp = maybe 10 (*2) (just (4 * 3))

test :: P.IO ()
test = compiler jsApp P.>>= P.putStrLn

test2 :: P.IO ()
test2 = P.print (raw jsApp)

{'fraction_non_alphanumeric': 0.13487133984028393, 'fraction_numerical': 0.015971606033717833, 'mean_word_length': 3.883116883116883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6556768', 'n_tokens_mistral': 447, 'n_tokens_neox': 442, 'n_words': 159}