Difference between `data` and `newtype` in Haskell?
S.no | Data | new type |
---|---|---|
1. | It declares an entirely new data structure at runtime. | It guarantees that data will have the exact same representation at runtime, as the type programmers wrap. |
2. | It introduces lazy value constructor | It introduces strict value constructor |
BY Best Interview Question ON 24 Mar 2019