Quantcast
Channel: Confused about custom data types in Haskell - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Daniel Fischer for Confused about custom data types in Haskell

You need a Show instance to convert the type to a printable representation (a String). The easiest way to obtain one is to addderiving Showto the type definition.data Person = Person { first_name ::...

View Article


Confused about custom data types in Haskell

The task: I am trying to create a custom data type and have it able to print to the console. I also want to be able to sort it using Haskell's natural ordering.The issue: Write now, I can't get this...

View Article

Browsing latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>