Module
EasyAlexa
- Package
- purescript-easy-alexa
- Repository
- twitchard/purescript-easy-alexa
#EmptyableSlot Source
class EmptyableSlot a where
Members
parseSlot' :: String -> a
empty :: a
name' :: Proxy a -> String
slotValues' :: (Proxy a) -> Array { synonyms :: Array String, value :: String }
Instances
(Slot a) => EmptyableSlot (Maybe a)
(BuiltinSlot sym a, IsSymbol sym) => EmptyableSlot (Builtin sym a)
#AlexaInput Source
class AlexaInput a where
Members
parseInput :: AlexaRequest -> Either InputError a
inputList :: (Proxy a) -> NonEmptyArray InputRec
Instances
(Generic a rep, AlexaInputRep rep) => AlexaInput a
#AlexaInputRep Source
class AlexaInputRep rep where
Members
parseInput' :: AlexaRequest -> Either InputError rep
inputList' :: (Proxy rep) -> NonEmptyArray InputRec
Instances
(AlexaInputRep (Constructor aname a), AlexaInputRep b, IsSymbol aname) => AlexaInputRep (Sum (Constructor aname a) b)
(IsSymbol aname) => AlexaInputRep (Constructor aname NoArguments)
(RowToList row rs, AlexaInputRow rs row, IsSymbol cname) => AlexaInputRep (Constructor cname (Argument (Record row)))
#AlexaInputRow Source
class AlexaInputRow (rs :: RowList) (r :: Row Type) | rs -> r where
Members
parseSlots :: RLProxy rs -> Object { value :: Maybe String } -> Either InputError (Record r)
slotList :: RLProxy rs -> Array SlotRec
Instances
(Lacks sym row', IsSymbol sym, RowToList row rl, RowToList row' rl', Cons sym ty row' row, EmptyableSlot ty, AlexaInputRow rl' row') => AlexaInputRow (Cons sym ty rl') row
AlexaInputRow Nil ()
#languageModel Source
languageModel :: forall a. AlexaInput a => Proxy a -> String -> Map String (NonEmptyArray String) -> Either String LanguageModel
#BuiltinSlot Source
class BuiltinSlot (sym :: Symbol) a where
Members
parseBuiltin :: (SProxy sym) -> String -> Maybe a
Instances
BuiltinSlot "AMAZON.NUMBER" Int
- Modules
- EasyAlexa