<commit_before>module Cakefile where

import Development.Cake3
import Development.Cake3.Ext.UrWeb
import Cakefile_P (file)

instance IsString File where fromString = file

main = writeMake (file "Makefile") $ do

  prebuild [cmd|urweb -print-cinclude >/dev/null|]

  u <- uwlib "Script.urp" $ do
    ffi "Script.urs"
    include "Script.h"
    link "Script.o"

  t1 <- uwapp "-dbms sqlite" "Test1.urp" $ do
    allow url "http://code.jquery.com/ui/1.10.3/jquery-ui.js";
    allow mime "text/javascript";
    library (internal u);
    debug
    module_ (single "Test1.ur")

  t2 <- uwapp "-dbms sqlite" "Test2.urp" $ do
    library (internal u);
    module_ (single "Test2.ur")

  rule $ do
    phony "all"
    depend u
    depend t1
    depend t2

  return ()<commit_msg>Improve the UrWeb example<commit_after>module Cakefile where

import Development.Cake3
import Development.Cake3.Ext.UrWeb
import Cakefile_P

instance IsString File where fromString = file

project = do

  prebuild [cmd|urweb -print-cinclude >/dev/null|]

  u <- uwlib "Script.urp" $ do
    ffi "Script.urs"
    include "Script.h"
    link "Script.o"

  t1 <- uwapp "-dbms sqlite" "Test1.urp" $ do
    allow url "http://code.jquery.com/ui/1.10.3/jquery-ui.js";
    allow mime "text/javascript";
    library (internal u);
    debug
    module_ (single "Test1.ur")

  t2 <- uwapp "-dbms sqlite" "Test2.urp" $ do
    library (internal u);
    module_ (single "Test2.ur")

  rule $ do
    phony "all"
    depend u
    depend t1
    depend t2

  return ()

main = do
  writeMake (file "Makefile") (project)
  writeMake (file "Makefile.devel") (selfUpdate >> project)

{'fraction_non_alphanumeric': 0.1256127450980392, 'fraction_numerical': 0.01715686274509804, 'mean_word_length': 2.953995157384988, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3593206', 'n_tokens_mistral': 615, 'n_tokens_neox': 586, 'n_words': 164}