diff options
Diffstat (limited to 'testsuite/tests/safeHaskell/safeLanguage/SafeLang07_A.hs')
-rw-r--r-- | testsuite/tests/safeHaskell/safeLanguage/SafeLang07_A.hs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang07_A.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang07_A.hs deleted file mode 100644 index 6ef49d5946..0000000000 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang07_A.hs +++ /dev/null @@ -1,24 +0,0 @@ -{-# LANGUAGE Trustworthy #-} - --- | Here we expose a MinList API that only allows elements --- to be inserted into a list if they are at least greater --- than an initial element the list is created with. -module SafeLang07_A ( - MinList, - newMinList, - insertMinList, - printIntMinList - ) where - -data MinList a = MinList a [a] - -newMinList :: Ord a => a -> MinList a -newMinList n = MinList n [] - -insertMinList :: Ord a => MinList a -> a -> MinList a -insertMinList s@(MinList m xs) n | n > m = MinList m (n:xs) - | otherwise = s - -printIntMinList :: MinList Int -> IO () -printIntMinList (MinList min xs) = putStrLn $ "MinList Int :: MinList " ++ show min ++ " " ++ show xs - |