1module Test.Negative.TypeMismatch where
5import Data.Maybe (Maybe(..))
7import Yoga.Om (Om, launchOm_)
8import Yoga.Om.Layer (OmLayer, makeLayer, runLayer)
10type Database = { query :: String -> Effect (Array String) }
12programLayer :: OmLayer (database :: Database) () ()
13programLayer = makeLayer do
16-- This should FAIL to compile - wrong type for database!
17-- Expected: { query :: String -> Effect (Array String) }
18-- Provided: { query :: String -> String }
19testTypeMismatch :: Om _ () _
20testTypeMismatch = launchOm_ do
21 programLayer # runLayer
22 { database: { query: \q -> "" } } -- Wrong! Returns String not Effect (Array String)
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