{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PatternSynonyms #-}

{-|
Module      : Analysis.Adjetives.Signature
Description : Signature for gradable adjectives.
Copyright   : (c) Julian Grove and Aaron Steven White, 2025
License     : MIT
Maintainer  : julian.grove@gmail.com

Signature for gradbale adjectives.
-}

module Analysis.Adjectives.Signature ( contextParams
                                     , tauAdj
                                     ) where

import Framework.Lambda.Convenience
import Framework.Lambda.Signature
import Framework.Lambda.Terms
import Framework.Lambda.Types
import Theory.Signature

tauAdj :: Sig
tauAdj :: Sig
tauAdj = Sig
tau0                                    Sig -> Sig -> Sig
forall (m :: * -> *) a b.
Alternative m =>
(a -> m b) -> (a -> m b) -> a -> m b
<||>
         Sig
tauNames                                Sig -> Sig -> Sig
forall (m :: * -> *) a b.
Alternative m =>
(a -> m b) -> (a -> m b) -> a -> m b
<||>
         Sig
tauStates                               Sig -> Sig -> Sig
forall (m :: * -> *) a b.
Alternative m =>
(a -> m b) -> (a -> m b) -> a -> m b
<||>
         Type -> [(String, Type)] -> Sig
mkStateSig Type
ι [ ( String
"soc_pla" , Type
e Type -> Type -> Type
:→ Type
t )
                      , ( String
"ling"    , Type
e Type -> Type -> Type
:→ Type
t )
                      , ( String
"phil"    , Type
e Type -> Type -> Type
:→ Type
t )
                      , ( String
"height"  , Type
e Type -> Type -> Type
:→ Type
r )
                      , ( String
"d_tall"  , Type
r      ) ]

tauNames :: Sig
tauNames :: Sig
tauNames = \case
  Left String
"j" -> Type -> Maybe Type
forall a. a -> Maybe a
Just Type
e
  Left String
"b" -> Type -> Maybe Type
forall a. a -> Maybe a
Just Type
e
  Either String Double
_        -> Maybe Type
forall a. Maybe a
Nothing

contextParams :: [String]
contextParams :: [String]
contextParams = [String
"d_tall"]