packages feed

Hs2lib-0.5.5: Tests/Exec/Structs.hs

{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  Windll
-- Copyright   :  (c) Tamar Christina 2009 - 2010
-- License     :  BSD3
-- 
-- Maintainer  :  tamar@zhox.com
-- Stability   :  experimental
-- Portability :  portable
--
-- This module contains structural information on the module
--
-----------------------------------------------------------------------------

module Tests.Exec.Structs where

import WinDll.Structs.Structures

import Data.Data
import Data.Typeable

-- | A Extended version of \Datatype\ to support weighing of 
--   constructors etc.
data Arbitrary = Arbitrary { arName  :: Name
                           , arVars  :: [TypeName]
                           , arCons  :: DataTypes
                           , arTag   :: TypeTag
                           }         
               | Variant   { arCost  :: Int
                           , arName  :: Name
                           , arFix   :: DataFixity
                           , arNamed :: AnnWeighedTypes
                           }
    deriving(Eq,Data,Typeable)
                           
type AnnWeighedTypes = [AnnWeighedType]

data AnnWeighedType = AnnWeighedType { awtCost :: Int
                                     , awtType :: AnnType
                                     }
    deriving(Eq,Data,Typeable)