packages feed

hls-refactor-plugin-1.0.0.0: test/data/hover/RecordDotSyntax.hs

{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 902
{-# LANGUAGE OverloadedRecordDot, DuplicateRecordFields, NoFieldSelectors #-}

module RecordDotSyntax ( module RecordDotSyntax) where

import qualified Data.Maybe as M

data MyRecord = MyRecord
  { a :: String
  , b :: Integer
  , c :: MyChild
  } deriving (Eq, Show)

newtype MyChild = MyChild
  { z :: String
  } deriving (Eq, Show)

x = MyRecord { a = "Hello", b = 12, c = MyChild { z = "there" } }
y = x.a ++ show x.b ++ x.c.z
#endif