Changed GenNavAST to also generate instances for CompState
This commit is contained in:
parent
c83c383181
commit
24a7b7aba8
|
@ -22,6 +22,8 @@ module GenNavAST where
|
|||
import Data.Generics.Polyplate.GenInstances
|
||||
|
||||
import qualified AST
|
||||
import qualified CompState
|
||||
import qualified Errors
|
||||
|
||||
header :: [String]
|
||||
header
|
||||
|
@ -147,15 +149,34 @@ instancesFrom w
|
|||
|
||||
main :: IO ()
|
||||
main
|
||||
= writeInstances GenWithoutOverlapped GenOneClass
|
||||
[genInstance (undefined :: AST.AST)]
|
||||
= writeInstances GenWithoutOverlapped GenClassPerType
|
||||
[ genInstance (undefined :: AST.AST)
|
||||
, genInstance (undefined :: CompState.CompState)
|
||||
-- All the maps that are in CompState:
|
||||
, genMapInstance (undefined :: String) (undefined :: CompState.PreprocDef)
|
||||
, genMapInstance (undefined :: String) (undefined :: AST.NameDef)
|
||||
, genMapInstance (undefined :: String) (undefined :: String)
|
||||
, genMapInstance (undefined :: String) (undefined :: [AST.Type])
|
||||
, genMapInstance (undefined :: String) (undefined :: [AST.Actual])
|
||||
-- All the maps that are in CompState:
|
||||
, genSetInstance (undefined :: Errors.WarningType)
|
||||
, genSetInstance (undefined :: String)
|
||||
, genSetInstance (undefined :: AST.Name)
|
||||
]
|
||||
["{-# OPTIONS_GHC -Werror -fwarn-overlapping-patterns -fwarn-unused-matches -fwarn-unused-binds -fwarn-incomplete-patterns #-}"
|
||||
,"-- | This module is auto-generated by Polyplate. DO NOT EDIT."
|
||||
,"module NavAST where"
|
||||
,""
|
||||
,"import Data.Generics.Polyplate"
|
||||
,""
|
||||
,"import Data.Map (Map)"
|
||||
,"import qualified Data.Map as Map"
|
||||
,"import Data.Set (Set)"
|
||||
,"import qualified Data.Set as Set"
|
||||
,""
|
||||
,"import qualified AST"
|
||||
,"import qualified CompState"
|
||||
,"import qualified Errors"
|
||||
,"import qualified Metadata"
|
||||
,""
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user