{-# OPTIONS -fglasgow-exts #-}
module Ext () where
-- There were typos in these definitions in the ICFP 2004 paper.
import Data.Generics
extQfnspec_fnarg
= case gcast (Qspec_fn) of
Just (Qspec_fn') -> spec_fn'argNothing -> fnarg
newtype Qra = Q (a -> r)
extTfnspec_fnarg
= case gcast (Tspec_fn) of
Just (Tspec_fn') -> spec_fn'argNothing -> fnarg
newtype Ta = T (a -> a)
extM :: (Typeable a, Typeable b)
=> (a -> ma) -> (b -> mb) -> (a -> ma)
extMfnspec_fn
= case gcast (Mspec_fn) of
Just (Mspec_fn') -> spec_fn'Nothing -> fn
newtype Mma = M (a -> ma)