This is the Haskell version of symantics1.ml, for comparison ACG with a more expressive semantic lexicon that includes multi-prompt delimited continuations and the notion of evaluation. Types are considered as a mere approximation rather than the complete specification of grammatical composition.
- data N
- data NP
- data S
- data SM
- type family I lab btyp
- class Abstract c where
- newtype LString a = LString a
- ccat :: LString String -> LString String -> LString String
- data E = Ind String
- data T
- type Varname = String
- data QuantOrder
- data SemEnv r = SemEnv {}
- newtype SemM r a = SemM (ReaderT (SemEnv r) (CC r) a)
- unSem :: SemM r a -> SemEnv r -> CC r a
- runSem :: QuantOrder -> (forall r. SemM r T) -> T
- app :: Monad m => m (a -> m b) -> m a -> m b
- genvar :: SemM r Varname
- shiftP :: Prompt r b -> ((a -> CC r b) -> CC r b) -> CC r a
Documentation
An interpretation of the base type btyp in the signature labeled by lab
Example from Sec 4.3 of the ESSLLI Advanced ACG course.
An interpretation of the abstract signature as the surface form: strings
LString a |
The Semantic monad