Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
213 B
5
Indexable
Never
{-# LANGUAGE GADTs, RecordWildCards #-}

module RU where

f x = x {myField = 3}

g MyRecord {..} = MyRecord {myField = 3}

data MyRecord where
  MyRecord
    :: (Num a) =>
    { myField :: a
    } ->
    MyRecord