summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_fail/RecordDotSyntaxFail6.hs
blob: 8265f56914803c7257df16eda41f399780cd6b1c (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE OverloadedRecordDot, OverloadedRecordUpdate, RebindableSyntax #-}

module Main where

import qualified RecordDotSyntaxA as A

main = do
  let bar = A.Foo { A.foo =1 } -- A defn. Perfectly reasonable.
  print $ A.foo bar -- Application of a selector. Also reasonable.
  let baz = bar{A.foo = 2} -- An update with a qualified field; not supported!
  print $ A.foo baz