Update examples
This commit is contained in:
20
testsuite/dynload/should_fail/api/API.hs
Normal file
20
testsuite/dynload/should_fail/api/API.hs
Normal file
@ -0,0 +1,20 @@
|
||||
{-# OPTIONS -fglasgow-exts #-}
|
||||
|
||||
module API where
|
||||
|
||||
import AltData.Typeable
|
||||
|
||||
data Interface = Interface {
|
||||
function :: String
|
||||
}
|
||||
|
||||
instance Typeable Interface where
|
||||
#if __GLASGOW_HASKELL__ >= 603
|
||||
typeOf i = mkTyConApp (mkTyCon "API.Interface") []
|
||||
#else
|
||||
typeOf i = mkAppTy (mkTyCon "API.Interface") []
|
||||
#endif
|
||||
|
||||
plugin :: Interface
|
||||
plugin = Interface { function = "goodbye" }
|
||||
|
Reference in New Issue
Block a user