Fixes for GHC 8.x, archive loading, -dynamic, and file generation
This commit is contained in:
		@ -1,19 +1,20 @@
 | 
			
		||||
{-# OPTIONS -fglasgow-exts #-}
 | 
			
		||||
 | 
			
		||||
module API where
 | 
			
		||||
 | 
			
		||||
import Data.Typeable
 | 
			
		||||
 | 
			
		||||
data TestIO = TestIO { 
 | 
			
		||||
                field :: IO String 
 | 
			
		||||
#if __GLASGOW_HASKELL__ >= 800
 | 
			
		||||
        } deriving Typeable
 | 
			
		||||
#else
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
instance Typeable TestIO where
 | 
			
		||||
#if __GLASGOW_HASKELL__ >= 603
 | 
			
		||||
    typeOf i = mkTyConApp (mkTyCon "API.TestIO") []
 | 
			
		||||
#else
 | 
			
		||||
    typeOf i = mkAppTy (mkTyCon "API.TestIO") []
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
testio :: TestIO
 | 
			
		||||
testio = TestIO { field = return "default value" }
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user