Commit 8b24aa71 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #8011

parent b60461e4
......@@ -31,3 +31,8 @@ T8002:
'$(TEST_HC)' $(TEST_HC_OPTS) -c T8002b.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c T8002a.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c T8002.hs
$(RM) T8011a.o T8011a.hi T8011.o T8011.hi
'$(TEST_HC)' $(TEST_HC_OPTS) -c T8011a.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c T8011.hs
{-# LANGUAGE FlexibleContexts #-}
module T8011( clean ) where
import Data.Char (isAlphaNum)
import Data.List (dropWhile)
import T8011a ( ToURL(URLT, toURL) )
clean :: (ToURL url, Show (URLT url)) => url -> String
clean = filter isAlphaNum . show . toURL
{-# LANGUAGE TypeFamilies #-}
module T8011a ( ToURL(toURL, nullURL, errorURL, URLT) ) where
class ToURL a where
type URLT a
toURL :: a -> URLT a
nullURL :: a
errorURL :: a -> URLT a
......@@ -219,3 +219,9 @@ test('T8002',
['$MAKE -s --no-print-directory T8002'])
# Import and export of associated types
['$MAKE -s --no-print-directory T8011'])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment