1module Test.Negative.MissingLogger where
7import Yoga.Om.Layer (OmLayer, makeLayer, runLayer)
9type Config = { port :: Int }
10type Logger = { log :: String -> Effect Unit }
11type Database = { query :: String -> Effect (Array String) }
13needsBoth :: OmLayer (config :: Config, logger :: Logger) (database :: Database) ()
14needsBoth = makeLayer do
15 { config, logger } <- Om.ask
16 pure { database: { query: \_ -> pure [] } }
18-- This should NOT compile - we provide config but not logger
19testMissingLogger :: Om (Record (config :: Config)) () (Record (database :: Database))
20testMissingLogger = runLayer { config: { port: 5432 } } needsBoth
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list