mirror of
https://github.com/github/semantic.git
synced 2024-12-15 01:51:39 +03:00
Revert "Remove TypeScript Module"
This reverts commit 0c9d58ae586e492075dec1a8666492451f83a480.
This commit is contained in:
parent
8bd2f30875
commit
f0e2b51b80
@ -156,6 +156,7 @@ type Syntax = '[
|
||||
, TypeScript.Syntax.LiteralType
|
||||
, TypeScript.Syntax.Union
|
||||
, TypeScript.Syntax.Intersection
|
||||
, TypeScript.Syntax.Module
|
||||
, TypeScript.Syntax.InternalModule
|
||||
, TypeScript.Syntax.FunctionType
|
||||
, TypeScript.Syntax.Tuple
|
||||
|
@ -547,6 +547,22 @@ instance Ord1 Update where liftCompare = genericLiftCompare
|
||||
instance Show1 Update where liftShowsPrec = genericLiftShowsPrec
|
||||
instance Evaluatable Update
|
||||
|
||||
data Module a = Module { moduleIdentifier :: !a, moduleStatements :: ![a] }
|
||||
deriving (Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Message1, NFData1, Named1, Ord, Show, ToJSONFields1, Traversable)
|
||||
|
||||
instance Eq1 Module where liftEq = genericLiftEq
|
||||
instance Ord1 Module where liftCompare = genericLiftCompare
|
||||
instance Show1 Module where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable Module where
|
||||
eval _ (Module _ _) = undefined -- do
|
||||
-- name <- maybeM (throwEvalError NoNameError) (declaredName iden)
|
||||
-- rvalBox =<< letrec' name (\addr ->
|
||||
-- makeNamespace name addr Nothing (traverse_ eval xs))
|
||||
|
||||
instance Declarations1 Module where
|
||||
liftDeclaredName declaredName = declaredName . moduleIdentifier
|
||||
|
||||
data InternalModule a = InternalModule { internalModuleIdentifier :: !a, internalModuleStatements :: ![a] }
|
||||
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Message1, NFData1, Named1, Ord, Show, ToJSONFields1, Traversable)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user