ConstructorArgs

Safe Haskell | Safe-Inferred
Language | Haskell2010

ConstructorArgs

Synopsis

- data Foo
  - = Rec {
    - x :: String
    - y :: String
    }
  - | Baz Int String
  - | Boa !Int !String
  - | Int :| String
  - | Int :* String
- data Boo where
  - Foo :: Int -> String -> Boo
  - Foa :: Int -> Boo
  - pattern Fo :: Int -> String -> Boo
  - pattern Fo' :: Boo
- pattern Bo :: Int -> String -> Boo
- pattern Bo' :: Int -> String -> Boo

# Documentation

data Foo infixr 1 #

Constructors

Rec | doc on a record
Fields x :: String doc on the `String` field of `Rec` y :: String doc on the `String` field of `Rec`
Baz Int String | old prefix doc style
Boa infixr 2 | doc on the `Boa` constrictor
Fields !Int doc on the `Int` field of `Boa` !String doc on the `String` field of `Boa`
Int :| String | old infix doc style
(:*) infixr 3 | doc on the `:*` constructor
Fields Int doc on the `Int` field of the `:*` constructor String doc on the `String` field of the `:*` constructor

data Boo where infixr 4 #

Constructors

Foo infixr 1 | Info about a `Foo`
Fields :: Int `Int` field of `Foo` -> String `String` field of `Foo` -> Boo Make a `Boo`
Foa :: Int -> Boo | no argument docs GADT

Bundled Patterns

pattern Fo infixr 5 | Info about bundled `Fo`
Fields :: Int an `Int` -> String a `String` -> Boo a `Boo`
pattern Fo' :: Boo | Bundled and no argument docs

pattern Bo infixr 6 #

Arguments

:: Int | an `Int`
-> String | a `String`
-> Boo | a `Boo` pattern

Info about not-bundled `Bo`

pattern Bo' :: Int -> String -> Boo #

Not bundled and no argument docs