Go to the first, previous, next, last section, table of contents.

Glasgow extensions to Haskell

As with all known Haskell systems, GHC implements some extensions to the language. To use them, you'll need to give a `-fglasgow-exts' option.

Virtually all of the Glasgow extensions serve to give you access to the underlying facilities with which we implement Haskell. Thus, you can get at the Raw Iron, if you are willing to write some non-standard code at a more primitive level. You need not be "stuck" on performance because of the implementation costs of Haskell's "high-level" features -- you can always code "under" them. In an extreme case, you can write all your time-critical code in C, and then just glue it together with Haskell!

Executive summary of our extensions:

Unboxed types and primitive operations:
You can get right down to the raw machine types and operations; included in this are "primitive arrays" (direct access to Big Wads of Bytes). Please see Section See section Unboxed types and following.
Calling out to C:
Just what it sounds like. We provide lots of rope that you can dangle around your neck. Please see Section See section Calling C directly from Haskell.
"HBC-ish" extensions:
Extensions implemented because people said, "HBC does Y. Could you teach GHC to do the same?" Please see Section See section "HBC-ish" extensions implemented by GHC for a quick list.

Before you get too carried away working at the lowest level (e.g., sloshing `MutableByteArray#'s around your program), you may wish to check if there are system libraries that provide a "Haskellised veneer" over the features you want. See Section See section System libraries.

Section See section The GHC prelude and libraries is the definitive guide for many of the low-level facilities in GHC.


Go to the first, previous, next, last section, table of contents.