[Haskell-beginners] capital letter name in record syntax (parsing json)

Kim-Ee Yeoh ky3 at atamo.com
Thu Oct 17 05:02:20 UTC 2013


On Thu, Oct 17, 2013 at 4:18 AM, Miro Karpis <miroslav.karpis at gmail.com>wrote:

> Hi, please,...is it possible to use a capital letter in record syntax data
> definition? For example
>
> data Car =
>   Car { CarName  :: !Text
>          ,CarColor   :: !Text
>         } deriving (Show,Generic)
>

What Karl said.

You can prefix an underscore however: _CarName, _CarColor.

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20131017/e206e654/attachment.html>


More information about the Beginners mailing list