# Which subset of Haskell is available?

**URL:** <https://forum.canton.network/t/which-subset-of-haskell-is-available/2068>\
**Category:** App Development\
**Tags:** daml\
**Created:** [February 10, 2021, 6:26pm UTC](https://forum.canton.network/t/which-subset-of-haskell-is-available/2068 "2021-02-10T18:26:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Bernauer](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/alexander_bernauer/32/1703_2.png) [@Alexander\_Bernauer](https://forum.canton.network/u/Alexander_Bernauer)\
**Post date:** [February 10, 2021, 6:26pm UTC](https://forum.canton.network/t/which-subset-of-haskell-is-available/2068/1 "2021-02-10T18:26:18Z")

</div>

Hi

the documentation (1) seems a bit weak when it comes to DAML language features that come from the Haskell heritage. For example, unless I have missed it, _case_ expressions are not documented. It’s fair to refer to the Haskell documentation for this, but which version of Haskell and which language extensions are supported?

Concretely I would need to use some view patterns or pattern guards. Are those features supported?

Where can I find a list of all Haskell features that I can use in DAML?

Thanks,  
Alex

(1) [Language reference docs — Daml SDK 1.9.0 documentation](https://docs.daml.com/daml/reference/index.html)

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [February 10, 2021, 7:40pm UTC](https://forum.canton.network/t/which-subset-of-haskell-is-available/2068/2 "2021-02-10T19:40:45Z")

</div>

We generally try to warn on anything that isn’t supported. View patterns are supported and are even turned on by default. Pattern guards are even enabled in Haskell by default those days and are also enabled and supported in Daml.

An example of unsupported extensions is `PatternSynonyms` or `GADTs`.

---

<div class="post-metadata">

**Author:** ![anthony](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/anthony/32/419_2.png) [@anthony](https://forum.canton.network/u/anthony)\
**Post date:** [February 10, 2021, 7:40pm UTC](https://forum.canton.network/t/which-subset-of-haskell-is-available/2068/3 "2021-02-10T19:40:53Z")

</div>

While likely not complete and someone will have a better answer than me you might also want to take a look at the sections in [“An Introduction to Daml”](https://docs.daml.com/daml/intro/0_Intro.html).

And in [Chapter 9](https://docs.daml.com/daml/intro/9_Functional101.html), while case doesn’t have its own section it does have several examples of where and how it’s used.

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [February 10, 2021, 7:42pm UTC](https://forum.canton.network/t/which-subset-of-haskell-is-available/2068/4 "2021-02-10T19:42:02Z")

</div>

For `case` expressions, take a look at [3 Data types — Daml SDK 1.9.0 documentation](https://docs.daml.com/daml/intro/3_Data.html#variants-and-pattern-matching) for docs.

---

<div class="post-metadata">

**Author:** ![Alexander\_Bernauer](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/alexander_bernauer/32/1703_2.png) [@Alexander\_Bernauer](https://forum.canton.network/u/Alexander_Bernauer)\
**Post date:** [February 11, 2021, 8:52am UTC](https://forum.canton.network/t/which-subset-of-haskell-is-available/2068/5 "2021-02-11T08:52:04Z")

</div>

Thanks, @cocreature.

Is there a list somewhere of supported and unsupported language extensions?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [February 11, 2021, 9:51am UTC](https://forum.canton.network/t/which-subset-of-haskell-is-available/2068/6 "2021-02-11T09:51:53Z")

</div>

There is no documented list atm but the source code isn’t too hard to understand if you know Haskell syntax (which you do if you’ve written Daml ;)) [daml/Options.hs at 9dc3d2ace40931208c68f79dfc661f4106972560 · digital-asset/daml · GitHub](https://github.com/digital-asset/daml/blob/9dc3d2ace40931208c68f79dfc661f4106972560/compiler/damlc/daml-opts/daml-opts/DA/Daml/Options.hs#L276)
