mirror of
https://github.com/github/semantic.git
synced 2024-11-27 12:57:49 +03:00
Add a definePrelude method to Preluded.
This commit is contained in:
parent
e10a689a91
commit
4c4c8db3f8
@ -1,9 +1,11 @@
|
||||
{-# LANGUAGE DataKinds, TypeFamilies #-}
|
||||
{-# LANGUAGE AllowAmbiguousTypes, DataKinds, TypeFamilies #-}
|
||||
|
||||
module Language.Preluded
|
||||
( Preluded (..)
|
||||
) where
|
||||
|
||||
import Control.Abstract
|
||||
import GHC.Stack
|
||||
import GHC.TypeLits
|
||||
import qualified Language.Python.Assignment as Python
|
||||
import qualified Language.Ruby.Assignment as Ruby
|
||||
@ -11,12 +13,29 @@ import qualified Language.TypeScript.Assignment as TypeScript
|
||||
|
||||
class Preluded syntax where
|
||||
type PreludePath syntax :: Symbol
|
||||
definePrelude :: ( AbstractValue address value effects
|
||||
, HasCallStack
|
||||
, Member (Allocator address value) effects
|
||||
, Member (Env address) effects
|
||||
, Member Fresh effects
|
||||
, Member (Reader ModuleInfo) effects
|
||||
, Member (Reader Span) effects
|
||||
, Member (Resumable (EnvironmentError address)) effects
|
||||
, Member Trace effects
|
||||
)
|
||||
=> Evaluator address value effects ()
|
||||
|
||||
instance Preluded Ruby.Term where
|
||||
type PreludePath Ruby.Term = "preludes/ruby.rb"
|
||||
|
||||
definePrelude = pure ()
|
||||
|
||||
instance Preluded Python.Term where
|
||||
type PreludePath Python.Term = "preludes/python.py"
|
||||
|
||||
definePrelude = pure ()
|
||||
|
||||
instance Preluded TypeScript.Term where
|
||||
type PreludePath TypeScript.Term = "preludes/javascript.js"
|
||||
|
||||
definePrelude = pure ()
|
||||
|
Loading…
Reference in New Issue
Block a user