Skip to content

Commit 50c0e90

Browse files
committed
Add note about language pragmas
1 parent c58a661 commit 50c0e90

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/huddle.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,27 @@ Huddle utilizes several core types to represent CDDL constructs:
1414
● Value: A type representing primitive CBOR values.
1515
● Group: Represents a collection of entries within a map or array.
1616

17+
## Language Extensions
18+
19+
Huddle makes use of some Haskell language extensions which liberalise aspects
20+
of Haskell's syntax. We recommend enabling them whenever working with Huddle:
21+
22+
```haskell
23+
{-# LANGUAGE OverloadedLists #-}
24+
{-# LANGUAGE OverloadedStrings #-}
25+
{-# LANGUAGE NoImplicitPrelude #-}
26+
```
27+
28+
In addition, if using hlint, we suggest disabling the following hints:
29+
30+
```haskell
31+
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
32+
33+
{-# HLINT ignore "Use camelCase" #-}
34+
{-# HLINT ignore "Evaluate" #-}
35+
36+
```
37+
1738
## Rules and Assignment
1839
Rules are defined using the =:= operator. The left-hand side of the operator is
1940
the rule name (a T.Text value), and the right-hand side is the type definition.

0 commit comments

Comments
 (0)