diff options
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/haskell-bind/PGF2.hsc | 9 | ||||
| -rw-r--r-- | src/runtime/haskell/PGF/Internal.hs | 18 | ||||
| -rw-r--r-- | src/runtime/haskell/PGF/Utilities.hs | 4 |
3 files changed, 29 insertions, 2 deletions
diff --git a/src/runtime/haskell-bind/PGF2.hsc b/src/runtime/haskell-bind/PGF2.hsc index d76e86a5d..56f7c0c13 100644 --- a/src/runtime/haskell-bind/PGF2.hsc +++ b/src/runtime/haskell-bind/PGF2.hsc @@ -1,4 +1,13 @@ {-# LANGUAGE ExistentialQuantification, DeriveDataTypeable #-} +------------------------------------------------- +-- | +-- Maintainer : Krasimir Angelov +-- Stability : stable +-- Portability : portable +-- +-- This is the Haskell binding to the C run-time system for +-- loading and interpreting grammars compiled in Portable Grammar Format (PGF). +------------------------------------------------- #include <pgf/pgf.h> #include <gu/enum.h> #include <gu/exn.h> diff --git a/src/runtime/haskell/PGF/Internal.hs b/src/runtime/haskell/PGF/Internal.hs new file mode 100644 index 000000000..f2c79596c --- /dev/null +++ b/src/runtime/haskell/PGF/Internal.hs @@ -0,0 +1,18 @@ +{-# OPTIONS_HADDOCK hide #-} +------------------------------------------------- +-- | +-- Stability : unstable +-- +------------------------------------------------- +module PGF.Internal(module Internal) where +import PGF.Binary as Internal +import PGF.Data as Internal +import PGF.Macros as Internal +import PGF.Optimize as Internal +import PGF.Printer as Internal +import PGF.Utilities as Internal + +import Data.Binary as Internal +import Data.Binary.Get as Internal +import Data.Binary.IEEE754 as Internal +import Data.Binary.Put as Internal diff --git a/src/runtime/haskell/PGF/Utilities.hs b/src/runtime/haskell/PGF/Utilities.hs index 5af5b9b5d..ab1b4e2fe 100644 --- a/src/runtime/haskell/PGF/Utilities.hs +++ b/src/runtime/haskell/PGF/Utilities.hs @@ -3,10 +3,10 @@ module PGF.Utilities where import Data.Set(empty,member,insert) --- | Like 'nub', but O(n log n) instead of O(n^2), since it uses a set to lookup previous things. +-- | Like 'Data.List.nub', but O(n log n) instead of O(n^2), since it uses a set to lookup previous things. -- The result list is stable (the elements are returned in the order they occur), and lazy. -- Requires that the list elements can be compared by Ord. --- Code ruthlessly taken from http://hpaste.org/54411 +-- Code ruthlessly taken from <http://hpaste.org/54411> nub' :: Ord a => [a] -> [a] nub' = loop empty where loop _ [] = [] |
