<commit_before>
-- This is a test set for running with Catch
-- http://www-users.cs.york.ac.uk/~ndm/catch/

module Catch where

import StackSet

---------------------------------------------------------------------
-- TESTING PROPERTIES

main = 
    screen ||| peekStack ||| index ||| empty ||| peek ||| push ||| delete ||| member |||
    raiseFocus ||| rotate ||| promote ||| shift ||| view ||| workspace ||| insert |||
    visibleWorkspaces ||| swap {- helper -}


---------------------------------------------------------------------
-- CATCH FIRST-ORDER LIBRARY

-- this should be included with Catch by default
-- and will be (one day!)

foreign import primitive any0 :: a
foreign import primitive anyEval1 :: a -> b
foreign import primitive anyEval2 :: a -> b -> c
foreign import primitive anyEval3 :: a -> b -> c -> d


class Test a where
    test :: a -> Bool


instance Test b => Test (a -> b) where
    test f = test (f any0)<commit_msg>Update the Catch checking to the new interface for StackSet<commit_after>
-- This is a test set for running with Catch
-- http://www-users.cs.york.ac.uk/~ndm/catch/

module Catch where

import StackSet

---------------------------------------------------------------------
-- TESTING PROPERTIES

main = 
        new
    ||| view
    ||| lookupWorkspace
    ||| modify
    ||| peek
    ||| index
    ||| focusLeft
    ||| focusRight
    ||| focusWindow
    ||| member
    ||| findIndex
    ||| insertLeft
    ||| delete
    ||| swap
    ||| shift


---------------------------------------------------------------------
-- CATCH FIRST-ORDER LIBRARY

-- this should be included with Catch by default
-- and will be (one day!)

foreign import primitive any0 :: a
foreign import primitive anyEval1 :: a -> b
foreign import primitive anyEval2 :: a -> b -> c
foreign import primitive anyEval3 :: a -> b -> c -> d


class Test a where
    test :: a -> Bool


instance Test b => Test (a -> b) where
    test f = test (f any0)
{'fraction_non_alphanumeric': 0.2547121752419766, 'fraction_numerical': 0.005094243504839531, 'mean_word_length': 1.6576454668470906, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5124920', 'n_tokens_mistral': 558, 'n_tokens_neox': 525, 'n_words': 201}