Skip to content

Commit

Permalink
Derive Generic for TypeInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyShiue committed Aug 13, 2024
1 parent 68750a6 commit 237f050
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/GCL/Common.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE FlexibleInstances, UndecidableInstances,
MultiParamTypeClasses, FlexibleContexts #-}
{-# LANGUAGE DeriveGeneric #-}
module GCL.Common where

import Control.Monad.RWS ( RWST(..) )
Expand All @@ -16,6 +17,7 @@ import qualified Data.Text as Text
import Data.Loc.Range ( Range )
import Syntax.Abstract
import Syntax.Common.Types
import GHC.Generics


data Index = Index Name | Hole Range deriving (Eq, Show, Ord)
Expand All @@ -24,7 +26,7 @@ data TypeInfo =
TypeDefnCtorInfo Type
| ConstTypeInfo Type
| VarTypeInfo Type
deriving (Eq, Show)
deriving (Eq, Show, Generic)

toTypeEnv :: [(Index, TypeInfo)] -> TypeEnv
toTypeEnv infos =
Expand Down

0 comments on commit 237f050

Please sign in to comment.