git.iko.soy/rowtype-yoga/purescript-yoga-postgres
on v0.3.0 help sign in
20 lines 520 B history raw
1-- EXPECT: TypesDoNotUnify
2module Test.CompileFail.InvalidColumnInOnConflict where
4import Prelude
5import Data.Maybe (Maybe(..))
6import Type.Function (type (#))
7import Type.Proxy (Proxy(..))
8import Yoga.Postgres.Schema
10type UsersTable = Table "users"
11 ( id :: Int # PrimaryKey # AutoIncrement
12 , name :: String
13 , email :: String # Unique
14 , age :: Maybe Int
15 )
17usersTable :: Proxy UsersTable
18usersTable = Proxy
20bad = from usersTable # insert { name: "A", email: "a@b.com" } # onConflictDoNothing @"nonexistent"