------------------------------------------------------------------------------- |-- Module : Data.Generics.Instances-- Copyright : (c) The University of Glasgow, CWI 2001--2004-- License : BSD-style (see the LICENSE file)-- -- Maintainer : generics@haskell.org-- Stability : experimental-- Portability : non-portable (uses Data.Data)---- \"Scrap your boilerplate\" --- Generic programming in Haskell -- See <http://www.cs.vu.nl/boilerplate/>. The present module-- contains thirteen 'Data' instances which are considered dubious (either-- because the types are abstract or just not meant to be traversed).-- Instances in this module might change or disappear in future releases-- of this package. ---- For more information, please visit the new-- SYB wiki: <http://www.cs.uu.nl/wiki/bin/view/GenericProgramming/SYB>.---- (This module does not export anything. It really just defines instances.)-------------------------------------------------------------------------------{-# OPTIONS_GHC -fno-warn-orphans #-}moduleData.Generics.Instances()where------------------------------------------------------------------------------importData.Data#ifdef __GLASGOW_HASKELL__#if __GLASGOW_HASKELL__ >= 611importGHC.IO.Handle-- So we can give Data instance for Handle#elseimportGHC.IOBase-- So we can give Data instance for IO, Handle#endifimportGHC.Stable-- So we can give Data instance for StablePtrimportGHC.ST-- So we can give Data instance for STimportGHC.MVar-- So we can give Data instance for MVarimportGHC.Conc-- So we can give Data instance for TVarimportGHC.IORef#else# ifdef __HUGS__importHugs.Prelude(Ratio(..))# endifimportSystem.IOimportForeign.PtrimportForeign.ForeignPtrimportForeign.StablePtrimportControl.Monad.STimportControl.ConcurrentimportData.IORef#endif#include "Typeable.h"---------------------------------------------------------------------------------- Instances of the Data class for Prelude-like types.-- We define top-level definitions for representations.---------------------------------------------------------------------------------------------------------------------------------------------------------------- Instances of abstract datatypes (6)------------------------------------------------------------------------------instanceDataTypeRepwheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"Data.Typeable.TypeRep"------------------------------------------------------------------------------instanceDataTyConwheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"Data.Typeable.TyCon"------------------------------------------------------------------------------INSTANCE_TYPEABLE0(DataType,dataTypeTc,"DataType")instanceDataDataTypewheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"Data.Generics.Basics.DataType"------------------------------------------------------------------------------instanceDataHandlewheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.IOBase.Handle"------------------------------------------------------------------------------instanceTypeablea=>Data(StablePtra)wheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.Stable.StablePtr"------------------------------------------------------------------------------#ifdef __GLASGOW_HASKELL__instanceDataThreadIdwheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.Conc.ThreadId"#endif-------------------------------------------------------------------------------- Dubious instances (7)------------------------------------------------------------------------------#ifdef __GLASGOW_HASKELL__instanceTypeablea=>Data(TVara)wheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.Conc.TVar"#endif------------------------------------------------------------------------------instanceTypeablea=>Data(MVara)wheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.Conc.MVar"------------------------------------------------------------------------------#ifdef __GLASGOW_HASKELL__instanceTypeablea=>Data(STMa)wheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.Conc.STM"#endif------------------------------------------------------------------------------instance(Typeables,Typeablea)=>Data(STsa)wheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.ST.ST"------------------------------------------------------------------------------instanceTypeablea=>Data(IORefa)wheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.IOBase.IORef"------------------------------------------------------------------------------instanceTypeablea=>Data(IOa)wheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"GHC.IOBase.IO"---------------------------------------------------------------------------------- A last resort for functions--instance(Dataa,Datab)=>Data(a->b)wheretoConstr_=error"toConstr"gunfold__=error"gunfold"dataTypeOf_=mkNoRepType"Prelude.(->)"dataCast2f=gcast2f