-
-
Save Wizek/9edf2a96c55cf42572246e55916ba976 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell, DataKinds, TypeOperators, FlexibleContexts #-} | |
{-# OPTIONS_GHC -fno-warn-unticked-promoted-constructors #-} | |
import Data.Extensible | |
import Control.Lens hiding ((:>)) | |
mkField "x y" | |
r = emptyRecord | |
foo = (x @= 1 <: y @= 2 <: r) == (y @= 2 <: x @= 1 <: r) | |
{- | |
main.hs:10:45: error: | |
• Couldn't match type ‘'Missing "x"’ with ‘'Expecting (n1 ':> v1)’ | |
arising from a use of ‘x’ | |
• In the first argument of ‘(@=)’, namely ‘x’ | |
In the first argument of ‘(<:)’, namely ‘x @= 1’ | |
In the second argument of ‘(<:)’, namely ‘x @= 1 <: r’ | |
| | |
10 | foo = (x @= 1 <: y @= 2 <: r) == (y @= 2 <: x @= 1 <: r) | |
| ^ | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment