{-----------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------}
toHaskellClassType :: String -> (String,String)
toHaskellClassType className
  = (classTypeDeclName
    ,"{-# NOINLINE " ++ classTypeDeclName ++ " #-}\n" ++
     classTypeDeclName ++ " :: ClassType (" ++ classTypeName' ++ " ())\n" ++
     classTypeDeclName ++ " = ClassType (unsafePerformIO (classInfoFindClass " ++ classTypeString ++ "))\n\n"
    )
  where
    classTypeDeclName :: String
    classTypeDeclName = haskellDeclName ("class" ++ classTypeName')
    classTypeName'    :: String
    classTypeName'    = haskellTypeName className
    classTypeString   :: String
    classTypeString   = "\"" ++ className ++ "\""


{-----------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------}
toHaskellClassType :: String -> (String,String)
toHaskellClassType className
  = (classTypeDeclName
    ,"{-# NOINLINE " ++ classTypeDeclName ++ " #-}\n" ++
     classTypeDeclName ++ " :: ClassType (" ++ classTypeName' ++ " ())\n" ++
     classTypeDeclName ++ " = ClassType (unsafePerformIO (classInfoFindClass " ++ classTypeString ++ "))\n\n"
    )
  where
    classTypeDeclName :: String
    classTypeDeclName = haskellDeclName ("class" ++ classTypeName')
    classTypeName'    :: String
    classTypeName'    = haskellTypeName className
    classTypeString   :: String
    classTypeString   = "\"" ++ className ++ "\""


{-----------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------}
toHaskellClassType className
  = (classTypeDeclName
    ,"{-# NOINLINE " ++ classTypeDeclName ++ " #-}\n" ++
     classTypeDeclName ++ " :: ClassType (" ++ classTypeName' ++ " ())\n" ++
     classTypeDeclName ++ " = ClassType (unsafePerformIO (classInfoFindClass " ++ classTypeString ++ "))\n\n"
    )
  where
    classTypeDeclName :: String
    classTypeDeclName = haskellDeclName ("class" ++ classTypeName')
    classTypeName'    :: String
    classTypeName'    = haskellTypeName className
    classTypeString   :: String
    classTypeString   = "\"" ++ className ++ "\""


{-----------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------}