code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15 values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- | This module defines a plugin interface for hackage features.
--
{-# LANGUAGE ExistentialQuantification, RankNTypes, NoMonomorphismRestriction, RecordWildCards #-}
module Distribution.Server.Framework.Feature
( -- * Main datatypes
HackageFeature(..)
, IsHackageFeature(..)
, emptyHackageFeature
-- * State components
, StateComponent(..)
, OnDiskState(..)
, AbstractStateComponent(..)
, abstractAcidStateComponent
, abstractAcidStateComponent'
, abstractOnDiskStateComponent
, queryState
, updateState
, compareState
-- * Cache components
, CacheComponent(..)
-- * Re-exports
, BlobStorage
) where
import Distribution.Server.Framework.BackupDump (BackupType (..))
import Distribution.Server.Framework.BackupRestore (RestoreBackup(..), AbstractRestoreBackup(..), BackupEntry, abstractRestoreBackup)
import Distribution.Server.Framework.Resource (Resource, ServerErrorResponse)
import Distribution.Server.Framework.BlobStorage (BlobStorage)
import Distribution.Server.Framework.MemSize
import Data.Monoid
import Control.Monad (liftM, liftM2)
import Control.Monad.Trans (MonadIO)
import Data.Acid
import Data.Acid.Advanced
-- | We compose the overall hackage server featureset from a bunch of these
-- features. The intention is to make the hackage server reasonably modular
-- by allowing distinct features to be designed independently.
--
-- Features can hold their own canonical state and caches, and can provide a
-- set of resources.
--
data HackageFeature = HackageFeature {
featureName :: String
, featureDesc :: String
, featureResources :: [Resource]
, featureErrHandlers :: [(String, ServerErrorResponse)]
, featurePostInit :: IO ()
, featureReloadFiles :: IO ()
, featureState :: [AbstractStateComponent]
, featureCaches :: [CacheComponent]
}
-- | A feature with no state and no resources, just a name.
--
-- Define your new feature by extending this one, e.g.
--
-- > myHackageFeature = emptyHackageFeature "wizzo" {
-- > featureResources = [wizzo]
-- > }
--
emptyHackageFeature :: String -> HackageFeature
emptyHackageFeature name = HackageFeature {
featureName = name,
featureDesc = "",
featureResources = [],
featureErrHandlers= [],
featurePostInit = return (),
featureReloadFiles = return (),
featureState = error $ "'featureState' not defined for feature '" ++ name ++ "'",
featureCaches = []
}
class IsHackageFeature feature where
getFeatureInterface :: feature -> HackageFeature
--------------------------------------------------------------------------------
-- State components --
--------------------------------------------------------------------------------
-- | A state component encapsulates (part of) a feature's state
data StateComponent f st = StateComponent {
-- | Human readable description of the state component
stateDesc :: String
-- | Handle required to access the state
, stateHandle :: f st
-- | Return the entire state
, getState :: IO st
-- | Overwrite the state
, putState :: st -> IO ()
-- | (Pure) backup function
, backupState :: BackupType -> st -> [BackupEntry]
-- | (Pure) backup restore
, restoreState :: RestoreBackup st
-- | Clone the state component in the given state directory
, resetState :: FilePath -> IO (StateComponent f st)
}
data OnDiskState a = OnDiskState
-- | 'AbstractStateComponent' abstracts away from a particular type of
-- 'StateComponent'
data AbstractStateComponent = AbstractStateComponent {
abstractStateDesc :: String
, abstractStateCheckpoint :: IO ()
, abstractStateClose :: IO ()
, abstractStateBackup :: BackupType -> IO [BackupEntry]
, abstractStateRestore :: AbstractRestoreBackup
, abstractStateNewEmpty :: FilePath -> IO (AbstractStateComponent, IO [String])
, abstractStateSize :: IO Int
}
compareState :: (Eq st, Show st) => st -> st -> [String]
compareState old new =
if old /= new
then ["Internal state mismatch:\n" ++ difference (show old) (show new)]
else []
where
difference old_str new_str
-- = indent 2 old_str ++ "Versus:\n" ++ indent 2 new_str
= "After " ++ show (length common) ++ " chars, in context:\n" ++
indent 2 (trunc_last 80 common) ++ "\nOld data was:\n" ++
indent 2 (trunc 80 old_str_tail) ++ "\nVersus new data:\n" ++
indent 2 (trunc 80 new_str_tail)
where (common, old_str_tail, new_str_tail) = dropCommonPrefix [] old_str new_str
indent n = unlines . map (replicate n ' ' ++) . lines
trunc n xs | null zs = ys
| otherwise = ys ++ "..."
where (ys, zs) = splitAt n xs
trunc_last n xs | null ys_rev = reverse zs_rev
| otherwise = "..." ++ reverse zs_rev
where (zs_rev, ys_rev) = splitAt n (reverse xs)
dropCommonPrefix common (x:xs) (y:ys) | x == y = dropCommonPrefix (x:common) xs ys
dropCommonPrefix common xs ys = (reverse common, xs, ys)
abstractAcidStateComponent :: (Eq st, Show st, MemSize st)
=> StateComponent AcidState st -> AbstractStateComponent
abstractAcidStateComponent = abstractAcidStateComponent' compareState
abstractAcidStateComponent' :: MemSize st
=> (st -> st -> [String])
-> StateComponent AcidState st -> AbstractStateComponent
abstractAcidStateComponent' cmp st = AbstractStateComponent {
abstractStateDesc = stateDesc st
, abstractStateCheckpoint = createCheckpoint (stateHandle st)
, abstractStateClose = closeAcidState (stateHandle st)
, abstractStateBackup = \t -> liftM (backupState st t) (getState st)
, abstractStateRestore = abstractRestoreBackup (putState st) (restoreState st)
, abstractStateNewEmpty = \stateDir -> do
st' <- resetState st stateDir
let cmpSt = liftM2 cmp (getState st) (getState st')
return (abstractAcidStateComponent' cmp st', cmpSt)
, abstractStateSize = liftM memSize (getState st)
}
abstractOnDiskStateComponent :: (Eq st, Show st) => StateComponent OnDiskState st -> AbstractStateComponent
abstractOnDiskStateComponent st = AbstractStateComponent {
abstractStateDesc = stateDesc st
, abstractStateCheckpoint = return ()
, abstractStateClose = return ()
, abstractStateBackup = \t -> liftM (backupState st t) (getState st)
, abstractStateRestore = abstractRestoreBackup (putState st) (restoreState st)
, abstractStateNewEmpty = \stateDir -> do
st' <- resetState st stateDir
let cmpSt = liftM2 compareState (getState st) (getState st')
return (abstractOnDiskStateComponent st', cmpSt)
, abstractStateSize = return 0
}
instance Monoid AbstractStateComponent where
mempty = AbstractStateComponent {
abstractStateDesc = ""
, abstractStateCheckpoint = return ()
, abstractStateClose = return ()
, abstractStateBackup = \_ -> return []
, abstractStateRestore = mempty
, abstractStateNewEmpty = \_stateDir -> return (mempty, return [])
, abstractStateSize = return 0
}
a `mappend` b = AbstractStateComponent {
abstractStateDesc = abstractStateDesc a ++ "\n" ++ abstractStateDesc b
, abstractStateCheckpoint = abstractStateCheckpoint a >> abstractStateCheckpoint b
, abstractStateClose = abstractStateClose a >> abstractStateClose b
, abstractStateBackup = \t -> liftM2 (++) (abstractStateBackup a t) (abstractStateBackup b t)
, abstractStateRestore = abstractStateRestore a `mappend` abstractStateRestore b
, abstractStateNewEmpty = \stateDir -> do
(a', cmpA) <- abstractStateNewEmpty a stateDir
(b', cmpB) <- abstractStateNewEmpty b stateDir
return (a' `mappend` b', liftM2 (++) cmpA cmpB)
, abstractStateSize = liftM2 (+) (abstractStateSize a)
(abstractStateSize b)
}
queryState :: (MonadIO m, QueryEvent event)
=> StateComponent AcidState (EventState event)
-> event
-> m (EventResult event)
queryState = query' . stateHandle
updateState :: (MonadIO m, UpdateEvent event)
=> StateComponent AcidState (EventState event)
-> event
-> m (EventResult event)
updateState = update' . stateHandle
--------------------------------------------------------------------------------
-- Cache components --
--------------------------------------------------------------------------------
-- | A cache component encapsulates a cache, managed by a feature
data CacheComponent = CacheComponent {
-- | Human readable description of the state component
cacheDesc :: String
-- | Get the current memory residency of the cache
, getCacheMemSize :: IO Int
}
| mpickering/hackage-server | Distribution/Server/Framework/Feature.hs | bsd-3-clause | 9,271 | 0 | 16 | 2,337 | 1,970 | 1,095 | 875 | 148 | 3 |
module D2 where
{-lift 'sq' to top level. In this refactoring, 'sq' will
be hided in the import declaraion of module 'D2' in module 'C2'.-}
sumSquares (x:xs) = (sq pow) x + sumSquares xs
where
pow =2
sumSquares [] = 0
sq pow x = x ^ pow
| kmate/HaRe | old/testing/liftToToplevel/D2_TokOut.hs | bsd-3-clause | 256 | 0 | 8 | 67 | 67 | 35 | 32 | 5 | 1 |
{-# LANGUAGE RecursiveDo #-}
module T10004 where
bar :: IO ()
bar = do rec {}
return ()
| urbanslug/ghc | testsuite/tests/mdo/should_compile/T10004.hs | bsd-3-clause | 98 | 0 | 8 | 28 | 33 | 18 | 15 | 5 | 1 |
str2action :: String -> IO ()
str2action input = putStrLn ("Data: " ++ input)
list2actions :: [String] -> [IO ()]
list2actions = map str2action
numbers :: [Int]
numbers = [1..10]
strings :: [String]
strings = map show numbers
actions :: [IO ()]
actions = list2actions strings
printitall :: IO ()
printitall = runall actions
runall :: [IO ()] -> IO ()
runall [] = return ()
runall (firstelem:remainingelems) =
do firstelem
runall remainingelems
main = do str2action "Start of the program"
printitall
str2action "Done!"
| tamasgal/haskell_exercises | Real_World_Haskell/ch07/actions.hs | mit | 556 | 1 | 9 | 122 | 243 | 113 | 130 | 20 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Text.Fractions where
import Control.Applicative
import Data.Attoparsec.Text (parseOnly)
import Data.Ratio ((%))
import Data.String (IsString)
import Text.Trifecta
-- test inputs
badFraction :: IsString s => s
badFraction = "1/0"
alsoBad :: IsString s => s
alsoBad = "10"
shouldWork :: IsString s => s
shouldWork = "1/2"
shouldAlsoWork :: IsString s => s
shouldAlsoWork = "2/1"
-- actual parser
parseFraction :: (Monad m, TokenParsing m) => m Rational
parseFraction = do
numerator <- decimal
_ <- char '/'
denominator <- decimal
case denominator of
0 -> fail "Denominator can't be zero"
_ -> return (numerator % denominator)
-- exercise: unit of success
main :: IO ()
main = do
print $ parseOnly parseFraction badFraction
print $ parseOnly parseFraction shouldWork
print $ parseOnly parseFraction shouldAlsoWork
print $ parseOnly parseFraction alsoBad
print $ parseString parseFraction mempty badFraction
print $ parseString parseFraction mempty shouldWork
print $ parseString parseFraction mempty shouldAlsoWork
print $ parseString parseFraction mempty alsoBad
| JustinUnger/haskell-book | ch24/ch24-fractions-attoparsec.hs | mit | 1,180 | 0 | 12 | 233 | 324 | 163 | 161 | 33 | 2 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE OverloadedStrings #-}
module Actions where
import qualified Data.ByteString.Char8 as B
import Data.Maybe (isJust, fromJust)
import Data.Monoid ((<>))
import Control.Applicative ((<$>))
import Control.Concurrent
import Control.Monad.Except
import Control.Monad.State
import Control.Monad.Reader
import System.IO (Handle())
import System.IO.Error
import Game
import Messages
import UUID
type ActionM = ReaderT (Message, Handle) (ExceptT B.ByteString (StateT GameState IO))
type ActionHandler = [B.ByteString] -> Robot -> ActionM ()
runAction :: Handle -> Message -> GameState -> IO GameState
runAction handle message state = do
let actionID:robotID:args = mParts message
let robot = lookupRobot robotID state
let noRequesterError = return (Left "Requester does not exist", state)
(res, state') <- maybe noRequesterError
(runTransformers state (message, handle) . action actionID args) robot
case res of
Left err -> do
send handle $ Message (mId message) "result" [actionID, robotID, "failure", err]
return state
Right () -> return state'
where runTransformers state tuple =
flip runStateT state . runExceptT . flip runReaderT tuple
action :: B.ByteString -> ActionHandler
action "scan" = \args robot -> do
expect (args == []) "No arguments expected"
let range = if kind robot == Headquarters then 100 else 10
delay 1000 Scan $ do
success "begin_of_stream"
mapM_ result . map jsonifyRobot . filter ((<= range) . distance (pos robot) . pos) . robots =<< get
result "end_of_stream"
action "query" = \args robot -> do
expect (args == []) "No arguments expected"
success $ jsonifyRobot robot
action "spawn" = \args robot -> do
expect (length args == 1 || length args == 3) "Expected one or three arguments"
expect (isJust . stringToKind . head $ args) "Invalid robot type"
let targetKind = fromJust . stringToKind . head $ args
expect ((kind robot, targetKind) `elem` (join
[ (Headquarters,) <$> [Engineer, Specialist]
, (Factory,) <$> [Engineer]
, (Engineer,) <$> [Factory]
])) "Your robot type is not allowed to spawn that type of robot"
position <- case args of
[_] -> liftIO $ randomPositionInCircle (pos robot, 5)
[_, x, y] ->
catchIO (read $ B.unpack x, read $ B.unpack y) . const $ throwError "Bad Number"
delay 1000 Spawn $ do
uuid <- liftIO $ randomUUID
modify . spawnRobot $ Robot uuid position Off targetKind
(_, handle) <- ask
liftIO $ newMessage "spawn" [(kindToString targetKind), uuid]
>>= send handle
success uuid
action "move" = \args robot -> do
expect (length args == 1) "Expected one argument"
case stringToDirection $ head args of
Nothing -> throwError "Invalid direction"
Just direction -> do
st <- get
case collision (move direction $ pos robot) st of
Nothing -> delay 1000 Move $ do
modify . changeRobot (rId robot) $ moveRobot direction
success ""
Just _ -> throwError "Target position occupied"
action "start" = \args robot -> do
expect (length args == 1) "Expected one argument"
let targetID = head args
target <- gets $ lookupRobot targetID
expect (isJust target) "No such target"
delay 1000 Start $ do
setStatus targetID Idle
(_, handle) <- ask
liftIO $ newMessage "start" [targetID] >>= send handle
success ""
action _ = \_ _ -> throwError "No such action"
expect :: (MonadError e m) => Bool -> e -> m ()
expect bool err
| bool == True = return ()
| otherwise = throwError err
catchIO :: (MonadError e m, MonadIO m) => a -> (IOError -> m a) -> m a
catchIO x fun = (liftIO . tryIOError $ return x) >>= either fun return
success :: B.ByteString -> ActionM ()
success "" = result "success"
success msg = result $ "success " <> msg
result :: B.ByteString -> ActionM ()
result msg = do
(message, handle) <- ask
let action:robotID:args = mParts message
liftIO . send handle $ Message (mId message) "result" [action, robotID, msg]
delay :: Int -> Action -> ActionM () -> ActionM ()
delay cost action runAction = do
(message, handle) <- ask
let actionID:robotID:args = mParts message
setStatus robotID $ Performing action
stateVar <- mvar <$> get
void . liftIO . forkIO $ do
threadDelay $ cost * 1000
modifyMVar_ stateVar $ \state -> do
(res, state') <- flip runStateT state . runExceptT . flip runReaderT (message, handle) $ do
runAction
setStatus robotID Idle
case res of
Left err -> do
send handle $ Message (mId message) "result" [actionID, robotID, "failure", err]
return state
Right () -> return state'
| shak-mar/botstrats | server/Actions.hs | mit | 5,042 | 0 | 23 | 1,385 | 1,771 | 870 | 901 | 116 | 5 |
{-
Copyright (c) 2010-2012, Benedict R. Gaster
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-}
module OutputServer (
createOutputServer
) where
import Control.Concurrent
import Control.Concurrent.STM
import Control.Concurrent.STM.TChan
import Control.Concurrent.MVar
--------------------------------------------------------------------------------
import TupleType
import NetworkTuple
import TupleStore
------------------------------------------------------------------------------
data OutputSeverMsg = OutOutputServerMsg Tuple
| AddOutputServerMsg (Tuple -> IO ())
createOutputServer :: (Tuple -> IO ()) ->
IO (Tuple -> IO (), (Tuple -> IO ()) -> IO ())
createOutputServer localServer =
do chan <- atomically $ newTChan
forkIO $ server chan [localServer]
return ((\tuple -> atomically $ writeTChan chan (OutOutputServerMsg tuple)),
(\f -> atomically $ writeTChan chan (AddOutputServerMsg f)))
where
server chan tupleServers = loop tupleServers
where loop [] = loop tupleServers
loop (next:xs) =
do r <- atomically $ readTChan chan
case r of
OutOutputServerMsg tuple -> next tuple >> loop xs
AddOutputServerMsg f -> server chan (f:tupleServers)
| bgaster/hlinda | OutputServer.hs | mit | 2,890 | 0 | 16 | 700 | 329 | 170 | 159 | 25 | 3 |
module My.Test.Common where
import Data.Conduit
import Data.Word
import Data.Bits
import qualified Data.ByteString as B
toHex :: Word8 -> Word8
toHex n
| n < 10 = 48 + n -- 0~9
| otherwise = 55 + n -- A~F
encodeHex :: Monad m => Conduit B.ByteString m B.ByteString
encodeHex = await >>= \case
Just seg -> yield (fst $ B.unfoldrN (B.length seg * 2) encode (Left 0)) >> encodeHex where
encode (Left i) = Just (toHex (B.index seg i `shiftR` 4), Right i)
encode (Right i) = Just (toHex (B.index seg i .&. 15), Left (i+1))
_ -> return ()
| CindyLinz/GCryptDrive | src/My/Test/Common.hs | mit | 553 | 0 | 17 | 120 | 268 | 138 | 130 | -1 | -1 |
module Stats.Expr where
import Stats.Stats
import Control.Applicative((<*),(<$>))
import Data.Char
import Data.List
import Data.Maybe
import System.IO
import Text.Printf
import Text.Parsec
import Text.Parsec.String
import Text.Parsec.Error
import Text.Parsec.Expr
import Text.Parsec.Token
import Text.Parsec.Language
import Data.Functor.Identity
type CellVal = Maybe Double
data StatExpr =
StatCol !Int !Int -- column projection (a column in a stat file) #1
| StatRef !Int !String -- a variable reference @ref
| StatLit !Int !Double -- a constant literal for scaling etc...
| StatGrp !Int !StatExpr -- a grouped expression: (e)
| StatPow !Int !StatExpr !StatExpr -- exponentiation: e^e
| StatNeg !Int !StatExpr -- negation: -e
| StatDiv !Int !StatExpr !StatExpr -- ratio: e/e
| StatMul !Int !StatExpr !StatExpr -- product: e*e
| StatAdd !Int !StatExpr !StatExpr -- sum: e + e
| StatSub !Int !StatExpr !StatExpr -- difference: e - e
| StatFun !Int !String ![StatExpr] -- a function call
-- | StatHst !Int !StatExpr -- histogram
deriving (Show,Eq)
colStatExpr :: StatExpr -> Int
colStatExpr (StatCol c _) = c
colStatExpr (StatRef c _) = c
colStatExpr (StatLit c _) = c
colStatExpr (StatGrp c _) = c
colStatExpr (StatPow c _ _) = c
colStatExpr (StatNeg c _) = c
colStatExpr (StatDiv c _ _) = c
colStatExpr (StatMul c _ _) = c
colStatExpr (StatAdd c _ _) = c
colStatExpr (StatSub c _ _) = c
colStatExpr (StatFun c _ _) = c
allStatFuncs :: [(String,Int,StatFuncImpl)]
allStatFuncs = [
("avg", 1, unaryVS (stAvg . stats)) -- average
, ("cfv", 1, unaryVS (stCfv . stats)) -- coefficient of variation
, ("cov", 0, naryVS cov) -- covariance (needs 2 or more ops)
, ("len", 1, unaryVS (fromIntegral . length)) -- number of samples (length of a column)
, ("max", 1, unaryVS maximum) -- maximum
, ("med", 1, unaryVS (stMed . stats)) -- median
, ("min", 1, unaryVS minimum) -- minimum
, ("sdv", 1, unaryVS (stSdv . stats)) -- standard deviation (unbiased)
, ("var", 1, unaryVS (stVar . stats)) -- variance (unbiased)
, ("sqt", 1, unarySS sqrt)
, ("log", 1, unarySS (logBase 10))
, ("lg", 1, unarySS (logBase 2))
, ("ln", 1, unarySS (logBase (exp 1)))
, ("exp", 1, unarySS exp)
]
where unaryVS = StatFuncImplUnaVecSca
naryVS = StatFuncImplNryVecSca
unarySS = StatFuncImplUnaScaSca
data StatFuncImpl =
StatFuncImplUnaVecSca ([Double] -> Double)
| StatFuncImplNryVecSca ([[Double]] -> Double)
| StatFuncImplUnaScaSca (Double -> Double)
ppStatExpr :: StatExpr -> String
ppStatExpr e =
case e of
(StatCol _ i) -> "#" ++ show i
(StatRef _ r) -> "@" ++ r
(StatLit _ v) -> show v
(StatGrp _ e) -> "(" ++ ppStatExpr e ++ ")"
(StatPow _ e1 e2) -> ppStatExpr e1 ++ "^" ++ ppStatExpr e2
(StatNeg _ e) -> "-" ++ ppStatExpr e
(StatDiv _ e1 e2) -> ppStatExpr e1 ++ "/" ++ ppStatExpr e2
(StatMul _ e1 e2) -> ppStatExpr e1 ++ "*" ++ ppStatExpr e2
(StatAdd _ e1 e2) -> ppStatExpr e1 ++ " + " ++ ppStatExpr e2
(StatSub _ e1 e2) -> ppStatExpr e1 ++ " - " ++ ppStatExpr e2
(StatFun _ f es) -> f ++ "(" ++ intercalate "," (map ppStatExpr es) ++ ")"
data StatValue = StatVec ![Double] -- typically a column projection: #2
| StatSca !Double -- a scalar value. e.g. result from a reduction: min($2)
| StatErr !Int !String -- an error (with an optional column location)
deriving (Eq,Show)
type Env = String -> Maybe StatValue
-- Evaluates a statistical expression
evalStatExpr :: [[CellVal]] -> Env -> StatExpr -> StatValue
evalStatExpr _ _ (StatLit _ v) = StatSca v
evalStatExpr cs _ (StatCol at c)
| c >= length cs = StatErr at $ "column " ++ show c ++ " is out of bounds"
| any isNothing cvals = StatErr at $ "column " ++ show c ++ " contains malformed data"
| otherwise = StatVec (map (\(Just v) -> v) cvals)
where cvals = cs !! c
isNothing Nothing = True
isNothing _ = False
evalStatExpr cs env (StatRef c var) = fromMaybe (StatErr c $ "unbound identifier " ++ var) (env var)
evalStatExpr cs env (StatGrp _ e) = evalStatExpr cs env e
evalStatExpr cs env (StatNeg _ e) = evalStatExprUn negate cs env e
evalStatExpr cs env (StatPow _ e1 e2) = evalStatExprBin (**) cs env e1 e2
evalStatExpr cs env (StatMul _ e1 e2) = evalStatExprBin (*) cs env e1 e2
evalStatExpr cs env (StatDiv _ e1 e2) = evalStatExprBin (/) cs env e1 e2
evalStatExpr cs env (StatAdd _ e1 e2) = evalStatExprBin (+) cs env e1 e2
evalStatExpr cs env (StatSub _ e1 e2) = evalStatExprBin (-) cs env e1 e2
evalStatExpr cs env (StatFun c f es) =
case find (\(g,_,_) -> g == f) allStatFuncs of
Nothing -> error $ show c ++ ". cannot find function in allStatFuncs for " ++ f
Just (nm,n,impl)
| n /= 0 && n /= length es -> StatErr c $ "wrong number of arguments to " ++ nm
| otherwise -> evalStatExprFunc impl c nm cs (map (evalStatExpr cs env) es)
-- evalStatExpr _ _ e = StatErr 0 $ "implement: " ++ show e
evalStatExprBin :: (Double -> Double -> Double) -> [[CellVal]] -> Env -> StatExpr -> StatExpr -> StatValue
evalStatExprBin op cs env e1 e2 =
case (evalStatExpr cs env e1, evalStatExpr cs env e2) of
(e@(StatErr _ _), _) -> e
(_, e@(StatErr _ _)) -> e
(StatSca v1, StatSca v2) -> StatSca (v1 `op` v2)
(StatSca v1, StatVec v2) -> StatVec (map (v1`op`) v2)
(StatVec v1, StatSca v2) -> StatVec (map (`op`v2) v1)
(StatVec v1, StatVec v2) -> StatVec (zipWith op v1 v2)
evalStatExprUn :: (Double -> Double) -> [[CellVal]] -> Env -> StatExpr -> StatValue
evalStatExprUn op cs env e =
case evalStatExpr cs env e of
e@(StatErr _ _) -> e
StatSca v -> StatSca (op v)
StatVec vs -> StatVec (map op vs)
evalStatExprFunc :: StatFuncImpl -> Int -> String -> [[CellVal]] -> [StatValue] -> StatValue
evalStatExprFunc impl col nm cs vs
| not (null errs) = head errs
| otherwise = case impl of
StatFuncImplUnaVecSca f ->
case head vs of
e@(StatErr _ _) -> e
StatSca _ -> StatErr col $ "scalar passed to " ++ nm
StatVec ds -> StatSca (f ds)
StatFuncImplNryVecSca f
| not (null scalars) -> StatErr col $ "arg " ++ show (fst (head scalars)) ++
" scalar passed to " ++ nm
| otherwise -> StatSca $ f (map (\(StatVec ds) -> ds) vs)
StatFuncImplUnaScaSca f
| length vs /= 1 -> StatErr col $ nm ++ " requires exactly one argument"
| otherwise -> case head vs of
StatSca v -> StatSca (f v)
StatVec ds -> StatVec (map f ds)
where errs = filter isErr vs
isErr (StatErr _ _) = True
isErr _ = False
scalars = filter (isSca . snd) (zip [1..] vs)
isSca (StatSca _) = True
isSca _ = False
--
-- > PROPOSED GRAMMAR (some features may not be implemented):
-- > <spec> ::= list(<col_expr>,',')
-- > <col_expr> ::=
-- > <lit>
-- > | '#' [0-9]+ -- column reference
-- > | '@' [0-9]+ -- variable reference
-- > | <col_expr> '+' <col_expr>
-- > | <col_expr> '-' <col_expr>
-- > | <col_expr> '*' <col_expr>
-- > | <col_expr> '/' <col_expr>
-- > | '-' <col_expr>
-- > | <col_expr> '^' <col_expr>
-- > | '(' <col_expr> ')'
-- > | <sca_func> '(' <col_expr> ')'
-- > | <agr_func> '(' <col_ref> ')'
-- > | <agr2_func> '(' <col_ref> ',' <col_ref> ')'
-- > <sca_func> ::= -- scalar functions
-- > 'cos'
-- > | 'log' -- log-base 10
-- > | 'exp'
-- > | 'lg' -- log-base 2
-- > | 'ln' -- natural logarithm
-- > | 'sin'
-- > | 'sqt'
-- > | 'tan'
-- > <agr_func> ::= -- aggregation functions
-- > 'avg' -- average
-- > | 'cfv' -- coefficient of variation
-- > | 'len' -- length of the column
-- > | 'max' -- maximum in the column
-- > | 'med' -- median
-- > | 'min' -- minimum
-- > | 'sdv' -- standard deviation (unbiased)
-- > | 'sum' -- column sum
-- > <agr2_func> ::= -- binary aggregion functions
-- > 'cov' -- covariance
-- > <lit> ::= (read :: String -> Double)
parseStatExprs :: String -> Either String [StatExpr]
parseStatExprs inp =
case parse (pExprs <* eof) "" inp of
Left err -> Left $ errToStr err
Right r -> Right r
where errToStr :: ParseError -> String
errToStr err = show ecol ++ ". " ++ dropWhile isSpace emsg ++ "\n" -- show ecol ++ ". " ++ emsg ++ "\n"
++ inp ++ "\n"
++ replicate (ecol-1) ' ' ++ "^\n"
where ecol = sourceColumn (errorPos err)
-- emsg = intercalate "; " (map messageString (errorMessages err))
emsg = drop 1 $ dropWhile (/=';') (concatMap (\c -> if c == '\n' then "; " else [c]) (show err))
def = emptyDef{ commentStart = "/*"
, commentEnd = "*/"
, identStart = letter
, identLetter = alphaNum
, opStart = oneOf "-*/+^"
, opLetter = oneOf ""
, reservedOpNames = ["-", "*", "/", "+", "-"]
, reservedNames = fnames
}
where fnames = map (\(nm,_,_) -> nm) allStatFuncs
TokenParser{ parens = m_parens
, identifier = m_identifier
, reservedOp = m_reservedOp
, reserved = m_reserved
, commaSep = m_commaSep
, lexeme = m_lexeme
, symbol = m_symbol
, whiteSpace = m_whiteSpace } = makeTokenParser def
pApplyCol :: Parser (Int -> StatExpr) -> Parser StatExpr
pApplyCol p = do
m_whiteSpace
cl <- fmap sourceColumn getPosition
fmap (\pF -> pF cl) p
pExprs :: Parser [StatExpr]
pExprs = sepBy pExpr (m_symbol ",")
pExpr :: Parser StatExpr
pExpr = pApplyCol expr
where expr :: Parser (Int -> StatExpr)
expr = buildExpressionParser table term <?> "expression"
term :: Parser (Int -> StatExpr)
term = do
t <- pTerm
return (const t)
-- Table returns: Parser (Int -> StatExpr)
table :: OperatorTable String () Identity (Int -> StatExpr)
table = [
[binOpR "^" StatPow]
, [unOp "-" StatNeg]
, [binOpL "*" StatMul, binOpL "/" StatDiv]
, [binOpL "+" StatAdd, binOpL "-" StatSub]
]
binOpL, binOpR :: String -> (Int -> StatExpr -> StatExpr -> StatExpr) -> Operator String () Identity (Int -> StatExpr)
binOpL s cons = Infix (m_reservedOp s >> return (\e1 e2 c -> cons c (e1 c) (e2 c))) AssocLeft
binOpR s cons = Infix (m_reservedOp s >> return (\e1 e2 c -> cons c (e1 c) (e2 c))) AssocRight
unOp :: String -> (Int -> StatExpr -> StatExpr) -> Operator String () Identity (Int -> StatExpr)
unOp s cons = Prefix $ m_reservedOp s >> return (\e c -> cons c (e c))
pTerm :: Parser StatExpr
pTerm = m_lexeme (pApplyCol $
pGroup
<|> pCol
<|> pRef
<|> pFuncOrLiteral)
where pGroup = do { m_symbol "("; e <- pExpr; m_symbol ")"; return (`StatGrp` e) }
pCol = do { char '#'; ds <- many1 digit; return (`StatCol` read ds) }
pRef = do { char '@'; ref <- pRefId; return (`StatRef` ref) }
pRefId = do { c <- letter <|> char '_'; cs<-many alphaNum; return (c:cs) }
<|> many1 digit
pFuncOrLiteral :: Parser (Int -> StatExpr)
pFuncOrLiteral = tryFunc allStatFuncs
where tryFunc ((fnm,arity,_):rest) =
try (do { m_reserved fnm;
m_symbol "(";
es <- m_commaSep pExpr;
if arity > 0 && arity /= length es then
fail (fnm ++ " takes " ++ show arity ++ " argument" ++ if arity > 1 then "s" else "")
else do
m_symbol ")";
return (\c -> StatFun c fnm es) })
<|> tryFunc rest
tryFunc [] = pLit
pLit :: Parser (Int -> StatExpr)
pLit = do
ds1 <- many1 digit
ds2 <- option "" $ do
char '.'
ds2 <- many1 digit
return ("." ++ ds2)
return (\c -> StatLit c (read (ds1 ++ ds2)))
| trbauer/stquery | Stats/Expr.hs | mit | 12,814 | 3 | 18 | 4,150 | 4,049 | 2,114 | 1,935 | 295 | 11 |
import System.Environment
isProductOf :: Int -> Int -> Int
isProductOf m n
| m == n = 1
| m == 1 = 0
| n == 1 = -1
| m == 0 = -1
| (m `mod` n == 0) && isProductOf (m `div` n) n >= 1 = 1 + isProductOf (m `div` n) n
| otherwise = -1
intStringPairsToInts :: [(Int, String)] -> [Int]
intStringPairsToInts pairs
| null pairs = []
| otherwise = intStringPairsToInts (reads (snd (head pairs))) ++ [fst (head pairs)]
stringsToInts :: [String] -> [Int]
stringsToInts strs
| null strs = []
| otherwise = intStringPairsToInts (reads (head strs)) ++ stringsToInts (tail strs)
first :: [Int] -> Int
first (x:_) = x
first _ = 1
second :: [Int] -> Int
second (_:x:_) = x
second _ = 1
main :: IO ()
main = do
numsInput <- getArgs
let (nums, m, n) = (stringsToInts numsInput, first nums, second nums) in print $ m `isProductOf` n
| SuhairZain/mpowerofn-haskell | main.hs | mit | 1,086 | 4 | 12 | 436 | 475 | 239 | 236 | 27 | 1 |
import Data.Numbers.Primes
import Data.List
perfect n = helper2 n > 1
helper1 l = sort $ map length (group l)
helper2 l =
let s = helper1 $ primeFactors l
in foldr gcd (head s) s | eccstartup/haskell-tests | perfectpower.hs | mit | 200 | 0 | 10 | 57 | 89 | 43 | 46 | 7 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
module StructuralIsomorphism.Class (StructurallyIsomorphic(..)) where
class StructurallyIsomorphic a b where
to :: a -> b
from :: b -> a
instance {-# INCOHERENT #-} StructurallyIsomorphic a a where
to = id
from = id
-- This needs to be INCOHERENT to support instances like
-- @StructurallyIsomorphic a b => StructurallyIsomorphic [a] [b]@; I don't know
-- why OVERLAPPABLE isn't enough
instance StructurallyIsomorphic a b => StructurallyIsomorphic [a] [b] where
to = map to
from = map from
instance (StructurallyIsomorphic a b, StructurallyIsomorphic a' b') =>
StructurallyIsomorphic (a -> a') (b -> b') where
to f = to . f . from
from f = from . f . to
-- Everything else is autogeneratable
| antalsz/hs-to-coq | structural-isomorphism-plugin/src/StructuralIsomorphism/Class.hs | mit | 789 | 0 | 7 | 157 | 186 | 102 | 84 | 15 | 0 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLTemplateElement
(js_getContent, getContent, HTMLTemplateElement,
castToHTMLTemplateElement, gTypeHTMLTemplateElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord)
import Data.Typeable (Typeable)
import GHCJS.Types (JSVal(..), JSString)
import GHCJS.Foreign (jsNull)
import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..))
import GHCJS.Marshal (ToJSVal(..), FromJSVal(..))
import GHCJS.Marshal.Pure (PToJSVal(..), PFromJSVal(..))
import Control.Monad.IO.Class (MonadIO(..))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import GHCJS.DOM.Types
import Control.Applicative ((<$>))
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript unsafe "$1[\"content\"]" js_getContent ::
HTMLTemplateElement -> IO (Nullable DocumentFragment)
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement.content Mozilla HTMLTemplateElement.content documentation>
getContent ::
(MonadIO m) => HTMLTemplateElement -> m (Maybe DocumentFragment)
getContent self
= liftIO (nullableToMaybe <$> (js_getContent (self))) | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLTemplateElement.hs | mit | 1,434 | 6 | 10 | 164 | 371 | 236 | 135 | 24 | 1 |
module MiniSequel.Adapter
where
import MiniSequel
import MiniSequel.Model
import MiniSequel.Expression
import MiniSequel.Mapper
import qualified Database.HDBC as DB
import qualified Database.HDBC.MySQL as MSQL
import qualified Database.HDBC.PostgreSQL as PSQL
data SequelAdapterDriver = MySQLDriver | PostgreSQLDriver deriving (Show)
data SequelAdapterConfig = SequelAdapterConfig {
driver :: SequelAdapterDriver,
host :: String,
port :: Int,
user :: String,
password :: String,
database :: String,
maxConnections :: Int
}
mySQLConnector conf =
MSQL.connectMySQL MSQL.defaultMySQLConnectInfo {
MSQL.mysqlHost = host conf,
MSQL.mysqlUser = user conf,
MSQL.mysqlPassword = password conf,
MSQL.mysqlPort = port conf,
MSQL.mysqlDatabase = database conf
}
| TachoMex/MiniSequel | src/MiniSequel/Adapter.hs | mit | 866 | 0 | 8 | 203 | 190 | 116 | 74 | 24 | 1 |
{-|
Module : Data.ImageUtils
Description : Image utilities for visualizing Nueral Network progress
Copyright : (c) Anatoly Yakovenko, 2015-2016
License : MIT
Maintainer : aeyakovenko@gmail.com
Stability : experimental
Portability : POSIX
This module implements some image utilities for animating training progess.
-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Data.ImageUtils(appendGIF
,writeBMP
,gifCat
) where
import Control.Applicative((<|>))
import qualified Data.Matrix as M
import qualified Data.Array.Repa as R
import qualified Data.Array.Repa.IO.BMP as R
import qualified Data.Array.Repa.Algorithms.Matrix as R
import Codec.Picture.Gif as G
import Codec.Picture.Types as G
import qualified Data.ByteString as BS
import Data.Matrix(Matrix(..), U, B, I)
import qualified Data.Vector.Storable as VS
import Data.Word(Word8)
-- |append a bitmap to the gif file
-- |the generated bitmap contains B number of images
-- |each row of size I treated as a square image
appendGIF:: String -> Matrix U B I -> IO ()
appendGIF sfile mm' = do
mm <- generateBox mm'
let check (Left err) = error err
check (Right a) = a
fromDynamic (G.ImageRGB8 im) = (G.greyPalette, 10, G.extractComponent G.PlaneRed im)
fromDynamic _ = error "unexpected image type"
images <- (map fromDynamic <$> check <$> G.decodeGifImages <$> (BS.readFile sfile))
<|> (return [])
normalized <- toImage mm
let img = (G.greyPalette, 10, normalized)
putStrLn $ concat ["writing image: ", sfile]
checkE $ G.writeGifImages sfile G.LoopingForever (images ++ [img])
-- |write out a bitmap
-- |the generated bitmap contains B number of images
-- |each row of size I treated as a square image
writeBMP::String -> Matrix U B I -> IO ()
writeBMP sfile bxi = do
image <- generateBox bxi
ar <- R.computeUnboxedP $ R.map (\xx -> (xx,xx,xx)) image
putStrLn $ concat ["writing image: ", sfile]
R.writeImageToBMP sfile ar
-- |concatinate multiple gifs
gifCat :: String -> [String] -> IO ()
gifCat _ [] = return ()
gifCat f1 (f2:rest) = do
let fromDynamic (G.ImageRGB8 im) = (G.greyPalette, 10, G.extractComponent G.PlaneRed im)
fromDynamic _ = error "unexpected image type"
check (Left err) = error err
check (Right a) = a
getImages sfile = do (map fromDynamic <$> check <$> G.decodeGifImages <$> (BS.readFile sfile))
<|> (return [])
f1s <- getImages f1
f2s <- getImages f2
putStrLn $ concat ["writing image: ", f1]
checkE $ G.writeGifImages f1 G.LoopingForever (f1s ++ f2s)
gifCat f1 rest
-- |generate a bitmap from a square matrix
generateBox::Monad m => Matrix U B I -> m (R.Array R.U R.DIM2 Word8)
generateBox mm@(Matrix bxi) = do
!minv <- M.fold min (read "Infinity") mm
!maxv <- M.fold max (read "-Infinity") mm
let
imagewidth :: Int
imagewidth = round $ (fromIntegral $ M.col mm)**(0.5::Double)
batches = M.row mm
pixels = M.col mm - 1
toPixel xx
| maxv == minv = 0
| otherwise = round $ 255 * ((xx - minv)/(maxv - minv))
computeImage (R.Z R.:. brix R.:. bcix) =
let (imagenum,imagepixel) = index batches pixels brix bcix
pos = R.Z R.:. imagenum R.:. (imagepixel + 1)
safeIndex m (R.Z R.:.mr R.:.mc) (R.Z R.:.r R.:. c)
| mr <= r || mc <= c = 0
| otherwise = toPixel $ m R.! (R.Z R.:.r R.:.c)
in safeIndex bxi (R.extent bxi) pos
imagesperside = ceiling $ (fromIntegral $ M.row mm)**(0.5::Double)
sh = R.Z R.:. imagewidth * imagesperside R.:. imagewidth * imagesperside
image <- R.computeUnboxedP $ R.fromFunction sh computeImage
return image
index :: Int -> Int -> Int -> Int -> (Int,Int)
index batches pixels rr cc = (image, pixel)
where imagewidth = round $ (fromIntegral pixels)**(0.5::Double)
imagesperside = ceiling $ (fromIntegral batches)**(0.5::Double)
image = (rr `div` imagewidth) * imagesperside + (cc `div` imagewidth)
pixel = (rr `mod` imagewidth) * imagewidth + (cc `mod` imagewidth)
checkE :: Either String t -> t
checkE (Left err) = error err
checkE (Right a) = a
toImage :: Monad m => R.Array R.U R.DIM2 Word8 -> m (G.Image G.Pixel8)
toImage img = do
return $ G.Image (R.row $ R.extent img) (R.col $ R.extent img) $ VS.fromList $ R.toList img
| aeyakovenko/rbm | Data/ImageUtils.hs | mit | 4,555 | 0 | 19 | 1,094 | 1,575 | 822 | 753 | 86 | 3 |
module Main
( main
) where
import Data.Attoparsec.Text
import Data.Graph.DGraph (DGraph)
import qualified Data.Graph.DGraph as D
import Data.Graph.Traversal (dfsVertices)
import Data.Graph.Types (Arc (..))
bagP :: Parser Text
bagP = do
s <- many1' letter <* skipSpace
c <- many1' letter <* skipSpace <* (string "bags" <|> string "bag")
pure . fromString $ s <> " " <> c
sinksP :: Parser [(Int, Text)]
sinksP = (string "no other bags" $> []) <|> (p `sepBy1'` char ',')
where p = (,) <$> (skipSpace *> decimal) <*> (skipSpace *> bagP)
arcsP :: Parser [Arc Text Int]
arcsP = do
source <- bagP <* skipSpace <* string "contain" <* skipSpace
sinks <- sinksP <* char '.'
pure $ fmap (\(n, sink) -> Arc source sink n) sinks
input :: IO (DGraph Text Int)
input =
foldMap D.fromArcsList
. fromRight []
. parseOnly ((arcsP `sepBy1'` char '\n') <* skipSpace <* endOfInput)
<$> readFileText "input.txt"
part1 :: DGraph Text Int -> Int
part1 graph = pred . length $ dfsVertices (D.transpose graph) "shiny gold"
part2 :: DGraph Text Int -> Int
part2 graph = go "shiny gold"
where
go v =
let es = D.outboundingArcs graph v
in if null es then 0 else sum $ fmap (\(Arc _ y n) -> n * (1 + go y)) es
main :: IO ()
main = (bitraverse_ print print . (part1 &&& part2)) =<< input
| genos/online_problems | advent_of_code_2020/day07/Main.hs | mit | 1,364 | 0 | 17 | 336 | 568 | 296 | 272 | 35 | 2 |
module Feature.CorsSpec where
-- {{{ Imports
import Test.Hspec
import Test.Hspec.Wai
import Network.Wai.Test (SResponse(simpleHeaders, simpleBody))
import qualified Data.ByteString.Lazy as BL
import SpecHelper
import Network.HTTP.Types
import Network.Wai (Application)
-- }}}
spec :: SpecWith Application
spec =
describe "CORS" $ do
let preflightHeaders = [
("Accept", "*/*"),
("Origin", "http://example.com"),
("Access-Control-Request-Method", "POST"),
("Access-Control-Request-Headers", "Foo,Bar") ]
let normalCors = [
("Host", "localhost:3000"),
("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"),
("Origin", "http://localhost:8000"),
("Accept", "text/csv, */*; q=0.01"),
("Accept-Language", "en-US,en;q=0.5"),
("Accept-Encoding", "gzip, deflate"),
("Referer", "http://localhost:8000/"),
("Connection", "keep-alive") ]
describe "preflight request" $ do
it "replies naively and permissively to preflight request" $ do
r <- request methodOptions "/items" preflightHeaders ""
liftIO $ do
let respHeaders = simpleHeaders r
respHeaders `shouldSatisfy` matchHeader
"Access-Control-Allow-Origin"
"http://example.com"
respHeaders `shouldSatisfy` matchHeader
"Access-Control-Allow-Credentials"
"true"
respHeaders `shouldSatisfy` matchHeader
"Access-Control-Allow-Methods"
"GET, POST, PATCH, DELETE, OPTIONS, HEAD"
respHeaders `shouldSatisfy` matchHeader
"Access-Control-Allow-Headers"
"Authentication, Foo, Bar, Accept, Accept-Language, Content-Language"
respHeaders `shouldSatisfy` matchHeader
"Access-Control-Max-Age"
"86400"
it "suppresses body in response" $ do
r <- request methodOptions "/" preflightHeaders ""
liftIO $ simpleBody r `shouldBe` ""
describe "regular request" $
it "exposes necesssary response headers" $ do
r <- request methodGet "/items" [("Origin", "http://example.com")] ""
liftIO $ simpleHeaders r `shouldSatisfy` matchHeader
"Access-Control-Expose-Headers"
"Content-Encoding, Content-Location, Content-Range, Content-Type, \
\Date, Location, Server, Transfer-Encoding, Range-Unit"
describe "postflight request" $
it "allows INFO body through even with CORS request headers present" $ do
r <- request methodOptions "/items" normalCors ""
liftIO $ do
simpleHeaders r `shouldSatisfy` matchHeader
"Access-Control-Allow-Origin" "\\*"
simpleBody r `shouldSatisfy` not . BL.null
| league/postgrest | test/Feature/CorsSpec.hs | mit | 2,823 | 0 | 20 | 726 | 515 | 275 | 240 | -1 | -1 |
module MxML where
import Text.XML.Light
import Control.Monad ((>=>))
import XML
-- common fields
_genericIdentifier, _genericBaseIdentifier, _genericVersion :: Element -> [String]
_genericIdentifier = gP "businessObjectId/identifier"
_genericBaseIdentifier = gP "businessObjectId/baseIdentifier"
_genericVersion = gP "businessObjectId/versionIdentifier/versionRevision/versionNumber"
_genericUdfs :: Element -> [(String, String)]
_genericUdfs = gC "userDefinedField" >=> \udf -> zip (gP "fieldLabel" udf) (gP "fieldValue" udf)
-- properties
mxmlPropertiesDate, mxmlPropertiesTime, mxmlPropertiesUser, mxmlPropertiesGroup :: Element -> [String]
mxmlPropertiesDate = gP "documentProperties/systemDate"
mxmlPropertiesTime = gP "documentProperties/computerTime"
mxmlPropertiesUser = gP "documentProperties/producedBy/user/name"
mxmlPropertiesGroup = gP "documentProperties/producedBy/user/group"
-- events
mxmlEventsAction, mxmlEventsId, mxmlEventsNature :: Element -> [String]
mxmlEventsAction = gP "events/mainEvent/action"
mxmlEventsId = gP "events/mainEvent/object/objectId"
mxmlEventsNature = gP "events/mainEvent/object/objectNature"
-- flows
_mxmlFlows :: Element -> [Element]
_mxmlFlows = gPe "deliverableFlows/deliverableFlow"
mxmlFlowsIdentifier :: Element -> [String]
mxmlFlowsIdentifier = _mxmlFlows >=> _genericIdentifier
mxmlFlowsBaseIdentifier :: Element -> [String]
mxmlFlowsBaseIdentifier = _mxmlFlows >=> _genericBaseIdentifier
mxmlFlowsVersion :: Element -> [String]
mxmlFlowsVersion = _mxmlFlows >=> _genericVersion
_mxmlFlowsSource :: Element -> [Element]
_mxmlFlowsSource = _mxmlFlows >=> gPe "deliverableFlowHeader/flowSource"
_mxmlFlowsFinancialKey :: Element -> [Element]
_mxmlFlowsFinancialKey = _mxmlFlowsSource >=> gC "flowFinancialKey"
mxmlFlowsContractInternalId :: Element -> [String]
mxmlFlowsContractInternalId = _mxmlFlowsFinancialKey >=> gP "producerId/internalId"
mxmlFlowsContractVersion :: Element -> [String]
mxmlFlowsContractVersion = _mxmlFlowsFinancialKey >=> gP "producerId/version"
mxmlFlowsTradeInternalId :: Element -> [String]
mxmlFlowsTradeInternalId = _mxmlFlowsFinancialKey >=> gP "tradeInternalId"
mxmlFlowsTradeLeg :: Element -> [String]
mxmlFlowsTradeLeg = _mxmlFlowsFinancialKey >=> gP "leg"
mxmlFlowsEventType :: Element -> [String]
mxmlFlowsEventType = _mxmlFlowsSource >=> gP "eventId/@mefClass"
mxmlFlowsEventIdentifier :: Element -> [String]
mxmlFlowsEventIdentifier = _mxmlFlowsSource >=> gC "eventId" >=> _genericIdentifier
mxmlFlowsIssuingEventType :: Element -> [String]
mxmlFlowsIssuingEventType = _mxmlFlowsSource >=> gP "issuingEventBody/@mefClass"
mxmlFlowsNettingContributorsId :: Element -> [String]
mxmlFlowsNettingContributorsId = _mxmlFlowsSource >=> gPe "issuingEventBody/eventNetting/deliverableFlowContributors/deliverableFlow" >=> _genericIdentifier
mxmlFlowsTypologies :: Element -> [String]
mxmlFlowsTypologies = _mxmlFlows >=> gP "deliverableFlowHeader/flowCategories/flowTypologies/flowTypology/value"
mxmlFlowsTradeTypology :: Element -> [String]
mxmlFlowsTradeTypology = _mxmlFlows >=> gP "deliverableFlowHeader/flowCategories/tradeTypology"
_mxmlFlowsInputCondition :: Element -> [Element]
_mxmlFlowsInputCondition = _mxmlFlows >=> gC "deliverableFlowInputCondition"
mxmlFlowsValueDate :: Element -> [String]
mxmlFlowsValueDate = _mxmlFlowsInputCondition >=> gP "valueDate"
mxmlFlowsSettlementDate :: Element -> [String]
mxmlFlowsSettlementDate = _mxmlFlowsInputCondition >=> gP "settlementDate"
mxmlFlowsOriginatingParty :: Element -> [String]
mxmlFlowsOriginatingParty = _mxmlFlowsInputCondition >=> gP "originatingParty/partyName"
mxmlFlowsBeneficiaryParty :: Element -> [String]
mxmlFlowsBeneficiaryParty = _mxmlFlowsInputCondition >=> gP "beneficiaryParty/partyName"
mxmlFlowsTradeParty :: Element -> [String]
mxmlFlowsTradeParty = _mxmlFlowsInputCondition >=> gP "tradeParty/partyName"
mxmlFlowsEntity :: Element -> [String]
mxmlFlowsEntity = _mxmlFlowsInputCondition >=> gP "entity"
_mxmlFlowsCash :: Element -> [Element]
_mxmlFlowsCash = _mxmlFlows >=> gPe "deliverableFlowBody/flowCash"
mxmlFlowsPortfolio :: Element -> [String]
mxmlFlowsPortfolio = _mxmlFlowsCash >=> gP "portfolio/businessObjectId/displayLabel"
mxmlFlowsDirection :: Element -> [String]
mxmlFlowsDirection = _mxmlFlowsCash >=> gP "flowSendReceive"
mxmlFlowsAmount :: Element -> [String]
mxmlFlowsAmount = _mxmlFlowsCash >=> gP "flowAmount"
_mxmlFlowsAccountingData :: Element -> [Element]
_mxmlFlowsAccountingData = _mxmlFlowsCash >=> gC "flowAccountingData"
mxmlFlowsTradeFamily :: Element -> [String]
mxmlFlowsTradeFamily = _mxmlFlowsAccountingData >=> gP "tradeFamily"
mxmlFlowsTradeGroup :: Element -> [String]
mxmlFlowsTradeGroup = _mxmlFlowsAccountingData >=> gP "tradeGroup"
mxmlFlowsTradeInstrument :: Element -> [String]
mxmlFlowsTradeInstrument = _mxmlFlowsAccountingData >=> gP "instrument"
_mxmlFlowsSettlements :: Element -> [Element]
_mxmlFlowsSettlements = _mxmlFlowsCash >=> gC "flowSettlements"
_mxmlFlowsNostro :: Element -> [Element]
_mxmlFlowsNostro = _mxmlFlowsSettlements >=> gC "nostroSettlement"
_mxmlFlowsVostro :: Element -> [Element]
_mxmlFlowsVostro = _mxmlFlowsSettlements >=> gC "vostroSettlement"
mxmlFlowsNostroReference :: Element -> [String]
mxmlFlowsNostroReference = _mxmlFlowsNostro >=> gP "settlementReference"
mxmlFlowsVostroReference :: Element -> [String]
mxmlFlowsVostroReference = _mxmlFlowsVostro >=> gP "settlementReference"
mxmlFlowsNostroUdfs :: Element -> [(String, String)]
mxmlFlowsNostroUdfs = _mxmlFlowsNostro >=> gC "userDefinedFields" >=> _genericUdfs
mxmlFlowsVostroUdfs :: Element -> [(String, String)]
mxmlFlowsVostroUdfs = _mxmlFlowsVostro >=> gC "userDefinedFields" >=> _genericUdfs
mxmlFlowsCurrency = _mxmlFlowsCash >=> gP "flowCurrency"
-- contract events
_mxmlContractEvents :: Element -> [Element]
_mxmlContractEvents = gPe "contractEvents/contractEvent"
mxmlContractEventsIdentifier :: Element -> [String]
mxmlContractEventsIdentifier = _mxmlContractEvents >=> _genericIdentifier
mxmlContractEventsEventType :: Element -> [String]
mxmlContractEventsEventType = _mxmlContractEvents >:> gA "mefClass"
_mxmlContractEventsInputBy :: Element -> [Element]
_mxmlContractEventsInputBy = _mxmlContractEvents >=> gPe "inputConditions/inputBy"
mxmlContractEventsUser :: Element -> [String]
mxmlContractEventsUser = _mxmlContractEventsInputBy >=> gP "userName"
mxmlContractEventsGroup :: Element -> [String]
mxmlContractEventsGroup = _mxmlContractEventsInputBy >=> gP "group"
_mxmlContractEventsTargetReference :: Element -> [Element]
_mxmlContractEventsTargetReference = _mxmlContractEvents >=> gPe "contractEventTargetReferences/contractEventTargetReference/contractReference"
mxmlContractEventsTargetContractIdentifier :: Element -> [String]
mxmlContractEventsTargetContractIdentifier = _mxmlContractEventsTargetReference >=> _genericIdentifier
mxmlContractEventsTargetContractBaseIdentifier :: Element -> [String]
mxmlContractEventsTargetContractBaseIdentifier = _mxmlContractEventsTargetReference >=> _genericBaseIdentifier
mxmlContractEventsTargetContractVersion :: Element -> [String]
mxmlContractEventsTargetContractVersion = _mxmlContractEventsTargetReference >=> _genericVersion
_mxmlContractEventsHeader :: Element -> [Element]
_mxmlContractEventsHeader = _mxmlContractEvents >=> gC "contractEventHeader"
mxmlContractEventsBaseIdentifier :: Element -> [String]
mxmlContractEventsBaseIdentifier = _mxmlContractEventsHeader >=> gC "contractEventId" >=> _genericBaseIdentifier
mxmlContractEventsVersion :: Element -> [String]
mxmlContractEventsVersion = _mxmlContractEventsHeader >=> gC "contractEventId" >=> _genericVersion
mxmlContractEventsDate :: Element -> [String]
mxmlContractEventsDate = _mxmlContractEventsHeader >=> gP "contractEventDate"
_mxmlContractEventsSource :: Element -> [Element]
_mxmlContractEventsSource = _mxmlContractEventsHeader >=> gC "contractEventSource"
mxmlContractEventsSourceModule :: Element -> [String]
mxmlContractEventsSourceModule = _mxmlContractEventsSource >=> gP "sourceModule"
_mxmlContractEventsImpacts :: Element -> [Element]
_mxmlContractEventsImpacts = _mxmlContractEvents >=> gPe "contractEventImpacts/contractEventImpact"
mxmlContractEventsImpactsType :: Element -> [String]
mxmlContractEventsImpactsType = _mxmlContractEventsImpacts >:> gA "mefClass"
mxmlContractEventsImpactsIdentifier :: Element -> [String]
mxmlContractEventsImpactsIdentifier = _mxmlContractEventsImpacts >=> gP "contractEventImpactHeader/contractEventImpactId/internalId"
mxmlContractEventsTargetTradeIdentifier :: Element -> [String]
mxmlContractEventsTargetTradeIdentifier = _mxmlContractEventsImpacts >=> gP "tradeReference/tradeId/tradeInternalId"
-- contracts
_mxmlContracts :: Element -> [Element]
_mxmlContracts = gPe "contracts/contract"
mxmlContractsIdentifier :: Element -> [String]
mxmlContractsIdentifier = _mxmlContracts >=> _genericIdentifier
mxmlContractsBaseIdentifier :: Element -> [String]
mxmlContractsBaseIdentifier = _mxmlContracts >=> _genericBaseIdentifier
mxmlContractsVersion :: Element -> [String]
mxmlContractsVersion = _mxmlContracts >=> _genericVersion
mxmlContractsTypology :: Element -> [String]
mxmlContractsTypology = _mxmlContracts >=> gP "contractHeader/contractCategory/typology"
_mxmlContractsSource :: Element -> [Element]
_mxmlContractsSource = _mxmlContracts >=> gPe "contractHeader/contractSource"
mxmlContractsSourceModule :: Element -> [String]
mxmlContractsSourceModule = _mxmlContractsSource >=> gP "sourceModule"
mxmlContractsLastEventType :: Element -> [String]
mxmlContractsLastEventType = _mxmlContractsSource >=> gP "lastContractEventReference/@mefClass"
mxmlContractsLastEventReference :: Element -> [String]
mxmlContractsLastEventReference = _mxmlContractsSource >=> gP "lastContractEventReference/contractEventId/internalId"
_mxmlContractsLastActor :: Element -> [Element]
_mxmlContractsLastActor = _mxmlContractsSource >=> gPe "workflowParties/wopLastActor"
mxmlContractsLastActorUser :: Element -> [String]
mxmlContractsLastActorUser = _mxmlContractsLastActor >=> gP "name"
mxmlContractsLastActorGroup :: Element -> [String]
mxmlContractsLastActorGroup = _mxmlContractsLastActor >=> gP "group"
-- trades
_mxmlTrades :: Element -> [Element]
_mxmlTrades = gPe "trades/trade"
mxmlTradesIdentifier :: Element -> [String]
mxmlTradesIdentifier = _mxmlTrades >=> _genericIdentifier
mxmlTradesBaseIdentifier :: Element -> [String]
mxmlTradesBaseIdentifier = _mxmlTrades >=> _genericBaseIdentifier
mxmlTradesVersion :: Element -> [String]
mxmlTradesVersion = _mxmlTrades >=> _genericVersion
mxmlTradesParties :: Element -> [String]
mxmlTradesParties = _mxmlTrades >=> gP "parties/party/partyName"
mxmlTradesPortfolios :: Element -> [String]
mxmlTradesPortfolios = _mxmlTrades >=> gP "portfolios/portfolio/portfolioLabel"
_mxmlTradesHeader :: Element -> [Element]
_mxmlTradesHeader = _mxmlTrades >=> gC "tradeHeader"
mxmlTradesDate :: Element -> [String]
mxmlTradesDate = _mxmlTradesHeader >=> gP "tradeDate"
_mxmlTradesCategory :: Element -> [Element]
_mxmlTradesCategory = _mxmlTradesHeader >=> gC "tradeCategory"
mxmlTradesDestination :: Element -> [String]
mxmlTradesDestination = _mxmlTradesCategory >=> gP "tradeDestination"
mxmlTradesTypology :: Element -> [String]
mxmlTradesTypology = _mxmlTradesCategory >=> gP "typology"
mxmlTradesFamily :: Element -> [String]
mxmlTradesFamily = _mxmlTradesCategory >=> gP "tradeFamily"
mxmlTradesGroup :: Element -> [String]
mxmlTradesGroup = _mxmlTradesCategory >=> gP "tradeGroup"
mxmlTradesType :: Element -> [String]
mxmlTradesType = _mxmlTradesCategory >=> gP "tradeType"
mxmlTradesUdfs :: Element -> [(String, String)]
mxmlTradesUdfs = _mxmlTradesHeader >=> gC "tradeUserDefinedFields" >=> _genericUdfs
mxmlTradesGlobalId :: Element -> [String]
mxmlTradesGlobalId = _mxmlTradesHeader >=> gP "tradeViews/tradeView/tradeId/tradeGlobalId"
_mxmlTradesSettlementFlows :: Element -> [Element]
_mxmlTradesSettlementFlows = _mxmlTrades >=> gPe "tradeBody/*/settlement/settlementFlow/flow"
mxmlTradesSettlementFlowsDate :: Element -> [String]
mxmlTradesSettlementFlowsDate = _mxmlTradesSettlementFlows >=> gP "date"
mxmlTradesSettlementFlowsAmount :: Element -> [String]
mxmlTradesSettlementFlowsAmount = _mxmlTradesSettlementFlows >=> gP "amount"
mxmlTradesSettlementFlowsCurrency :: Element -> [String]
mxmlTradesSettlementFlowsCurrency = _mxmlTradesSettlementFlows >=> gP "currency"
_mxmlTradesStreams :: Element -> [Element]
_mxmlTradesStreams = _mxmlTrades >=> gPe "tradeBody/*/stream"
_mxmlTradesStreamsTemplate :: Element -> [Element]
_mxmlTradesStreamsTemplate = _mxmlTradesStreams >=> gC "streamTemplate"
mxmlTradesStreamsFixFloat :: Element -> [String]
mxmlTradesStreamsFixFloat = _mxmlTradesStreamsTemplate >=> gP "payoutType"
mxmlTradesStreamsCurrency :: Element -> [String]
mxmlTradesStreamsCurrency = _mxmlTradesStreamsTemplate >=> gP "paymentCurrency"
mxmlTradesStreamsSettlement :: Element -> [String]
mxmlTradesStreamsSettlement = _mxmlTradesStreamsTemplate >=> gP "settlementNature"
mxmlTradesStreamsPayReceive :: Element -> [String]
mxmlTradesStreamsPayReceive = _mxmlTradesStreams >=> gP "payReceive"
mxmlTradesStreamsEffectiveDate :: Element -> [String]
mxmlTradesStreamsEffectiveDate = _mxmlTradesStreams >=> gP "effectiveDate"
mxmlTradesStreamsMaturity :: Element -> [String]
mxmlTradesStreamsMaturity = _mxmlTradesStreams >=> gP "maturity"
mxmlTradesStreamsCapitalInitial :: Element -> [String]
mxmlTradesStreamsCapitalInitial = _mxmlTradesStreams >=> gP "capital/initialCapitalAmount"
_mxmlTradesStreamsInterestFlows :: Element -> [[Element]]
_mxmlTradesStreamsInterestFlows = _mxmlTradesStreams >=> gPe "cashFlows/interestFlows" >:> gC "interestPaymentPeriod"
mxmlTradesStreamsInterestFlowsCalculationStartDate :: Element -> [[String]]
mxmlTradesStreamsInterestFlowsCalculationStartDate = map ((=<<) (gP "calculationPeriod/calculationStartDate")) . _mxmlTradesStreamsInterestFlows
mxmlTradesStreamsInterestFlowsCalculationEndDate :: Element -> [[String]]
mxmlTradesStreamsInterestFlowsCalculationEndDate = map ((=<<) (gP "calculationPeriod/calculationEndDate")) . _mxmlTradesStreamsInterestFlows
mxmlTradesStreamsInterestFlowsCalculationNotional :: Element -> [[String]]
mxmlTradesStreamsInterestFlowsCalculationNotional = map ((=<<) (gP "calculationPeriod/notionalAmount")) . _mxmlTradesStreamsInterestFlows
mxmlTradesStreamsInterestFlowsPaymentDate :: Element -> [[String]]
mxmlTradesStreamsInterestFlowsPaymentDate = map ((=<<) (gP "paymentDate")) . _mxmlTradesStreamsInterestFlows
mxmlTradesStreamsInterestFlowsAmount :: Element -> [[String]]
mxmlTradesStreamsInterestFlowsAmount = map ((=<<) (gP "interestFlow")) . _mxmlTradesStreamsInterestFlows
mxmlTradesStreamsInterestFlowsCurrency :: Element -> [[String]]
mxmlTradesStreamsInterestFlowsCurrency = map ((=<<) (gP "currency")) . _mxmlTradesStreamsInterestFlows
mxmlTradesStreamsInterestFlowsCoupon :: Element -> [[String]]
mxmlTradesStreamsInterestFlowsCoupon = map ((=<<) (gP "coupon")) . _mxmlTradesStreamsInterestFlows
_mxmlTradesSi :: Element -> [Element]
_mxmlTradesSi = _mxmlTrades >=> gPe "settlementInstructions/settlementInstruction"
_mxmlTradesSiKey :: Element -> [Element]
_mxmlTradesSiKey = _mxmlTradesSi >=> gC "settlementInstructionKey"
mxmlTradesSiSign :: Element -> [String]
mxmlTradesSiSign = _mxmlTradesSiKey >=> gP "flowSign"
mxmlTradesSiCurrency :: Element -> [String]
mxmlTradesSiCurrency = _mxmlTradesSiKey >=> gP "flowCurrency"
mxmlTradesSiNature :: Element -> [String]
mxmlTradesSiNature = _mxmlTradesSiKey >=> gP "flowNature"
mxmlTradesSiSettlement :: Element -> [String]
mxmlTradesSiSettlement = _mxmlTradesSiKey >=> gP "settlementType"
_mxmlTradesSiDescription :: Element -> [Element]
_mxmlTradesSiDescription = _mxmlTradesSi >=> gC "settlementInstructionDescription"
mxmlTradesSiNostroReference :: Element -> [String]
mxmlTradesSiNostroReference = _mxmlTradesSiDescription >=> gP "nostroReferenceId"
mxmlTradesSiVostroReference :: Element -> [String]
mxmlTradesSiVostroReference = _mxmlTradesSiDescription >=> gP "vostroReferenceId"
mxmlTradesSiNostroUdfs :: Element -> [(String, String)]
mxmlTradesSiNostroUdfs = _mxmlTradesSi >=> gC "nostroInstructions" >=> _genericUdfs
mxmlTradesSiVostroUdfs :: Element -> [(String, String)]
mxmlTradesSiVostroUdfs = _mxmlTradesSi >=> gC "vostroInstructions" >=> _genericUdfs
_mxmlTradesEvaluationFlows :: Element -> [Element]
_mxmlTradesEvaluationFlows = _mxmlTrades >=> gPe "evaluationFlows/evaluationFlow"
_mxmlTradesEvaluationFlowsFlow :: Element -> [Element]
_mxmlTradesEvaluationFlowsFlow = _mxmlTradesEvaluationFlows >=> gC "flow"
mxmlTradesEvaluationFlowsDate :: Element -> [String]
mxmlTradesEvaluationFlowsDate = _mxmlTradesEvaluationFlowsFlow >=> gP "date"
mxmlTradesEvaluationFlowsAmount :: Element -> [String]
mxmlTradesEvaluationFlowsAmount = _mxmlTradesEvaluationFlowsFlow >=> gP "amount"
mxmlTradesEvaluationFlowsCurrency :: Element -> [String]
mxmlTradesEvaluationFlowsCurrency = _mxmlTradesEvaluationFlowsFlow >=> gP "currency"
_mxmlTradesEvaluationFlowsTransactions :: Element -> [Element]
_mxmlTradesEvaluationFlowsTransactions = _mxmlTradesEvaluationFlows >=> gPe "flowBody/flow_transaction"
mxmlTradesEvaluationFlowsLeg :: Element -> [String]
mxmlTradesEvaluationFlowsLeg = _mxmlTradesEvaluationFlowsTransactions >=> gP "leg"
--
mxmlTradesEvaluationFlowsTypology :: Element -> [[String]]
mxmlTradesEvaluationFlowsTypology = _mxmlTradesEvaluationFlows >:> gP "flowTypologies/flowTypology/value"
_mxmlTradesVersions :: Element -> [Element]
_mxmlTradesVersions = _mxmlTrades >=> gPe "tradeVersions/tradeVersion"
mxmlTradesVersionsIdentifier :: Element -> [String]
mxmlTradesVersionsIdentifier = _mxmlTradesVersions >=> _genericIdentifier
mxmlTradesVersionsEventType :: Element -> [String]
mxmlTradesVersionsEventType = _mxmlTradesVersions >=> gP "contractEventReference/@mefClass" | ljedrz/haskell | MxML.hs | cc0-1.0 | 18,020 | 20 | 10 | 1,699 | 3,487 | 1,916 | 1,571 | 278 | 1 |
module Probability.Independence.Terms where
import Notes
makeDefs [
"independent"
, "dependent"
, "positive dependence"
, "negative dependence"
, "pairwise independent"
, "mutually independent"
, "conditionally independent"
]
| NorfairKing/the-notes | src/Probability/Independence/Terms.hs | gpl-2.0 | 272 | 0 | 6 | 72 | 37 | 23 | 14 | -1 | -1 |
module Main (
main
) where
import Test.Framework
import Test.Framework.Options
import Test.Framework.Runners.Options
import Data.Monoid (mempty)
import Test.Framework.Providers.QuickCheck2
import Test.Framework.Providers.HUnit
import Data.CycleRoll.Internal.LCPTest as LCPTest
import Data.CycleRoll.Internal.SuffixArrayTest as SATest
import Data.CycleRoll.Internal.RSequence.NodeTest as RSeqNodeTest
import Data.CycleRoll.Internal.SubSeqTest as SubSeqTest
import Data.CycleRoll.Internal.PrepareTest as PrepareTest
import Data.CycleRoll.Test as CycleRollTest
main :: IO ()
main = do
let empty_test_opts = mempty :: TestOptions
let my_test_opts = empty_test_opts {
--topt_maximum_test_size = Just 99,
topt_maximum_generated_tests = Just 9999
}
let empty_runner_opts = mempty :: RunnerOptions
let my_runner_opts = empty_runner_opts {
ropt_test_options = Just my_test_opts
}
defaultMainWithOpts tests my_runner_opts
tests :: [Test]
tests = [
SATest.group,
LCPTest.group,
RSeqNodeTest.group,
SubSeqTest.group,
PrepareTest.group,
CycleRollTest.group
]
| cantora/cycle-roll | test/MainTestSuite.hs | gpl-3.0 | 1,102 | 0 | 12 | 158 | 236 | 146 | 90 | 31 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Clippy.ES where
import Clippy (hashYankHex, hashSnippetHex)
import Clippy.Types
import Data.Aeson (eitherDecode)
import Data.Text (Text, pack)
import Data.Time.Clock (getCurrentTime)
import Database.Bloodhound
import Network.HTTP.Client
testServer :: Server
testServer = Server "http://localhost:9200"
clippyIndex :: IndexName
clippyIndex = IndexName "clippy"
yankMapping :: MappingName
yankMapping = MappingName "yank"
snippetMapping :: MappingName
snippetMapping = MappingName "snippet"
withBH' :: BH IO a -> IO a
withBH' = withBH defaultManagerSettings testServer
insertDummy :: IO Reply
insertDummy = insertYank' . dummyYank =<< getCurrentTime
insertYank :: Yank -> BH IO Reply
insertYank y = indexDocument clippyIndex yankMapping y (DocId . hashYankHex $ y)
insertYank' :: Yank -> IO Reply
insertYank' = withBH' . insertYank
searchYank :: Text -> BH IO Reply
searchYank q = searchByIndex clippyIndex $ mkSearch (Just query) Nothing
where query = QueryMatchQuery $ mkMatchQuery (FieldName "yankContent") (QueryString q)
searchYank' :: YankSearchFilter -> IO [Yank]
searchYank' (YankSearchFilter amount q) =
fmap (take amount . decodeSearch . responseBody) results
where results = withBH' $ searchYank q
extractHits = fmap hitSource . hits . searchHits
decodeSearch resp = case eitherDecode resp of
Right x -> extractHits x
Left _ -> []
insertSnippet :: Snippet -> BH IO Reply
insertSnippet s = indexDocument clippyIndex snippetMapping s (DocId . hashSnippetHex $ s)
insertSnippet' :: Snippet -> IO Reply
insertSnippet' = withBH' . insertSnippet
searchSnippet :: Language -> Text -> BH IO Reply
searchSnippet language q = searchByIndex clippyIndex $ mkSearch (Just query) (Just filter')
where query = QueryMatchQuery $ mkMatchQuery (FieldName "snippetContent") (QueryString q)
filter' = BoolFilter $ MustMatch (Term "snippetLanguage" (pack (show language))) False
searchSnippet' :: SnippetSearchFilter -> IO [Snippet]
searchSnippet' (SnippetSearchFilter amount language q) =
fmap (take amount . decodeSearch . responseBody) results
where results = withBH' $ searchSnippet language q
extractHits = fmap hitSource . hits . searchHits
decodeSearch resp = case eitherDecode resp of
Right x -> extractHits x
Left _ -> []
| kRITZCREEK/clippy-api | clippy-lib/Clippy/ES.hs | gpl-3.0 | 2,510 | 0 | 14 | 532 | 717 | 365 | 352 | 53 | 2 |
import qualified Language.Haskell.Exts.Parser as Parser
import Language.Haskell.Exts
import Data.Foldable
import Text.Show
main :: IO ()
main = do
-- let files = ["simple2.hs", "simple3.hs", "example_empty_python_method2.hs","FakeAst.hs","simple4a.hs","simple.dump-parsed-ast4.hs","example_empty_python_method_call.hs","simple0.dump-parsed-ast2.hs","simple4.dump-parsed-ast.hs","simple.dump-parsed-ast5.hs","example_empty_python_method.hs","simple0.dump-parsed-ast.hs","simple4.hs","simple.dump-parsed-ast.hs","example_python_ast_in_haskell.hs","simple0.hs","simple5.dump-parsed-ast.hs","simple.hs","example_simple_python_method_ast.hs","simple2.dump-parsed-ast.hs","simple5.hs","template_haskell.hs","FakeAst2.hs","simple2.hs","simple6.dump-parsed-ast.hs","test_gch.hs","FakeAst3.hs","simple2i.hs","simple6.hs","test_haskell1.hs","FakeAst4.hs","simple3.dump-parsed-ast.hs","simple.dump-parsed-ast2.hs","test_list.hs","FakeAst5.hs","simple3.hs","simple.dump-parsed-ast3.hs","testlist.hs" ]
let files = [
"test_haskell1_a.hs"
--"test_haskell1_a1.hs" , "test_haskell1_a1.hs_tmp.hs", "test_haskell1_a.hs_tmp.hs"
--"test_haskell1_a1.hs_tmp.hs_tmp.hs"
]
forM_ files $ \s -> do
f <- readFile s
let parseMode = defaultParseMode { parseFilename = s }
let p = Parser.parseModuleWithMode parseMode f
case p of
ParseOk res -> do
let out_file = s ++ "_tmp.hs"
let show_string = "module Foo where\n" ++
"import Language.Haskell.Exts.Syntax\n" ++
"import Language.Haskell.Exts.SrcLoc\n" ++
"f x =" ++ show res
writeFile out_file show_string
_ -> print "wtf"
--print p
--let p2 = Parser.parseModuleWithMode parseMode show_string
--let show_string2 = show p2
-- let p3 = Parser.parseModuleWithMode parseMode show_string2
-- let show_string3 = show p3
-- let p4 = Parser.parseModuleWithMode parseMode show_string3
-- let show_string4 = show p4
-- let p5 = Parser.parseModuleWithMode parseMode show_string4
-- let show_string5 = show p5
-- let p6 = Parser.parseModuleWithMode parseMode show_string5
-- let show_string6 = show p6
| h4ck3rm1k3/gcc-ontology | tests/parse_exts.hs | gpl-3.0 | 2,230 | 0 | 22 | 385 | 200 | 106 | 94 | 21 | 2 |
length :: [a] -> Const Int a
length [] = Const 0
length (x:xs) = Const (1 + unConst (length xs)) | hmemcpy/milewski-ctfp-pdf | src/content/1.10/code/haskell/snippet12.hs | gpl-3.0 | 96 | 0 | 10 | 20 | 65 | 32 | 33 | 3 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Schema
( AllowNewer(..)
, ByteString
, Checkmark(..)
, CommitId(..)
, GlobalVars.GlobalVar(..)
, Hash(..)
, HashDigest
, ImplFilter
, ImplType(..)
, Model
, Percentage(..)
, PersistValue(..)
, toPersistValue
, Text
, module Schema.Algorithm
, module Schema.Dataset
, module Schema.External
, module Schema.Graph
, module Schema.Implementation
, module Schema.Import
, module Schema.Model
, module Schema.ModelMetadata
, module Schema.Platform
, module Schema.Properties
, module Schema.Run
, module Schema.RunConfig
, module Schema.Timers
, module Schema.UnknownPredictions
, module Schema.Variant
, module Schema.VariantConfig
, optimalImplId
, bestNonSwitchingImplId
, getPredictorImplId
, getAlgoName
, getImplName
, getExternalName
, getModelName
, getTypeName
, mkPercentage
, percent
, renderPercentage
, toImplNames
, schemaVersion
, currentSchema
, updateSchemaToVersion
, updateIndicesToVersion
, validRational
) where
import Control.Monad.Logger (LoggingT, MonadLogger)
import Control.Monad.Trans.Resource (ResourceT)
import Data.ByteString (ByteString)
import Data.Int (Int64)
import Data.IntMap (IntMap)
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Database.Persist.Sql
(Checkmark(..), EntityDef, Migration, PersistValue(..), toPersistValue)
import Model (Model)
import Schema.Utils (MonadThrow, mkMigration, getTypeName)
import Sql.Core (MonadSql, SqlT, Transaction, fromSqlKey)
import Types
import Utils.Pair (Pair, toPair)
import Schema.Algorithm hiding (migrations, schema)
import qualified Schema.Algorithm as Algorithm
import Schema.Dataset hiding (migrations, schema)
import qualified Schema.Dataset as Dataset
import Schema.External hiding (migrations, schema, schema')
import qualified Schema.External as External
import qualified Schema.GlobalVars as GlobalVars
import Schema.Graph hiding (migrations, schema)
import qualified Schema.Graph as Graph
import Schema.Implementation hiding (migrations, schema)
import qualified Schema.Implementation as Implementation
import Schema.Import
import Schema.Indices (updateIndicesToVersion)
import Schema.Model hiding (migrations, schema)
import qualified Schema.Model as Model
import Schema.ModelMetadata hiding (migrations, schema)
import qualified Schema.ModelMetadata as ModelMetadata
import Schema.Platform hiding (migrations, schema)
import qualified Schema.Platform as Platform
import Schema.Properties hiding (migrations, schema)
import qualified Schema.Properties as Properties
import Schema.Run hiding (migrations, schema, schema')
import qualified Schema.Run as Run
import Schema.RunConfig hiding (migrations, schema)
import qualified Schema.RunConfig as RunConfig
import Schema.Timers hiding (migrations, schema, schema')
import qualified Schema.Timers as Timers
import Schema.UnknownPredictions hiding (migrations, schema, schema')
import qualified Schema.UnknownPredictions as UnknownPredictions
import Schema.Variant hiding (migrations, schema, schema')
import qualified Schema.Variant as Variant
import Schema.VariantConfig hiding (migrations, schema)
import qualified Schema.VariantConfig as VariantConfig
import Schema.Version (schemaVersion)
type ImplFilter = IntMap Implementation -> IntMap Implementation
optimalImplId :: Integral n => n
optimalImplId = -1
bestNonSwitchingImplId :: Integral n => n
bestNonSwitchingImplId = -2
getPredictorImplId :: Integral n => Key PredictionModel -> n
getPredictorImplId modelId = -3 - fromIntegral (fromSqlKey modelId)
getAlgoName :: Algorithm -> Text
getAlgoName Algorithm{algorithmName,algorithmPrettyName} =
fromMaybe algorithmName algorithmPrettyName
getImplName :: Implementation -> Text
getImplName Implementation{implementationName,implementationPrettyName} =
fromMaybe implementationName implementationPrettyName
getExternalName :: ExternalImpl -> Text
getExternalName ExternalImpl{externalImplName,externalImplPrettyName} =
fromMaybe externalImplName externalImplPrettyName
getModelName :: PredictionModel -> Text
getModelName PredictionModel{predictionModelName,predictionModelPrettyName} =
fromMaybe predictionModelName predictionModelPrettyName
toImplNames
:: (IntMap Implementation -> IntMap Implementation)
-> (IntMap ExternalImpl -> IntMap ExternalImpl)
-> (IntMap Implementation, IntMap ExternalImpl)
-> Pair (IntMap Text)
toImplNames f g = toPair (fmap getImplName . f) (fmap getExternalName . g)
migrations
:: (MonadLogger m, MonadSql m, MonadThrow m)
=> [([EntityDef], Int64 -> Transaction m [EntityDef])]
migrations =
[ (Platform.schema, Platform.migrations)
, (Dataset.schema, Dataset.migrations)
, (Graph.schema, Graph.migrations)
, (Algorithm.schema, Algorithm.migrations)
, (External.schema, External.migrations)
, (Implementation.schema, Implementation.migrations)
, (Variant.schema, Variant.migrations)
, (Properties.schema, Properties.migrations)
, (RunConfig.schema, RunConfig.migrations)
, (Run.schema, Run.migrations)
, (Timers.schema, Timers.migrations)
, (Model.schema, Model.migrations)
, (ModelMetadata.schema, ModelMetadata.migrations)
, (VariantConfig.schema, VariantConfig.migrations)
, (UnknownPredictions.schema, UnknownPredictions.migrations)
, (GlobalVars.schema, GlobalVars.migrations)
]
type MigrationAction = Transaction (SqlT (ResourceT (LoggingT IO))) [EntityDef]
currentSchema :: Migration
currentSchema = mkMigration $ map fst
(migrations :: [([EntityDef], Int64 -> MigrationAction)])
updateSchemaToVersion
:: (MonadLogger m, MonadSql m, MonadThrow m)
=> Int64 -> Transaction m Migration
updateSchemaToVersion n = mkMigration <$> mapM (($n) . snd) migrations
| merijn/GPU-benchmarks | benchmark-analysis/src/Schema.hs | gpl-3.0 | 5,975 | 0 | 11 | 903 | 1,494 | 911 | 583 | 152 | 1 |
data Car a b y = Car { company :: a
, model :: b
, year :: y
} deriving (Show)
tellCar ::(Show a) => Car String String a -> String
tellCar (Car {company = c, model = m, year = y}) = "This " ++ c ++ " " ++ m ++ " was made in " ++ show y
--tellCar car = "This " ++ company car ++ " " ++ model car ++ " was made in " ++ show (year car)
data Vector a = Vector a a a deriving (Show)
vplus :: (Num t) => Vector t -> Vector t -> Vector t
(Vector i j k) `vplus` (Vector l m n) = Vector (i+l) (j+m) (k+n)
vectMult :: (Num t) => Vector t -> t -> Vector t
(Vector i j k) `vectMult` m = Vector (i*m) (j*m) (k*m)
scalarMult :: (Num t) => Vector t -> Vector t -> t
(Vector i j k) `scalarMult` (Vector l m n) = i*l + j*m + k*n
| lamontu/learning_haskell | type_parameter.hs | gpl-3.0 | 783 | 0 | 9 | 244 | 392 | 209 | 183 | 13 | 1 |
module Data where
import Types
import Functions
chooseCostume :: Bool -> IO (Int, Int)
chooseCostume = pickProp "Which dress? " [("Orange Sequins", -1)
,("Blue Sequins", 1)
,("Purple Sequins", 1)
,("Cyan Jumpsuit", 1)
,("Pink Jumpsuit", -1)
,("Green Jumpsuit", -1)
,("White Leather", -1)
,("Red Leather", 1)
,("Black Leather", 1)
,("See-through", -1)
,("Polish Milkmaid", 1)]
chooseTopic :: Bool -> IO (Int, Int)
chooseTopic = pickProp "Which topic? " [("Peace", -1)
,("Love", 1)
,("Freedom", -1)
,("Cake", 1)
,("Sunshine", 1)
,("Kittens", 1)
,("Internet", 1)
,("Grandma", -1)
,("Football", -1)
,("Europe", -1)]
chooseMusic :: Bool -> IO (Int, Int)
chooseMusic = pickProp "Which genre? " [("Glam Rock", -1)
,("Power Ballad", 1)
,("R&B", 1)
,("’70s Disco", -1)
,("Celtic", 1)
,("Europop", 1)
,("Reggae", -1)
,("50s Rock&Roll", -1)
,("’90s Dance", 1)
,("Country", -1)]
choosePreformer :: Bool -> IO (Int, Int)
choosePreformer = pickProp "Which performer? " [("Long blond hair, woman", 1)
,("Long brown hair, woman", -1)
,("Long red hair, woman", -1)
,("Black, black hair, woman", 1)
,("Punk woman", -1)
,("Blond short hair, woman", 1)
,("Bearded, brown hair, man", 1)
,("Red hair, man", -1)
,("Black, bald, something", 1)
,("Mustache, black hair, man", -1)
,("Bearded, long brown hair, woman", 2)]
chooseExtra :: Bool -> IO (Int, Int)
chooseExtra = pickProp "Which extra? " [("None", 0)
,("Headphones", 1)
,("Red Nose", -1)
,("Contact Lenses", -1)
,("New Teeth", 1)
,("Gold Chain", 1)
,("Studded Collar", -1)
,("Glam Make-up", -1)
,("Sunglasses", 1)]
chooseEffect :: Bool -> IO (Int, Int)
chooseEffect = pickProp "Which gimmick? " [("Bucks Fizz ", 1)
,("Flying", 1)
,("Darkness", -1)
,("Green Screen", -1)
,("Lasers", 1)
,("Riverprance", -1)
,("Candles", -1)
,("Balloons", -1)
,("Rainbow", 1)
,("Smartphone", 1)]
chooseCountry :: Bool -> IO (Int, Ints)
chooseCountry = pickProp "Which country? " [("Utd Kingdom", Ints [10,5,8,3,7,3,1,2,4,2,4,3,3,1])
,("Ireland", Ints [10,5,5,5,5,3,6,5,5,7,4,3,3,4])
,("Israel", Ints [6,6,5,5,5,4,5,5,5,5,3,5,3,5])
,("Malta", Ints [6,6,5,6,5,5,5,5,5,7,6,4,5,2])
,("France", Ints [4,4,4,7,6,8,8,2,3,8,5,3,6,3])
,("Spain", Ints [5,5,5,6,4,7,8,5,4,6,6,5,6,5])
,("Italy", Ints [3,3,5,9,7,6,6,5,4,7,5,5,5,4])
,("Germany", Ints [4,4,5,3,8,4,5,5,4,7,5,4,6,6])
,("Russia", Ints [4,4,5,3,4,6,5,2,9,4,4,10,5,5])
,("Latvia", Ints [3,4,5,3,5,5,5,3,7,3,6,9,3,8])
,("Luxembourg", Ints [1,5,5,6,7,6,5,5,5,5,5,5,5,5])
,("Greece", Ints [4,4,5,5,4,6,8,2,5,5,5,6,5,6])
,("Ukraine", Ints [3,3,5,4,3,3,5,6,10,8,3,6,5,6])
,("Sweden", Ints [9,6,5,3,4,4,5,7,3,4,3,5,5,10])
,("Finland", Ints [8,6,5,4,5,4,5,6,3,4,3,6,3,10])]
| mgoszcz2/eurosong-haskell | Data.hs | gpl-3.0 | 5,879 | 0 | 9 | 3,564 | 1,623 | 1,032 | 591 | 86 | 1 |
module Main where
import Text.ParserCombinators.Parsec (parse)
import Types
import Parser
import Evaluator
main :: IO ()
main = do
p <- getContents
case parse singl "(input)" p of
Left e -> print e >> return ()
Right program -> evaluate program
| krzysz00/singl-haskell | singl.hs | gpl-3.0 | 282 | 0 | 12 | 78 | 93 | 47 | 46 | 11 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Resource.Games.Achievements.UpdateMultiple
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates multiple achievements for the currently authenticated player.
--
-- /See:/ <https://developers.google.com/games/ Google Play Game Services Reference> for @games.achievements.updateMultiple@.
module Network.Google.Resource.Games.Achievements.UpdateMultiple
(
-- * REST Resource
AchievementsUpdateMultipleResource
-- * Creating a Request
, achievementsUpdateMultiple
, AchievementsUpdateMultiple
-- * Request Lenses
, aumXgafv
, aumUploadProtocol
, aumAccessToken
, aumUploadType
, aumPayload
, aumCallback
) where
import Network.Google.Games.Types
import Network.Google.Prelude
-- | A resource alias for @games.achievements.updateMultiple@ method which the
-- 'AchievementsUpdateMultiple' request conforms to.
type AchievementsUpdateMultipleResource =
"games" :>
"v1" :>
"achievements" :>
"updateMultiple" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AchievementUpdateMultipleRequest :>
Post '[JSON] AchievementUpdateMultipleResponse
-- | Updates multiple achievements for the currently authenticated player.
--
-- /See:/ 'achievementsUpdateMultiple' smart constructor.
data AchievementsUpdateMultiple =
AchievementsUpdateMultiple'
{ _aumXgafv :: !(Maybe Xgafv)
, _aumUploadProtocol :: !(Maybe Text)
, _aumAccessToken :: !(Maybe Text)
, _aumUploadType :: !(Maybe Text)
, _aumPayload :: !AchievementUpdateMultipleRequest
, _aumCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'AchievementsUpdateMultiple' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aumXgafv'
--
-- * 'aumUploadProtocol'
--
-- * 'aumAccessToken'
--
-- * 'aumUploadType'
--
-- * 'aumPayload'
--
-- * 'aumCallback'
achievementsUpdateMultiple
:: AchievementUpdateMultipleRequest -- ^ 'aumPayload'
-> AchievementsUpdateMultiple
achievementsUpdateMultiple pAumPayload_ =
AchievementsUpdateMultiple'
{ _aumXgafv = Nothing
, _aumUploadProtocol = Nothing
, _aumAccessToken = Nothing
, _aumUploadType = Nothing
, _aumPayload = pAumPayload_
, _aumCallback = Nothing
}
-- | V1 error format.
aumXgafv :: Lens' AchievementsUpdateMultiple (Maybe Xgafv)
aumXgafv = lens _aumXgafv (\ s a -> s{_aumXgafv = a})
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
aumUploadProtocol :: Lens' AchievementsUpdateMultiple (Maybe Text)
aumUploadProtocol
= lens _aumUploadProtocol
(\ s a -> s{_aumUploadProtocol = a})
-- | OAuth access token.
aumAccessToken :: Lens' AchievementsUpdateMultiple (Maybe Text)
aumAccessToken
= lens _aumAccessToken
(\ s a -> s{_aumAccessToken = a})
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
aumUploadType :: Lens' AchievementsUpdateMultiple (Maybe Text)
aumUploadType
= lens _aumUploadType
(\ s a -> s{_aumUploadType = a})
-- | Multipart request metadata.
aumPayload :: Lens' AchievementsUpdateMultiple AchievementUpdateMultipleRequest
aumPayload
= lens _aumPayload (\ s a -> s{_aumPayload = a})
-- | JSONP
aumCallback :: Lens' AchievementsUpdateMultiple (Maybe Text)
aumCallback
= lens _aumCallback (\ s a -> s{_aumCallback = a})
instance GoogleRequest AchievementsUpdateMultiple
where
type Rs AchievementsUpdateMultiple =
AchievementUpdateMultipleResponse
type Scopes AchievementsUpdateMultiple =
'["https://www.googleapis.com/auth/games"]
requestClient AchievementsUpdateMultiple'{..}
= go _aumXgafv _aumUploadProtocol _aumAccessToken
_aumUploadType
_aumCallback
(Just AltJSON)
_aumPayload
gamesService
where go
= buildClient
(Proxy :: Proxy AchievementsUpdateMultipleResource)
mempty
| brendanhay/gogol | gogol-games/gen/Network/Google/Resource/Games/Achievements/UpdateMultiple.hs | mpl-2.0 | 5,063 | 0 | 18 | 1,152 | 711 | 414 | 297 | 106 | 1 |
module Bindings.Groonga.Types where
{-|
Groonga Command.
Currently, /Command/ = /String/
-}
type Command = String
{-| Groonga Database name -}
type Database = String | haroonga/haroonga | Bindings/Groonga/Types.hs | lgpl-2.1 | 172 | 0 | 4 | 30 | 21 | 15 | 6 | 3 | 0 |
import System.IO
main = do
handle <- openFile "girlfriend.txt" ReadMode
contents <- hGetContents handle
putStr contents
hClose handle
| alexliew/learn_you_a_haskell | code/girlfriend.hs | unlicense | 143 | 0 | 8 | 27 | 45 | 19 | 26 | 6 | 1 |
{-# LANGUAGE OverloadedStrings, FlexibleContexts, ImpredicativeTypes #-}
module Scheme.Evaluator
( eval
, primitiveBindings
) where
import Control.Monad
import Control.Monad.ST
import Data.Maybe
import Data.Either
import qualified Data.Text as T
import Safe
-- Not ideal but should in theory work for now
import System.Random
import Scheme.Types
import Scheme.Env
import Scheme.Primitives
import Debug.Trace
-- TODO: support other like cond/case expressions
eval :: LispEnv s -> LispVal s -> ST s (ThrowsError (LispVal s))
eval _ val@(String _) = return $ Right val
eval _ val@(Number _) = return $ Right val
eval _ val@(Bool _) = return $ Right val
eval env (Atom id') = getVar env id'
eval _ (List [Atom "quote", val]) = return $ Right val
-- TODO: only accept Bool and throw on any other value
eval env (List [Atom "if", pred', conseq, alt]) = do
result <- eval env pred'
case result of
Left _ -> return result
Right val ->
case val of
Bool False -> eval env alt
_ -> eval env conseq
eval env (List [Atom "set!", Atom var, form]) = do
result <- eval env form
case result of
Left _ -> return result
Right val -> setVar env var val
eval env (List [Atom "define", Atom var, form]) = do
result <- eval env form
case result of
Left _ -> return result
Right val -> defineVar env var val
eval env (List (Atom "define" : List (Atom var : params') : body')) =
makeNormalFunc env params' body' >>= defineVar env var
eval env (List (Atom "define" : DottedList (Atom var : params') varargs : body')) =
makeVarargs varargs env params' body' >>= defineVar env var
eval env (List (Atom "lambda" : List params' : body')) =
liftM Right $ makeNormalFunc env params' body'
eval env (List (Atom "lambda" : DottedList params' varargs : body')) =
liftM Right $ makeVarargs varargs env params' body'
eval env (List (Atom "lambda" : varargs@(Atom _) : body')) =
liftM Right $ makeVarargs varargs env [] body'
-- TODO: abstract this out of the eval better later on
eval env (List (Atom "randInt" : val)) = randIntProc env val
eval env (List (function : args)) = do
func <- eval env function
case func of
Left _ -> return func
Right fval -> do
argVals <- mapM (eval env) args
-- TODO: make this better, we just grab the first error and
-- return it up the stack instead of them all
let (err, vals) = partitionEithers argVals
if null err
then apply fval vals
else return $ Left $ headDef (Default "eval safehead") err
eval _ badForm = return $ Left $ BadSpecialForm "Unrecognized special form" (expand badForm)
makeFunc :: Show a => Maybe T.Text -> LispEnv s -> [a] -> [LispVal s] -> ST s (LispVal s)
makeFunc varargs env params' body' = return $ Func (map (T.pack . show) params') varargs body' env
makeNormalFunc :: LispEnv s -> [LispVal s] -> [LispVal s] -> ST s (LispVal s)
makeNormalFunc = makeFunc Nothing
makeVarargs :: LispVal s -> LispEnv s -> [LispVal s] -> [LispVal s] -> ST s (LispVal s)
makeVarargs = makeFunc . Just . T.pack . show
apply :: LispVal s -> [LispVal s] -> ST s (ThrowsError (LispVal s))
apply (PrimitiveFunc func) args = return $ func args
apply (StatefulFunc func) args = func args
apply (Func params' varargs body' closure') args =
if num params' /= num args && isNothing varargs
then return $ Left $ NumArgs (num params') (map expand args)
else envEval params' varargs body' closure' args
-- TODO: this doesn't seem right
apply var (PrimitiveFunc func : args) = return $ func (var : args)
-- Fallthrough - debugging
-- TODO: clean up the trace
apply func args = traceShow ("apply-debug:" :: String, func, args) $ return $ Right func
num :: [a] -> Integer
num = toInteger . length
remainingArgs :: [a] -> [b] -> [b]
remainingArgs params' = drop (length params')
evalBody :: [LispVal s] -> LispEnv s -> ST s (ThrowsError (LispVal s))
evalBody body' env = liftM (lastDef (Left $ Default "evalBody - last")) $ mapM (eval env) body'
envEval :: [T.Text] -> Maybe T.Text -> [LispVal s] -> LispEnv s -> [LispVal s] -> ST s (ThrowsError (LispVal s))
envEval params' varargs body' closure' args = do
env <- bindVars closure' $ zip params' args
env' <- bindVarArgs params' args varargs env
evalBody body' env'
bindVarArgs :: [a] -> [LispVal s] -> Maybe T.Text -> LispEnv s -> ST s (LispEnv s)
bindVarArgs params' args arg env = case arg of
Just argName -> bindVars env [(argName, List $ remainingArgs params' args)]
Nothing -> return env
-- TODO: another semi-hack this probably should be half in primitive and half not for stateful primitives
primitiveBindings :: ST s (LispEnv s)
primitiveBindings = nullEnv >>= flip bindVars (map (makeFunc' PrimitiveFunc) primitives ++ map (makeFunc' StatefulFunc) closurePrimitives)
where makeFunc' constructor (var, func) = (var, constructor func)
-- Primitives that closes over some nested environment
closurePrimitives :: [(T.Text, [LispVal s] -> ST s (ThrowsError (LispVal s)))]
closurePrimitives = [ ("apply", applyProc) ]
-- TODO: need to pattern match []
applyProc :: [LispVal s] -> ST s (ThrowsError (LispVal s))
applyProc [func, List args] = apply func args
applyProc (func : args) = apply func args
applyProc [] = return $ Left $ Default "applyProc booper"
-- TODO: add in support for handling a list vs 2 integers
randIntProc :: LispEnv s -> [LispVal s] -> ST s (ThrowsError (LispVal s))
-- TODO: custom handling to handle being handed an "variable" instead of
-- a hardcoded number to support reuse in define
randIntProc env [Atom n] = do
var <- getVar env n
case var of
Left err -> return $ Left err
Right val -> randIntProc env [val]
randIntProc env [Number n] = do
gen <- getVar env "stdRngGen"
case gen of
Left err -> return $ Left err
Right (Random gen') -> do
let (val, gen'') = randomR (1, n) gen'
_ <- setVar env "stdRngGen" (Random gen'')
return $ Right $ Number val
-- TODO: non-exhaustive pattern matches
Right _ -> return $ Left $ Default "randIntProc booper"
randIntProc _ [badArg] = return $ Left $ TypeMismatch "Number" (expand badArg)
randIntProc _ badArgList = return $ Left $ NumArgs 1 (map expand badArgList)
| pharaun/alldice | src/Scheme/Evaluator.hs | apache-2.0 | 6,458 | 0 | 16 | 1,533 | 2,374 | 1,169 | 1,205 | 117 | 7 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Log.Format
-- Copyright : (C) 2015 Flowbox
-- License : Apache-2.0
-- Maintainer : Wojciech Daniło <wojciech.danilo@gmail.com>
-- Stability : stable
-- Portability : portable
-----------------------------------------------------------------------------
module System.Log.Format where
import System.Log.Log (Log)
import System.Log.Data (Lvl(Lvl), Msg(Msg), Loc(Loc), Time(Time), LocData(LocData), LevelData(LevelData), readData, DataOf, Lookup)
import Data.Time.Clock (UTCTime)
import Data.Time.Format (formatTime)
import Data.Time.Locale.Compat (defaultTimeLocale)
import Text.PrettyPrint.ANSI.Leijen
----------------------------------------------------------------------
-- Formatter
----------------------------------------------------------------------
newtype Formatter a = Formatter { runFormatter :: Log a -> Doc }
mapFormatter f (Formatter a) = Formatter (f a)
instance Show (Formatter a) where
show _ = "Formatter"
----------------------------------------------------------------------
-- FormatBuilder
----------------------------------------------------------------------
class FormatterBuilder a b where
buildFormatter :: a -> Formatter b
(<:>) :: (FormatterBuilder a c, FormatterBuilder b c) => a -> b -> Formatter c
(<:>) a b = concatFormatters (buildFormatter a) (buildFormatter b)
concatFormatters :: Formatter a -> Formatter a -> Formatter a
concatFormatters (Formatter f) (Formatter g) = Formatter (\s -> f s <> g s)
-- === Instances ===
instance (PPrint (DataOf seg), Lookup seg (Log a)) => FormatterBuilder seg a where
buildFormatter a = Formatter $ pprint . readData a
instance (a~b) => FormatterBuilder (Formatter a) b where
buildFormatter = id
instance FormatterBuilder String a where
buildFormatter a = Formatter $ const (text a)
instance FormatterBuilder Doc a where
buildFormatter a = Formatter $ const a
----------------------------------------------------------------------
-- Pretty printing
----------------------------------------------------------------------
class PPrint a where
pprint :: a -> Doc
instance PPrint String where
pprint = text
instance Pretty a => PPrint a where
pprint = pretty
instance Pretty LevelData where
pretty (LevelData _ name) = text name
instance Pretty LocData where
pretty (LocData _ _ m (l,_) _) = text (m ++ ":" ++ show l)
instance Pretty UTCTime where
pretty = text . formatTime defaultTimeLocale "%c"
----------------------------------------------------------------------
-- Basic formatters
----------------------------------------------------------------------
defaultFormatter = colorLvlFormatter ("[" <:> Lvl <:> "] ") <:> Msg
defaultTimeFormatter = colorLvlFormatter ("[" <:> Lvl <:> "] ") <:> Time <:> ": " <:> Msg
defaultFormatterTH = colorLvlFormatter ("[" <:> Lvl <:> "] ") <:> Loc <:> ": " <:> Msg
-- Color formatter
colorLvlFormatter f = Formatter (\s -> let (LevelData pr _) = readData Lvl s in lvlColor pr $ runFormatter f s)
lvlColor lvl
| lvl == 0 = id
| lvl <= 2 = green
| lvl == 3 = yellow
| otherwise = red
| wdanilo/haskell-logger | src/System/Log/Format.hs | apache-2.0 | 3,425 | 0 | 13 | 587 | 860 | 464 | 396 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad (when)
import qualified Data.ByteString.Lazy.Char8 as C8
import Data.Csv
import Data.List.Split
import Data.Maybe (catMaybes, fromJust, fromMaybe, isJust)
import Data.Time.Clock
import Data.Time.Format
import Data.Time.Units
import qualified Data.Vector as V
import System.Environment (getArgs)
import System.Exit (die)
import Text.Read (readMaybe)
data Song = Song {
songNumber :: String
, songTimestamp :: String
, songCoverArt :: String
, songPlayed :: String
, songAlbumArtist :: String
, songAlbum :: String
, songArtist :: String
, songTitle :: String
, songYear :: String
, songRating :: String
, songGenre :: String
, songComposer :: String
, songGrouping :: String
, songTrackNumber :: String
, songKey :: String
, songBPM :: String
, songDuration :: String
, songBitrate :: String
, songReplayGain :: String
, songType :: String
, songDateAdded :: String
, songLocation :: String
, songComment :: String
} deriving (Eq, Show)
instance FromNamedRecord Song where
parseNamedRecord s =
Song
<$> s .: "#"
<*> s .: "Timestamp"
<*> s .: "Cover Art"
<*> s .: "Played"
<*> s .: "Album Artist"
<*> s .: "Album"
<*> s .: "Artist"
<*> s .: "Title"
<*> s .: "Year"
<*> s .: "Rating"
<*> s .: "Genre"
<*> s .: "Composer"
<*> s .: "Grouping"
<*> s .: "Track #"
<*> s .: "Key"
<*> s .: "BPM"
<*> s .: "Duration"
<*> s .: "Bitrate"
<*> s .: "Replay Gain"
<*> s .: "Type"
<*> s .: "Date Added"
<*> s .: "Location"
<*> s .: "Comment"
-- | Attempt to parse time duration into seconds.
parseDuration :: String -> Maybe Integer
parseDuration s =
case splitOn ":" s of
(min:sec:_) -> do
minInteger <- readMaybe min :: Maybe Integer
secInteger <- readMaybe sec :: Maybe Integer
return (fromIntegral (addTime (tm minInteger) (ts secInteger) :: Second))
_ -> Nothing
where
ts :: Integer -> Second
ts = fromIntegral
tm :: Integer -> Minute
tm = fromIntegral
-- | Convert seconds into human readable form.
humanReadableDuration :: Integer -> String
humanReadableDuration i =
let hours = i `div` 3600
minutes = (i - (hours * 3600)) `div` 60
seconds = (i - (hours * 3600) - (minutes * 60))
in show hours ++ "h " ++ show minutes ++ "m " ++ show seconds ++ "s"
-- | Given a vector of songs, parse and add up all the durations, showing the
-- result in human readable form.
totalDurations :: V.Vector Song -> Maybe String
totalDurations v =
let maybeParses = V.map (parseDuration . songDuration) v
in if all isJust maybeParses
then return . humanReadableDuration . V.sum . catVectorMaybes $ maybeParses
else Nothing
where
catVectorMaybes v = V.map fromJust . V.filter isJust $ v
main :: IO ()
main = do
args <- getArgs
when (length args /= 1) $ die "Usage: mixxxcsvlist /path/to/playlist.csv"
let filename = head args
x <- C8.readFile filename
case decodeByName x :: Either String (Header, V.Vector Song) of
Left e -> error (show e)
Right (h, v) -> do
V.mapM_ (putStrLn . prettySongLine) v
putStrLn "----------------------------------------------------"
putStrLn $ "Total Duration: " ++ fromMaybe "Unknown" (totalDurations v)
prettySongLine :: Song -> String
prettySongLine s =
songNumber s ++ ". " ++ songArtist s ++ " - " ++ songTitle s
++ " - " ++ songDuration s
| relrod/mixxxcsvlist | src/Main.hs | bsd-2-clause | 3,497 | 0 | 51 | 822 | 1,078 | 576 | 502 | 106 | 2 |
module MoleculeToAtoms where
import Data.Char
import Data.List
data Token = OpenBracket Char
| CloseBracket Char
| Element String
| Count String
| Invalid | Test0 | Test1 | Test2 | Test3 | Test4 | Test5 | Test6 | Test7 | Test8
deriving Show
unpack (Element s) = s
unpack (Count n) = n
instance Eq Token where
--OpenBracket c1 == OpenBracket c2 = c1 == c2
--CloseBracket c1 == CloseBracket c2 = c1 == c2
--(Element e1) == (Element e2) = e1 == e2
--(Count c1) == (Count c2) = c1 == c2
Invalid == Invalid = True
_ == _ = False
tokenize :: String -> [Token]
tokenize [] = []
tokenize s@(f:fs)
| isDigit f = let (token, rest) = span isDigit s in (Count token):(tokenize rest)
| isUpper f = let (token, rest) = span isLower fs in (Element (f:token)):(tokenize rest)
| f `elem` "({[" = (OpenBracket f):(tokenize fs)
| f == ')' = (CloseBracket '('):(tokenize fs)
| f == '}' = (CloseBracket '{'):(tokenize fs)
| f == ']' = (CloseBracket '['):(tokenize fs)
| otherwise = Invalid:(tokenize fs)
parse :: Char -> [Token] -> [Token] -> ([Token], [Token])
parse b acc [] = if b == ' ' then (acc, []) else ([Invalid], [])
parse b acc (e@(Element _):ts) = parse b (acc ++ [e]) ts
parse b acc ((Count n):ts) = parse b (init acc ++ replicate (read n) (last acc)) ts
parse b acc ((OpenBracket c):ts) = let (parsed, rest) = parse c [] ts
in if null rest then
(acc ++ parsed, [])
else
case head rest of
Count n -> parse b (acc ++ (concat . replicate (read n)) parsed) (tail rest)
_ -> parse b (acc ++ parsed) rest
parse b acc ((CloseBracket c):ts) = if b == c then (acc, ts) else ([Invalid], [])
parse b acc (Invalid:ts) = ([Invalid], [])
parseMolecule :: String -> Either String [(String,Int)]
parseMolecule formula = let expanded = (fst . parse ' ' [] . tokenize) formula
in if Invalid `elem` expanded then
Left "Not a valid molecule"
else
Right ((map (\x -> (head x, length x)) . group . sort . map unpack) expanded)
tokens1 = tokenize "H"
tokens2 = tokenize "O2"
tokens3 = tokenize "H2O"
tokens4 = tokenize "Mg(OH)2"
tokens5 = tokenize "K4[ON(SO3)2]2"
formula = "K4[ON(SO3)2]2"
| lisphacker/codewars | MoleculeToAtoms.hs | bsd-2-clause | 2,663 | 0 | 19 | 986 | 1,011 | 530 | 481 | 47 | 5 |
{-# LANGUAGE CPP, BangPatterns, RecordWildCards, NamedFieldPuns,
ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoMonoLocalBinds #-}
{-# LANGUAGE ConstraintKinds #-}
-- |
--
module Distribution.Client.ProjectBuilding (
-- * Dry run phase
-- | What bits of the plan will we execute? The dry run does not change
-- anything but tells us what will need to be built.
rebuildTargetsDryRun,
improveInstallPlanWithUpToDatePackages,
-- ** Build status
-- | This is the detailed status information we get from the dry run.
BuildStatusMap,
BuildStatus(..),
BuildStatusRebuild(..),
BuildReason(..),
MonitorChangedReason(..),
buildStatusToString,
-- * Build phase
-- | Now we actually execute the plan.
rebuildTargets,
-- ** Build outcomes
-- | This is the outcome for each package of executing the plan.
-- For each package, did the build succeed or fail?
BuildOutcomes,
BuildOutcome,
BuildResult(..),
BuildFailure(..),
BuildFailureReason(..),
) where
import Distribution.Client.PackageHash (renderPackageHashInputs)
import Distribution.Client.RebuildMonad
import Distribution.Client.ProjectConfig
import Distribution.Client.ProjectPlanning
import Distribution.Client.ProjectPlanning.Types
import Distribution.Client.ProjectBuilding.Types
import Distribution.Client.Store
import Distribution.Client.Types
hiding (BuildOutcomes, BuildOutcome,
BuildResult(..), BuildFailure(..))
import Distribution.Client.InstallPlan
( GenericInstallPlan, GenericPlanPackage, IsUnit )
import qualified Distribution.Client.InstallPlan as InstallPlan
import Distribution.Client.DistDirLayout
import Distribution.Client.FileMonitor
import Distribution.Client.SetupWrapper
import Distribution.Client.JobControl
import Distribution.Client.FetchUtils
import Distribution.Client.GlobalFlags (RepoContext)
import qualified Distribution.Client.Tar as Tar
import Distribution.Client.Setup (filterConfigureFlags)
import Distribution.Client.SourceFiles
import Distribution.Client.SrcDist (allPackageSourceFiles)
import Distribution.Client.Utils (removeExistingFile)
import Distribution.Package hiding (InstalledPackageId, installedPackageId)
import qualified Distribution.PackageDescription as PD
import Distribution.InstalledPackageInfo (InstalledPackageInfo)
import qualified Distribution.InstalledPackageInfo as Installed
import Distribution.Simple.BuildPaths (haddockDirName)
import qualified Distribution.Simple.InstallDirs as InstallDirs
import Distribution.Types.BuildType
import Distribution.Simple.Program
import qualified Distribution.Simple.Setup as Cabal
import Distribution.Simple.Command (CommandUI)
import qualified Distribution.Simple.Register as Cabal
import Distribution.Simple.LocalBuildInfo (ComponentName)
import Distribution.Simple.Compiler
( Compiler, compilerId, PackageDB(..) )
import Distribution.Simple.Utils hiding (matchFileGlob)
import Distribution.Version
import Distribution.Verbosity
import Distribution.Text
import Distribution.ParseUtils ( showPWarning )
import Distribution.Compat.Graph (IsNode(..))
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
import qualified Data.ByteString.Lazy as LBS
import Control.Monad
import Control.Exception
import Data.Maybe
import System.FilePath
import System.IO
import System.Directory
------------------------------------------------------------------------------
-- * Overall building strategy.
------------------------------------------------------------------------------
--
-- We start with an 'ElaboratedInstallPlan' that has already been improved by
-- reusing packages from the store, and pruned to include only the targets of
-- interest and their dependencies. So the remaining packages in the
-- 'InstallPlan.Configured' state are ones we either need to build or rebuild.
--
-- First, we do a preliminary dry run phase where we work out which packages
-- we really need to (re)build, and for the ones we do need to build which
-- build phase to start at.
--
-- We use this to improve the 'ElaboratedInstallPlan' again by changing
-- up-to-date 'InstallPlan.Configured' packages to 'InstallPlan.Installed'
-- so that the build phase will skip them.
--
-- Then we execute the plan, that is actually build packages. The outcomes of
-- trying to build all the packages are collected and returned.
--
-- We split things like this (dry run and execute) for a couple reasons.
-- Firstly we need to be able to do dry runs anyway, and these need to be
-- reasonably accurate in terms of letting users know what (and why) things
-- are going to be (re)built.
--
-- Given that we need to be able to do dry runs, it would not be great if
-- we had to repeat all the same work when we do it for real. Not only is
-- it duplicate work, but it's duplicate code which is likely to get out of
-- sync. So we do things only once. We preserve info we discover in the dry
-- run phase and rely on it later when we build things for real. This also
-- somewhat simplifies the build phase. So this way the dry run can't so
-- easily drift out of sync with the real thing since we're relying on the
-- info it produces.
--
-- An additional advantage is that it makes it easier to debug rebuild
-- errors (ie rebuilding too much or too little), since all the rebuild
-- decisions are made without making any state changes at the same time
-- (that would make it harder to reproduce the problem situation).
--
-- Finally, we can use the dry run build status and the build outcomes to
-- give us some information on the overall status of packages in the project.
-- This includes limited information about the status of things that were
-- not actually in the subset of the plan that was used for the dry run or
-- execution phases. In particular we may know that some packages are now
-- definitely out of date. See "Distribution.Client.ProjectPlanOutput" for
-- details.
------------------------------------------------------------------------------
-- * Dry run: what bits of the 'ElaboratedInstallPlan' will we execute?
------------------------------------------------------------------------------
-- Refer to ProjectBuilding.Types for details of these important types:
-- type BuildStatusMap = ...
-- data BuildStatus = ...
-- data BuildStatusRebuild = ...
-- data BuildReason = ...
-- | Do the dry run pass. This is a prerequisite of 'rebuildTargets'.
--
-- It gives us the 'BuildStatusMap'. This should be used with
-- 'improveInstallPlanWithUpToDatePackages' to give an improved version of
-- the 'ElaboratedInstallPlan' with packages switched to the
-- 'InstallPlan.Installed' state when we find that they're already up to date.
--
rebuildTargetsDryRun :: DistDirLayout
-> ElaboratedSharedConfig
-> ElaboratedInstallPlan
-> IO BuildStatusMap
rebuildTargetsDryRun distDirLayout@DistDirLayout{..} shared =
-- Do the various checks to work out the 'BuildStatus' of each package
foldMInstallPlanDepOrder dryRunPkg
where
dryRunPkg :: ElaboratedPlanPackage
-> [BuildStatus]
-> IO BuildStatus
dryRunPkg (InstallPlan.PreExisting _pkg) _depsBuildStatus =
return BuildStatusPreExisting
dryRunPkg (InstallPlan.Installed _pkg) _depsBuildStatus =
return BuildStatusInstalled
dryRunPkg (InstallPlan.Configured pkg) depsBuildStatus = do
mloc <- checkFetched (elabPkgSourceLocation pkg)
case mloc of
Nothing -> return BuildStatusDownload
Just (LocalUnpackedPackage srcdir) ->
-- For the case of a user-managed local dir, irrespective of the
-- build style, we build from that directory and put build
-- artifacts under the shared dist directory.
dryRunLocalPkg pkg depsBuildStatus srcdir
-- The three tarball cases are handled the same as each other,
-- though depending on the build style.
Just (LocalTarballPackage tarball) ->
dryRunTarballPkg pkg depsBuildStatus tarball
Just (RemoteTarballPackage _ tarball) ->
dryRunTarballPkg pkg depsBuildStatus tarball
Just (RepoTarballPackage _ _ tarball) ->
dryRunTarballPkg pkg depsBuildStatus tarball
dryRunTarballPkg :: ElaboratedConfiguredPackage
-> [BuildStatus]
-> FilePath
-> IO BuildStatus
dryRunTarballPkg pkg depsBuildStatus tarball =
case elabBuildStyle pkg of
BuildAndInstall -> return (BuildStatusUnpack tarball)
BuildInplaceOnly -> do
-- TODO: [nice to have] use a proper file monitor rather than this dir exists test
exists <- doesDirectoryExist srcdir
if exists
then dryRunLocalPkg pkg depsBuildStatus srcdir
else return (BuildStatusUnpack tarball)
where
srcdir = distUnpackedSrcDirectory (packageId pkg)
dryRunLocalPkg :: ElaboratedConfiguredPackage
-> [BuildStatus]
-> FilePath
-> IO BuildStatus
dryRunLocalPkg pkg depsBuildStatus srcdir = do
-- Go and do lots of I/O, reading caches and probing files to work out
-- if anything has changed
change <- checkPackageFileMonitorChanged
packageFileMonitor pkg srcdir depsBuildStatus
case change of
-- It did change, giving us 'BuildStatusRebuild' info on why
Left rebuild ->
return (BuildStatusRebuild srcdir rebuild)
-- No changes, the package is up to date. Use the saved build results.
Right buildResult ->
return (BuildStatusUpToDate buildResult)
where
packageFileMonitor =
newPackageFileMonitor distDirLayout (elabDistDirParams shared pkg)
-- | A specialised traversal over the packages in an install plan.
--
-- The packages are visited in dependency order, starting with packages with no
-- dependencies. The result for each package is accumulated into a 'Map' and
-- returned as the final result. In addition, when visting a package, the
-- visiting function is passed the results for all the immediate package
-- dependencies. This can be used to propagate information from dependencies.
--
foldMInstallPlanDepOrder
:: forall m ipkg srcpkg b.
(Monad m, IsUnit ipkg, IsUnit srcpkg)
=> (GenericPlanPackage ipkg srcpkg ->
[b] -> m b)
-> GenericInstallPlan ipkg srcpkg
-> m (Map UnitId b)
foldMInstallPlanDepOrder visit =
go Map.empty . InstallPlan.reverseTopologicalOrder
where
go :: Map UnitId b
-> [GenericPlanPackage ipkg srcpkg]
-> m (Map UnitId b)
go !results [] = return results
go !results (pkg : pkgs) = do
-- we go in the right order so the results map has entries for all deps
let depresults :: [b]
depresults =
map (\ipkgid -> let Just result = Map.lookup ipkgid results
in result)
(InstallPlan.depends pkg)
result <- visit pkg depresults
let results' = Map.insert (nodeKey pkg) result results
go results' pkgs
improveInstallPlanWithUpToDatePackages :: BuildStatusMap
-> ElaboratedInstallPlan
-> ElaboratedInstallPlan
improveInstallPlanWithUpToDatePackages pkgsBuildStatus =
InstallPlan.installed canPackageBeImproved
where
canPackageBeImproved pkg =
case Map.lookup (installedUnitId pkg) pkgsBuildStatus of
Just BuildStatusUpToDate {} -> True
Just _ -> False
Nothing -> error $ "improveInstallPlanWithUpToDatePackages: "
++ display (packageId pkg) ++ " not in status map"
-----------------------------
-- Package change detection
--
-- | As part of the dry run for local unpacked packages we have to check if the
-- package config or files have changed. That is the purpose of
-- 'PackageFileMonitor' and 'checkPackageFileMonitorChanged'.
--
-- When a package is (re)built, the monitor must be updated to reflect the new
-- state of the package. Because we sometimes build without reconfiguring the
-- state updates are split into two, one for package config changes and one
-- for other changes. This is the purpose of 'updatePackageConfigFileMonitor'
-- and 'updatePackageBuildFileMonitor'.
--
data PackageFileMonitor = PackageFileMonitor {
pkgFileMonitorConfig :: FileMonitor ElaboratedConfiguredPackage (),
pkgFileMonitorBuild :: FileMonitor (Set ComponentName) BuildResultMisc,
pkgFileMonitorReg :: FileMonitor () (Maybe InstalledPackageInfo)
}
-- | This is all the components of the 'BuildResult' other than the
-- @['InstalledPackageInfo']@.
--
-- We have to split up the 'BuildResult' components since they get produced
-- at different times (or rather, when different things change).
--
type BuildResultMisc = (DocsResult, TestsResult)
newPackageFileMonitor :: DistDirLayout -> DistDirParams -> PackageFileMonitor
newPackageFileMonitor DistDirLayout{distPackageCacheFile} dparams =
PackageFileMonitor {
pkgFileMonitorConfig =
newFileMonitor (distPackageCacheFile dparams "config"),
pkgFileMonitorBuild =
FileMonitor {
fileMonitorCacheFile = distPackageCacheFile dparams "build",
fileMonitorKeyValid = \componentsToBuild componentsAlreadyBuilt ->
componentsToBuild `Set.isSubsetOf` componentsAlreadyBuilt,
fileMonitorCheckIfOnlyValueChanged = True
},
pkgFileMonitorReg =
newFileMonitor (distPackageCacheFile dparams "registration")
}
-- | Helper function for 'checkPackageFileMonitorChanged',
-- 'updatePackageConfigFileMonitor' and 'updatePackageBuildFileMonitor'.
--
-- It selects the info from a 'ElaboratedConfiguredPackage' that are used by
-- the 'FileMonitor's (in the 'PackageFileMonitor') to detect value changes.
--
packageFileMonitorKeyValues :: ElaboratedConfiguredPackage
-> (ElaboratedConfiguredPackage, Set ComponentName)
packageFileMonitorKeyValues elab =
(elab_config, buildComponents)
where
-- The first part is the value used to guard (re)configuring the package.
-- That is, if this value changes then we will reconfigure.
-- The ElaboratedConfiguredPackage consists mostly (but not entirely) of
-- information that affects the (re)configure step. But those parts that
-- do not affect the configure step need to be nulled out. Those parts are
-- the specific targets that we're going to build.
--
elab_config =
elab {
elabBuildTargets = [],
elabTestTargets = [],
elabReplTarget = Nothing,
elabBuildHaddocks = False
}
-- The second part is the value used to guard the build step. So this is
-- more or less the opposite of the first part, as it's just the info about
-- what targets we're going to build.
--
buildComponents = elabBuildTargetWholeComponents elab
-- | Do all the checks on whether a package has changed and thus needs either
-- rebuilding or reconfiguring and rebuilding.
--
checkPackageFileMonitorChanged :: PackageFileMonitor
-> ElaboratedConfiguredPackage
-> FilePath
-> [BuildStatus]
-> IO (Either BuildStatusRebuild BuildResult)
checkPackageFileMonitorChanged PackageFileMonitor{..}
pkg srcdir depsBuildStatus = do
--TODO: [nice to have] some debug-level message about file changes, like rerunIfChanged
configChanged <- checkFileMonitorChanged
pkgFileMonitorConfig srcdir pkgconfig
case configChanged of
MonitorChanged monitorReason ->
return (Left (BuildStatusConfigure monitorReason'))
where
monitorReason' = fmap (const ()) monitorReason
MonitorUnchanged () _
-- The configChanged here includes the identity of the dependencies,
-- so depsBuildStatus is just needed for the changes in the content
-- of dependencies.
| any buildStatusRequiresBuild depsBuildStatus -> do
regChanged <- checkFileMonitorChanged pkgFileMonitorReg srcdir ()
let mreg = changedToMaybe regChanged
return (Left (BuildStatusBuild mreg BuildReasonDepsRebuilt))
| otherwise -> do
buildChanged <- checkFileMonitorChanged
pkgFileMonitorBuild srcdir buildComponents
regChanged <- checkFileMonitorChanged
pkgFileMonitorReg srcdir ()
let mreg = changedToMaybe regChanged
case (buildChanged, regChanged) of
(MonitorChanged (MonitoredValueChanged prevBuildComponents), _) ->
return (Left (BuildStatusBuild mreg buildReason))
where
buildReason = BuildReasonExtraTargets prevBuildComponents
(MonitorChanged monitorReason, _) ->
return (Left (BuildStatusBuild mreg buildReason))
where
buildReason = BuildReasonFilesChanged monitorReason'
monitorReason' = fmap (const ()) monitorReason
(MonitorUnchanged _ _, MonitorChanged monitorReason) ->
-- this should only happen if the file is corrupt or been
-- manually deleted. We don't want to bother with another
-- phase just for this, so we'll reregister by doing a build.
return (Left (BuildStatusBuild Nothing buildReason))
where
buildReason = BuildReasonFilesChanged monitorReason'
monitorReason' = fmap (const ()) monitorReason
(MonitorUnchanged _ _, MonitorUnchanged _ _)
| pkgHasEphemeralBuildTargets pkg ->
return (Left (BuildStatusBuild mreg buildReason))
where
buildReason = BuildReasonEphemeralTargets
(MonitorUnchanged buildResult _, MonitorUnchanged _ _) ->
return $ Right BuildResult {
buildResultDocs = docsResult,
buildResultTests = testsResult,
buildResultLogFile = Nothing
}
where
(docsResult, testsResult) = buildResult
where
(pkgconfig, buildComponents) = packageFileMonitorKeyValues pkg
changedToMaybe (MonitorChanged _) = Nothing
changedToMaybe (MonitorUnchanged x _) = Just x
updatePackageConfigFileMonitor :: PackageFileMonitor
-> FilePath
-> ElaboratedConfiguredPackage
-> IO ()
updatePackageConfigFileMonitor PackageFileMonitor{pkgFileMonitorConfig}
srcdir pkg =
updateFileMonitor pkgFileMonitorConfig srcdir Nothing
[] pkgconfig ()
where
(pkgconfig, _buildComponents) = packageFileMonitorKeyValues pkg
updatePackageBuildFileMonitor :: PackageFileMonitor
-> FilePath
-> MonitorTimestamp
-> ElaboratedConfiguredPackage
-> BuildStatusRebuild
-> [MonitorFilePath]
-> BuildResultMisc
-> IO ()
updatePackageBuildFileMonitor PackageFileMonitor{pkgFileMonitorBuild}
srcdir timestamp pkg pkgBuildStatus
monitors buildResult =
updateFileMonitor pkgFileMonitorBuild srcdir (Just timestamp)
monitors buildComponents' buildResult
where
(_pkgconfig, buildComponents) = packageFileMonitorKeyValues pkg
-- If the only thing that's changed is that we're now building extra
-- components, then we can avoid later unnecessary rebuilds by saving the
-- total set of components that have been built, namely the union of the
-- existing ones plus the new ones. If files also changed this would be
-- the wrong thing to do. Note that we rely on the
-- fileMonitorCheckIfOnlyValueChanged = True mode to get this guarantee
-- that it's /only/ the value that changed not any files that changed.
buildComponents' =
case pkgBuildStatus of
BuildStatusBuild _ (BuildReasonExtraTargets prevBuildComponents)
-> buildComponents `Set.union` prevBuildComponents
_ -> buildComponents
updatePackageRegFileMonitor :: PackageFileMonitor
-> FilePath
-> Maybe InstalledPackageInfo
-> IO ()
updatePackageRegFileMonitor PackageFileMonitor{pkgFileMonitorReg}
srcdir mipkg =
updateFileMonitor pkgFileMonitorReg srcdir Nothing
[] () mipkg
invalidatePackageRegFileMonitor :: PackageFileMonitor -> IO ()
invalidatePackageRegFileMonitor PackageFileMonitor{pkgFileMonitorReg} =
removeExistingFile (fileMonitorCacheFile pkgFileMonitorReg)
------------------------------------------------------------------------------
-- * Doing it: executing an 'ElaboratedInstallPlan'
------------------------------------------------------------------------------
-- Refer to ProjectBuilding.Types for details of these important types:
-- type BuildOutcomes = ...
-- type BuildOutcome = ...
-- data BuildResult = ...
-- data BuildFailure = ...
-- data BuildFailureReason = ...
-- | Build things for real.
--
-- It requires the 'BuildStatusMap' gathered by 'rebuildTargetsDryRun'.
--
rebuildTargets :: Verbosity
-> DistDirLayout
-> StoreDirLayout
-> ElaboratedInstallPlan
-> ElaboratedSharedConfig
-> BuildStatusMap
-> BuildTimeSettings
-> IO BuildOutcomes
rebuildTargets verbosity
distDirLayout@DistDirLayout{..}
storeDirLayout
installPlan
sharedPackageConfig@ElaboratedSharedConfig {
pkgConfigCompiler = compiler,
pkgConfigCompilerProgs = progdb
}
pkgsBuildStatus
buildSettings@BuildTimeSettings{
buildSettingNumJobs,
buildSettingKeepGoing
} = do
-- Concurrency control: create the job controller and concurrency limits
-- for downloading, building and installing.
jobControl <- if isParallelBuild
then newParallelJobControl buildSettingNumJobs
else newSerialJobControl
registerLock <- newLock -- serialise registration
cacheLock <- newLock -- serialise access to setup exe cache
--TODO: [code cleanup] eliminate setup exe cache
debug verbosity $
"Executing install plan "
++ if isParallelBuild
then " in parallel using " ++ show buildSettingNumJobs ++ " threads."
else " serially."
createDirectoryIfMissingVerbose verbosity True distBuildRootDirectory
createDirectoryIfMissingVerbose verbosity True distTempDirectory
mapM_ (createPackageDBIfMissing verbosity compiler progdb) packageDBsToUse
-- Before traversing the install plan, pre-emptively find all packages that
-- will need to be downloaded and start downloading them.
asyncDownloadPackages verbosity withRepoCtx
installPlan pkgsBuildStatus $ \downloadMap ->
-- For each package in the plan, in dependency order, but in parallel...
InstallPlan.execute jobControl keepGoing
(BuildFailure Nothing . DependentFailed . packageId)
installPlan $ \pkg ->
--TODO: review exception handling
handle (\(e :: BuildFailure) -> return (Left e)) $ fmap Right $
let uid = installedUnitId pkg
Just pkgBuildStatus = Map.lookup uid pkgsBuildStatus in
rebuildTarget
verbosity
distDirLayout
storeDirLayout
buildSettings downloadMap
registerLock cacheLock
sharedPackageConfig
installPlan pkg
pkgBuildStatus
where
isParallelBuild = buildSettingNumJobs >= 2
keepGoing = buildSettingKeepGoing
withRepoCtx = projectConfigWithBuilderRepoContext verbosity
buildSettings
packageDBsToUse = -- all the package dbs we may need to create
(Set.toList . Set.fromList)
[ pkgdb
| InstallPlan.Configured elab <- InstallPlan.toList installPlan
, pkgdb <- concat [ elabBuildPackageDBStack elab
, elabRegisterPackageDBStack elab
, elabSetupPackageDBStack elab ]
]
-- | Create a package DB if it does not currently exist. Note that this action
-- is /not/ safe to run concurrently.
--
createPackageDBIfMissing :: Verbosity -> Compiler -> ProgramDb
-> PackageDB -> IO ()
createPackageDBIfMissing verbosity compiler progdb
(SpecificPackageDB dbPath) = do
exists <- Cabal.doesPackageDBExist dbPath
unless exists $ do
createDirectoryIfMissingVerbose verbosity True (takeDirectory dbPath)
Cabal.createPackageDB verbosity compiler progdb False dbPath
createPackageDBIfMissing _ _ _ _ = return ()
-- | Given all the context and resources, (re)build an individual package.
--
rebuildTarget :: Verbosity
-> DistDirLayout
-> StoreDirLayout
-> BuildTimeSettings
-> AsyncFetchMap
-> Lock -> Lock
-> ElaboratedSharedConfig
-> ElaboratedInstallPlan
-> ElaboratedReadyPackage
-> BuildStatus
-> IO BuildResult
rebuildTarget verbosity
distDirLayout@DistDirLayout{distBuildDirectory}
storeDirLayout
buildSettings downloadMap
registerLock cacheLock
sharedPackageConfig
plan rpkg@(ReadyPackage pkg)
pkgBuildStatus =
-- We rely on the 'BuildStatus' to decide which phase to start from:
case pkgBuildStatus of
BuildStatusDownload -> downloadPhase
BuildStatusUnpack tarball -> unpackTarballPhase tarball
BuildStatusRebuild srcdir status -> rebuildPhase status srcdir
-- TODO: perhaps re-nest the types to make these impossible
BuildStatusPreExisting {} -> unexpectedState
BuildStatusInstalled {} -> unexpectedState
BuildStatusUpToDate {} -> unexpectedState
where
unexpectedState = error "rebuildTarget: unexpected package status"
downloadPhase = do
downsrcloc <- annotateFailureNoLog DownloadFailed $
waitAsyncPackageDownload verbosity downloadMap pkg
case downsrcloc of
DownloadedTarball tarball -> unpackTarballPhase tarball
--TODO: [nice to have] git/darcs repos etc
unpackTarballPhase tarball =
withTarballLocalDirectory
verbosity distDirLayout tarball
(packageId pkg) (elabDistDirParams sharedPackageConfig pkg) (elabBuildStyle pkg)
(elabPkgDescriptionOverride pkg) $
case elabBuildStyle pkg of
BuildAndInstall -> buildAndInstall
BuildInplaceOnly -> buildInplace buildStatus
where
buildStatus = BuildStatusConfigure MonitorFirstRun
-- Note that this really is rebuild, not build. It can only happen for
-- 'BuildInplaceOnly' style packages. 'BuildAndInstall' style packages
-- would only start from download or unpack phases.
--
rebuildPhase buildStatus srcdir =
assert (elabBuildStyle pkg == BuildInplaceOnly) $
buildInplace buildStatus srcdir builddir
where
builddir = distBuildDirectory (elabDistDirParams sharedPackageConfig pkg)
buildAndInstall srcdir builddir =
buildAndInstallUnpackedPackage
verbosity distDirLayout storeDirLayout
buildSettings registerLock cacheLock
sharedPackageConfig
rpkg
srcdir builddir'
where
builddir' = makeRelative srcdir builddir
--TODO: [nice to have] ^^ do this relative stuff better
buildInplace buildStatus srcdir builddir =
--TODO: [nice to have] use a relative build dir rather than absolute
buildInplaceUnpackedPackage
verbosity distDirLayout
buildSettings registerLock cacheLock
sharedPackageConfig
plan rpkg
buildStatus
srcdir builddir
--TODO: [nice to have] do we need to use a with-style for the temp files for downloading http
-- packages, or are we going to cache them persistently?
-- | Given the current 'InstallPlan' and 'BuildStatusMap', select all the
-- packages we have to download and fork off an async action to download them.
-- We download them in dependency order so that the one's we'll need
-- first are the ones we will start downloading first.
--
-- The body action is passed a map from those packages (identified by their
-- location) to a completion var for that package. So the body action should
-- lookup the location and use 'waitAsyncPackageDownload' to get the result.
--
asyncDownloadPackages :: Verbosity
-> ((RepoContext -> IO a) -> IO a)
-> ElaboratedInstallPlan
-> BuildStatusMap
-> (AsyncFetchMap -> IO a)
-> IO a
asyncDownloadPackages verbosity withRepoCtx installPlan pkgsBuildStatus body
| null pkgsToDownload = body Map.empty
| otherwise = withRepoCtx $ \repoctx ->
asyncFetchPackages verbosity repoctx
pkgsToDownload body
where
pkgsToDownload =
ordNub $
[ elabPkgSourceLocation elab
| InstallPlan.Configured elab
<- InstallPlan.reverseTopologicalOrder installPlan
, let uid = installedUnitId elab
Just pkgBuildStatus = Map.lookup uid pkgsBuildStatus
, BuildStatusDownload <- [pkgBuildStatus]
]
-- | Check if a package needs downloading, and if so expect to find a download
-- in progress in the given 'AsyncFetchMap' and wait on it to finish.
--
waitAsyncPackageDownload :: Verbosity
-> AsyncFetchMap
-> ElaboratedConfiguredPackage
-> IO DownloadedSourceLocation
waitAsyncPackageDownload verbosity downloadMap elab = do
pkgloc <- waitAsyncFetchPackage verbosity downloadMap
(elabPkgSourceLocation elab)
case downloadedSourceLocation pkgloc of
Just loc -> return loc
Nothing -> fail "waitAsyncPackageDownload: unexpected source location"
data DownloadedSourceLocation = DownloadedTarball FilePath
--TODO: [nice to have] git/darcs repos etc
downloadedSourceLocation :: PackageLocation FilePath
-> Maybe DownloadedSourceLocation
downloadedSourceLocation pkgloc =
case pkgloc of
RemoteTarballPackage _ tarball -> Just (DownloadedTarball tarball)
RepoTarballPackage _ _ tarball -> Just (DownloadedTarball tarball)
_ -> Nothing
-- | Ensure that the package is unpacked in an appropriate directory, either
-- a temporary one or a persistent one under the shared dist directory.
--
withTarballLocalDirectory
:: Verbosity
-> DistDirLayout
-> FilePath
-> PackageId
-> DistDirParams
-> BuildStyle
-> Maybe CabalFileText
-> (FilePath -> -- Source directory
FilePath -> -- Build directory
IO a)
-> IO a
withTarballLocalDirectory verbosity distDirLayout@DistDirLayout{..}
tarball pkgid dparams buildstyle pkgTextOverride
buildPkg =
case buildstyle of
-- In this case we make a temp dir (e.g. tmp/src2345/), unpack
-- the tarball to it (e.g. tmp/src2345/foo-1.0/), and for
-- compatibility we put the dist dir within it
-- (i.e. tmp/src2345/foo-1.0/dist/).
--
-- Unfortunately, a few custom Setup.hs scripts do not respect
-- the --builddir flag and always look for it at ./dist/ so
-- this way we avoid breaking those packages
BuildAndInstall ->
let tmpdir = distTempDirectory in
withTempDirectory verbosity tmpdir "src" $ \unpackdir -> do
unpackPackageTarball verbosity tarball unpackdir
pkgid pkgTextOverride
let srcdir = unpackdir </> display pkgid
builddir = srcdir </> "dist"
buildPkg srcdir builddir
-- In this case we make sure the tarball has been unpacked to the
-- appropriate location under the shared dist dir, and then build it
-- inplace there
BuildInplaceOnly -> do
let srcrootdir = distUnpackedSrcRootDirectory
srcdir = distUnpackedSrcDirectory pkgid
builddir = distBuildDirectory dparams
-- TODO: [nice to have] use a proper file monitor rather than this dir exists test
exists <- doesDirectoryExist srcdir
unless exists $ do
createDirectoryIfMissingVerbose verbosity True srcrootdir
unpackPackageTarball verbosity tarball srcrootdir
pkgid pkgTextOverride
moveTarballShippedDistDirectory verbosity distDirLayout
srcrootdir pkgid dparams
buildPkg srcdir builddir
unpackPackageTarball :: Verbosity -> FilePath -> FilePath
-> PackageId -> Maybe CabalFileText
-> IO ()
unpackPackageTarball verbosity tarball parentdir pkgid pkgTextOverride =
--TODO: [nice to have] switch to tar package and catch tar exceptions
annotateFailureNoLog UnpackFailed $ do
-- Unpack the tarball
--
info verbosity $ "Extracting " ++ tarball ++ " to " ++ parentdir ++ "..."
Tar.extractTarGzFile parentdir pkgsubdir tarball
-- Sanity check
--
exists <- doesFileExist cabalFile
unless exists $
die' verbosity $ "Package .cabal file not found in the tarball: " ++ cabalFile
-- Overwrite the .cabal with the one from the index, when appropriate
--
case pkgTextOverride of
Nothing -> return ()
Just pkgtxt -> do
info verbosity $ "Updating " ++ display pkgname <.> "cabal"
++ " with the latest revision from the index."
writeFileAtomic cabalFile pkgtxt
where
cabalFile = parentdir </> pkgsubdir
</> display pkgname <.> "cabal"
pkgsubdir = display pkgid
pkgname = packageName pkgid
-- | This is a bit of a hacky workaround. A number of packages ship
-- pre-processed .hs files in a dist directory inside the tarball. We don't
-- use the standard 'dist' location so unless we move this dist dir to the
-- right place then we'll miss the shipped pre-procssed files. This hacky
-- approach to shipped pre-procssed files ought to be replaced by a proper
-- system, though we'll still need to keep this hack for older packages.
--
moveTarballShippedDistDirectory :: Verbosity -> DistDirLayout
-> FilePath -> PackageId -> DistDirParams -> IO ()
moveTarballShippedDistDirectory verbosity DistDirLayout{distBuildDirectory}
parentdir pkgid dparams = do
distDirExists <- doesDirectoryExist tarballDistDir
when distDirExists $ do
debug verbosity $ "Moving '" ++ tarballDistDir ++ "' to '"
++ targetDistDir ++ "'"
--TODO: [nice to have] or perhaps better to copy, and use a file monitor
renameDirectory tarballDistDir targetDistDir
where
tarballDistDir = parentdir </> display pkgid </> "dist"
targetDistDir = distBuildDirectory dparams
buildAndInstallUnpackedPackage :: Verbosity
-> DistDirLayout
-> StoreDirLayout
-> BuildTimeSettings -> Lock -> Lock
-> ElaboratedSharedConfig
-> ElaboratedReadyPackage
-> FilePath -> FilePath
-> IO BuildResult
buildAndInstallUnpackedPackage verbosity
DistDirLayout{distTempDirectory}
storeDirLayout@StoreDirLayout {
storePackageDBStack
}
BuildTimeSettings {
buildSettingNumJobs,
buildSettingLogFile
}
registerLock cacheLock
pkgshared@ElaboratedSharedConfig {
pkgConfigPlatform = platform,
pkgConfigCompiler = compiler,
pkgConfigCompilerProgs = progdb
}
rpkg@(ReadyPackage pkg)
srcdir builddir = do
createDirectoryIfMissingVerbose verbosity True builddir
initLogFile
--TODO: [code cleanup] deal consistently with talking to older Setup.hs versions, much like
-- we do for ghc, with a proper options type and rendering step
-- which will also let us call directly into the lib, rather than always
-- going via the lib's command line interface, which would also allow
-- passing data like installed packages, compiler, and program db for a
-- quicker configure.
--TODO: [required feature] docs and tests
--TODO: [required feature] sudo re-exec
let dispname = case elabPkgOrComp pkg of
ElabPackage _ -> display pkgid
++ " (all, legacy fallback)"
ElabComponent comp -> display pkgid
++ " (" ++ maybe "custom" display (compComponentName comp) ++ ")"
-- Configure phase
when isParallelBuild $
notice verbosity $ "Configuring " ++ dispname ++ "..."
annotateFailure mlogFile ConfigureFailed $
setup' configureCommand configureFlags configureArgs
-- Build phase
when isParallelBuild $
notice verbosity $ "Building " ++ dispname ++ "..."
annotateFailure mlogFile BuildFailed $
setup buildCommand buildFlags
-- Install phase
annotateFailure mlogFile InstallFailed $ do
let copyPkgFiles tmpDir = do
setup Cabal.copyCommand (copyFlags tmpDir)
-- Note that the copy command has put the files into
-- @$tmpDir/$prefix@ so we need to return this dir so
-- the store knows which dir will be the final store entry.
let prefix = dropDrive (InstallDirs.prefix (elabInstallDirs pkg))
entryDir = tmpDir </> prefix
LBS.writeFile
(entryDir </> "cabal-hash.txt")
(renderPackageHashInputs (packageHashInputs pkgshared pkg))
-- here's where we could keep track of the installed files ourselves
-- if we wanted to by making a manifest of the files in the tmp dir
return entryDir
registerPkg
| not (elabRequiresRegistration pkg) =
debug verbosity $
"registerPkg: elab does NOT require registration for " ++ display uid
| otherwise = do
-- We register ourselves rather than via Setup.hs. We need to
-- grab and modify the InstalledPackageInfo. We decide what
-- the installed package id is, not the build system.
ipkg0 <- generateInstalledPackageInfo
let ipkg = ipkg0 { Installed.installedUnitId = uid }
assert ( elabRegisterPackageDBStack pkg
== storePackageDBStack compid) (return ())
criticalSection registerLock $
Cabal.registerPackage
verbosity compiler progdb
(storePackageDBStack compid) ipkg
Cabal.defaultRegisterOptions {
Cabal.registerMultiInstance = True,
Cabal.registerSuppressFilesCheck = True
}
-- Actual installation
void $ newStoreEntry verbosity storeDirLayout
compid uid
copyPkgFiles registerPkg
--TODO: [nice to have] we currently rely on Setup.hs copy to do the right
-- thing. Although we do copy into an image dir and do the move into the
-- final location ourselves, perhaps we ought to do some sanity checks on
-- the image dir first.
-- TODO: [required eventually] note that for nix-style installations it is not necessary to do
-- the 'withWin32SelfUpgrade' dance, but it would be necessary for a
-- shared bin dir.
--TODO: [required feature] docs and test phases
let docsResult = DocsNotTried
testsResult = TestsNotTried
return BuildResult {
buildResultDocs = docsResult,
buildResultTests = testsResult,
buildResultLogFile = mlogFile
}
where
pkgid = packageId rpkg
uid = installedUnitId rpkg
compid = compilerId compiler
isParallelBuild = buildSettingNumJobs >= 2
configureCommand = Cabal.configureCommand defaultProgramDb
configureFlags v = flip filterConfigureFlags v $
setupHsConfigureFlags rpkg pkgshared
verbosity builddir
configureArgs = setupHsConfigureArgs pkg
buildCommand = Cabal.buildCommand defaultProgramDb
buildFlags _ = setupHsBuildFlags pkg pkgshared verbosity builddir
generateInstalledPackageInfo :: IO InstalledPackageInfo
generateInstalledPackageInfo =
withTempInstalledPackageInfoFile
verbosity distTempDirectory $ \pkgConfDest -> do
let registerFlags _ = setupHsRegisterFlags
pkg pkgshared
verbosity builddir
pkgConfDest
setup Cabal.registerCommand registerFlags
copyFlags destdir _ = setupHsCopyFlags pkg pkgshared verbosity
builddir destdir
scriptOptions = setupHsScriptOptions rpkg pkgshared srcdir builddir
isParallelBuild cacheLock
setup :: CommandUI flags -> (Version -> flags) -> IO ()
setup cmd flags = setup' cmd flags []
setup' :: CommandUI flags -> (Version -> flags) -> [String] -> IO ()
setup' cmd flags args =
withLogging $ \mLogFileHandle ->
setupWrapper
verbosity
scriptOptions { useLoggingHandle = mLogFileHandle }
(Just (elabPkgDescription pkg))
cmd flags args
mlogFile :: Maybe FilePath
mlogFile =
case buildSettingLogFile of
Nothing -> Nothing
Just mkLogFile -> Just (mkLogFile compiler platform pkgid uid)
initLogFile =
case mlogFile of
Nothing -> return ()
Just logFile -> do
createDirectoryIfMissing True (takeDirectory logFile)
exists <- doesFileExist logFile
when exists $ removeFile logFile
withLogging action =
case mlogFile of
Nothing -> action Nothing
Just logFile -> withFile logFile AppendMode (action . Just)
buildInplaceUnpackedPackage :: Verbosity
-> DistDirLayout
-> BuildTimeSettings -> Lock -> Lock
-> ElaboratedSharedConfig
-> ElaboratedInstallPlan
-> ElaboratedReadyPackage
-> BuildStatusRebuild
-> FilePath -> FilePath
-> IO BuildResult
buildInplaceUnpackedPackage verbosity
distDirLayout@DistDirLayout {
distTempDirectory,
distPackageCacheDirectory,
distDirectory
}
BuildTimeSettings{buildSettingNumJobs}
registerLock cacheLock
pkgshared@ElaboratedSharedConfig {
pkgConfigCompiler = compiler,
pkgConfigCompilerProgs = progdb
}
plan
rpkg@(ReadyPackage pkg)
buildStatus
srcdir builddir = do
--TODO: [code cleanup] there is duplication between the distdirlayout and the builddir here
-- builddir is not enough, we also need the per-package cachedir
createDirectoryIfMissingVerbose verbosity True builddir
createDirectoryIfMissingVerbose verbosity True (distPackageCacheDirectory dparams)
-- Configure phase
--
whenReConfigure $ do
annotateFailureNoLog ConfigureFailed $
setup configureCommand configureFlags configureArgs
invalidatePackageRegFileMonitor packageFileMonitor
updatePackageConfigFileMonitor packageFileMonitor srcdir pkg
-- Build phase
--
let docsResult = DocsNotTried
testsResult = TestsNotTried
buildResult :: BuildResultMisc
buildResult = (docsResult, testsResult)
whenRebuild $ do
timestamp <- beginUpdateFileMonitor
annotateFailureNoLog BuildFailed $
setup buildCommand buildFlags buildArgs
let listSimple =
execRebuild srcdir (needElaboratedConfiguredPackage pkg)
listSdist =
fmap (map monitorFileHashed) $
allPackageSourceFiles verbosity scriptOptions srcdir
ifNullThen m m' = do xs <- m
if null xs then m' else return xs
monitors <- case PD.buildType (elabPkgDescription pkg) of
Just Simple -> listSimple
-- If a Custom setup was used, AND the Cabal is recent
-- enough to have sdist --list-sources, use that to
-- determine the files that we need to track. This can
-- cause unnecessary rebuilding (for example, if README
-- is edited, we will try to rebuild) but there isn't
-- a more accurate Custom interface we can use to get
-- this info. We prefer not to use listSimple here
-- as it can miss extra source files that are considered
-- by the Custom setup.
_ | elabSetupScriptCliVersion pkg >= mkVersion [1,17]
-- However, sometimes sdist --list-sources will fail
-- and return an empty list. In that case, fall
-- back on the (inaccurate) simple tracking.
-> listSdist `ifNullThen` listSimple
| otherwise
-> listSimple
let dep_monitors = map monitorFileHashed
$ elabInplaceDependencyBuildCacheFiles
distDirLayout pkgshared plan pkg
updatePackageBuildFileMonitor packageFileMonitor srcdir timestamp
pkg buildStatus
(monitors ++ dep_monitors) buildResult
-- PURPOSELY omitted: no copy!
whenReRegister $ annotateFailureNoLog InstallFailed $ do
-- Register locally
mipkg <- if elabRequiresRegistration pkg
then do
ipkg0 <- generateInstalledPackageInfo
-- We register ourselves rather than via Setup.hs. We need to
-- grab and modify the InstalledPackageInfo. We decide what
-- the installed package id is, not the build system.
let ipkg = ipkg0 { Installed.installedUnitId = ipkgid }
criticalSection registerLock $
Cabal.registerPackage verbosity compiler progdb
(elabRegisterPackageDBStack pkg)
ipkg Cabal.defaultRegisterOptions
return (Just ipkg)
else return Nothing
updatePackageRegFileMonitor packageFileMonitor srcdir mipkg
whenTest $ do
annotateFailureNoLog TestsFailed $
setup testCommand testFlags testArgs
-- Repl phase
--
whenRepl $
annotateFailureNoLog ReplFailed $
setupInteractive replCommand replFlags replArgs
-- Haddock phase
whenHaddock $
annotateFailureNoLog HaddocksFailed $ do
setup haddockCommand haddockFlags []
let haddockTarget = elabHaddockForHackage pkg
when (haddockTarget == Cabal.ForHackage) $ do
let dest = distDirectory </> name <.> "tar.gz"
name = haddockDirName haddockTarget (elabPkgDescription pkg)
docDir = distBuildDirectory distDirLayout dparams </> "doc" </> "html"
Tar.createTarGzFile dest docDir name
notice verbosity $ "Documentation tarball created: " ++ dest
return BuildResult {
buildResultDocs = docsResult,
buildResultTests = testsResult,
buildResultLogFile = Nothing
}
where
ipkgid = installedUnitId pkg
dparams = elabDistDirParams pkgshared pkg
isParallelBuild = buildSettingNumJobs >= 2
packageFileMonitor = newPackageFileMonitor distDirLayout dparams
whenReConfigure action = case buildStatus of
BuildStatusConfigure _ -> action
_ -> return ()
whenRebuild action
| null (elabBuildTargets pkg)
-- NB: we have to build the test suite!
, null (elabTestTargets pkg) = return ()
| otherwise = action
whenTest action
| null (elabTestTargets pkg) = return ()
| otherwise = action
whenRepl action
| isNothing (elabReplTarget pkg) = return ()
| otherwise = action
whenHaddock action
| elabBuildHaddocks pkg = action
| otherwise = return ()
whenReRegister action
= case buildStatus of
-- We registered the package already
BuildStatusBuild (Just _) _ -> info verbosity "whenReRegister: previously registered"
-- There is nothing to register
_ | null (elabBuildTargets pkg) -> info verbosity "whenReRegister: nothing to register"
| otherwise -> action
configureCommand = Cabal.configureCommand defaultProgramDb
configureFlags v = flip filterConfigureFlags v $
setupHsConfigureFlags rpkg pkgshared
verbosity builddir
configureArgs = setupHsConfigureArgs pkg
buildCommand = Cabal.buildCommand defaultProgramDb
buildFlags _ = setupHsBuildFlags pkg pkgshared
verbosity builddir
buildArgs = setupHsBuildArgs pkg
testCommand = Cabal.testCommand -- defaultProgramDb
testFlags _ = setupHsTestFlags pkg pkgshared
verbosity builddir
testArgs = setupHsTestArgs pkg
replCommand = Cabal.replCommand defaultProgramDb
replFlags _ = setupHsReplFlags pkg pkgshared
verbosity builddir
replArgs = setupHsReplArgs pkg
haddockCommand = Cabal.haddockCommand
haddockFlags _ = setupHsHaddockFlags pkg pkgshared
verbosity builddir
scriptOptions = setupHsScriptOptions rpkg pkgshared
srcdir builddir
isParallelBuild cacheLock
setupInteractive :: CommandUI flags
-> (Version -> flags) -> [String] -> IO ()
setupInteractive cmd flags args =
setupWrapper verbosity
scriptOptions { isInteractive = True }
(Just (elabPkgDescription pkg))
cmd flags args
setup :: CommandUI flags -> (Version -> flags) -> [String] -> IO ()
setup cmd flags args =
setupWrapper verbosity
scriptOptions
(Just (elabPkgDescription pkg))
cmd flags args
generateInstalledPackageInfo :: IO InstalledPackageInfo
generateInstalledPackageInfo =
withTempInstalledPackageInfoFile
verbosity distTempDirectory $ \pkgConfDest -> do
let registerFlags _ = setupHsRegisterFlags
pkg pkgshared
verbosity builddir
pkgConfDest
setup Cabal.registerCommand registerFlags []
withTempInstalledPackageInfoFile :: Verbosity -> FilePath
-> (FilePath -> IO ())
-> IO InstalledPackageInfo
withTempInstalledPackageInfoFile verbosity tempdir action =
withTempDirectory verbosity tempdir "package-registration-" $ \dir -> do
-- make absolute since @action@ will often change directory
abs_dir <- canonicalizePath dir
let pkgConfDest = abs_dir </> "pkgConf"
action pkgConfDest
readPkgConf "." pkgConfDest
where
pkgConfParseFailed :: Installed.PError -> IO a
pkgConfParseFailed perror =
die' verbosity $ "Couldn't parse the output of 'setup register --gen-pkg-config':"
++ show perror
readPkgConf pkgConfDir pkgConfFile = do
(warns, ipkg) <- withUTF8FileContents (pkgConfDir </> pkgConfFile) $ \pkgConfStr ->
case Installed.parseInstalledPackageInfo pkgConfStr of
Installed.ParseFailed perror -> pkgConfParseFailed perror
Installed.ParseOk warns ipkg -> return (warns, ipkg)
unless (null warns) $
warn verbosity $ unlines (map (showPWarning pkgConfFile) warns)
return ipkg
------------------------------------------------------------------------------
-- * Utilities
------------------------------------------------------------------------------
annotateFailureNoLog :: (SomeException -> BuildFailureReason)
-> IO a -> IO a
annotateFailureNoLog annotate action =
annotateFailure Nothing annotate action
annotateFailure :: Maybe FilePath
-> (SomeException -> BuildFailureReason)
-> IO a -> IO a
annotateFailure mlogFile annotate action =
action `catches`
-- It's not just IOException and ExitCode we have to deal with, there's
-- lots, including exceptions from the hackage-security and tar packages.
-- So we take the strategy of catching everything except async exceptions.
[
#if MIN_VERSION_base(4,7,0)
Handler $ \async -> throwIO (async :: SomeAsyncException)
#else
Handler $ \async -> throwIO (async :: AsyncException)
#endif
, Handler $ \other -> handler (other :: SomeException)
]
where
handler :: Exception e => e -> IO a
handler = throwIO . BuildFailure mlogFile . annotate . toException
| mydaum/cabal | cabal-install/Distribution/Client/ProjectBuilding.hs | bsd-3-clause | 56,654 | 0 | 22 | 17,605 | 7,879 | 4,060 | 3,819 | 827 | 10 |
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ViewPatterns #-}
module IRTS.Java.JTypes where
import Idris.Core.TT
import qualified Data.Text as T
import IRTS.Lang
import Language.Java.Syntax
import qualified Language.Java.Syntax as J
-----------------------------------------------------------------------
-- Primitive types
charType :: J.Type
charType =
PrimType CharT
byteType :: J.Type
byteType = PrimType ByteT
shortType :: J.Type
shortType = PrimType ShortT
integerType :: J.Type
integerType = PrimType IntT
longType :: J.Type
longType = PrimType LongT
doubleType :: J.Type
doubleType = PrimType DoubleT
array :: J.Type -> J.Type
array t = RefType . ArrayType $ t
addressType :: J.Type
addressType = longType
-----------------------------------------------------------------------
-- Boxed types
objectType :: J.Type
objectType =
RefType . ClassRefType $ ClassType [(Ident "Object", [])]
bigIntegerType :: J.Type
bigIntegerType =
RefType . ClassRefType $ ClassType [(Ident "BigInteger", [])]
stringType :: J.Type
stringType =
RefType . ClassRefType $ ClassType [(Ident "String", [])]
bufferType :: J.Type
bufferType =
RefType . ClassRefType $ ClassType [(Ident "ByteBuffer", [])]
threadType :: J.Type
threadType =
RefType . ClassRefType $ ClassType [(Ident "Thread", [])]
callableType :: J.Type
callableType =
RefType . ClassRefType $ ClassType [(Ident "Callable", [])]
voidType :: J.Type
voidType =
RefType . ClassRefType $ ClassType [(Ident "Void", [])]
worldType :: J.Type
worldType =
RefType . ClassRefType $ ClassType [(Ident "Object", [])]
userType :: String -> J.Type
userType name =
RefType . ClassRefType $ ClassType [(Ident name, [])]
box :: J.Type -> J.Type
box (PrimType CharT ) = RefType . ClassRefType $ ClassType [(Ident "Character", [])]
box (PrimType ByteT ) = RefType . ClassRefType $ ClassType [(Ident "Byte", [])]
box (PrimType ShortT ) = RefType . ClassRefType $ ClassType [(Ident "Short", [])]
box (PrimType IntT ) = RefType . ClassRefType $ ClassType [(Ident "Integer", [])]
box (PrimType LongT ) = RefType . ClassRefType $ ClassType [(Ident "Long", [])]
box (PrimType DoubleT) = RefType . ClassRefType $ ClassType [(Ident "Double", [])]
box t = t
isFloating :: J.Type -> Bool
isFloating (PrimType DoubleT) = True
isFloating (PrimType FloatT) = True
isFloating _ = False
isPrimitive :: J.Type -> Bool
isPrimitive (PrimType _) = True
isPrimitive _ = False
isArray :: J.Type -> Bool
isArray (RefType (ArrayType _)) = True
isArray _ = False
isString :: J.Type -> Bool
isString (RefType (ClassRefType (ClassType [(Ident "String", _)]))) = True
isString _ = False
-----------------------------------------------------------------------
-- Idris rts classes
idrisClosureType :: J.Type
idrisClosureType =
RefType . ClassRefType $ ClassType [(Ident "Closure", [])]
idrisTailCallClosureType :: J.Type
idrisTailCallClosureType =
RefType . ClassRefType $ ClassType [(Ident "TailCallClosure", [])]
idrisObjectType :: J.Type
idrisObjectType =
RefType . ClassRefType $ ClassType [(Ident "IdrisObject", [])]
foreignWrapperType :: J.Type
foreignWrapperType =
RefType . ClassRefType $ ClassType [(Ident "ForeignWrapper", [])]
primFnType :: J.Type
primFnType =
RefType . ClassRefType $ ClassType [(Ident "PrimFn", [])]
-----------------------------------------------------------------------
-- Java utility classes
arraysType :: J.Type
arraysType =
RefType . ClassRefType $ ClassType [(Ident "Arrays", [])]
mathType :: J.Type
mathType =
RefType . ClassRefType $ ClassType [(Ident "Math", [])]
-----------------------------------------------------------------------
-- Exception types
exceptionType :: J.Type
exceptionType =
RefType . ClassRefType $ ClassType [(Ident "Exception", [])]
runtimeExceptionType :: J.Type
runtimeExceptionType =
RefType . ClassRefType $ ClassType [(Ident "RuntimeException", [])]
-----------------------------------------------------------------------
-- Integer types
nativeTyToJType :: NativeTy -> J.Type
nativeTyToJType IT8 = byteType
nativeTyToJType IT16 = shortType
nativeTyToJType IT32 = integerType
nativeTyToJType IT64 = longType
intTyToJType :: IntTy -> J.Type
intTyToJType (ITFixed nt) = nativeTyToJType nt
intTyToJType (ITNative) = integerType
intTyToJType (ITBig) = bigIntegerType
intTyToJType (ITChar) = charType
--intTyToJType (ITVec nt _) = array $ nativeTyToJType nt
arithTyToJType :: ArithTy -> J.Type
arithTyToJType (ATInt it) = intTyToJType it
arithTyToJType (ATFloat) = doubleType
-----------------------------------------------------------------------
-- Context variables
localContextID :: Ident
localContextID = Ident "context"
localContext :: Exp
localContext = ExpName $ Name [localContextID]
globalContextID :: Ident
globalContextID = Ident "globalContext"
globalContext :: Exp
globalContext = ExpName $ Name [globalContextID]
newContextID :: Ident
newContextID = Ident "new_context"
newContext :: Exp
newContext = ExpName $ Name [newContextID]
contextArray :: LVar -> Exp
contextArray (Loc _) = localContext
contextArray (Glob _) = globalContext
contextParam :: FormalParam
contextParam = FormalParam [Final] (array objectType) False (VarId localContextID)
-----------------------------------------------------------------------
-- Constant types
constType :: Const -> J.Type
constType (I _) = arithTyToJType (ATInt ITNative)
constType (BI _) = arithTyToJType (ATInt ITBig )
constType (Fl _) = arithTyToJType (ATFloat )
constType (Ch _) = arithTyToJType (ATInt ITChar )
constType (Str _) = stringType
constType (B8 _) = arithTyToJType (ATInt $ ITFixed IT8 )
constType (B16 _) = arithTyToJType (ATInt $ ITFixed IT16)
constType (B32 _) = arithTyToJType (ATInt $ ITFixed IT32)
constType (B64 _) = arithTyToJType (ATInt $ ITFixed IT64)
constType _ = objectType
-----------------------------------------------------------------------
-- Foreign types
isCType :: Idris.Core.TT.Name -> Bool
isCType (UN n ) = take 2 (str n) == "C_"
isJavaType :: Idris.Core.TT.Name -> Bool
isJavaType (UN n ) = take 5 (str n) == "Java_"
-- Currently we only support Java_* types for foreign functions
foreignType :: FDesc -> Maybe J.Type
foreignType (FCon t)
| isCType t = error ("Java backend does not (currently) support C calls")
| isJavaType t = Just $ foreignType' t
| otherwise = error ("Java backend does not support " ++ show t)
-- TODO: We should really construct a user class reftype as we have
-- enough information
foreignType ty@(FApp (UN (T.unpack -> "Java_JavaT"))
[FApp (UN (T.unpack -> "JavaTyRef")) [FStr pck, FStr cl]]) =
Just $ userType $ nameFromReturnType ty
foreignType (FApp t params)
| isCType t = error ("Java backend does not (currently) support for C calls")
| sUN "Java_IntT" == t = Just $ foreignType' t'
| otherwise = error ("Java backend does not support " ++ show t)
where
FCon t' = head $ tail params
foreignType FUnknown = Nothing
foreignType fd = error ("fdesc not implemented yet " ++ show fd)
foreignType' :: Idris.Core.TT.Name -> J.Type
foreignType' n
| sUN "Java_Unit" == n = voidType
| sUN "Java_Str" == n = stringType
| sUN "Java_Ptr" == n = objectType
| sUN "Java_IntNative" == n = integerType
| sUN "Java_IntChar" == n = charType
| sUN "Java_IntBits8" == n = byteType
| sUN "Java_IntBits16" == n = shortType
| sUN "Java_IntBits32" == n = integerType
| sUN "Java_IntBits64" == n = longType
| sUN "Java_Any" == n = objectType
| otherwise = error ("unimplemented FFI Java Type: " ++ show n)
nameFromReturnType :: FDesc -> String
nameFromReturnType (FApp (UN (T.unpack -> "Java_JavaT"))
[FApp (UN (T.unpack -> "JavaTyRef")) [FStr pck, FStr cl]]) =
pck' ++ cl
where
pck' = if pck == "" then "" else pck ++ "."
-----------------------------------------------------------------------
-- Primitive operation analysis
opName :: PrimFn -> String
opName x
| (LSExt _ to) <- x = "LSExt" ++ (suffixFor to)
| (LZExt _ to) <- x = "LZExt" ++ (suffixFor to)
| (LTrunc _ to) <- x = "LTrunc" ++ (suffixFor to)
| (LFloatInt to) <- x = "LFloatInt" ++ (suffixFor to)
| (LStrInt to) <- x = "LStrInt" ++ (suffixFor to)
| (LChInt to) <- x = "LChInt" ++ (suffixFor to)
| (LExternal si) <- x,
si == sUN "prim__stdin" = "LStdIn"
| (LExternal si) <- x,
si == sUN "prim__stdout" = "LStdOut"
| (LExternal si) <- x,
si == sUN "prim__stderr" = "LStdErr"
| (LExternal si) <- x,
si == sUN "prim__eqManagedPtr" = "LEqManagedPtr"
| (LExternal si) <- x,
si == sUN "prim__eqPtr" = "LEqManagedPtr"
| (LExternal si) <- x,
si == sUN "prim__vm" = "LVMPtr"
| (LExternal si) <- x,
si == sUN "prim__null" = "LNull"
| (LExternal si) <- x,
si == sUN "prim__registerPtr" = "LRegisterPtr"
| (LExternal si) <- x,
si == sUN "prim__readFile" = "LReadFile"
| (LExternal si) <- x,
si == sUN "prim__writeFile" = "LWriteFile"
| otherwise = takeWhile ((/=) ' ') $ show x
where
suffixFor (ITFixed nt) = show nt
suffixFor (ITNative) = show IT32
suffixFor (ITBig) = show ITBig
suffixFor (ITChar) = show ITChar
sourceTypes :: PrimFn -> [J.Type]
sourceTypes (LPlus from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LMinus from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LTimes from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LUDiv from) = [intTyToJType from, intTyToJType from]
sourceTypes (LSDiv from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LURem from) = [intTyToJType from, intTyToJType from]
sourceTypes (LSRem from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LAnd from) = [intTyToJType from, intTyToJType from]
sourceTypes (LOr from) = [intTyToJType from, intTyToJType from]
sourceTypes (LXOr from) = [intTyToJType from, intTyToJType from]
sourceTypes (LCompl from) = [intTyToJType from]
sourceTypes (LSHL from) = [intTyToJType from, intTyToJType from]
sourceTypes (LLSHR from) = [intTyToJType from, intTyToJType from]
sourceTypes (LASHR from) = [intTyToJType from, intTyToJType from]
sourceTypes (LEq from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LSLt from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LSLe from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LSGt from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LSGe from) = [arithTyToJType from, arithTyToJType from]
sourceTypes (LLt from) = [intTyToJType from, intTyToJType from]
sourceTypes (LLe from) = [intTyToJType from, intTyToJType from]
sourceTypes (LGt from) = [intTyToJType from, intTyToJType from]
sourceTypes (LGe from) = [intTyToJType from, intTyToJType from]
sourceTypes (LSExt from _) = [intTyToJType from]
sourceTypes (LZExt from _) = [intTyToJType from]
sourceTypes (LTrunc from _) = [intTyToJType from]
sourceTypes (LStrConcat) = repeat stringType
sourceTypes (LStrLt) = [stringType, stringType]
sourceTypes (LStrEq) = [stringType, stringType]
sourceTypes (LStrLen) = [stringType]
sourceTypes (LIntFloat from) = [intTyToJType from]
sourceTypes (LFloatInt _) = [doubleType]
sourceTypes (LIntStr from) = [intTyToJType from]
sourceTypes (LStrInt from) = [stringType]
sourceTypes (LFloatStr) = [doubleType]
sourceTypes (LStrFloat) = [stringType]
sourceTypes (LChInt _) = [charType]
sourceTypes (LIntCh from) = [intTyToJType from]
sourceTypes (LWriteStr) = [objectType, stringType]
sourceTypes (LReadStr) = [objectType]
sourceTypes (LFExp) = [doubleType]
sourceTypes (LFLog) = [doubleType]
sourceTypes (LFSin) = [doubleType]
sourceTypes (LFCos) = [doubleType]
sourceTypes (LFTan) = [doubleType]
sourceTypes (LFASin) = [doubleType]
sourceTypes (LFACos) = [doubleType]
sourceTypes (LFATan) = [doubleType]
sourceTypes (LFSqrt) = [doubleType]
sourceTypes (LFFloor) = [doubleType]
sourceTypes (LFCeil) = [doubleType]
sourceTypes (LStrHead) = [stringType]
sourceTypes (LStrTail) = [stringType]
sourceTypes (LStrCons) = [charType, stringType]
sourceTypes (LStrIndex) = [stringType, integerType]
sourceTypes (LStrRev) = [stringType]
sourceTypes (LSystemInfo) = [integerType]
sourceTypes (LFork) = [objectType]
sourceTypes (LPar) = [objectType]
sourceTypes (LNoOp) = repeat objectType
sourceTypes (LExternal n)
| n == sUN "prim__readFile" = [worldType, objectType]
| n == sUN "prim__writeFile" = [worldType, objectType, stringType]
| n == sUN "prim__stdin" = []
| n == sUN "prim__stdout" = []
| n == sUN "prim__stderr" = []
-- see comment below on managed pointers
| n == sUN "prim__eqManagedPtr" = [objectType, objectType]
| n == sUN "prim__eqPtr" = [objectType, objectType]
| n == sUN "prim__vm" = [threadType]
| n == sUN "prim__null" = []
-- @bgaster
-- i can't see any reason to support managed pointers in the Java
-- runtime, infact it seems to be counter to fact that Java is
-- managing our allocations and lifetimes. thus the runtime will raise
-- an exception if called
| n == sUN "prim__registerPtr" = [objectType, integerType]
| otherwise = [] --error ("unsupported builtin: " ++ show n)
sourceTypes op = error ("non-suported op: " ++ show op)
-----------------------------------------------------------------------
-- Endianess markers
endiannessConstant :: Endianness -> Exp
endiannessConstant c =
ExpName . Name . map Ident $ ["java", "nio", "ByteOrder", endiannessConstant' c]
where
endiannessConstant' BE = "BIG_ENDIAN"
endiannessConstant' LE = "LITTLE_ENDIAN"
endiannessConstant' (IRTS.Lang.Native) = endiannessConstant' BE
endiannessArguments :: PrimFn -> [Exp]
--endiannessArguments (LAppend _ end) = [endiannessConstant end]
--endiannessArguments (LPeek _ end) = [endiannessConstant end]
endiannessArguments _ = []
| melted/idris-java | src/IRTS/Java/JTypes.hs | bsd-3-clause | 14,609 | 0 | 15 | 3,096 | 4,654 | 2,398 | 2,256 | 293 | 4 |
module Arith.TokenSpec
( spec
) where
import Arith.Token
import SpecUtils
spec :: Spec
spec = do
describe "fromString" $ do
it "tries to convert the given string into a token" $ do
fromString "true" `shouldReturn` KwTrue
fromString "false" `shouldReturn` KwFalse
fromString "if" `shouldReturn` KwIf
fromString "then" `shouldReturn` KwThen
fromString "else" `shouldReturn` KwElse
fromString "0" `shouldReturn` KwZero
fromString "succ" `shouldReturn` KwSucc
fromString "pred" `shouldReturn` KwPred
fromString "iszero" `shouldReturn` KwIsZero
fromString "(" `shouldReturn` LeftParen
fromString ")" `shouldReturn` RightParen
context "when the given string is empty" $ do
it "throws an error with an obvious message" $ do
fromString "" `shouldThrowError` "Empty string"
context "when the given string is not a valid token" $ do
it "throws an error which shows the cause of the failure" $ do
fromString "tru" `shouldThrowError` "Unexpected character sequence: \"tru\""
fromString "1337" `shouldThrowError` "Unexpected character sequence: \"1337\""
fromString "iff" `shouldThrowError` "Unexpected character sequence: \"iff\""
fromString " " `shouldThrowError` "Unexpected character sequence: \" \""
fromString "\0\a\b\f\n\r\t\v\"\'\\" `shouldThrowError`
"Unexpected character sequence: \"\\NUL\\a\\b\\f\\n\\r\\t\\v\\\"\'\\\\\""
| sirikid/arith | spec/Arith/TokenSpec.hs | bsd-3-clause | 1,479 | 0 | 17 | 320 | 293 | 144 | 149 | 30 | 1 |
module Rag.Parser (parseRagFile) where
import Rag.Data
import Rag.Types
import Text.ParserCombinators.Parsec
import Control.Monad (liftM)
import qualified Data.IntMap as Map (insert, empty)
-- Parsing utilities
parseRagFile :: String -> IO MazeDefinition
parseRagFile fileName = do
dat <- readFile fileName
case parse ragFile fileName dat of
Left why -> do
putStrLn "----\nParse failed! Error:"
putStrLn (show why)
putStrLn "----\n"
fail "No maze."
Right xs -> do
return $ buildMaze xs
buildMaze :: [(Int, Room)] -> MazeDefinition
buildMaze = foldr (uncurry Map.insert) Map.empty
-- Parser
ragFile = ragLine `sepEndBy1` newline
ragLine :: GenParser Char st (Int, Room)
ragLine = do
id <- num ; char '|'
title <- cellContent ; char '|'
desc <- cellContent ; char '|'
visibleEdges <- edges False ; char '|'
hiddenEdges <- edges True ; char '|'
verbs <- actions
return (id, Room title desc (visibleEdges ++ hiddenEdges ++verbs))
cellContent :: GenParser Char st String
cellContent = many (noneOf "|\n")
edges :: Bool -> GenParser Char st [Outcome]
edges isHidden = edgeDef isHidden `sepBy` char ','
edgeDef :: Bool -> GenParser Char st Outcome
edgeDef isHidden = do
name <- many letter ; char '='
loc <- num
return $ Edge name loc isHidden
actions :: GenParser Char st [Outcome]
actions = actionDef `sepBy` char '\\'
actionDef = do
name <- many (noneOf "=\n") ; char '='
result <- many (noneOf "\\\n")
return $ Action name result
num :: GenParser Char st Int
num = liftM read (many1 digit)
| KirinDave/Rag | src/Rag/Parser.hs | bsd-3-clause | 1,642 | 0 | 14 | 395 | 582 | 286 | 296 | 46 | 2 |
-- Copyright © 2012 Frank S. Thomas <frank@timepit.eu>
-- All rights reserved.
--
-- Use of this source code is governed by a BSD-style license that
-- can be found in the LICENSE file.
-- | Ohloh API Reference: <http://meta.ohloh.net/referencesize_fact/>
module Web.Ohloh.SizeFact (
SizeFact(..),
xpSizeFact
) where
import Text.XML.HXT.Arrow.Pickle
import Web.Ohloh.Common
-- | 'SizeFact' is a pre-computed collection of statistics about
-- 'Web.Ohloh.Project.Project' source code.
data SizeFact = SizeFact {
sfMonth :: String,
sfCode :: Int,
sfComments :: Int,
sfBlanks :: Int,
sfCommentRatio :: Double,
sfCommits :: Int,
sfManMonths :: Int
} deriving (Eq, Read, Show)
instance XmlPickler SizeFact where
xpickle = xpSizeFact
instance ReadXmlString SizeFact
instance ShowXmlString SizeFact
xpSizeFact :: PU SizeFact
xpSizeFact =
xpElem "size_fact" $
xpWrap (uncurry7 SizeFact,
\(SizeFact m c co b cr cm mm) ->
(m, c, co, b, cr, cm, mm)) $
xp7Tuple (xpElem "month" xpText0)
(xpElem "code" xpInt)
(xpElem "comments" xpInt)
(xpElem "blanks" xpInt)
(xpElem "comment_ratio" xpPrim)
(xpElem "commits" xpInt)
(xpElem "man_months" xpInt)
| fthomas/ohloh-hs | Web/Ohloh/SizeFact.hs | bsd-3-clause | 1,289 | 0 | 11 | 317 | 285 | 164 | 121 | 31 | 1 |
-- Copyright (c) 2015, Travis Bemann
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- o Redistributions of source code must retain the above copyright notice, this
-- list of conditions and the following disclaimer.
--
-- o Redistributions in binary form must reproduce the above copyright notice,
-- this list of conditions and the following disclaimer in the documentation
-- and/or other materials provided with the distribution.
--
-- o Neither the name of the copyright holder nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{-# LANGUAGE OverloadedStrings #-}
module Network.IRC.Client.Amphibian.Monad
(AM,
Interface,
runAM,
getInterface,
getConfig,
setConfig,
updateConfig,
getConnectionConfig,
setConnectionConfig,
updateConnectionConfig,
lookupText,
getConnectionManagers,
registerConnectionManager,
unregisterConnectionManager,
getChannels,
registerChannel,
unregisterChannel,
getUsers,
registerUser,
unregisterUser,
getPlugins,
registerPlugin,
unregisterPlugin,
getFrontend,
registerFrontend,
unregisterFrontend,
getInputDispatcher,
registerInputDispatcher,
unregisterInputDispatcher,
getCtcpDispatcher,
registerCtcpDispatcher,
unregisterCtcpDispatcher,
getPluginServer,
registerPluginServer,
unregisterPluginServer,
getConnectionManagerServer,
registerConnectionManagerServer,
unregisterConnectionManagerServer,
getChannelServer,
registerChannelServer,
unregisterChannelServer)
where
import Network.IRC.Client.Amphibian.Types
import qualified Network.IRC.Client.Amphibian.Interface as I
import Control.Monad.State.Strict (runAM)
import Control.Monad.IO.Class (liftIO)
import Control.Concurrent.STM (atomically)
import Data.HashMap.Strict (HashMap,
lookup)
import qualified Data.Text as T
-- | Run Amphibian monad.
runAM :: AM a -> Interface -> IO a
runAM monad interface = runReaderT monad interface
-- | Get interface.
ɡetInterface :: AM Interface
getInterface = AM ask
-- | Get configuration.
getConfig :: AM Config
getConfig = do
intf <- getInterface
liftIO . atomically $ I.getConfig intf
-- | Set configuration.
setConfig :: Config -> AM ()
setConfig config = do
intf <- getInterface
liftIO . atomically $ I.setConfig intf config
-- | Update configuration
updateConfig :: (Config -> Config) -> AM ()
updateConfig update = do
intf <- getInterface
liftIO . atomically $ do
config <- I.getConfig intf
I.setConfig intf (update config)
-- | Get connection configuration.
getConnectionConfig :: ConnectionManager -> AM (Maybe ConnectionConfig)
getConnectionConfig manager = do
intf <- getInterface
liftIO . atomically $ I.getConnectionConfig intf manager
-- | Set connection configuration
setConnectionConfig :: ConnectionManager -> ConnectionConfig -> AM ()
setConnectionConfig manager config = do
intf <- getInterface
liftIO . atomically $ I.setConnectionConfig intf config
-- | Update connection configuration
updateConnectionConfig :: (ConnectionConfig -> ConnectionConfig) -> ConnectionManager -> AM ()
updateConnectionConfig update manager = do
intf <- getInterface
liftIO . atomically $ do
config <- I.getConnectionConfig intf manager
I.setConnectionConfig intf manager (update config)
-- | Look up text, and return the provided key text if no text is found.
lookupText :: T.Text -> AM T.Text
lookupText key = do
intf <- getInterface
liftIO . atomically $ I.lookupText intf key
-- | Get connection managers.
getConnectionManagers :: AM [ConnectionManager]
getConnectionManagers = do
intf <- getInterface
liftIO . atomically $ I.getConnectionManagers intf
-- | Register connection manager.
registerConnectionManager :: ConnectionManager -> AM ()
registerConnectionManager manager = do
intf <- getInterface
liftIO . atomically $ I.registerConnectionManager intf manager
-- | Unregister connection manager.
unregisterConnectionManager :: ConnectionManager -> AM ()
unregisterConnectionManager manager = do
intf <- getInterface
liftIO . atomically $ I.unregisterConnectionManager intf manager
-- | Get channels.
getChannels :: AM [Channel]
getChannels = do
intf <- getInterface
liftIO . atomically $ I.getChannels intf
-- | Register channel.
registerChannel :: Channel -> AM ()
registerChannel channel = do
intf <- getInterface
liftIO . atomically $ I.registerChannel intf channel
-- | Unregister channel.
unregisterChannel :: Channel -> AM ()
unregisterChannel channel = do
intf <- getInterface
liftIO . atomically $ I.unregisterChannel intf channel
-- | Get users.
getUsers :: AM [User]
getUsers = do
intf <- getInterface
liftIO . atomically $ I.getUsers intf
-- | Register user.
registerUser :: User -> AM ()
registerUser user = do
intf <- getInterface
liftIO . atomically $ I.registerUser intf user
-- | Unregister user.
unregisterUser :: User -> AM ()
unregisterUser user = do
intf <- getInterface
liftIO . atomically $ I.unregisterUser intf user
-- | Get frames.
getFrames :: AM [Frame]
getFrames = do
intf <- getInterface
liftIO . atomically $ I.getFrames intf
-- | Register frame.
registerFrame :: Frame -> AM ()
registerFrame frame = do
intf <- getInterface
liftIO . atomically $ I.registerFrame intf frame
-- | Unregister frame.
unregisterFrame :: Frame -> AM ()
unregisterFrame frame = do
intf <- getInterface
liftIO . atomically $ I.unregisterFrame intf frame
-- | Get plugins.
getPlugins :: AM [Plugin]
getPlugins = do
intf <- getInterface
liftIO . atomically $ I.getPlugins intf
-- | Register plugin.
registerPlugin :: Plugin -> AM ()
registerPlugin plugin = do
intf <- getInterface
liftIO . atomically $ I.registerPlugin intf plugin
-- | Unregister plugin.
unregisterPlugin :: Plugin -> AM ()
unregisterPlugin plugin = do
intf <- getInterface
liftIO . atomically $ I.unregisterPlugin intf plugin
-- | Get frontend.
getFrontend :: AM (Maybe Frontend)
getFrontend = do
intf <- getInterface
liftIO . atomically $ I.getFrontend intf
-- | Register frontend.
registerFrontend :: Frontend -> AM ()
registerFrontend frontend = do
intf <- getInterface
liftIO . atomically $ I.registerFrontend intf frontend
-- | Unregister frontend.
unregisterFrontend :: Frontend -> AM ()
unregisterFrontend frontend = do
intf <- getInterface
liftIO . atomically $ I.unregisterFrontend intf frontend
-- | Get input dispatcher.
getInputDispatcher :: AM (Maybe InputDispatcher)
getInputDispatcher = do
intf <- getInterface
liftIO . atomically $ I.getInputDispatcher intf
-- | Register input dispatcher.
registerInputDispatcher :: InputDispatcher -> AM ()
registerInputDispatcher dispatcher = do
intf <- getInterface
liftIO . atomically $ I.registerInputDispatcher intf dispatcher
-- | Unregister input dispatcher.
unregisterInputDispatcher :: InputDispatcher -> AM ()
unregisterInputDispatcher dispatcher = do
intf <- getInterface
liftIO . atomically $ I.unregisterInputDispatcher intf dispatcher
-- | Get CTCP dispatcher.
getCtcpDispatcher :: AM (Maybe CtcpDispatcher)
getCtcpDispatcher = do
intf <- getInterface
liftIO . atomically $ I.getCtcpDispatcher intf
-- | Register CTCP dispatcher.
registerCtcpDispatcher :: CtcpDispatcher -> AM ()
registerCtcpDispatcher dispatcher = do
intf <- getInterface
liftIO . atomically $ I.registerCtcpDispatcher intf dispatcher
-- | Unregister CTCP dispatcher.
unregisterCtcpDispatcher :: CtcpDispatcher -> AM ()
unregisterCtcpDispatcher dispatcher = do
intf <- getInterface
liftIO . atomically $ I.unregisterCtcpDispatcher intf dispatcher
-- | Get plugin server.
getPluginServer :: AM (Maybe PluginServer)
getPluginServer = do
intf <- getInterface
liftIO . atomically $ I.getPluginServer intf
-- | Register plugin server.
registerPluginServer :: PluginServer -> AM ()
registerPluginServer server = do
intf <- getInterface
liftIO . atomically $ I.registerPluginServer intf server
-- | Unregister plugin server.
unregisterPluginServer :: PluginServer -> AM ()
unregisterPluginServer server = do
intf <- getInterface
liftIO . atomically $ I.unregisterPluginServer intf server
-- | Get connection manager server.
getConnectionManagerServer :: AM (Maybe ConnectionManagerServer)
getConnectionManagerServer = do
intf <- getInterface
liftIO . atomically $ I.getConnectionManagerServer intf
-- | Register connection manager server.
registerConnectionManagerServer :: ConnectionManagerServer -> AM ()
registerConnectionManagerServer server = do
intf <- getInterface
liftIO . atomically $ I.registerConnectionManagerServer intf server
-- | Unregister connection manager server.
unregisterConnectionManagerServer :: ConnectionManagerServer -> AM ()
unregisterConnectionManagerServer server = do
intf <- getInterface
liftIO . atomically $ I.unregisterConnectionManagerServer intf server
-- | Get channel server.
getChannelServer :: AM (Maybe ChannelServer)
getChannelServer = do
intf <- getInterface
liftIO . atomically $ I.getChannelServer intf
-- | Register channel server.
registerChannelServer :: ChannelServer -> AM ()
registerChannelServer server = do
intf <- getInterface
liftIO . atomically $ I.registerChannelServer intf server
-- | Unregister channel server.
unregisterChannelServer :: ChannelServer -> AM ()
unregisterChannelServer server = do
intf <- getInterface
liftIO . atomically $ I.unregisterChannelServer intf server
| tabemann/amphibian | src_old/Network/IRC/Client/Amphibian/Monad.hs | bsd-3-clause | 10,691 | 0 | 12 | 1,936 | 2,207 | 1,122 | 1,085 | 219 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module CouchGames.Player (
Player(..)
) where
import Data.Int
import Data.Text
import Elm.Derive
data Player = Player
{ playerId :: Int
, displayName :: Text
} deriving (Show, Eq)
deriveBoth defaultOptions ''Player
| alexlegg/couchgames | src/CouchGames/Player.hs | bsd-3-clause | 280 | 0 | 8 | 67 | 73 | 43 | 30 | 11 | 0 |
module TestSig (testTree) where
import Jade.Types
import qualified Data.List as DL
import qualified Data.ByteString as DB
import qualified Jade.TopLevel as TopLevel
import qualified Jade.Sig as Sig
import qualified Jade.Decode as Decode
import qualified Jade.Module as Modul
import qualified Jade.Net as Net
import qualified Jade.Wire as Wire
import Text.Format
import Control.Monad
import Jade.Rawr.Types
import Jade.Util
--------------------------------------------------------------------------------
testSigWidth :: Monad m => Sig -> Integer -> m TestState
testSigWidth sig expectedWidth = do
let w = Sig.width sig
if w == expectedWidth
then return Pass
else return (Fail (fmt "expected {0}, got {1}, sig: {2}" (expectedWidth, w, sig)))
testTreeSigWidth :: TestTree
testTreeSigWidth =
let t sig exp = TestCase "sigwidth" (testSigWidth sig exp)
in TestTree "width" $ [ t (SigSimple "asdf") 1
, t (SigRange "" 7 0) 8
, t (SigRange "" 0 7) 8
, t (SigRangeStep "" 31 0 1) 32
, t (SigRangeStep "" 28 0 4) 8
, t (SigRangeStep "" 0 0 0) 1
] ++ [t (SigRangeStep "" i 0 1) (i+1) | i <- [0 .. 12]]
testTree = TestTree "Sig" [ testTreeSigWidth
, testTreeTwosComplement
]
testTwosCompement val w exp = do
let tc = Sig.twosComplement val w
if tc == exp
then return Pass
else return (Fail (fmt "expected {0}, got {1}" (exp, tc)))
testTreeTwosComplement :: TestTree
testTreeTwosComplement =
let t val w exp = TestCase "twos complement" $ testTwosCompement val w exp
in TestTree "twosComplement" $ [ t 0 1 [L]
, t 1 1 [H]
, t 0 2 [L, L]
, t 1 2 [L, H]
, t 2 2 [H, L]
, t 3 2 [H, H]
]
| drhodes/jade2hdl | jade-decode/test/TestSig.hs | bsd-3-clause | 2,023 | 0 | 13 | 720 | 616 | 333 | 283 | 46 | 2 |
{-# LANGUAGE RankNTypes #-}
-- | Add trace calls to a module.
module Language.Haskell.Trace.Preprocessor (addTracing) where
import Data.Data
import Data.Maybe
import Language.Haskell.Exts.Annotated
-- | Add tracing wrappers to all expressions in the module.
addTracing :: FilePath -> [(Int,Int,Int,Int)] -> Module SrcSpanInfo -> Module SrcSpanInfo
addTracing fp filters (Module an h ps imports ds) =
Module an
h
ps
(i : imports)
(gtraverseT wrap ds)
where i =
ImportDecl an
(ModuleName an "Language.Haskell.Trace")
True
False
False
Nothing
Nothing
Nothing
wrap :: Exp SrcSpanInfo -> Exp SrcSpanInfo
wrap e | null filters || any (inside (srcInfoSpan (ann e))) filters =
case e of
Paren a e' -> Paren a (wrap e')
_ ->
Paren a
(Case a
(App a
(App a
(Var a (UnQual a (Ident a "Language.Haskell.Trace.trace")))
(Lit a (String a fp fp)))
(Tuple a
Boxed
[num srcSpanStartLine
,num srcSpanStartColumn
,num srcSpanEndLine
,num srcSpanEndColumn]))
[Alt a
(PTuple a Boxed [])
(UnGuardedRhs a
(gtraverseT wrap e))
Nothing])
where num f =
Lit a
(Int a
(fromIntegral (f s))
(show (f s)))
a = ann e
s = srcInfoSpan a
wrap e = gtraverseT wrap e
addTracing _ _ x = x
-- | Is the given src span inside the given range?
inside :: SrcSpan -> (Int,Int,Int,Int) -> Bool
inside (SrcSpan _ sl sc el ec) (sl',sc',el',ec') =
((sl,sc) >= (sl',sc')) &&
((el,ec) <= (el',ec'))
-- | Traverse a data type, left to stop, right to keep going after
-- updating the value.
gtraverseT :: (Data a,Typeable b)
=> (Typeable b => b -> b) -> a -> a
gtraverseT f =
gmapT (\x ->
case cast x of
Nothing -> gtraverseT f x
Just b -> fromMaybe x (cast (f b)))
| chrisdone/haskell-trace | src/Language/Haskell/Trace/Preprocessor.hs | bsd-3-clause | 2,640 | 0 | 23 | 1,307 | 698 | 363 | 335 | 63 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.Monitors.MPD
-- Copyright : (c) Jose A Ortega Ruiz
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jose A Ortega Ruiz <jao@gnu.org>
-- Stability : unstable
-- Portability : unportable
--
-- MPD status and song
--
-----------------------------------------------------------------------------
module Plugins.Monitors.MPD ( mpdConfig, runMPD, mpdWait ) where
import Plugins.Monitors.Common
import System.Console.GetOpt
import qualified Network.MPD as M
mpdConfig :: IO MConfig
mpdConfig = mkMConfig "MPD: <state>"
[ "bar", "state", "statei", "volume", "length"
, "lapsed", "remaining", "plength", "ppos", "file"
, "name", "artist", "composer", "performer"
, "album", "title", "track", "genre"
]
data MOpts = MOpts
{ mPlaying :: String
, mStopped :: String
, mPaused :: String
}
defaultOpts :: MOpts
defaultOpts = MOpts
{ mPlaying = ">>"
, mStopped = "><"
, mPaused = "||"
}
options :: [OptDescr (MOpts -> MOpts)]
options =
[ Option "P" ["playing"] (ReqArg (\x o -> o { mPlaying = x }) "") ""
, Option "S" ["stopped"] (ReqArg (\x o -> o { mStopped = x }) "") ""
, Option "Z" ["paused"] (ReqArg (\x o -> o { mPaused = x }) "") ""
]
runMPD :: [String] -> Monitor String
runMPD args = do
opts <- io $ mopts args
let mpd = M.withMPD
status <- io $ mpd M.status
song <- io $ mpd M.currentSong
s <- parseMPD status song opts
parseTemplate s
mpdWait :: IO ()
mpdWait = M.withMPD idle >> return ()
where idle = M.idle [M.PlayerS, M.MixerS]
mopts :: [String] -> IO MOpts
mopts argv =
case getOpt Permute options argv of
(o, _, []) -> return $ foldr id defaultOpts o
(_, _, errs) -> ioError . userError $ concat errs
parseMPD :: M.Response M.Status -> M.Response (Maybe M.Song) -> MOpts
-> Monitor [String]
parseMPD (Left e) _ _ = return $ show e:repeat ""
parseMPD (Right st) song opts = do
songData <- parseSong song
bar <- showPercentBar (100 * b) b
return $ [bar, ss, si, vol, len, lap, remain, plen, ppos] ++ songData
where s = M.stState st
ss = show s
si = stateGlyph s opts
vol = int2str $ M.stVolume st
(p, t) = M.stTime st
[lap, len, remain] = map showTime [floor p, t, max 0 (t - floor p)]
b = if t > 0 then realToFrac $ p / fromIntegral t else 0
plen = int2str $ M.stPlaylistLength st
ppos = maybe "" (int2str . (+1)) $ M.stSongPos st
stateGlyph :: M.State -> MOpts -> String
stateGlyph s o =
case s of
M.Playing -> mPlaying o
M.Paused -> mPaused o
M.Stopped -> mStopped o
parseSong :: M.Response (Maybe M.Song) -> Monitor [String]
parseSong (Left _) = return $ repeat ""
parseSong (Right Nothing) = return $ repeat ""
parseSong (Right (Just s)) =
let join [] = ""
join (x:xs) = foldl (\a o -> a ++ ", " ++ o) x xs
str sel = maybe "" (join . map M.toString) (M.sgGetTag sel s)
sels = [ M.Name, M.Artist, M.Composer, M.Performer
, M.Album, M.Title, M.Track, M.Genre ]
fields = M.toString (M.sgFilePath s) : map str sels
in mapM showWithPadding fields
showTime :: Integer -> String
showTime t = int2str minutes ++ ":" ++ int2str seconds
where minutes = t `div` 60
seconds = t `mod` 60
int2str :: (Show a, Num a, Ord a) => a -> String
int2str x = if x < 10 then '0':sx else sx where sx = show x
| raboof/xmobar | src/Plugins/Monitors/MPD.hs | bsd-3-clause | 3,502 | 0 | 13 | 875 | 1,346 | 720 | 626 | 79 | 3 |
{-# LANGUAGE NoImplicitPrelude, MagicHash, ScopedTypeVariables, KindSignatures,
UnboxedTuples, FlexibleContexts, UnliftedFFITypes, TypeOperators,
AllowAmbiguousTypes, DataKinds, TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Java.Utils
-- Copyright : (c) Rahul Muttineni 2016
--
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : rahulmutt@gmail.com
-- Stability : provisional
-- Portability : portable
--
-- The utility functions for the Java FFI.
--
-----------------------------------------------------------------------------
module Java.Utils
( JClass
, getClass
, toString
, equals
, classObject
, hashCode
, Proxy(..)
, eqObject#
, toString#
, safeDowncast
, Void
, Comparator
, Comparable
, Enum )
where
import GHC.Base
import Data.Proxy
import Java.String
data {-# CLASS "java.lang.Class" #-} JClass a = JClass (Object# (JClass a))
deriving Class
getClass :: forall a. Class a => Proxy a -> JClass a
getClass _ = forName (classIdentifier (proxy# :: Proxy# a))
foreign import java unsafe "@static java.lang.Class.forName" forName :: String -> JClass a
foreign import java unsafe classObject :: (a <: Object) => a -> JClass a
foreign import java unsafe toString :: (a <: Object) => a -> JString
foreign import java unsafe hashCode :: (a <: Object) => a -> Int
foreign import java unsafe equals :: (a <: Object, b <: Object)
=> a -> b -> Bool
foreign import java unsafe "equals" eqObject# :: Object# a -> Object# b -> Bool
foreign import java unsafe "toString" toString# :: Object# a -> String
foreign import java unsafe "@static eta.base.Utils.convertInstanceOfObject"
castObject :: (t <: Object, o <: Object) => o -> JClass t -> Maybe t
{-# INLINE safeDowncast #-}
safeDowncast :: forall a b. (Class a, Class b) => a -> Maybe b
safeDowncast x = castObject x (getClass (Proxy :: Proxy b))
-- Start java.lang.Void
data {-# CLASS "java.lang.Void" #-} Void = Void (Object# Void)
deriving Class
-- End java.lang.Void
-- Start java.util.Comparator
data {-# CLASS "java.util.Comparator" #-} Comparator t = Comparator (Object# (Comparator t))
deriving Class
foreign import java unsafe "@interface compare"
compare :: (t <: Object, b <: (Comparator t)) => t -> t -> Java b Int
foreign import java unsafe "@interface equals"
equalsComparator :: (t <: Object, b <: (Comparator t)) => Object -> Java b Bool
-- End java.util.Comparator
-- Start java.lang.Enum
data {-# CLASS "java.lang.Enum" #-} Enum e = Enum (Object# (Enum e))
deriving Class
type instance Inherits (Enum e) = '[Object, Comparable e]
foreign import java unsafe getDeclaringClass :: (e <: Enum e) => Java e (JClass e)
foreign import java unsafe name :: (e <: Enum e) => Java e String
foreign import java unsafe ordinal :: (e <: Enum e) => Java e Int
-- End java.lang.Enum
| pparkkin/eta | libraries/base/Java/Utils.hs | bsd-3-clause | 2,981 | 26 | 10 | 586 | 771 | 425 | 346 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Tom.RPC
(
call, call',
Method(..),
RPCError(..),
showError,
serve,
MethodHandler,
)
where
-- General
import BasePrelude hiding (yield)
-- Bytestring
import qualified Data.ByteString.Lazy as BSL
-- Containers
import Data.Map (Map)
-- UUID
import Data.UUID
-- Conduit
import Data.Conduit
import Data.Conduit.List as CList
import Data.Conduit.Network as CNetwork
import Data.Conduit.Serialization.Binary as CBinary
-- Binary
import Data.Binary
-- Tom-specific
import Tom.Reminders (Reminder)
data RPCError = ServerNotRunning | NoResponse | ServerError String
deriving (Show)
showError :: RPCError -> String
showError ServerNotRunning = "couldn't connect to the daemon; run tom-daemon"
showError NoResponse = "no response from the daemon"
showError (ServerError s) = s
data Method a where
AddReminder :: Reminder -> Method ()
EnableReminder :: UUID -> Method ()
DisableReminder :: UUID -> Method ()
GetRemindersOn :: Method (Map UUID Reminder)
GetRemindersOff :: Method (Map UUID Reminder)
data SomeMethod = forall a. Binary a => SomeMethod (Method a)
instance Binary SomeMethod where
put s = case s of
SomeMethod (AddReminder x) -> put (0 :: Int) >> put x
SomeMethod (EnableReminder x) -> put (1 :: Int) >> put x
SomeMethod (DisableReminder x) -> put (2 :: Int) >> put x
SomeMethod GetRemindersOn -> put (3 :: Int)
SomeMethod GetRemindersOff -> put (4 :: Int)
get = do
t :: Int <- get
case t of
0 -> SomeMethod . AddReminder <$> get
1 -> SomeMethod . EnableReminder <$> get
2 -> SomeMethod . DisableReminder <$> get
3 -> pure (SomeMethod GetRemindersOn)
4 -> pure (SomeMethod GetRemindersOff)
n -> error $ "SomeMethod: unknown tag value: " ++ show n
type MethodHandler = forall a. Binary a => Method a -> IO (Either String a)
serve :: MethodHandler -> IO ()
serve handler = do
let settings = serverSettings 54160 "*"
runTCPServer settings $ \appData -> do
appSource appData $$
CBinary.conduitDecode =$=
CList.mapM (\(SomeMethod x) -> BSL.toStrict . encode <$> handler x) =$=
appSink appData
-- TODO: test several ports (random but predetermined) instead of using a
-- predefined value
call :: Binary a => Method a -> IO (Either RPCError a)
call x = do
let encoded = BSL.toStrict (encode (SomeMethod x))
settings = clientSettings 54160 "127.0.0.1"
mbRes <- try $ runTCPClient settings $ \appData -> do
yield encoded $$ appSink appData
mbRes <- appSource appData $$ CBinary.conduitDecode =$= await
return $ case mbRes of
Nothing -> Left NoResponse
Just (Left err) -> Left (ServerError err)
Just (Right res) -> Right res
case mbRes of
Left e
| isDoesNotExistError e -> return (Left ServerNotRunning)
| otherwise -> ioError e
Right res -> return res -- can still be Left
-- (for instance, Left NoResponse)
call' :: Binary a => Method a -> IO a
call' x = do
mbRes <- call x
case mbRes of
Left e -> error (showError e)
Right res -> return res
| aelve/tom | lib/Tom/RPC.hs | bsd-3-clause | 3,358 | 0 | 18 | 801 | 1,030 | 525 | 505 | 84 | 4 |
{-# LANGUAGE GADTs #-}
module Data.TypedMap where
-- Move the stuff below elsewhere
class Show1 f where
show1 :: f a -> String
class Show2 f where
show2 :: Show1 v => f v a -> String
data Equal a b where
Refl :: Equal a a
data Compare1 a b where
LT1 :: Compare1 a b
EQ1 :: Compare1 a a
GT1 :: Compare1 a b
class Eq1 f where
(===) :: f a -> f b -> Maybe (Equal a b)
class Eq1 f => Ord1 f where
compare1 :: f a -> f b -> Compare1 a b
data P a f b = P a (f b)
instance (Eq a, Eq1 f) => Eq1 (P a f) where
P a1 f1 === P a2 f2
| a1 /= a2 = Nothing
| otherwise = f1 === f2
-- Now write some kind of balanced binary tree that uses Ord1
-- In the meantime, just use association lists. These support multiple
-- associations of the same key to many values.
data Datum k v where
Datum :: k a -> v a -> Datum k v
newtype Map k v = Map { assocs :: [Datum k v] }
empty :: Map k v
empty = Map []
insert :: k a -> v a -> Map k v -> Map k v
insert key value = Map . (Datum key value:) . assocs
lookup :: Eq1 k => k a -> Map k v -> Maybe (v a)
lookup key = findKey . assocs
where findKey [] = Nothing
findKey (Datum key' value:rest) =
case key === key' of
Nothing -> findKey rest
Just Refl -> Just value
| bobatkey/Forvie | src/Data/TypedMap.hs | bsd-3-clause | 1,320 | 0 | 11 | 416 | 533 | 270 | 263 | 35 | 3 |
module Problem10 where
--
-- Problem 10: Summation of primes
--
-- The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
-- Find the sum of all the primes below two million.
-- https://stackoverflow.com/a/27464965/248948
squareRoot :: Integral t => t -> t
squareRoot n
| n > 0 = babylon n
| n == 0 = 0
| n < 0 = error "Negative input"
where
babylon a | a > b = babylon b
| otherwise = a
where b = quot (a + quot n a) 2
altPrimeSieve :: Int -> [Int]
altPrimeSieve n = filter isPrime [2..n] where
isPrime p = all (\x -> p `mod` x /= 0) [2..(squareRoot p)]
problem10 :: Int
problem10 = sum $ altPrimeSieve 2000000
| c0deaddict/project-euler | src/Part1/Problem10.hs | bsd-3-clause | 672 | 0 | 12 | 192 | 223 | 114 | 109 | 14 | 1 |
{-# LANGUAGE ExistentialQuantification, TypeFamilies, FlexibleInstances, FlexibleContexts, UndecidableInstances, ScopedTypeVariables #-}
module Concurrency.Simulator (Thread, createEmptyVar, createFullVar, get, set, log, yield, fork,
PureMonadTransformer, PureMonad, PureThread, runPureMonadT, runPureMonad,
runIO, verboseRunIO,
RunResult(..),
Stream(..), Choice, Interleaving, runWithInterleaving,
allRuns, findDeadlock) where
import Prelude hiding (log, lookup, null)
import Control.Monad.Trans.Free
import Control.Monad (when)
import Control.Monad.IO.Class
import System.Random
import Control.Concurrent (forkIO, myThreadId, threadDelay)
import Control.Concurrent.MVar
import Data.Sequence (singleton, viewl, ViewL(..), (<|), (|>))
import Data.IORef
import qualified Data.Map.Strict as M
import Control.Monad.Trans.Class
import qualified Control.Monad.State.Strict as S
import qualified Control.Monad.Writer as W
import Data.Functor.Identity (Identity, runIdentity)
import Data.List (find)
import qualified Data.DList as DL
import Unsafe.Coerce (unsafeCoerce)
import Debug.Trace (trace)
data ThreadF var next = forall a. CreateEmptyVar (var a -> next)
| forall a. CreateFullVar a (var a -> next)
| forall a. Get (var a) (a -> next)
| forall a. Set (var a) a next
| Yield next
| Log String next
| Fork next next
instance Functor (ThreadF var) where
fmap f (CreateEmptyVar cont) = CreateEmptyVar (f . cont)
fmap f (CreateFullVar val cont) = CreateFullVar val (f . cont)
fmap f (Get var cont) = Get var (f . cont)
fmap f (Set var val cont) = Set var val (f cont)
fmap f (Yield cont) = Yield (f cont)
fmap f (Log str cont) = Log str (f cont)
fmap f (Fork cont1 cont2) = Fork (f cont1) (f cont2)
type Thread m var = FreeT (ThreadF var) m
createEmptyVar :: Monad m => Thread m var (var a)
createEmptyVar = liftF (CreateEmptyVar id)
createFullVar :: Monad m => a -> Thread m var (var a)
createFullVar val = liftF (CreateFullVar val id)
get :: Monad m => var a -> Thread m var a
get var = liftF (Get var id)
set :: Monad m => var a -> a -> Thread m var ()
set var val = liftF (Set var val ())
yield :: Monad m => Thread m var ()
yield = liftF (Yield ())
log :: Monad m => String -> Thread m var ()
log str = liftF (Log str ())
cFork :: Monad m => Thread m var Bool
cFork = liftF (Fork False True)
fork :: Monad m => Thread m var a -> Thread m var ()
fork thread = do
child <- cFork
when child $ do
_ <- thread
return ()
sleep :: MonadIO m => m ()
sleep = liftIO $ randomRIO (0, 300000) >>= threadDelay
atomicPrint :: MVar () -> String -> IO ()
atomicPrint var str = do
takeMVar var
putStrLn str
putMVar var ()
runIO :: Thread IO MVar a -> IO ()
runIO action = do
printLock <- newMVar ()
runIO' printLock action
where runIO' printLock a = do
inst <- runFreeT a
case inst of
Free (CreateEmptyVar cont) -> do
var <- newEmptyMVar
recurse (cont var)
Free (CreateFullVar val cont) -> do
var <- newMVar val
recurse (cont var)
Free (Get var cont) -> do
val <- takeMVar var
recurse (cont val)
Free (Set var val cont) -> do
putMVar var val
recurse cont
Free (Yield cont) -> do
sleep
recurse cont
Free (Log str cont) -> do
ap str
recurse cont
Free (Fork cont1 cont2) -> do
_ <- forkIO $ recurse cont2
recurse cont1
Pure _ -> return ()
where ap = atomicPrint printLock
recurse = runIO' printLock
data WMVar a = WMVar (MVar a) Int
varName :: WMVar a -> String
varName (WMVar _ i) = show i
getNextIdx :: IORef Int -> IO Int
getNextIdx next = atomicModifyIORef' next (\n -> (n+1, n))
newEmptyWMVar :: IORef Int -> IO (WMVar a)
newEmptyWMVar next = WMVar <$> newEmptyMVar <*> getNextIdx next
newFullWMVar :: IORef Int -> a -> IO (WMVar a)
newFullWMVar next val = WMVar <$> newMVar val <*> getNextIdx next
takeWMVar :: WMVar a -> IO a
takeWMVar (WMVar var _) = takeMVar var
putWMVar :: WMVar a -> a -> IO ()
putWMVar (WMVar var _ ) val = putMVar var val
verboseRunIO :: Thread IO WMVar a -> IO ()
verboseRunIO action = do
printLock <- newMVar ()
nextVarId <- newIORef 0
verboseRunIO' printLock nextVarId action
where verboseRunIO' printLock nextVarId a = do
instr <- runFreeT a
case instr of
Free (CreateEmptyVar cont) -> do
var <- newEmptyWMVar nextVarId
ap ("new empty var " ++ varName var)
recur (cont var)
Free (CreateFullVar val cont) -> do
var <- newFullWMVar nextVarId val
ap ("new full var " ++ varName var)
recur (cont var)
Free (Get var cont) -> do
val <- takeWMVar var
ap ("taken var " ++ varName var)
recur (cont val)
Free (Set var val cont) -> do
putWMVar var val
ap ("put var " ++ varName var)
recur cont
Free (Yield cont) -> do
sleep
recur cont
Free (Log str cont) -> do
ap str
recur cont
Free (Fork cont1 cont2) -> do
newThreadId <- forkIO $ recur cont2
ap ("fork: " ++ show newThreadId)
recur cont1
Pure _ -> ap "return"
where ap str = do
threadId <- myThreadId
atomicPrint printLock (show threadId ++ ": " ++ str)
recur = verboseRunIO' printLock nextVarId
class Monad m => MonadSharedState m where
type SVar m :: * -> *
newEmptySVar :: m (SVar m a)
newFullSVar :: a -> m (SVar m a)
readSVar :: SVar m a -> m (Maybe a)
writeSVar :: SVar m a -> Maybe a -> m ()
putLog :: String -> m ()
newtype MaybeRef a = MaybeRef (IORef (Maybe a))
instance MonadSharedState IO where
type SVar IO = MaybeRef
newEmptySVar = fmap MaybeRef (newIORef Nothing)
newFullSVar val = fmap MaybeRef (newIORef (Just val))
readSVar (MaybeRef var) = readIORef var
writeSVar (MaybeRef var) val = writeIORef var val
putLog = putStrLn
data Opaque = forall a. Opaque a
toOpaque :: a -> Opaque
toOpaque x = Opaque x
fromOpaque :: Opaque -> a
fromOpaque (Opaque x) = unsafeCoerce x
newtype Var a = Var Int
type BindingsMap = M.Map Int (Maybe Opaque)
data Bindings = Bindings !BindingsMap !Int
emptyBindings :: Bindings
emptyBindings = Bindings M.empty 0
newEmptyVariable :: Bindings -> (Var a, Bindings)
newEmptyVariable (Bindings map next) = (Var next, Bindings newMap newNext)
where newMap = M.insert next Nothing map
newNext = next + 1
newFullVariable :: a -> Bindings -> (Var a, Bindings)
newFullVariable val (Bindings map next) = (Var next, Bindings newMap newNext)
where newMap = M.insert next (Just (toOpaque val)) map
newNext = next + 1
getValue :: Var a -> Bindings -> Maybe a
getValue (Var var) (Bindings map _) = case M.lookup var map of
Nothing -> error "read of unbound variable"
Just Nothing -> Nothing
Just (Just val) -> Just (fromOpaque val)
setValue :: Var a -> Maybe a -> Bindings -> Bindings
setValue (Var var) new (Bindings map next) = Bindings (M.alter f var map) next
where f prev = case prev of
Nothing -> error "write of unbound variable"
Just old -> case (old, new) of
(Nothing, Nothing) -> error "clear of empty variable"
(Nothing, Just val) -> Just (Just (toOpaque val))
(Just _, Nothing) -> Just Nothing
(Just _, Just _) -> error "set of set variable"
-- type PureMonadTransformer m = S.StateT Bindings (W.WriterT [String] m)
type PureMonadTransformer m = W.WriterT [String] (S.StateT Bindings m)
type PureMonad = PureMonadTransformer Identity
type PureThread = Thread PureMonad (SVar PureMonad)
runPureMonadT :: Monad m => PureMonadTransformer m a -> m (a, [String])
-- runPureMonadT act = W.runWriterT (S.evalStateT act emptyBindings)
runPureMonadT act = S.evalStateT (W.runWriterT act) emptyBindings
runPureMonad :: PureMonad a -> (a, [String])
runPureMonad = runIdentity . runPureMonadT
instance Monad m => MonadSharedState (PureMonadTransformer m) where
type SVar (PureMonadTransformer m) = Var
newEmptySVar = S.state newEmptyVariable
newFullSVar val = S.state (newFullVariable val)
readSVar var = S.gets (getValue var)
writeSVar var val = S.modify (setValue var val)
putLog str = W.tell [str]
roundRobin :: MonadSharedState m => Thread m (SVar m) a -> m ()
roundRobin t = go (singleton t)
where go ts = case viewl ts of
EmptyL -> return ()
t :< ts' -> do
x <- runFreeT t
case x of
Free (CreateEmptyVar cont) -> do
var <- newEmptySVar
go (cont var <| ts')
Free (CreateFullVar val cont) -> do
var <- newFullSVar val
go (cont var <| ts')
Free (Get var cont) -> do
may <- readSVar var
case may of
Nothing -> go (ts' |> (get var >>= cont))
Just val -> do
writeSVar var Nothing
go (cont val <| ts')
Free (Set var val cont) -> do
may <- readSVar var
case may of
Nothing -> do
writeSVar var (Just val)
go (cont <| ts')
Just _ -> go (ts |> (set var val >> cont))
Free (Yield cont) -> go (ts' |> cont)
Free (Log str cont) -> putLog str >> go (cont <| ts')
Free (Fork cont1 cont2) -> go (cont1 <| ( ts' |> cont2))
Pure _ -> go ts'
data ErasedTypeThread m var = forall a. ErasedTypeThread (Thread m var a)
wrapThread :: Thread m var a -> ErasedTypeThread m var
wrapThread t = ErasedTypeThread t
data ErasedTypeVar var = forall a. ErasedTypeVar (var a)
wrapVar :: var a -> ErasedTypeVar var
wrapVar v = ErasedTypeVar v
instance Eq (ErasedTypeVar Var) where
(ErasedTypeVar (Var lhs)) == (ErasedTypeVar (Var rhs)) = lhs == rhs
instance Ord (ErasedTypeVar Var) where
compare (ErasedTypeVar (Var lhs)) (ErasedTypeVar (Var rhs)) = compare lhs rhs
type ThreadList m var = [ErasedTypeThread m var]
type BlockedMap m var = M.Map (ErasedTypeVar var) (ThreadList m var)
addToMultimap :: Ord (ErasedTypeVar var) => BlockedMap m var-> var a -> Thread m var b -> BlockedMap m var
addToMultimap map var thr = M.alter f (wrapVar var) map
where f Nothing = Just [wrapThread thr]
f (Just thrs) = Just (wrapThread thr : thrs)
removeFromMultimap :: Ord (ErasedTypeVar var) => BlockedMap m var -> var a -> (BlockedMap m var, ThreadList m var)
removeFromMultimap map var = (newMap, thrs)
where newMap = M.delete wrappedVar map
thrs = maybe [] id (M.lookup wrappedVar map)
wrappedVar = wrapVar var
singleStep :: (MonadSharedState m, Ord (ErasedTypeVar (SVar m))) =>
Thread m (SVar m) a ->
ThreadList m (SVar m) ->
BlockedMap m (SVar m) ->
m (ThreadList m (SVar m), BlockedMap m (SVar m))
singleStep t active blocked = do
x <- runFreeT t
case x of
Free (CreateEmptyVar cont) -> do
var <- newEmptySVar
-- return (wrapThread (cont var) : active, blocked)
singleStep (cont var) active blocked
Free (CreateFullVar val cont) -> do
var <- newFullSVar val
-- return (wrapThread (cont var) : active, blocked)
singleStep (cont var) active blocked
Free (Get var cont) -> do
may <- readSVar var
case may of
Nothing -> return (active, addToMultimap blocked var (get var >>= cont))
Just val -> do
writeSVar var Nothing
let (newBlocked, newActive) = removeFromMultimap blocked var
return (wrapThread (cont val) : newActive ++ active, newBlocked)
Free (Set var val cont) -> do
may <- readSVar var
case may of
Nothing -> do
writeSVar var (Just val)
let (newBlocked, newActive) = removeFromMultimap blocked var
return (wrapThread cont : newActive ++ active, newBlocked)
Just val -> return (active, addToMultimap blocked var (set var val >> cont))
Free (Yield cont) -> return (wrapThread cont : active, blocked)
Free (Log str cont) -> do
putLog str
return (wrapThread cont : active, blocked)
-- singleStep cont active blocked
Free (Fork cont1 cont2) -> return (wrapThread cont1 : wrapThread cont2 : active, blocked)
Pure _ -> return (active, blocked)
data Stream a = Stream a (Stream a)
type Choice = Int -> Int
type Interleaving = Stream Choice
choose :: Int -> [a] -> (a, [a])
choose n lst = go lst n []
where go lst n soFar = case lst of
[] -> error "empty list"
x:xs -> case n of
0 -> (x, reverse soFar ++ xs)
_ -> go xs (n-1) (x:soFar)
data RunResult = Deadlock | AllExit | LimitReached deriving (Eq, Show)
runWithInterleaving :: (MonadSharedState m, Ord (ErasedTypeVar (SVar m))) =>
Interleaving ->
Int ->
Thread m (SVar m) a ->
m RunResult
runWithInterleaving fs maxSteps t = go fs maxSteps t [] M.empty
where go :: (MonadSharedState m, Ord (ErasedTypeVar (SVar m))) =>
Interleaving ->
Int ->
Thread m (SVar m) a ->
ThreadList m (SVar m) ->
BlockedMap m (SVar m) ->
m RunResult
go fs maxSteps t ready blocked = do
case maxSteps of
0 -> return LimitReached
_ -> do
(ready', blocked') <- singleStep t ready blocked
case ready' of
[] -> if M.null blocked' then return AllExit else return Deadlock
_ -> do
let (Stream f fs') = fs
let (wrappedChosen, rest) = choose (f (length ready')) ready'
case wrappedChosen of
ErasedTypeThread chosen -> go fs' (maxSteps-1) chosen rest blocked'
recurseL :: (b -> a -> [a] -> b) -> b -> [a] -> b
recurseL f start lst = go start lst
where go acc [] = acc
go acc (x:xs) = go (f acc x xs) xs
choices :: [a] -> [(a, [a])]
choices = reverse . snd . recurseL f (DL.empty, [])
where f (prefix, res) x xs = (DL.snoc prefix x, (x, DL.apply prefix xs) : res)
type M = PureMonadTransformer []
type T = Thread M (SVar M)
type TL = ThreadList M (SVar M)
type TM = BlockedMap M (SVar M)
class Monad m => ListAtBottom m where
liftList :: [a] -> m a
instance ListAtBottom [] where
liftList = id
instance (MonadTrans t, ListAtBottom m, Monad (t m)) => ListAtBottom (t m) where
liftList = lift . liftList
maybeTrace :: (a -> Bool) -> (a -> String) -> a -> b -> b
maybeTrace f g x y = if f x then trace (g x) y else y
allRuns :: (MonadSharedState m, Ord (ErasedTypeVar (SVar m)), ListAtBottom m) =>
Thread m (SVar m) a ->
Int ->
m RunResult
allRuns t maxSteps = go [wrapThread t] M.empty maxSteps
where go :: (MonadSharedState m, Ord (ErasedTypeVar (SVar m)), ListAtBottom m) =>
ThreadList m (SVar m) ->
BlockedMap m (SVar m) ->
Int ->
m RunResult
go ready blocked maxSteps = maybeTrace (> 7) (\n -> replicate (n-7) 'x') maxSteps $ case maxSteps of
0 -> return LimitReached
_ -> case ready of
[] -> if M.null blocked then return AllExit else return Deadlock
_ -> do
(wrapedChosen, rest) <- liftList (choices ready)
case wrapedChosen of
ErasedTypeThread chosen -> do
(ready', blocked') <- singleStep chosen rest blocked
go ready' blocked' (maxSteps-1)
findDeadlock :: T a -> Int -> Maybe [String]
findDeadlock t maxSteps = fmap snd $ find ((== Deadlock) . fst) $ runPureMonadT $ allRuns t maxSteps
| zarazek/concurrency-simulator | Concurrency/Simulator.hs | bsd-3-clause | 16,639 | 0 | 26 | 5,306 | 6,255 | 3,094 | 3,161 | 381 | 11 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.SBV.Provers.Yices
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- The connection to the Yices SMT solver
-----------------------------------------------------------------------------
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.SBV.Provers.Yices(yices) where
import qualified Control.Exception as C
import Data.Char (isDigit)
import Data.List (sortBy, isPrefixOf, intercalate, transpose, partition)
import Data.Maybe (mapMaybe, isNothing, fromJust)
import System.Environment (getEnv)
import Data.SBV.BitVectors.Data
import Data.SBV.Provers.SExpr
import Data.SBV.SMT.SMT
import Data.SBV.SMT.SMTLib
import Data.SBV.Utils.Lib (splitArgs)
-- | The description of the Yices SMT solver
-- The default executable is @\"yices-smt\"@, which must be in your path. You can use the @SBV_YICES@ environment variable to point to the executable on your system.
-- The default options are @\"-m -f\"@, which is valid for Yices 2.1 series. You can use the @SBV_YICES_OPTIONS@ environment variable to override the options.
yices :: SMTSolver
yices = SMTSolver {
name = Yices
, executable = "yices-smt"
-- , options = ["-tc", "-smt", "-e"] -- For Yices1
, options = ["-m", "-f"] -- For Yices2
, engine = \cfg _isSat qinps modelMap _skolemMap pgm -> do
execName <- getEnv "SBV_YICES" `C.catch` (\(_ :: C.SomeException) -> return (executable (solver cfg)))
execOpts <- (splitArgs `fmap` getEnv "SBV_YICES_OPTIONS") `C.catch` (\(_ :: C.SomeException) -> return (options (solver cfg)))
let cfg' = cfg {solver = (solver cfg) {executable = execName, options = addTimeOut (timeOut cfg) execOpts}}
script = SMTScript {scriptBody = unlines (solverTweaks cfg') ++ pgm, scriptModel = Nothing}
standardSolver cfg' script id (ProofError cfg') (interpretSolverOutput cfg' (extractMap (map snd qinps) modelMap))
, xformExitCode = id
, capabilities = SolverCapabilities {
capSolverName = "Yices"
, mbDefaultLogic = Nothing
, supportsMacros = False
, supportsProduceModels = False
, supportsQuantifiers = False
, supportsUninterpretedSorts = False
, supportsUnboundedInts = False
, supportsReals = False
, supportsFloats = False
, supportsDoubles = False
}
}
where addTimeOut Nothing o = o
addTimeOut (Just i) o
| i < 0 = error $ "Yices: Timeout value must be non-negative, received: " ++ show i
| True = o ++ ["-t", show i]
sortByNodeId :: [(Int, a)] -> [(Int, a)]
sortByNodeId = sortBy (\(x, _) (y, _) -> compare x y)
extractMap :: [NamedSymVar] -> [(String, UnintKind)] -> [String] -> SMTModel
extractMap inps modelMap solverLines =
SMTModel { modelAssocs = map snd $ sortByNodeId $ concatMap (getCounterExample inps) modelLines
, modelUninterps = [(n, ls) | (UFun _ n, ls) <- uis]
, modelArrays = [(n, ls) | (UArr _ n, ls) <- uis]
}
where (modelLines, unintLines) = moveConstUIs $ break ("--- " `isPrefixOf`) solverLines
uis = extractUnints modelMap unintLines
-- another crude hack
moveConstUIs :: ([String], [String]) -> ([String], [String])
moveConstUIs (pre, post) = (pre', concatMap mkDecl extras ++ post)
where (extras, pre') = partition ("(= uninterpreted_" `isPrefixOf`) pre
mkDecl s = ["--- " ++ takeWhile (/= ' ') (drop 3 s) ++ " ---", s]
getCounterExample :: [NamedSymVar] -> String -> [(Int, (String, CW))]
getCounterExample inps line = either err extract (parseSExpr line)
where err r = error $ "*** Failed to parse Yices model output from: "
++ "*** " ++ show line ++ "\n"
++ "*** Reason: " ++ r ++ "\n"
isInput ('s':v)
| all isDigit v = let inpId :: Int
inpId = read v
in case [(s, nm) | (s@(SW _ (NodeId n)), nm) <- inps, n == inpId] of
[] -> Nothing
[(s, nm)] -> Just (inpId, s, nm)
matches -> error $ "SBV.Yices: Cannot uniquely identify value for "
++ 's':v ++ " in " ++ show matches
isInput _ = Nothing
extract (EApp [ECon "=", ECon v, ENum i]) | Just (n, s, nm) <- isInput v = [(n, (nm, mkConstCW (kindOf s) (fst i)))]
extract (EApp [ECon "=", ENum i, ECon v]) | Just (n, s, nm) <- isInput v = [(n, (nm, mkConstCW (kindOf s) (fst i)))]
extract _ = []
extractUnints :: [(String, UnintKind)] -> [String] -> [(UnintKind, [String])]
extractUnints modelMap = mapMaybe (extractUnint modelMap) . chunks
where chunks [] = []
chunks (x:xs) = let (f, r) = break ("---" `isPrefixOf`) xs in (x:f) : chunks r
-- Parsing the Yices output is done extremely crudely and designed
-- mostly by observation of Yices output. Likely to have bugs and
-- brittle as Yices evolves. We really need an SMT-Lib2 like interface.
extractUnint :: [(String, UnintKind)] -> [String] -> Maybe (UnintKind, [String])
extractUnint _ [] = Nothing
extractUnint mmap (tag : rest)
| null tag' = Nothing
| isNothing mbKnd = Nothing
| True = mapM (getUIVal knd) rest >>= \xs -> return (knd, format knd xs)
where mbKnd | "--- uninterpreted_" `isPrefixOf` tag = uf `lookup` mmap
| True = af `lookup` mmap
knd = fromJust mbKnd
tag' = dropWhile (/= '_') tag
f = takeWhile (/= ' ') (tail tag')
uf = f
af = "array_" ++ f
getUIVal :: UnintKind -> String -> Maybe (String, [String], String)
getUIVal knd s
| "default: " `isPrefixOf` s
= getDefaultVal knd (dropWhile (/= ' ') s)
| True
= case parseSExpr s of
Right (EApp [ECon "=", EApp (ECon _ : args), ENum i]) -> getCallVal knd args (fst i)
Right (EApp [ECon "=", ECon _, ENum i]) -> getCallVal knd [] (fst i)
_ -> Nothing
getDefaultVal :: UnintKind -> String -> Maybe (String, [String], String)
getDefaultVal knd n = case parseSExpr n of
Right (ENum i) -> Just $ showDefault knd (show (fst i))
_ -> Nothing
getCallVal :: UnintKind -> [SExpr] -> Integer -> Maybe (String, [String], String)
getCallVal knd args res = mapM getArg args >>= \as -> return (showCall knd as (show res))
getArg :: SExpr -> Maybe String
getArg (ENum i) = Just (show (fst i))
getArg _ = Nothing
showDefault :: UnintKind -> String -> (String, [String], String)
showDefault (UFun cnt f) res = (f, replicate cnt "_", res)
showDefault (UArr cnt f) res = (f, replicate cnt "_", res)
showCall :: UnintKind -> [String] -> String -> (String, [String], String)
showCall (UFun _ f) as res = (f, as, res)
showCall (UArr _ f) as res = (f, as, res)
format :: UnintKind -> [(String, [String], String)] -> [String]
format (UFun{}) eqns = fmtFun eqns
format (UArr{}) eqns = let fmt (f, as, r) = f ++ "[" ++ intercalate ", " as ++ "] = " ++ r in map fmt eqns
fmtFun :: [(String, [String], String)] -> [String]
fmtFun ls = map fmt ls
where fmt (f, as, r) = f ++ " " ++ unwords (zipWith align as (lens ++ repeat 0)) ++ " = " ++ r
lens = map (maximum . (0:) . map length) $ transpose [as | (_, as, _) <- ls]
align s i = take (i `max` length s) (s ++ repeat ' ')
| Copilot-Language/sbv-for-copilot | Data/SBV/Provers/Yices.hs | bsd-3-clause | 8,397 | 0 | 19 | 2,809 | 2,645 | 1,447 | 1,198 | 119 | 6 |
module Assemble where
import Codec.Picture
import System.IO
import Data.List (foldl')
import Data.ByteString (append)
assemble :: [String] -> String -> IO ()
assemble files o = do bmps <- mapM processFile files
writeBitmap o (concatBMP (concat bmps))
processFile :: String -> IO [Image PixelRGB8]
processFile file =
do r <- readBitmap file
case r of
Left e ->
do hPutStrLn stderr $ "Something went wrong when processing " ++ file
hPutStrLn stderr e
return []
Right (ImageRGB8 bmp) | imageWidth bmp == 16 && imageHeight bmp == 16
-> return [bmp]
Right _ -> do hPutStrLn stderr $ "Wrong format in " ++ file
return []
concatBMP :: [Image PixelRGB8] -> Image PixelRGB8
concatBMP images = generateImage gen 16 (16 * length images)
where gen x y = pixelAt (images !! (y `quot` 16)) x (y `rem` 16)
| josefs/gmfrm | Assemble.hs | bsd-3-clause | 935 | 0 | 16 | 281 | 342 | 166 | 176 | 23 | 3 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module TypeSystem.Expression where
{-
This module defines expressions for functions
-}
import Utils.Utils
import Utils.ToString
import Utils.ToStringExtra
import TypeSystem.Types
import TypeSystem.ParseTree
import TypeSystem.Syntax
import TypeSystem.BNF
import qualified Data.Map as M
import Data.Map (Map, singleton, empty)
import Data.Maybe
import Control.Monad
import Control.Arrow ((&&&))
import Control.Monad.State as ST
type Builtin = Bool
{-
An expression is always based on a corresponding syntacic rule.
It can be both for deconstructing a parsetree or constructing one (depending wether it is used as a pattern or not)
It might contain evaluation contexts, ascriptions, ...
-}
data Expression
= MParseTree ParseTree -- a 'value'
| MVar TypeName Name -- a variable
| MSeq MInfo [Expression]
| MCall TypeName Name Builtin [Expression] -- function call; not allowed in pattern matching
| MAscription TypeName Expression -- checks wether the expression is built by this smaller rule.
| MEvalContext TypeName Name Expression -- describes a pattern that searches a context
deriving (Show, Ord, Eq)
instance SimplyTyped Expression where
typeOf e = typeInfoOf e & either id fst
-- returns as much typeinfo as possible, thus also the parsing rule choice (index of the option) if possible
typeInfoOf :: Expression -> Either TypeName (TypeName, Int)
typeInfoOf (MVar tp _) = Left tp
typeInfoOf (MSeq tp _) = Right tp
typeInfoOf (MCall tp _ _ _) = Left tp
typeInfoOf (MAscription tp _) = Left tp
typeInfoOf (MEvalContext tp _ _) = Left tp
typeInfoOf (MParseTree pt) = typeInfoOf' pt
isMInt :: Expression -> Bool
isMInt (MParseTree pt) = isMInt' pt
isMInt _ = False
-- Searches for variable names *in the meta expression*. If a variable is used twice, it'll appear twice in the list
usedVariables :: Expression -> [(Name, TypeName)]
usedVariables (MVar tp nm) = [(nm, tp)]
usedVariables (MSeq _ es) = es >>= usedVariables
usedVariables (MCall _ _ _ es) = es >>= usedVariables
usedVariables (MAscription _ e) = usedVariables e
usedVariables (MEvalContext tp n hole)
= (n, tp) : usedVariables hole
usedVariables (MParseTree _) = []
usedFunctions :: Expression -> [(Name, Bool)]
usedFunctions (MCall _ nm bi es)
= (nm, bi):(es >>= usedFunctions)
usedFunctions (MSeq _ es) = es >>= usedFunctions
usedFunctions (MAscription _ e) = usedFunctions e
usedFunctions (MEvalContext _ _ hole)
= usedFunctions hole
usedFunctions _ = []
-- walks a expression, gives which variables have what types
expectedTyping :: Syntax -> Expression -> Either String (Map Name TypeName)
expectedTyping _ (MVar mt nm) = return $ M.singleton nm mt
expectedTyping r (MSeq _ mes) = mes |+> expectedTyping r >>= mergeContexts r
expectedTyping r (MEvalContext tp fnm hole)
= expectedTyping r hole >>= mergeContext r (M.singleton fnm tp)
expectedTyping r (MCall _ _ _ mes)
= mes |+> expectedTyping r >>= mergeContexts r
expectedTyping _ (MParseTree _) = return M.empty
expectedTyping r (MAscription _ e)
= expectedTyping r e
bnfAsExpr :: BNF -> Expression
bnfAsExpr bnf = evalState (_bnfAsExpr bnf) (negate 1::Int)
_bnfAsExpr :: BNF -> State Int Expression
_bnfAsExpr (Literal str)
= return $ MParseTree (MLiteral () _mi str)
_bnfAsExpr bnf@(BNFRuleCall r)
| isBuiltin bnf
= return $ MParseTree (MLiteral () _mi r)
| otherwise = do i <- getIndex
return $ MAscription r $ MVar r (r ++ i)
_bnfAsExpr (BNFSeq bnfs)
= bnfs |+> _bnfAsExpr |> MSeq _mi
_mi = ("", -1)
getIndex :: State Int String
getIndex = do i <- ST.get
modify (+1)
return $ if i < 0 then ""
else show i
-------------------------------------------------- HELPERS TO MERGE CONTEXTS ACCORDING TO A SYNTAX --------------------------------------------
-- same as mergeContext, but on a list
mergeContexts :: Syntax -> [Map Name TypeName] -> Either String (Map Name TypeName)
mergeContexts syntax
= foldM (mergeContext syntax) M.empty
-- Merges two contexts (variable names --> expected types) according to the subtype relationsship defined in the given bnf-rules
mergeContext :: Syntax -> Map Name TypeName -> Map Name TypeName -> Either String (Map Name TypeName)
mergeContext syntax
= mergeContextWith (mergeTypes syntax)
-- Selects the biggest of two types, or gives an error msg if it doesn't exist (thus is top).
mergeTypes :: Syntax -> Name -> TypeName -> TypeName -> Either String TypeName
mergeTypes syntax varName t1 t2
| t1 == t2 = Right t1
| t1 == topSymbol
= Right t2 -- T1 is used as input argument to a builtin function able to handle everything. We ignore the typing here
| t2 == topSymbol
= Right t1
| otherwise
= do let msg = varName ++ " is typed as both "++show t1++" and "++show t2++", which don't have a common supertype"
let bct = biggestCommonType syntax t1 t2
maybe (Left msg) Right bct
-- Merges two contexts, according to valid combination.
mergeContextWith :: (Name -> TypeName -> TypeName -> Either String TypeName) ->
Map Name TypeName -> Map Name TypeName -> Either String (Map Name TypeName)
mergeContextWith validCombo ctx1 ctx2
= inMsg "While merging contexts" $
do let common = (ctx1 `M.intersection` ctx2) & M.keys :: [Name]
let vals = common |> ((ctx1 M.!) &&& (ctx2 M.!))
-- for each common key, we see wether they are equivalent (handled by validCombo). If that is the case, we select the supremum of both types
common' <- zip common vals |> uncurry (uncurry . validCombo) & allRight
return $ M.union (M.fromList $ zip common common') $ M.union ctx1 ctx2
instance Refactorable TypeName Expression where
refactor ftn (MParseTree pt) = refactor ftn pt & MParseTree
refactor ftn (MVar tn n) = MVar (ftn tn) n
refactor ftn (MSeq mi es) = es |> refactor ftn & MSeq (refactor ftn mi)
refactor ftn (MCall tn nm bi es)
= MCall (ftn tn) nm bi (es |> refactor ftn)
refactor ftn (MAscription tn e) = MAscription (ftn tn) (e & refactor ftn)
refactor ftn (MEvalContext tn n e)
= MEvalContext (ftn tn) n (e & refactor ftn)
instance Refactorable FunctionName Expression where
refactor ffn (MCall tn nm bi es)
= MCall tn (unliftFunctionName ffn nm) bi (es |> refactor ffn)
refactor ffn (MSeq mi es) = es |> refactor ffn & MSeq mi
refactor ffn (MAscription tn e) = MAscription tn (refactor ffn e)
refactor ffn (MEvalContext tn n e)
= MEvalContext tn n (refactor ffn e)
refactor ffn pt@MParseTree{} = pt
refactor ffn var@MVar{} = var
instance ToString' ShowParens Expression where
show' = const show
debug' = show'
-- Show as if this was an expression in the typesystem file
toParsable' p (MParseTree pt) = toCoParsable' p pt
toParsable' _ (MVar _ n) = n
toParsable' p (MSeq _ exprs) = exprs |> toParsable' (deepen p) & unwords & inParens' p
toParsable' p (MCall tp nm builtin args)
= let args' = args |> toParsable' (least NotOnRoot p) & commas & inParens
typeSign = if isBuiltinName tp || tp == bottomSymbol then ""
else ":" ++ tp
in if builtin then
"!" ++ nm ++ typeSign ++ args'
else nm ++ args'
toParsable' p (MAscription nm expr) = (toParsable' (least NotOnRoot p) expr ++ ":" ++ nm) & inParens
toParsable' p (MEvalContext tp fullName hole)
= let hole' = toParsable' (least NotOnRoot p) hole
in
fullName ++ "["++ hole' ++"]"
-- Show as if this was target language code. This is not always possible
toCoParsable' p (MParseTree pt) = "("++toCoParsable' p pt++":"++typeOf pt++")"
toCoParsable' p (MSeq mt exprs) = exprs |> toCoParsable' (deepen p) & unwords
toCoParsable' p (MVar tp n) = "("++n++":"++tp++")"
toCoParsable' p expr@MCall{}
= toParsable' p expr
toCoParsable' p (MAscription as expr) = toCoParsable' p expr & inParens & (++": "++as)
toCoParsable' p ctx@MEvalContext{}
= isMeta $ toParsable' p ctx
instance ToString Expression where
toParsable = toParsable' NotOnRoot
toCoParsable = toCoParsable' NotOnRoot
debug = debug' NotOnRoot
isMeta str = "{-#" ++ str ++ "#-}"
expressionExamples :: [(Expression, String, String, String)]
expressionExamples
= [ (MVar "syntactic_rule" "x",
"Variable","Captures the argument as the name. If multiple are used in the same pattern, the captured arguments should be the same or the match fails.",
"Recalls the parsetree associated with this variable")
, (MVar "" "_", "Wildcard", "Captures the argument and ignores it", "_Not defined_")
, (_int 42, "Number", "Argument should be exactly this number", "This number")
, (_lit "Token", "Literal", "Argument should be exactly this string", "This string")
, (MCall "resultType" "func" False [MVar "sr" "arg0", MVar "sr" "arg1", MVar "sr" "..."],
"Function call", "Evaluates the function, matches if the argument equals the result. Can only use variables which are declared left of this pattern", "Evaluate this function")
, (MCall "type" "func" True [MVar "sr" "arg0", MVar "sr" "..."],
"Builtin function call", "Evaluates the builtin function, matches if the argument equals the result. Can only use variables which are declared left of this pattern", "Evaluate this builtin function, let it return a `type`")
, (MAscription "type" $ MVar "" "expr or pattern", "Ascription", "Check that the argument is an element of `type`", "Checks that an expression is of a type. Bit useless to use within expressions")
, (MEvalContext "tn" "e" $ MVar "" "expr or pattern", "Evaluation context",
"Matches the parsetree with `e`, searches a subtree in `e` which matches `pattern`", "Replugs `expr` at the same place in `e`. Only works if `e` was created with an evaluation context")
, (MSeq ("",0) [MVar "" "a", _lit "b", MSeq ("", 0) [MVar "" "nested"]],
"Sequence", "Splits the parsetree in the appropriate parts, pattern matches the subparts", "Builds the parsetree")
]
_lit str = MLiteral () ("sr", 0) str & MParseTree
_int i = MInt () ("sr", 0) i & MParseTree
| pietervdvn/ALGT | src/TypeSystem/Expression.hs | bsd-3-clause | 9,995 | 255 | 17 | 1,903 | 3,215 | 1,647 | 1,568 | 173 | 2 |
module Text.Domain.Parser.Polymorphic (
domainParser,
isAsciiAlphaNum
) where
import Text.Parser.Combinators
import Text.Parser.Char
import Data.Char (isAscii, isAlpha, isDigit)
import Data.List (intercalate)
domainParser :: (Monad m, CharParsing m) => m String
domainParser = do
labels <- label `sepBy1` (char '.')
_ <- optional (char '.')
let domain = intercalate "." labels
-- domain name must be no greater than 253 chars
if length domain <= 253
then return domain
else fail "domain length too long."
label :: (Monad m, CharParsing m) => m String
label = do
l <- satisfy isAsciiAlphaNum
abelString <- many $ satisfy isAsciiAlphaNumHyphen
let labelString = l : abelString
-- label must be no greater than 63 chars and cannot end with '-'
if length labelString <= 63 && last labelString /= '-'
then return labelString
else fail "label too long."
isAsciiAlpha :: Char -> Bool
isAsciiAlpha x = isAscii x && isAlpha x
isAsciiAlphaNum :: Char -> Bool
isAsciiAlphaNum x = isAsciiAlpha x || isDigit x
isAsciiAlphaNumHyphen :: Char -> Bool
isAsciiAlphaNumHyphen x = isAsciiAlphaNum x || x == '-'
| bitemyapp/email-validate-hs | src/Text/Domain/Parser/Polymorphic.hs | bsd-3-clause | 1,182 | 0 | 11 | 263 | 339 | 173 | 166 | 29 | 2 |
module Haseem.Analysis.VMD.RMSD where
import Haseem.Analysis.Config.FaH
import Haseem.Types
import Haseem.Monad
import Control.Monad.Trans
import Data.List
import System.Process
import System.Exit
import System.FilePath
import System.Posix.Files
import Text.Printf
newtype AtomSelect = MkAtomSelect {unAtomSelect :: String}
newtype Script = MkScript {unScript :: String}
newtype Cmd = MkCmd {unCmd :: String}
data CmdParams = CmdParams {
vmd, psf, dcd, ref, script, outfile :: FilePath
, screenout :: String
} deriving Show
data Output = DevNull | Err2Out | Out2Err | Default
save_script :: FilePath -> Script -> IO ()
save_script p s = writeFile p (unScript s)
mkCmd :: CmdParams -> Cmd
mkCmd p = let cmd = printf "%s -dispdev text -psf %s -dcd %s -f %s < %s %s"
(vmd p) (psf p) (dcd p) (ref p) (script p) (screenout p)
in MkCmd cmd
runCmd :: Cmd -> IO ExitCode
runCmd cmd = do h <- runCommand $ unCmd cmd
waitForProcess h
cmdFailed :: Cmd -> ExitCode -> Either String ()
cmdFailed _ ExitSuccess = Right ()
cmdFailed cmd (ExitFailure ec) = Left $ printf "%s failed with %d" (unCmd cmd) ec
rmsd_results :: FilePath -> IO [Double]
rmsd_results p = (map read . words) `fmap` readFile p
rmsdScript :: FilePath -> AtomSelect -> Script
rmsdScript outfile atomselect =
let script = intercalate "\n" $ [
""
, "set trajid [molinfo index 0]"
, "set refid [molinfo index 1]"
, "set outfile %s"
, "set ref [atomselect $refid \"%s\"]"
, "set traj [atomselect $trajid \"%s\"]"
, "set n [molinfo $trajid get numframes]"
, "set f [open $outfile \"w\"]"
, "for {set i 0} { $i < $n} {incr i} {"
, " $traj frame $i"
, " set fit [measure fit $ref $traj]"
, " $ref move $fit"
, " set rmsd [measure rmsd $ref $traj]"
, " puts $f \"$rmsd\""
, "}"
, "close $f"
]
in MkScript $ printf script outfile (unAtomSelect atomselect) (unAtomSelect atomselect)
data VMDConfig = VMDConfig {
vmd_bin , psfpath, foldedpath :: FilePath
, scriptname, resultsname, dcdname :: String
, atomselect :: AtomSelect
, screenoutput :: Output
}
genParams :: VMDConfig -> Dir -> (CmdParams,AtomSelect)
genParams cfg wa = (params, atomselect cfg)
where wa' = unDir wa
params = CmdParams {
vmd = vmd_bin cfg
, psf = psfpath cfg
, dcd = wa' </> dcdname cfg
, ref = foldedpath cfg
, script = wa' </> scriptname cfg
, outfile = wa' </> resultsname cfg
, screenout = case screenoutput cfg of
DevNull -> ">/dev/null"
Err2Out -> "2>&1"
Out2Err -> "1>&2"
Default -> ""
}
type GenCmdParams = Dir -> (CmdParams,AtomSelect)
type ChooseRemovableFiles = CmdParams -> [FilePath]
-- | Given a results-###.tar.bz2 file, reads calculates the RMSD
-- | relative to a given structure using VMD
rmsdCalculation :: GenCmdParams -> Haseem FaH [Double]
rmsdCalculation genparams = do
wa <- getWorkArea
let (params, atomsel) = genparams wa
cmd = mkCmd params
liftIO $ save_script (script params) (rmsdScript (outfile params) atomsel)
liftIO $ runCmd cmd
liftIO $ rmsd_results $ outfile params
rmsd :: GenCmdParams -> Haseem FaH [Double]
rmsd genParams = do
config <- getConfig
wa <- getWorkArea
rmsdCalculation genParams
| badi/haseem | Haseem/Analysis/VMD/RMSD.hs | bsd-3-clause | 3,886 | 0 | 12 | 1,347 | 926 | 507 | 419 | 88 | 4 |
module Distribution.Client.Dependency.Modular.Tree where
import Control.Applicative
import Control.Monad hiding (mapM)
import Data.Foldable
import Data.Traversable
import Prelude hiding (foldr, mapM)
import Distribution.Client.Dependency.Modular.Dependency
import Distribution.Client.Dependency.Modular.Flag
import Distribution.Client.Dependency.Modular.Package
import Distribution.Client.Dependency.Modular.PSQ as P
import Distribution.Client.Dependency.Modular.Version
-- | Type of the search tree. Inlining the choice nodes for now.
data Tree a =
PChoice QPN a (PSQ I (Tree a))
| FChoice QFN a Bool (PSQ Bool (Tree a)) -- Bool indicates whether it's trivial
| GoalChoice (PSQ OpenGoal (Tree a)) -- PSQ should never be empty
| Done RevDepMap
| Fail (ConflictSet QPN) FailReason
deriving (Eq, Show)
instance Functor Tree where
fmap f (PChoice qpn i xs) = PChoice qpn (f i) (fmap (fmap f) xs)
fmap f (FChoice qpn i b xs) = FChoice qpn (f i) b (fmap (fmap f) xs)
fmap f (GoalChoice xs) = GoalChoice (fmap (fmap f) xs)
fmap _f (Done rdm ) = Done rdm
fmap _f (Fail cs fr ) = Fail cs fr
data FailReason = InconsistentInitialConstraints
| Conflicting [Dep QPN]
| CannotInstall
| CannotReinstall
| GlobalConstraintVersion VR
| GlobalConstraintInstalled
| GlobalConstraintSource
| GlobalConstraintFlag
| BuildFailureNotInIndex PN
| MalformedFlagChoice QFN
| EmptyGoalChoice
| Backjump
deriving (Eq, Show)
-- | Functor for the tree type.
data TreeF a b =
PChoiceF QPN a (PSQ I b)
| FChoiceF QFN a Bool (PSQ Bool b)
| GoalChoiceF (PSQ OpenGoal b)
| DoneF RevDepMap
| FailF (ConflictSet QPN) FailReason
out :: Tree a -> TreeF a (Tree a)
out (PChoice p i ts) = PChoiceF p i ts
out (FChoice p i b ts) = FChoiceF p i b ts
out (GoalChoice ts) = GoalChoiceF ts
out (Done x ) = DoneF x
out (Fail c x ) = FailF c x
inn :: TreeF a (Tree a) -> Tree a
inn (PChoiceF p i ts) = PChoice p i ts
inn (FChoiceF p i b ts) = FChoice p i b ts
inn (GoalChoiceF ts) = GoalChoice ts
inn (DoneF x ) = Done x
inn (FailF c x ) = Fail c x
instance Functor (TreeF a) where
fmap f (PChoiceF p i ts) = PChoiceF p i (fmap f ts)
fmap f (FChoiceF p i b ts) = FChoiceF p i b (fmap f ts)
fmap f (GoalChoiceF ts) = GoalChoiceF (fmap f ts)
fmap _ (DoneF x ) = DoneF x
fmap _ (FailF c x ) = FailF c x
instance Foldable (TreeF a) where
foldr op e (PChoiceF _ _ ts) = foldr op e ts
foldr op e (FChoiceF _ _ _ ts) = foldr op e ts
foldr op e (GoalChoiceF ts) = foldr op e ts
foldr _ e (DoneF _ ) = e
foldr _ e (FailF _ _ ) = e
instance Traversable (TreeF a) where
traverse f (PChoiceF p i ts) = PChoiceF <$> pure p <*> pure i <*> traverse f ts
traverse f (FChoiceF p i b ts) = FChoiceF <$> pure p <*> pure i <*> pure b <*> traverse f ts
traverse f (GoalChoiceF ts) = GoalChoiceF <$> traverse f ts
traverse _ (DoneF x ) = DoneF <$> pure x
traverse _ (FailF c x ) = FailF <$> pure c <*> pure x
-- | Determines whether a tree is active, i.e., isn't a failure node.
active :: Tree a -> Bool
active (Fail _ _) = False
active _ = True
-- | Determines how many active choices are available in a node. Note that we
-- count goal choices as having one choice, always.
choices :: Tree a -> Int
choices (PChoice _ _ ts) = P.length (P.filter active ts)
choices (FChoice _ _ _ ts) = P.length (P.filter active ts)
choices (GoalChoice _ ) = 1
choices (Done _ ) = 1
choices (Fail _ _ ) = 0
-- | Variant of 'choices' that only approximates the number of choices,
-- using 'llength'.
lchoices :: Tree a -> Int
lchoices (PChoice _ _ ts) = P.llength (P.filter active ts)
lchoices (FChoice _ _ _ ts) = P.llength (P.filter active ts)
lchoices (GoalChoice _ ) = 1
lchoices (Done _ ) = 1
lchoices (Fail _ _ ) = 0
-- | Catamorphism on trees.
cata :: (TreeF a b -> b) -> Tree a -> b
cata phi x = (phi . fmap (cata phi) . out) x
trav :: (TreeF a (Tree b) -> TreeF b (Tree b)) -> Tree a -> Tree b
trav psi x = cata (inn . psi) x
-- | Paramorphism on trees.
para :: (TreeF a (b, Tree a) -> b) -> Tree a -> b
para phi = phi . fmap (\ x -> (para phi x, x)) . out
cataM :: Monad m => (TreeF a b -> m b) -> Tree a -> m b
cataM phi = phi <=< mapM (cataM phi) <=< return . out
-- | Anamorphism on trees.
ana :: (b -> TreeF a b) -> b -> Tree a
ana psi = inn . fmap (ana psi) . psi
anaM :: Monad m => (b -> m (TreeF a b)) -> b -> m (Tree a)
anaM psi = return . inn <=< mapM (anaM psi) <=< psi
| IreneKnapp/Faction | faction/Distribution/Client/Dependency/Modular/Tree.hs | bsd-3-clause | 5,110 | 0 | 11 | 1,670 | 1,957 | 993 | 964 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module StarDict.Format.TH where
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Syntax
import Control.Monad
import Data.Char
import Control.Applicative
import Data.Attoparsec.Text
buildIFOParser t = do
TyConI (DataD _ typeName _ constructors _) <- reify t
let gen comb pat = [|(string $(pat) *> char '=' *> $(comb) <* (endOfLine <|> endOfInput))|]
let buildBody = foldl1 (\a1 a2 -> [|$(a1) <|> $(a2)|])
let genParser c@(NormalC name fields) = do
let consName = litE.stringL $ map toLower $ nameBase name
parserName = mkName $ "parse" ++ nameBase name
warn x = report False ("Parser for "++nameBase name++" not built") >>
gen (global 'empty) x
parserE = case fields of
((_,ConT ty):[]) ->
case nameBase ty of
"Integer" -> gen (global 'decimal)
"Text" -> gen (appE (global 'takeTill) (global 'isEndOfLine))
_ -> warn
_ -> warn
[ValD _ body dec] <- [d|parse = $(global 'fmap) $(conE name) $(parserE consName)|]
return $ ValD (VarP parserName) body dec
ps <- mapM genParser constructors
body <- buildBody $ map (\(ValD (VarP name) _ _) -> varE name) ps
return [ValD (VarP (mkName "parseIFO")) (NormalB body) ps]
| polachok/hdict | src/StarDict/Format/TH.hs | bsd-3-clause | 1,466 | 0 | 25 | 466 | 462 | 237 | 225 | -1 | -1 |
import QC
{-- snippet testscript --}
import Prettify2
import Test.QuickCheck.Batch
options = TestOptions
{ no_of_tests = 200
, length_of_tests = 1
, debug_tests = False }
main = do
runTests "simple" options
[ run prop_empty_id
, run prop_char
, run prop_text
, run prop_line
, run prop_double
]
runTests "complex" options
[ run prop_hcat
, run prop_puncutate'
]
{-- /snippet testscript --}
| binesiyu/ifl | examples/ch11/Run.hs | mit | 512 | 1 | 9 | 184 | 113 | 59 | 54 | 17 | 1 |
-- | A renderer that produces a native Haskell 'String', mostly meant for
-- debugging purposes.
--
{-# LANGUAGE OverloadedStrings #-}
module Text.Blaze.Renderer.String
( -- fromChoiceString
-- , renderMarkup
renderHtml
) where
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as SBC
import qualified Data.HashMap.Strict as HMS
import Data.List (isInfixOf)
import Data.Monoid
import qualified Data.Text as T
import Text.Blaze.Internal
-- | Escape predefined XML entities in a string
--
escapeMarkupEntities :: String -- ^ String to escape
-> String -- ^ String to append
-> String -- ^ Resulting string
escapeMarkupEntities [] k = k
escapeMarkupEntities (c:cs) k = case c of
'<' -> '&' : 'l' : 't' : ';' : escapeMarkupEntities cs k
'>' -> '&' : 'g' : 't' : ';' : escapeMarkupEntities cs k
'&' -> '&' : 'a' : 'm' : 'p' : ';' : escapeMarkupEntities cs k
'"' -> '&' : 'q' : 'u' : 'o' : 't' : ';' : escapeMarkupEntities cs k
'\'' -> '&' : '#' : '3' : '9' : ';' : escapeMarkupEntities cs k
x -> x : escapeMarkupEntities cs k
-- | Render a 'ChoiceString'.
--
fromChoiceString :: ChoiceString -- ^ String to render
-> String -- ^ String to append
-> String -- ^ Resulting string
fromChoiceString (Static s) = getString s
fromChoiceString (String s) = escapeMarkupEntities s
fromChoiceString (Text s) = escapeMarkupEntities $ T.unpack s
fromChoiceString (ByteString s) = (SBC.unpack s ++)
fromChoiceString (PreEscaped x) = case x of
String s -> (s ++)
Text s -> (\k -> T.foldr (:) k s)
s -> fromChoiceString s
fromChoiceString (External x) = case x of
-- Check that the sequence "</" is *not* in the external data.
String s -> if "</" `isInfixOf` s then id else (s ++)
Text s -> if "</" `T.isInfixOf` s then id else (\k -> T.foldr (:) k s)
ByteString s -> if "</" `S.isInfixOf` s then id else (SBC.unpack s ++)
s -> fromChoiceString s
fromChoiceString (AppendChoiceString x y) =
fromChoiceString x . fromChoiceString y
fromChoiceString EmptyChoiceString = id
-- | Render some 'Markup' to an appending 'String'.
--
renderString
:: Markup ev -- ^ Markup to render
-> String -- ^ String to append
-> String -- ^ Resulting String
renderString =
go id
where
go :: (String -> String) -> MarkupM ev b -> String -> String
go attrs html = case html of
MapActions _f content ->
go attrs content
OnEvent _ev content ->
-- TODO (meiersi): add more details about the event handler registered.
go attrs content
Parent _ open close content ->
getString open . attrs . ('>' :) . go id content . getString close
CustomParent tag content ->
('<' :) . fromChoiceString tag . attrs . ('>' :) .
go id content .
("</" ++) . fromChoiceString tag . ('>' :)
Leaf _ begin end ->
getString begin . attrs . getString end
CustomLeaf tag close ->
('<' :) . fromChoiceString tag . attrs .
(if close then (" />" ++) else ('>' :))
AddAttribute _ key value h ->
let attrs' = getString key . fromChoiceString value
. ('"' :) . attrs
in go attrs' h
AddBoolAttribute key value h ->
let attrs' = (' ' :) . getString key . ("=\"" ++)
. ((if value then "true" else "false") ++) . ('"' :) . attrs
in go attrs' h
AddCustomAttribute key value h ->
let attrs' = (' ' :) . fromChoiceString key . ("=\"" ++)
. fromChoiceString value . ('"' :) . attrs
in go attrs' h
AddObjectAttribute key object h ->
let attrs' = (' ' :) . getString key . ("=\"" ++)
. ((T.unpack $ renderMap object) ++) . ('"' :) . attrs
in go attrs' h
Content content -> fromChoiceString content
Append h1 h2 -> go attrs h1 . go attrs h2
Empty -> id
-- | Render a text-text map to the form used in CSS. Eg:
--
-- >>> renderMap $ fromList [("foo", "bar"), ("baz", "qux")]
-- "foo: bar; baz: qux; "
--
-- TODO (asayers): Escape ':' and ';' characters.
renderMap :: HMS.HashMap T.Text T.Text -> T.Text
renderMap =
HMS.foldlWithKey' (\acc key val -> acc <> key <> ": " <> val <> "; ") ""
-- | Render markup to a lazy 'String'.
--
renderMarkup :: Show ev => Markup ev -> String
renderMarkup html =
renderString html ""
renderHtml :: Show ev => Markup ev -> String
renderHtml = renderMarkup
| meiersi/blaze-react | src/Text/Blaze/Renderer/String.hs | mit | 4,862 | 0 | 20 | 1,571 | 1,367 | 721 | 646 | 91 | 15 |
{-# LANGUAGE NPlusKPatterns #-}
import Data.Array
import Data.List
import Data.Char
type Candidate = Array Int [Int]
type Guess = (Int, [Int])
type Mind = (Candidate, [Guess])
guesses = [
(2,[5,6,1,6,1,8,5,6,5,0,5,1,8,2,9,3]),
(1,[3,8,4,7,4,3,9,6,4,7,2,9,3,0,4,7]),
(3,[5,8,5,5,4,6,2,9,4,0,8,1,0,5,8,7]),
(3,[9,7,4,2,8,5,5,5,0,7,0,6,8,3,5,3]),
(3,[4,2,9,6,8,4,9,6,4,3,6,0,7,5,4,3]),
(1,[3,1,7,4,2,4,8,4,3,9,4,6,5,8,5,8]),
(2,[4,5,1,3,5,5,9,0,9,4,1,4,6,1,1,7]),
(3,[7,8,9,0,9,7,1,5,4,8,9,0,8,0,6,7]),
(1,[8,1,5,7,3,5,6,3,4,4,1,1,8,4,8,3]),
(2,[2,6,1,5,2,5,0,7,4,4,3,8,6,8,9,9]),
(3,[8,6,9,0,0,9,5,8,5,1,5,2,6,2,5,4]),
(1,[6,3,7,5,7,1,1,9,1,5,0,7,7,0,5,0]),
(1,[6,9,1,3,8,5,9,1,7,3,1,2,1,3,6,0]),
(2,[6,4,4,2,8,8,9,0,5,5,0,4,2,7,6,8]),
(0,[2,3,2,1,3,8,6,1,0,4,3,0,3,8,4,5]),
(2,[2,3,2,6,5,0,9,4,7,1,2,7,1,4,4,8]),
(2,[5,2,5,1,5,8,3,3,7,9,6,4,4,3,2,2]),
(3,[1,7,4,8,2,7,0,4,7,6,7,5,8,2,7,6]),
(1,[4,8,9,5,7,2,2,6,5,2,1,9,0,3,0,6]),
(3,[3,0,4,1,6,3,1,1,1,7,2,2,4,6,3,5]),
(3,[1,8,4,1,2,3,6,4,5,4,3,2,4,5,8,9]),
(2,[2,6,5,9,8,6,2,6,3,7,3,1,6,8,6,7])]
answer :: Mind -> Bool
answer (c, gs) = all (\x -> length x == 1 && x /= [10]) (elems c) && null gs
impossible :: Mind -> Bool
impossible (c, gs) = any (== [10]) (elems c) || any (not . active) gs
where active (k, ns) = 0 <= k && k <= length (filter (>= 0) ns)
unique :: Candidate -> [(Int, Int)]
unique = map (\(d, [n, 10]) -> (d, n)) . filter (\x -> length (snd x) == 2) . assocs
fill :: Mind -> (Int, Int) -> Mind
fill (c, gs) (d, n) = (c // [(d, [n])], map fill' gs)
where fill' (k, ns) = let (xs, y:zs) = splitAt (d - 1) ns
in if y == n then (k - 1, xs ++ (-1) : zs) else (k, xs ++ (-1) : zs)
combination _ 0 = [[]]
combination [] _ = []
combination (x:xs) n = (map (x:) (combination xs (n - 1))) ++ (combination (xs) n)
sieve :: Mind -> (Int,Int) -> Mind
sieve (c, gs) (d, n) = (c // [(d, delete n $ (c ! d))], map fill' gs)
where fill' (k, ns) = let (xs, y:zs) = splitAt (d - 1) ns
in if y == n then (k, xs ++ (-1) : zs) else (k, xs ++ y : zs)
step :: Mind -> [Mind]
step (c, (k, ns):gs) = [foldl' fill (foldl' sieve (c, gs) (ps \\ p)) p | p <- combination ps k]
where ps = filter ((>= 0) . snd) $ zip [1..] ns
solve :: [Mind] -> Integer
solve (m@(c, gs):ms) | answer m = read . map intToDigit . concat $ elems c
| impossible m = solve ms
| unique c /= [] = solve $ foldl' fill m (unique c) : ms
| otherwise = solve $ step (c, sort gs) ++ ms
main = print $ solve [(listArray (1, 16) $ repeat [0..10], guesses)] | EdisonAlgorithms/ProjectEuler | vol4/185.hs | mit | 2,632 | 1 | 13 | 548 | 2,340 | 1,417 | 923 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.Lambda.RemovePermission
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- You can remove individual permissions from an access policy associated
-- with a Lambda function by providing a Statement ID.
--
-- Note that removal of a permission will cause an active event source to
-- lose permission to the function.
--
-- You need permission for the 'lambda:RemovePermission' action.
--
-- /See:/ <http://docs.aws.amazon.com/lambda/latest/dg/API_RemovePermission.html AWS API Reference> for RemovePermission.
module Network.AWS.Lambda.RemovePermission
(
-- * Creating a Request
removePermission
, RemovePermission
-- * Request Lenses
, rpFunctionName
, rpStatementId
-- * Destructuring the Response
, removePermissionResponse
, RemovePermissionResponse
) where
import Network.AWS.Lambda.Types
import Network.AWS.Lambda.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
-- | /See:/ 'removePermission' smart constructor.
data RemovePermission = RemovePermission'
{ _rpFunctionName :: !Text
, _rpStatementId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
-- | Creates a value of 'RemovePermission' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rpFunctionName'
--
-- * 'rpStatementId'
removePermission
:: Text -- ^ 'rpFunctionName'
-> Text -- ^ 'rpStatementId'
-> RemovePermission
removePermission pFunctionName_ pStatementId_ =
RemovePermission'
{ _rpFunctionName = pFunctionName_
, _rpStatementId = pStatementId_
}
-- | Lambda function whose access policy you want to remove a permission
-- from.
--
-- You can specify an unqualified function name (for example,
-- \"Thumbnail\") or you can specify Amazon Resource Name (ARN) of the
-- function (for example,
-- \"arn:aws:lambda:us-west-2:account-id:function:ThumbNail\"). AWS Lambda
-- also allows you to specify only the account ID qualifier (for example,
-- \"account-id:Thumbnail\"). Note that the length constraint applies only
-- to the ARN. If you specify only the function name, it is limited to 64
-- character in length.
rpFunctionName :: Lens' RemovePermission Text
rpFunctionName = lens _rpFunctionName (\ s a -> s{_rpFunctionName = a});
-- | Statement ID of the permission to remove.
rpStatementId :: Lens' RemovePermission Text
rpStatementId = lens _rpStatementId (\ s a -> s{_rpStatementId = a});
instance AWSRequest RemovePermission where
type Rs RemovePermission = RemovePermissionResponse
request = delete lambda
response = receiveNull RemovePermissionResponse'
instance ToHeaders RemovePermission where
toHeaders = const mempty
instance ToPath RemovePermission where
toPath RemovePermission'{..}
= mconcat
["/2015-03-31/functions/", toBS _rpFunctionName,
"/versions/HEAD/policy/", toBS _rpStatementId]
instance ToQuery RemovePermission where
toQuery = const mempty
-- | /See:/ 'removePermissionResponse' smart constructor.
data RemovePermissionResponse =
RemovePermissionResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
-- | Creates a value of 'RemovePermissionResponse' with the minimum fields required to make a request.
--
removePermissionResponse
:: RemovePermissionResponse
removePermissionResponse = RemovePermissionResponse'
| fmapfmapfmap/amazonka | amazonka-lambda/gen/Network/AWS/Lambda/RemovePermission.hs | mpl-2.0 | 4,098 | 0 | 9 | 759 | 432 | 267 | 165 | 60 | 1 |
-- Copyright (C) 2017 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, see <http://www.gnu.org/licenses/>.
--
{-# LANGUAGE FlexibleContexts #-}
module Utils(fakeKey,
withDb)
where
import Control.Monad(void)
import Control.Monad.IO.Class(MonadIO)
import Control.Monad.Trans.Resource(MonadBaseControl, ResourceT)
import Control.Monad.Logger(NoLoggingT)
import Database.Persist.Sql(Key, SqlBackend, SqlPersistT, ToBackendKey, runMigrationSilent, toSqlKey)
import Database.Persist.Sqlite(runSqlite)
import BDCS.DB
{-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}
fakeKey :: ToBackendKey SqlBackend a => Key a
fakeKey = toSqlKey 0
-- Run a database action within an in-memory test database
withDb :: (MonadBaseControl IO m, MonadIO m) => SqlPersistT (NoLoggingT (ResourceT m)) a -> m a
withDb action = runSqlite ":memory:" (initDb >> action)
where
initDb :: (MonadBaseControl IO m, MonadIO m) => SqlPersistT m ()
initDb = void $ runMigrationSilent migrateAll
| atodorov/bdcs | src/tests/Utils.hs | lgpl-2.1 | 1,604 | 0 | 11 | 259 | 254 | 151 | 103 | 17 | 1 |
-- Copyright (C) 2016 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, see <http://www.gnu.org/licenses/>.
import Distribution.Simple
main = defaultMain
| dashea/bdcs | importer/Setup.hs | lgpl-2.1 | 754 | 1 | 4 | 129 | 28 | 20 | 8 | 2 | 1 |
{-# LANGUAGE UnboxedTuples #-}
module Main (main) where
import Data.List (group)
import Data.Bits
import Data.Word
import Control.Monad
import GHC.Word
import GHC.Base
import qualified GHC.Integer.GMP.Internals as I
gcdExtInteger :: Integer -> Integer -> (Integer, Integer)
gcdExtInteger a b = case I.gcdExtInteger a b of (# g, s #) -> (g, s)
main :: IO ()
main = do
print $ gcdExtInteger b e
print $ gcdExtInteger e b
print $ gcdExtInteger x y
print $ gcdExtInteger y x
print $ gcdExtInteger x (-y)
print $ gcdExtInteger (-x) y
print $ gcdExtInteger (-x) (-y)
-- see #15350
do
let a = 2
b = 2^65 + 1
print $ gcdExtInteger a b
print $ gcdExtInteger a (-b)
print $ gcdExtInteger (-a) b
print $ gcdExtInteger (-a) (-b)
print $ gcdExtInteger b a
print $ gcdExtInteger b (-a)
print $ gcdExtInteger (-b) a
print $ gcdExtInteger (-b) (-a)
where
b = 2988348162058574136915891421498819466320163312926952423791023078876139
e = 2351399303373464486466122544523690094744975233415544072992656881240319
m = 10^(40::Int)
x = 5328841272400314897981163497728751426
y = 32052182750761975518649228050096851724
| sdiehl/ghc | testsuite/tests/lib/integer/integerGcdExt.hs | bsd-3-clause | 1,241 | 0 | 13 | 311 | 430 | 221 | 209 | 36 | 1 |
import Data.Array.ST
import Data.Array
import System.Random
import System.IO
import System.Exit
import System.Environment
import Data.Array.Parallel.Unlifted
import Graph
randomG :: RandomGen g => g -> Int -> Int -> Graph
randomG g n e = Graph n e ues
where
aes = runSTArray (do
arr <- newArray (0,n-1) []
fill arr (randomRs (0,n-1) g) e
)
fill arr _ 0 = return arr
fill arr (m:n:rs) e =
let lo = min m n
hi = max m n
in
do
ns <- readArray arr lo
if lo == hi || hi `elem` ns
then fill arr rs e
else do
writeArray arr lo (hi : ns)
fill arr rs (e-1)
ues = toU $ concat [map (m :*:) ns | (m,ns) <- assocs aes]
main = do
args <- getArgs
(n,e,file) <- parseArgs args
g <- newStdGen
storeGraph file $ randomG g n e
where
parseArgs [nodes,edges,file] =
do
n <- parseInt nodes
e <- parseInt edges
return (n,e,file)
parseArgs _ = do
hPutStrLn stderr "Invalid arguments"
exitFailure
parseInt s = case reads s of
((n,_) : _) -> return n
_ -> do
hPutStrLn stderr $ "Invalid argument " ++ s
exitFailure
| mainland/dph | icebox/examples/concomp/mkg.hs | bsd-3-clause | 1,410 | 1 | 14 | 612 | 526 | 261 | 265 | 43 | 3 |
{-# OPTIONS -fglasgow-exts #-}
module ModuleScan (
ModuleInfo(..),
FuncInfo(..),
CCallInfo(..),
scanModules
) where
import Utils (splitBy, splitOn)
import Data.Char (isSpace, isAlpha)
import Data.List (partition, isSuffixOf, group, sort)
import Data.Maybe (catMaybes)
import Prelude hiding (unwords)
import System.Directory (getDirectoryContents, doesDirectoryExist,
doesFileExist)
data ModuleInfo = ModuleInfo {
module_name :: String,
module_prefix :: String,
module_needspreproc :: Bool,
module_needsc2hs :: Bool,
module_filename :: String,
module_authors :: [String],
module_created :: String,
module_copyright_dates :: Either String (String, String),
-- eg "2004" or "2004-2005"
module_copyright_holders :: [String],
module_exports :: [String],
module_imports :: [(String, String)], -- mod name and the whole line
module_context_lib :: String,
module_context_prefix :: String,
module_functions :: [FuncInfo],
module_deprecated :: [String] -- {-# DEPRECATED #-} pragmas
} deriving Show
data FuncInfo = FuncInfo {
func_name :: String,
func_docs :: [String],
func_docs_hash :: String,
func_body :: [String],
func_body_hash :: String,
func_ccalls :: [CCallInfo]
} deriving Show
data CCallInfo = CCallInfo {
ccall_name :: String,
ccall_unsafe :: Bool
} deriving Show
data Line = None
| Authors [String]
| Created String
| Copyright (Either String (String, String)) [String]
| Module String String
| Export String
| ExportEnd
| Import String String
| Context String String
| Deprecated String
| TypeSig String String
| DocBegin String
| Hash String String
| Line String
deriving Show
isModuleLine, isExportEndLine, isContextLine :: Line -> Bool
isModuleLine (Module _ _) = True
isModuleLine _ = False
isExportEndLine ExportEnd = True
isExportEndLine _ = False
isContextLine (Context _ _) = True
isContextLine _ = False
scanModules :: FilePath -> [FilePath] -> IO [ModuleInfo]
scanModules path excludePaths = do
modules <- findModules excludePaths path
mapM (\moduleName -> do ppExists <- doesFileExist (moduleName ++ ".chs.pp")
chsExists <- doesFileExist (moduleName ++ ".chs")
if ppExists
then scanModule (moduleName ++ ".chs.pp")
else if chsExists
then scanModule (moduleName ++ ".chs")
else scanModule (moduleName ++ ".hs")
) modules
findModules :: [FilePath] -> FilePath -> IO [FilePath]
findModules excludePaths path | path `elem` excludePaths = return []
findModules excludePaths path = do
files <- getDirectoryContents path
let (chsFiles, maybeDirs) = partition (\file -> ".chs.pp" `isSuffixOf` file
|| ".chs" `isSuffixOf` file
-- || ".hs.pp" `isSuffixOf` file
|| ".hs" `isSuffixOf` file) files
modules = map head
. group
. sort
. map extractModule
$ chsFiles
extractModule [] = []
extractModule ('.':'h':'s':[]) = []
-- extractModule ('.':'h':'s':'.':'p':'p':[]) = []
extractModule ('.':'c':'h':'s':[]) = []
extractModule ('.':'c':'h':'s':'.':'p':'p':[]) = []
extractModule (c:cs) = c : extractModule cs
dirs <- let filterDirs ds [] = return (reverse ds)
filterDirs ds (md:mds) = do
isDir <- doesDirectoryExist md
if isDir then filterDirs (md:ds) mds
else filterDirs ds mds
in filterDirs [] [ path ++ "/" ++ maybeDir
| maybeDir <- maybeDirs, maybeDir /= ".", maybeDir /= ".."]
subDirModules <- mapM (findModules excludePaths) dirs
return $ map ((path++"/")++) modules ++ concat subDirModules
scanModule :: FilePath -> IO ModuleInfo
scanModule file = do
content <- readFile file
let moduleInfo = scanModuleContent content file
return moduleInfo {
module_filename = moduleNameToFileName (module_name moduleInfo)
(module_prefix moduleInfo)
(module_needspreproc moduleInfo)
(module_needsc2hs moduleInfo)
}
scanModuleContent :: String -> String -> ModuleInfo
scanModuleContent content filename =
let (headerLines, bodyLines) =
break isContextLine
[ scanLine line (tokenise line) | line <- lines content ]
in ModuleInfo {
module_name = head $ [ name | Module name _ <- headerLines ] ++ [missing],
module_prefix = head $ [ prefix | Module _ prefix <- headerLines ] ++ [missing],
module_needspreproc = ".chs.pp" `isSuffixOf` filename
|| ".pp" `isSuffixOf` filename,
module_needsc2hs = ".chs" `isSuffixOf` filename
|| ".chs.pp" `isSuffixOf` filename,
module_filename = "",
module_authors = head $ [ authors | Authors authors <- headerLines ] ++ [[missing]],
module_created = head $ [ created | Created created <- headerLines ] ++ [missing],
module_copyright_dates = head $ [ dates | Copyright dates _ <- headerLines ] ++ [Left missing],
module_copyright_holders = head $ [ authors | Copyright _ authors <- headerLines ] ++ [[missing]],
module_exports = let exportLines = takeWhile (not.isExportEndLine)
. dropWhile (not.isModuleLine)
$ headerLines
in [ name | Export name <- exportLines ],
module_imports = [ (name, line) | Import name line <- headerLines ],
module_context_lib = head $ [ lib | Context lib _ <- headerLines ] ++ [missing],
module_context_prefix = head $ [ prefix | Context _ prefix <- headerLines ] ++ [missing],
module_functions = scanFunctions bodyLines,
module_deprecated = [ value | Deprecated value <- bodyLines ]
}
where missing = "{-missing-}"
moduleNameToFileName :: String -> String -> Bool -> Bool -> String
moduleNameToFileName name prefix preproc c2hs =
map dotToSlash prefix ++ "/" ++ name
++ if preproc then ".chs.pp" else if c2hs then ".chs" else ".hs"
where dotToSlash '.' = '/'
dotToSlash c = c
scanLine :: String -> [String] -> Line
scanLine _ ("--":"Author":":":author) = scanAuthor author
scanLine _ ("--":"Created:":created) = Created (unwords created)
scanLine _ ("--":"Copyright":"(":_C:")":copyright) = scanCopyright copyright
scanLine (' ':' ':_) ("module":moduleName) = Export (concat moduleName)
scanLine _ ("module":moduleName) = scanModuleName moduleName
scanLine (' ':' ':_) (export:",":[]) = Export export
scanLine (' ':' ':_) (export:",":"--":_)= Export export
scanLine (' ':' ':_) (export:[]) = Export export
scanLine _ (")":"where":[]) = ExportEnd
scanLine _ ("{#":"context":context) = scanContext context
scanLine line ("import":moduleName) = scanImport line moduleName
scanLine line ("{#":"import":moduleName)= scanImport line moduleName
scanLine _ ("{#-":"DEPRECATED":symbol:_)= Deprecated symbol
scanLine line@('-':_) ("--":"|":_) = DocBegin line
scanLine line@(c:_) (name:"::":_) | isAlpha c = TypeSig name line
scanLine _ ["--","%hash",('c':':':code)
,('d':':':doc)] = Hash code doc
scanLine _ ["--","%hash",('d':':':doc)] = Hash "" doc
scanLine _ ["--","%hash",('c':':':code)] = Hash code ""
scanLine line _ = Line line
scanAuthor :: [String] -> Line
scanAuthor =
Authors
. map unwords
. splitBy ","
scanCopyright :: [String] -> Line
scanCopyright (from:"..":to:name) = Copyright (Right (from, to)) (map unwords $ splitBy "," name)
scanCopyright (from:"-":to:name) = Copyright (Right (from, to)) (map unwords $ splitBy "," name)
scanCopyright ("[":from:"..":to:"]":name) = Copyright (Right (from, to)) (map unwords $ splitBy "," name)
scanCopyright (year:name) = Copyright (Left year) (map unwords $ splitBy "," name)
scanCopyright line = error $ "scanCopyright: " ++ show line
scanModuleName :: [String] -> Line
scanModuleName line | ("(":moduleName:".":modulePrefix) <- reverse line =
Module moduleName (concat (reverse modulePrefix))
scanModuleName line | ("where":")":_:"(":moduleName:".":modulePrefix) <- reverse line =
Module moduleName (concat (reverse modulePrefix))
scanModuleName line | (moduleName:".":modulePrefix) <- reverse line =
Module moduleName (concat (reverse modulePrefix))
scanModuleName ("Graphics":".":"UI":".":"Gtk":".":"Gdk":".":"Enums":[]) = None
scanModuleName line = error $ "scanModuleName: " ++ show line
scanContext :: [String] -> Line
scanContext ("lib":"=\"":lib:"\"":"prefix":"=\"":prefix:"\"":"#}":[]) = Context lib prefix
scanContext ("lib":"=\"":lib:"\"":"prefix":"=\"":prefix:"\"#}":[]) = Context lib prefix
scanContext ("prefix":"=\"":prefix:"\"":"#}":[]) = Context "" prefix
scanContext line = error $ "scanContext: " ++ show line
scanImport :: String -> [String] -> Line
scanImport line tokens = Import (concat $ takeWhile (\token -> isWord token || token == ".") tokens) line
where isWord = all isAlpha
scanCCall :: String -> Maybe CCallInfo
scanCCall line
| "{#" `notElem` tokens = Nothing
| otherwise =
case takeWhile (\t -> t/="#}" && t/="#}."&& t/="#})")
. tail
. dropWhile (/="{#")
$ tokens
of ["call","pure","unsafe",cname] -> Just $ CCallInfo cname True
["call","pure" ,cname] -> Just $ CCallInfo cname True
["call","unsafe" ,cname] -> Just $ CCallInfo cname True
["call" ,cname] -> Just $ CCallInfo cname False
["call","fun","unsafe" ,cname] -> Just $ CCallInfo cname True
_ -> Nothing
where tokens = tokenise line
scanFunctions :: [Line] -> [FuncInfo]
scanFunctions =
groupDocWithFunc
. amalgamateLines
. splitOn isInterestingLine
where isInterestingLine (TypeSig _ _) = True
isInterestingLine (DocBegin _) = True
isInterestingLine (Hash _ _) = True
isInterestingLine _ = False
amalgamateLines :: [[Line]] -> [[Line]]
amalgamateLines ([hash@(Hash _ _), doc@(DocBegin _)]:chunks) =
[hash] : amalgamateLines ([doc] : chunks)
amalgamateLines ([ty@(TypeSig _ _)]:prog@(Line _:_):chunks) =
(ty:prog) : amalgamateLines chunks
amalgamateLines ([doc@(DocBegin _)]:docs@(Line _:_):chunks) =
(doc:docs) : amalgamateLines chunks
amalgamateLines (chunk:chunks) = chunk : amalgamateLines chunks
amalgamateLines [] = []
groupDocWithFunc :: [[Line]] -> [FuncInfo]
groupDocWithFunc ([Hash ch dh]:(DocBegin dl:dls):(TypeSig name tl:tls):chunks) =
addDoc dl dls (funcInfo name tl tls ch dh) : groupDocWithFunc chunks
groupDocWithFunc ((DocBegin dl:dls):(TypeSig name tl:tls):chunks) =
addDoc dl dls (funcInfo name tl tls "" "") : groupDocWithFunc chunks
groupDocWithFunc ([Hash ch dh]:(TypeSig name tl:tls):chunks) =
funcInfo name tl tls ch dh : groupDocWithFunc chunks
groupDocWithFunc ((TypeSig name tl:tls):chunks) =
funcInfo name tl tls "" "" : groupDocWithFunc chunks
groupDocWithFunc (chunk:chunks) = groupDocWithFunc chunks
groupDocWithFunc [] = []
funcInfo name tl tls ch dh =
let dropTailingBlanks = reverse . dropWhile (all isSpace) . reverse
body = dropTailingBlanks (tl : [ tl | Line tl <- tls ])
in FuncInfo {
func_name = name,
func_docs = [],
func_body = body,
func_ccalls = catMaybes (map scanCCall body),
func_docs_hash = dh,
func_body_hash = ch
}
addDoc dl dls inf = inf { func_docs = dl : [ dl | Line dl <- dls ] }
tokenise :: String -> [String]
tokenise s = case dropWhile isSpace s of
"" -> []
s' -> case span isBoundary s' of
("", s'') -> case break isSpaceOrBoundary s'' of
(w,s''') -> w : tokenise s'''
(w, s'') -> w : tokenise s''
where isBoundary c = c `elem` ".,[]{}#()-=\""
isSpaceOrBoundary c = isSpace c || isBoundary c
unwords :: [String] -> String
unwords [] = ""
unwords [w] = w
unwords (w:".":ws) = w ++ ". " ++ unwords ws
unwords (w:ws) = w ++ ' ' : unwords ws
| k0001/gtk2hs | tools/apiGen/src/ModuleScan.hs | gpl-3.0 | 13,269 | 0 | 19 | 3,989 | 4,439 | 2,342 | 2,097 | 261 | 13 |
{-# OPTIONS_GHC -fplugin T16104_Plugin #-}
main :: IO ()
main = return ()
| sdiehl/ghc | testsuite/tests/plugins/T16104.hs | bsd-3-clause | 75 | 1 | 6 | 14 | 25 | 11 | 14 | 3 | 1 |
{-# LANGUAGE CPP #-}
-------------------------------------------------------------------------------
--
-- | Command-line parser
--
-- This is an abstract command-line parser used by both StaticFlags and
-- DynFlags.
--
-- (c) The University of Glasgow 2005
--
-------------------------------------------------------------------------------
module CmdLineParser
(
processArgs, OptKind(..), GhcFlagMode(..),
CmdLineP(..), getCmdLineState, putCmdLineState,
Flag(..), defFlag, defGhcFlag, defGhciFlag, defHiddenFlag,
errorsToGhcException,
EwM, runEwM, addErr, addWarn, getArg, getCurLoc, liftEwM, deprecate
) where
#include "HsVersions.h"
import Util
import Outputable
import Panic
import Bag
import SrcLoc
import Data.Function
import Data.List
import Control.Monad (liftM, ap)
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative (Applicative(..))
#endif
--------------------------------------------------------
-- The Flag and OptKind types
--------------------------------------------------------
data Flag m = Flag
{ flagName :: String, -- Flag, without the leading "-"
flagOptKind :: OptKind m, -- What to do if we see it
flagGhcMode :: GhcFlagMode -- Which modes this flag affects
}
defFlag :: String -> OptKind m -> Flag m
defFlag name optKind = Flag name optKind AllModes
defGhcFlag :: String -> OptKind m -> Flag m
defGhcFlag name optKind = Flag name optKind OnlyGhc
defGhciFlag :: String -> OptKind m -> Flag m
defGhciFlag name optKind = Flag name optKind OnlyGhci
defHiddenFlag :: String -> OptKind m -> Flag m
defHiddenFlag name optKind = Flag name optKind HiddenFlag
-- | GHC flag modes describing when a flag has an effect.
data GhcFlagMode
= OnlyGhc -- ^ The flag only affects the non-interactive GHC
| OnlyGhci -- ^ The flag only affects the interactive GHC
| AllModes -- ^ The flag affects multiple ghc modes
| HiddenFlag -- ^ This flag should not be seen in cli completion
data OptKind m -- Suppose the flag is -f
= NoArg (EwM m ()) -- -f all by itself
| HasArg (String -> EwM m ()) -- -farg or -f arg
| SepArg (String -> EwM m ()) -- -f arg
| Prefix (String -> EwM m ()) -- -farg
| OptPrefix (String -> EwM m ()) -- -f or -farg (i.e. the arg is optional)
| OptIntSuffix (Maybe Int -> EwM m ()) -- -f or -f=n; pass n to fn
| IntSuffix (Int -> EwM m ()) -- -f or -f=n; pass n to fn
| FloatSuffix (Float -> EwM m ()) -- -f or -f=n; pass n to fn
| PassFlag (String -> EwM m ()) -- -f; pass "-f" fn
| AnySuffix (String -> EwM m ()) -- -f or -farg; pass entire "-farg" to fn
| PrefixPred (String -> Bool) (String -> EwM m ())
| AnySuffixPred (String -> Bool) (String -> EwM m ())
--------------------------------------------------------
-- The EwM monad
--------------------------------------------------------
type Err = Located String
type Warn = Located String
type Errs = Bag Err
type Warns = Bag Warn
-- EwM ("errors and warnings monad") is a monad
-- transformer for m that adds an (err, warn) state
newtype EwM m a = EwM { unEwM :: Located String -- Current parse arg
-> Errs -> Warns
-> m (Errs, Warns, a) }
instance Monad m => Functor (EwM m) where
fmap = liftM
instance Monad m => Applicative (EwM m) where
pure v = EwM (\_ e w -> return (e, w, v))
(<*>) = ap
instance Monad m => Monad (EwM m) where
(EwM f) >>= k = EwM (\l e w -> do (e', w', r) <- f l e w
unEwM (k r) l e' w')
return = pure
runEwM :: EwM m a -> m (Errs, Warns, a)
runEwM action = unEwM action (panic "processArgs: no arg yet") emptyBag emptyBag
setArg :: Located String -> EwM m () -> EwM m ()
setArg l (EwM f) = EwM (\_ es ws -> f l es ws)
addErr :: Monad m => String -> EwM m ()
addErr e = EwM (\(L loc _) es ws -> return (es `snocBag` L loc e, ws, ()))
addWarn :: Monad m => String -> EwM m ()
addWarn msg = EwM (\(L loc _) es ws -> return (es, ws `snocBag` L loc msg, ()))
deprecate :: Monad m => String -> EwM m ()
deprecate s = do
arg <- getArg
addWarn (arg ++ " is deprecated: " ++ s)
getArg :: Monad m => EwM m String
getArg = EwM (\(L _ arg) es ws -> return (es, ws, arg))
getCurLoc :: Monad m => EwM m SrcSpan
getCurLoc = EwM (\(L loc _) es ws -> return (es, ws, loc))
liftEwM :: Monad m => m a -> EwM m a
liftEwM action = EwM (\_ es ws -> do { r <- action; return (es, ws, r) })
--------------------------------------------------------
-- A state monad for use in the command-line parser
--------------------------------------------------------
-- (CmdLineP s) typically instantiates the 'm' in (EwM m) and (OptKind m)
newtype CmdLineP s a = CmdLineP { runCmdLine :: s -> (a, s) }
instance Functor (CmdLineP s) where
fmap = liftM
instance Applicative (CmdLineP s) where
pure a = CmdLineP $ \s -> (a, s)
(<*>) = ap
instance Monad (CmdLineP s) where
m >>= k = CmdLineP $ \s ->
let (a, s') = runCmdLine m s
in runCmdLine (k a) s'
return = pure
getCmdLineState :: CmdLineP s s
getCmdLineState = CmdLineP $ \s -> (s,s)
putCmdLineState :: s -> CmdLineP s ()
putCmdLineState s = CmdLineP $ \_ -> ((),s)
--------------------------------------------------------
-- Processing arguments
--------------------------------------------------------
processArgs :: Monad m
=> [Flag m] -- cmdline parser spec
-> [Located String] -- args
-> m ( [Located String], -- spare args
[Located String], -- errors
[Located String] ) -- warnings
processArgs spec args = do
(errs, warns, spare) <- runEwM action
return (spare, bagToList errs, bagToList warns)
where
action = process args []
-- process :: [Located String] -> [Located String] -> EwM m [Located String]
process [] spare = return (reverse spare)
process (locArg@(L _ ('-' : arg)) : args) spare =
case findArg spec arg of
Just (rest, opt_kind) ->
case processOneArg opt_kind rest arg args of
Left err ->
let b = process args spare
in (setArg locArg $ addErr err) >> b
Right (action,rest) ->
let b = process rest spare
in (setArg locArg $ action) >> b
Nothing -> process args (locArg : spare)
process (arg : args) spare = process args (arg : spare)
processOneArg :: OptKind m -> String -> String -> [Located String]
-> Either String (EwM m (), [Located String])
processOneArg opt_kind rest arg args
= let dash_arg = '-' : arg
rest_no_eq = dropEq rest
in case opt_kind of
NoArg a -> ASSERT(null rest) Right (a, args)
HasArg f | notNull rest_no_eq -> Right (f rest_no_eq, args)
| otherwise -> case args of
[] -> missingArgErr dash_arg
(L _ arg1:args1) -> Right (f arg1, args1)
-- See Trac #9776
SepArg f -> case args of
[] -> missingArgErr dash_arg
(L _ arg1:args1) -> Right (f arg1, args1)
Prefix f | notNull rest_no_eq -> Right (f rest_no_eq, args)
| otherwise -> unknownFlagErr dash_arg
PrefixPred _ f | notNull rest_no_eq -> Right (f rest_no_eq, args)
| otherwise -> unknownFlagErr dash_arg
PassFlag f | notNull rest -> unknownFlagErr dash_arg
| otherwise -> Right (f dash_arg, args)
OptIntSuffix f | null rest -> Right (f Nothing, args)
| Just n <- parseInt rest_no_eq -> Right (f (Just n), args)
| otherwise -> Left ("malformed integer argument in " ++ dash_arg)
IntSuffix f | Just n <- parseInt rest_no_eq -> Right (f n, args)
| otherwise -> Left ("malformed integer argument in " ++ dash_arg)
FloatSuffix f | Just n <- parseFloat rest_no_eq -> Right (f n, args)
| otherwise -> Left ("malformed float argument in " ++ dash_arg)
OptPrefix f -> Right (f rest_no_eq, args)
AnySuffix f -> Right (f dash_arg, args)
AnySuffixPred _ f -> Right (f dash_arg, args)
findArg :: [Flag m] -> String -> Maybe (String, OptKind m)
findArg spec arg =
case sortBy (compare `on` (length . fst)) -- prefer longest matching flag
[ (removeSpaces rest, optKind)
| flag <- spec,
let optKind = flagOptKind flag,
Just rest <- [stripPrefix (flagName flag) arg],
arg_ok optKind rest arg ]
of
[] -> Nothing
(one:_) -> Just one
arg_ok :: OptKind t -> [Char] -> String -> Bool
arg_ok (NoArg _) rest _ = null rest
arg_ok (HasArg _) _ _ = True
arg_ok (SepArg _) rest _ = null rest
arg_ok (Prefix _) rest _ = notNull rest
arg_ok (PrefixPred p _) rest _ = notNull rest && p (dropEq rest)
arg_ok (OptIntSuffix _) _ _ = True
arg_ok (IntSuffix _) _ _ = True
arg_ok (FloatSuffix _) _ _ = True
arg_ok (OptPrefix _) _ _ = True
arg_ok (PassFlag _) rest _ = null rest
arg_ok (AnySuffix _) _ _ = True
arg_ok (AnySuffixPred p _) _ arg = p arg
-- | Parse an Int
--
-- Looks for "433" or "=342", with no trailing gubbins
-- * n or =n => Just n
-- * gibberish => Nothing
parseInt :: String -> Maybe Int
parseInt s = case reads s of
((n,""):_) -> Just n
_ -> Nothing
parseFloat :: String -> Maybe Float
parseFloat s = case reads s of
((n,""):_) -> Just n
_ -> Nothing
-- | Discards a leading equals sign
dropEq :: String -> String
dropEq ('=' : s) = s
dropEq s = s
unknownFlagErr :: String -> Either String a
unknownFlagErr f = Left ("unrecognised flag: " ++ f)
missingArgErr :: String -> Either String a
missingArgErr f = Left ("missing argument for flag: " ++ f)
--------------------------------------------------------
-- Utils
--------------------------------------------------------
-- See Note [Handling errors when parsing flags]
errorsToGhcException :: [(String, -- Location
String)] -- Error
-> GhcException
errorsToGhcException errs =
UsageError $ intercalate "\n" $ [ l ++ ": " ++ e | (l, e) <- errs ]
{- Note [Handling errors when parsing commandline flags]
Parsing of static and mode flags happens before any session is started, i.e.,
before the first call to 'GHC.withGhc'. Therefore, to report errors for
invalid usage of these two types of flags, we can not call any function that
needs DynFlags, as there are no DynFlags available yet (unsafeGlobalDynFlags
is not set either). So we always print "on the commandline" as the location,
which is true except for Api users, which is probably ok.
When reporting errors for invalid usage of dynamic flags we /can/ make use of
DynFlags, and we do so explicitly in DynFlags.parseDynamicFlagsFull.
Before, we called unsafeGlobalDynFlags when an invalid (combination of)
flag(s) was given on the commandline, resulting in panics (#9963).
-}
| AlexanderPankiv/ghc | compiler/main/CmdLineParser.hs | bsd-3-clause | 11,619 | 0 | 18 | 3,471 | 3,365 | 1,750 | 1,615 | 192 | 14 |
{-# LANGUAGE OverloadedStrings #-}
-- | Tree interface using the @forest@ package.
-- An example of usage is provided in the /examples/ directory of
-- the source distribution.
module Text.LaTeX.Packages.Trees.Forest (
-- * Tree re-export
module Text.LaTeX.Packages.Trees
-- * Forest package
, pforest
-- * Tree to LaTeX rendering
, tree
, rendertree
) where
import Text.LaTeX.Base
import Text.LaTeX.Base.Syntax (LaTeX(TeXEnv))
import Text.LaTeX.Base.Class
import Text.LaTeX.Packages.Trees (Tree(Leaf, Node))
import Data.List (intersperse)
-- | The 'forest' package.
pforest :: PackageName
pforest = "forest"
forest :: LaTeXC l => l -> l
forest = liftL $ TeXEnv "forest" []
tree_ :: LaTeXC l => (a -> l) -> Tree a -> l
tree_ f (Leaf x) = mconcat [ "[", braces $ f x, "]" ]
tree_ f (Node mx ts) =
mconcat [ "["
, maybe mempty (braces . f) mx
, " "
, mconcat $ intersperse " " $ fmap (tree_ f) ts
, " ]"
]
-- | Given a function to @LaTeX@ values, you can create a @LaTeX@ tree from a
-- Haskell tree. The function specifies how to render the node values.
tree :: LaTeXC l => (a -> l) -> Tree a -> l
tree f t = forest $
raw "where n children=0{tier=word}{},"
<> raw "baseline=(current bounding box.north),"
<> raw "nt/.style={draw={red,thick}},"
-- <> raw "sn edges/.style={for tree={parent anchor=south,child anchor=north}},"
-- <> raw "for tree={edge path={\\noexpand\\path[\\forestoption{edge}] (\\forestOve{\\forestove{@parent}}{name}.parent anchor) -- +(0,-14pt) -| (\\forestove{name}.child anchor)\\forestoption{edge label};}},"
<> raw "\
\for tree={%\n\
\ % re-establishing the defaults:\n\
\ %child anchor=north,\n\
\ %parent anchor=south,\n\
\ edge path={\\noexpand\\path[\\forestoption{edge}] \n\
\ (\\forestOve{\\forestove{@parent}}{name}.parent anchor)\n\
\ -- ([shift={(0,-10pt)}]\\forestOve{\\forestove{@parent}}{name} -| \\forestove{name})\n\
\ -- (\\forestove{name}.child anchor)\n\
\ \\forestoption{edge label};\n\
\ }\n\
\},\n"
-- <> raw "sn edges,"
<> raw "nt"
<> tree_ f t
-- -- | Instance defined in "Text.LaTeX.Packages.Trees.Forest".
-- instance Texy a => Texy (Tree a) where
-- texy = tree texy
-- | This function works as 'tree', but use 'render' as rendering function.
rendertree :: (Render a, LaTeXC l) => Tree a -> l
rendertree = tree (raw . protectText . render)
| romildo/gsynt | src/Text/LaTeX/Packages/Trees/Forest.hs | isc | 2,691 | 0 | 11 | 742 | 411 | 231 | 180 | 33 | 1 |
{-# LANGUAGE LambdaCase #-}
module Oden.Output.Imports () where
import Text.PrettyPrint.Leijen
import Oden.Imports
import Oden.Core.Package
import Oden.QualifiedName (PackageName(..))
import Oden.Output
import Oden.Pretty ()
import Oden.Output.Identifier ()
instance OdenOutput PackageImportError where
outputType _ = Error
name =
\case
PackageNotFound{} ->
"Imports.PackageNotFound"
ForeignPackageImportError{} ->
"Imports.PackageImportError"
IllegalImportPackageName{} ->
"Imports.IllegalImportPackageName"
PackageNotInEnvironment{} ->
"Imports.PackageNotInEnvironment"
header err s =
case err of
PackageNotFound _ pkgName@NativePackageName{} ->
text "Package not found:" <+> pretty pkgName
PackageNotFound _ (ForeignPackageName pkgName) ->
text "Foreign package not found:" <+> strCode s pkgName
ForeignPackageImportError n _ ->
text "Failed to import Go package:" <+> strCode s n
IllegalImportPackageName _ nameErr ->
header nameErr s
PackageNotInEnvironment (ImportReference _ pkgName) ->
text "Package not in environment:" <+> pretty pkgName
PackageNotInEnvironment (ImportForeignReference _ pkgPath) ->
text "Package not in environment:" <+> pretty pkgPath
details err s =
case err of
PackageNotFound{} ->
empty
ForeignPackageImportError _ msg ->
text msg
IllegalImportPackageName _ nameErr ->
details nameErr s
PackageNotInEnvironment{} ->
empty
sourceInfo =
\case
PackageNotFound si _ -> Just si
_ -> Nothing
instance OdenOutput UnsupportedTypesWarning where
outputType _ =
Warning
name _ =
"Imports.UnsupportedTypesWarning"
header u s =
text "Some definitions could not be imported from package"
<+> strCode s (pkg u) <> colon
details u s =
vcat (map formatMessage (messages u))
where formatMessage (n, msg) =
code s (pretty n)
<+> parens (text msg <+> text "are not supported")
sourceInfo _ =
Nothing
| oden-lang/oden | src/Oden/Output/Imports.hs | mit | 2,208 | 0 | 12 | 624 | 520 | 258 | 262 | 64 | 0 |
module Invalid (
reportAboutInvalidQuery
, reportAboutInvalidTasksFile
, reportAboutInvalidRequestMethod
, reportAboutUnsupportedMethod
, reportAboutEmptyPOSTRequest
) where
import Network.FastCGI
import Data.List (unlines)
reportAboutInvalidQuery :: String -> CGI CGIResult
reportAboutInvalidQuery rawQuery = do
setHeader "Content-type" "text/html"
setStatus 400 "Bad Request"
output $ unlines [ "<div style=\"text-align: center; padding-top: 30px;\">"
, "<h2>Sorry, your GET-request '"
, rawQuery
, "' is invalid</h2><br/>Please refer to documentation.</div>"
]
reportAboutInvalidTasksFile :: FilePath -> CGI CGIResult
reportAboutInvalidTasksFile pathToTasksFile = do
setHeader "Content-type" "text/html"
setStatus 500 "Internal Server Error"
output $ unlines [ "<div style=\"text-align: center; padding-top: 30px;\">"
, "<h2>Sorry, tasks file '"
, pathToTasksFile
, "' has invalid format</h2><br/>Please check it.</div>"
]
reportAboutInvalidRequestMethod :: CGI CGIResult
reportAboutInvalidRequestMethod = do
setHeader "Content-type" "text/html"
setStatus 405 "Method Not Allowed"
output $ unlines [ "<div style=\"text-align: center; padding-top: 30px;\">"
, "<h2>Method is not allowed</h2>"
, "Method 'GET' is not allowed for this request, use 'POST' instead."
, "</div>"
]
reportAboutUnsupportedMethod :: CGI CGIResult
reportAboutUnsupportedMethod = do
setHeader "Content-type" "text/html"
setStatus 405 "Method Not Allowed"
output $ unlines [ "<div style=\"text-align: center; padding-top: 30px;\">"
, "<h2>Method is not allowed</h2>"
, "This server supports only 'GET' and 'POST' methods."
, "</div>"
]
reportAboutEmptyPOSTRequest :: CGI CGIResult
reportAboutEmptyPOSTRequest = do
setHeader "Content-type" "text/html"
setStatus 400 "Bad Request"
output $ unlines [ "<div style=\"text-align: center; padding-top: 30px;\">"
, "<h2>Empty POST-request</h2>"
, "Your POST-request doesn't contain any data.</div>"
]
| denisshevchenko/control-groups | src/Invalid.hs | mit | 2,413 | 0 | 9 | 717 | 302 | 152 | 150 | 47 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Prelude.String.Show (
ShowS,
Show(showsPrec, showList, show),
shows,
showChar, showString, showParen,
) where
import Prelude (
ShowS,
Show(showsPrec, showList, show),
shows,
showChar, showString, showParen,
)
| scott-fleischman/cafeteria-prelude | src/Prelude/String/Show.hs | mit | 289 | 0 | 6 | 67 | 69 | 50 | 19 | 14 | 0 |
module Fibonacci where
fib :: Integer -> Integer
fib 0 = 1
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
| kaveet/haskell-snippets | modules/misc/Fibonacci.hs | mit | 100 | 0 | 8 | 25 | 61 | 32 | 29 | 5 | 1 |
import Control.Monad
main = readLn >>= \t ->
forM_ [1..t] $ \_ ->
readLn >>= putStrLn . solveFor
notDivBy3 = (/= 0) . (`mod` 3)
solveFor n = case dropWhile notDivBy3 [n, n-5, maximum [n-10, -1]] of
(n5:_) -> replicate n5 '5' ++ replicate (n-n5) '3'
[] -> "-1"
| limdauto/learning-haskell | hacker-rank/algos/Sherlocks.hs | mit | 306 | 1 | 11 | 95 | 154 | 82 | 72 | 8 | 2 |
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-}
-- | User API.
module Web.Mackerel.Api.User (listUsers, deleteUser) where
import Data.Aeson.TH (deriveJSON)
import qualified Data.ByteString.Char8 as BS
import Network.HTTP.Types (StdMethod(..))
import Web.Mackerel.Client
import Web.Mackerel.Internal.Api
import Web.Mackerel.Internal.TH
import Web.Mackerel.Types.User
data ListUsersResponse = ListUsersResponse { responseUsers :: [User] }
$(deriveJSON options ''ListUsersResponse)
listUsers :: Client -> IO (Either ApiError [User])
listUsers client
= request client GET "/api/v0/users" [] emptyBody (createHandler responseUsers)
deleteUser :: Client -> UserId -> IO (Either ApiError User)
deleteUser client (UserId userId')
= request client DELETE ("/api/v0/users/" <> BS.pack userId') [] emptyBody (createHandler id)
| itchyny/mackerel-client-hs | src/Web/Mackerel/Api/User.hs | mit | 829 | 0 | 9 | 99 | 237 | 135 | 102 | 17 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
module Knapsack where
import Control.Monad (forM_)
import Data.Array.IArray (elems)
import Data.Array.ST hiding (index)
import System.Environment (getArgs)
type Weight = Int
type Value = Int
type WeightCapacity = Weight
data Optimal = Optimal
| NotOptimal
deriving (Eq, Ord)
instance Show Optimal where
show Optimal = "1"
show NotOptimal = "0"
data Item = Item { index :: Int
, value :: Value
, weight :: Weight
}
deriving (Show, Eq, Ord)
data Solution = Solution { optimal :: Optimal
, objective :: Int
, selectedItems :: [Item]
, numTotalItems :: Int
}
deriving (Show, Eq, Ord)
solution :: Problem -> [Item] -> Optimal -> Solution
solution Problem { givenItems } selectedItems optimal =
Solution { optimal, objective, selectedItems, numTotalItems }
where objective = sum $ fmap value selectedItems
numTotalItems = length givenItems
data Problem = Problem { capacity :: Weight
, givenItems :: [Item]
}
type Algorithm = Problem -> Solution
type IOAlgorithm = Problem -> IO String
parseProblem :: String -> Problem
parseProblem contents =
let input = map words $ lines $ contents
meta = head input
inputs = tail input
capacity = read (meta !! 1)
items = map (\[v,w] -> (v,w)) $ (map . map) read inputs
groupIntoItem index (value, weight) = Item { index, value, weight }
givenItems = zipWith groupIntoItem [0..] items
in Problem { capacity, givenItems }
generateSolution :: Solution -> String
generateSolution Solution { optimal, objective, selectedItems, numTotalItems } = do
unlines $ [unwords meta, unwords $ map show $ elems $ indexArray]
where meta = [show objective, show optimal]
indexArray = runSTUArray $ do
array <- newArray (0, numTotalItems - 1) 0
forM_ selectedItems $ \Item { index } -> do
writeArray array index (1 :: Int)
return array
solveBy :: Algorithm -> IO ()
solveBy alg = do
args <- getArgs
contents <- if null args then getContents else readFile (args !! 0)
putStr $ generateSolution . alg . parseProblem $ contents
ioSolveBy :: IOAlgorithm -> IO ()
ioSolveBy alg = do
args <- getArgs
contents <- if null args then getContents else readFile (args !! 0)
sol <- alg $ parseProblem $ contents
putStr sol
| shouya/thinking-dumps | discrete-optimization-2/week2-knapsack/algorithms/Knapsack.hs | mit | 2,526 | 0 | 15 | 730 | 801 | 434 | 367 | 63 | 2 |
module FP15.Parsing.LexerHelpers where
import Control.Monad(mplus)
import Control.Monad.Except(throwError)
import Data.Char(isDigit)
import Data.List.Split
import FP15.Types(Name(..), Map)
import FP15.Parsing.Types
import qualified Data.Map as M
type TokenResult = Either String TokenData
-- | A 'TokenAction' is a function that takes a parsed string, and returns
-- a partially-applied Token constructor.
type TokenAction = String -> TokenResult
octDigits, hexDigits :: String
octDigits = ['0'..'7']
hexDigits = ['0'..'9'] ++ ['a'..'f'] ++ ['A'..'F']
charTable :: Map String Char
charTable =
M.fromList [
("alarm", '\x0007')
, ("backspace", '\x0008')
, ("delete", '\x007f')
, ("escape", '\x001b')
, ("linefeed", '\x000a')
, ("newline", '\x000a')
, ("nul", '\x0000')
, ("null", '\x0000')
, ("page", '\x000c')
, ("return", '\x000d')
, ("rubout", '\x007f')
, ("space", ' ')
, ("tab", '\t')
, ("vtab", '\v')
]
{--
#\alarm
#\backspace
#\delete
#\escape
#\newline
#\null
#\return
#\space
#\tab
; U+0007
; U+0008
; U+007F
; U+001B
; the linefeed character, U+000A ; the null character, U+0000
; the return character, U+000D
; the preferred way to write a space ; the tab character, U+0009
-}
-- | The 'illegalToken' function emits an @Illegal@ token with the specified
-- diagnostic message.
illegalToken :: String -> Either String TokenData
illegalToken msg = return $ Illegal msg
readString :: String -> TokenResult
-- $doctests
-- >>> let testStr = (\(StringLiteral s) -> s) . (\(Right t) -> t)
-- >>> let getQN' x = case x of { Functional n -> n; Function n -> n; Operator n -> n; _ -> undefined }
-- >>> let getQN = (\(Right x) -> getQN' x)
-- >>> let testQN = (\(N m n) -> (m, n)) . getQN
-- >>> testStr $ readString "\"\""
-- ""
-- >>> testStr $ readString "\"test\""
-- "test"
-- >>> testStr $ readString "\"te\\\"st\""
-- "te\"st"
-- >>> testStr $ readString "\"\\\"\\\\\n\\t\""
-- "\"\\\n\t"
-- >>> testQN $ readOperator "++"
-- ([],"++")
-- >>> testQN $ readOperator "."
-- ([],".")
-- >>> testQN $ readOperator "..."
-- ([],"...")
-- >>> testQN $ readOperator "Abc.Def.(++)"
-- (["Abc","Def"],"++")
-- >>> testQN $ readOperator "Abc.Def.(...)"
-- (["Abc","Def"],"...")
-- >>> testQN $ readFunction "test"
-- ([],"test")
-- >>> testQN $ readFunction "Abc.Def.test"
-- (["Abc","Def"],"test")
-- >>> testQN $ readFunctional "Test"
-- ([],"Test")
-- >>> testQN $ readFunctional "Abc.Def.Test"
-- (["Abc","Def"],"Test")
readOperator, readFunction, readFunctional :: String -> TokenResult
readNumber' :: Bool -> String -> TokenResult
readNumber, readGet, readHash, readChar :: String -> TokenResult
readString s0@('"':s) = parse s "" where
parse :: String -> String -> TokenResult
parseEscape :: String -> String -> TokenResult
parse [] _ = throwError "Impossible."
parse "\"" !ss = return $ StringLiteral $ reverse ss
parse ('\\':cs) !ss = parseEscape cs ss
parse ('\"':_) _ = throwError "Impossible."
parse (c:cs) ss = parse cs (c:ss)
-- TODO escapes
parseEscape [] _ = illegalToken "Incomplete escape."
parseEscape (c:(!cs)) !ss =
case lookup c escapeTable of
Just c' -> parse cs (c':ss)
Nothing -> illegalToken $ "Invalid escape: \\" ++ show c ++ ""
escapeTable = zip "0abfnrtv\"\\" "\0\a\b\f\n\r\t\v\"\\"
readString s = illegalToken "Empty string."
-- | The 'readQualified' function splits an identifier into module part (list of
-- strings) and name part (string).
readName :: (Name a -> TokenData) -> String -> TokenResult
readName !tc s =
case splitOn "." s of
[] -> throwError "Invalid qualified name."
xs -> ret (init xs) (last xs)
where ret ms n = return $ tc $ N ms n
readDotOperator :: Monad m => String -> m TokenData
readDotOperator dots@('.':(!s)) =
case splitOn "." s of
[] -> error "readDotOperator: splitOn returned an empty list."
xs -> return $ DotOperator $ N (init xs) (last xs)
readDotOperator _ = error "readDotOperator: Not a dot operator."
readOperator !s
| all (== '.') s =
return $ Operator $ N [] s
| '(' `elem` s =
case splitOn "(" s of
[m, n] ->
return $ Operator $ N (init $ splitOn "." m) $ init n
_ -> illegalToken "Invalid qualified operator."
| otherwise =
return $ Operator $ N [] s
readFunction = readName Function
readFunctional = readName Functional
readInt, readReal :: Bool -> String -> TokenData
readInt n = IntLiteral . (if n then negate else id) . read
readReal n = RealLiteral . (if n then negate else id) . read
readNumber ('~':s) = readNumber' True s
readNumber s = readNumber' False s
readNumber' n ('#':'o':oct) = return $ readInt n $ "0o" ++ oct
readNumber' n ('#':'O':oct) = return $ readInt n $ "0o" ++ oct
readNumber' n ('#':'x':hex) = return $ readInt n $ "0x" ++ hex
readNumber' n ('#':'X':hex) = return $ readInt n $ "0x" ++ hex
readNumber' n s | 'e' `elem` s || 'E' `elem` s || '.' `elem` s = return $ readReal n s
| otherwise = return $ readInt n s
readChar ['#', '\\', c] = return (CharLiteral c)
readChar ('#':'\\':cs) = maybe (illegalToken $ "Unrecognized char name: " ++ cs)
(return . CharLiteral) res where
res = M.lookup cs charTable `mplus` tryHex
tryHex = case cs of
c0:cs' -> if elem c0 "uUxX" && all (`elem` hexDigits) cs'
then Just (read $ "'\\x" ++ cs' ++ "'") else Nothing
_ -> Nothing
readChar s0 = illegalToken "Invalid character literal."
readGet ('#':'^':rest)
| all (== '^') rest = return $ Get (length rest)
| otherwise = return $ Get (read rest)
readGet _ = error "readGet: Invalid #^ form."
readHash "#" = return Hash
readHash "#t" = return TrueLiteral
readHash "#f" = return FalseLiteral
readHash "#T" = return TrueLiteral
readHash "#F" = return FalseLiteral
readHash s0@('#':s@(_:_)) | all isDigit s = return $ Indexer (read s)
| otherwise = illegalToken ("Invalid #form: " ++ s0)
readHash s0 = illegalToken ("Invalid #form: " ++ s0)
-- | The 'getIndentChange' function gets the change in indentation given
-- whitespaces, which might or might not contain line breaks. If no line breaks,
-- then the whitespaces, return @Nothing@. Othwreise, return the indentation of
-- the last line, which is the number of spaces in the last line, of the
-- input string.
--
-- >>> getIndentChange ""
-- Nothing
-- >>> getIndentChange " "
-- Nothing
-- >>> getIndentChange "\n"
-- Just 0
-- >>> getIndentChange " \n"
-- Just 0
-- >>> getIndentChange " \n "
-- Just 4
-- >>> getIndentChange " \n \n \n "
-- Just 4
getIndentChange :: String -> Maybe Int
getIndentChange !s =
case splitOn "\n" s of
[] -> Nothing
[_] -> Nothing
ss -> Just $ length $ last ss
handleIndentChange, popIndentStack
:: StateStack -> Int -> Either String (StateStack, [TokenData])
handleIndentChange [] _ = Left "Empty state stack."
handleIndentChange ss@(StateItem Offside ref:_) ind
| ref == ind = Right (ss, [Semicolon])
| ref < ind = Right (ss, [])
| otherwise = popIndentStack ss ind
handleIndentChange ss _ = Right (ss, [])
popIndentStack ss _ = Right (ss, [])
| Ming-Tang/FP15 | src/FP15/Parsing/LexerHelpers.hs | mit | 7,159 | 0 | 15 | 1,487 | 1,997 | 1,069 | 928 | -1 | -1 |
module Main where
-- Copies every line of STDIN to STDOUT, adding
-- * "|OK", if line can be parsed with the given PGF,
-- * "|FAIL" otherwise.
-- The number of parse trees is added to OK.
-- The successfully consumed line prefix (plus the failing token)
-- is added to "FAIL".
--
-- Usage example:
--
-- $ echo -e "John asks Mary .\nJohn aasks Mary ." | ./Parser ACE-0_0_2.pgf TestAttemptoAce
-- John asks Mary .|OK (1)
-- John aasks Mary .|FAIL John aasks
-- Parser: <stdin>: hGetLine: end of file
-- TODO: maybe the simple tokenizer `words` is not the best choice
-- TODO: how to suppress the "end of file" error
-- TODO: what does "Just 4" mean?
import PGF
import Data.Maybe
import System.Environment (getArgs)
main :: IO ()
main = do
file:lang:_ <- getArgs
pgf <- readPGF file
loop (parseResult pgf (fromJust (readLanguage lang)))
loop :: (String -> String) -> IO ()
loop trans = do
s <- getLine
putStr s
putStrLn $ trans s
loop trans
parseResult :: PGF -> Language -> String -> String
parseResult pgf lang s =
case parse_ pgf lang (startCat pgf) (Just 4) s of
(ParseFailed num, _) -> "|FAIL " ++ unwords (take num (words s))
(ParseOk trees, _) -> "|OK (" ++ show (length trees) ++ ")"
_ -> "|FAIL"
-- (Unused)
-- Returns the first language in the PGF
getEng :: PGF -> Language
getEng pgf =
case languages pgf of
lang:_ -> lang
| TeamSPoon/logicmoo_workspace | packs_sys/logicmoo_nlu/ext/ace_in_gf/Parser.hs | mit | 1,364 | 4 | 13 | 279 | 332 | 173 | 159 | 25 | 3 |
module HCraft.Renderer.Program.Program where
import Data.HashMap.Strict (HashMap)
import Graphics.Rendering.OpenGL
-- |Program source information
data ProgDesc
= ProgDesc { pdName :: String
, pdSources :: [ FilePath ]
}
deriving ( Eq, Ord, Show )
-- |Represents an OpenGL program
data ProgObject
= ProgObject { poHandle :: Program
, poUniforms :: HashMap String UniformLocation
, poAttribs :: HashMap String AttribLocation
}
deriving ( Eq, Show)
-- |List of builtin programs
progBuiltin :: [ ProgDesc ]
progBuiltin
= [ ProgDesc "sky" [ "shader/sky.vs"
, "shader/sky.fs"
]
, ProgDesc "terrain" [ "shader/terrain.vs"
, "shader/terrain.fs"
]
, ProgDesc "object" [ "shader/object.vs"
, "shader/object.fs"
]
, ProgDesc "depth" [ "shader/depth.vs"
, "shader/depth.fs"
]
-- , ProgDesc "dof" [ "shader/dof.cs"
-- ]
]
-- |Builtin attribute locations
progAttribs :: [ ( String, VariableType, AttribLocation ) ]
progAttribs
= [ ( "in_vertex", FloatVec3, AttribLocation 0 )
, ( "in_normal", FloatVec3, AttribLocation 1 )
, ( "in_uv", FloatVec2, AttribLocation 2 )
, ( "in_tangent", FloatVec3, AttribLocation 3 )
, ( "in_bitangent", FloatVec3, AttribLocation 4 )
, ( "in_bweight", FloatVec4, AttribLocation 5 )
, ( "in_bname", IntVec4, AttribLocation 6 )
]
-- |Builtin output locations
progOutputs :: [ ( String, DrawBufferIndex ) ]
progOutputs
= [ ( "out_color", 0 )
, ( "out_dfr_color", 0 )
, ( "out_dfr_normal", 1 )
]
| nandor/hcraft | HCraft/Renderer/Program/Program.hs | mit | 1,763 | 0 | 9 | 566 | 361 | 221 | 140 | 36 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses #-}
module Flow.Game where
import Control.Monad.State.Class
import Control.Monad.Writer.Class
import Control.Monad.State
import Control.Monad.Writer
import Control.Monad.Identity
import Flow.Common
newtype ClientID = ClientID Int deriving (Show, Num)
-- | Determines which update packets get sent to which client.
data NetworkStrategy s u = NetworkStrategy (s -> u -> ClientID -> Bool)
data NewConnectionHandler s u = NewConnectionHandler (ClientID -> s -> [u])
-- | Game logic configuration.
data LogicConfiguration s u e = LogicConfiguration
{ networkStrategy :: NetworkStrategy s u
, initialState :: s
, gameLogic :: Game s u ()
, newConnectionHandler :: NewConnectionHandler s u
, eventHandler :: ClientID -> e -> Game s u () }
-- | Sends all updates to every client
fullSharingStrategy :: Diff s u => NetworkStrategy s u
fullSharingStrategy = NetworkStrategy $ \_ _ _ -> True
-- | Client configuration.
data ClientConfiguration s
-- | Summary of what happened in one logic step
data Report u = Report [u] [String]
instance Monoid (Report u) where
mempty = Report [] []
Report us ss `mappend` Report us' ss' = Report (us ++ us') (ss ++ ss')
-- | The Game monad lets you inspect the current game state and post changes to it which get recorded.
newtype Game s u a = Game (WriterT (Report u) (StateT s Identity) a)
deriving (Monad, MonadState s, MonadWriter (Report u), Functor, Applicative)
runGame :: Diff s u => Game s u a -> s -> (s, Report u, a)
runGame (Game g) s = let ((a, us), s') = runIdentity (runStateT (runWriterT g) s) in (s', us, a)
doUpdate :: Diff s u => u -> Game s u s
doUpdate u = do
tell $ Report [u] []
modify (`commit` u)
get
doUpdate_ :: Diff s u => u -> Game s u ()
doUpdate_ = void . doUpdate
logMsg :: String -> Game s u ()
logMsg msg = tell $ Report [] [msg]
currentGameState, cgs :: Game s u s
currentGameState = get
cgs = currentGameState
withCgs :: Diff s u => (s -> u) -> Game s u s
withCgs f = cgs >>= doUpdate . f
withCgs_ :: Diff s u => (s -> u) -> Game s u ()
withCgs_ = void . withCgs
| LukaHorvat/Flow | src/Flow/Game.hs | mit | 2,315 | 0 | 13 | 586 | 758 | 412 | 346 | -1 | -1 |
{-# htermination addToFM_C :: (Ord a, Ord k) => (b -> b -> b) -> FiniteMap (a,k) b -> (a,k) -> b -> FiniteMap (a,k) b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addToFM_C_12.hs | mit | 139 | 0 | 3 | 29 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Controllers.Home (getHome) where
import BasicPrelude
import qualified Data.Text.Lazy as TL
import Text.Blaze.Html.Renderer.Text (renderHtml)
import Web.Scotty.Trans (ActionT, html)
import Config (ConfigM)
import Helpers.PageTitle (makePageTitle)
import Routes (Route(HomeRoute))
import Services.Marvel (fetchFeaturedCharacters, fetchFeaturedComics)
import qualified Services.Marvel as Mvl
import Views.Pages.Home (homePageView)
getHome :: ActionT TL.Text ConfigM ()
getHome = do
let currentRoute = HomeRoute
let pageTitle = makePageTitle Nothing
featuredCharactersResult <- lift fetchFeaturedCharacters
let featuredCharacters =
-- Default to empty list if error
either (\_ -> []) Mvl.featuredCharacters featuredCharactersResult
featuredComicsResult <- lift fetchFeaturedComics
let featuredComics =
either (\_ -> []) Mvl.featuredComics featuredComicsResult
html (renderHtml (homePageView
currentRoute pageTitle featuredCharacters featuredComics
))
| nicolashery/example-marvel-haskell | Controllers/Home.hs | mit | 1,077 | 0 | 13 | 159 | 257 | 144 | 113 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-------------------------------------------------------------------------------
-- |
-- Description : Static site generator for mesokurtosis.com
-- Copyright : (c) Daniel Klein, 2018
-- License : MIT
-- Maintainer : othercriteria@gmail.com
-- Stability : experimental
-- Portability : non-portable
--
-------------------------------------------------------------------------------
module Main where
import Hakyll
import Data.Monoid ((<>))
import qualified Data.Set as S
import qualified Data.Map as M
import Text.Pandoc.Options
------------------------------------------------------------------------------
-- Configuration
------------------------------------------------------------------------------
numRecent :: Int
numRecent = 5
tagCloudField' :: String -> Tags -> Context String
tagCloudField' key ts = tagCloudField key 80 125 ts
config :: Configuration
config = defaultConfiguration
{ deployCommand = "s3cmd --delete-removed -P sync _site/ s3://mesokurtosis.com/"
}
mathjaxScriptTag :: String
mathjaxScriptTag = "<script type=\"text/javascript\" src=\"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"></script>"
mathExtensions :: [Text.Pandoc.Options.Extension]
mathExtensions = [ Ext_tex_math_dollars
, Ext_latex_macros
]
------------------------------------------------------------------------------
-- Modified Pandoc compiler to handle MathJax
--
-- For source and details, see:
-- travis.athougies.net/posts/2013-08-13-using-math-on-your-hakyll-blog.html
------------------------------------------------------------------------------
pandocMathCompiler :: Compiler (Item String)
pandocMathCompiler =
let defaultExtensions = writerExtensions defaultHakyllWriterOptions
newExtensions = foldr S.insert defaultExtensions mathExtensions
writerOptions = defaultHakyllWriterOptions
{ writerExtensions = newExtensions
, writerHTMLMathMethod = MathJax ""
}
in pandocCompilerWith defaultHakyllReaderOptions writerOptions
------------------------------------------------------------------------------
-- Contexts
------------------------------------------------------------------------------
baseCtx :: Context String
baseCtx =
constField "mathjax" "" <>
defaultContext
postCtx :: Context String
postCtx =
dateField "date" "%e %b %Y" <>
mathCtx <>
baseCtx
postCtxWithTags :: Tags -> Context String
postCtxWithTags tags =
tagsField "tags" tags <>
postCtx
mathCtx :: Context String
mathCtx = field "mathjax" $ \item -> do
metadata <- getMetadata (itemIdentifier item)
return $ if "mathjax" `M.member` metadata
then mathjaxScriptTag
else ""
aboutCtx :: Context String
aboutCtx =
constField "page-about" "" <>
baseCtx
contactCtx :: Context String
contactCtx =
constField "page-contact" "" <>
baseCtx
-------------------------------------------------------------------------------
-- Site generator itself
-------------------------------------------------------------------------------
truncateRoute :: String -> Routes
truncateRoute h = gsubRoute h (const "")
main :: IO ()
main = hakyllWith config $ do
match "root_static/*" $ do
route $ truncateRoute "root_static/"
compile copyFileCompiler
match "bootstrap/**" $ do
route $ truncateRoute "bootstrap/"
compile copyFileCompiler
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "css/*" $ do
route idRoute
compile compressCssCompiler
match "root/stats.md" $ do
route $ truncateRoute "root/" `composeRoutes`
setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" baseCtx
>>= relativizeUrls
match "root/about.md" $ do
route $ truncateRoute "root/" `composeRoutes`
setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" aboutCtx
>>= relativizeUrls
match "root/contact.md" $ do
route $ truncateRoute "root/" `composeRoutes`
setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" contactCtx
>>= relativizeUrls
match "posts/*" $ do
tags <- buildTags "posts/*" (fromCapture "tags/*.html")
tagsRules tags $ \tag pattern -> do
let title = "Posts tagged \"" ++ tag ++ "\""
route idRoute
compile $ do
posts <- recentFirst =<< loadAll pattern
let ctx = constField "title" title <>
listField "posts" postCtx (return posts) <>
baseCtx
makeItem ""
>>= loadAndApplyTemplate "templates/tag.html" ctx
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls
let postCtxTagged = postCtxWithTags tags
route $ setExtension "html"
compile $ pandocMathCompiler
>>= loadAndApplyTemplate "templates/post.html" postCtxTagged
>>= loadAndApplyTemplate "templates/default.html" postCtxTagged
>>= relativizeUrls
match "links/*" $ do
compile $ pandocCompiler
>>= applyAsTemplate baseCtx
match "trivia/*" $ do
compile $ pandocCompiler
>>= applyAsTemplate baseCtx
create ["archive.html"] $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let archiveCtx =
listField "posts" postCtx (return posts) <>
constField "title" "Archives" <>
constField "page-archive" "" <>
baseCtx
makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
>>= relativizeUrls
create ["links.html"] $ do
route idRoute
compile $ do
links <- loadAll "links/*"
let linksCtx =
listField "links" baseCtx (return links) <>
constField "title" "Links" <>
constField "page-links" "" <>
baseCtx
makeItem ""
>>= loadAndApplyTemplate "templates/links.html" linksCtx
>>= loadAndApplyTemplate "templates/default.html" linksCtx
>>= relativizeUrls
create ["trivia.html"] $ do
route idRoute
compile $ do
trivia <- recentFirst =<< loadAll "trivia/*"
let triviaCtx =
listField "trivia" baseCtx (return trivia) <>
constField "title" "Williams Trivia" <>
baseCtx
makeItem ""
>>= loadAndApplyTemplate "templates/trivia.html" triviaCtx
>>= loadAndApplyTemplate "templates/default.html" triviaCtx
>>= relativizeUrls
match "root/index.html" $ do
route $ truncateRoute "root/"
compile $ do
posts <- fmap (take numRecent) . recentFirst =<< loadAll "posts/*"
tags <- buildTags "posts/*" (fromCapture "tags/*.html")
let indexCtx =
listField "posts" postCtx (return posts) <>
tagCloudField' "tag-cloud" tags <>
constField "title" "Daniel L. Klein" <>
constField "page-home" "" <>
baseCtx
getResourceBody
>>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx
>>= relativizeUrls
match "root/error.html" $ do
route $ truncateRoute "root/"
compile $ do
getResourceBody
>>= loadAndApplyTemplate "templates/default.html" baseCtx
match "templates/*" $ compile templateCompiler
| othercriteria/website | generator/Main.hs | mit | 8,544 | 0 | 25 | 2,671 | 1,489 | 704 | 785 | 173 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
module Json.GeoSpec (spec) where
import Data.Aeson (Value)
import Data.Aeson.Lens
import Data.Text (Text)
import Lastfm
import Lastfm.Geo
import Test.Hspec
import SpecHelper
spec :: Spec
spec = do
it "getEvents" $
publicly (getEvents <* location "Moscow" <* limit 5)
`shouldHaveJson`
key "events".key "event".values.key "id"._String
describe "get*Artist*" $ do
let jsonQuery :: Fold Value Text
jsonQuery = key "topartists".key "artist".values.key "name"._String
it "getMetroArtistChart" $
publicly (getMetroArtistChart <*> metro "Saint Petersburg" <*> country "Russia")
`shouldHaveJson`
jsonQuery
it "getMetroHypeArtistChart" $
publicly (getMetroHypeArtistChart <*> metro "New York" <*> country "United States")
`shouldHaveJson`
jsonQuery
it "getMetroUniqueArtistChart" $
publicly (getMetroUniqueArtistChart <*> metro "Minsk" <*> country "Belarus")
`shouldHaveJson`
jsonQuery
it "getTopArtists" $
publicly (getTopArtists <*> country "Belarus" <* limit 3)
`shouldHaveJson`
jsonQuery
it "getMetroWeeklyChartlist" $
publicly (getMetroWeeklyChartlist <*> metro "Moscow")
`shouldHaveJson`
key "weeklychartlist".key "chart".values.key "from"._String
it "getMetros" $
publicly (getMetros <* country "Russia")
`shouldHaveJson`
key "metros".key "metro".values.key "name"._String
describe "get*Track*" $ do
let jsonQuery :: Fold Value Text
jsonQuery = key "toptracks".key "track".values.key "name"._String
it "getTopTracks" $
publicly (getTopTracks <*> country "Ukraine" <* limit 2)
`shouldHaveJson`
jsonQuery
it "getMetroUniqueTrackChart" $
publicly (getMetroUniqueTrackChart <*> metro "Moscow" <*> country "Russia")
`shouldHaveJson`
jsonQuery
it "getMetroHypeTrackChart" $
publicly (getMetroHypeTrackChart <*> metro "Moscow" <*> country "Russia")
`shouldHaveJson`
jsonQuery
it "getMetroTrackChart" $
publicly (getMetroTrackChart <*> metro "Boston" <*> country "United States")
`shouldHaveJson`
jsonQuery
| supki/liblastfm | test/api/Json/GeoSpec.hs | mit | 2,209 | 0 | 16 | 467 | 580 | 283 | 297 | -1 | -1 |
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-}
module ConcurrentUtils (
-- * Variants of forkIO
forkFinally
) where
import Control.Concurrent.STM
import Control.Exception
import Control.Concurrent
import Prelude hiding (catch)
import Control.Monad
import Control.Applicative
import GHC.Exts
import GHC.IO hiding (finally)
import GHC.Conc
#if __GLASGOW_HASKELL__ < 706
-- | fork a thread and call the supplied function when the thread is about
-- to terminate, with an exception or a returned value. The function is
-- called with asynchronous exceptions masked.
forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId
forkFinally action and_then =
mask $ \restore ->
forkIO $ try (restore action) >>= and_then
#endif
Contact GitHub API Training Shop Blog About
| arquitecturas-concurrentes/stm-samples-haskell | 4_stm_server/ConcurrentUtils.hs | mit | 798 | 0 | 11 | 135 | 160 | 90 | 70 | -1 | -1 |
isPalindrome :: (Eq a) => [a] -> Bool
isPalindrome x = x == reverse x
| Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/04/04.09.01-isPalindrome.hs | mit | 70 | 0 | 7 | 15 | 37 | 19 | 18 | 2 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-kinesisstreamsinput.html
module Stratosphere.ResourceProperties.KinesisAnalyticsApplicationKinesisStreamsInput where
import Stratosphere.ResourceImports
-- | Full data type definition for
-- KinesisAnalyticsApplicationKinesisStreamsInput. See
-- 'kinesisAnalyticsApplicationKinesisStreamsInput' for a more convenient
-- constructor.
data KinesisAnalyticsApplicationKinesisStreamsInput =
KinesisAnalyticsApplicationKinesisStreamsInput
{ _kinesisAnalyticsApplicationKinesisStreamsInputResourceARN :: Val Text
, _kinesisAnalyticsApplicationKinesisStreamsInputRoleARN :: Val Text
} deriving (Show, Eq)
instance ToJSON KinesisAnalyticsApplicationKinesisStreamsInput where
toJSON KinesisAnalyticsApplicationKinesisStreamsInput{..} =
object $
catMaybes
[ (Just . ("ResourceARN",) . toJSON) _kinesisAnalyticsApplicationKinesisStreamsInputResourceARN
, (Just . ("RoleARN",) . toJSON) _kinesisAnalyticsApplicationKinesisStreamsInputRoleARN
]
-- | Constructor for 'KinesisAnalyticsApplicationKinesisStreamsInput'
-- containing required fields as arguments.
kinesisAnalyticsApplicationKinesisStreamsInput
:: Val Text -- ^ 'kaaksiResourceARN'
-> Val Text -- ^ 'kaaksiRoleARN'
-> KinesisAnalyticsApplicationKinesisStreamsInput
kinesisAnalyticsApplicationKinesisStreamsInput resourceARNarg roleARNarg =
KinesisAnalyticsApplicationKinesisStreamsInput
{ _kinesisAnalyticsApplicationKinesisStreamsInputResourceARN = resourceARNarg
, _kinesisAnalyticsApplicationKinesisStreamsInputRoleARN = roleARNarg
}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-kinesisstreamsinput.html#cfn-kinesisanalytics-application-kinesisstreamsinput-resourcearn
kaaksiResourceARN :: Lens' KinesisAnalyticsApplicationKinesisStreamsInput (Val Text)
kaaksiResourceARN = lens _kinesisAnalyticsApplicationKinesisStreamsInputResourceARN (\s a -> s { _kinesisAnalyticsApplicationKinesisStreamsInputResourceARN = a })
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-kinesisstreamsinput.html#cfn-kinesisanalytics-application-kinesisstreamsinput-rolearn
kaaksiRoleARN :: Lens' KinesisAnalyticsApplicationKinesisStreamsInput (Val Text)
kaaksiRoleARN = lens _kinesisAnalyticsApplicationKinesisStreamsInputRoleARN (\s a -> s { _kinesisAnalyticsApplicationKinesisStreamsInputRoleARN = a })
| frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsApplicationKinesisStreamsInput.hs | mit | 2,654 | 0 | 13 | 222 | 267 | 153 | 114 | 29 | 1 |
-- A basic working script to create a network of neurons
module Main where
import Simulation.HSimSNN
import Data.List
import qualified Data.Matrix.Unboxed as M
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as VU
import System.Random
import System.Process
-- | Make a random connectivity matrx initialized with random weights
mkRndAxon :: Int -> Int -> Int -> [(Int, SynInfo)]
mkRndAxon n ninp rnginit =
zip [ninp .. (n - 1)] $
map ((flip SynInfo) (read "Exec")) $
randomRs (-0.15, 0.15) $
mkStdGen rnginit
runsim = do
-- Get spontaneous activity till time t as sanity check
-- print $ passThroughNetwork network EmptySpikeTrain tsim
-- Save input spikes to file
spikeTrainToFile "input.txt" spktrn
-- Load spikes from file
inpspktrn <- spikeTrainFromFile "input.txt"
-- Process a list of spikes through a network
let (newnet, outspktrn) = passThroughNetwork network inpspktrn tsim
-- Save output to file
spikeTrainToFile "output.txt" outspktrn
-- Display plots
r <- createProcess (proc "python" ["scripts/rasterplot.py"])
-- Print states of all neurons
-- print $ population newnet
print "Done"
where
-- Population size
npop = 500 -- Total population size
ninp = 50 -- No. of neurons assigned only for input
-- Simulation time
tsim = 1000.0 -- Simulation time (ms)
tinp = 950.0 -- input time (ms)
-- Create a random no. generator
rng = mkStdGen 6
-- Initialize a population of neurons with different states
mypop = initPop $ V.fromList [[x,0] | x <- (take npop (randomRs (0.0,1.0) rng))]
-- create connection matrix (the length of this list should be the same as population size)
cm = M.fromLists [mkRndAxon npop ninp rinit| rinit <-[0..(npop-1)]]
-- Define a connection
conn = Connections mypop cm
-- Define a network
network = Network mypop conn
-- Define an input spike train with firing rate f
f = 100.0
nspk = round (f*tinp/1000.0*(fromIntegral ninp))
nindx = take nspk (randomRs (0,(ninp-1)) rng)
tindx = sort $ take nspk (randomRs (0.0,tinp) rng)
spktrn = SpikeTrain $ VU.fromList $ map Spike $ zip nindx tindx
main = runsim
| sheiksadique/HSimSNN | examples/basics.hs | gpl-2.0 | 2,334 | 0 | 16 | 608 | 523 | 290 | 233 | 36 | 1 |
{-# LANGUAGE ViewPatterns #-}
module Language.Mulang.Inspector.Smell (
discardsExceptions,
doesConsolePrint,
doesNilTest,
doesTypeTest,
hasAssignmentReturn,
hasAssignmentCondition,
hasEmptyIfBranches,
hasEmptyRepeat,
hasLongParameterList,
hasRedundantBooleanComparison,
hasRedundantGuards,
hasRedundantIf,
hasRedundantLambda,
hasRedundantLocalVariableReturn,
hasRedundantParameter,
hasRedundantRepeat,
hasTooManyMethods,
hasEqualIfBranches,
detectDeclarationTypos,
detectUsageTypos,
hasUnreachableCode,
isLongCode,
overridesEqualOrHashButNotBoth,
returnsNil,
usesNamedSelfReference,
shouldInvertIfCondition,
shouldUseOtherwise,
shouldUseStrictComparators) where
import Language.Mulang.Ast
import qualified Language.Mulang.Ast.Operator as O
import Language.Mulang.Generator (Generator, identifierReferences, declaredIdentifiers, referencedIdentifiers, declarations)
import Language.Mulang.Inspector.Primitive
import Language.Mulang.Inspector.Query (inspect, select)
import Data.Text.Metrics (damerauLevenshtein)
import Data.Text (pack)
-- | Inspection that tells whether an expression has expressions like 'x == True'
hasRedundantBooleanComparison :: Inspection
hasRedundantBooleanComparison = compares isBooleanLiteral
hasRedundantRepeat :: Inspection
hasRedundantRepeat = containsExpression f
where f (Repeat (MuNumber 1) _) = True
f _ = False
shouldUseStrictComparators :: Inspection
shouldUseStrictComparators = containsExpression f
where f (Primitive O.Similar) = True
f (Primitive O.NotSimilar) = True
f _ = False
doesNilTest :: Inspection
doesNilTest = compares f
where f MuNil = True
f _ = False
doesTypeTest :: Inspection
doesTypeTest = compares f
where f (MuString _) = True
f _ = False
isLongCode :: Inspection
isLongCode = containsExpression f
where f (Sequence xs) = (length xs) >= 16
f _ = False
compares :: (Expression -> Bool) -> Inspection
compares f = containsExpression (any f.comparisonOperands)
comparisonOperands (Call (Primitive O.Like) [a1, a2]) = [a1, a2]
comparisonOperands (Call (Primitive O.NotLike) [a1, a2]) = [a1, a2]
comparisonOperands _ = []
returnsNil :: Inspection
returnsNil = containsExpression f
where f (Return MuNil) = True
f _ = False
hasEqualIfBranches :: Inspection
hasEqualIfBranches = containsExpression f
where f (If _ None None) = False
f (If _ t e) = t == e
f _ = False
-- | Inspection that tells whether an expression has an if expression where both branches return
-- boolean literals
hasRedundantIf :: Inspection
hasRedundantIf = containsExpression f
where f (If _ (Assignment v1 x) (Assignment v2 y)) = all isBooleanLiteral [x, y] && v1 == v2
f (If _ (Variable v1 x) (Variable v2 y)) = all isBooleanLiteral [x, y] && v1 == v2
f (If _ (Return x) (Return y)) = all isBooleanLiteral [x, y]
f (If _ (Yield x) (Yield y)) = all isBooleanLiteral [x, y]
f (If _ x y) = all isBooleanLiteral [x, y]
f (Sequence expressions) = containsUnstructuredBooleanReturn expressions
f _ = False
containsUnstructuredBooleanReturn (If _ (Return x) None:Return y:_) | all isBooleanLiteral [x, y] = True
containsUnstructuredBooleanReturn (_:xs) = containsUnstructuredBooleanReturn xs
containsUnstructuredBooleanReturn [] = False
-- | Inspection that tells whether an expression has guards where both branches return
-- boolean literals
hasRedundantGuards :: Inspection
hasRedundantGuards = containsBody f -- TODO not true when condition is a pattern
where f (GuardedBody [
(_, Return x),
(Primitive O.Otherwise, Return y)]) = all isBooleanLiteral [x, y]
f _ = False
-- | Inspection that tells whether an expression has guards with a hardcoded false instead of an otherwise
shouldUseOtherwise :: Inspection
shouldUseOtherwise = containsBody f
where f (GuardedBody (last -> (MuTrue, _))) = True
f _ = False
-- | Inspection that tells whether an expression has lambda expressions like '\x -> g x'
hasRedundantLambda :: Inspection
hasRedundantLambda = containsExpression f
where f (Lambda [VariablePattern (x)] (Return (Call _ [Reference (y)]))) = x == y
f _ = False
-- | Inspection that tells whether an expression has parameters that
-- can be avoided using point-free
hasRedundantParameter :: Inspection
hasRedundantParameter = containsExpression f
where f function@(SimpleFunction _ params (Return (Application _ args))) | Just (VariablePattern param) <- safeLast params,
Just (Reference arg) <- safeLast args = param == arg && showsUpOnlyOnce param (identifierReferences function)
f _ = False
showsUpOnlyOnce p = (==1).countElem p
countElem p = length.filter (==p)
safeLast [] = Nothing
safeLast l = Just $ last l
isBooleanLiteral (MuBool _) = True
isBooleanLiteral _ = False
hasRedundantLocalVariableReturn :: Inspection
hasRedundantLocalVariableReturn = containsExpression f
where f (Sequence (reverse ->
(Return (Reference returnedVariable) :
Variable declaredVariable _:_))) = returnedVariable == declaredVariable
f _ = False
hasAssignmentCondition :: Inspection
hasAssignmentCondition = containsExpression f
where f (If (Unification _ _) _ _) = True
f (While (Unification _ _) _) = True
f _ = False
hasAssignmentReturn :: Inspection
hasAssignmentReturn = containsExpression f
where f (Return (Unification _ _)) = True
f _ = False
discardsExceptions :: Inspection
discardsExceptions = containsExpression f
where f (Try _ [(_, None)] _) = True
f (Try _ [(_, Print _)] _) = True
f _ = False
doesConsolePrint :: Inspection
doesConsolePrint = containsExpression f
where f (Print _) = True
f _ = False
hasLongParameterList :: Inspection
hasLongParameterList = containsExpression f
where f (Params p) = (>4).length $ p
f _ = False
hasTooManyMethods :: Inspection
hasTooManyMethods = containsExpression f
where f (Sequence expressions) = (>15).length.filter isMethod $ expressions
f _ = False
isMethod (Method _ _) = True
isMethod _ = False
overridesEqualOrHashButNotBoth :: Inspection
overridesEqualOrHashButNotBoth = containsExpression f
where f (Sequence expressions) = (any isEqual expressions) /= (any isHash expressions)
f (Class _ _ (PrimitiveMethod O.Like _)) = True
f (Class _ _ (PrimitiveMethod O.Hash _)) = True
f _ = False
isEqual (PrimitiveMethod O.Like _) = True
isEqual _ = False
isHash (PrimitiveMethod O.Hash _) = True
isHash _ = False
shouldInvertIfCondition :: Inspection
shouldInvertIfCondition = containsExpression f
where f (If _ None elseBranch) = elseBranch /= None
f _ = False
hasEmptyIfBranches :: Inspection
hasEmptyIfBranches = containsExpression f
where f (If _ None None) = True
f _ = False
hasEmptyRepeat :: Inspection
hasEmptyRepeat = containsExpression f
where f (Repeat _ None) = True
f _ = False
hasUnreachableCode :: Inspection
hasUnreachableCode = containsExpression f
where f (Subroutine _ equations) = any equationMatchesAnyValue . init $ equations
f (Sequence expressions) = hasCodeAfterReturn expressions
f _ = False
equationMatchesAnyValue (Equation patterns body) = all patternMatchesAnyValue patterns && bodyMatchesAnyValue body
patternMatchesAnyValue WildcardPattern = True
patternMatchesAnyValue (VariablePattern _) = True
patternMatchesAnyValue _ = False
bodyMatchesAnyValue (UnguardedBody _) = True
bodyMatchesAnyValue (GuardedBody guards) = any (isTruthy . fst) guards
isTruthy (MuBool True) = True
isTruthy (Primitive O.Otherwise) = True
isTruthy _ = False
hasCodeAfterReturn [] = False
hasCodeAfterReturn [_] = False
hasCodeAfterReturn (Return _:_) = True
hasCodeAfterReturn (_:xs) = hasCodeAfterReturn xs
detectDeclarationTypos :: Identifier -> Expression -> [Identifier]
detectDeclarationTypos = detectTypos declaredIdentifiers
detectUsageTypos :: Identifier -> Expression -> [Identifier]
detectUsageTypos = detectTypos referencedIdentifiers
detectTypos :: Generator Identifier -> Identifier -> Expression -> [Identifier]
detectTypos generator name expression | elem name identifiers = []
| otherwise = filter (similar name) identifiers
where
identifiers = generator expression
similar one other = damerauLevenshtein (pack one) (pack other) == 1
usesNamedSelfReference :: Inspection
usesNamedSelfReference expression = inspect $ do
Object name objectBody <- declarations expression
SimpleMethod _ _ methodBody <- topLevelExpressions objectBody
select (elem name $ referencedIdentifiers methodBody)
where topLevelExpressions (Sequence es) = es
topLevelExpressions e = [e]
| mumuki/mulang | src/Language/Mulang/Inspector/Smell.hs | gpl-3.0 | 9,884 | 0 | 16 | 2,735 | 2,604 | 1,356 | 1,248 | 201 | 11 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- grid is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with grid. If not, see <http://www.gnu.org/licenses/>.
--
{-# LANGUAGE ForeignFunctionInterface #-}
module OpenAL.Types where
import Foreign.Ptr
import Foreign.C
type ALboolean =
CChar
type ALchar =
CChar
type ALbyte =
CChar
type ALubyte =
CUChar
type ALshort =
CShort
type ALushort =
CUShort
type ALint =
CInt
type ALuint =
CUInt
type ALsizei =
CInt
type ALenum =
CInt
type ALfloat =
CFloat
type ALdouble =
CDouble
type ALvoid =
()
| karamellpelle/grid | source/OpenAL/Types.hs | gpl-3.0 | 1,198 | 0 | 5 | 273 | 115 | 82 | 33 | 30 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module WinShop.Similar (
similarItems
) where
-- /* /gp/windowshop/ajax?func=get%2Dsimilar%2Ddata&rankType=getPurchaseSimilarities&asin=143770719X&count=12 */
import WinShop.Api.BaseTypes (Asin (..))
import WinShop.Invoke (QParam, doGet, mkWSRequest, wsFunc)
import WinShop.Query (RankType (SimilarPurchased), WSQuery,
qAsin, qIntVal, qParam, qRankType)
import qualified Data.Aeson as A
import Prelude hiding (asin)
baseParams :: [QParam]
baseParams = [wsFunc "get-similar-data",
qRankType SimilarPurchased]
mkQuery :: Asin -> Int -> WSQuery
mkQuery asin cnt =
query
where
pAsin = qAsin asin
pCnt = qParam "count" $ qIntVal cnt
query = pAsin : pCnt : baseParams
similarItems :: Asin -> Int -> IO (Maybe A.Object)
similarItems asin cnt = do
rsp <- doGet $ mkWSRequest (mkQuery asin cnt)
case rsp of
Just (A.Object o) -> return $ Just o
_ -> return Nothing
-- test :: IO (Maybe A.Object)
-- test = similarItems (Asin "143770719X") 12
| RayRacine/winshop | src/WinShop/Similar.hs | gpl-3.0 | 1,140 | 0 | 13 | 305 | 277 | 154 | 123 | 24 | 2 |
module HEP.Automation.MadGraph.Dataset.Set20110702set1 where
import HEP.Storage.WebDAV.Type
import HEP.Automation.MadGraph.Model
import HEP.Automation.MadGraph.Machine.V2
import HEP.Automation.MadGraph.UserCut
import HEP.Automation.MadGraph.SetupType.V2
import HEP.Automation.MadGraph.Model.SM
import HEP.Automation.MadGraph.Dataset.Processes
import HEP.Automation.JobQueue.JobType.V2
import qualified Data.ByteString as B
psetup_sm_eebardijet :: ProcessSetup SM
psetup_sm_eebardijet = PS {
mversion = MadGraph5
, model = SM
, process = preDefProcess EEDijet
, processBrief = "EEDijet"
, workname = "429SM_EEDijet"
}
psetuplist :: [ProcessSetup SM]
psetuplist = [ psetup_sm_eebardijet ]
sets :: [Int]
sets = [1..10]
eventsets :: [EventSet]
eventsets =
[ EventSet (psetup_sm_eebardijet)
(RS { param = SMParam
, numevent = 10000
, machine = Parton energy LHC
, rgrun = Fixed
, rgscale = 200.0
, match = NoMatch
, cut = DefCut
, pythia = RunPYTHIA
, usercut = NoUserCutDef
, pgs = RunPGS
, jetalgo = KTJet 0.5
, uploadhep = NoUploadHEP
, setnum = num
})
| energy <- [ 50,100..500], num <- sets ]
webdavdir :: WebDAVRemoteDir
webdavdir = WebDAVRemoteDir "paper3/jetenergy"
| wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110702set1.hs | gpl-3.0 | 1,462 | 0 | 10 | 442 | 315 | 201 | 114 | 40 | 1 |
{-# OPTIONS_GHC -w #-}
{-# OPTIONS -fglasgow-exts -cpp #-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-}
module ParAST where
import AbsAST
import LexAST
import ErrM
import qualified Data.Array as Happy_Data_Array
import qualified GHC.Exts as Happy_GHC_Exts
import Control.Applicative(Applicative(..))
-- parser produced by Happy Version 1.19.4
newtype HappyAbsSyn = HappyAbsSyn HappyAny
#if __GLASGOW_HASKELL__ >= 607
type HappyAny = Happy_GHC_Exts.Any
#else
type HappyAny = forall a . a
#endif
happyIn7 :: (Integer) -> (HappyAbsSyn )
happyIn7 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyIn7 #-}
happyOut7 :: (HappyAbsSyn ) -> (Integer)
happyOut7 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyOut7 #-}
happyIn8 :: (Ident) -> (HappyAbsSyn )
happyIn8 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyIn8 #-}
happyOut8 :: (HappyAbsSyn ) -> (Ident)
happyOut8 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyOut8 #-}
happyIn9 :: (Expression) -> (HappyAbsSyn )
happyIn9 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyIn9 #-}
happyOut9 :: (HappyAbsSyn ) -> (Expression)
happyOut9 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyOut9 #-}
happyIn10 :: ([Expression]) -> (HappyAbsSyn )
happyIn10 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyIn10 #-}
happyOut10 :: (HappyAbsSyn ) -> ([Expression])
happyOut10 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyOut10 #-}
happyIn11 :: (Edit) -> (HappyAbsSyn )
happyIn11 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyIn11 #-}
happyOut11 :: (HappyAbsSyn ) -> (Edit)
happyOut11 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyOut11 #-}
happyIn12 :: (Relation) -> (HappyAbsSyn )
happyIn12 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyIn12 #-}
happyOut12 :: (HappyAbsSyn ) -> (Relation)
happyOut12 x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyOut12 #-}
happyInTok :: (Token) -> (HappyAbsSyn )
happyInTok x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyInTok #-}
happyOutTok :: (HappyAbsSyn ) -> (Token)
happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x
{-# INLINE happyOutTok #-}
happyActOffsets :: HappyAddr
happyActOffsets = HappyA# "\x01\x00\x01\x00\x01\x00\x0f\x00\x1b\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x15\x00\x00\x00\x12\x00\x01\x00\x00\x00\x00\x00\x01\x00\x02\x00\x02\x00\x00\x00\x10\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
happyGotoOffsets = HappyA# "\x33\x00\x2c\x00\x27\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\x00\x00\x00\x00\x05\x00\x22\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00"#
happyDefActions :: HappyAddr
happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xff\x00\x00\xeb\xff\xf0\xff\xef\xff\xe9\xff\xf1\xff\xe8\xff\xea\xff\xee\xff\xed\xff\xec\xff\xf7\xff\x00\x00\x00\x00\xf5\xff\x00\x00\x00\x00\xf9\xff\xfa\xff\xf4\xff\x00\x00\x00\x00\xf3\xff\x00\x00\xf8\xff\x00\x00\xf2\xff\xf6\xff"#
happyCheck :: HappyAddr
happyCheck = HappyA# "\xff\xff\x05\x00\x01\x00\x02\x00\x03\x00\x00\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x01\x00\x10\x00\x05\x00\x11\x00\x04\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x01\x00\x02\x00\x03\x00\x0f\x00\x05\x00\x01\x00\x02\x00\x03\x00\x11\x00\x05\x00\x01\x00\x02\x00\x0f\x00\x04\x00\x05\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x01\x00\x02\x00\x01\x00\x02\x00\x05\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
happyTable :: HappyAddr
happyTable = HappyA# "\x00\x00\x1f\x00\x08\x00\x16\x00\x17\x00\x1e\x00\x18\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x08\x00\x19\x00\x06\x00\xff\xff\x22\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x11\x00\x19\x00\x1c\x00\x06\x00\x14\x00\x11\x00\x19\x00\x1d\x00\xff\xff\x14\x00\x11\x00\x12\x00\x06\x00\x13\x00\x14\x00\x11\x00\x19\x00\x1a\x00\x00\x00\x14\x00\x11\x00\x20\x00\x11\x00\x1b\x00\x14\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyReduceArr = Happy_Data_Array.array (4, 23) [
(4 , happyReduce_4),
(5 , happyReduce_5),
(6 , happyReduce_6),
(7 , happyReduce_7),
(8 , happyReduce_8),
(9 , happyReduce_9),
(10 , happyReduce_10),
(11 , happyReduce_11),
(12 , happyReduce_12),
(13 , happyReduce_13),
(14 , happyReduce_14),
(15 , happyReduce_15),
(16 , happyReduce_16),
(17 , happyReduce_17),
(18 , happyReduce_18),
(19 , happyReduce_19),
(20 , happyReduce_20),
(21 , happyReduce_21),
(22 , happyReduce_22),
(23 , happyReduce_23)
]
happy_n_terms = 18 :: Int
happy_n_nonterms = 6 :: Int
happyReduce_4 = happySpecReduce_1 0# happyReduction_4
happyReduction_4 happy_x_1
= case happyOutTok happy_x_1 of { (PT _ (TI happy_var_1)) ->
happyIn7
((read ( happy_var_1)) :: Integer
)}
happyReduce_5 = happySpecReduce_1 1# happyReduction_5
happyReduction_5 happy_x_1
= case happyOutTok happy_x_1 of { (PT _ (TV happy_var_1)) ->
happyIn8
(Ident happy_var_1
)}
happyReduce_6 = happySpecReduce_1 2# happyReduction_6
happyReduction_6 happy_x_1
= happyIn9
(AbsAST.Wildcard
)
happyReduce_7 = happySpecReduce_2 2# happyReduction_7
happyReduction_7 happy_x_2
happy_x_1
= case happyOut7 happy_x_2 of { happy_var_2 ->
happyIn9
(AbsAST.Slot happy_var_2
)}
happyReduce_8 = happySpecReduce_1 2# happyReduction_8
happyReduction_8 happy_x_1
= case happyOut8 happy_x_1 of { happy_var_1 ->
happyIn9
(AbsAST.Constant happy_var_1
)}
happyReduce_9 = happySpecReduce_3 2# happyReduction_9
happyReduction_9 happy_x_3
happy_x_2
happy_x_1
= case happyOut10 happy_x_2 of { happy_var_2 ->
happyIn9
(AbsAST.List happy_var_2
)}
happyReduce_10 = happySpecReduce_1 2# happyReduction_10
happyReduction_10 happy_x_1
= case happyOut12 happy_x_1 of { happy_var_1 ->
happyIn9
(AbsAST.Change happy_var_1
)}
happyReduce_11 = happySpecReduce_1 3# happyReduction_11
happyReduction_11 happy_x_1
= case happyOut9 happy_x_1 of { happy_var_1 ->
happyIn10
((:[]) happy_var_1
)}
happyReduce_12 = happySpecReduce_2 3# happyReduction_12
happyReduction_12 happy_x_2
happy_x_1
= case happyOut9 happy_x_1 of { happy_var_1 ->
case happyOut10 happy_x_2 of { happy_var_2 ->
happyIn10
((:) happy_var_1 happy_var_2
)}}
happyReduce_13 = happySpecReduce_3 4# happyReduction_13
happyReduction_13 happy_x_3
happy_x_2
happy_x_1
= case happyOut9 happy_x_1 of { happy_var_1 ->
case happyOut12 happy_x_2 of { happy_var_2 ->
case happyOut9 happy_x_3 of { happy_var_3 ->
happyIn11
(AbsAST.Rewrite happy_var_1 happy_var_2 happy_var_3
)}}}
happyReduce_14 = happySpecReduce_1 5# happyReduction_14
happyReduction_14 happy_x_1
= happyIn12
(AbsAST.Equivalent
)
happyReduce_15 = happySpecReduce_1 5# happyReduction_15
happyReduction_15 happy_x_1
= happyIn12
(AbsAST.Entails
)
happyReduce_16 = happySpecReduce_1 5# happyReduction_16
happyReduction_16 happy_x_1
= happyIn12
(AbsAST.IsEntailedBy
)
happyReduce_17 = happySpecReduce_1 5# happyReduction_17
happyReduction_17 happy_x_1
= happyIn12
(AbsAST.Excludes
)
happyReduce_18 = happySpecReduce_1 5# happyReduction_18
happyReduction_18 happy_x_1
= happyIn12
(AbsAST.DisjointWith
)
happyReduce_19 = happySpecReduce_1 5# happyReduction_19
happyReduction_19 happy_x_1
= happyIn12
(AbsAST.Overlaps
)
happyReduce_20 = happySpecReduce_1 5# happyReduction_20
happyReduction_20 happy_x_1
= happyIn12
(AbsAST.IndependentOf
)
happyReduce_21 = happySpecReduce_1 5# happyReduction_21
happyReduction_21 happy_x_1
= happyIn12
(AbsAST.None
)
happyReduce_22 = happySpecReduce_1 5# happyReduction_22
happyReduction_22 happy_x_1
= happyIn12
(AbsAST.Presupposes
)
happyReduce_23 = happySpecReduce_1 5# happyReduction_23
happyReduction_23 happy_x_1
= happyIn12
(AbsAST.Implicates
)
happyNewToken action sts stk [] =
happyDoAction 17# notHappyAtAll action sts stk []
happyNewToken action sts stk (tk:tks) =
let cont i = happyDoAction i tk action sts stk tks in
case tk of {
PT _ (TS _ 1) -> cont 1#;
PT _ (TS _ 2) -> cont 2#;
PT _ (TS _ 3) -> cont 3#;
PT _ (TS _ 4) -> cont 4#;
PT _ (TS _ 5) -> cont 5#;
PT _ (TS _ 6) -> cont 6#;
PT _ (TS _ 7) -> cont 7#;
PT _ (TS _ 8) -> cont 8#;
PT _ (TS _ 9) -> cont 9#;
PT _ (TS _ 10) -> cont 10#;
PT _ (TS _ 11) -> cont 11#;
PT _ (TS _ 12) -> cont 12#;
PT _ (TS _ 13) -> cont 13#;
PT _ (TS _ 14) -> cont 14#;
PT _ (TI happy_dollar_dollar) -> cont 15#;
PT _ (TV happy_dollar_dollar) -> cont 16#;
_ -> happyError' (tk:tks)
}
happyError_ 17# tk tks = happyError' tks
happyError_ _ tk tks = happyError' (tk:tks)
happyThen :: () => Err a -> (a -> Err b) -> Err b
happyThen = (thenM)
happyReturn :: () => a -> Err a
happyReturn = (returnM)
happyThen1 m k tks = (thenM) m (\a -> k a tks)
happyReturn1 :: () => a -> b -> Err a
happyReturn1 = \a tks -> (returnM) a
happyError' :: () => [(Token)] -> Err a
happyError' = happyError
pExpression tks = happySomeParser where
happySomeParser = happyThen (happyParse 0# tks) (\x -> happyReturn (happyOut9 x))
pListExpression tks = happySomeParser where
happySomeParser = happyThen (happyParse 1# tks) (\x -> happyReturn (happyOut10 x))
pEdit tks = happySomeParser where
happySomeParser = happyThen (happyParse 2# tks) (\x -> happyReturn (happyOut11 x))
pRelation tks = happySomeParser where
happySomeParser = happyThen (happyParse 3# tks) (\x -> happyReturn (happyOut12 x))
happySeq = happyDontSeq
returnM :: a -> Err a
returnM = return
thenM :: Err a -> (a -> Err b) -> Err b
thenM = (>>=)
happyError :: [Token] -> Err a
happyError ts =
Bad $ "syntax error at " ++ tokenPos ts ++
case ts of
[] -> []
[Err _] -> " due to lexer error"
_ -> " before " ++ unwords (map (id . prToken) (take 4 ts))
myLexer = tokens
{-# LINE 1 "templates/GenericTemplate.hs" #-}
-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp
-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
#if __GLASGOW_HASKELL__ > 706
#define LT(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.<# m)) :: Bool)
#define GTE(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.>=# m)) :: Bool)
#define EQ(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.==# m)) :: Bool)
#else
#define LT(n,m) (n Happy_GHC_Exts.<# m)
#define GTE(n,m) (n Happy_GHC_Exts.>=# m)
#define EQ(n,m) (n Happy_GHC_Exts.==# m)
#endif
data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList
infixr 9 `HappyStk`
data HappyStk a = HappyStk a (HappyStk a)
-----------------------------------------------------------------------------
-- starting the parse
happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll
-----------------------------------------------------------------------------
-- Accepting the parse
-- If the current token is 0#, it means we've just accepted a partial
-- parse (a %partial parser). We must ignore the saved token on the top of
-- the stack in this case.
happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =
happyReturn1 ans
happyAccept j tk st sts (HappyStk ans _) =
(happyTcHack j (happyTcHack st)) (happyReturn1 ans)
-----------------------------------------------------------------------------
-- Arrays only: do the next action
happyDoAction i tk st
= {- nothing -}
case action of
0# -> {- nothing -}
happyFail i tk st
-1# -> {- nothing -}
happyAccept i tk st
n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}
(happyReduceArr Happy_Data_Array.! rule) i tk st
where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))
n -> {- nothing -}
happyShift new_state i tk st
where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))
where off = indexShortOffAddr happyActOffsets st
off_i = (off Happy_GHC_Exts.+# i)
check = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#))
then EQ(indexShortOffAddr happyCheck off_i, i)
else False
action
| check = indexShortOffAddr happyTable off_i
| otherwise = indexShortOffAddr happyDefActions st
indexShortOffAddr (HappyA# arr) off =
Happy_GHC_Exts.narrow16Int# i
where
i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)
high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))
low = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))
off' = off Happy_GHC_Exts.*# 2#
data HappyAddr = HappyA# Happy_GHC_Exts.Addr#
-----------------------------------------------------------------------------
-- HappyState data type (not arrays)
-----------------------------------------------------------------------------
-- Shifting a token
happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =
let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
-- trace "shifting the error token" $
happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)
happyShift new_state i tk st sts stk =
happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)
-- happyReduce is specialised for the common cases.
happySpecReduce_0 i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happySpecReduce_0 nt fn j tk st@((action)) sts stk
= happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)
happySpecReduce_1 i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')
= let r = fn v1 in
happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
happySpecReduce_2 i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')
= let r = fn v1 v2 in
happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
happySpecReduce_3 i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')
= let r = fn v1 v2 v3 in
happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
happyReduce k i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyReduce k nt fn j tk st sts stk
= case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of
sts1@((HappyCons (st1@(action)) (_))) ->
let r = fn stk in -- it doesn't hurt to always seq here...
happyDoSeq r (happyGoto nt j tk st1 sts1 r)
happyMonadReduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonadReduce k nt fn j tk st sts stk =
case happyDrop k (HappyCons (st) (sts)) of
sts1@((HappyCons (st1@(action)) (_))) ->
let drop_stk = happyDropStk k stk in
happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
happyMonad2Reduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonad2Reduce k nt fn j tk st sts stk =
case happyDrop k (HappyCons (st) (sts)) of
sts1@((HappyCons (st1@(action)) (_))) ->
let drop_stk = happyDropStk k stk
off = indexShortOffAddr happyGotoOffsets st1
off_i = (off Happy_GHC_Exts.+# nt)
new_state = indexShortOffAddr happyTable off_i
in
happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
happyDrop 0# l = l
happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t
happyDropStk 0# l = l
happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs
-----------------------------------------------------------------------------
-- Moving to a new state after a reduction
happyGoto nt j tk st =
{- nothing -}
happyDoAction j tk new_state
where off = indexShortOffAddr happyGotoOffsets st
off_i = (off Happy_GHC_Exts.+# nt)
new_state = indexShortOffAddr happyTable off_i
-----------------------------------------------------------------------------
-- Error recovery (0# is the error token)
-- parse error if we are in recovery and we fail again
happyFail 0# tk old_st _ stk@(x `HappyStk` _) =
let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
-- trace "failing" $
happyError_ i tk
{- We don't need state discarding for our restricted implementation of
"error". In fact, it can cause some bogus parses, so I've disabled it
for now --SDM
-- discard a state
happyFail 0# tk old_st (HappyCons ((action)) (sts))
(saved_tok `HappyStk` _ `HappyStk` stk) =
-- trace ("discarding state, depth " ++ show (length stk)) $
happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))
-}
-- Enter error recovery: generate an error token,
-- save the old token and carry on.
happyFail i tk (action) sts stk =
-- trace "entering error recovery" $
happyDoAction 0# tk action sts ( (Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk)
-- Internal happy errors:
notHappyAtAll :: a
notHappyAtAll = error "Internal Happy error\n"
-----------------------------------------------------------------------------
-- Hack to get the typechecker to accept our action functions
happyTcHack :: Happy_GHC_Exts.Int# -> a -> a
happyTcHack x y = y
{-# INLINE happyTcHack #-}
-----------------------------------------------------------------------------
-- Seq-ing. If the --strict flag is given, then Happy emits
-- happySeq = happyDoSeq
-- otherwise it emits
-- happySeq = happyDontSeq
happyDoSeq, happyDontSeq :: a -> b -> b
happyDoSeq a b = a `seq` b
happyDontSeq a b = b
-----------------------------------------------------------------------------
-- Don't inline any functions from the template. GHC has a nasty habit
-- of deciding to inline happyGoto everywhere, which increases the size of
-- the generated parser quite a bit.
{-# NOINLINE happyDoAction #-}
{-# NOINLINE happyTable #-}
{-# NOINLINE happyCheck #-}
{-# NOINLINE happyActOffsets #-}
{-# NOINLINE happyGotoOffsets #-}
{-# NOINLINE happyDefActions #-}
{-# NOINLINE happyShift #-}
{-# NOINLINE happySpecReduce_0 #-}
{-# NOINLINE happySpecReduce_1 #-}
{-# NOINLINE happySpecReduce_2 #-}
{-# NOINLINE happySpecReduce_3 #-}
{-# NOINLINE happyReduce #-}
{-# NOINLINE happyMonadReduce #-}
{-# NOINLINE happyGoto #-}
{-# NOINLINE happyFail #-}
-- end of Happy Template.
| cunger/mule | src/grammar/BNFC/ParAST.hs | gpl-3.0 | 19,582 | 240 | 19 | 3,736 | 5,003 | 2,679 | 2,324 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.PlayCustomApp.Types.Sum
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Network.Google.PlayCustomApp.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
-- | V1 error format.
data Xgafv
= X1
-- ^ @1@
-- v1 error format
| X2
-- ^ @2@
-- v2 error format
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable Xgafv
instance FromHttpApiData Xgafv where
parseQueryParam = \case
"1" -> Right X1
"2" -> Right X2
x -> Left ("Unable to parse Xgafv from: " <> x)
instance ToHttpApiData Xgafv where
toQueryParam = \case
X1 -> "1"
X2 -> "2"
instance FromJSON Xgafv where
parseJSON = parseJSONText "Xgafv"
instance ToJSON Xgafv where
toJSON = toJSONText
| brendanhay/gogol | gogol-playcustomapp/gen/Network/Google/PlayCustomApp/Types/Sum.hs | mpl-2.0 | 1,229 | 0 | 11 | 292 | 197 | 114 | 83 | 26 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Resource.DFAReporting.PlacementStrategies.Update
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates an existing placement strategy.
--
-- /See:/ <https://developers.google.com/doubleclick-advertisers/ DCM/DFA Reporting And Trafficking API Reference> for @dfareporting.placementStrategies.update@.
module Network.Google.Resource.DFAReporting.PlacementStrategies.Update
(
-- * REST Resource
PlacementStrategiesUpdateResource
-- * Creating a Request
, placementStrategiesUpdate
, PlacementStrategiesUpdate
-- * Request Lenses
, psuProFileId
, psuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
-- | A resource alias for @dfareporting.placementStrategies.update@ method which the
-- 'PlacementStrategiesUpdate' request conforms to.
type PlacementStrategiesUpdateResource =
"dfareporting" :>
"v2.7" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placementStrategies" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PlacementStrategy :>
Put '[JSON] PlacementStrategy
-- | Updates an existing placement strategy.
--
-- /See:/ 'placementStrategiesUpdate' smart constructor.
data PlacementStrategiesUpdate = PlacementStrategiesUpdate'
{ _psuProFileId :: !(Textual Int64)
, _psuPayload :: !PlacementStrategy
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'PlacementStrategiesUpdate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'psuProFileId'
--
-- * 'psuPayload'
placementStrategiesUpdate
:: Int64 -- ^ 'psuProFileId'
-> PlacementStrategy -- ^ 'psuPayload'
-> PlacementStrategiesUpdate
placementStrategiesUpdate pPsuProFileId_ pPsuPayload_ =
PlacementStrategiesUpdate'
{ _psuProFileId = _Coerce # pPsuProFileId_
, _psuPayload = pPsuPayload_
}
-- | User profile ID associated with this request.
psuProFileId :: Lens' PlacementStrategiesUpdate Int64
psuProFileId
= lens _psuProFileId (\ s a -> s{_psuProFileId = a})
. _Coerce
-- | Multipart request metadata.
psuPayload :: Lens' PlacementStrategiesUpdate PlacementStrategy
psuPayload
= lens _psuPayload (\ s a -> s{_psuPayload = a})
instance GoogleRequest PlacementStrategiesUpdate
where
type Rs PlacementStrategiesUpdate = PlacementStrategy
type Scopes PlacementStrategiesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementStrategiesUpdate'{..}
= go _psuProFileId (Just AltJSON) _psuPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementStrategiesUpdateResource)
mempty
| rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Update.hs | mpl-2.0 | 3,582 | 0 | 14 | 769 | 406 | 242 | 164 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateDownloadURL
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a signed URL for downloading deployed function source code. The
-- URL is only valid for a limited period and should be used within minutes
-- after generation. For more information about the signed URL usage see:
-- https:\/\/cloud.google.com\/storage\/docs\/access-control\/signed-urls
--
-- /See:/ <https://cloud.google.com/functions Cloud Functions API Reference> for @cloudfunctions.projects.locations.functions.generateDownloadUrl@.
module Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateDownloadURL
(
-- * REST Resource
ProjectsLocationsFunctionsGenerateDownloadURLResource
-- * Creating a Request
, projectsLocationsFunctionsGenerateDownloadURL
, ProjectsLocationsFunctionsGenerateDownloadURL
-- * Request Lenses
, plfgduXgafv
, plfgduUploadProtocol
, plfgduAccessToken
, plfgduUploadType
, plfgduPayload
, plfgduName
, plfgduCallback
) where
import Network.Google.CloudFunctions.Types
import Network.Google.Prelude
-- | A resource alias for @cloudfunctions.projects.locations.functions.generateDownloadUrl@ method which the
-- 'ProjectsLocationsFunctionsGenerateDownloadURL' request conforms to.
type ProjectsLocationsFunctionsGenerateDownloadURLResource
=
"v1" :>
CaptureMode "name" "generateDownloadUrl" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GenerateDownloadURLRequest :>
Post '[JSON] GenerateDownloadURLResponse
-- | Returns a signed URL for downloading deployed function source code. The
-- URL is only valid for a limited period and should be used within minutes
-- after generation. For more information about the signed URL usage see:
-- https:\/\/cloud.google.com\/storage\/docs\/access-control\/signed-urls
--
-- /See:/ 'projectsLocationsFunctionsGenerateDownloadURL' smart constructor.
data ProjectsLocationsFunctionsGenerateDownloadURL =
ProjectsLocationsFunctionsGenerateDownloadURL'
{ _plfgduXgafv :: !(Maybe Xgafv)
, _plfgduUploadProtocol :: !(Maybe Text)
, _plfgduAccessToken :: !(Maybe Text)
, _plfgduUploadType :: !(Maybe Text)
, _plfgduPayload :: !GenerateDownloadURLRequest
, _plfgduName :: !Text
, _plfgduCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'ProjectsLocationsFunctionsGenerateDownloadURL' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'plfgduXgafv'
--
-- * 'plfgduUploadProtocol'
--
-- * 'plfgduAccessToken'
--
-- * 'plfgduUploadType'
--
-- * 'plfgduPayload'
--
-- * 'plfgduName'
--
-- * 'plfgduCallback'
projectsLocationsFunctionsGenerateDownloadURL
:: GenerateDownloadURLRequest -- ^ 'plfgduPayload'
-> Text -- ^ 'plfgduName'
-> ProjectsLocationsFunctionsGenerateDownloadURL
projectsLocationsFunctionsGenerateDownloadURL pPlfgduPayload_ pPlfgduName_ =
ProjectsLocationsFunctionsGenerateDownloadURL'
{ _plfgduXgafv = Nothing
, _plfgduUploadProtocol = Nothing
, _plfgduAccessToken = Nothing
, _plfgduUploadType = Nothing
, _plfgduPayload = pPlfgduPayload_
, _plfgduName = pPlfgduName_
, _plfgduCallback = Nothing
}
-- | V1 error format.
plfgduXgafv :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Xgafv)
plfgduXgafv
= lens _plfgduXgafv (\ s a -> s{_plfgduXgafv = a})
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
plfgduUploadProtocol :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Text)
plfgduUploadProtocol
= lens _plfgduUploadProtocol
(\ s a -> s{_plfgduUploadProtocol = a})
-- | OAuth access token.
plfgduAccessToken :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Text)
plfgduAccessToken
= lens _plfgduAccessToken
(\ s a -> s{_plfgduAccessToken = a})
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
plfgduUploadType :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Text)
plfgduUploadType
= lens _plfgduUploadType
(\ s a -> s{_plfgduUploadType = a})
-- | Multipart request metadata.
plfgduPayload :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL GenerateDownloadURLRequest
plfgduPayload
= lens _plfgduPayload
(\ s a -> s{_plfgduPayload = a})
-- | The name of function for which source code Google Cloud Storage signed
-- URL should be generated.
plfgduName :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL Text
plfgduName
= lens _plfgduName (\ s a -> s{_plfgduName = a})
-- | JSONP
plfgduCallback :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Text)
plfgduCallback
= lens _plfgduCallback
(\ s a -> s{_plfgduCallback = a})
instance GoogleRequest
ProjectsLocationsFunctionsGenerateDownloadURL
where
type Rs ProjectsLocationsFunctionsGenerateDownloadURL
= GenerateDownloadURLResponse
type Scopes
ProjectsLocationsFunctionsGenerateDownloadURL
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsFunctionsGenerateDownloadURL'{..}
= go _plfgduName _plfgduXgafv _plfgduUploadProtocol
_plfgduAccessToken
_plfgduUploadType
_plfgduCallback
(Just AltJSON)
_plfgduPayload
cloudFunctionsService
where go
= buildClient
(Proxy ::
Proxy
ProjectsLocationsFunctionsGenerateDownloadURLResource)
mempty
| brendanhay/gogol | gogol-cloudfunctions/gen/Network/Google/Resource/CloudFunctions/Projects/Locations/Functions/GenerateDownloadURL.hs | mpl-2.0 | 6,705 | 0 | 16 | 1,358 | 785 | 461 | 324 | 122 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Resource.Partners.Users.DeleteCompanyRelation
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes a user\'s company relation. Unaffiliaites the user from a
-- company.
--
-- /See:/ <https://developers.google.com/partners/ Google Partners API Reference> for @partners.users.deleteCompanyRelation@.
module Network.Google.Resource.Partners.Users.DeleteCompanyRelation
(
-- * REST Resource
UsersDeleteCompanyRelationResource
-- * Creating a Request
, usersDeleteCompanyRelation
, UsersDeleteCompanyRelation
-- * Request Lenses
, udcrXgafv
, udcrUploadProtocol
, udcrAccessToken
, udcrUploadType
, udcrUserId
, udcrRequestMetadataPartnersSessionId
, udcrRequestMetadataLocale
, udcrRequestMetadataExperimentIds
, udcrRequestMetadataUserOverridesIPAddress
, udcrRequestMetadataTrafficSourceTrafficSubId
, udcrRequestMetadataUserOverridesUserId
, udcrRequestMetadataTrafficSourceTrafficSourceId
, udcrCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
-- | A resource alias for @partners.users.deleteCompanyRelation@ method which the
-- 'UsersDeleteCompanyRelation' request conforms to.
type UsersDeleteCompanyRelationResource =
"v2" :>
"users" :>
Capture "userId" Text :>
"companyRelation" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "requestMetadata.partnersSessionId" Text
:>
QueryParam "requestMetadata.locale" Text :>
QueryParams "requestMetadata.experimentIds" Text :>
QueryParam "requestMetadata.userOverrides.ipAddress"
Text
:>
QueryParam
"requestMetadata.trafficSource.trafficSubId"
Text
:>
QueryParam "requestMetadata.userOverrides.userId"
Text
:>
QueryParam
"requestMetadata.trafficSource.trafficSourceId"
Text
:>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Delete '[JSON] Empty
-- | Deletes a user\'s company relation. Unaffiliaites the user from a
-- company.
--
-- /See:/ 'usersDeleteCompanyRelation' smart constructor.
data UsersDeleteCompanyRelation =
UsersDeleteCompanyRelation'
{ _udcrXgafv :: !(Maybe Xgafv)
, _udcrUploadProtocol :: !(Maybe Text)
, _udcrAccessToken :: !(Maybe Text)
, _udcrUploadType :: !(Maybe Text)
, _udcrUserId :: !Text
, _udcrRequestMetadataPartnersSessionId :: !(Maybe Text)
, _udcrRequestMetadataLocale :: !(Maybe Text)
, _udcrRequestMetadataExperimentIds :: !(Maybe [Text])
, _udcrRequestMetadataUserOverridesIPAddress :: !(Maybe Text)
, _udcrRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text)
, _udcrRequestMetadataUserOverridesUserId :: !(Maybe Text)
, _udcrRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text)
, _udcrCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'UsersDeleteCompanyRelation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'udcrXgafv'
--
-- * 'udcrUploadProtocol'
--
-- * 'udcrAccessToken'
--
-- * 'udcrUploadType'
--
-- * 'udcrUserId'
--
-- * 'udcrRequestMetadataPartnersSessionId'
--
-- * 'udcrRequestMetadataLocale'
--
-- * 'udcrRequestMetadataExperimentIds'
--
-- * 'udcrRequestMetadataUserOverridesIPAddress'
--
-- * 'udcrRequestMetadataTrafficSourceTrafficSubId'
--
-- * 'udcrRequestMetadataUserOverridesUserId'
--
-- * 'udcrRequestMetadataTrafficSourceTrafficSourceId'
--
-- * 'udcrCallback'
usersDeleteCompanyRelation
:: Text -- ^ 'udcrUserId'
-> UsersDeleteCompanyRelation
usersDeleteCompanyRelation pUdcrUserId_ =
UsersDeleteCompanyRelation'
{ _udcrXgafv = Nothing
, _udcrUploadProtocol = Nothing
, _udcrAccessToken = Nothing
, _udcrUploadType = Nothing
, _udcrUserId = pUdcrUserId_
, _udcrRequestMetadataPartnersSessionId = Nothing
, _udcrRequestMetadataLocale = Nothing
, _udcrRequestMetadataExperimentIds = Nothing
, _udcrRequestMetadataUserOverridesIPAddress = Nothing
, _udcrRequestMetadataTrafficSourceTrafficSubId = Nothing
, _udcrRequestMetadataUserOverridesUserId = Nothing
, _udcrRequestMetadataTrafficSourceTrafficSourceId = Nothing
, _udcrCallback = Nothing
}
-- | V1 error format.
udcrXgafv :: Lens' UsersDeleteCompanyRelation (Maybe Xgafv)
udcrXgafv
= lens _udcrXgafv (\ s a -> s{_udcrXgafv = a})
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
udcrUploadProtocol :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrUploadProtocol
= lens _udcrUploadProtocol
(\ s a -> s{_udcrUploadProtocol = a})
-- | OAuth access token.
udcrAccessToken :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrAccessToken
= lens _udcrAccessToken
(\ s a -> s{_udcrAccessToken = a})
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
udcrUploadType :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrUploadType
= lens _udcrUploadType
(\ s a -> s{_udcrUploadType = a})
-- | The ID of the user. Can be set to 'me' to mean the currently
-- authenticated user.
udcrUserId :: Lens' UsersDeleteCompanyRelation Text
udcrUserId
= lens _udcrUserId (\ s a -> s{_udcrUserId = a})
-- | Google Partners session ID.
udcrRequestMetadataPartnersSessionId :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrRequestMetadataPartnersSessionId
= lens _udcrRequestMetadataPartnersSessionId
(\ s a ->
s{_udcrRequestMetadataPartnersSessionId = a})
-- | Locale to use for the current request.
udcrRequestMetadataLocale :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrRequestMetadataLocale
= lens _udcrRequestMetadataLocale
(\ s a -> s{_udcrRequestMetadataLocale = a})
-- | Experiment IDs the current request belongs to.
udcrRequestMetadataExperimentIds :: Lens' UsersDeleteCompanyRelation [Text]
udcrRequestMetadataExperimentIds
= lens _udcrRequestMetadataExperimentIds
(\ s a -> s{_udcrRequestMetadataExperimentIds = a})
. _Default
. _Coerce
-- | IP address to use instead of the user\'s geo-located IP address.
udcrRequestMetadataUserOverridesIPAddress :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrRequestMetadataUserOverridesIPAddress
= lens _udcrRequestMetadataUserOverridesIPAddress
(\ s a ->
s{_udcrRequestMetadataUserOverridesIPAddress = a})
-- | Second level identifier to indicate where the traffic comes from. An
-- identifier has multiple letters created by a team which redirected the
-- traffic to us.
udcrRequestMetadataTrafficSourceTrafficSubId :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrRequestMetadataTrafficSourceTrafficSubId
= lens _udcrRequestMetadataTrafficSourceTrafficSubId
(\ s a ->
s{_udcrRequestMetadataTrafficSourceTrafficSubId = a})
-- | Logged-in user ID to impersonate instead of the user\'s ID.
udcrRequestMetadataUserOverridesUserId :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrRequestMetadataUserOverridesUserId
= lens _udcrRequestMetadataUserOverridesUserId
(\ s a ->
s{_udcrRequestMetadataUserOverridesUserId = a})
-- | Identifier to indicate where the traffic comes from. An identifier has
-- multiple letters created by a team which redirected the traffic to us.
udcrRequestMetadataTrafficSourceTrafficSourceId :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrRequestMetadataTrafficSourceTrafficSourceId
= lens
_udcrRequestMetadataTrafficSourceTrafficSourceId
(\ s a ->
s{_udcrRequestMetadataTrafficSourceTrafficSourceId =
a})
-- | JSONP
udcrCallback :: Lens' UsersDeleteCompanyRelation (Maybe Text)
udcrCallback
= lens _udcrCallback (\ s a -> s{_udcrCallback = a})
instance GoogleRequest UsersDeleteCompanyRelation
where
type Rs UsersDeleteCompanyRelation = Empty
type Scopes UsersDeleteCompanyRelation = '[]
requestClient UsersDeleteCompanyRelation'{..}
= go _udcrUserId _udcrXgafv _udcrUploadProtocol
_udcrAccessToken
_udcrUploadType
_udcrRequestMetadataPartnersSessionId
_udcrRequestMetadataLocale
(_udcrRequestMetadataExperimentIds ^. _Default)
_udcrRequestMetadataUserOverridesIPAddress
_udcrRequestMetadataTrafficSourceTrafficSubId
_udcrRequestMetadataUserOverridesUserId
_udcrRequestMetadataTrafficSourceTrafficSourceId
_udcrCallback
(Just AltJSON)
partnersService
where go
= buildClient
(Proxy :: Proxy UsersDeleteCompanyRelationResource)
mempty
| brendanhay/gogol | gogol-partners/gen/Network/Google/Resource/Partners/Users/DeleteCompanyRelation.hs | mpl-2.0 | 10,116 | 0 | 24 | 2,385 | 1,282 | 738 | 544 | 201 | 1 |
{-# LANGUAGE OverloadedStrings, MultiWayIf, LambdaCase, TupleSections, DeriveGeneric, DeriveAnyClass #-}
module Onliner where
import Data.Function
import Data.List
import Data.Char
import Data.Maybe
import qualified Data.Map as Map
import Control.Monad
import GHC.Generics (Generic)
import Data.Time
import qualified Data.ByteString.Lazy.UTF8 as ULBS
import Data.Aeson
import Data.Aeson.Types
import Control.Concurrent.Async
import Network.URI
import Network.HTTP.Client
import Network.HTTP.Types.Status
import Control.RateLimit
import Data.Time.Units
import Text.XML.HXT.Core
import Text.HandsomeSoup
import Text.Regex.TDFA
import Control.DeepSeq
import Control.Concurrent.MSem
import Flat
onlinerTimeFormat :: String
onlinerTimeFormat = iso8601DateFormat (Just "%H:%M:%S%z")
onlinerMinRooms :: Int
onlinerMinRooms = 1
onlinerMaxRooms :: Int
onlinerMaxRooms = 6
onlinerMinPrice :: Int
onlinerMinPrice = 1
onlinerMaxPrice :: Int
onlinerMaxPrice = 1000000
onlinerPriceStep :: Int
onlinerPriceStep = 5000
onlinerFlatsUrl :: Int -> Int -> Int -> Int -> String
onlinerFlatsUrl rooms minPrice maxPrice page = escapeURIString (\c -> c /= '[' && c /= ']') $
"https://pk.api.onliner.by/search/apartments" ++
"?number_of_rooms[]=" ++ show rooms ++
"&price[min]=" ++ show minPrice ++
"&price[max]=" ++ show maxPrice ++
"¤cy=usd" ++
"&page=" ++ show page
onlinerOneFlatUrl :: Int -> String
onlinerOneFlatUrl id' =
"https://r.onliner.by/pk/apartments/" ++ show id'
onlinerLimit :: Millisecond
onlinerLimit = fromMicroseconds 500000
data OnlinerLocation = OnlinerLocation { onlinerLocationAddress :: String
, onlinerLocationUserAddress :: String
, onlinerLocationLatitude :: Double
, onlinerLocationLongitude :: Double
}
instance FromJSON OnlinerLocation where
parseJSON (Object location) =
OnlinerLocation <$>
location .: "address" <*>
location .: "user_address" <*>
location .: "latitude" <*>
location .: "longitude"
parseJSON invalid =
typeMismatch "OnlinerLocation" invalid
data OnlinerPriceConverted = OnlinerPriceConverted { onlinerPriceConvertedAmount :: String
, onlinerPriceConvertedCurrency :: String
}
instance FromJSON OnlinerPriceConverted where
parseJSON (Object price) =
OnlinerPriceConverted <$>
price .: "amount" <*>
price .: "currency"
parseJSON invalid =
typeMismatch "OnlinerPrice" invalid
data OnlinerPrice = OnlinerPrice { onlinerPriceAmount :: String
, onlinerPriceCurrency :: String
, onlinerPriceConverted :: Map.Map String OnlinerPriceConverted
}
instance FromJSON OnlinerPrice where
parseJSON (Object price) =
OnlinerPrice <$>
price .: "amount" <*>
price .: "currency" <*>
price .: "converted"
parseJSON invalid =
typeMismatch "OnlinerPrice" invalid
data OnlinerArea = OnlinerArea { onlinerAreaTotal :: Double
, onlinerAreaLiving :: Double
, onlinerAreaKitchen :: Double
}
instance FromJSON OnlinerArea where
parseJSON (Object area) =
OnlinerArea <$>
area .: "total" <*>
area .: "living" <*>
area .: "kitchen"
parseJSON invalid =
typeMismatch "OnlinerArea" invalid
data OnlinerSellerType = OnlinerSellerTypeAgent | OnlinerSellerTypeOwner | OnlinerSellerTypeBuilder
deriving (Eq, Show, Read)
instance FromJSON OnlinerSellerType where
parseJSON (String "agent") =
return OnlinerSellerTypeAgent
parseJSON (String "owner") =
return OnlinerSellerTypeOwner
parseJSON (String "builder") =
return OnlinerSellerTypeBuilder
parseJSON invalid =
typeMismatch "OnlinerSellerType" invalid
newtype OnlinerSeller = OnlinerSeller { onlinerSellerType :: OnlinerSellerType
}
instance FromJSON OnlinerSeller where
parseJSON (Object seller) =
OnlinerSeller <$>
seller .: "type"
parseJSON invalid =
typeMismatch "OnlinerSeller" invalid
data OnlinerFlat = OnlinerFlat { onlinerFlatId :: Int
, onlinerFlatAuthorId :: Int
, onlinerFlatLocation :: OnlinerLocation
, onlinerFlatPrice :: OnlinerPrice
, onlinerFlatResale :: Bool
, onlinerFlatNumberOfRooms :: Int
, onlinerFlatFloor :: Int
, onlinerFlatNumberOfFloors :: Int
, onlinerFlatArea :: OnlinerArea
, onlinerFlatPhoto :: String
, onlinerFlatSeller :: OnlinerSeller
, onlinerFlatCreatedAt :: ZonedTime
, onlinerFlatLastTimeUp :: ZonedTime
, onlinerFlatUpAvailableIn :: Int
, onlinerFlatUrl :: String
}
instance FromJSON OnlinerFlat where
parseJSON (Object flat) =
OnlinerFlat <$>
flat .: "id" <*>
flat .: "author_id" <*>
flat .: "location" <*>
flat .: "price" <*>
flat .: "resale" <*>
flat .: "number_of_rooms" <*>
flat .: "floor" <*>
flat .: "number_of_floors" <*>
flat .: "area" <*>
flat .: "photo" <*>
flat .: "seller" <*>
(flat .: "created_at" >>= onlinerParseTime) <*>
(flat .: "last_time_up" >>= onlinerParseTime) <*>
flat .: "up_available_in" <*>
flat .: "url" where
onlinerParseTime = parseTimeM False defaultTimeLocale onlinerTimeFormat
parseJSON invalid =
typeMismatch "OnlinerFlat" invalid
data OnlinerPage = OnlinerPage { onlinerPageLimit :: Int
, onlinerPageItems :: Int
, onlinerPageCurrent :: Int
, onlinerPageLast :: Int
}
instance FromJSON OnlinerPage where
parseJSON (Object page) =
OnlinerPage <$>
page .: "limit" <*>
page .: "items" <*>
page .: "current" <*>
page .: "last"
parseJSON invalid =
typeMismatch "OnlinerPage" invalid
data OnlinerPageResult = OnlinerPageResult { onlinerPageResultApartments :: [OnlinerFlat]
, onlinerPageResultTotal :: Int
, onlinerPageResultPage :: OnlinerPage
}
instance FromJSON OnlinerPageResult where
parseJSON (Object pageResult) =
OnlinerPageResult <$>
pageResult .: "apartments" <*>
pageResult .: "total" <*>
pageResult .: "page"
parseJSON invalid =
typeMismatch "OnlinerPageResult" invalid
sps :: String -> String
sps s = s >>= \c -> if c == ' ' then "( | )" else [c]
parseYear :: String -> Maybe Int
parseYear option =
let yearString = concat (option =~ sps "дом [[:digit:]]{4} года$" :: [[String]])
in read . take 4 . drop 4 <$> listToMaybe yearString
parseHouseType :: String -> Maybe HouseType
parseHouseType option | option =~ sps "^Каркасный дом" = Just HouseTypeFrame
| option =~ sps "^Блочный дом" = Just HouseTypeBlock
| option =~ sps "^Кирпичный дом" = Just HouseTypeBrick
| option =~ sps "^Панельный дом" = Just HouseTypePanel
| option =~ sps "^Монолитный дом" = Just HouseTypeSolid
| otherwise = Nothing
parseBalcony :: String -> Maybe Bool
parseBalcony option | option =~ sps "^С балконом" = Just True
| option =~ sps "^Без балкона" = Just False
| otherwise = Nothing
parseParking :: String -> Maybe Parking
parseParking option | option =~ sps "^Без выделенного парковочного места" = Just ParkingNone
| option =~ sps "^С выделенным парковочным местом на улице" = Just ParkingStreet
| option =~ sps "^С выделенным парковочным местом в гараже" = Just ParkingGarage
| otherwise = Nothing
parseCeilingHeight :: String -> Maybe Double
parseCeilingHeight option =
let heightString = concat (option =~ sps "^Потолки [[:digit:]]*(,[[:digit:]]*)? метра" :: [[String]])
in read . map (\c -> if c == ',' then '.' else c) . takeWhile (\c -> isDigit c || c == ',') . drop 8 <$> listToMaybe heightString
findYear :: [String] -> Maybe Int
findYear = msum . map parseYear
findHouseType :: [String] -> Maybe HouseType
findHouseType = msum . map parseHouseType
findBalcony :: [String] -> Maybe Bool
findBalcony = msum . map parseBalcony
findParking :: [String] -> Maybe Parking
findParking = msum . map parseParking
findCeilingHeight :: [String] -> Maybe Double
findCeilingHeight = msum . map parseCeilingHeight
data OnlinerExtInfo = OnlinerExtInfo { onlinerExtInfoOptions :: [String]
, onlinerExtInfoDescription :: String
} deriving (Generic, NFData)
toFlat :: OnlinerFlat -> Maybe OnlinerExtInfo -> Flat
toFlat flat ext =
Flat { flatId = Just $ show $ onlinerFlatId flat
, flatAuthorId = Just $ show $ onlinerFlatAuthorId flat
, flatLatitude = Just $ onlinerLocationLatitude $ onlinerFlatLocation flat
, flatLongitude = Just $ onlinerLocationLongitude $ onlinerFlatLocation flat
, flatAddress = Just $ onlinerLocationAddress $ onlinerFlatLocation flat
, flatUserAddress = Just $ onlinerLocationUserAddress $ onlinerFlatLocation flat
, flatPrice = Just $ toPrice $ if onlinerPriceCurrency (onlinerFlatPrice flat) == "USD"
then onlinerPriceAmount $ onlinerFlatPrice flat
else onlinerPriceConvertedAmount $ onlinerPriceConverted (onlinerFlatPrice flat) Map.! "USD"
, flatResale = Just $ onlinerFlatResale flat
, flatRooms = Just $ onlinerFlatNumberOfRooms flat
, flatTotalFloors = Just $ onlinerFlatNumberOfFloors flat
, flatFloor = Just $ onlinerFlatFloor flat
, flatEstateAgency = Just $ onlinerSellerType (onlinerFlatSeller flat) == OnlinerSellerTypeAgent
, flatTotalArea = Just $ onlinerAreaTotal $ onlinerFlatArea flat
, flatLivingArea = Just $ onlinerAreaLiving $ onlinerFlatArea flat
, flatKitchenArea = Just $ onlinerAreaKitchen $ onlinerFlatArea flat
, flatCreated = Just $ onlinerFlatCreatedAt flat
, flatUpdated = Just $ onlinerFlatLastTimeUp flat
, flatHouseType = findHouseType options
, flatYear = findYear options
, flatBalcony = findBalcony options
, flatParking = findParking options
, flatCeilingHeight = findCeilingHeight options
, flatActual = Just $ isJust ext
, flatCottage = Just $ description =~ sps "(У|у)часток|(К|к)оттедж"
, flatUrl = Just $ onlinerFlatUrl flat
} where toPrice = round . (read :: String -> Double)
options = maybe [] onlinerExtInfoOptions ext
description = maybe "" onlinerExtInfoDescription ext
type GrabPageType = (Int, Int, Int, Int) -> IO OnlinerPageResult
grabPage :: Manager -> GrabPageType
grabPage manager (rooms, minPrice, maxPrice, page) = do
initReq <- parseRequest $ "GET " ++ onlinerFlatsUrl rooms minPrice maxPrice page
let req = initReq { requestHeaders = [ ("Accept", "application/json")
]
}
response <- httpLbs req manager
return $ case eitherDecode (responseBody response) of
Left e -> error $ "Onliner json: " ++ e
Right p -> p
grabAllPages :: GrabPageType -> Int -> Int -> Int -> IO [OnlinerPageResult]
grabAllPages grabPage' rooms minPrice maxPrice = do
firstPageResult <- grabPage' (rooms, minPrice, maxPrice, 1)
let firstPage = onlinerPageResultPage firstPageResult
if | onlinerPageResultTotal firstPageResult == 0 ->
return []
| onlinerPageResultTotal firstPageResult > onlinerPageLast firstPage * onlinerPageLimit firstPage ->
error "Onliner: too big result set; try to decrease onlinerPriceStep"
| otherwise ->
do otherPageResults <- forConcurrently [2 .. onlinerPageLast firstPage] $ \page ->
grabPage' (rooms, minPrice, maxPrice, page)
return $ firstPageResult : otherPageResults
grabAll :: GrabPageType -> IO [OnlinerFlat]
grabAll grabPage' = concat <$>
forConcurrently [ grabAllPages grabPage' rooms price (price + onlinerPriceStep - 1)
| rooms <- [onlinerMinRooms .. onlinerMaxRooms]
, price <- [onlinerMinPrice, onlinerMinPrice + onlinerPriceStep .. onlinerMaxPrice]
] (fmap $ concatMap onlinerPageResultApartments)
grabExtInfo :: Manager -> Int -> IO (Maybe OnlinerExtInfo)
grabExtInfo manager id' = do
initReq <- parseRequest $ "GET " ++ onlinerOneFlatUrl id'
let req = initReq { requestHeaders = [ ("Accept", "*/*")
]
}
response <- httpLbs req manager
let status = responseStatus response
if | statusIsSuccessful status ->
let body = responseBody response
html = parseHtml $ ULBS.toString body
optionsA = html >>> css "li.apartment-options__item" >>> getChildren >>> getText
descriptionA = html >>> css "div.apartment-info__sub-line_extended-bottom" >>> getChildren >>> getText
in do options <- runX optionsA
description <- runX descriptionA
let result = Just OnlinerExtInfo { onlinerExtInfoOptions = options
, onlinerExtInfoDescription = unwords description
}
result `deepseq` return result
| statusCode status == 404 ->
do putStrLn $ "Error 404 for flat " ++ show id'
return Nothing
| otherwise ->
error $ "Bad response for flat " ++ show id' ++ ": " ++ show status
deduplicateBy :: Ord b => (a -> b) -> [a] -> [a]
deduplicateBy f = map head . groupBy ((==) `on` f) . sortBy (compare `on` f)
grab :: Manager -> IO [Flat]
grab manager = do
semaphore <- new (20 :: Int)
grabPageLimited <- rateLimitInvocation onlinerLimit $ grabPage manager
grabExtInfoLimited <- rateLimitInvocation onlinerLimit $ grabExtInfo manager
flats <- deduplicateBy onlinerFlatId <$> with semaphore (grabAll grabPageLimited)
putStrLn $ "Total flats count: " ++ show (length flats)
flatsWithOptions <- mapConcurrently (\onlinerFlat -> fmap (onlinerFlat,) $ with semaphore $ grabExtInfoLimited $ onlinerFlatId onlinerFlat) flats
return $ map (uncurry toFlat) flatsWithOptions
| kurnevsky/flats | src/Onliner.hs | agpl-3.0 | 15,232 | 0 | 33 | 4,361 | 3,511 | 1,815 | 1,696 | 302 | 3 |
--------------------------------------------------------------------------------
{-| Module : WxcDefs
Copyright : Copyright (c) Daan Leijen 2003, 2004
License : wxWidgets
Maintainer : wxhaskell-devel@lists.sourceforge.net
Stability : provisional
Portability : portable
Haskell constant definitions for the wxWidgets C library (@wxc.dll@).
This file was originally generated automatically by wxDirect; it
is now manually maintained.
-}
--------------------------------------------------------------------------------
module Graphics.UI.WXCore.WxcDefs
( -- * Types
BitFlag
-- * Constants
, cB_BAR_CONTENT_HITTED
, cB_LEFT_BAR_HANDLE_HITTED
, cB_LOWER_ROW_HANDLE_HITTED
, cB_NO_ITEMS_HITTED
, cB_RIGHT_BAR_HANDLE_HITTED
, cB_UPPER_ROW_HANDLE_HITTED
, fL_ALIGN_BOTTOM
, fL_ALIGN_BOTTOM_PANE
, fL_ALIGN_LEFT
, fL_ALIGN_LEFT_PANE
, fL_ALIGN_RIGHT
, fL_ALIGN_RIGHT_PANE
, fL_ALIGN_TOP
, fL_ALIGN_TOP_PANE
, wxACCEL_ALT
, wxACCEL_CTRL
, wxACCEL_NORMAL
, wxACCEL_SHIFT
, wxADJUST_MINSIZE
, wxALIGN_BOTTOM
, wxALIGN_CENTER
, wxALIGN_CENTER_HORIZONTAL
, wxALIGN_CENTER_VERTICAL
, wxALIGN_CENTRE
, wxALIGN_CENTRE_HORIZONTAL
, wxALIGN_CENTRE_VERTICAL
, wxALIGN_LEFT
, wxALIGN_NOT
, wxALIGN_RIGHT
, wxALIGN_TOP
, wxALL
, wxALL_PANES
, wxAND
, wxAND_INVERT
, wxAND_REVERSE
, wxAUI_BUTTON_STATE_NORMAL
, wxAUI_BUTTON_STATE_HOVER
, wxAUI_BUTTON_STATE_PRESSED
, wxAUI_BUTTON_STATE_DISABLED
, wxAUI_BUTTON_STATE_HIDDEN
, wxAUI_BUTTON_STATE_CHECKED
, wxAUI_BUTTON_CLOSE
, wxAUI_BUTTON_MAXIMIZE_RESTORE
, wxAUI_BUTTON_MINIMIZE
, wxAUI_BUTTON_PIN
, wxAUI_BUTTON_OPTIONS
, wxAUI_BUTTON_WINDOWLIST
, wxAUI_BUTTON_LEFT
, wxAUI_BUTTON_RIGHT
, wxAUI_BUTTON_UP
, wxAUI_BUTTON_DOWN
, wxAUI_BUTTON_CUSTOM1
, wxAUI_BUTTON_CUSTOM2
, wxAUI_BUTTON_CUSTOM3
, wxAUI_DOCK_NONE
, wxAUI_DOCK_TOP
, wxAUI_DOCK_RIGHT
, wxAUI_DOCK_BOTTOM
, wxAUI_DOCK_LEFT
, wxAUI_DOCK_CENTER
, wxAUI_DOCK_CENTRE
, wxAUI_DOCKART_SASH_SIZE
, wxAUI_DOCKART_CAPTION_SIZE
, wxAUI_DOCKART_GRIPPER_SIZE
, wxAUI_DOCKART_PANE_BORDER_SIZE
, wxAUI_DOCKART_PANE_BUTTON_SIZE
, wxAUI_DOCKART_BACKGROUND_COLOUR
, wxAUI_DOCKART_SASH_COLOUR
, wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR
, wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR
, wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR
, wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR
, wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR
, wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR
, wxAUI_DOCKART_BORDER_COLOUR
, wxAUI_DOCKART_GRIPPER_COLOUR
, wxAUI_DOCKART_CAPTION_FONT
, wxAUI_DOCKART_GRADIENT_TYPE
, wxAUI_GRADIENT_NONE
, wxAUI_GRADIENT_VERTICAL
, wxAUI_GRADIENT_HORIZONTAL
, wxAUI_MGR_ALLOW_FLOATING
, wxAUI_MGR_ALLOW_ACTIVE_PANE
, wxAUI_MGR_TRANSPARENT_DRAG
, wxAUI_MGR_TRANSPARENT_HINT
, wxAUI_MGR_VENETIAN_BLINDS_HINT
, wxAUI_MGR_RECTANGLE_HINT
, wxAUI_MGR_HINT_FADE
, wxAUI_MGR_NO_VENETIAN_BLINDS_FADE
, wxAUI_MGR_LIVE_RESIZE
, wxAUI_MGR_DEFAULT
, wxAUI_NB_TOP
, wxAUI_NB_LEFT
, wxAUI_NB_RIGHT
, wxAUI_NB_BOTTOM
, wxAUI_NB_TAB_SPLIT
, wxAUI_NB_TAB_MOVE
, wxAUI_NB_TAB_EXTERNAL_MOVE
, wxAUI_NB_TAB_FIXED_WIDTH
, wxAUI_NB_SCROLL_BUTTONS
, wxAUI_NB_WINDOWLIST_BUTTON
, wxAUI_NB_CLOSE_BUTTON
, wxAUI_NB_CLOSE_ON_ACTIVE_TAB
, wxAUI_NB_CLOSE_ON_ALL_TABS
, wxAUI_NB_MIDDLE_CLICK_CLOSE
, wxAUI_NB_DEFAULT_STYLE
, wxAUI_INSERT_PANE
, wxAUI_INSERT_ROW
, wxAUI_INSERT_DOCK
, wxAUI_TB_TEXT
, wxAUI_TB_NO_TOOLTIPS
, wxAUI_TB_NO_AUTORESIZE
, wxAUI_TB_GRIPPER
, wxAUI_TB_OVERFLOW
, wxAUI_TB_VERTICAL
, wxAUI_TB_HORZ_LAYOUT
, wxAUI_TB_HORIZONTAL
, wxAUI_TB_PLAIN_BACKGROUND
, wxAUI_TB_HORZ_TEXT
, wxAUI_ORIENTATION_MASK
, wxAUI_TB_DEFAULT_STYLE
, wxAUI_TBART_SEPARATOR_SIZE
, wxAUI_TBART_GRIPPER_SIZE
, wxAUI_TBART_OVERFLOW_SIZE
, wxAUI_TBTOOL_TEXT_LEFT
, wxAUI_TBTOOL_TEXT_RIGHT
, wxAUI_TBTOOL_TEXT_TOP
, wxAUI_TBTOOL_TEXT_BOTTOM
, wxBACKWARD
, wxBDIAGONAL_HATCH
, wxBEOS
, wxBIG_ENDIAN
, wxBITMAP_TYPE_ANY
, wxBITMAP_TYPE_BMP
, wxBITMAP_TYPE_BMP_RESOURCE
, wxBITMAP_TYPE_CUR
, wxBITMAP_TYPE_CUR_RESOURCE
, wxBITMAP_TYPE_GIF
, wxBITMAP_TYPE_GIF_RESOURCE
, wxBITMAP_TYPE_ICO
, wxBITMAP_TYPE_ICON
, wxBITMAP_TYPE_ICON_RESOURCE
, wxBITMAP_TYPE_ICO_RESOURCE
, wxBITMAP_TYPE_INVALID
, wxBITMAP_TYPE_JPEG
, wxBITMAP_TYPE_JPEG_RESOURCE
, wxBITMAP_TYPE_MACCURSOR
, wxBITMAP_TYPE_MACCURSOR_RESOURCE
, wxBITMAP_TYPE_PCX
, wxBITMAP_TYPE_PCX_RESOURCE
, wxBITMAP_TYPE_PICT
, wxBITMAP_TYPE_PICT_RESOURCE
, wxBITMAP_TYPE_PNG
, wxBITMAP_TYPE_PNG_RESOURCE
, wxBITMAP_TYPE_PNM
, wxBITMAP_TYPE_PNM_RESOURCE
, wxBITMAP_TYPE_RESOURCE
, wxBITMAP_TYPE_TIF
, wxBITMAP_TYPE_TIF_RESOURCE
, wxBITMAP_TYPE_XBM
, wxBITMAP_TYPE_XBM_DATA
, wxBITMAP_TYPE_XPM
, wxBITMAP_TYPE_XPM_DATA
, wxBLACK
, wxBLACK_BRUSH
, wxBLACK_DASHED_PEN
, wxBLACK_PEN
, wxBLUE
, wxBLUE_BRUSH
, wxBOLD
, wxBOOLEAN
, wxBORDER
, wxBORDER_DEFAULT
, wxBORDER_MASK
, wxBORDER_NONE
, wxBORDER_RAISED
, wxBORDER_SIMPLE
, wxBORDER_STATIC
, wxBORDER_SUNKEN
, wxBORDER_THEME
, wxBOTH
, wxBOTTOM
, wxBRUSHSTYLE_BDIAGONAL_HATCH
, wxBRUSHSTYLE_CROSSDIAG_HATCH
, wxBRUSHSTYLE_CROSS_HATCH
, wxBRUSHSTYLE_FDIAGONAL_HATCH
, wxBRUSHSTYLE_FIRST_HATCH
, wxBRUSHSTYLE_HORIZONTAL_HATCH
, wxBRUSHSTYLE_INVALID
, wxBRUSHSTYLE_LAST_HATCH
, wxBRUSHSTYLE_SOLID
, wxBRUSHSTYLE_STIPPLE
, wxBRUSHSTYLE_STIPPLE_MASK
, wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE
, wxBRUSHSTYLE_TRANSPARENT
, wxBRUSHSTYLE_VERTICAL_HATCH
, wxBU_ALIGN_MASK
, wxBU_AUTODRAW
, wxBU_BOTTOM
, wxBU_EXACTFIT
, wxBU_LEFT
, wxBU_NOAUTODRAW
, wxBU_NOTEXT
, wxBU_RIGHT
, wxBU_TOP
, wxCAL_BORDER_NONE
, wxCAL_BORDER_ROUND
, wxCAL_BORDER_SQUARE
, wxCAL_HITTEST_DAY
, wxCAL_HITTEST_HEADER
, wxCAL_HITTEST_NOWHERE
, wxCAL_MONDAY_FIRST
, wxCAL_NO_MONTH_CHANGE
, wxCAL_NO_YEAR_CHANGE
, wxCAL_SHOW_HOLIDAYS
, wxCAL_SUNDAY_FIRST
, wxCANCEL
, wxCAPTION
, wxCAP_BUTT
, wxCAP_INVALID
, wxCAP_PROJECTING
, wxCAP_ROUND
, wxCBAR_DOCKED_HORIZONTALLY
, wxCBAR_DOCKED_VERTICALLY
, wxCBAR_FLOATING
, wxCBAR_HIDDEN
, wxCB_DROPDOWN
, wxCB_READONLY
, wxCB_SIMPLE
, wxCB_SORT
, wxCENTER
, wxCENTER_FRAME
, wxCENTRE
, wxCENTRE_ON_SCREEN
, wxCHANGE_DIR
, wxCLEAR
, wxCLIP_CHILDREN
, wxCLOSE_BOX
, wxCOLOURED
, wxCONFIG_TYPE_BOOLEAN
, wxCONFIG_TYPE_FLOAT
, wxCONFIG_TYPE_INTEGER
, wxCONFIG_TYPE_STRING
, wxCONFIG_TYPE_UNKNOWN
, wxCONFIG_USE_GLOBAL_FILE
, wxCONFIG_USE_LOCAL_FILE
, wxCONFIG_USE_NO_ESCAPE_CHARACTERS
, wxCONFIG_USE_RELATIVE_PATH
, wxCOPY
, wxCOSE_X
, wxCROSSDIAG_HATCH
, wxCROSS_HATCH
, wxCURSES
, wxCURSOR_ARROW
, wxCURSOR_BLANK
, wxCURSOR_BULLSEYE
, wxCURSOR_CHAR
, wxCURSOR_CROSS
, wxCURSOR_HAND
, wxCURSOR_IBEAM
, wxCURSOR_LEFT_BUTTON
, wxCURSOR_MAGNIFIER
, wxCURSOR_MIDDLE_BUTTON
, wxCURSOR_NONE
, wxCURSOR_NO_ENTRY
, wxCURSOR_PAINT_BRUSH
, wxCURSOR_PENCIL
, wxCURSOR_POINT_LEFT
, wxCURSOR_POINT_RIGHT
, wxCURSOR_QUESTION_ARROW
, wxCURSOR_RIGHT_ARROW
, wxCURSOR_RIGHT_BUTTON
, wxCURSOR_SIZENESW
, wxCURSOR_SIZENS
, wxCURSOR_SIZENWSE
, wxCURSOR_SIZEWE
, wxCURSOR_SIZING
, wxCURSOR_SPRAYCAN
, wxCURSOR_WAIT
, wxCURSOR_WATCH
, wxCYAN
, wxCYAN_BRUSH
, wxCYAN_PEN
, wxDB_DATA_TYPE_BLOB
, wxDB_DATA_TYPE_DATE
, wxDB_DATA_TYPE_FLOAT
, wxDB_DATA_TYPE_INTEGER
, wxDB_DATA_TYPE_VARCHAR
, wxDB_DEL_KEYFIELDS
, wxDB_DEL_MATCHING
, wxDB_DEL_WHERE
, wxDB_GRANT_ALL
, wxDB_GRANT_DELETE
, wxDB_GRANT_INSERT
, wxDB_GRANT_SELECT
, wxDB_GRANT_UPDATE
, wxDB_MAX_COLUMN_NAME_LEN
, wxDB_MAX_ERROR_HISTORY
, wxDB_MAX_ERROR_MSG_LEN
, wxDB_MAX_STATEMENT_LEN
, wxDB_MAX_TABLE_NAME_LEN
, wxDB_MAX_WHERE_CLAUSE_LEN
, wxDB_SELECT_KEYFIELDS
, wxDB_SELECT_MATCHING
, wxDB_SELECT_STATEMENT
, wxDB_SELECT_WHERE
, wxDB_TYPE_NAME_LEN
, wxDB_UPD_KEYFIELDS
, wxDB_UPD_WHERE
, wxDB_WHERE_KEYFIELDS
, wxDB_WHERE_MATCHING
, wxDECORATIVE
, wxDEFAULT
, wxDEFAULT_FRAME_STYLE
, wxDF_BITMAP
, wxDF_DIB
, wxDF_DIF
, wxDF_ENHMETAFILE
, wxDF_FILENAME
, wxDF_HTML
, wxDF_INVALID
, wxDF_LOCALE
, wxDF_MAX
, wxDF_METAFILE
, wxDF_OEMTEXT
, wxDF_PALETTE
, wxDF_PENDATA
, wxDF_PRIVATE
, wxDF_RIFF
, wxDF_SYLK
, wxDF_TEXT
, wxDF_TIFF
, wxDF_UNICODETEXT
, wxDF_WAVE
, wxDIALOG_EX_CONTEXTHELP
, wxDIALOG_MODAL
, wxDIALOG_MODELESS
, wxDOT
, wxDOT_DASH
, wxDOUBLE_BORDER
, wxDOWN
, wxDRAG_ALLOWMOVE
, wxDRAG_CANCEL
, wxDRAG_COPY
, wxDRAG_COPYONLY
, wxDRAG_DEFALUTMOVE
, wxDRAG_ERROR
, wxDRAG_LINK
, wxDRAG_MOVE
, wxDRAG_NONE
, wxDS_DRAG_CORNER
, wxDS_MANAGE_SCROLLBARS
, wxDUPLEX_HORIZONTAL
, wxDUPLEX_SIMPLEX
, wxDUPLEX_VERTICAL
, wxEAST
, wxEDGE_BOTTOM
, wxEDGE_CENTER
, wxEDGE_CENTREX
, wxEDGE_CENTREY
, wxEDGE_HEIGHT
, wxEDGE_LEFT
, wxEDGE_RIGHT
, wxEDGE_TOP
, wxEDGE_WIDTH
, wxED_BUTTONS_BOTTOM
, wxED_BUTTONS_RIGHT
, wxED_CLIENT_MARGIN
, wxED_STATIC_LINE
, wxEL_ALLOW_DELETE
, wxEL_ALLOW_EDIT
, wxEL_ALLOW_NEW
, wxEQUIV
, wxEVT_FIRST
, wxEVT_NULL
, wxEXEC_ASYNC
, wxEXEC_MAKE_GROUP_LEADER
, wxEXEC_NOHIDE
, wxEXEC_SYNC
, wxEXPAND
, wxFDIAGONAL_HATCH
, wxFILE_MUST_EXIST
, wxFILTER_ALPHA
, wxFILTER_ALPHANUMERIC
, wxFILTER_ASCII
, wxFILTER_EXCLUDE_LIST
, wxFILTER_INCLUDE_LIST
, wxFILTER_LOWER_CASE
, wxFILTER_NONE
, wxFILTER_NUMERIC
, wxFILTER_UPPER_CASE
, wxFIXED
, wxFIXED_LENGTH
, wxFIXED_MINSIZE
, wxFLOAT
, wxFLOOD_BORDER
, wxFLOOD_SURFACE
, wxFONTENCODING_ALTERNATIVE
, wxFONTENCODING_BULGARIAN
, wxFONTENCODING_CP1250
, wxFONTENCODING_CP1251
, wxFONTENCODING_CP1252
, wxFONTENCODING_CP1253
, wxFONTENCODING_CP1254
, wxFONTENCODING_CP1255
, wxFONTENCODING_CP1256
, wxFONTENCODING_CP1257
, wxFONTENCODING_CP12_MAX
, wxFONTENCODING_CP437
, wxFONTENCODING_CP850
, wxFONTENCODING_CP852
, wxFONTENCODING_CP855
, wxFONTENCODING_CP866
, wxFONTENCODING_CP874
, wxFONTENCODING_DEFAULT
, wxFONTENCODING_ISO8859_1
, wxFONTENCODING_ISO8859_10
, wxFONTENCODING_ISO8859_11
, wxFONTENCODING_ISO8859_12
, wxFONTENCODING_ISO8859_13
, wxFONTENCODING_ISO8859_14
, wxFONTENCODING_ISO8859_15
, wxFONTENCODING_ISO8859_2
, wxFONTENCODING_ISO8859_3
, wxFONTENCODING_ISO8859_4
, wxFONTENCODING_ISO8859_5
, wxFONTENCODING_ISO8859_6
, wxFONTENCODING_ISO8859_7
, wxFONTENCODING_ISO8859_8
, wxFONTENCODING_ISO8859_9
, wxFONTENCODING_ISO8859_MAX
, wxFONTENCODING_KOI8
, wxFONTENCODING_MAX
, wxFONTENCODING_SYSTEM
, wxFONTENCODING_UNICODE
, wxFONTFAMILY_DECORATIVE
, wxFONTFAMILY_DEFAULT
, wxFONTFAMILY_MAX
, wxFONTFAMILY_MODERN
, wxFONTFAMILY_ROMAN
, wxFONTFAMILY_SCRIPT
, wxFONTFAMILY_SWISS
, wxFONTFAMILY_TELETYPE
, wxFONTFAMILY_UNKNOWN
, wxFONTFLAG_ANTIALIASED
, wxFONTFLAG_BOLD
, wxFONTFLAG_DEFAULT
, wxFONTFLAG_ITALIC
, wxFONTFLAG_LIGHT
, wxFONTFLAG_MASK
, wxFONTFLAG_NOT_ANTIALIASED
, wxFONTFLAG_SLANT
, wxFONTFLAG_STRIKETHROUGH
, wxFONTFLAG_UNDERLINED
, wxFONTSIZE_LARGE
, wxFONTSIZE_MEDIUM
, wxFONTSIZE_SMALL
, wxFONTSIZE_XX_LARGE
, wxFONTSIZE_XX_SMALL
, wxFONTSIZE_X_LARGE
, wxFONTSIZE_X_SMALL
, wxFONTSTYLE_ITALIC
, wxFONTSTYLE_MAX
, wxFONTSTYLE_NORMAL
, wxFONTSTYLE_SLANT
, wxFONTWEIGHT_BOLD
, wxFONTWEIGHT_LIGHT
, wxFONTWEIGHT_MAX
, wxFONTWEIGHT_NORMAL
, wxFORWARD
, wxFRAME_EX_CONTEXTHELP
, wxFRAME_FLOAT_ON_PARENT
, wxFRAME_NO_WINDOW_MENU
, wxFRAME_SHAPED
, wxFRAME_TOOL_WINDOW
, wxFR_DOWN
, wxFR_MATCHCASE
, wxFR_NOMATCHCASE
, wxFR_NOUPDOWN
, wxFR_NOWHOLEWORD
, wxFR_REPLACEDIALOG
, wxFR_WHOLEWORD
, wxFULLSCREEN_ALL
, wxFULLSCREEN_NOBORDER
, wxFULLSCREEN_NOCAPTION
, wxFULLSCREEN_NOMENUBAR
, wxFULLSCREEN_NOSTATUSBAR
, wxFULLSCREEN_NOTOOLBAR
, wxGA_PROGRESSBAR
, wxGA_SMOOTH
, wxGEOS
, wxGREEN
, wxGREEN_BRUSH
, wxGREEN_PEN
, wxGREY_BRUSH
, wxGREY_PEN
, wxGRIDTABLE_NOTIFY_COLS_APPENDED
, wxGRIDTABLE_NOTIFY_COLS_DELETED
, wxGRIDTABLE_NOTIFY_COLS_INSERTED
, wxGRIDTABLE_NOTIFY_ROWS_APPENDED
, wxGRIDTABLE_NOTIFY_ROWS_DELETED
, wxGRIDTABLE_NOTIFY_ROWS_INSERTED
, wxGRIDTABLE_REQUEST_VIEW_GET_VALUES
, wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES
, wxGROW
, wxGTK
, wxGTK_BEOS
, wxGTK_OS2
, wxGTK_WIN32
, wxGridSelectCells
, wxGridSelectColumns
, wxGridSelectRows
, wxHATCHSTYLE_BDIAGONAL
, wxHATCHSTYLE_CROSS
, wxHATCHSTYLE_CROSSDIAG
, wxHATCHSTYLE_FDIAGONAL
, wxHATCHSTYLE_FIRST
, wxHATCHSTYLE_HORIZONTAL
, wxHATCHSTYLE_LAST
, wxHATCHSTYLE_VERTICAL
, wxHELP
, wxHF_BOOKMARKS
, wxHF_CONTENTS
, wxHF_DEFAULTSTYLE
, wxHF_FLATTOOLBAR
, wxHF_INDEX
, wxHF_OPENFILES
, wxHF_PRINT
, wxHF_SEARCH
, wxHF_TOOLBAR
, wxHIDE_READONLY
, wxHORIZONTAL
, wxHORIZONTAL_HATCH
, wxHSCROLL
, wxHW_SCROLLBAR_AUTO
, wxHW_SCROLLBAR_NEVER
, wxICONIZE
, wxICON_EXCLAMATION
, wxICON_HAND
, wxICON_INFORMATION
, wxICON_QUESTION
, wxID_ABOUT
, wxID_APPLY
, wxID_BACKWARD
, wxID_CANCEL
, wxID_CLEAR
, wxID_CLOSE
, wxID_CLOSE_ALL
, wxID_COPY
, wxID_CUT
, wxID_DEFAULT
, wxID_DELETE
, wxID_DUPLICATE
, wxID_EDIT
, wxID_EXIT
, wxID_FILE1
, wxID_FILE2
, wxID_FILE3
, wxID_FILE4
, wxID_FILE5
, wxID_FILE6
, wxID_FILE7
, wxID_FILE8
, wxID_FILE9
, wxID_FILEDLGG
, wxID_FIND
, wxID_FORWARD
, wxID_HELP
, wxID_HELP_COMMANDS
, wxID_HELP_CONTENTS
, wxID_HELP_CONTEXT
, wxID_HELP_PROCEDURES
, wxID_HIGHEST
, wxID_LOWEST
, wxID_MORE
, wxID_NEW
, wxID_NO
, wxID_OK
, wxID_OPEN
, wxID_PASTE
, wxID_PREFERENCES
, wxID_PREVIEW
, wxID_PREVIEW_CLOSE
, wxID_PREVIEW_FIRST
, wxID_PREVIEW_GOTO
, wxID_PREVIEW_LAST
, wxID_PREVIEW_NEXT
, wxID_PREVIEW_PREVIOUS
, wxID_PREVIEW_PRINT
, wxID_PREVIEW_ZOOM
, wxID_PRINT
, wxID_PRINT_SETUP
, wxID_PROPERTIES
, wxID_REDO
, wxID_REPLACE
, wxID_REPLACE_ALL
, wxID_RESET
, wxID_REVERT
, wxID_SAVE
, wxID_SAVEAS
, wxID_SELECTALL
, wxID_SETUP
, wxID_STATIC
, wxID_UNDO
, wxID_VIEW_DETAILS
, wxID_VIEW_LARGEICONS
, wxID_VIEW_LIST
, wxID_VIEW_SMALLICONS
, wxID_VIEW_SORTDATE
, wxID_VIEW_SORTNAME
, wxID_VIEW_SORTSIZE
, wxID_VIEW_SORTTYPE
, wxID_YES
, wxIMAGE_LIST_NORMAL
, wxIMAGE_LIST_SMALL
, wxIMAGE_LIST_STATE
, wxINTEGER
, wxINVERT
, wxITALIC
, wxITEM_CHECK
, wxITEM_MAX
, wxITEM_NORMAL
, wxITEM_RADIO
, wxITEM_SEPARATOR
, wxJOIN_BEVEL
, wxJOIN_INVALID
, wxJOIN_MITER
, wxJOIN_ROUND
, wxJOYSTICK1
, wxJOYSTICK2
, wxJOY_BUTTON1
, wxJOY_BUTTON2
, wxJOY_BUTTON3
, wxJOY_BUTTON4
, wxKILL_ACCESS_DENIED
, wxKILL_BAD_SIGNAL
, wxKILL_ERROR
, wxKILL_NO_PROCESS
, wxKILL_OK
, wxLANDSCAPE
, wxLANGUAGE_ABKHAZIAN
, wxLANGUAGE_AFAR
, wxLANGUAGE_AFRIKAANS
, wxLANGUAGE_ALBANIAN
, wxLANGUAGE_AMHARIC
, wxLANGUAGE_ARABIC
, wxLANGUAGE_ARABIC_ALGERIA
, wxLANGUAGE_ARABIC_BAHRAIN
, wxLANGUAGE_ARABIC_EGYPT
, wxLANGUAGE_ARABIC_IRAQ
, wxLANGUAGE_ARABIC_JORDAN
, wxLANGUAGE_ARABIC_KUWAIT
, wxLANGUAGE_ARABIC_LEBANON
, wxLANGUAGE_ARABIC_LIBYA
, wxLANGUAGE_ARABIC_MOROCCO
, wxLANGUAGE_ARABIC_OMAN
, wxLANGUAGE_ARABIC_QATAR
, wxLANGUAGE_ARABIC_SAUDI_ARABIA
, wxLANGUAGE_ARABIC_SUDAN
, wxLANGUAGE_ARABIC_SYRIA
, wxLANGUAGE_ARABIC_TUNISIA
, wxLANGUAGE_ARABIC_UAE
, wxLANGUAGE_ARABIC_YEMEN
, wxLANGUAGE_ARMENIAN
, wxLANGUAGE_ASSAMESE
, wxLANGUAGE_AYMARA
, wxLANGUAGE_AZERI
, wxLANGUAGE_AZERI_CYRILLIC
, wxLANGUAGE_AZERI_LATIN
, wxLANGUAGE_BASHKIR
, wxLANGUAGE_BASQUE
, wxLANGUAGE_BELARUSIAN
, wxLANGUAGE_BENGALI
, wxLANGUAGE_BHUTANI
, wxLANGUAGE_BIHARI
, wxLANGUAGE_BISLAMA
, wxLANGUAGE_BRETON
, wxLANGUAGE_BULGARIAN
, wxLANGUAGE_BURMESE
, wxLANGUAGE_CAMBODIAN
, wxLANGUAGE_CATALAN
, wxLANGUAGE_CHINESE
, wxLANGUAGE_CHINESE_HONGKONG
, wxLANGUAGE_CHINESE_MACAU
, wxLANGUAGE_CHINESE_SIMPLIFIED
, wxLANGUAGE_CHINESE_SINGAPORE
, wxLANGUAGE_CHINESE_TAIWAN
, wxLANGUAGE_CHINESE_TRADITIONAL
, wxLANGUAGE_CORSICAN
, wxLANGUAGE_CROATIAN
, wxLANGUAGE_CZECH
, wxLANGUAGE_DANISH
, wxLANGUAGE_DEFAULT
, wxLANGUAGE_DUTCH
, wxLANGUAGE_DUTCH_BELGIAN
, wxLANGUAGE_ENGLISH
, wxLANGUAGE_ENGLISH_AUSTRALIA
, wxLANGUAGE_ENGLISH_BELIZE
, wxLANGUAGE_ENGLISH_BOTSWANA
, wxLANGUAGE_ENGLISH_CANADA
, wxLANGUAGE_ENGLISH_CARIBBEAN
, wxLANGUAGE_ENGLISH_DENMARK
, wxLANGUAGE_ENGLISH_EIRE
, wxLANGUAGE_ENGLISH_JAMAICA
, wxLANGUAGE_ENGLISH_NEW_ZEALAND
, wxLANGUAGE_ENGLISH_PHILIPPINES
, wxLANGUAGE_ENGLISH_SOUTH_AFRICA
, wxLANGUAGE_ENGLISH_TRINIDAD
, wxLANGUAGE_ENGLISH_UK
, wxLANGUAGE_ENGLISH_US
, wxLANGUAGE_ENGLISH_ZIMBABWE
, wxLANGUAGE_ESPERANTO
, wxLANGUAGE_ESTONIAN
, wxLANGUAGE_FAEROESE
, wxLANGUAGE_FARSI
, wxLANGUAGE_FIJI
, wxLANGUAGE_FINNISH
, wxLANGUAGE_FRENCH
, wxLANGUAGE_FRENCH_BELGIAN
, wxLANGUAGE_FRENCH_CANADIAN
, wxLANGUAGE_FRENCH_LUXEMBOURG
, wxLANGUAGE_FRENCH_MONACO
, wxLANGUAGE_FRENCH_SWISS
, wxLANGUAGE_FRISIAN
, wxLANGUAGE_GALICIAN
, wxLANGUAGE_GEORGIAN
, wxLANGUAGE_GERMAN
, wxLANGUAGE_GERMAN_AUSTRIAN
, wxLANGUAGE_GERMAN_BELGIUM
, wxLANGUAGE_GERMAN_LIECHTENSTEIN
, wxLANGUAGE_GERMAN_LUXEMBOURG
, wxLANGUAGE_GERMAN_SWISS
, wxLANGUAGE_GREEK
, wxLANGUAGE_GREENLANDIC
, wxLANGUAGE_GUARANI
, wxLANGUAGE_GUJARATI
, wxLANGUAGE_HAUSA
, wxLANGUAGE_HEBREW
, wxLANGUAGE_HINDI
, wxLANGUAGE_HUNGARIAN
, wxLANGUAGE_ICELANDIC
, wxLANGUAGE_INDONESIAN
, wxLANGUAGE_INTERLINGUA
, wxLANGUAGE_INTERLINGUE
, wxLANGUAGE_INUKTITUT
, wxLANGUAGE_INUPIAK
, wxLANGUAGE_IRISH
, wxLANGUAGE_ITALIAN
, wxLANGUAGE_ITALIAN_SWISS
, wxLANGUAGE_JAPANESE
, wxLANGUAGE_JAVANESE
, wxLANGUAGE_KANNADA
, wxLANGUAGE_KASHMIRI
, wxLANGUAGE_KASHMIRI_INDIA
, wxLANGUAGE_KAZAKH
, wxLANGUAGE_KERNEWEK
, wxLANGUAGE_KINYARWANDA
, wxLANGUAGE_KIRGHIZ
, wxLANGUAGE_KIRUNDI
, wxLANGUAGE_KONKANI
, wxLANGUAGE_KOREAN
, wxLANGUAGE_KURDISH
, wxLANGUAGE_LAOTHIAN
, wxLANGUAGE_LATIN
, wxLANGUAGE_LATVIAN
, wxLANGUAGE_LINGALA
, wxLANGUAGE_LITHUANIAN
, wxLANGUAGE_MACEDONIAN
, wxLANGUAGE_MALAGASY
, wxLANGUAGE_MALAY
, wxLANGUAGE_MALAYALAM
, wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM
, wxLANGUAGE_MALAY_MALAYSIA
, wxLANGUAGE_MALTESE
, wxLANGUAGE_MANIPURI
, wxLANGUAGE_MAORI
, wxLANGUAGE_MARATHI
, wxLANGUAGE_MOLDAVIAN
, wxLANGUAGE_MONGOLIAN
, wxLANGUAGE_NAURU
, wxLANGUAGE_NEPALI
, wxLANGUAGE_NEPALI_INDIA
, wxLANGUAGE_NORWEGIAN_BOKMAL
, wxLANGUAGE_NORWEGIAN_NYNORSK
, wxLANGUAGE_OCCITAN
, wxLANGUAGE_ORIYA
, wxLANGUAGE_OROMO
, wxLANGUAGE_PASHTO
, wxLANGUAGE_POLISH
, wxLANGUAGE_PORTUGUESE
, wxLANGUAGE_PORTUGUESE_BRAZILIAN
, wxLANGUAGE_PUNJABI
, wxLANGUAGE_QUECHUA
, wxLANGUAGE_RHAETO_ROMANCE
, wxLANGUAGE_ROMANIAN
, wxLANGUAGE_RUSSIAN
, wxLANGUAGE_RUSSIAN_UKRAINE
, wxLANGUAGE_SAMOAN
, wxLANGUAGE_SANGHO
, wxLANGUAGE_SANSKRIT
, wxLANGUAGE_SCOTS_GAELIC
, wxLANGUAGE_SERBIAN
, wxLANGUAGE_SERBIAN_CYRILLIC
, wxLANGUAGE_SERBIAN_LATIN
, wxLANGUAGE_SERBO_CROATIAN
, wxLANGUAGE_SESOTHO
, wxLANGUAGE_SETSWANA
, wxLANGUAGE_SHONA
, wxLANGUAGE_SINDHI
, wxLANGUAGE_SINHALESE
, wxLANGUAGE_SISWATI
, wxLANGUAGE_SLOVAK
, wxLANGUAGE_SLOVENIAN
, wxLANGUAGE_SOMALI
, wxLANGUAGE_SPANISH
, wxLANGUAGE_SPANISH_ARGENTINA
, wxLANGUAGE_SPANISH_BOLIVIA
, wxLANGUAGE_SPANISH_CHILE
, wxLANGUAGE_SPANISH_COLOMBIA
, wxLANGUAGE_SPANISH_COSTA_RICA
, wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC
, wxLANGUAGE_SPANISH_ECUADOR
, wxLANGUAGE_SPANISH_EL_SALVADOR
, wxLANGUAGE_SPANISH_GUATEMALA
, wxLANGUAGE_SPANISH_HONDURAS
, wxLANGUAGE_SPANISH_MEXICAN
, wxLANGUAGE_SPANISH_MODERN
, wxLANGUAGE_SPANISH_NICARAGUA
, wxLANGUAGE_SPANISH_PANAMA
, wxLANGUAGE_SPANISH_PARAGUAY
, wxLANGUAGE_SPANISH_PERU
, wxLANGUAGE_SPANISH_PUERTO_RICO
, wxLANGUAGE_SPANISH_URUGUAY
, wxLANGUAGE_SPANISH_US
, wxLANGUAGE_SPANISH_VENEZUELA
, wxLANGUAGE_SUNDANESE
, wxLANGUAGE_SWAHILI
, wxLANGUAGE_SWEDISH
, wxLANGUAGE_SWEDISH_FINLAND
, wxLANGUAGE_TAGALOG
, wxLANGUAGE_TAJIK
, wxLANGUAGE_TAMIL
, wxLANGUAGE_TATAR
, wxLANGUAGE_TELUGU
, wxLANGUAGE_THAI
, wxLANGUAGE_TIBETAN
, wxLANGUAGE_TIGRINYA
, wxLANGUAGE_TONGA
, wxLANGUAGE_TSONGA
, wxLANGUAGE_TURKISH
, wxLANGUAGE_TURKMEN
, wxLANGUAGE_TWI
, wxLANGUAGE_UIGHUR
, wxLANGUAGE_UKRAINIAN
, wxLANGUAGE_UNKNOWN
, wxLANGUAGE_URDU
, wxLANGUAGE_URDU_INDIA
, wxLANGUAGE_URDU_PAKISTAN
, wxLANGUAGE_USER_DEFINE
, wxLANGUAGE_UZBEK
, wxLANGUAGE_UZBEK_CYRILLIC
, wxLANGUAGE_UZBEK_LATIN
, wxLANGUAGE_VIETNAMESE
, wxLANGUAGE_VOLAPUK
, wxLANGUAGE_WELSH
, wxLANGUAGE_WOLOF
, wxLANGUAGE_XHOSA
, wxLANGUAGE_YIDDISH
, wxLANGUAGE_YORUBA
, wxLANGUAGE_ZHUANG
, wxLANGUAGE_ZULU
, wxLAYOUT_BOTTOM
, wxLAYOUT_DEFAULT_MARGIN
, wxLAYOUT_HORIZONTAL
, wxLAYOUT_LEFT
, wxLAYOUT_NONE
, wxLAYOUT_RIGHT
, wxLAYOUT_TOP
, wxLAYOUT_VERTICAL
, wxLB_ALWAYS_SB
, wxLB_EXTENDED
, wxLB_MULTIPLE
, wxLB_NEEDED_SB
, wxLB_OWNERDRAW
, wxLB_SINGLE
, wxLB_SORT
, wxLC_ALIGN_LEFT
, wxLC_ALIGN_TOP
, wxLC_AUTOARRANGE
, wxLC_EDIT_LABELS
, wxLC_HRULES
, wxLC_ICON
, wxLC_LIST
, wxLC_MASK_ALIGN
, wxLC_MASK_SORT
, wxLC_MASK_TYPE
, wxLC_NO_HEADER
, wxLC_NO_SORT_HEADER
, wxLC_REPORT
, wxLC_SINGLE_SEL
, wxLC_SMALL_ICON
, wxLC_SORT_ASCENDING
, wxLC_SORT_DESCENDING
, wxLC_VIRTUAL
, wxLC_VRULES
, wxLED_ALIGN_CENTER
, wxLED_ALIGN_LEFT
, wxLED_ALIGN_MASK
, wxLED_ALIGN_RIGHT
, wxLED_DRAW_FADED
, wxLEFT
, wxLIGHT
, wxLIGHT_GREY
, wxLIGHT_GREY_BRUSH
, wxLIGHT_GREY_PEN
, wxLIST_FORMAT_CENTER
, wxLIST_FORMAT_CENTRE
, wxLIST_FORMAT_LEFT
, wxLIST_FORMAT_RIGHT
, wxLIST_MASK_DATA
, wxLIST_MASK_FORMAT
, wxLIST_MASK_IMAGE
, wxLIST_MASK_STATE
, wxLIST_MASK_TEXT
, wxLIST_MASK_WIDTH
, wxLIST_NEXT_ABOVE
, wxLIST_NEXT_ALL
, wxLIST_NEXT_BELOW
, wxLIST_NEXT_LEFT
, wxLIST_NEXT_RIGHT
, wxLIST_STATE_CUT
, wxLIST_STATE_DONTCARE
, wxLIST_STATE_DROPHILITED
, wxLIST_STATE_FOCUSED
, wxLIST_STATE_SELECTED
, wxLITTLE_ENDIAN
, wxLOCALE_CONV_ENCODING
, wxLOCALE_DECIMAL_POINT
, wxLOCALE_LOAD_DEFAULT
, wxLOCALE_THOUSANDS_SEP
, wxLONG_DASH
, wxMACINTOSH
, wxMAXIMIZE
, wxMAXIMIZE_BOX
, wxMB_DOCKABLE
, wxMEDIACTRLPLAYERCONTROLS_DEFAULT
, wxMEDIACTRLPLAYERCONTROLS_NONE
, wxMEDIACTRLPLAYERCONTROLS_STEP
, wxMEDIACTRLPLAYERCONTROLS_VOLUME
, wxMEDIUM_GREY_BRUSH
, wxMEDIUM_GREY_PEN
, wxMENU_TEAROFF
, wxMGL_OS2
, wxMGL_UNIX
, wxMGL_WIN32
, wxMGL_X
, wxMINIMIZE_BOX
, wxMM_ANISOTROPIC
, wxMM_HIENGLISH
, wxMM_HIMETRIC
, wxMM_ISOTROPIC
, wxMM_LOENGLISH
, wxMM_LOMETRIC
, wxMM_METRIC
, wxMM_POINTS
, wxMM_TEXT
, wxMM_TWIPS
, wxMODERN
, wxMORE
, wxMOTIF_X
, wxMULTIPLE
, wxMUTEX_BUSY
, wxMUTEX_DEAD_LOCK
, wxMUTEX_MISC_ERROR
, wxMUTEX_NO_ERROR
, wxMUTEX_UNLOCKED
, wxNAND
, wxNB_FIXEDWIDTH
, wxNB_MULTILINE
, wxNEXTSTEP
, wxNO
, wxNOR
, wxNORMAL
, wxNORTH
, wxNOT_FOUND
, wxNO_3D
, wxNO_BORDER
, wxNO_DEFAULT
, wxNO_FULL_REPAINT_ON_RESIZE
, wxNO_OP
, wxNULL_FLAG
, wxODDEVEN_RULE
, wxOK
, wxOPEN
, wxOR
, wxOR_INVERT
, wxOR_REVERSE
, wxOS2_PM
, wxOVERWRITE_PROMPT
, wxPAPER_10X11
, wxPAPER_10X14
, wxPAPER_11X17
, wxPAPER_15X11
, wxPAPER_9X11
, wxPAPER_A2
, wxPAPER_A3
, wxPAPER_A3_EXTRA
, wxPAPER_A3_EXTRA_TRANSVERSE
, wxPAPER_A3_TRANSVERSE
, wxPAPER_A4
, wxPAPER_A4SMALL
, wxPAPER_A4_EXTRA
, wxPAPER_A4_PLUS
, wxPAPER_A4_TRANSVERSE
, wxPAPER_A5
, wxPAPER_A5_EXTRA
, wxPAPER_A5_TRANSVERSE
, wxPAPER_A_PLUS
, wxPAPER_B4
, wxPAPER_B5
, wxPAPER_B5_EXTRA
, wxPAPER_B5_TRANSVERSE
, wxPAPER_B_PLUS
, wxPAPER_CSHEET
, wxPAPER_DSHEET
, wxPAPER_ENV_10
, wxPAPER_ENV_11
, wxPAPER_ENV_12
, wxPAPER_ENV_14
, wxPAPER_ENV_9
, wxPAPER_ENV_B4
, wxPAPER_ENV_B5
, wxPAPER_ENV_B6
, wxPAPER_ENV_C3
, wxPAPER_ENV_C4
, wxPAPER_ENV_C5
, wxPAPER_ENV_C6
, wxPAPER_ENV_C65
, wxPAPER_ENV_DL
, wxPAPER_ENV_INVITE
, wxPAPER_ENV_ITALY
, wxPAPER_ENV_MONARCH
, wxPAPER_ENV_PERSONAL
, wxPAPER_ESHEET
, wxPAPER_EXECUTIVE
, wxPAPER_FANFOLD_LGL_GERMAN
, wxPAPER_FANFOLD_STD_GERMAN
, wxPAPER_FANFOLD_US
, wxPAPER_FOLIO
, wxPAPER_ISO_B4
, wxPAPER_JAPANESE_POSTCARD
, wxPAPER_LEDGER
, wxPAPER_LEGAL
, wxPAPER_LEGAL_EXTRA
, wxPAPER_LETTER
, wxPAPER_LETTERSMALL
, wxPAPER_LETTER_EXTRA
, wxPAPER_LETTER_EXTRA_TRANSVERSE
, wxPAPER_LETTER_PLUS
, wxPAPER_LETTER_TRANSVERSE
, wxPAPER_NONE
, wxPAPER_NOTE
, wxPAPER_QUARTO
, wxPAPER_STATEMENT
, wxPAPER_TABLOID
, wxPAPER_TABLOID_EXTRA
, wxPASSWORD
, wxPDP_ENDIAN
, wxPD_APP_MODAL
, wxPD_AUTO_HIDE
, wxPD_CAN_ABORT
, wxPD_ELAPSED_TIME
, wxPD_ESTIMATED_TIME
, wxPD_REMAINING_TIME
, wxPENSTYLE_BDIAGONAL_HATCH
, wxPENSTYLE_CROSSDIAG_HATCH
, wxPENSTYLE_CROSS_HATCH
, wxPENSTYLE_DOT
, wxPENSTYLE_DOT_DASH
, wxPENSTYLE_FDIAGONAL_HATCH
, wxPENSTYLE_FIRST_HATCH
, wxPENSTYLE_HORIZONTAL_HATCH
, wxPENSTYLE_INVALID
, wxPENSTYLE_LAST_HATCH
, wxPENSTYLE_LONG_DASH
, wxPENSTYLE_SHORT_DASH
, wxPENSTYLE_SOLID
, wxPENSTYLE_STIPPLE
, wxPENSTYLE_STIPPLE_MASK
, wxPENSTYLE_STIPPLE_MASK_OPAQUE
, wxPENSTYLE_TRANSPARENT
, wxPENSTYLE_USER_DASH
, wxPENSTYLE_VERTICAL_HATCH
, wxPENWINDOWS
, wxPG_DEFAULT_STYLE
, wxPLATFORM_CURRENT
, wxPLATFORM_MAC
, wxPLATFORM_OS2
, wxPLATFORM_UNIX
, wxPLATFORM_WINDOWS
, wxPORTRAIT
, wxPREVIEW_DEFAULT
, wxPREVIEW_FIRST
, wxPREVIEW_GOTO
, wxPREVIEW_LAST
, wxPREVIEW_NEXT
, wxPREVIEW_PREVIOUS
, wxPREVIEW_PRINT
, wxPREVIEW_ZOOM
, wxPRINTER_CANCELLED
, wxPRINTER_ERROR
, wxPRINTER_NO_ERROR
, wxPRINTID_BOTTOMMARGIN
, wxPRINTID_COMMAND
, wxPRINTID_COPIES
, wxPRINTID_FROM
, wxPRINTID_LEFTMARGIN
, wxPRINTID_OPTIONS
, wxPRINTID_ORIENTATION
, wxPRINTID_PAPERSIZE
, wxPRINTID_PRINTCOLOUR
, wxPRINTID_PRINTTOFILE
, wxPRINTID_RANGE
, wxPRINTID_RIGHTMARGIN
, wxPRINTID_SETUP
, wxPRINTID_STATIC
, wxPRINTID_TO
, wxPRINTID_TOPMARGIN
, wxPRINT_MODE_FILE
, wxPRINT_MODE_NONE
, wxPRINT_MODE_PREVIEW
, wxPRINT_MODE_PRINTER
, wxPROCESS_ENTER
, wxQT
, wxQUANTIZE_FILL_DESTINATION_IMAGE
, wxQUANTIZE_INCLUDE_WINDOWS_COLOURS
, wxQUANTIZE_RETURN_8BIT_DATA
, wxRAISED_BORDER
, wxRA_SPECIFY_COLS
, wxRA_SPECIFY_ROWS
, wxRB_GROUP
, wxRED
, wxRED_BRUSH
, wxRED_PEN
, wxRELATIONSHIP_ABOVE
, wxRELATIONSHIP_ABSOLUTE
, wxRELATIONSHIP_ASIS
, wxRELATIONSHIP_BELOW
, wxRELATIONSHIP_LEFTOF
, wxRELATIONSHIP_PERCENTOF
, wxRELATIONSHIP_RIGHTOF
, wxRELATIONSHIP_SAMEAS
, wxRELATIONSHIP_UNCONSTRAINED
, wxRESERVE_SPACE_EVEN_IF_HIDDEN
, wxRESET
, wxRESIZE_BORDER
, wxRETAINED
, wxRIGHT
, wxROMAN
, wxSASH_BOTTOM
, wxSASH_DRAG_DRAGGING
, wxSASH_DRAG_LEFT_DOWN
, wxSASH_DRAG_NONE
, wxSASH_LEFT
, wxSASH_NONE
, wxSASH_RIGHT
, wxSASH_STATUS_OK
, wxSASH_STATUS_OUT_OF_RANGE
, wxSASH_TOP
, wxSAVE
, wxSCRIPT
, wxSET
, wxSETUP
, wxSHAPED
, wxSHORT_DASH
, wxSHRINK
, wxSIGABRT
, wxSIGALRM
, wxSIGBUS
, wxSIGEMT
, wxSIGFPE
, wxSIGHUP
, wxSIGILL
, wxSIGINT
, wxSIGKILL
, wxSIGNONE
, wxSIGPIPE
, wxSIGQUIT
, wxSIGSEGV
, wxSIGSYS
, wxSIGTERM
, wxSIGTRAP
, wxSIZER_FLAG_BITS_MASK
, wxSIZE_ALLOW_MINUS_ONE
, wxSIZE_AUTO_HEIGHT
, wxSIZE_AUTO_WIDTH
, wxSIZE_NO_ADJUSTMENTS
, wxSIZE_USE_EXISTING
, wxSLANT
, wxSL_AUTOTICKS
, wxSL_BOTH
, wxSL_BOTTOM
, wxSL_LABELS
, wxSL_LEFT
, wxSL_NOTIFY_DRAG
, wxSL_RIGHT
, wxSL_SELRANGE
, wxSL_TOP
, wxSOLID
, wxSOUND_ASYNC
, wxSOUND_LOOP
, wxSOUND_SYNC
, wxSOUTH
, wxSPLIT_HORIZONTAL
, wxSPLIT_VERTICAL
, wxSP_3D
, wxSP_3DBORDER
, wxSP_3DSASH
, wxSP_ARROW_KEYS
, wxSP_BORDER
, wxSP_FULLSASH
, wxSP_LIVE_UPDATE
, wxSP_NOBORDER
, wxSP_NOSASH
, wxSP_PERMIT_UNSPLIT
, wxSP_WRAP
, wxSQL_CHAR
, wxSQL_C_CHAR
, wxSQL_C_DATE
, wxSQL_C_DEFAULT
, wxSQL_C_DOUBLE
, wxSQL_C_FLOAT
, wxSQL_C_LONG
, wxSQL_C_SHORT
, wxSQL_C_TIME
, wxSQL_C_TIMESTAMP
, wxSQL_DATA_AT_EXEC
, wxSQL_DATE
, wxSQL_DECIMAL
, wxSQL_DOUBLE
, wxSQL_ERROR
, wxSQL_FETCH_ABSOLUTE
, wxSQL_FETCH_BOOKMARK
, wxSQL_FETCH_FIRST
, wxSQL_FETCH_LAST
, wxSQL_FETCH_NEXT
, wxSQL_FETCH_PRIOR
, wxSQL_FETCH_RELATIVE
, wxSQL_FLOAT
, wxSQL_INTEGER
, wxSQL_INVALID_HANDLE
, wxSQL_NO_DATA_FOUND
, wxSQL_NO_NULLS
, wxSQL_NTS
, wxSQL_NULLABLE
, wxSQL_NULLABLE_UNKNOWN
, wxSQL_NULL_DATA
, wxSQL_NUMERIC
, wxSQL_REAL
, wxSQL_SMALLINT
, wxSQL_SUCCESS
, wxSQL_SUCCESS_WITH_INFO
, wxSQL_TIME
, wxSQL_TIMESTAMP
, wxSQL_VARCHAR
, wxSRC_INVERT
, wxSTATIC_BORDER
, wxSTAY_ON_TOP
, wxSTC_ADA_CHARACTER
, wxSTC_ADA_CHARACTEREOL
, wxSTC_ADA_COMMENTLINE
, wxSTC_ADA_DEFAULT
, wxSTC_ADA_DELIMITER
, wxSTC_ADA_IDENTIFIER
, wxSTC_ADA_ILLEGAL
, wxSTC_ADA_LABEL
, wxSTC_ADA_NUMBER
, wxSTC_ADA_STRING
, wxSTC_ADA_STRINGEOL
, wxSTC_ADA_WORD
, wxSTC_APDL_ARGUMENT
, wxSTC_APDL_COMMAND
, wxSTC_APDL_COMMENT
, wxSTC_APDL_COMMENTBLOCK
, wxSTC_APDL_DEFAULT
, wxSTC_APDL_FUNCTION
, wxSTC_APDL_NUMBER
, wxSTC_APDL_OPERATOR
, wxSTC_APDL_PROCESSOR
, wxSTC_APDL_SLASHCOMMAND
, wxSTC_APDL_STARCOMMAND
, wxSTC_APDL_STRING
, wxSTC_APDL_WORD
, wxSTC_ASM_COMMENT
, wxSTC_ASM_CPUINSTRUCTION
, wxSTC_ASM_DEFAULT
, wxSTC_ASM_DIRECTIVE
, wxSTC_ASM_DIRECTIVEOPERAND
, wxSTC_ASM_IDENTIFIER
, wxSTC_ASM_MATHINSTRUCTION
, wxSTC_ASM_NUMBER
, wxSTC_ASM_OPERATOR
, wxSTC_ASM_REGISTER
, wxSTC_ASM_STRING
, wxSTC_ASN1_ATTRIBUTE
, wxSTC_ASN1_COMMENT
, wxSTC_ASN1_DEFAULT
, wxSTC_ASN1_DESCRIPTOR
, wxSTC_ASN1_IDENTIFIER
, wxSTC_ASN1_KEYWORD
, wxSTC_ASN1_OID
, wxSTC_ASN1_OPERATOR
, wxSTC_ASN1_SCALAR
, wxSTC_ASN1_STRING
, wxSTC_ASN1_TYPE
, wxSTC_AU3_COMMENT
, wxSTC_AU3_COMMENTBLOCK
, wxSTC_AU3_COMOBJ
, wxSTC_AU3_DEFAULT
, wxSTC_AU3_EXPAND
, wxSTC_AU3_FUNCTION
, wxSTC_AU3_KEYWORD
, wxSTC_AU3_MACRO
, wxSTC_AU3_NUMBER
, wxSTC_AU3_OPERATOR
, wxSTC_AU3_PREPROCESSOR
, wxSTC_AU3_SENT
, wxSTC_AU3_SPECIAL
, wxSTC_AU3_STRING
, wxSTC_AU3_VARIABLE
, wxSTC_AVE_COMMENT
, wxSTC_AVE_DEFAULT
, wxSTC_AVE_ENUM
, wxSTC_AVE_IDENTIFIER
, wxSTC_AVE_NUMBER
, wxSTC_AVE_OPERATOR
, wxSTC_AVE_STRING
, wxSTC_AVE_STRINGEOL
, wxSTC_AVE_WORD
, wxSTC_AVE_WORD1
, wxSTC_AVE_WORD2
, wxSTC_AVE_WORD3
, wxSTC_AVE_WORD4
, wxSTC_AVE_WORD5
, wxSTC_AVE_WORD6
, wxSTC_BAAN_COMMENT
, wxSTC_BAAN_COMMENTDOC
, wxSTC_BAAN_DEFAULT
, wxSTC_BAAN_IDENTIFIER
, wxSTC_BAAN_NUMBER
, wxSTC_BAAN_OPERATOR
, wxSTC_BAAN_PREPROCESSOR
, wxSTC_BAAN_STRING
, wxSTC_BAAN_STRINGEOL
, wxSTC_BAAN_WORD
, wxSTC_BAAN_WORD2
, wxSTC_BAT_COMMAND
, wxSTC_BAT_COMMENT
, wxSTC_BAT_DEFAULT
, wxSTC_BAT_HIDE
, wxSTC_BAT_IDENTIFIER
, wxSTC_BAT_LABEL
, wxSTC_BAT_OPERATOR
, wxSTC_BAT_WORD
, wxSTC_B_COMMENT
, wxSTC_B_DATE
, wxSTC_B_DEFAULT
, wxSTC_B_IDENTIFIER
, wxSTC_B_KEYWORD
, wxSTC_B_NUMBER
, wxSTC_B_OPERATOR
, wxSTC_B_PREPROCESSOR
, wxSTC_B_STRING
, wxSTC_CACHE_CARET
, wxSTC_CACHE_DOCUMENT
, wxSTC_CACHE_NONE
, wxSTC_CACHE_PAGE
, wxSTC_CAML_CHAR
, wxSTC_CAML_COMMENT
, wxSTC_CAML_COMMENT1
, wxSTC_CAML_COMMENT2
, wxSTC_CAML_COMMENT3
, wxSTC_CAML_DEFAULT
, wxSTC_CAML_IDENTIFIER
, wxSTC_CAML_KEYWORD
, wxSTC_CAML_KEYWORD2
, wxSTC_CAML_KEYWORD3
, wxSTC_CAML_LINENUM
, wxSTC_CAML_NUMBER
, wxSTC_CAML_OPERATOR
, wxSTC_CAML_STRING
, wxSTC_CAML_TAGNAME
, wxSTC_CARET_EVEN
, wxSTC_CARET_JUMPS
, wxSTC_CARET_SLOP
, wxSTC_CARET_STRICT
, wxSTC_CASE_LOWER
, wxSTC_CASE_MIXED
, wxSTC_CASE_UPPER
, wxSTC_CHARSET_ANSI
, wxSTC_CHARSET_ARABIC
, wxSTC_CHARSET_BALTIC
, wxSTC_CHARSET_CHINESEBIG5
, wxSTC_CHARSET_DEFAULT
, wxSTC_CHARSET_EASTEUROPE
, wxSTC_CHARSET_GB2312
, wxSTC_CHARSET_GREEK
, wxSTC_CHARSET_HANGUL
, wxSTC_CHARSET_HEBREW
, wxSTC_CHARSET_JOHAB
, wxSTC_CHARSET_MAC
, wxSTC_CHARSET_OEM
, wxSTC_CHARSET_RUSSIAN
, wxSTC_CHARSET_SHIFTJIS
, wxSTC_CHARSET_SYMBOL
, wxSTC_CHARSET_THAI
, wxSTC_CHARSET_TURKISH
, wxSTC_CHARSET_VIETNAMESE
, wxSTC_CLW_ATTRIBUTE
, wxSTC_CLW_BUILTIN_PROCEDURES_FUNCTION
, wxSTC_CLW_COMMENT
, wxSTC_CLW_COMPILER_DIRECTIVE
, wxSTC_CLW_DEFAULT
, wxSTC_CLW_DEPRECATED
, wxSTC_CLW_ERROR
, wxSTC_CLW_INTEGER_CONSTANT
, wxSTC_CLW_KEYWORD
, wxSTC_CLW_LABEL
, wxSTC_CLW_PICTURE_STRING
, wxSTC_CLW_REAL_CONSTANT
, wxSTC_CLW_RUNTIME_EXPRESSIONS
, wxSTC_CLW_STANDARD_EQUATE
, wxSTC_CLW_STRING
, wxSTC_CLW_STRUCTURE_DATA_TYPE
, wxSTC_CLW_USER_IDENTIFIER
, wxSTC_CMD_BACKTAB
, wxSTC_CMD_CANCEL
, wxSTC_CMD_CHARLEFT
, wxSTC_CMD_CHARLEFTEXTEND
, wxSTC_CMD_CHARLEFTRECTEXTEND
, wxSTC_CMD_CHARRIGHT
, wxSTC_CMD_CHARRIGHTEXTEND
, wxSTC_CMD_CHARRIGHTRECTEXTEND
, wxSTC_CMD_CLEAR
, wxSTC_CMD_COPY
, wxSTC_CMD_CUT
, wxSTC_CMD_DELETEBACK
, wxSTC_CMD_DELETEBACKNOTLINE
, wxSTC_CMD_DELLINELEFT
, wxSTC_CMD_DELLINERIGHT
, wxSTC_CMD_DELWORDLEFT
, wxSTC_CMD_DELWORDRIGHT
, wxSTC_CMD_DOCUMENTEND
, wxSTC_CMD_DOCUMENTENDEXTEND
, wxSTC_CMD_DOCUMENTSTART
, wxSTC_CMD_DOCUMENTSTARTEXTEND
, wxSTC_CMD_EDITTOGGLEOVERTYPE
, wxSTC_CMD_FORMFEED
, wxSTC_CMD_HOME
, wxSTC_CMD_HOMEDISPLAY
, wxSTC_CMD_HOMEDISPLAYEXTEND
, wxSTC_CMD_HOMEEXTEND
, wxSTC_CMD_HOMERECTEXTEND
, wxSTC_CMD_HOMEWRAP
, wxSTC_CMD_HOMEWRAPEXTEND
, wxSTC_CMD_LINECOPY
, wxSTC_CMD_LINECUT
, wxSTC_CMD_LINEDELETE
, wxSTC_CMD_LINEDOWN
, wxSTC_CMD_LINEDOWNEXTEND
, wxSTC_CMD_LINEDOWNRECTEXTEND
, wxSTC_CMD_LINEDUPLICATE
, wxSTC_CMD_LINEEND
, wxSTC_CMD_LINEENDDISPLAY
, wxSTC_CMD_LINEENDDISPLAYEXTEND
, wxSTC_CMD_LINEENDEXTEND
, wxSTC_CMD_LINEENDRECTEXTEND
, wxSTC_CMD_LINEENDWRAP
, wxSTC_CMD_LINEENDWRAPEXTEND
, wxSTC_CMD_LINESCROLLDOWN
, wxSTC_CMD_LINESCROLLUP
, wxSTC_CMD_LINETRANSPOSE
, wxSTC_CMD_LINEUP
, wxSTC_CMD_LINEUPEXTEND
, wxSTC_CMD_LINEUPRECTEXTEND
, wxSTC_CMD_LOWERCASE
, wxSTC_CMD_NEWLINE
, wxSTC_CMD_PAGEDOWN
, wxSTC_CMD_PAGEDOWNEXTEND
, wxSTC_CMD_PAGEDOWNRECTEXTEND
, wxSTC_CMD_PAGEUP
, wxSTC_CMD_PAGEUPEXTEND
, wxSTC_CMD_PAGEUPRECTEXTEND
, wxSTC_CMD_PARADOWN
, wxSTC_CMD_PARADOWNEXTEND
, wxSTC_CMD_PARAUP
, wxSTC_CMD_PARAUPEXTEND
, wxSTC_CMD_PASTE
, wxSTC_CMD_REDO
, wxSTC_CMD_SELECTALL
, wxSTC_CMD_STUTTEREDPAGEDOWN
, wxSTC_CMD_STUTTEREDPAGEDOWNEXTEND
, wxSTC_CMD_STUTTEREDPAGEUP
, wxSTC_CMD_STUTTEREDPAGEUPEXTEND
, wxSTC_CMD_TAB
, wxSTC_CMD_UNDO
, wxSTC_CMD_UPPERCASE
, wxSTC_CMD_VCHOME
, wxSTC_CMD_VCHOMEEXTEND
, wxSTC_CMD_VCHOMERECTEXTEND
, wxSTC_CMD_VCHOMEWRAP
, wxSTC_CMD_VCHOMEWRAPEXTEND
, wxSTC_CMD_WORDLEFT
, wxSTC_CMD_WORDLEFTEND
, wxSTC_CMD_WORDLEFTENDEXTEND
, wxSTC_CMD_WORDLEFTEXTEND
, wxSTC_CMD_WORDPARTLEFT
, wxSTC_CMD_WORDPARTLEFTEXTEND
, wxSTC_CMD_WORDPARTRIGHT
, wxSTC_CMD_WORDPARTRIGHTEXTEND
, wxSTC_CMD_WORDRIGHT
, wxSTC_CMD_WORDRIGHTEND
, wxSTC_CMD_WORDRIGHTENDEXTEND
, wxSTC_CMD_WORDRIGHTEXTEND
, wxSTC_CMD_ZOOMIN
, wxSTC_CMD_ZOOMOUT
, wxSTC_CONF_COMMENT
, wxSTC_CONF_DEFAULT
, wxSTC_CONF_DIRECTIVE
, wxSTC_CONF_EXTENSION
, wxSTC_CONF_IDENTIFIER
, wxSTC_CONF_IP
, wxSTC_CONF_NUMBER
, wxSTC_CONF_OPERATOR
, wxSTC_CONF_PARAMETER
, wxSTC_CONF_STRING
, wxSTC_CP_DBCS
, wxSTC_CP_UTF8
, wxSTC_CSOUND_ARATE_VAR
, wxSTC_CSOUND_COMMENT
, wxSTC_CSOUND_COMMENTBLOCK
, wxSTC_CSOUND_DEFAULT
, wxSTC_CSOUND_GLOBAL_VAR
, wxSTC_CSOUND_HEADERSTMT
, wxSTC_CSOUND_IDENTIFIER
, wxSTC_CSOUND_INSTR
, wxSTC_CSOUND_IRATE_VAR
, wxSTC_CSOUND_KRATE_VAR
, wxSTC_CSOUND_NUMBER
, wxSTC_CSOUND_OPCODE
, wxSTC_CSOUND_OPERATOR
, wxSTC_CSOUND_PARAM
, wxSTC_CSOUND_STRINGEOL
, wxSTC_CSOUND_USERKEYWORD
, wxSTC_CSS_CLASS
, wxSTC_CSS_COMMENT
, wxSTC_CSS_DEFAULT
, wxSTC_CSS_DIRECTIVE
, wxSTC_CSS_DOUBLESTRING
, wxSTC_CSS_ID
, wxSTC_CSS_IDENTIFIER
, wxSTC_CSS_IMPORTANT
, wxSTC_CSS_OPERATOR
, wxSTC_CSS_PSEUDOCLASS
, wxSTC_CSS_SINGLESTRING
, wxSTC_CSS_TAG
, wxSTC_CSS_UNKNOWN_IDENTIFIER
, wxSTC_CSS_UNKNOWN_PSEUDOCLASS
, wxSTC_CSS_VALUE
, wxSTC_CURSORNORMAL
, wxSTC_CURSORWAIT
, wxSTC_C_CHARACTER
, wxSTC_C_COMMENT
, wxSTC_C_COMMENTDOC
, wxSTC_C_COMMENTDOCKEYWORD
, wxSTC_C_COMMENTDOCKEYWORDERROR
, wxSTC_C_COMMENTLINE
, wxSTC_C_COMMENTLINEDOC
, wxSTC_C_DEFAULT
, wxSTC_C_GLOBALCLASS
, wxSTC_C_IDENTIFIER
, wxSTC_C_NUMBER
, wxSTC_C_OPERATOR
, wxSTC_C_PREPROCESSOR
, wxSTC_C_REGEX
, wxSTC_C_STRING
, wxSTC_C_STRINGEOL
, wxSTC_C_UUID
, wxSTC_C_VERBATIM
, wxSTC_C_WORD
, wxSTC_C_WORD2
, wxSTC_DIFF_ADDED
, wxSTC_DIFF_COMMAND
, wxSTC_DIFF_COMMENT
, wxSTC_DIFF_DEFAULT
, wxSTC_DIFF_DELETED
, wxSTC_DIFF_HEADER
, wxSTC_DIFF_POSITION
, wxSTC_EDGE_BACKGROUND
, wxSTC_EDGE_LINE
, wxSTC_EDGE_NONE
, wxSTC_EIFFEL_CHARACTER
, wxSTC_EIFFEL_COMMENTLINE
, wxSTC_EIFFEL_DEFAULT
, wxSTC_EIFFEL_IDENTIFIER
, wxSTC_EIFFEL_NUMBER
, wxSTC_EIFFEL_OPERATOR
, wxSTC_EIFFEL_STRING
, wxSTC_EIFFEL_STRINGEOL
, wxSTC_EIFFEL_WORD
, wxSTC_EOL_CR
, wxSTC_EOL_CRLF
, wxSTC_EOL_LF
, wxSTC_ERLANG_ATOM
, wxSTC_ERLANG_CHARACTER
, wxSTC_ERLANG_COMMENT
, wxSTC_ERLANG_DEFAULT
, wxSTC_ERLANG_FUNCTION_NAME
, wxSTC_ERLANG_KEYWORD
, wxSTC_ERLANG_MACRO
, wxSTC_ERLANG_NODE_NAME
, wxSTC_ERLANG_NUMBER
, wxSTC_ERLANG_OPERATOR
, wxSTC_ERLANG_RECORD
, wxSTC_ERLANG_SEPARATOR
, wxSTC_ERLANG_STRING
, wxSTC_ERLANG_UNKNOWN
, wxSTC_ERLANG_VARIABLE
, wxSTC_ERR_BORLAND
, wxSTC_ERR_CMD
, wxSTC_ERR_CTAG
, wxSTC_ERR_DEFAULT
, wxSTC_ERR_DIFF_ADDITION
, wxSTC_ERR_DIFF_CHANGED
, wxSTC_ERR_DIFF_DELETION
, wxSTC_ERR_DIFF_MESSAGE
, wxSTC_ERR_ELF
, wxSTC_ERR_GCC
, wxSTC_ERR_IFC
, wxSTC_ERR_LUA
, wxSTC_ERR_MS
, wxSTC_ERR_NET
, wxSTC_ERR_PERL
, wxSTC_ERR_PHP
, wxSTC_ERR_PYTHON
, wxSTC_ESCRIPT_BRACE
, wxSTC_ESCRIPT_COMMENT
, wxSTC_ESCRIPT_COMMENTDOC
, wxSTC_ESCRIPT_COMMENTLINE
, wxSTC_ESCRIPT_DEFAULT
, wxSTC_ESCRIPT_IDENTIFIER
, wxSTC_ESCRIPT_NUMBER
, wxSTC_ESCRIPT_OPERATOR
, wxSTC_ESCRIPT_STRING
, wxSTC_ESCRIPT_WORD
, wxSTC_ESCRIPT_WORD2
, wxSTC_ESCRIPT_WORD3
, wxSTC_FIND_MATCHCASE
, wxSTC_FIND_POSIX
, wxSTC_FIND_REGEXP
, wxSTC_FIND_WHOLEWORD
, wxSTC_FIND_WORDSTART
, wxSTC_FOLDFLAG_BOX
, wxSTC_FOLDFLAG_LEVELNUMBERS
, wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED
, wxSTC_FOLDFLAG_LINEAFTER_EXPANDED
, wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED
, wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED
, wxSTC_FOLDLEVELBASE
, wxSTC_FOLDLEVELBOXFOOTERFLAG
, wxSTC_FOLDLEVELBOXHEADERFLAG
, wxSTC_FOLDLEVELCONTRACTED
, wxSTC_FOLDLEVELHEADERFLAG
, wxSTC_FOLDLEVELNUMBERMASK
, wxSTC_FOLDLEVELUNINDENT
, wxSTC_FOLDLEVELWHITEFLAG
, wxSTC_FS_ASM
, wxSTC_FS_BINNUMBER
, wxSTC_FS_COMMENT
, wxSTC_FS_COMMENTDOC
, wxSTC_FS_COMMENTDOCKEYWORD
, wxSTC_FS_COMMENTDOCKEYWORDERROR
, wxSTC_FS_COMMENTLINE
, wxSTC_FS_COMMENTLINEDOC
, wxSTC_FS_CONSTANT
, wxSTC_FS_DATE
, wxSTC_FS_DEFAULT
, wxSTC_FS_ERROR
, wxSTC_FS_HEXNUMBER
, wxSTC_FS_IDENTIFIER
, wxSTC_FS_KEYWORD
, wxSTC_FS_KEYWORD2
, wxSTC_FS_KEYWORD3
, wxSTC_FS_KEYWORD4
, wxSTC_FS_LABEL
, wxSTC_FS_NUMBER
, wxSTC_FS_OPERATOR
, wxSTC_FS_PREPROCESSOR
, wxSTC_FS_STRING
, wxSTC_FS_STRINGEOL
, wxSTC_F_COMMENT
, wxSTC_F_CONTINUATION
, wxSTC_F_DEFAULT
, wxSTC_F_IDENTIFIER
, wxSTC_F_LABEL
, wxSTC_F_NUMBER
, wxSTC_F_OPERATOR
, wxSTC_F_OPERATOR2
, wxSTC_F_PREPROCESSOR
, wxSTC_F_STRING1
, wxSTC_F_STRING2
, wxSTC_F_STRINGEOL
, wxSTC_F_WORD
, wxSTC_F_WORD2
, wxSTC_F_WORD3
, wxSTC_GC_ATTRIBUTE
, wxSTC_GC_COMMAND
, wxSTC_GC_COMMENTBLOCK
, wxSTC_GC_COMMENTLINE
, wxSTC_GC_CONTROL
, wxSTC_GC_DEFAULT
, wxSTC_GC_EVENT
, wxSTC_GC_GLOBAL
, wxSTC_GC_OPERATOR
, wxSTC_GC_STRING
, wxSTC_HA_CAPITAL
, wxSTC_HA_CHARACTER
, wxSTC_HA_CLASS
, wxSTC_HA_COMMENTBLOCK
, wxSTC_HA_COMMENTBLOCK2
, wxSTC_HA_COMMENTBLOCK3
, wxSTC_HA_COMMENTLINE
, wxSTC_HA_DATA
, wxSTC_HA_DEFAULT
, wxSTC_HA_IDENTIFIER
, wxSTC_HA_IMPORT
, wxSTC_HA_INSTANCE
, wxSTC_HA_KEYWORD
, wxSTC_HA_MODULE
, wxSTC_HA_NUMBER
, wxSTC_HA_OPERATOR
, wxSTC_HA_PREPROCESSOR
, wxSTC_HA_STRING
, wxSTC_HBA_COMMENTLINE
, wxSTC_HBA_DEFAULT
, wxSTC_HBA_IDENTIFIER
, wxSTC_HBA_NUMBER
, wxSTC_HBA_START
, wxSTC_HBA_STRING
, wxSTC_HBA_STRINGEOL
, wxSTC_HBA_WORD
, wxSTC_HB_COMMENTLINE
, wxSTC_HB_DEFAULT
, wxSTC_HB_IDENTIFIER
, wxSTC_HB_NUMBER
, wxSTC_HB_START
, wxSTC_HB_STRING
, wxSTC_HB_STRINGEOL
, wxSTC_HB_WORD
, wxSTC_HJA_COMMENT
, wxSTC_HJA_COMMENTDOC
, wxSTC_HJA_COMMENTLINE
, wxSTC_HJA_DEFAULT
, wxSTC_HJA_DOUBLESTRING
, wxSTC_HJA_KEYWORD
, wxSTC_HJA_NUMBER
, wxSTC_HJA_REGEX
, wxSTC_HJA_SINGLESTRING
, wxSTC_HJA_START
, wxSTC_HJA_STRINGEOL
, wxSTC_HJA_SYMBOLS
, wxSTC_HJA_WORD
, wxSTC_HJ_COMMENT
, wxSTC_HJ_COMMENTDOC
, wxSTC_HJ_COMMENTLINE
, wxSTC_HJ_DEFAULT
, wxSTC_HJ_DOUBLESTRING
, wxSTC_HJ_KEYWORD
, wxSTC_HJ_NUMBER
, wxSTC_HJ_REGEX
, wxSTC_HJ_SINGLESTRING
, wxSTC_HJ_START
, wxSTC_HJ_STRINGEOL
, wxSTC_HJ_SYMBOLS
, wxSTC_HJ_WORD
, wxSTC_HPA_CHARACTER
, wxSTC_HPA_CLASSNAME
, wxSTC_HPA_COMMENTLINE
, wxSTC_HPA_DEFAULT
, wxSTC_HPA_DEFNAME
, wxSTC_HPA_IDENTIFIER
, wxSTC_HPA_NUMBER
, wxSTC_HPA_OPERATOR
, wxSTC_HPA_START
, wxSTC_HPA_STRING
, wxSTC_HPA_TRIPLE
, wxSTC_HPA_TRIPLEDOUBLE
, wxSTC_HPA_WORD
, wxSTC_HPHP_COMMENT
, wxSTC_HPHP_COMMENTLINE
, wxSTC_HPHP_DEFAULT
, wxSTC_HPHP_HSTRING
, wxSTC_HPHP_HSTRING_VARIABLE
, wxSTC_HPHP_NUMBER
, wxSTC_HPHP_OPERATOR
, wxSTC_HPHP_SIMPLESTRING
, wxSTC_HPHP_VARIABLE
, wxSTC_HPHP_WORD
, wxSTC_HP_CHARACTER
, wxSTC_HP_CLASSNAME
, wxSTC_HP_COMMENTLINE
, wxSTC_HP_DEFAULT
, wxSTC_HP_DEFNAME
, wxSTC_HP_IDENTIFIER
, wxSTC_HP_NUMBER
, wxSTC_HP_OPERATOR
, wxSTC_HP_START
, wxSTC_HP_STRING
, wxSTC_HP_TRIPLE
, wxSTC_HP_TRIPLEDOUBLE
, wxSTC_HP_WORD
, wxSTC_H_ASP
, wxSTC_H_ASPAT
, wxSTC_H_ATTRIBUTE
, wxSTC_H_ATTRIBUTEUNKNOWN
, wxSTC_H_CDATA
, wxSTC_H_COMMENT
, wxSTC_H_DEFAULT
, wxSTC_H_DOUBLESTRING
, wxSTC_H_ENTITY
, wxSTC_H_NUMBER
, wxSTC_H_OTHER
, wxSTC_H_QUESTION
, wxSTC_H_SCRIPT
, wxSTC_H_SGML_1ST_PARAM
, wxSTC_H_SGML_1ST_PARAM_COMMENT
, wxSTC_H_SGML_BLOCK_DEFAULT
, wxSTC_H_SGML_COMMAND
, wxSTC_H_SGML_COMMENT
, wxSTC_H_SGML_DEFAULT
, wxSTC_H_SGML_DOUBLESTRING
, wxSTC_H_SGML_ENTITY
, wxSTC_H_SGML_ERROR
, wxSTC_H_SGML_SIMPLESTRING
, wxSTC_H_SGML_SPECIAL
, wxSTC_H_SINGLESTRING
, wxSTC_H_TAG
, wxSTC_H_TAGEND
, wxSTC_H_TAGUNKNOWN
, wxSTC_H_VALUE
, wxSTC_H_XCCOMMENT
, wxSTC_H_XMLEND
, wxSTC_H_XMLSTART
, wxSTC_INDIC0_MASK
, wxSTC_INDIC1_MASK
, wxSTC_INDIC2_MASK
, wxSTC_INDICS_MASK
, wxSTC_INDIC_DIAGONAL
, wxSTC_INDIC_HIDDEN
, wxSTC_INDIC_MAX
, wxSTC_INDIC_PLAIN
, wxSTC_INDIC_SQUIGGLE
, wxSTC_INDIC_STRIKE
, wxSTC_INDIC_TT
, wxSTC_INVALID_POSITION
, wxSTC_KEYWORDSET_MAX
, wxSTC_KEY_ADD
, wxSTC_KEY_BACK
, wxSTC_KEY_DELETE
, wxSTC_KEY_DIVIDE
, wxSTC_KEY_DOWN
, wxSTC_KEY_END
, wxSTC_KEY_ESCAPE
, wxSTC_KEY_HOME
, wxSTC_KEY_INSERT
, wxSTC_KEY_LEFT
, wxSTC_KEY_NEXT
, wxSTC_KEY_PRIOR
, wxSTC_KEY_RETURN
, wxSTC_KEY_RIGHT
, wxSTC_KEY_SUBTRACT
, wxSTC_KEY_TAB
, wxSTC_KEY_UP
, wxSTC_KIX_COMMENT
, wxSTC_KIX_DEFAULT
, wxSTC_KIX_FUNCTIONS
, wxSTC_KIX_IDENTIFIER
, wxSTC_KIX_KEYWORD
, wxSTC_KIX_MACRO
, wxSTC_KIX_NUMBER
, wxSTC_KIX_OPERATOR
, wxSTC_KIX_STRING1
, wxSTC_KIX_STRING2
, wxSTC_KIX_VAR
, wxSTC_LASTSTEPINUNDOREDO
, wxSTC_LEXER_START
, wxSTC_LEX_ADA
, wxSTC_LEX_ASM
, wxSTC_LEX_ASP
, wxSTC_LEX_AUTOMATIC
, wxSTC_LEX_AVE
, wxSTC_LEX_BAAN
, wxSTC_LEX_BATCH
, wxSTC_LEX_BULLANT
, wxSTC_LEX_CONF
, wxSTC_LEX_CONTAINER
, wxSTC_LEX_CPP
, wxSTC_LEX_CPPNOCASE
, wxSTC_LEX_CSOUND
, wxSTC_LEX_CSS
, wxSTC_LEX_DIFF
, wxSTC_LEX_EIFFEL
, wxSTC_LEX_EIFFELKW
, wxSTC_LEX_ERRORLIST
, wxSTC_LEX_ESCRIPT
, wxSTC_LEX_F77
, wxSTC_LEX_FLAGSHIP
, wxSTC_LEX_FORTRAN
, wxSTC_LEX_FREEBASIC
, wxSTC_LEX_HASKELL
, wxSTC_LEX_HTML
, wxSTC_LEX_LATEX
, wxSTC_LEX_LISP
, wxSTC_LEX_LOUT
, wxSTC_LEX_LUA
, wxSTC_LEX_MAKEFILE
, wxSTC_LEX_MATLAB
, wxSTC_LEX_MMIXAL
, wxSTC_LEX_NNCRONTAB
, wxSTC_LEX_NSIS
, wxSTC_LEX_NULL
, wxSTC_LEX_PASCAL
, wxSTC_LEX_PERL
, wxSTC_LEX_PHP
, wxSTC_LEX_PHPSCRIPT
, wxSTC_LEX_POV
, wxSTC_LEX_PROPERTIES
, wxSTC_LEX_PS
, wxSTC_LEX_PYTHON
, wxSTC_LEX_REBOL
, wxSTC_LEX_RUBY
, wxSTC_LEX_SCRIPTOL
, wxSTC_LEX_SMALLTALK
, wxSTC_LEX_SQL
, wxSTC_LEX_TADS3
, wxSTC_LEX_TCL
, wxSTC_LEX_VB
, wxSTC_LEX_VBSCRIPT
, wxSTC_LEX_XCODE
, wxSTC_LEX_XML
, wxSTC_LISP_COMMENT
, wxSTC_LISP_DEFAULT
, wxSTC_LISP_IDENTIFIER
, wxSTC_LISP_KEYWORD
, wxSTC_LISP_NUMBER
, wxSTC_LISP_OPERATOR
, wxSTC_LISP_STRING
, wxSTC_LISP_STRINGEOL
, wxSTC_LOT_ABORT
, wxSTC_LOT_BREAK
, wxSTC_LOT_DEFAULT
, wxSTC_LOT_FAIL
, wxSTC_LOT_HEADER
, wxSTC_LOT_PASS
, wxSTC_LOT_SET
, wxSTC_LOUT_COMMENT
, wxSTC_LOUT_DEFAULT
, wxSTC_LOUT_IDENTIFIER
, wxSTC_LOUT_NUMBER
, wxSTC_LOUT_OPERATOR
, wxSTC_LOUT_STRING
, wxSTC_LOUT_STRINGEOL
, wxSTC_LOUT_WORD
, wxSTC_LOUT_WORD2
, wxSTC_LOUT_WORD3
, wxSTC_LOUT_WORD4
, wxSTC_LUA_CHARACTER
, wxSTC_LUA_COMMENT
, wxSTC_LUA_COMMENTDOC
, wxSTC_LUA_COMMENTLINE
, wxSTC_LUA_DEFAULT
, wxSTC_LUA_IDENTIFIER
, wxSTC_LUA_LITERALSTRING
, wxSTC_LUA_NUMBER
, wxSTC_LUA_OPERATOR
, wxSTC_LUA_PREPROCESSOR
, wxSTC_LUA_STRING
, wxSTC_LUA_STRINGEOL
, wxSTC_LUA_WORD
, wxSTC_LUA_WORD2
, wxSTC_LUA_WORD3
, wxSTC_LUA_WORD4
, wxSTC_LUA_WORD5
, wxSTC_LUA_WORD6
, wxSTC_LUA_WORD7
, wxSTC_LUA_WORD8
, wxSTC_L_COMMAND
, wxSTC_L_COMMENT
, wxSTC_L_DEFAULT
, wxSTC_L_MATH
, wxSTC_L_TAG
, wxSTC_MAKE_COMMENT
, wxSTC_MAKE_DEFAULT
, wxSTC_MAKE_IDENTIFIER
, wxSTC_MAKE_IDEOL
, wxSTC_MAKE_OPERATOR
, wxSTC_MAKE_PREPROCESSOR
, wxSTC_MAKE_TARGET
, wxSTC_MARGIN_NUMBER
, wxSTC_MARGIN_SYMBOL
, wxSTC_MARKER_MAX
, wxSTC_MARKNUM_FOLDER
, wxSTC_MARKNUM_FOLDEREND
, wxSTC_MARKNUM_FOLDERMIDTAIL
, wxSTC_MARKNUM_FOLDEROPEN
, wxSTC_MARKNUM_FOLDEROPENMID
, wxSTC_MARKNUM_FOLDERSUB
, wxSTC_MARKNUM_FOLDERTAIL
, wxSTC_MARK_ARROW
, wxSTC_MARK_ARROWDOWN
, wxSTC_MARK_ARROWS
, wxSTC_MARK_BACKGROUND
, wxSTC_MARK_BOXMINUS
, wxSTC_MARK_BOXMINUSCONNECTED
, wxSTC_MARK_BOXPLUS
, wxSTC_MARK_BOXPLUSCONNECTED
, wxSTC_MARK_CHARACTER
, wxSTC_MARK_CIRCLE
, wxSTC_MARK_CIRCLEMINUS
, wxSTC_MARK_CIRCLEMINUSCONNECTED
, wxSTC_MARK_CIRCLEPLUS
, wxSTC_MARK_CIRCLEPLUSCONNECTED
, wxSTC_MARK_DOTDOTDOT
, wxSTC_MARK_EMPTY
, wxSTC_MARK_LCORNER
, wxSTC_MARK_LCORNERCURVE
, wxSTC_MARK_MINUS
, wxSTC_MARK_PIXMAP
, wxSTC_MARK_PLUS
, wxSTC_MARK_ROUNDRECT
, wxSTC_MARK_SHORTARROW
, wxSTC_MARK_SMALLRECT
, wxSTC_MARK_TCORNER
, wxSTC_MARK_TCORNERCURVE
, wxSTC_MARK_VLINE
, wxSTC_MASK_FOLDERS
, wxSTC_MATLAB_COMMAND
, wxSTC_MATLAB_COMMENT
, wxSTC_MATLAB_DEFAULT
, wxSTC_MATLAB_IDENTIFIER
, wxSTC_MATLAB_KEYWORD
, wxSTC_MATLAB_NUMBER
, wxSTC_MATLAB_OPERATOR
, wxSTC_MATLAB_STRING
, wxSTC_METAPOST_COMMAND
, wxSTC_METAPOST_DEFAULT
, wxSTC_METAPOST_EXTRA
, wxSTC_METAPOST_GROUP
, wxSTC_METAPOST_SPECIAL
, wxSTC_METAPOST_SYMBOL
, wxSTC_METAPOST_TEXT
, wxSTC_MMIXAL_CHAR
, wxSTC_MMIXAL_COMMENT
, wxSTC_MMIXAL_HEX
, wxSTC_MMIXAL_INCLUDE
, wxSTC_MMIXAL_LABEL
, wxSTC_MMIXAL_LEADWS
, wxSTC_MMIXAL_NUMBER
, wxSTC_MMIXAL_OPCODE
, wxSTC_MMIXAL_OPCODE_POST
, wxSTC_MMIXAL_OPCODE_PRE
, wxSTC_MMIXAL_OPCODE_UNKNOWN
, wxSTC_MMIXAL_OPCODE_VALID
, wxSTC_MMIXAL_OPERANDS
, wxSTC_MMIXAL_OPERATOR
, wxSTC_MMIXAL_REF
, wxSTC_MMIXAL_REGISTER
, wxSTC_MMIXAL_STRING
, wxSTC_MMIXAL_SYMBOL
, wxSTC_MODEVENTMASKALL
, wxSTC_MOD_BEFOREDELETE
, wxSTC_MOD_BEFOREINSERT
, wxSTC_MOD_CHANGEFOLD
, wxSTC_MOD_CHANGEMARKER
, wxSTC_MOD_CHANGESTYLE
, wxSTC_MOD_DELETETEXT
, wxSTC_MOD_INSERTTEXT
, wxSTC_MSSQL_COLUMN_NAME
, wxSTC_MSSQL_COLUMN_NAME_2
, wxSTC_MSSQL_COMMENT
, wxSTC_MSSQL_DATATYPE
, wxSTC_MSSQL_DEFAULT
, wxSTC_MSSQL_DEFAULT_PREF_DATATYPE
, wxSTC_MSSQL_FUNCTION
, wxSTC_MSSQL_GLOBAL_VARIABLE
, wxSTC_MSSQL_IDENTIFIER
, wxSTC_MSSQL_LINE_COMMENT
, wxSTC_MSSQL_NUMBER
, wxSTC_MSSQL_OPERATOR
, wxSTC_MSSQL_STATEMENT
, wxSTC_MSSQL_STORED_PROCEDURE
, wxSTC_MSSQL_STRING
, wxSTC_MSSQL_SYSTABLE
, wxSTC_MSSQL_VARIABLE
, wxSTC_NNCRONTAB_ASTERISK
, wxSTC_NNCRONTAB_COMMENT
, wxSTC_NNCRONTAB_DEFAULT
, wxSTC_NNCRONTAB_ENVIRONMENT
, wxSTC_NNCRONTAB_IDENTIFIER
, wxSTC_NNCRONTAB_KEYWORD
, wxSTC_NNCRONTAB_MODIFIER
, wxSTC_NNCRONTAB_NUMBER
, wxSTC_NNCRONTAB_SECTION
, wxSTC_NNCRONTAB_STRING
, wxSTC_NNCRONTAB_TASK
, wxSTC_NSIS_COMMENT
, wxSTC_NSIS_DEFAULT
, wxSTC_NSIS_FUNCTION
, wxSTC_NSIS_IFDEFINEDEF
, wxSTC_NSIS_LABEL
, wxSTC_NSIS_MACRODEF
, wxSTC_NSIS_SECTIONDEF
, wxSTC_NSIS_STRINGDQ
, wxSTC_NSIS_STRINGLQ
, wxSTC_NSIS_STRINGRQ
, wxSTC_NSIS_STRINGVAR
, wxSTC_NSIS_SUBSECTIONDEF
, wxSTC_NSIS_USERDEFINED
, wxSTC_NSIS_VARIABLE
, wxSTC_OPTIONAL_START
, wxSTC_PERFORMED_REDO
, wxSTC_PERFORMED_UNDO
, wxSTC_PERFORMED_USER
, wxSTC_PL_ARRAY
, wxSTC_PL_BACKTICKS
, wxSTC_PL_CHARACTER
, wxSTC_PL_COMMENTLINE
, wxSTC_PL_DATASECTION
, wxSTC_PL_DEFAULT
, wxSTC_PL_ERROR
, wxSTC_PL_HASH
, wxSTC_PL_HERE_DELIM
, wxSTC_PL_HERE_Q
, wxSTC_PL_HERE_QQ
, wxSTC_PL_HERE_QX
, wxSTC_PL_IDENTIFIER
, wxSTC_PL_LONGQUOTE
, wxSTC_PL_NUMBER
, wxSTC_PL_OPERATOR
, wxSTC_PL_POD
, wxSTC_PL_PREPROCESSOR
, wxSTC_PL_PUNCTUATION
, wxSTC_PL_REGEX
, wxSTC_PL_REGSUBST
, wxSTC_PL_SCALAR
, wxSTC_PL_STRING
, wxSTC_PL_STRING_Q
, wxSTC_PL_STRING_QQ
, wxSTC_PL_STRING_QR
, wxSTC_PL_STRING_QW
, wxSTC_PL_STRING_QX
, wxSTC_PL_SYMBOLTABLE
, wxSTC_PL_WORD
, wxSTC_POV_BADDIRECTIVE
, wxSTC_POV_COMMENT
, wxSTC_POV_COMMENTLINE
, wxSTC_POV_DEFAULT
, wxSTC_POV_DIRECTIVE
, wxSTC_POV_IDENTIFIER
, wxSTC_POV_NUMBER
, wxSTC_POV_OPERATOR
, wxSTC_POV_STRING
, wxSTC_POV_STRINGEOL
, wxSTC_POV_WORD2
, wxSTC_POV_WORD3
, wxSTC_POV_WORD4
, wxSTC_POV_WORD5
, wxSTC_POV_WORD6
, wxSTC_POV_WORD7
, wxSTC_POV_WORD8
, wxSTC_PRINT_BLACKONWHITE
, wxSTC_PRINT_COLOURONWHITE
, wxSTC_PRINT_COLOURONWHITEDEFAULTBG
, wxSTC_PRINT_INVERTLIGHT
, wxSTC_PRINT_NORMAL
, wxSTC_PROPS_ASSIGNMENT
, wxSTC_PROPS_COMMENT
, wxSTC_PROPS_DEFAULT
, wxSTC_PROPS_DEFVAL
, wxSTC_PROPS_SECTION
, wxSTC_PS_BADSTRINGCHAR
, wxSTC_PS_BASE85STRING
, wxSTC_PS_COMMENT
, wxSTC_PS_DEFAULT
, wxSTC_PS_DSC_COMMENT
, wxSTC_PS_DSC_VALUE
, wxSTC_PS_HEXSTRING
, wxSTC_PS_IMMEVAL
, wxSTC_PS_KEYWORD
, wxSTC_PS_LITERAL
, wxSTC_PS_NAME
, wxSTC_PS_NUMBER
, wxSTC_PS_PAREN_ARRAY
, wxSTC_PS_PAREN_DICT
, wxSTC_PS_PAREN_PROC
, wxSTC_PS_TEXT
, wxSTC_P_CHARACTER
, wxSTC_P_CLASSNAME
, wxSTC_P_COMMENTBLOCK
, wxSTC_P_COMMENTLINE
, wxSTC_P_DEFAULT
, wxSTC_P_DEFNAME
, wxSTC_P_IDENTIFIER
, wxSTC_P_NUMBER
, wxSTC_P_OPERATOR
, wxSTC_P_STRING
, wxSTC_P_STRINGEOL
, wxSTC_P_TRIPLE
, wxSTC_P_TRIPLEDOUBLE
, wxSTC_P_WORD
, wxSTC_REBOL_BINARY
, wxSTC_REBOL_BRACEDSTRING
, wxSTC_REBOL_CHARACTER
, wxSTC_REBOL_COMMENTBLOCK
, wxSTC_REBOL_COMMENTLINE
, wxSTC_REBOL_DATE
, wxSTC_REBOL_DEFAULT
, wxSTC_REBOL_EMAIL
, wxSTC_REBOL_FILE
, wxSTC_REBOL_IDENTIFIER
, wxSTC_REBOL_ISSUE
, wxSTC_REBOL_MONEY
, wxSTC_REBOL_NUMBER
, wxSTC_REBOL_OPERATOR
, wxSTC_REBOL_PAIR
, wxSTC_REBOL_PREFACE
, wxSTC_REBOL_QUOTEDSTRING
, wxSTC_REBOL_TAG
, wxSTC_REBOL_TIME
, wxSTC_REBOL_TUPLE
, wxSTC_REBOL_URL
, wxSTC_REBOL_WORD
, wxSTC_REBOL_WORD2
, wxSTC_REBOL_WORD3
, wxSTC_REBOL_WORD4
, wxSTC_REBOL_WORD5
, wxSTC_REBOL_WORD6
, wxSTC_REBOL_WORD7
, wxSTC_REBOL_WORD8
, wxSTC_SCMOD_ALT
, wxSTC_SCMOD_CTRL
, wxSTC_SCMOD_SHIFT
, wxSTC_SCRIPTOL_CHARACTER
, wxSTC_SCRIPTOL_COMMENT
, wxSTC_SCRIPTOL_COMMENTBASIC
, wxSTC_SCRIPTOL_COMMENTDOC
, wxSTC_SCRIPTOL_COMMENTDOCKEYWORD
, wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR
, wxSTC_SCRIPTOL_COMMENTLINE
, wxSTC_SCRIPTOL_COMMENTLINEDOC
, wxSTC_SCRIPTOL_DEFAULT
, wxSTC_SCRIPTOL_IDENTIFIER
, wxSTC_SCRIPTOL_NUMBER
, wxSTC_SCRIPTOL_OPERATOR
, wxSTC_SCRIPTOL_PREPROCESSOR
, wxSTC_SCRIPTOL_REGEX
, wxSTC_SCRIPTOL_STRING
, wxSTC_SCRIPTOL_STRINGEOL
, wxSTC_SCRIPTOL_UUID
, wxSTC_SCRIPTOL_VERBATIM
, wxSTC_SCRIPTOL_WORD
, wxSTC_SCRIPTOL_WORD2
, wxSTC_SEL_LINES
, wxSTC_SEL_RECTANGLE
, wxSTC_SEL_STREAM
, wxSTC_SH_BACKTICKS
, wxSTC_SH_CHARACTER
, wxSTC_SH_COMMENTLINE
, wxSTC_SH_DEFAULT
, wxSTC_SH_ERROR
, wxSTC_SH_HERE_DELIM
, wxSTC_SH_HERE_Q
, wxSTC_SH_IDENTIFIER
, wxSTC_SH_NUMBER
, wxSTC_SH_OPERATOR
, wxSTC_SH_PARAM
, wxSTC_SH_SCALAR
, wxSTC_SH_STRING
, wxSTC_SH_WORD
, wxSTC_SN_CODE
, wxSTC_SN_COMMENTLINE
, wxSTC_SN_COMMENTLINEBANG
, wxSTC_SN_DEFAULT
, wxSTC_SN_IDENTIFIER
, wxSTC_SN_NUMBER
, wxSTC_SN_OPERATOR
, wxSTC_SN_PREPROCESSOR
, wxSTC_SN_REGEXTAG
, wxSTC_SN_SIGNAL
, wxSTC_SN_STRING
, wxSTC_SN_STRINGEOL
, wxSTC_SN_USER
, wxSTC_SN_WORD
, wxSTC_SN_WORD2
, wxSTC_SN_WORD3
, wxSTC_SQL_CHARACTER
, wxSTC_SQL_COMMENT
, wxSTC_SQL_COMMENTDOC
, wxSTC_SQL_COMMENTDOCKEYWORD
, wxSTC_SQL_COMMENTDOCKEYWORDERROR
, wxSTC_SQL_COMMENTLINE
, wxSTC_SQL_COMMENTLINEDOC
, wxSTC_SQL_DEFAULT
, wxSTC_SQL_IDENTIFIER
, wxSTC_SQL_NUMBER
, wxSTC_SQL_OPERATOR
, wxSTC_SQL_QUOTEDIDENTIFIER
, wxSTC_SQL_SQLPLUS
, wxSTC_SQL_SQLPLUS_COMMENT
, wxSTC_SQL_SQLPLUS_PROMPT
, wxSTC_SQL_STRING
, wxSTC_SQL_USER1
, wxSTC_SQL_USER2
, wxSTC_SQL_USER3
, wxSTC_SQL_USER4
, wxSTC_SQL_WORD
, wxSTC_SQL_WORD2
, wxSTC_START
, wxSTC_STYLE_BRACEBAD
, wxSTC_STYLE_BRACELIGHT
, wxSTC_STYLE_CONTROLCHAR
, wxSTC_STYLE_DEFAULT
, wxSTC_STYLE_INDENTGUIDE
, wxSTC_STYLE_LASTPREDEFINED
, wxSTC_STYLE_LINENUMBER
, wxSTC_STYLE_MAX
, wxSTC_ST_ASSIGN
, wxSTC_ST_BINARY
, wxSTC_ST_BOOL
, wxSTC_ST_CHARACTER
, wxSTC_ST_COMMENT
, wxSTC_ST_DEFAULT
, wxSTC_ST_GLOBAL
, wxSTC_ST_KWSEND
, wxSTC_ST_NIL
, wxSTC_ST_NUMBER
, wxSTC_ST_RETURN
, wxSTC_ST_SELF
, wxSTC_ST_SPECIAL
, wxSTC_ST_SPEC_SEL
, wxSTC_ST_STRING
, wxSTC_ST_SUPER
, wxSTC_ST_SYMBOL
, wxSTC_T3_BLOCK_COMMENT
, wxSTC_T3_DEFAULT
, wxSTC_T3_D_STRING
, wxSTC_T3_HTML_DEFAULT
, wxSTC_T3_HTML_STRING
, wxSTC_T3_HTML_TAG
, wxSTC_T3_IDENTIFIER
, wxSTC_T3_KEYWORD
, wxSTC_T3_LIB_DIRECTIVE
, wxSTC_T3_LINE_COMMENT
, wxSTC_T3_MSG_PARAM
, wxSTC_T3_NUMBER
, wxSTC_T3_OPERATOR
, wxSTC_T3_PREPROCESSOR
, wxSTC_T3_S_STRING
, wxSTC_T3_USER1
, wxSTC_T3_USER2
, wxSTC_T3_USER3
, wxSTC_T3_X_DEFAULT
, wxSTC_T3_X_STRING
, wxSTC_TEX_COMMAND
, wxSTC_TEX_DEFAULT
, wxSTC_TEX_GROUP
, wxSTC_TEX_SPECIAL
, wxSTC_TEX_SYMBOL
, wxSTC_TEX_TEXT
, wxSTC_TIME_FOREVER
, wxSTC_VHDL_ATTRIBUTE
, wxSTC_VHDL_COMMENT
, wxSTC_VHDL_COMMENTLINEBANG
, wxSTC_VHDL_DEFAULT
, wxSTC_VHDL_IDENTIFIER
, wxSTC_VHDL_KEYWORD
, wxSTC_VHDL_NUMBER
, wxSTC_VHDL_OPERATOR
, wxSTC_VHDL_STDFUNCTION
, wxSTC_VHDL_STDOPERATOR
, wxSTC_VHDL_STDPACKAGE
, wxSTC_VHDL_STDTYPE
, wxSTC_VHDL_STRING
, wxSTC_VHDL_STRINGEOL
, wxSTC_VHDL_USERWORD
, wxSTC_VISIBLE_SLOP
, wxSTC_VISIBLE_STRICT
, wxSTC_V_COMMENT
, wxSTC_V_COMMENTLINE
, wxSTC_V_COMMENTLINEBANG
, wxSTC_V_DEFAULT
, wxSTC_V_IDENTIFIER
, wxSTC_V_NUMBER
, wxSTC_V_OPERATOR
, wxSTC_V_PREPROCESSOR
, wxSTC_V_STRING
, wxSTC_V_STRINGEOL
, wxSTC_V_USER
, wxSTC_V_WORD
, wxSTC_V_WORD2
, wxSTC_V_WORD3
, wxSTC_WRAP_NONE
, wxSTC_WRAP_WORD
, wxSTC_WS_INVISIBLE
, wxSTC_WS_VISIBLEAFTERINDENT
, wxSTC_WS_VISIBLEALWAYS
, wxSTC_YAML_COMMENT
, wxSTC_YAML_DEFAULT
, wxSTC_YAML_DOCUMENT
, wxSTC_YAML_ERROR
, wxSTC_YAML_IDENTIFIER
, wxSTC_YAML_KEYWORD
, wxSTC_YAML_NUMBER
, wxSTC_YAML_REFERENCE
, wxSTC_YAML_TEXT
, wxSTIPPLE
, wxSTIPPLE_MASK
, wxSTIPPLE_MASK_OPAQUE
, wxSTREAM_EOF
, wxSTREAM_NO_ERROR
, wxSTREAM_READ_ERROR
, wxSTREAM_WRITE_ERROR
, wxSTRETCH_NOT
, wxSTRING
, wxST_NO_AUTORESIZE
, wxST_SIZEGRIP
, wxSUNKEN_BORDER
, wxSWISS
, wxSW_3D
, wxSW_3DBORDER
, wxSW_3DSASH
, wxSW_BORDER
, wxSW_NOBORDER
, wxSYSTEM_MENU
, wxSYS_ANSI_FIXED_FONT
, wxSYS_ANSI_VAR_FONT
, wxSYS_BLACK_BRUSH
, wxSYS_BLACK_PEN
, wxSYS_BORDER_X
, wxSYS_BORDER_Y
, wxSYS_CAPTION_Y
, wxSYS_COLOUR_3DDKSHADOW
, wxSYS_COLOUR_3DFACE
, wxSYS_COLOUR_3DHIGHLIGHT
, wxSYS_COLOUR_3DHILIGHT
, wxSYS_COLOUR_3DLIGHT
, wxSYS_COLOUR_3DSHADOW
, wxSYS_COLOUR_ACTIVEBORDER
, wxSYS_COLOUR_ACTIVECAPTION
, wxSYS_COLOUR_APPWORKSPACE
, wxSYS_COLOUR_BACKGROUND
, wxSYS_COLOUR_BTNFACE
, wxSYS_COLOUR_BTNHIGHLIGHT
, wxSYS_COLOUR_BTNHILIGHT
, wxSYS_COLOUR_BTNSHADOW
, wxSYS_COLOUR_BTNTEXT
, wxSYS_COLOUR_CAPTIONTEXT
, wxSYS_COLOUR_DESKTOP
, wxSYS_COLOUR_GRAYTEXT
, wxSYS_COLOUR_HIGHLIGHT
, wxSYS_COLOUR_HIGHLIGHTTEXT
, wxSYS_COLOUR_INACTIVEBORDER
, wxSYS_COLOUR_INACTIVECAPTION
, wxSYS_COLOUR_INACTIVECAPTIONTEXT
, wxSYS_COLOUR_INFOBK
, wxSYS_COLOUR_INFOTEXT
, wxSYS_COLOUR_LISTBOX
, wxSYS_COLOUR_MENU
, wxSYS_COLOUR_MENUTEXT
, wxSYS_COLOUR_SCROLLBAR
, wxSYS_COLOUR_WINDOW
, wxSYS_COLOUR_WINDOWFRAME
, wxSYS_COLOUR_WINDOWTEXT
, wxSYS_CURSOR_X
, wxSYS_CURSOR_Y
, wxSYS_DCLICK_X
, wxSYS_DCLICK_Y
, wxSYS_DEFAULT_GUI_FONT
, wxSYS_DEFAULT_PALETTE
, wxSYS_DEVICE_DEFAULT_FONT
, wxSYS_DKGRAY_BRUSH
, wxSYS_DRAG_X
, wxSYS_DRAG_Y
, wxSYS_EDGE_X
, wxSYS_EDGE_Y
, wxSYS_FRAMESIZE_X
, wxSYS_FRAMESIZE_Y
, wxSYS_GRAY_BRUSH
, wxSYS_HOLLOW_BRUSH
, wxSYS_HSCROLL_ARROW_X
, wxSYS_HSCROLL_ARROW_Y
, wxSYS_HSCROLL_Y
, wxSYS_HTHUMB_X
, wxSYS_ICONSPACING_X
, wxSYS_ICONSPACING_Y
, wxSYS_ICON_X
, wxSYS_ICON_Y
, wxSYS_LTGRAY_BRUSH
, wxSYS_MENU_Y
, wxSYS_MOUSE_BUTTONS
, wxSYS_NETWORK_PRESENT
, wxSYS_NULL_BRUSH
, wxSYS_NULL_PEN
, wxSYS_OEM_FIXED_FONT
, wxSYS_PENWINDOWS_PRESENT
, wxSYS_SCREEN_DESKTOP
, wxSYS_SCREEN_NONE
, wxSYS_SCREEN_PDA
, wxSYS_SCREEN_SMALL
, wxSYS_SCREEN_TINY
, wxSYS_SCREEN_X
, wxSYS_SCREEN_Y
, wxSYS_SHOW_SOUNDS
, wxSYS_SMALLICON_X
, wxSYS_SMALLICON_Y
, wxSYS_SWAP_BUTTONS
, wxSYS_SYSTEM_FIXED_FONT
, wxSYS_SYSTEM_FONT
, wxSYS_VSCROLL_ARROW_X
, wxSYS_VSCROLL_ARROW_Y
, wxSYS_VSCROLL_X
, wxSYS_VTHUMB_Y
, wxSYS_WHITE_BRUSH
, wxSYS_WHITE_PEN
, wxSYS_WINDOWMIN_X
, wxSYS_WINDOWMIN_Y
, wxTAB_TRAVERSAL
, wxTB_3DBUTTONS
, wxTB_BOTTOM
, wxTB_DEFAULT_STYLE
, wxTB_DOCKABLE
, wxTB_FLAT
, wxTB_HORIZONTAL
, wxTB_HORZ_LAYOUT
, wxTB_HORZ_TEXT
, wxTB_LEFT
, wxTB_NOALIGN
, wxTB_NODIVIDER
, wxTB_NOICONS
, wxTB_NO_TOOLTIPS
, wxTB_RIGHT
, wxTB_TEXT
, wxTB_TOP
, wxTB_VERTICAL
, wxTC_FIXEDWIDTH
, wxTC_MULTILINE
, wxTC_OWNERDRAW
, wxTC_RIGHTJUSTIFY
, wxTELETYPE
, wxTEXT_ALIGNMENT_CENTER
, wxTEXT_ALIGNMENT_CENTRE
, wxTEXT_ALIGNMENT_DEFAULT
, wxTEXT_ALIGNMENT_JUSTIFIED
, wxTEXT_ALIGNMENT_LEFT
, wxTEXT_ALIGNMENT_RIGHT
, wxTEXT_ATTR_ALIGNMENT
, wxTEXT_ATTR_ALL
, wxTEXT_ATTR_BACKGROUND_COLOUR
, wxTEXT_ATTR_BULLET
, wxTEXT_ATTR_BULLET_NAME
, wxTEXT_ATTR_BULLET_NUMBER
, wxTEXT_ATTR_BULLET_STYLE
, wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE
, wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT
, wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT
, wxTEXT_ATTR_BULLET_STYLE_ARABIC
, wxTEXT_ATTR_BULLET_STYLE_BITMAP
, wxTEXT_ATTR_BULLET_STYLE_CONTINUATION
, wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER
, wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER
, wxTEXT_ATTR_BULLET_STYLE_NONE
, wxTEXT_ATTR_BULLET_STYLE_OUTLINE
, wxTEXT_ATTR_BULLET_STYLE_PARENTHESES
, wxTEXT_ATTR_BULLET_STYLE_PERIOD
, wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS
, wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER
, wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER
, wxTEXT_ATTR_BULLET_STYLE_STANDARD
, wxTEXT_ATTR_BULLET_STYLE_SYMBOL
, wxTEXT_ATTR_BULLET_TEXT
, wxTEXT_ATTR_CHARACTER
, wxTEXT_ATTR_CHARACTER_STYLE_NAME
, wxTEXT_ATTR_EFFECTS
, wxTEXT_ATTR_EFFECT_CAPITALS
, wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH
, wxTEXT_ATTR_EFFECT_EMBOSS
, wxTEXT_ATTR_EFFECT_ENGRAVE
, wxTEXT_ATTR_EFFECT_NONE
, wxTEXT_ATTR_EFFECT_OUTLINE
, wxTEXT_ATTR_EFFECT_SHADOW
, wxTEXT_ATTR_EFFECT_SMALL_CAPITALS
, wxTEXT_ATTR_EFFECT_STRIKETHROUGH
, wxTEXT_ATTR_EFFECT_SUBSCRIPT
, wxTEXT_ATTR_EFFECT_SUPERSCRIPT
, wxTEXT_ATTR_FONT
, wxTEXT_ATTR_FONT_ENCODING
, wxTEXT_ATTR_FONT_FACE
, wxTEXT_ATTR_FONT_FAMILY
, wxTEXT_ATTR_FONT_ITALIC
, wxTEXT_ATTR_FONT_PIXEL_SIZE
, wxTEXT_ATTR_FONT_POINT_SIZE
, wxTEXT_ATTR_FONT_SIZE
, wxTEXT_ATTR_FONT_STRIKETHROUGH
, wxTEXT_ATTR_FONT_UNDERLINE
, wxTEXT_ATTR_FONT_WEIGHT
, wxTEXT_ATTR_LEFT_INDENT
, wxTEXT_ATTR_LINE_SPACING
, wxTEXT_ATTR_LINE_SPACING_HALF
, wxTEXT_ATTR_LINE_SPACING_NORMAL
, wxTEXT_ATTR_LINE_SPACING_TWICE
, wxTEXT_ATTR_LIST_STYLE_NAME
, wxTEXT_ATTR_OUTLINE_LEVEL
, wxTEXT_ATTR_PAGE_BREAK
, wxTEXT_ATTR_PARAGRAPH
, wxTEXT_ATTR_PARAGRAPH_STYLE_NAME
, wxTEXT_ATTR_PARA_SPACING_AFTER
, wxTEXT_ATTR_PARA_SPACING_BEFORE
, wxTEXT_ATTR_RIGHT_INDENT
, wxTEXT_ATTR_TABS
, wxTEXT_ATTR_TEXT_COLOUR
, wxTEXT_ATTR_URL
, wxTEXT_TYPE_ANY
, wxTE_AUTO_SCROLL
, wxTE_AUTO_URL
, wxTE_BESTWRAP
, wxTE_CAPITALIZE
, wxTE_CENTER
, wxTE_CENTRE
, wxTE_CHARWRAP
, wxTE_DONTWRAP
, wxTE_HT_BEFORE
, wxTE_HT_BELOW
, wxTE_HT_BEYOND
, wxTE_HT_ON_TEXT
, wxTE_HT_UNKNOWN
, wxTE_LEFT
, wxTE_LINEWRAP
, wxTE_MULTILINE
, wxTE_NOHIDESEL
, wxTE_NO_VSCROLL
, wxTE_PASSWORD
, wxTE_PROCESS_ENTER
, wxTE_PROCESS_TAB
, wxTE_READONLY
, wxTE_RICH
, wxTE_RICH2
, wxTE_RIGHT
, wxTE_WORDWRAP
, wxTILE
, wxTINY_CAPTION_HORIZ
, wxTINY_CAPTION_VERT
, wxTOOL_BOTTOM
, wxTOOL_LEFT
, wxTOOL_RIGHT
, wxTOOL_TOP
, wxTOP
, wxTRANSPARENT
, wxTRANSPARENT_BRUSH
, wxTRANSPARENT_PEN
, wxTRANSPARENT_WINDOW
, wxTREE_HITTEST_ABOVE
, wxTREE_HITTEST_BELOW
, wxTREE_HITTEST_NOWHERE
, wxTREE_HITTEST_ONITEM
, wxTREE_HITTEST_ONITEMBUTTON
, wxTREE_HITTEST_ONITEMICON
, wxTREE_HITTEST_ONITEMINDENT
, wxTREE_HITTEST_ONITEMLABEL
, wxTREE_HITTEST_ONITEMLOWERPART
, wxTREE_HITTEST_ONITEMRIGHT
, wxTREE_HITTEST_ONITEMSTATEICON
, wxTREE_HITTEST_ONITEMUPPERPART
, wxTREE_HITTEST_TOLEFT
, wxTREE_HITTEST_TORIGHT
, wxTR_AQUA_BUTTONS
, wxTR_EDIT_LABELS
, wxTR_EXTENDED
, wxTR_FULL_ROW_HIGHLIGHT
, wxTR_HAS_BUTTONS
, wxTR_HAS_VARIABLE_ROW_HEIGHT
, wxTR_HIDE_ROOT
, wxTR_LINES_AT_ROOT
, wxTR_MULTIPLE
, wxTR_NO_BUTTONS
, wxTR_NO_LINES
, wxTR_ROW_LINES
, wxTR_SINGLE
, wxTR_TWIST_BUTTONS
, wxTreeItemIcon_Expanded
, wxTreeItemIcon_Normal
, wxTreeItemIcon_Selected
, wxTreeItemIcon_SelectedExpanded
, wxUNIX
, wxUNKNOWN
, wxUNKNOWN_PLATFORM
, wxUP
, wxUSER_COLOURS
, wxUSER_DASH
, wxVARIABLE
, wxVERTICAL
, wxVERTICAL_HATCH
, wxVSCROLL
, wxWANTS_CHARS
, wxWEST
, wxWHITE
, wxWHITE_BRUSH
, wxWHITE_PEN
, wxWIN32S
, wxWIN386
, wxWIN95
, wxWINDING_RULE
, wxWINDOWS
, wxWINDOWS_NT
, wxWINDOWS_OS2
, wxWS_EX_VALIDATE_RECURSIVELY
, wxXOR
, wxXRC_NONE
, wxXRC_NO_RELOADING
, wxXRC_NO_SUBCLASSING
, wxXRC_USE_LOCALE
, wxXVIEW_X
, wxYES
, wxYES_DEFAULT
, wxYES_NO
) where
import Data.Bits
-- A utility function
(<<) :: Int -> Int -> Int
x << i = shift x i
-- NEW! converted from wxWidgets\2.9.5\include\wx\defs.h
-- From wxWidgets\2.9.5\include\wx\defs.h
{-
The value of the first style is chosen to fit with
wxDeprecatedGUIConstants values below, don't change it.
-}
wxHATCHSTYLE_FIRST :: Int
wxHATCHSTYLE_FIRST = 111
wxHATCHSTYLE_BDIAGONAL :: Int
wxHATCHSTYLE_BDIAGONAL = wxHATCHSTYLE_FIRST
wxHATCHSTYLE_CROSSDIAG :: Int
wxHATCHSTYLE_CROSSDIAG = wxHATCHSTYLE_BDIAGONAL + 1
wxHATCHSTYLE_FDIAGONAL :: Int
wxHATCHSTYLE_FDIAGONAL = wxHATCHSTYLE_CROSSDIAG + 1
wxHATCHSTYLE_CROSS :: Int
wxHATCHSTYLE_CROSS = wxHATCHSTYLE_FDIAGONAL + 1
wxHATCHSTYLE_HORIZONTAL :: Int
wxHATCHSTYLE_HORIZONTAL = wxHATCHSTYLE_CROSS + 1
wxHATCHSTYLE_VERTICAL :: Int
wxHATCHSTYLE_VERTICAL = wxHATCHSTYLE_HORIZONTAL + 1
wxHATCHSTYLE_LAST :: Int
wxHATCHSTYLE_LAST = wxHATCHSTYLE_VERTICAL
-- End NEW!
-- | A flag can be combined with other flags to a bit mask.
type BitFlag = Int
wxEXEC_ASYNC :: BitFlag
wxEXEC_ASYNC = 0
wxEXEC_SYNC :: BitFlag
wxEXEC_SYNC = 1
wxEXEC_NOHIDE :: BitFlag
wxEXEC_NOHIDE = 2
wxEXEC_MAKE_GROUP_LEADER :: BitFlag
wxEXEC_MAKE_GROUP_LEADER = 4
wxITEM_SEPARATOR :: Int
wxITEM_SEPARATOR = (-1)
wxITEM_NORMAL :: Int
wxITEM_NORMAL = 0
wxITEM_CHECK :: Int
wxITEM_CHECK = 1
wxITEM_RADIO :: Int
wxITEM_RADIO = 2
wxITEM_MAX :: Int
wxITEM_MAX = 3
wxCLOSE_BOX :: Int
wxCLOSE_BOX = 4096
wxFRAME_EX_CONTEXTHELP :: Int
wxFRAME_EX_CONTEXTHELP = 4
wxDIALOG_EX_CONTEXTHELP :: Int
wxDIALOG_EX_CONTEXTHELP = 4
wxFRAME_SHAPED :: Int
wxFRAME_SHAPED = 16
wxFULLSCREEN_ALL :: Int
wxFULLSCREEN_ALL = 31
wxTreeItemIcon_Normal :: Int
wxTreeItemIcon_Normal = 0
wxTreeItemIcon_Selected :: Int
wxTreeItemIcon_Selected = 1
wxTreeItemIcon_Expanded :: Int
wxTreeItemIcon_Expanded = 2
wxTreeItemIcon_SelectedExpanded :: Int
wxTreeItemIcon_SelectedExpanded = 3
wxCONFIG_USE_LOCAL_FILE :: Int
wxCONFIG_USE_LOCAL_FILE = 1
wxCONFIG_USE_GLOBAL_FILE :: Int
wxCONFIG_USE_GLOBAL_FILE = 2
wxCONFIG_USE_RELATIVE_PATH :: Int
wxCONFIG_USE_RELATIVE_PATH = 4
wxCONFIG_USE_NO_ESCAPE_CHARACTERS :: Int
wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8
wxCONFIG_TYPE_UNKNOWN :: Int
wxCONFIG_TYPE_UNKNOWN = 0
wxCONFIG_TYPE_STRING :: Int
wxCONFIG_TYPE_STRING = 1
wxCONFIG_TYPE_BOOLEAN :: Int
wxCONFIG_TYPE_BOOLEAN = 2
wxCONFIG_TYPE_INTEGER :: Int
wxCONFIG_TYPE_INTEGER = 3
wxCONFIG_TYPE_FLOAT :: Int
wxCONFIG_TYPE_FLOAT = 4
wxSIGNONE :: Int
wxSIGNONE = 0
wxSIGHUP :: Int
wxSIGHUP = 1
wxSIGINT :: Int
wxSIGINT = 2
wxSIGQUIT :: Int
wxSIGQUIT = 3
wxSIGILL :: Int
wxSIGILL = 4
wxSIGTRAP :: Int
wxSIGTRAP = 5
wxSIGABRT :: Int
wxSIGABRT = 6
wxSIGEMT :: Int
wxSIGEMT = 7
wxSIGFPE :: Int
wxSIGFPE = 8
wxSIGKILL :: Int
wxSIGKILL = 9
wxSIGBUS :: Int
wxSIGBUS = 10
wxSIGSEGV :: Int
wxSIGSEGV = 11
wxSIGSYS :: Int
wxSIGSYS = 12
wxSIGPIPE :: Int
wxSIGPIPE = 13
wxSIGALRM :: Int
wxSIGALRM = 14
wxSIGTERM :: Int
wxSIGTERM = 15
wxKILL_OK :: Int
wxKILL_OK = 0
wxKILL_BAD_SIGNAL :: Int
wxKILL_BAD_SIGNAL = 1
wxKILL_ACCESS_DENIED :: Int
wxKILL_ACCESS_DENIED = 2
wxKILL_NO_PROCESS :: Int
wxKILL_NO_PROCESS = 3
wxKILL_ERROR :: Int
wxKILL_ERROR = 4
wxSTREAM_NO_ERROR :: Int
wxSTREAM_NO_ERROR = 0
wxSTREAM_EOF :: Int
wxSTREAM_EOF = 1
wxSTREAM_WRITE_ERROR :: Int
wxSTREAM_WRITE_ERROR = 2
wxSTREAM_READ_ERROR :: Int
wxSTREAM_READ_ERROR = 3
wxNB_MULTILINE :: Int
wxNB_MULTILINE = 256
wxIMAGE_LIST_NORMAL :: Int
wxIMAGE_LIST_NORMAL = 0
wxIMAGE_LIST_SMALL :: Int
wxIMAGE_LIST_SMALL = 1
wxIMAGE_LIST_STATE :: Int
wxIMAGE_LIST_STATE = 2
-- wxToolBar style flags
-- lay out the toolbar horizontally
wxTB_HORIZONTAL :: Int
wxTB_HORIZONTAL = wxHORIZONTAL -- == 0x0004
wxTB_TOP :: Int
wxTB_TOP = wxTB_HORIZONTAL
-- lay out the toolbar vertically
wxTB_VERTICAL :: Int
wxTB_VERTICAL = wxVERTICAL -- == 0x0008
wxTB_LEFT :: Int
wxTB_LEFT = wxTB_VERTICAL
-- show 3D buttons (wxToolBarSimple only)
wxTB_3DBUTTONS :: Int
wxTB_3DBUTTONS = 0x0010
-- "flat" buttons (Win32/GTK only)
wxTB_FLAT :: Int
wxTB_FLAT = 0x0020
-- dockable toolbar (GTK only)
wxTB_DOCKABLE :: Int
wxTB_DOCKABLE = 0x0040
-- don't show the icons (they're shown by default)
wxTB_NOICONS :: Int
wxTB_NOICONS = 0x0080
-- show the text (not shown by default)
wxTB_TEXT :: Int
wxTB_TEXT = 0x0100
-- don't show the divider between toolbar and the window (Win32 only)
wxTB_NODIVIDER :: Int
wxTB_NODIVIDER = 0x0200
-- no automatic alignment (Win32 only useless)
wxTB_NOALIGN :: Int
wxTB_NOALIGN = 0x0400
-- show the text and the icons alongside not vertically stacked (Win32/GTK)
wxTB_HORZ_LAYOUT :: Int
wxTB_HORZ_LAYOUT = 0x0800
wxTB_HORZ_TEXT :: Int
wxTB_HORZ_TEXT = wxTB_HORZ_LAYOUT .|. wxTB_TEXT
-- don't show the toolbar short help tooltips
wxTB_NO_TOOLTIPS :: Int
wxTB_NO_TOOLTIPS = 0x1000
-- lay out toolbar at the bottom of the window
wxTB_BOTTOM :: Int
wxTB_BOTTOM = 0x2000
-- lay out toolbar at the right edge of the window
wxTB_RIGHT :: Int
wxTB_RIGHT = 0x4000
wxTB_DEFAULT_STYLE :: Int
wxTB_DEFAULT_STYLE = wxTB_HORIZONTAL .|. wxTB_FLAT
-- End wxToolBar style flags
wxADJUST_MINSIZE :: Int
wxADJUST_MINSIZE = 32768
{-# DEPRECATED wxADJUST_MINSIZE "Don't use this" #-}
wxDB_TYPE_NAME_LEN :: Int
wxDB_TYPE_NAME_LEN = 40
wxDB_MAX_STATEMENT_LEN :: Int
wxDB_MAX_STATEMENT_LEN = 4096
wxDB_MAX_WHERE_CLAUSE_LEN :: Int
wxDB_MAX_WHERE_CLAUSE_LEN = 2048
wxDB_MAX_ERROR_MSG_LEN :: Int
wxDB_MAX_ERROR_MSG_LEN = 512
wxDB_MAX_ERROR_HISTORY :: Int
wxDB_MAX_ERROR_HISTORY = 5
wxDB_MAX_TABLE_NAME_LEN :: Int
wxDB_MAX_TABLE_NAME_LEN = 128
wxDB_MAX_COLUMN_NAME_LEN :: Int
wxDB_MAX_COLUMN_NAME_LEN = 128
wxDB_DATA_TYPE_VARCHAR :: Int
wxDB_DATA_TYPE_VARCHAR = 1
wxDB_DATA_TYPE_INTEGER :: Int
wxDB_DATA_TYPE_INTEGER = 2
wxDB_DATA_TYPE_FLOAT :: Int
wxDB_DATA_TYPE_FLOAT = 3
wxDB_DATA_TYPE_DATE :: Int
wxDB_DATA_TYPE_DATE = 4
wxDB_DATA_TYPE_BLOB :: Int
wxDB_DATA_TYPE_BLOB = 5
wxDB_SELECT_KEYFIELDS :: Int
wxDB_SELECT_KEYFIELDS = 1
wxDB_SELECT_WHERE :: Int
wxDB_SELECT_WHERE = 2
wxDB_SELECT_MATCHING :: Int
wxDB_SELECT_MATCHING = 3
wxDB_SELECT_STATEMENT :: Int
wxDB_SELECT_STATEMENT = 4
wxDB_UPD_KEYFIELDS :: Int
wxDB_UPD_KEYFIELDS = 1
wxDB_UPD_WHERE :: Int
wxDB_UPD_WHERE = 2
wxDB_DEL_KEYFIELDS :: Int
wxDB_DEL_KEYFIELDS = 1
wxDB_DEL_WHERE :: Int
wxDB_DEL_WHERE = 2
wxDB_DEL_MATCHING :: Int
wxDB_DEL_MATCHING = 3
wxDB_WHERE_KEYFIELDS :: Int
wxDB_WHERE_KEYFIELDS = 1
wxDB_WHERE_MATCHING :: Int
wxDB_WHERE_MATCHING = 2
wxDB_GRANT_SELECT :: Int
wxDB_GRANT_SELECT = 1
wxDB_GRANT_INSERT :: Int
wxDB_GRANT_INSERT = 2
wxDB_GRANT_UPDATE :: Int
wxDB_GRANT_UPDATE = 4
wxDB_GRANT_DELETE :: Int
wxDB_GRANT_DELETE = 8
wxDB_GRANT_ALL :: Int
wxDB_GRANT_ALL = 15
wxSQL_INVALID_HANDLE :: Int
wxSQL_INVALID_HANDLE = (-2)
wxSQL_ERROR :: Int
wxSQL_ERROR = (-1)
wxSQL_SUCCESS :: Int
wxSQL_SUCCESS = 0
wxSQL_SUCCESS_WITH_INFO :: Int
wxSQL_SUCCESS_WITH_INFO = 1
wxSQL_NO_DATA_FOUND :: Int
wxSQL_NO_DATA_FOUND = 100
wxSQL_CHAR :: Int
wxSQL_CHAR = 1
wxSQL_NUMERIC :: Int
wxSQL_NUMERIC = 2
wxSQL_DECIMAL :: Int
wxSQL_DECIMAL = 3
wxSQL_INTEGER :: Int
wxSQL_INTEGER = 4
wxSQL_SMALLINT :: Int
wxSQL_SMALLINT = 5
wxSQL_FLOAT :: Int
wxSQL_FLOAT = 6
wxSQL_REAL :: Int
wxSQL_REAL = 7
wxSQL_DOUBLE :: Int
wxSQL_DOUBLE = 8
wxSQL_VARCHAR :: Int
wxSQL_VARCHAR = 12
wxSQL_C_CHAR :: Int
wxSQL_C_CHAR = 1
wxSQL_C_LONG :: Int
wxSQL_C_LONG = 4
wxSQL_C_SHORT :: Int
wxSQL_C_SHORT = 5
wxSQL_C_FLOAT :: Int
wxSQL_C_FLOAT = 7
wxSQL_C_DOUBLE :: Int
wxSQL_C_DOUBLE = 8
wxSQL_C_DEFAULT :: Int
wxSQL_C_DEFAULT = 99
wxSQL_NO_NULLS :: Int
wxSQL_NO_NULLS = 0
wxSQL_NULLABLE :: Int
wxSQL_NULLABLE = 1
wxSQL_NULLABLE_UNKNOWN :: Int
wxSQL_NULLABLE_UNKNOWN = 2
wxSQL_NULL_DATA :: Int
wxSQL_NULL_DATA = (-1)
wxSQL_DATA_AT_EXEC :: Int
wxSQL_DATA_AT_EXEC = (-2)
wxSQL_NTS :: Int
wxSQL_NTS = (-3)
wxSQL_DATE :: Int
wxSQL_DATE = 9
wxSQL_TIME :: Int
wxSQL_TIME = 10
wxSQL_TIMESTAMP :: Int
wxSQL_TIMESTAMP = 11
wxSQL_C_DATE :: Int
wxSQL_C_DATE = 9
wxSQL_C_TIME :: Int
wxSQL_C_TIME = 10
wxSQL_C_TIMESTAMP :: Int
wxSQL_C_TIMESTAMP = 11
wxSQL_FETCH_NEXT :: Int
wxSQL_FETCH_NEXT = 1
wxSQL_FETCH_FIRST :: Int
wxSQL_FETCH_FIRST = 2
wxSQL_FETCH_LAST :: Int
wxSQL_FETCH_LAST = 3
wxSQL_FETCH_PRIOR :: Int
wxSQL_FETCH_PRIOR = 4
wxSQL_FETCH_ABSOLUTE :: Int
wxSQL_FETCH_ABSOLUTE = 5
wxSQL_FETCH_RELATIVE :: Int
wxSQL_FETCH_RELATIVE = 6
wxSQL_FETCH_BOOKMARK :: Int
wxSQL_FETCH_BOOKMARK = 8
wxSOUND_SYNC :: Int
wxSOUND_SYNC = 0
wxSOUND_ASYNC :: Int
wxSOUND_ASYNC = 1
wxSOUND_LOOP :: Int
wxSOUND_LOOP = 2
wxDRAG_COPYONLY :: Int
wxDRAG_COPYONLY = 0
wxDRAG_ALLOWMOVE :: Int
wxDRAG_ALLOWMOVE = 1
wxDRAG_DEFALUTMOVE :: Int
wxDRAG_DEFALUTMOVE = 3
wxMEDIACTRLPLAYERCONTROLS_NONE :: BitFlag
wxMEDIACTRLPLAYERCONTROLS_NONE = 0
wxMEDIACTRLPLAYERCONTROLS_STEP :: BitFlag
wxMEDIACTRLPLAYERCONTROLS_STEP = 1
wxMEDIACTRLPLAYERCONTROLS_VOLUME :: BitFlag
wxMEDIACTRLPLAYERCONTROLS_VOLUME = 2
wxMEDIACTRLPLAYERCONTROLS_DEFAULT :: BitFlag
wxMEDIACTRLPLAYERCONTROLS_DEFAULT = 3
wxACCEL_ALT :: Int
wxACCEL_ALT = 1
wxACCEL_CTRL :: Int
wxACCEL_CTRL = 2
wxACCEL_SHIFT :: Int
wxACCEL_SHIFT = 4
wxACCEL_NORMAL :: Int
wxACCEL_NORMAL = 0
wxNULL_FLAG :: Int
wxNULL_FLAG = 0
wxEVT_NULL :: Int
wxEVT_NULL = 0
wxEVT_FIRST :: Int
wxEVT_FIRST = 10000
wxJOYSTICK1 :: Int
wxJOYSTICK1 = 0
wxJOYSTICK2 :: Int
wxJOYSTICK2 = 1
wxJOY_BUTTON1 :: Int
wxJOY_BUTTON1 = 1
wxJOY_BUTTON2 :: Int
wxJOY_BUTTON2 = 2
wxJOY_BUTTON3 :: Int
wxJOY_BUTTON3 = 4
wxJOY_BUTTON4 :: Int
wxJOY_BUTTON4 = 8
wxUNKNOWN_PLATFORM :: Int
wxUNKNOWN_PLATFORM = 1
wxCURSES :: Int
wxCURSES = 2
wxXVIEW_X :: Int
wxXVIEW_X = 3
wxMOTIF_X :: Int
wxMOTIF_X = 4
wxCOSE_X :: Int
wxCOSE_X = 5
wxNEXTSTEP :: Int
wxNEXTSTEP = 6
wxMACINTOSH :: Int
wxMACINTOSH = 7
wxBEOS :: Int
wxBEOS = 8
wxGTK :: Int
wxGTK = 9
wxGTK_WIN32 :: Int
wxGTK_WIN32 = 10
wxGTK_OS2 :: Int
wxGTK_OS2 = 11
wxGTK_BEOS :: Int
wxGTK_BEOS = 12
wxQT :: Int
wxQT = 13
wxGEOS :: Int
wxGEOS = 14
wxOS2_PM :: Int
wxOS2_PM = 15
wxWINDOWS :: Int
wxWINDOWS = 16
wxPENWINDOWS :: Int
wxPENWINDOWS = 17
wxWINDOWS_NT :: Int
wxWINDOWS_NT = 18
wxWIN32S :: Int
wxWIN32S = 19
wxWIN95 :: Int
wxWIN95 = 20
wxWIN386 :: Int
wxWIN386 = 21
wxMGL_UNIX :: Int
wxMGL_UNIX = 22
wxMGL_X :: Int
wxMGL_X = 23
wxMGL_WIN32 :: Int
wxMGL_WIN32 = 24
wxMGL_OS2 :: Int
wxMGL_OS2 = 25
wxWINDOWS_OS2 :: Int
wxWINDOWS_OS2 = 26
wxUNIX :: Int
wxUNIX = 27
wxBIG_ENDIAN :: Int
wxBIG_ENDIAN = 4321
wxLITTLE_ENDIAN :: Int
wxLITTLE_ENDIAN = 1234
wxPDP_ENDIAN :: Int
wxPDP_ENDIAN = 3412
wxCENTRE :: Int
wxCENTRE = 1
wxCENTER :: Int
wxCENTER = 1
wxCENTER_FRAME :: Int
wxCENTER_FRAME = 0
wxCENTRE_ON_SCREEN :: Int
wxCENTRE_ON_SCREEN = 2
wxHORIZONTAL :: Int
wxHORIZONTAL = 4
wxVERTICAL :: Int
wxVERTICAL = 8
wxBOTH :: Int
wxBOTH = 12
wxLEFT :: Int
wxLEFT = 16
wxRIGHT :: Int
wxRIGHT = 32
wxUP :: Int
wxUP = 64
wxDOWN :: Int
wxDOWN = 128
wxTOP :: Int
wxTOP = 64
wxBOTTOM :: Int
wxBOTTOM = 128
wxNORTH :: Int
wxNORTH = 64
wxSOUTH :: Int
wxSOUTH = 128
wxWEST :: Int
wxWEST = 16
wxEAST :: Int
wxEAST = 32
wxALL :: Int
wxALL = 240
-- enum wxAlignment
wxALIGN_NOT :: Int
wxALIGN_NOT = 0
wxALIGN_CENTER_HORIZONTAL :: Int
wxALIGN_CENTER_HORIZONTAL = 256
wxALIGN_CENTRE_HORIZONTAL :: Int
wxALIGN_CENTRE_HORIZONTAL = 256
wxALIGN_LEFT :: Int
wxALIGN_LEFT = 0
wxALIGN_TOP :: Int
wxALIGN_TOP = 0
wxALIGN_RIGHT :: Int
wxALIGN_RIGHT = 512
wxALIGN_BOTTOM :: Int
wxALIGN_BOTTOM = 1024
wxALIGN_CENTER_VERTICAL :: Int
wxALIGN_CENTER_VERTICAL = 2048
wxALIGN_CENTRE_VERTICAL :: Int
wxALIGN_CENTRE_VERTICAL = 2048
wxALIGN_CENTER :: Int
wxALIGN_CENTER = 2304
wxALIGN_CENTRE :: Int
wxALIGN_CENTRE = 2304
-- End enum wxAlignment
-- enum wxAuiPaneButtonState
wxAUI_BUTTON_STATE_NORMAL :: Int
wxAUI_BUTTON_STATE_NORMAL = 0
wxAUI_BUTTON_STATE_HOVER :: Int
wxAUI_BUTTON_STATE_HOVER = 2
wxAUI_BUTTON_STATE_PRESSED :: Int
wxAUI_BUTTON_STATE_PRESSED = 4
wxAUI_BUTTON_STATE_DISABLED :: Int
wxAUI_BUTTON_STATE_DISABLED = 8
wxAUI_BUTTON_STATE_HIDDEN :: Int
wxAUI_BUTTON_STATE_HIDDEN = 16
wxAUI_BUTTON_STATE_CHECKED :: Int
wxAUI_BUTTON_STATE_CHECKED = 32
-- end enum wxAuiPaneButtonState
-- enum wxAuiButtonId
wxAUI_BUTTON_CLOSE :: Int
wxAUI_BUTTON_CLOSE = 101
wxAUI_BUTTON_MAXIMIZE_RESTORE :: Int
wxAUI_BUTTON_MAXIMIZE_RESTORE = 102
wxAUI_BUTTON_MINIMIZE :: Int
wxAUI_BUTTON_MINIMIZE = 103
wxAUI_BUTTON_PIN :: Int
wxAUI_BUTTON_PIN = 104
wxAUI_BUTTON_OPTIONS :: Int
wxAUI_BUTTON_OPTIONS = 105
wxAUI_BUTTON_WINDOWLIST :: Int
wxAUI_BUTTON_WINDOWLIST = 106
wxAUI_BUTTON_LEFT :: Int
wxAUI_BUTTON_LEFT = 107
wxAUI_BUTTON_RIGHT :: Int
wxAUI_BUTTON_RIGHT = 108
wxAUI_BUTTON_UP :: Int
wxAUI_BUTTON_UP = 109
wxAUI_BUTTON_DOWN :: Int
wxAUI_BUTTON_DOWN = 110
wxAUI_BUTTON_CUSTOM1 :: Int
wxAUI_BUTTON_CUSTOM1 = 201
wxAUI_BUTTON_CUSTOM2 :: Int
wxAUI_BUTTON_CUSTOM2 = 202
wxAUI_BUTTON_CUSTOM3 :: Int
wxAUI_BUTTON_CUSTOM3 = 203
-- end enum wxAuiButtonId
-- enum wxAuiManagerDock
wxAUI_DOCK_NONE :: Int
wxAUI_DOCK_NONE = 0
wxAUI_DOCK_TOP :: Int
wxAUI_DOCK_TOP = 1
wxAUI_DOCK_RIGHT :: Int
wxAUI_DOCK_RIGHT = 2
wxAUI_DOCK_BOTTOM :: Int
wxAUI_DOCK_BOTTOM = 3
wxAUI_DOCK_LEFT :: Int
wxAUI_DOCK_LEFT = 4
wxAUI_DOCK_CENTER :: Int
wxAUI_DOCK_CENTER = 5
wxAUI_DOCK_CENTRE :: Int
wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER
-- end enum wxAuiManagerDock
-- enum wxAuiPaneDockArtSetting
wxAUI_DOCKART_SASH_SIZE :: Int
wxAUI_DOCKART_SASH_SIZE = 0
wxAUI_DOCKART_CAPTION_SIZE :: Int
wxAUI_DOCKART_CAPTION_SIZE = 1
wxAUI_DOCKART_GRIPPER_SIZE :: Int
wxAUI_DOCKART_GRIPPER_SIZE = 2
wxAUI_DOCKART_PANE_BORDER_SIZE :: Int
wxAUI_DOCKART_PANE_BORDER_SIZE = 3
wxAUI_DOCKART_PANE_BUTTON_SIZE :: Int
wxAUI_DOCKART_PANE_BUTTON_SIZE = 4
wxAUI_DOCKART_BACKGROUND_COLOUR :: Int
wxAUI_DOCKART_BACKGROUND_COLOUR = 5
wxAUI_DOCKART_SASH_COLOUR :: Int
wxAUI_DOCKART_SASH_COLOUR = 6
wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR :: Int
wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7
wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR :: Int
wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8
wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR :: Int
wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9
wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR :: Int
wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10
wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR :: Int
wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11
wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR :: Int
wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12
wxAUI_DOCKART_BORDER_COLOUR :: Int
wxAUI_DOCKART_BORDER_COLOUR = 13
wxAUI_DOCKART_GRIPPER_COLOUR :: Int
wxAUI_DOCKART_GRIPPER_COLOUR = 14
wxAUI_DOCKART_CAPTION_FONT :: Int
wxAUI_DOCKART_CAPTION_FONT = 15
wxAUI_DOCKART_GRADIENT_TYPE :: Int
wxAUI_DOCKART_GRADIENT_TYPE = 16
-- end enum wxAuiPaneDockArtSetting
-- enum wxAuiPaneDockArtGradients
wxAUI_GRADIENT_NONE :: Int
wxAUI_GRADIENT_NONE = 0
wxAUI_GRADIENT_VERTICAL :: Int
wxAUI_GRADIENT_VERTICAL = 1
wxAUI_GRADIENT_HORIZONTAL :: Int
wxAUI_GRADIENT_HORIZONTAL = 2
-- end enum wxAuiPaneDockArtGradients
-- enum wxAuiManagerOption
wxAUI_MGR_ALLOW_FLOATING :: Int
wxAUI_MGR_ALLOW_FLOATING = 1
wxAUI_MGR_ALLOW_ACTIVE_PANE :: Int
wxAUI_MGR_ALLOW_ACTIVE_PANE = 2
wxAUI_MGR_TRANSPARENT_DRAG :: Int
wxAUI_MGR_TRANSPARENT_DRAG = 4
wxAUI_MGR_TRANSPARENT_HINT :: Int
wxAUI_MGR_TRANSPARENT_HINT = 8
wxAUI_MGR_VENETIAN_BLINDS_HINT :: Int
wxAUI_MGR_VENETIAN_BLINDS_HINT = 16
wxAUI_MGR_RECTANGLE_HINT :: Int
wxAUI_MGR_RECTANGLE_HINT = 32
wxAUI_MGR_HINT_FADE :: Int
wxAUI_MGR_HINT_FADE = 64
wxAUI_MGR_NO_VENETIAN_BLINDS_FADE :: Int
wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 128
wxAUI_MGR_LIVE_RESIZE :: Int
wxAUI_MGR_LIVE_RESIZE = 256
wxAUI_MGR_DEFAULT :: Int
wxAUI_MGR_DEFAULT = 201
-- end enum wxAuiManagerOption
-- enum wxAuiNotebookOption
wxAUI_NB_TOP :: Int
wxAUI_NB_TOP = 1
-- not implemented yet
wxAUI_NB_LEFT :: Int
wxAUI_NB_LEFT = 2
-- not implemented yet
wxAUI_NB_RIGHT :: Int
wxAUI_NB_RIGHT = 4
wxAUI_NB_BOTTOM :: Int
wxAUI_NB_BOTTOM = 8
wxAUI_NB_TAB_SPLIT :: Int
wxAUI_NB_TAB_SPLIT = 16
wxAUI_NB_TAB_MOVE :: Int
wxAUI_NB_TAB_MOVE = 32
wxAUI_NB_TAB_EXTERNAL_MOVE :: Int
wxAUI_NB_TAB_EXTERNAL_MOVE = 64
wxAUI_NB_TAB_FIXED_WIDTH :: Int
wxAUI_NB_TAB_FIXED_WIDTH = 128
wxAUI_NB_SCROLL_BUTTONS :: Int
wxAUI_NB_SCROLL_BUTTONS = 256
wxAUI_NB_WINDOWLIST_BUTTON :: Int
wxAUI_NB_WINDOWLIST_BUTTON = 512
wxAUI_NB_CLOSE_BUTTON :: Int
wxAUI_NB_CLOSE_BUTTON = 1024
wxAUI_NB_CLOSE_ON_ACTIVE_TAB :: Int
wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 2048
wxAUI_NB_CLOSE_ON_ALL_TABS :: Int
wxAUI_NB_CLOSE_ON_ALL_TABS = 4096
wxAUI_NB_MIDDLE_CLICK_CLOSE :: Int
wxAUI_NB_MIDDLE_CLICK_CLOSE = 8192
-- wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_CLOSE_ON_ACTIVE_TAB | wxAUI_NB_MIDDLE_CLICK_CLOSE
wxAUI_NB_DEFAULT_STYLE :: Int
wxAUI_NB_DEFAULT_STYLE = 10545
-- end enum wxAuiNotebookOption
-- enum wxAuiPaneInsertLevel
wxAUI_INSERT_PANE :: Int
wxAUI_INSERT_PANE = 0
wxAUI_INSERT_ROW :: Int
wxAUI_INSERT_ROW = 1
wxAUI_INSERT_DOCK :: Int
wxAUI_INSERT_DOCK = 2
-- end enum wxAuiPaneInsertLevel
-- enum wxAuiToolBarStyle
wxAUI_TB_TEXT :: Int
wxAUI_TB_TEXT = 1
wxAUI_TB_NO_TOOLTIPS :: Int
wxAUI_TB_NO_TOOLTIPS = 2
wxAUI_TB_NO_AUTORESIZE :: Int
wxAUI_TB_NO_AUTORESIZE = 4
wxAUI_TB_GRIPPER :: Int
wxAUI_TB_GRIPPER = 8
wxAUI_TB_OVERFLOW :: Int
wxAUI_TB_OVERFLOW = 16
wxAUI_TB_VERTICAL :: Int
wxAUI_TB_VERTICAL = 32
wxAUI_TB_HORZ_LAYOUT :: Int
wxAUI_TB_HORZ_LAYOUT = 64
wxAUI_TB_HORIZONTAL :: Int
wxAUI_TB_HORIZONTAL = 128
wxAUI_TB_PLAIN_BACKGROUND :: Int
wxAUI_TB_PLAIN_BACKGROUND = 256
wxAUI_TB_HORZ_TEXT :: Int
wxAUI_TB_HORZ_TEXT = 65
wxAUI_ORIENTATION_MASK :: Int
wxAUI_ORIENTATION_MASK = 160
wxAUI_TB_DEFAULT_STYLE :: Int
wxAUI_TB_DEFAULT_STYLE = 0
-- end enum wxAuiToolBarStyle
-- enum wxAuiToolBarArtSetting
wxAUI_TBART_SEPARATOR_SIZE :: Int
wxAUI_TBART_SEPARATOR_SIZE = 0
wxAUI_TBART_GRIPPER_SIZE :: Int
wxAUI_TBART_GRIPPER_SIZE = 1
wxAUI_TBART_OVERFLOW_SIZE :: Int
wxAUI_TBART_OVERFLOW_SIZE = 2
-- end enum wxAuiToolBarArtSetting
-- enum wxAuiToolBarToolTextOrientation
wxAUI_TBTOOL_TEXT_LEFT :: Int
wxAUI_TBTOOL_TEXT_LEFT = 0
wxAUI_TBTOOL_TEXT_RIGHT :: Int
wxAUI_TBTOOL_TEXT_RIGHT = 1
wxAUI_TBTOOL_TEXT_TOP :: Int
wxAUI_TBTOOL_TEXT_TOP = 2
wxAUI_TBTOOL_TEXT_BOTTOM :: Int
wxAUI_TBTOOL_TEXT_BOTTOM = 3
-- end enum wxAuiToolBarToolTextOrientation
-- enum for wxBookCtrlHitTest
wxBK_HITTEST_NOWHERE :: Int
wxBK_HITTEST_NOWHERE = 1
wxBK_HITTEST_ONICON :: Int
wxBK_HITTEST_ONICON = 2
wxBK_HITTEST_ONLABEL :: Int
wxBK_HITTEST_ONLABEL = 4
wxBK_HITTEST_ONITEM :: Int
wxBK_HITTEST_ONITEM = 6
wxBK_HITTEST_ONPAGE :: Int
wxBK_HITTEST_ONPAGE = 8
-- end enum
-- wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook)
wxBK_DEFAULT :: Int
wxBK_DEFAULT = 0x0000
wxBK_TOP :: Int
wxBK_TOP = 0x0010
wxBK_BOTTOM :: Int
wxBK_BOTTOM = 0x0020
wxBK_LEFT :: Int
wxBK_LEFT = 0x0040
wxBK_RIGHT :: Int
wxBK_RIGHT = 0x0080
wxBK_ALIGN_MASK :: Int
wxBK_ALIGN_MASK = 240
-- end wxBookCtrl flags
-- enum wxSizerFlagBits
wxFIXED_MINSIZE :: Int
wxFIXED_MINSIZE = 0x8000
wxRESERVE_SPACE_EVEN_IF_HIDDEN :: Int
wxRESERVE_SPACE_EVEN_IF_HIDDEN = 0x0002
-- a mask to extract wxSizerFlagBits from combination of flags
wxSIZER_FLAG_BITS_MASK :: Int
wxSIZER_FLAG_BITS_MASK = 0x8002
-- End enum wxSizerFlagBits
-- enum wxStretch
wxSTRETCH_NOT :: Int
wxSTRETCH_NOT = 0
wxSHRINK :: Int
wxSHRINK = 4096
wxGROW :: Int
wxGROW = 8192
wxEXPAND :: Int
wxEXPAND = 8192
wxSHAPED :: Int
wxSHAPED = 16384
wxTILE :: Int
wxTILE = wxSHAPED .|. wxFIXED_MINSIZE
-- a mask to extract stretch from the combination of flags
wxSTRETCH_MASK = 0x7000 -- sans wxTILE
-- End enum wxStretch
-- enum wxBorder
{-
- Window (Frame/dialog/subwindow/panel item) style flags
-}
wxVSCROLL :: Int
wxVSCROLL = fromIntegral (0x80000000 :: Integer) -- Casting to remove a compiler warning about Int being too big
wxHSCROLL :: Int
wxHSCROLL = 0x40000000
wxCAPTION :: Int
wxCAPTION = 0x20000000
-- | Deprecated
wxDOUBLE_BORDER :: Int
wxDOUBLE_BORDER = 268435456
{-# DEPRECATED wxDOUBLE_BORDER "Use wxBORDER_THEME" #-}
-- | Deprecated
wxSUNKEN_BORDER :: Int
wxSUNKEN_BORDER = 134217728
{-# DEPRECATED wxSUNKEN_BORDER "Use wxBORDER_SUNKEN" #-}
-- | Deprecated
wxRAISED_BORDER :: Int
wxRAISED_BORDER = 67108864
{-# DEPRECATED wxRAISED_BORDER "Use wxBORDER_RAISED" #-}
-- | Deprecated
wxSTATIC_BORDER :: Int
wxSTATIC_BORDER = 16777216
{-# DEPRECATED wxSTATIC_BORDER "Use wxBORDER_STATIC" #-}
wxBORDER :: Int
wxBORDER = 33554432
-- | This is different from wxBORDER_NONE as by default the controls do
-- have border
wxBORDER_DEFAULT :: Int
wxBORDER_DEFAULT = 0
-- | Displays no border, overriding the default border style for the
-- window. wxNO_BORDER is the old name for this style.
wxBORDER_NONE :: Int
wxBORDER_NONE = 0x00200000
-- | Displays a border suitable for a static control. wxSTATIC_BORDER is
-- the old name for this style. Windows only.
wxBORDER_STATIC :: Int
wxBORDER_STATIC = 0x01000000
-- | Displays a thin border around the window. wxSIMPLE_BORDER is the old
-- name for this style.
wxBORDER_SIMPLE :: Int
wxBORDER_SIMPLE = 0x02000000
-- | Displays a raised border. wxRAISED_BORDER is the old name for this style.
wxBORDER_RAISED :: Int
wxBORDER_RAISED = 0x04000000
-- | Displays a sunken border. wxSUNKEN_BORDER is the old name for this style.
wxBORDER_SUNKEN :: Int
wxBORDER_SUNKEN = 0x08000000
-- | Displays a themed border where possible. Currently this has an effect
-- on Windows XP and above only. For more information on themed borders,
-- please see Themed borders on Windows
-- <http://docs.wxwidgets.org/2.8/wx_wxmswport.html#wxmswthemedborders>.
wxBORDER_THEME :: Int
wxBORDER_THEME = 0x10000000
-- | A mask to extract border style from the combination of flags
wxBORDER_MASK :: Int
wxBORDER_MASK = 0x1f200000
-- End enum wxBorder
wxTRANSPARENT_WINDOW :: Int
wxTRANSPARENT_WINDOW = 1048576
wxNO_BORDER :: Int
wxNO_BORDER = 2097152
wxUSER_COLOURS :: Int
wxUSER_COLOURS = 8388608
wxNO_3D :: Int
wxNO_3D = 8388608
wxCLIP_CHILDREN :: Int
wxCLIP_CHILDREN = 4194304
wxTAB_TRAVERSAL :: Int
wxTAB_TRAVERSAL = 524288
wxWANTS_CHARS :: Int
wxWANTS_CHARS = 262144
wxRETAINED :: Int
wxRETAINED = 131072
wxNO_FULL_REPAINT_ON_RESIZE :: Int
wxNO_FULL_REPAINT_ON_RESIZE = 65536
wxWS_EX_VALIDATE_RECURSIVELY :: Int
wxWS_EX_VALIDATE_RECURSIVELY = 1
wxSTAY_ON_TOP :: Int
wxSTAY_ON_TOP = 32768
wxICONIZE :: Int
wxICONIZE = 16384
wxMAXIMIZE :: Int
wxMAXIMIZE = 8192
wxSYSTEM_MENU :: Int
wxSYSTEM_MENU = 2048
wxMINIMIZE_BOX :: Int
wxMINIMIZE_BOX = 1024
wxMAXIMIZE_BOX :: Int
wxMAXIMIZE_BOX = 512
wxDEFAULT_FRAME_STYLE :: Int
wxDEFAULT_FRAME_STYLE = 536878656
wxTINY_CAPTION_HORIZ :: Int
wxTINY_CAPTION_HORIZ = 256
wxTINY_CAPTION_VERT :: Int
wxTINY_CAPTION_VERT = 128
wxRESIZE_BORDER :: Int
wxRESIZE_BORDER = 64
wxDIALOG_MODAL :: Int
wxDIALOG_MODAL = 32
wxDIALOG_MODELESS :: Int
wxDIALOG_MODELESS = 0
wxFRAME_FLOAT_ON_PARENT :: Int
wxFRAME_FLOAT_ON_PARENT = 8
wxFRAME_NO_WINDOW_MENU :: Int
wxFRAME_NO_WINDOW_MENU = 256
wxED_CLIENT_MARGIN :: Int
wxED_CLIENT_MARGIN = 4
wxED_BUTTONS_BOTTOM :: Int
wxED_BUTTONS_BOTTOM = 0
wxED_BUTTONS_RIGHT :: Int
wxED_BUTTONS_RIGHT = 2
wxED_STATIC_LINE :: Int
wxED_STATIC_LINE = 1
wxMB_DOCKABLE :: Int
wxMB_DOCKABLE = 1
wxMENU_TEAROFF :: Int
wxMENU_TEAROFF = 1
wxCOLOURED :: Int
wxCOLOURED = 2048
wxFIXED_LENGTH :: Int
wxFIXED_LENGTH = 1024
wxLB_SORT :: Int
wxLB_SORT = 16
wxLB_SINGLE :: Int
wxLB_SINGLE = 32
wxLB_MULTIPLE :: Int
wxLB_MULTIPLE = 64
wxLB_EXTENDED :: Int
wxLB_EXTENDED = 128
wxLB_OWNERDRAW :: Int
wxLB_OWNERDRAW = 256
wxLB_NEEDED_SB :: Int
wxLB_NEEDED_SB = 512
wxLB_ALWAYS_SB :: Int
wxLB_ALWAYS_SB = 1024
-- ----------------------------------------------------------------------------
-- wxTextCtrl style flags
-- ----------------------------------------------------------------------------
wxTE_NO_VSCROLL :: Int
wxTE_NO_VSCROLL = 0x0002
wxTE_READONLY :: Int
wxTE_READONLY = 0x0010
wxTE_MULTILINE :: Int
wxTE_MULTILINE = 0x0020
wxTE_PROCESS_TAB :: Int
wxTE_PROCESS_TAB = 0x0040
-- alignment flags
wxTE_LEFT :: Int
wxTE_LEFT = 0x0000 -- 0x0000
wxTE_CENTER :: Int
wxTE_CENTER = wxALIGN_CENTER_HORIZONTAL -- 0x0100
wxTE_RIGHT :: Int
wxTE_RIGHT = wxALIGN_RIGHT -- 0x0200
wxTE_CENTRE :: Int
wxTE_CENTRE = wxTE_CENTER
-- this style means to use RICHEDIT control and does something only under wxMSW
-- and Win32 and is silently ignored under all other platforms
wxTE_RICH :: Int
wxTE_RICH = 0x0080
wxTE_PROCESS_ENTER :: Int
wxTE_PROCESS_ENTER = 0x0400
wxTE_PASSWORD :: Int
wxTE_PASSWORD = 0x0800
-- automatically detect the URLs and generate the events when mouse is
-- moved/clicked over an URL
--
-- this is for Win32 richedit and wxGTK2 multiline controls only so far
wxTE_AUTO_URL :: Int
wxTE_AUTO_URL = 0x1000
-- by default, the Windows text control doesn't show the selection when it
-- doesn't have focus - use this style to force it to always show it
wxTE_NOHIDESEL :: Int
wxTE_NOHIDESEL = 0x2000
-- use wxHSCROLL to not wrap text at all, wxTE_CHARWRAP to wrap it at any
-- position and wxTE_WORDWRAP to wrap at words boundary
--
-- if no wrapping style is given at all, the control wraps at word boundary
wxTE_DONTWRAP :: Int
wxTE_DONTWRAP = wxHSCROLL
wxTE_CHARWRAP :: Int
wxTE_CHARWRAP = 0x4000 -- wrap at any position
wxTE_WORDWRAP :: Int
wxTE_WORDWRAP = 0x0001 -- wrap only at words boundaries
wxTE_BESTWRAP :: Int
wxTE_BESTWRAP = 0x0000 -- this is the default
-- if WXWIN_COMPATIBILITY_2_6
-- obsolete synonym
wxTE_LINEWRAP :: Int
wxTE_LINEWRAP = wxTE_CHARWRAP
{-# DEPRECATED wxTE_LINEWRAP "Don't use this" #-}
-- endif -- WXWIN_COMPATIBILITY_2_6
-- if WXWIN_COMPATIBILITY_2_8
-- this style is (or at least should be) on by default now, don't use it
wxTE_AUTO_SCROLL :: Int
wxTE_AUTO_SCROLL = 0
{-# DEPRECATED wxTE_AUTO_SCROLL "Don't use this" #-}
-- endif -- WXWIN_COMPATIBILITY_2_8
-- force using RichEdit version 2.0 or 3.0 instead of 1.0 (default) for
-- wxTE_RICH controls - can be used together with or instead of wxTE_RICH
wxTE_RICH2 :: Int
wxTE_RICH2 = 0x8000
-- reuse wxTE_RICH2's value for CAPEDIT control on Windows CE
-- #if defined(__SMARTPHONE__) || defined(__POCKETPC__)
-- wxTE_CAPITALIZE :: Int
-- wxTE_CAPITALIZE = wxTE_RICH2
-- #else
wxTE_CAPITALIZE :: Int
wxTE_CAPITALIZE = 0
-- #endif
-- ----------------------------------------------------------------------------
-- wxTextCtrl file types
-- ----------------------------------------------------------------------------
wxTEXT_TYPE_ANY :: Int
wxTEXT_TYPE_ANY = 0
-- ----------------------------------------------------------------------------
-- wxTextCtrl::HitTest return values
-- ----------------------------------------------------------------------------
-- the point asked is ...
-- enum wxTextCtrlHitTestResult
wxTE_HT_UNKNOWN :: Int
wxTE_HT_UNKNOWN = -2 -- this means HitTest() is simply not implemented
wxTE_HT_BEFORE :: Int
wxTE_HT_BEFORE = -1 -- either to the left or upper
wxTE_HT_ON_TEXT :: Int
wxTE_HT_ON_TEXT = 0 -- directly on
wxTE_HT_BELOW :: Int
wxTE_HT_BELOW = 1 -- below [the last line]
wxTE_HT_BEYOND :: Int
wxTE_HT_BEYOND = 2 -- after [the end of line]
-- ... the character returned
-- ----------------------------------------------------------------------------
-- Types for wxTextAttr
-- ----------------------------------------------------------------------------
-- Alignment
-- enum wxTextAttrAlignment
wxTEXT_ALIGNMENT_DEFAULT :: Int
wxTEXT_ALIGNMENT_DEFAULT = 0
wxTEXT_ALIGNMENT_LEFT :: Int
wxTEXT_ALIGNMENT_LEFT = 1
wxTEXT_ALIGNMENT_CENTRE :: Int
wxTEXT_ALIGNMENT_CENTRE = 2
wxTEXT_ALIGNMENT_CENTER :: Int
wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE
wxTEXT_ALIGNMENT_RIGHT :: Int
wxTEXT_ALIGNMENT_RIGHT = 3
wxTEXT_ALIGNMENT_JUSTIFIED :: Int
wxTEXT_ALIGNMENT_JUSTIFIED = 4
-- Flags to indicate which attributes are being applied
-- enum wxTextAttrFlags
wxTEXT_ATTR_TEXT_COLOUR :: Int
wxTEXT_ATTR_TEXT_COLOUR = 0x00000001
wxTEXT_ATTR_BACKGROUND_COLOUR :: Int
wxTEXT_ATTR_BACKGROUND_COLOUR = 0x00000002
wxTEXT_ATTR_FONT_FACE :: Int
wxTEXT_ATTR_FONT_FACE = 0x00000004
wxTEXT_ATTR_FONT_POINT_SIZE :: Int
wxTEXT_ATTR_FONT_POINT_SIZE = 0x00000008
wxTEXT_ATTR_FONT_PIXEL_SIZE :: Int
wxTEXT_ATTR_FONT_PIXEL_SIZE = 0x10000000
wxTEXT_ATTR_FONT_WEIGHT :: Int
wxTEXT_ATTR_FONT_WEIGHT = 0x00000010
wxTEXT_ATTR_FONT_ITALIC :: Int
wxTEXT_ATTR_FONT_ITALIC = 0x00000020
wxTEXT_ATTR_FONT_UNDERLINE :: Int
wxTEXT_ATTR_FONT_UNDERLINE = 0x00000040
wxTEXT_ATTR_FONT_STRIKETHROUGH :: Int
wxTEXT_ATTR_FONT_STRIKETHROUGH = 0x08000000
wxTEXT_ATTR_FONT_ENCODING :: Int
wxTEXT_ATTR_FONT_ENCODING = 0x02000000
wxTEXT_ATTR_FONT_FAMILY :: Int
wxTEXT_ATTR_FONT_FAMILY = 0x04000000
wxTEXT_ATTR_FONT_SIZE :: Int
wxTEXT_ATTR_FONT_SIZE =
wxTEXT_ATTR_FONT_POINT_SIZE .|.
wxTEXT_ATTR_FONT_PIXEL_SIZE
wxTEXT_ATTR_FONT :: Int
wxTEXT_ATTR_FONT =
wxTEXT_ATTR_FONT_FACE .|.
wxTEXT_ATTR_FONT_SIZE .|.
wxTEXT_ATTR_FONT_WEIGHT .|.
wxTEXT_ATTR_FONT_ITALIC .|.
wxTEXT_ATTR_FONT_UNDERLINE .|.
wxTEXT_ATTR_FONT_STRIKETHROUGH .|.
wxTEXT_ATTR_FONT_ENCODING .|.
wxTEXT_ATTR_FONT_FAMILY
wxTEXT_ATTR_ALIGNMENT :: Int
wxTEXT_ATTR_ALIGNMENT = 0x00000080
wxTEXT_ATTR_LEFT_INDENT :: Int
wxTEXT_ATTR_LEFT_INDENT = 0x00000100
wxTEXT_ATTR_RIGHT_INDENT :: Int
wxTEXT_ATTR_RIGHT_INDENT = 0x00000200
wxTEXT_ATTR_TABS :: Int
wxTEXT_ATTR_TABS = 0x00000400
wxTEXT_ATTR_PARA_SPACING_AFTER :: Int
wxTEXT_ATTR_PARA_SPACING_AFTER = 0x00000800
wxTEXT_ATTR_PARA_SPACING_BEFORE :: Int
wxTEXT_ATTR_PARA_SPACING_BEFORE = 0x00001000
wxTEXT_ATTR_LINE_SPACING :: Int
wxTEXT_ATTR_LINE_SPACING = 0x00002000
wxTEXT_ATTR_CHARACTER_STYLE_NAME :: Int
wxTEXT_ATTR_CHARACTER_STYLE_NAME = 0x00004000
wxTEXT_ATTR_PARAGRAPH_STYLE_NAME :: Int
wxTEXT_ATTR_PARAGRAPH_STYLE_NAME = 0x00008000
wxTEXT_ATTR_LIST_STYLE_NAME :: Int
wxTEXT_ATTR_LIST_STYLE_NAME = 0x00010000
wxTEXT_ATTR_BULLET_STYLE :: Int
wxTEXT_ATTR_BULLET_STYLE = 0x00020000
wxTEXT_ATTR_BULLET_NUMBER :: Int
wxTEXT_ATTR_BULLET_NUMBER = 0x00040000
wxTEXT_ATTR_BULLET_TEXT :: Int
wxTEXT_ATTR_BULLET_TEXT = 0x00080000
wxTEXT_ATTR_BULLET_NAME :: Int
wxTEXT_ATTR_BULLET_NAME = 0x00100000
wxTEXT_ATTR_BULLET :: Int
wxTEXT_ATTR_BULLET =
wxTEXT_ATTR_BULLET_STYLE .|.
wxTEXT_ATTR_BULLET_NUMBER .|.
wxTEXT_ATTR_BULLET_TEXT .|.
wxTEXT_ATTR_BULLET_NAME
wxTEXT_ATTR_URL :: Int
wxTEXT_ATTR_URL = 0x00200000
wxTEXT_ATTR_PAGE_BREAK :: Int
wxTEXT_ATTR_PAGE_BREAK = 0x00400000
wxTEXT_ATTR_EFFECTS :: Int
wxTEXT_ATTR_EFFECTS = 0x00800000
wxTEXT_ATTR_OUTLINE_LEVEL :: Int
wxTEXT_ATTR_OUTLINE_LEVEL = 0x01000000
{-!
* Character and paragraph combined styles
-}
wxTEXT_ATTR_CHARACTER :: Int
wxTEXT_ATTR_CHARACTER =
wxTEXT_ATTR_FONT .|.
wxTEXT_ATTR_EFFECTS .|.
wxTEXT_ATTR_BACKGROUND_COLOUR .|.
wxTEXT_ATTR_TEXT_COLOUR .|.
wxTEXT_ATTR_CHARACTER_STYLE_NAME .|.
wxTEXT_ATTR_URL
wxTEXT_ATTR_PARAGRAPH :: Int
wxTEXT_ATTR_PARAGRAPH =
wxTEXT_ATTR_ALIGNMENT .|.
wxTEXT_ATTR_LEFT_INDENT .|.
wxTEXT_ATTR_RIGHT_INDENT .|.
wxTEXT_ATTR_TABS .|.
wxTEXT_ATTR_PARA_SPACING_BEFORE .|.
wxTEXT_ATTR_PARA_SPACING_AFTER .|.
wxTEXT_ATTR_LINE_SPACING .|.
wxTEXT_ATTR_BULLET .|.
wxTEXT_ATTR_PARAGRAPH_STYLE_NAME .|.
wxTEXT_ATTR_LIST_STYLE_NAME .|.
wxTEXT_ATTR_OUTLINE_LEVEL .|.
wxTEXT_ATTR_PAGE_BREAK
wxTEXT_ATTR_ALL :: Int
wxTEXT_ATTR_ALL =
wxTEXT_ATTR_CHARACTER .|.
wxTEXT_ATTR_PARAGRAPH
{-!
* Styles for wxTextAttr::SetBulletStyle
-}
-- enum wxTextAttrBulletStyle
wxTEXT_ATTR_BULLET_STYLE_NONE :: Int
wxTEXT_ATTR_BULLET_STYLE_NONE = 0x00000000
wxTEXT_ATTR_BULLET_STYLE_ARABIC :: Int
wxTEXT_ATTR_BULLET_STYLE_ARABIC = 0x00000001
wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER :: Int
wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER = 0x00000002
wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER :: Int
wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER = 0x00000004
wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER :: Int
wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER = 0x00000008
wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER :: Int
wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER = 0x00000010
wxTEXT_ATTR_BULLET_STYLE_SYMBOL :: Int
wxTEXT_ATTR_BULLET_STYLE_SYMBOL = 0x00000020
wxTEXT_ATTR_BULLET_STYLE_BITMAP :: Int
wxTEXT_ATTR_BULLET_STYLE_BITMAP = 0x00000040
wxTEXT_ATTR_BULLET_STYLE_PARENTHESES :: Int
wxTEXT_ATTR_BULLET_STYLE_PARENTHESES = 0x00000080
wxTEXT_ATTR_BULLET_STYLE_PERIOD :: Int
wxTEXT_ATTR_BULLET_STYLE_PERIOD = 0x00000100
wxTEXT_ATTR_BULLET_STYLE_STANDARD :: Int
wxTEXT_ATTR_BULLET_STYLE_STANDARD = 0x00000200
wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS :: Int
wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS = 0x00000400
wxTEXT_ATTR_BULLET_STYLE_OUTLINE :: Int
wxTEXT_ATTR_BULLET_STYLE_OUTLINE = 0x00000800
wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT :: Int
wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT = 0x00000000
wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT :: Int
wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT = 0x00001000
wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE :: Int
wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE = 0x00002000
wxTEXT_ATTR_BULLET_STYLE_CONTINUATION :: Int
wxTEXT_ATTR_BULLET_STYLE_CONTINUATION = 0x00004000
{-!
* Styles for wxTextAttr::SetTextEffects
-}
-- enum wxTextAttrEffects
wxTEXT_ATTR_EFFECT_NONE :: Int
wxTEXT_ATTR_EFFECT_NONE = 0x00000000
wxTEXT_ATTR_EFFECT_CAPITALS :: Int
wxTEXT_ATTR_EFFECT_CAPITALS = 0x00000001
wxTEXT_ATTR_EFFECT_SMALL_CAPITALS :: Int
wxTEXT_ATTR_EFFECT_SMALL_CAPITALS = 0x00000002
wxTEXT_ATTR_EFFECT_STRIKETHROUGH :: Int
wxTEXT_ATTR_EFFECT_STRIKETHROUGH = 0x00000004
wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH :: Int
wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH = 0x00000008
wxTEXT_ATTR_EFFECT_SHADOW :: Int
wxTEXT_ATTR_EFFECT_SHADOW = 0x00000010
wxTEXT_ATTR_EFFECT_EMBOSS :: Int
wxTEXT_ATTR_EFFECT_EMBOSS = 0x00000020
wxTEXT_ATTR_EFFECT_OUTLINE :: Int
wxTEXT_ATTR_EFFECT_OUTLINE = 0x00000040
wxTEXT_ATTR_EFFECT_ENGRAVE :: Int
wxTEXT_ATTR_EFFECT_ENGRAVE = 0x00000080
wxTEXT_ATTR_EFFECT_SUPERSCRIPT :: Int
wxTEXT_ATTR_EFFECT_SUPERSCRIPT = 0x00000100
wxTEXT_ATTR_EFFECT_SUBSCRIPT :: Int
wxTEXT_ATTR_EFFECT_SUBSCRIPT = 0x00000200
{-!
* Line spacing values
-}
-- enum wxTextAttrLineSpacing
wxTEXT_ATTR_LINE_SPACING_NORMAL :: Int
wxTEXT_ATTR_LINE_SPACING_NORMAL = 10
wxTEXT_ATTR_LINE_SPACING_HALF :: Int
wxTEXT_ATTR_LINE_SPACING_HALF = 15
wxTEXT_ATTR_LINE_SPACING_TWICE :: Int
wxTEXT_ATTR_LINE_SPACING_TWICE = 20
--End wxTextCtrl style flags
wxPROCESS_ENTER :: Int
wxPROCESS_ENTER = 1024
{-# DEPRECATED wxPROCESS_ENTER "Use wxTE_PROCESS_ENTER" #-}
wxPASSWORD :: Int
wxPASSWORD = 2048
{-# DEPRECATED wxPASSWORD "Use wxTE_PASSWORD" #-}
wxCB_SIMPLE :: Int
wxCB_SIMPLE = 4
wxCB_SORT :: Int
wxCB_SORT = 8
wxCB_READONLY :: Int
wxCB_READONLY = 16
wxCB_DROPDOWN :: Int
wxCB_DROPDOWN = 32
wxRB_GROUP :: Int
wxRB_GROUP = 4
wxGA_PROGRESSBAR :: Int
wxGA_PROGRESSBAR = 16
wxGA_SMOOTH :: Int
wxGA_SMOOTH = 32
wxSL_NOTIFY_DRAG :: Int
wxSL_NOTIFY_DRAG = 0
wxSL_AUTOTICKS :: Int
wxSL_AUTOTICKS = 16
wxSL_LABELS :: Int
wxSL_LABELS = 32
wxSL_LEFT :: Int
wxSL_LEFT = 64
wxSL_TOP :: Int
wxSL_TOP = 128
wxSL_RIGHT :: Int
wxSL_RIGHT = 256
wxSL_BOTTOM :: Int
wxSL_BOTTOM = 512
wxSL_BOTH :: Int
wxSL_BOTH = 1024
wxSL_SELRANGE :: Int
wxSL_SELRANGE = 2048
-- wxAnyButton specific flags
-- These flags affect label alignment
wxBU_LEFT :: Int
wxBU_LEFT = 64
wxBU_TOP :: Int
wxBU_TOP = 128
wxBU_RIGHT :: Int
wxBU_RIGHT = 256
wxBU_BOTTOM :: Int
wxBU_BOTTOM = 512
wxBU_ALIGN_MASK :: Int
wxBU_ALIGN_MASK = wxBU_LEFT .|. wxBU_TOP .|. wxBU_RIGHT .|. wxBU_BOTTOM
-- These two flags are obsolete
wxBU_AUTODRAW :: Int
wxBU_AUTODRAW = 4
{-# DEPRECATED wxBU_AUTODRAW "Don't use this" #-}
wxBU_NOAUTODRAW :: Int
wxBU_NOAUTODRAW = 0
{-# DEPRECATED wxBU_NOAUTODRAW "Don't use this" #-}
-- by default, the buttons will be created with some (system dependent)
-- minimal size to make them look nicer, giving this style will make them as
-- small as possible
wxBU_EXACTFIT :: Int
wxBU_EXACTFIT = 0x0001
-- this flag can be used to disable using the text label in the button: it is
-- mostly useful when creating buttons showing bitmap and having stock id as
-- without it both the standard label corresponding to the stock id and the
-- bitmap would be shown
wxBU_NOTEXT :: Int
wxBU_NOTEXT = 0x0002
-- End wxAnyButton specific flags
wxLC_VRULES :: Int
wxLC_VRULES = 1
wxLC_HRULES :: Int
wxLC_HRULES = 2
wxLC_ICON :: Int
wxLC_ICON = 4
wxLC_SMALL_ICON :: Int
wxLC_SMALL_ICON = 8
wxLC_LIST :: Int
wxLC_LIST = 16
wxLC_REPORT :: Int
wxLC_REPORT = 32
wxLC_ALIGN_TOP :: Int
wxLC_ALIGN_TOP = 64
wxLC_ALIGN_LEFT :: Int
wxLC_ALIGN_LEFT = 128
wxLC_AUTOARRANGE :: Int
wxLC_AUTOARRANGE = 256
wxLC_VIRTUAL :: Int
wxLC_VIRTUAL = 512
wxLC_EDIT_LABELS :: Int
wxLC_EDIT_LABELS = 1024
wxLC_NO_HEADER :: Int
wxLC_NO_HEADER = 2048
wxLC_NO_SORT_HEADER :: Int
wxLC_NO_SORT_HEADER = 4096
wxLC_SINGLE_SEL :: Int
wxLC_SINGLE_SEL = 8192
wxLC_SORT_ASCENDING :: Int
wxLC_SORT_ASCENDING = 16384
wxLC_SORT_DESCENDING :: Int
wxLC_SORT_DESCENDING = 32768
wxLC_MASK_TYPE :: Int
wxLC_MASK_TYPE = wxLC_ICON .|. wxLC_SMALL_ICON .|. wxLC_LIST .|. wxLC_REPORT
wxLC_MASK_ALIGN :: Int
wxLC_MASK_ALIGN = wxLC_ALIGN_TOP .|. wxLC_ALIGN_LEFT
wxLC_MASK_SORT :: Int
wxLC_MASK_SORT = wxLC_SORT_ASCENDING .|. wxLC_SORT_DESCENDING
wxSP_ARROW_KEYS :: Int
wxSP_ARROW_KEYS = 4096
wxSP_WRAP :: Int
wxSP_WRAP = 8192
wxSP_NOBORDER :: Int
wxSP_NOBORDER = 0
wxSP_NOSASH :: Int
wxSP_NOSASH = 16
wxSP_BORDER :: Int
wxSP_BORDER = 32
wxSP_PERMIT_UNSPLIT :: Int
wxSP_PERMIT_UNSPLIT = 64
wxSP_LIVE_UPDATE :: Int
wxSP_LIVE_UPDATE = 128
wxSP_3DSASH :: Int
wxSP_3DSASH = 256
wxSP_3DBORDER :: Int
wxSP_3DBORDER = 512
wxSP_3D :: Int
wxSP_3D = 768
wxSP_FULLSASH :: Int
wxSP_FULLSASH = 1024
wxFRAME_TOOL_WINDOW :: Int
wxFRAME_TOOL_WINDOW = 4
wxTC_MULTILINE :: Int
wxTC_MULTILINE = 0
wxTC_RIGHTJUSTIFY :: Int
wxTC_RIGHTJUSTIFY = 16
wxTC_FIXEDWIDTH :: Int
wxTC_FIXEDWIDTH = 32
wxTC_OWNERDRAW :: Int
wxTC_OWNERDRAW = 64
wxNB_FIXEDWIDTH :: Int
wxNB_FIXEDWIDTH = 16
wxST_SIZEGRIP :: Int
wxST_SIZEGRIP = 16
wxST_NO_AUTORESIZE :: Int
wxST_NO_AUTORESIZE = 1
wxPD_CAN_ABORT :: Int
wxPD_CAN_ABORT = 1
wxPD_APP_MODAL :: Int
wxPD_APP_MODAL = 2
wxPD_AUTO_HIDE :: Int
wxPD_AUTO_HIDE = 4
wxPD_ELAPSED_TIME :: Int
wxPD_ELAPSED_TIME = 8
wxPD_ESTIMATED_TIME :: Int
wxPD_ESTIMATED_TIME = 16
wxPD_REMAINING_TIME :: Int
wxPD_REMAINING_TIME = 64
wxHW_SCROLLBAR_NEVER :: Int
wxHW_SCROLLBAR_NEVER = 2
wxHW_SCROLLBAR_AUTO :: Int
wxHW_SCROLLBAR_AUTO = 4
wxCAL_SUNDAY_FIRST :: Int
wxCAL_SUNDAY_FIRST = 0
wxCAL_MONDAY_FIRST :: Int
wxCAL_MONDAY_FIRST = 1
wxCAL_SHOW_HOLIDAYS :: Int
wxCAL_SHOW_HOLIDAYS = 2
wxCAL_NO_YEAR_CHANGE :: Int
wxCAL_NO_YEAR_CHANGE = 4
wxCAL_NO_MONTH_CHANGE :: Int
wxCAL_NO_MONTH_CHANGE = 12
wxICON_EXCLAMATION :: Int
wxICON_EXCLAMATION = 256
wxICON_HAND :: Int
wxICON_HAND = 512
wxICON_QUESTION :: Int
wxICON_QUESTION = 1024
wxICON_INFORMATION :: Int
wxICON_INFORMATION = 2048
wxFORWARD :: Int
wxFORWARD = 4096
wxBACKWARD :: Int
wxBACKWARD = 8192
wxRESET :: Int
wxRESET = 16384
wxHELP :: Int
wxHELP = 32768
wxMORE :: Int
wxMORE = 65536
wxSETUP :: Int
wxSETUP = 131072
wxID_LOWEST :: Int
wxID_LOWEST = 4999
wxID_OPEN :: Int
wxID_OPEN = 5000
wxID_CLOSE :: Int
wxID_CLOSE = 5001
wxID_NEW :: Int
wxID_NEW = 5002
wxID_SAVE :: Int
wxID_SAVE = 5003
wxID_SAVEAS :: Int
wxID_SAVEAS = 5004
wxID_REVERT :: Int
wxID_REVERT = 5005
wxID_EXIT :: Int
wxID_EXIT = 5006
wxID_UNDO :: Int
wxID_UNDO = 5007
wxID_REDO :: Int
wxID_REDO = 5008
wxID_HELP :: Int
wxID_HELP = 5009
wxID_PRINT :: Int
wxID_PRINT = 5010
wxID_PRINT_SETUP :: Int
wxID_PRINT_SETUP = 5011
wxID_PREVIEW :: Int
wxID_PREVIEW = 5012
wxID_ABOUT :: Int
wxID_ABOUT = 5013
wxID_HELP_CONTENTS :: Int
wxID_HELP_CONTENTS = 5014
wxID_HELP_COMMANDS :: Int
wxID_HELP_COMMANDS = 5015
wxID_HELP_PROCEDURES :: Int
wxID_HELP_PROCEDURES = 5016
wxID_HELP_CONTEXT :: Int
wxID_HELP_CONTEXT = 5017
wxPG_DEFAULT_STYLE :: Int
wxPG_DEFAULT_STYLE = 0
wxID_CLOSE_ALL :: Int
wxID_CLOSE_ALL = 5018
wxID_PREFERENCES :: Int
wxID_PREFERENCES = 5019
wxID_EDIT :: Int
wxID_EDIT = 5030
wxID_CUT :: Int
wxID_CUT = 5031
wxID_COPY :: Int
wxID_COPY = 5032
wxID_PASTE :: Int
wxID_PASTE = 5033
wxID_CLEAR :: Int
wxID_CLEAR = 5034
wxID_FIND :: Int
wxID_FIND = 5035
wxID_DUPLICATE :: Int
wxID_DUPLICATE = 5036
wxID_SELECTALL :: Int
wxID_SELECTALL = 5037
wxID_DELETE :: Int
wxID_DELETE = 5038
wxID_REPLACE :: Int
wxID_REPLACE = 5039
wxID_REPLACE_ALL :: Int
wxID_REPLACE_ALL = 5040
wxID_PROPERTIES :: Int
wxID_PROPERTIES = 5041
wxID_VIEW_DETAILS :: Int
wxID_VIEW_DETAILS = 5042
wxID_VIEW_LARGEICONS :: Int
wxID_VIEW_LARGEICONS = 5043
wxID_VIEW_SMALLICONS :: Int
wxID_VIEW_SMALLICONS = 5044
wxID_VIEW_LIST :: Int
wxID_VIEW_LIST = 5045
wxID_VIEW_SORTDATE :: Int
wxID_VIEW_SORTDATE = 5046
wxID_VIEW_SORTNAME :: Int
wxID_VIEW_SORTNAME = 5047
wxID_VIEW_SORTSIZE :: Int
wxID_VIEW_SORTSIZE = 5048
wxID_VIEW_SORTTYPE :: Int
wxID_VIEW_SORTTYPE = 5049
wxID_FILE1 :: Int
wxID_FILE1 = 5050
wxID_FILE2 :: Int
wxID_FILE2 = 5051
wxID_FILE3 :: Int
wxID_FILE3 = 5052
wxID_FILE4 :: Int
wxID_FILE4 = 5053
wxID_FILE5 :: Int
wxID_FILE5 = 5054
wxID_FILE6 :: Int
wxID_FILE6 = 5055
wxID_FILE7 :: Int
wxID_FILE7 = 5056
wxID_FILE8 :: Int
wxID_FILE8 = 5057
wxID_FILE9 :: Int
wxID_FILE9 = 5058
wxID_OK :: Int
wxID_OK = 5100
wxID_CANCEL :: Int
wxID_CANCEL = 5101
wxID_APPLY :: Int
wxID_APPLY = 5102
wxID_YES :: Int
wxID_YES = 5103
wxID_NO :: Int
wxID_NO = 5104
wxID_STATIC :: Int
wxID_STATIC = 5105
wxID_FORWARD :: Int
wxID_FORWARD = 5106
wxID_BACKWARD :: Int
wxID_BACKWARD = 5107
wxID_DEFAULT :: Int
wxID_DEFAULT = 5108
wxID_MORE :: Int
wxID_MORE = 5109
wxID_SETUP :: Int
wxID_SETUP = 5110
wxID_RESET :: Int
wxID_RESET = 5111
wxID_FILEDLGG :: Int
wxID_FILEDLGG = 5900
wxID_HIGHEST :: Int
wxID_HIGHEST = 5999
wxSIZE_AUTO_WIDTH :: Int
wxSIZE_AUTO_WIDTH = 1
wxSIZE_AUTO_HEIGHT :: Int
wxSIZE_AUTO_HEIGHT = 2
wxSIZE_USE_EXISTING :: Int
wxSIZE_USE_EXISTING = 0
wxSIZE_ALLOW_MINUS_ONE :: Int
wxSIZE_ALLOW_MINUS_ONE = 4
wxSIZE_NO_ADJUSTMENTS :: Int
wxSIZE_NO_ADJUSTMENTS = 8
wxSOLID :: Int
wxSOLID = 100
{-# DEPRECATED wxSOLID "Don't use this" #-}
wxDOT :: Int
wxDOT = 101
{-# DEPRECATED wxDOT "Don't use this" #-}
wxLONG_DASH :: Int
wxLONG_DASH = 102
{-# DEPRECATED wxLONG_DASH "Don't use this" #-}
wxSHORT_DASH :: Int
wxSHORT_DASH = 103
{-# DEPRECATED wxSHORT_DASH "Don't use this" #-}
wxDOT_DASH :: Int
wxDOT_DASH = 104
{-# DEPRECATED wxDOT_DASH "Don't use this" #-}
wxUSER_DASH :: Int
wxUSER_DASH = 105
{-# DEPRECATED wxUSER_DASH "Don't use this" #-}
wxTRANSPARENT :: Int
wxTRANSPARENT = 106
{-# DEPRECATED wxTRANSPARENT "Don't use this" #-}
wxSTIPPLE_MASK_OPAQUE :: Int
wxSTIPPLE_MASK_OPAQUE = 107
{-# DEPRECATED wxSTIPPLE_MASK_OPAQUE "Don't use this" #-}
wxSTIPPLE_MASK :: Int
wxSTIPPLE_MASK = 108
{-# DEPRECATED wxSTIPPLE_MASK "Don't use this" #-}
wxSTIPPLE :: Int
wxSTIPPLE = 110
{-# DEPRECATED wxSTIPPLE "Don't use this" #-}
wxBDIAGONAL_HATCH :: Int
wxBDIAGONAL_HATCH = 111
{-# DEPRECATED wxBDIAGONAL_HATCH "Don't use this" #-}
wxCROSSDIAG_HATCH :: Int
wxCROSSDIAG_HATCH = 112
{-# DEPRECATED wxCROSSDIAG_HATCH "Don't use this" #-}
wxFDIAGONAL_HATCH :: Int
wxFDIAGONAL_HATCH = 113
{-# DEPRECATED wxFDIAGONAL_HATCH "Don't use this" #-}
wxCROSS_HATCH :: Int
wxCROSS_HATCH = 114
{-# DEPRECATED wxCROSS_HATCH "Don't use this" #-}
wxHORIZONTAL_HATCH :: Int
wxHORIZONTAL_HATCH = 115
{-# DEPRECATED wxHORIZONTAL_HATCH "Don't use this" #-}
wxVERTICAL_HATCH :: Int
wxVERTICAL_HATCH = 116
{-# DEPRECATED wxVERTICAL_HATCH "Don't use this" #-}
wxCLEAR :: Int
wxCLEAR = 0
wxXOR :: Int
wxXOR = 1
wxINVERT :: Int
wxINVERT = 2
wxOR_REVERSE :: Int
wxOR_REVERSE = 3
wxAND_REVERSE :: Int
wxAND_REVERSE = 4
wxCOPY :: Int
wxCOPY = 5
wxAND :: Int
wxAND = 6
wxAND_INVERT :: Int
wxAND_INVERT = 7
wxNO_OP :: Int
wxNO_OP = 8
wxNOR :: Int
wxNOR = 9
wxEQUIV :: Int
wxEQUIV = 10
wxSRC_INVERT :: Int
wxSRC_INVERT = 11
wxOR_INVERT :: Int
wxOR_INVERT = 12
wxNAND :: Int
wxNAND = 13
wxOR :: Int
wxOR = 14
wxSET :: Int
wxSET = 15
wxFLOOD_SURFACE :: Int
wxFLOOD_SURFACE = 1
wxFLOOD_BORDER :: Int
wxFLOOD_BORDER = 2
wxODDEVEN_RULE :: Int
wxODDEVEN_RULE = 1
wxWINDING_RULE :: Int
wxWINDING_RULE = 2
wxTOOL_TOP :: Int
wxTOOL_TOP = 1
wxTOOL_BOTTOM :: Int
wxTOOL_BOTTOM = 2
wxTOOL_LEFT :: Int
wxTOOL_LEFT = 3
wxTOOL_RIGHT :: Int
wxTOOL_RIGHT = 4
-- enum wxDataFormatId
-- the values of the format constants should be the same as corresponding
-- CF_XXX constants in Windows API
wxDF_INVALID :: Int
wxDF_INVALID = 0
wxDF_TEXT :: Int
wxDF_TEXT = 1 -- CF_TEXT
wxDF_BITMAP :: Int
wxDF_BITMAP = 2 -- CF_BITMAP
wxDF_METAFILE :: Int
wxDF_METAFILE = 3 -- CF_METAFILEPICT
wxDF_SYLK :: Int
wxDF_SYLK = 4
wxDF_DIF :: Int
wxDF_DIF = 5
wxDF_TIFF :: Int
wxDF_TIFF = 6
wxDF_OEMTEXT :: Int
wxDF_OEMTEXT = 7 -- CF_OEMTEXT
wxDF_DIB :: Int
wxDF_DIB = 8 -- CF_DIB
wxDF_PALETTE :: Int
wxDF_PALETTE = 9
wxDF_PENDATA :: Int
wxDF_PENDATA = 10
wxDF_RIFF :: Int
wxDF_RIFF = 11
wxDF_WAVE :: Int
wxDF_WAVE = 12
wxDF_UNICODETEXT :: Int
wxDF_UNICODETEXT = 13
wxDF_ENHMETAFILE :: Int
wxDF_ENHMETAFILE = 14
wxDF_FILENAME :: Int
wxDF_FILENAME = 15 -- CF_HDROP
wxDF_LOCALE :: Int
wxDF_LOCALE = 16
wxDF_PRIVATE :: Int
wxDF_PRIVATE = 20
wxDF_HTML :: Int
wxDF_HTML = 30 -- Note: does not correspond to CF_ constant
wxDF_MAX :: Int
wxDF_MAX = 31
-- End enum wxDataFormatId
wxMM_TEXT :: Int
wxMM_TEXT = 1
wxMM_LOMETRIC :: Int
wxMM_LOMETRIC = 2
wxMM_HIMETRIC :: Int
wxMM_HIMETRIC = 3
wxMM_LOENGLISH :: Int
wxMM_LOENGLISH = 4
wxMM_HIENGLISH :: Int
wxMM_HIENGLISH = 5
wxMM_TWIPS :: Int
wxMM_TWIPS = 6
wxMM_ISOTROPIC :: Int
wxMM_ISOTROPIC = 7
wxMM_ANISOTROPIC :: Int
wxMM_ANISOTROPIC = 8
wxMM_POINTS :: Int
wxMM_POINTS = 9
wxMM_METRIC :: Int
wxMM_METRIC = 10
wxPAPER_NONE :: Int
wxPAPER_NONE = 0
wxPAPER_LETTER :: Int
wxPAPER_LETTER = 1
wxPAPER_LEGAL :: Int
wxPAPER_LEGAL = 2
wxPAPER_A4 :: Int
wxPAPER_A4 = 3
wxPAPER_CSHEET :: Int
wxPAPER_CSHEET = 4
wxPAPER_DSHEET :: Int
wxPAPER_DSHEET = 5
wxPAPER_ESHEET :: Int
wxPAPER_ESHEET = 6
wxPAPER_LETTERSMALL :: Int
wxPAPER_LETTERSMALL = 7
wxPAPER_TABLOID :: Int
wxPAPER_TABLOID = 8
wxPAPER_LEDGER :: Int
wxPAPER_LEDGER = 9
wxPAPER_STATEMENT :: Int
wxPAPER_STATEMENT = 10
wxPAPER_EXECUTIVE :: Int
wxPAPER_EXECUTIVE = 11
wxPAPER_A3 :: Int
wxPAPER_A3 = 12
wxPAPER_A4SMALL :: Int
wxPAPER_A4SMALL = 13
wxPAPER_A5 :: Int
wxPAPER_A5 = 14
wxPAPER_B4 :: Int
wxPAPER_B4 = 15
wxPAPER_B5 :: Int
wxPAPER_B5 = 16
wxPAPER_FOLIO :: Int
wxPAPER_FOLIO = 17
wxPAPER_QUARTO :: Int
wxPAPER_QUARTO = 18
wxPAPER_10X14 :: Int
wxPAPER_10X14 = 19
wxPAPER_11X17 :: Int
wxPAPER_11X17 = 20
wxPAPER_NOTE :: Int
wxPAPER_NOTE = 21
wxPAPER_ENV_9 :: Int
wxPAPER_ENV_9 = 22
wxPAPER_ENV_10 :: Int
wxPAPER_ENV_10 = 23
wxPAPER_ENV_11 :: Int
wxPAPER_ENV_11 = 24
wxPAPER_ENV_12 :: Int
wxPAPER_ENV_12 = 25
wxPAPER_ENV_14 :: Int
wxPAPER_ENV_14 = 26
wxPAPER_ENV_DL :: Int
wxPAPER_ENV_DL = 27
wxPAPER_ENV_C5 :: Int
wxPAPER_ENV_C5 = 28
wxPAPER_ENV_C3 :: Int
wxPAPER_ENV_C3 = 29
wxPAPER_ENV_C4 :: Int
wxPAPER_ENV_C4 = 30
wxPAPER_ENV_C6 :: Int
wxPAPER_ENV_C6 = 31
wxPAPER_ENV_C65 :: Int
wxPAPER_ENV_C65 = 32
wxPAPER_ENV_B4 :: Int
wxPAPER_ENV_B4 = 33
wxPAPER_ENV_B5 :: Int
wxPAPER_ENV_B5 = 34
wxPAPER_ENV_B6 :: Int
wxPAPER_ENV_B6 = 35
wxPAPER_ENV_ITALY :: Int
wxPAPER_ENV_ITALY = 36
wxPAPER_ENV_MONARCH :: Int
wxPAPER_ENV_MONARCH = 37
wxPAPER_ENV_PERSONAL :: Int
wxPAPER_ENV_PERSONAL = 38
wxPAPER_FANFOLD_US :: Int
wxPAPER_FANFOLD_US = 39
wxPAPER_FANFOLD_STD_GERMAN :: Int
wxPAPER_FANFOLD_STD_GERMAN = 40
wxPAPER_FANFOLD_LGL_GERMAN :: Int
wxPAPER_FANFOLD_LGL_GERMAN = 41
wxPAPER_ISO_B4 :: Int
wxPAPER_ISO_B4 = 42
wxPAPER_JAPANESE_POSTCARD :: Int
wxPAPER_JAPANESE_POSTCARD = 43
wxPAPER_9X11 :: Int
wxPAPER_9X11 = 44
wxPAPER_10X11 :: Int
wxPAPER_10X11 = 45
wxPAPER_15X11 :: Int
wxPAPER_15X11 = 46
wxPAPER_ENV_INVITE :: Int
wxPAPER_ENV_INVITE = 47
wxPAPER_LETTER_EXTRA :: Int
wxPAPER_LETTER_EXTRA = 48
wxPAPER_LEGAL_EXTRA :: Int
wxPAPER_LEGAL_EXTRA = 49
wxPAPER_TABLOID_EXTRA :: Int
wxPAPER_TABLOID_EXTRA = 50
wxPAPER_A4_EXTRA :: Int
wxPAPER_A4_EXTRA = 51
wxPAPER_LETTER_TRANSVERSE :: Int
wxPAPER_LETTER_TRANSVERSE = 52
wxPAPER_A4_TRANSVERSE :: Int
wxPAPER_A4_TRANSVERSE = 53
wxPAPER_LETTER_EXTRA_TRANSVERSE :: Int
wxPAPER_LETTER_EXTRA_TRANSVERSE = 54
wxPAPER_A_PLUS :: Int
wxPAPER_A_PLUS = 55
wxPAPER_B_PLUS :: Int
wxPAPER_B_PLUS = 56
wxPAPER_LETTER_PLUS :: Int
wxPAPER_LETTER_PLUS = 57
wxPAPER_A4_PLUS :: Int
wxPAPER_A4_PLUS = 58
wxPAPER_A5_TRANSVERSE :: Int
wxPAPER_A5_TRANSVERSE = 59
wxPAPER_B5_TRANSVERSE :: Int
wxPAPER_B5_TRANSVERSE = 60
wxPAPER_A3_EXTRA :: Int
wxPAPER_A3_EXTRA = 61
wxPAPER_A5_EXTRA :: Int
wxPAPER_A5_EXTRA = 62
wxPAPER_B5_EXTRA :: Int
wxPAPER_B5_EXTRA = 63
wxPAPER_A2 :: Int
wxPAPER_A2 = 64
wxPAPER_A3_TRANSVERSE :: Int
wxPAPER_A3_TRANSVERSE = 65
wxPAPER_A3_EXTRA_TRANSVERSE :: Int
wxPAPER_A3_EXTRA_TRANSVERSE = 66
wxPORTRAIT :: Int
wxPORTRAIT = 1
wxLANDSCAPE :: Int
wxLANDSCAPE = 2
wxDUPLEX_SIMPLEX :: Int
wxDUPLEX_SIMPLEX = 0
wxDUPLEX_HORIZONTAL :: Int
wxDUPLEX_HORIZONTAL = 1
wxDUPLEX_VERTICAL :: Int
wxDUPLEX_VERTICAL = 2
wxPRINT_MODE_NONE :: Int
wxPRINT_MODE_NONE = 0
wxPRINT_MODE_PREVIEW :: Int
wxPRINT_MODE_PREVIEW = 1
wxPRINT_MODE_FILE :: Int
wxPRINT_MODE_FILE = 2
wxPRINT_MODE_PRINTER :: Int
wxPRINT_MODE_PRINTER = 3
wxFULLSCREEN_NOMENUBAR :: Int
wxFULLSCREEN_NOMENUBAR = 1
wxFULLSCREEN_NOTOOLBAR :: Int
wxFULLSCREEN_NOTOOLBAR = 2
wxFULLSCREEN_NOSTATUSBAR :: Int
wxFULLSCREEN_NOSTATUSBAR = 4
wxFULLSCREEN_NOBORDER :: Int
wxFULLSCREEN_NOBORDER = 8
wxFULLSCREEN_NOCAPTION :: Int
wxFULLSCREEN_NOCAPTION = 16
wxLAYOUT_DEFAULT_MARGIN :: Int
wxLAYOUT_DEFAULT_MARGIN = 0
wxEDGE_LEFT :: Int
wxEDGE_LEFT = 0
wxEDGE_TOP :: Int
wxEDGE_TOP = 1
wxEDGE_RIGHT :: Int
wxEDGE_RIGHT = 2
wxEDGE_BOTTOM :: Int
wxEDGE_BOTTOM = 3
wxEDGE_WIDTH :: Int
wxEDGE_WIDTH = 4
wxEDGE_HEIGHT :: Int
wxEDGE_HEIGHT = 5
wxEDGE_CENTER :: Int
wxEDGE_CENTER = 6
wxEDGE_CENTREX :: Int
wxEDGE_CENTREX = 7
wxEDGE_CENTREY :: Int
wxEDGE_CENTREY = 8
wxRELATIONSHIP_UNCONSTRAINED :: Int
wxRELATIONSHIP_UNCONSTRAINED = 0
wxRELATIONSHIP_ASIS :: Int
wxRELATIONSHIP_ASIS = 1
wxRELATIONSHIP_PERCENTOF :: Int
wxRELATIONSHIP_PERCENTOF = 2
wxRELATIONSHIP_ABOVE :: Int
wxRELATIONSHIP_ABOVE = 3
wxRELATIONSHIP_BELOW :: Int
wxRELATIONSHIP_BELOW = 4
wxRELATIONSHIP_LEFTOF :: Int
wxRELATIONSHIP_LEFTOF = 5
wxRELATIONSHIP_RIGHTOF :: Int
wxRELATIONSHIP_RIGHTOF = 6
wxRELATIONSHIP_SAMEAS :: Int
wxRELATIONSHIP_SAMEAS = 7
wxRELATIONSHIP_ABSOLUTE :: Int
wxRELATIONSHIP_ABSOLUTE = 8
wxFONTENCODING_SYSTEM :: Int
wxFONTENCODING_SYSTEM = (-1)
wxFONTENCODING_DEFAULT :: Int
wxFONTENCODING_DEFAULT = 0
wxFONTENCODING_ISO8859_1 :: Int
wxFONTENCODING_ISO8859_1 = 1
wxFONTENCODING_ISO8859_2 :: Int
wxFONTENCODING_ISO8859_2 = 2
wxFONTENCODING_ISO8859_3 :: Int
wxFONTENCODING_ISO8859_3 = 3
wxFONTENCODING_ISO8859_4 :: Int
wxFONTENCODING_ISO8859_4 = 4
wxFONTENCODING_ISO8859_5 :: Int
wxFONTENCODING_ISO8859_5 = 5
wxFONTENCODING_ISO8859_6 :: Int
wxFONTENCODING_ISO8859_6 = 6
wxFONTENCODING_ISO8859_7 :: Int
wxFONTENCODING_ISO8859_7 = 7
wxFONTENCODING_ISO8859_8 :: Int
wxFONTENCODING_ISO8859_8 = 8
wxFONTENCODING_ISO8859_9 :: Int
wxFONTENCODING_ISO8859_9 = 9
wxFONTENCODING_ISO8859_10 :: Int
wxFONTENCODING_ISO8859_10 = 10
wxFONTENCODING_ISO8859_11 :: Int
wxFONTENCODING_ISO8859_11 = 11
wxFONTENCODING_ISO8859_12 :: Int
wxFONTENCODING_ISO8859_12 = 12
wxFONTENCODING_ISO8859_13 :: Int
wxFONTENCODING_ISO8859_13 = 13
wxFONTENCODING_ISO8859_14 :: Int
wxFONTENCODING_ISO8859_14 = 14
wxFONTENCODING_ISO8859_15 :: Int
wxFONTENCODING_ISO8859_15 = 15
wxFONTENCODING_ISO8859_MAX :: Int
wxFONTENCODING_ISO8859_MAX = 16
wxFONTENCODING_KOI8 :: Int
wxFONTENCODING_KOI8 = 17
wxFONTENCODING_ALTERNATIVE :: Int
wxFONTENCODING_ALTERNATIVE = 18
wxFONTENCODING_BULGARIAN :: Int
wxFONTENCODING_BULGARIAN = 19
wxFONTENCODING_CP437 :: Int
wxFONTENCODING_CP437 = 20
wxFONTENCODING_CP850 :: Int
wxFONTENCODING_CP850 = 21
wxFONTENCODING_CP852 :: Int
wxFONTENCODING_CP852 = 22
wxFONTENCODING_CP855 :: Int
wxFONTENCODING_CP855 = 23
wxFONTENCODING_CP866 :: Int
wxFONTENCODING_CP866 = 24
wxFONTENCODING_CP874 :: Int
wxFONTENCODING_CP874 = 25
wxFONTENCODING_CP1250 :: Int
wxFONTENCODING_CP1250 = 26
wxFONTENCODING_CP1251 :: Int
wxFONTENCODING_CP1251 = 27
wxFONTENCODING_CP1252 :: Int
wxFONTENCODING_CP1252 = 28
wxFONTENCODING_CP1253 :: Int
wxFONTENCODING_CP1253 = 29
wxFONTENCODING_CP1254 :: Int
wxFONTENCODING_CP1254 = 30
wxFONTENCODING_CP1255 :: Int
wxFONTENCODING_CP1255 = 31
wxFONTENCODING_CP1256 :: Int
wxFONTENCODING_CP1256 = 32
wxFONTENCODING_CP1257 :: Int
wxFONTENCODING_CP1257 = 33
wxFONTENCODING_CP12_MAX :: Int
wxFONTENCODING_CP12_MAX = 34
wxFONTENCODING_UNICODE :: Int
wxFONTENCODING_UNICODE = 35
wxFONTENCODING_MAX :: Int
wxFONTENCODING_MAX = 36
wxGRIDTABLE_REQUEST_VIEW_GET_VALUES :: Int
wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = 2000
wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES :: Int
wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES = 2001
wxGRIDTABLE_NOTIFY_ROWS_INSERTED :: Int
wxGRIDTABLE_NOTIFY_ROWS_INSERTED = 2002
wxGRIDTABLE_NOTIFY_ROWS_APPENDED :: Int
wxGRIDTABLE_NOTIFY_ROWS_APPENDED = 2003
wxGRIDTABLE_NOTIFY_ROWS_DELETED :: Int
wxGRIDTABLE_NOTIFY_ROWS_DELETED = 2004
wxGRIDTABLE_NOTIFY_COLS_INSERTED :: Int
wxGRIDTABLE_NOTIFY_COLS_INSERTED = 2005
wxGRIDTABLE_NOTIFY_COLS_APPENDED :: Int
wxGRIDTABLE_NOTIFY_COLS_APPENDED = 2006
wxGRIDTABLE_NOTIFY_COLS_DELETED :: Int
wxGRIDTABLE_NOTIFY_COLS_DELETED = 2007
wxGridSelectCells :: Int
wxGridSelectCells = 0
wxGridSelectRows :: Int
wxGridSelectRows = 1
wxGridSelectColumns :: Int
wxGridSelectColumns = 2
wxFILTER_NONE :: Int
wxFILTER_NONE = 0
wxFILTER_ASCII :: Int
wxFILTER_ASCII = 1
wxFILTER_ALPHA :: Int
wxFILTER_ALPHA = 2
wxFILTER_ALPHANUMERIC :: Int
wxFILTER_ALPHANUMERIC = 4
wxFILTER_NUMERIC :: Int
wxFILTER_NUMERIC = 8
wxFILTER_INCLUDE_LIST :: Int
wxFILTER_INCLUDE_LIST = 16
wxFILTER_EXCLUDE_LIST :: Int
wxFILTER_EXCLUDE_LIST = 32
wxFILTER_UPPER_CASE :: Int
wxFILTER_UPPER_CASE = 64
wxFILTER_LOWER_CASE :: Int
wxFILTER_LOWER_CASE = 128
wxBITMAP_TYPE_INVALID :: Int
wxBITMAP_TYPE_INVALID = 0
wxBITMAP_TYPE_BMP :: Int
wxBITMAP_TYPE_BMP = 1
wxBITMAP_TYPE_BMP_RESOURCE :: Int
wxBITMAP_TYPE_BMP_RESOURCE = 2
wxBITMAP_TYPE_RESOURCE :: Int
wxBITMAP_TYPE_RESOURCE = 2
wxBITMAP_TYPE_ICO :: Int
wxBITMAP_TYPE_ICO = 3
wxBITMAP_TYPE_ICO_RESOURCE :: Int
wxBITMAP_TYPE_ICO_RESOURCE = 4
wxBITMAP_TYPE_CUR :: Int
wxBITMAP_TYPE_CUR = 5
wxBITMAP_TYPE_CUR_RESOURCE :: Int
wxBITMAP_TYPE_CUR_RESOURCE = 6
wxBITMAP_TYPE_XBM :: Int
wxBITMAP_TYPE_XBM = 7
wxBITMAP_TYPE_XBM_DATA :: Int
wxBITMAP_TYPE_XBM_DATA = 8
wxBITMAP_TYPE_XPM :: Int
wxBITMAP_TYPE_XPM = 9
wxBITMAP_TYPE_XPM_DATA :: Int
wxBITMAP_TYPE_XPM_DATA = 10
wxBITMAP_TYPE_TIF :: Int
wxBITMAP_TYPE_TIF = 11
wxBITMAP_TYPE_TIF_RESOURCE :: Int
wxBITMAP_TYPE_TIF_RESOURCE = 12
wxBITMAP_TYPE_GIF :: Int
wxBITMAP_TYPE_GIF = 13
wxBITMAP_TYPE_GIF_RESOURCE :: Int
wxBITMAP_TYPE_GIF_RESOURCE = 14
wxBITMAP_TYPE_PNG :: Int
wxBITMAP_TYPE_PNG = 15
wxBITMAP_TYPE_PNG_RESOURCE :: Int
wxBITMAP_TYPE_PNG_RESOURCE = 16
wxBITMAP_TYPE_JPEG :: Int
wxBITMAP_TYPE_JPEG = 17
wxBITMAP_TYPE_JPEG_RESOURCE :: Int
wxBITMAP_TYPE_JPEG_RESOURCE = 18
wxBITMAP_TYPE_PNM :: Int
wxBITMAP_TYPE_PNM = 19
wxBITMAP_TYPE_PNM_RESOURCE :: Int
wxBITMAP_TYPE_PNM_RESOURCE = 20
wxBITMAP_TYPE_PCX :: Int
wxBITMAP_TYPE_PCX = 21
wxBITMAP_TYPE_PCX_RESOURCE :: Int
wxBITMAP_TYPE_PCX_RESOURCE = 22
wxBITMAP_TYPE_PICT :: Int
wxBITMAP_TYPE_PICT = 23
wxBITMAP_TYPE_PICT_RESOURCE :: Int
wxBITMAP_TYPE_PICT_RESOURCE = 24
wxBITMAP_TYPE_ICON :: Int
wxBITMAP_TYPE_ICON = 25
wxBITMAP_TYPE_ICON_RESOURCE :: Int
wxBITMAP_TYPE_ICON_RESOURCE = 26
wxBITMAP_TYPE_MACCURSOR :: Int
wxBITMAP_TYPE_MACCURSOR = 27
wxBITMAP_TYPE_MACCURSOR_RESOURCE :: Int
wxBITMAP_TYPE_MACCURSOR_RESOURCE = 28
wxBITMAP_TYPE_ANY :: Int
wxBITMAP_TYPE_ANY = 50
wxCURSOR_NONE :: Int
wxCURSOR_NONE = 0
wxCURSOR_ARROW :: Int
wxCURSOR_ARROW = 1
wxCURSOR_RIGHT_ARROW :: Int
wxCURSOR_RIGHT_ARROW = 2
wxCURSOR_BULLSEYE :: Int
wxCURSOR_BULLSEYE = 3
wxCURSOR_CHAR :: Int
wxCURSOR_CHAR = 4
wxCURSOR_CROSS :: Int
wxCURSOR_CROSS = 5
wxCURSOR_HAND :: Int
wxCURSOR_HAND = 6
wxCURSOR_IBEAM :: Int
wxCURSOR_IBEAM = 7
wxCURSOR_LEFT_BUTTON :: Int
wxCURSOR_LEFT_BUTTON = 8
wxCURSOR_MAGNIFIER :: Int
wxCURSOR_MAGNIFIER = 9
wxCURSOR_MIDDLE_BUTTON :: Int
wxCURSOR_MIDDLE_BUTTON = 10
wxCURSOR_NO_ENTRY :: Int
wxCURSOR_NO_ENTRY = 11
wxCURSOR_PAINT_BRUSH :: Int
wxCURSOR_PAINT_BRUSH = 12
wxCURSOR_PENCIL :: Int
wxCURSOR_PENCIL = 13
wxCURSOR_POINT_LEFT :: Int
wxCURSOR_POINT_LEFT = 14
wxCURSOR_POINT_RIGHT :: Int
wxCURSOR_POINT_RIGHT = 15
wxCURSOR_QUESTION_ARROW :: Int
wxCURSOR_QUESTION_ARROW = 16
wxCURSOR_RIGHT_BUTTON :: Int
wxCURSOR_RIGHT_BUTTON = 17
wxCURSOR_SIZENESW :: Int
wxCURSOR_SIZENESW = 18
wxCURSOR_SIZENS :: Int
wxCURSOR_SIZENS = 19
wxCURSOR_SIZENWSE :: Int
wxCURSOR_SIZENWSE = 20
wxCURSOR_SIZEWE :: Int
wxCURSOR_SIZEWE = 21
wxCURSOR_SIZING :: Int
wxCURSOR_SIZING = 22
wxCURSOR_SPRAYCAN :: Int
wxCURSOR_SPRAYCAN = 23
wxCURSOR_WAIT :: Int
wxCURSOR_WAIT = 24
wxCURSOR_WATCH :: Int
wxCURSOR_WATCH = 25
wxCURSOR_BLANK :: Int
wxCURSOR_BLANK = 26
wxOPEN :: Int
wxOPEN = 1
wxSAVE :: Int
wxSAVE = 2
wxOVERWRITE_PROMPT :: Int
wxOVERWRITE_PROMPT = 4
wxHIDE_READONLY :: Int
wxHIDE_READONLY = 8
wxFILE_MUST_EXIST :: Int
wxFILE_MUST_EXIST = 16
wxMULTIPLE :: Int
wxMULTIPLE = 32
wxCHANGE_DIR :: Int
wxCHANGE_DIR = 64
wxDRAG_ERROR :: Int
wxDRAG_ERROR = 0
wxDRAG_NONE :: Int
wxDRAG_NONE = 1
wxDRAG_COPY :: Int
wxDRAG_COPY = 2
wxDRAG_MOVE :: Int
wxDRAG_MOVE = 3
wxDRAG_LINK :: Int
wxDRAG_LINK = 4
wxDRAG_CANCEL :: Int
wxDRAG_CANCEL = 5
wxSPLIT_HORIZONTAL :: Int
wxSPLIT_HORIZONTAL = 1
wxSPLIT_VERTICAL :: Int
wxSPLIT_VERTICAL = 2
wxLIST_FORMAT_LEFT :: Int
wxLIST_FORMAT_LEFT = 0
wxLIST_FORMAT_RIGHT :: Int
wxLIST_FORMAT_RIGHT = 1
wxLIST_FORMAT_CENTRE :: Int
wxLIST_FORMAT_CENTRE = 2
wxLIST_FORMAT_CENTER :: Int
wxLIST_FORMAT_CENTER = 2
wxLIST_STATE_DONTCARE :: Int
wxLIST_STATE_DONTCARE = 0
wxLIST_STATE_DROPHILITED :: Int
wxLIST_STATE_DROPHILITED = 1
wxLIST_STATE_FOCUSED :: Int
wxLIST_STATE_FOCUSED = 2
wxLIST_STATE_SELECTED :: Int
wxLIST_STATE_SELECTED = 4
wxLIST_STATE_CUT :: Int
wxLIST_STATE_CUT = 8
wxLIST_MASK_STATE :: Int
wxLIST_MASK_STATE = 1
wxLIST_MASK_TEXT :: Int
wxLIST_MASK_TEXT = 2
wxLIST_MASK_IMAGE :: Int
wxLIST_MASK_IMAGE = 4
wxLIST_MASK_DATA :: Int
wxLIST_MASK_DATA = 8
wxLIST_MASK_WIDTH :: Int
wxLIST_MASK_WIDTH = 16
wxLIST_MASK_FORMAT :: Int
wxLIST_MASK_FORMAT = 32
wxLIST_NEXT_ABOVE :: Int
wxLIST_NEXT_ABOVE = 0
wxLIST_NEXT_ALL :: Int
wxLIST_NEXT_ALL = 1
wxLIST_NEXT_BELOW :: Int
wxLIST_NEXT_BELOW = 2
wxLIST_NEXT_LEFT :: Int
wxLIST_NEXT_LEFT = 3
wxLIST_NEXT_RIGHT :: Int
wxLIST_NEXT_RIGHT = 4
wxRA_SPECIFY_COLS :: Int
wxRA_SPECIFY_COLS = 4
wxRA_SPECIFY_ROWS :: Int
wxRA_SPECIFY_ROWS = 8
wxTREE_HITTEST_ABOVE :: Int
wxTREE_HITTEST_ABOVE = 1
wxTREE_HITTEST_BELOW :: Int
wxTREE_HITTEST_BELOW = 2
wxTREE_HITTEST_NOWHERE :: Int
wxTREE_HITTEST_NOWHERE = 4
wxTREE_HITTEST_ONITEMBUTTON :: Int
wxTREE_HITTEST_ONITEMBUTTON = 8
wxTREE_HITTEST_ONITEMICON :: Int
wxTREE_HITTEST_ONITEMICON = 16
wxTREE_HITTEST_ONITEMINDENT :: Int
wxTREE_HITTEST_ONITEMINDENT = 32
wxTREE_HITTEST_ONITEMLABEL :: Int
wxTREE_HITTEST_ONITEMLABEL = 64
wxTREE_HITTEST_ONITEMRIGHT :: Int
wxTREE_HITTEST_ONITEMRIGHT = 128
wxTREE_HITTEST_ONITEMSTATEICON :: Int
wxTREE_HITTEST_ONITEMSTATEICON = 256
wxTREE_HITTEST_TOLEFT :: Int
wxTREE_HITTEST_TOLEFT = 512
wxTREE_HITTEST_TORIGHT :: Int
wxTREE_HITTEST_TORIGHT = 1024
wxTREE_HITTEST_ONITEMUPPERPART :: Int
wxTREE_HITTEST_ONITEMUPPERPART = 2048
wxTREE_HITTEST_ONITEMLOWERPART :: Int
wxTREE_HITTEST_ONITEMLOWERPART = 4096
wxTREE_HITTEST_ONITEM :: Int
wxTREE_HITTEST_ONITEM = 80
wxDEFAULT :: Int
wxDEFAULT = 70
{-# DEPRECATED wxDEFAULT "Don't use this" #-}
wxDECORATIVE :: Int
wxDECORATIVE = 71
{-# DEPRECATED wxDECORATIVE "Don't use this" #-}
wxROMAN :: Int
wxROMAN = 72
{-# DEPRECATED wxROMAN "Don't use this" #-}
wxSCRIPT :: Int
wxSCRIPT = 73
{-# DEPRECATED wxSCRIPT "Don't use this" #-}
wxSWISS :: Int
wxSWISS = 74
{-# DEPRECATED wxSWISS "Don't use this" #-}
wxMODERN :: Int
wxMODERN = 75
{-# DEPRECATED wxMODERN "Don't use this" #-}
wxTELETYPE :: Int
wxTELETYPE = 76
{-# DEPRECATED wxTELETYPE "Don't use this" #-}
wxVARIABLE :: Int
wxVARIABLE = 80
{-# DEPRECATED wxVARIABLE "Don't use this" #-}
wxFIXED :: Int
wxFIXED = 81
{-# DEPRECATED wxFIXED "Don't use this" #-}
wxNORMAL :: Int
wxNORMAL = 90
{-# DEPRECATED wxNORMAL "Don't use this" #-}
wxLIGHT :: Int
wxLIGHT = 91
{-# DEPRECATED wxLIGHT "Don't use this" #-}
wxBOLD :: Int
wxBOLD = 92
{-# DEPRECATED wxBOLD "Don't use this" #-}
wxITALIC :: Int
wxITALIC = 93
{-# DEPRECATED wxITALIC "Don't use this" #-}
wxSLANT :: Int
wxSLANT = 94
{-# DEPRECATED wxSLANT "Don't use this" #-}
-- ----------------------------------------------------------------------------
-- font constants
-- ----------------------------------------------------------------------------
-- standard font families: these may be used only for the font creation, it
-- doesn't make sense to query an existing font for its font family as,
-- especially if the font had been created from a native font description, it
-- may be unknown
-- enum wxFontFamily
wxFONTFAMILY_DEFAULT :: Int
wxFONTFAMILY_DEFAULT = wxDEFAULT
wxFONTFAMILY_DECORATIVE :: Int
wxFONTFAMILY_DECORATIVE = wxDECORATIVE
wxFONTFAMILY_ROMAN :: Int
wxFONTFAMILY_ROMAN = wxROMAN
wxFONTFAMILY_SCRIPT :: Int
wxFONTFAMILY_SCRIPT = wxSCRIPT
wxFONTFAMILY_SWISS :: Int
wxFONTFAMILY_SWISS = wxSWISS
wxFONTFAMILY_MODERN :: Int
wxFONTFAMILY_MODERN = wxMODERN
wxFONTFAMILY_TELETYPE :: Int
wxFONTFAMILY_TELETYPE = wxTELETYPE
wxFONTFAMILY_MAX :: Int
wxFONTFAMILY_MAX = wxFONTFAMILY_TELETYPE + 1
wxFONTFAMILY_UNKNOWN :: Int
wxFONTFAMILY_UNKNOWN = wxFONTFAMILY_MAX
-- font styles
-- enum wxFontStyle
wxFONTSTYLE_NORMAL :: Int
wxFONTSTYLE_NORMAL = wxNORMAL
wxFONTSTYLE_ITALIC :: Int
wxFONTSTYLE_ITALIC = wxITALIC
wxFONTSTYLE_SLANT :: Int
wxFONTSTYLE_SLANT = wxSLANT
wxFONTSTYLE_MAX :: Int
wxFONTSTYLE_MAX = wxFONTSTYLE_SLANT + 1
-- font weights
-- enum wxFontWeight
wxFONTWEIGHT_NORMAL :: Int
wxFONTWEIGHT_NORMAL = wxNORMAL
wxFONTWEIGHT_LIGHT :: Int
wxFONTWEIGHT_LIGHT = wxLIGHT
wxFONTWEIGHT_BOLD :: Int
wxFONTWEIGHT_BOLD = wxBOLD
wxFONTWEIGHT_MAX :: Int
wxFONTWEIGHT_MAX = wxFONTWEIGHT_BOLD + 1
-- Symbolic font sizes as defined in CSS specification.
-- enum wxFontSymbolicSize
wxFONTSIZE_XX_SMALL :: Int
wxFONTSIZE_XX_SMALL = -3
wxFONTSIZE_X_SMALL :: Int
wxFONTSIZE_X_SMALL = -2
wxFONTSIZE_SMALL :: Int
wxFONTSIZE_SMALL = -1
wxFONTSIZE_MEDIUM :: Int
wxFONTSIZE_MEDIUM = 0
wxFONTSIZE_LARGE :: Int
wxFONTSIZE_LARGE = 1
wxFONTSIZE_X_LARGE :: Int
wxFONTSIZE_X_LARGE = 2
wxFONTSIZE_XX_LARGE :: Int
wxFONTSIZE_XX_LARGE = 3
-- the font flag bits for the new font ctor accepting one combined flags word
-- enum wxFontFlag
-- no special flags: font with default weight/slant/anti-aliasing
wxFONTFLAG_DEFAULT :: Int
wxFONTFLAG_DEFAULT = 0
-- slant flags (default: no slant)
wxFONTFLAG_ITALIC :: Int
wxFONTFLAG_ITALIC = 1 << 0
wxFONTFLAG_SLANT :: Int
wxFONTFLAG_SLANT = 1 << 1
-- weight flags (default: medium)
wxFONTFLAG_LIGHT :: Int
wxFONTFLAG_LIGHT = 1 << 2
wxFONTFLAG_BOLD :: Int
wxFONTFLAG_BOLD = 1 << 3
-- anti-aliasing flag: force on or off (default: the current system default)
wxFONTFLAG_ANTIALIASED :: Int
wxFONTFLAG_ANTIALIASED = 1 << 4
wxFONTFLAG_NOT_ANTIALIASED :: Int
wxFONTFLAG_NOT_ANTIALIASED = 1 << 5
-- underlined/strikethrough flags (default: no lines)
wxFONTFLAG_UNDERLINED :: Int
wxFONTFLAG_UNDERLINED = 1 << 6
wxFONTFLAG_STRIKETHROUGH :: Int
wxFONTFLAG_STRIKETHROUGH = 1 << 7
-- the mask of all currently used flags
wxFONTFLAG_MASK :: Int
wxFONTFLAG_MASK = wxFONTFLAG_ITALIC .|.
wxFONTFLAG_SLANT .|.
wxFONTFLAG_LIGHT .|.
wxFONTFLAG_BOLD .|.
wxFONTFLAG_ANTIALIASED .|.
wxFONTFLAG_NOT_ANTIALIASED .|.
wxFONTFLAG_UNDERLINED .|.
wxFONTFLAG_STRIKETHROUGH
-- End font constants
wxBLUE_BRUSH :: Int
wxBLUE_BRUSH = 0
wxGREEN_BRUSH :: Int
wxGREEN_BRUSH = 1
wxWHITE_BRUSH :: Int
wxWHITE_BRUSH = 2
wxBLACK_BRUSH :: Int
wxBLACK_BRUSH = 3
wxGREY_BRUSH :: Int
wxGREY_BRUSH = 4
wxMEDIUM_GREY_BRUSH :: Int
wxMEDIUM_GREY_BRUSH = 5
wxLIGHT_GREY_BRUSH :: Int
wxLIGHT_GREY_BRUSH = 6
wxTRANSPARENT_BRUSH :: Int
wxTRANSPARENT_BRUSH = 7
wxCYAN_BRUSH :: Int
wxCYAN_BRUSH = 8
wxRED_BRUSH :: Int
wxRED_BRUSH = 9
-- From wx/brush.h
-- NOTE: these values cannot be combined together!
-- enum wxBrushStyle
wxBRUSHSTYLE_INVALID :: Int
wxBRUSHSTYLE_INVALID = -1
wxBRUSHSTYLE_SOLID :: Int
wxBRUSHSTYLE_SOLID = wxSOLID
wxBRUSHSTYLE_TRANSPARENT :: Int
wxBRUSHSTYLE_TRANSPARENT = wxTRANSPARENT
wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE :: Int
wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE
wxBRUSHSTYLE_STIPPLE_MASK :: Int
wxBRUSHSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK
wxBRUSHSTYLE_STIPPLE :: Int
wxBRUSHSTYLE_STIPPLE = wxSTIPPLE
wxBRUSHSTYLE_BDIAGONAL_HATCH :: Int
wxBRUSHSTYLE_BDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL
wxBRUSHSTYLE_CROSSDIAG_HATCH :: Int
wxBRUSHSTYLE_CROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG
wxBRUSHSTYLE_FDIAGONAL_HATCH :: Int
wxBRUSHSTYLE_FDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL
wxBRUSHSTYLE_CROSS_HATCH :: Int
wxBRUSHSTYLE_CROSS_HATCH = wxHATCHSTYLE_CROSS
wxBRUSHSTYLE_HORIZONTAL_HATCH :: Int
wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL
wxBRUSHSTYLE_VERTICAL_HATCH :: Int
wxBRUSHSTYLE_VERTICAL_HATCH = wxHATCHSTYLE_VERTICAL
wxBRUSHSTYLE_FIRST_HATCH :: Int
wxBRUSHSTYLE_FIRST_HATCH = wxHATCHSTYLE_FIRST
wxBRUSHSTYLE_LAST_HATCH :: Int
wxBRUSHSTYLE_LAST_HATCH = wxHATCHSTYLE_LAST
wxBLACK :: Int
wxBLACK = 0
wxWHITE :: Int
wxWHITE = 1
wxRED :: Int
wxRED = 2
wxBLUE :: Int
wxBLUE = 3
wxGREEN :: Int
wxGREEN = 4
wxCYAN :: Int
wxCYAN = 5
wxLIGHT_GREY :: Int
wxLIGHT_GREY = 6
wxRED_PEN :: Int
wxRED_PEN = 0
wxCYAN_PEN :: Int
wxCYAN_PEN = 1
wxGREEN_PEN :: Int
wxGREEN_PEN = 2
wxBLACK_PEN :: Int
wxBLACK_PEN = 3
wxWHITE_PEN :: Int
wxWHITE_PEN = 4
wxTRANSPARENT_PEN :: Int
wxTRANSPARENT_PEN = 5
wxBLACK_DASHED_PEN :: Int
wxBLACK_DASHED_PEN = 6
wxGREY_PEN :: Int
wxGREY_PEN = 7
wxMEDIUM_GREY_PEN :: Int
wxMEDIUM_GREY_PEN = 8
wxLIGHT_GREY_PEN :: Int
wxLIGHT_GREY_PEN = 9
-- From wx/pen.h
-- enum wxPenStyle
wxPENSTYLE_INVALID :: Int
wxPENSTYLE_INVALID = -1
wxPENSTYLE_SOLID :: Int
wxPENSTYLE_SOLID = wxSOLID
wxPENSTYLE_DOT :: Int
wxPENSTYLE_DOT = wxDOT
wxPENSTYLE_LONG_DASH :: Int
wxPENSTYLE_LONG_DASH = wxLONG_DASH
wxPENSTYLE_SHORT_DASH :: Int
wxPENSTYLE_SHORT_DASH = wxSHORT_DASH
wxPENSTYLE_DOT_DASH :: Int
wxPENSTYLE_DOT_DASH = wxDOT_DASH
wxPENSTYLE_USER_DASH :: Int
wxPENSTYLE_USER_DASH = wxUSER_DASH
wxPENSTYLE_TRANSPARENT :: Int
wxPENSTYLE_TRANSPARENT = wxTRANSPARENT
wxPENSTYLE_STIPPLE_MASK_OPAQUE :: Int
wxPENSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE
wxPENSTYLE_STIPPLE_MASK :: Int
wxPENSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK
wxPENSTYLE_STIPPLE :: Int
wxPENSTYLE_STIPPLE = wxSTIPPLE
wxPENSTYLE_BDIAGONAL_HATCH :: Int
wxPENSTYLE_BDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL
wxPENSTYLE_CROSSDIAG_HATCH :: Int
wxPENSTYLE_CROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG
wxPENSTYLE_FDIAGONAL_HATCH :: Int
wxPENSTYLE_FDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL
wxPENSTYLE_CROSS_HATCH :: Int
wxPENSTYLE_CROSS_HATCH = wxHATCHSTYLE_CROSS
wxPENSTYLE_HORIZONTAL_HATCH :: Int
wxPENSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL
wxPENSTYLE_VERTICAL_HATCH :: Int
wxPENSTYLE_VERTICAL_HATCH = wxHATCHSTYLE_VERTICAL
wxPENSTYLE_FIRST_HATCH :: Int
wxPENSTYLE_FIRST_HATCH = wxHATCHSTYLE_FIRST
wxPENSTYLE_LAST_HATCH :: Int
wxPENSTYLE_LAST_HATCH = wxHATCHSTYLE_LAST
-- enum wxPenJoin
wxJOIN_INVALID :: Int
wxJOIN_INVALID = -1
wxJOIN_BEVEL :: Int
wxJOIN_BEVEL = 120
wxJOIN_MITER :: Int
wxJOIN_MITER = 121
wxJOIN_ROUND :: Int
wxJOIN_ROUND = 122
-- enum wxPenCap
wxCAP_INVALID :: Int
wxCAP_INVALID = -1
wxCAP_ROUND :: Int
wxCAP_ROUND = 130
wxCAP_PROJECTING :: Int
wxCAP_PROJECTING = 131
wxCAP_BUTT :: Int
wxCAP_BUTT = 132
-- End from wx/pen.h
wxNOT_FOUND :: Int
wxNOT_FOUND = (-1)
wxPRINTER_NO_ERROR :: Int
wxPRINTER_NO_ERROR = 0
wxPRINTER_CANCELLED :: Int
wxPRINTER_CANCELLED = 1
wxPRINTER_ERROR :: Int
wxPRINTER_ERROR = 2
wxPREVIEW_PRINT :: Int
wxPREVIEW_PRINT = 1
wxPREVIEW_PREVIOUS :: Int
wxPREVIEW_PREVIOUS = 2
wxPREVIEW_NEXT :: Int
wxPREVIEW_NEXT = 4
wxPREVIEW_ZOOM :: Int
wxPREVIEW_ZOOM = 8
wxPREVIEW_FIRST :: Int
wxPREVIEW_FIRST = 8
wxPREVIEW_LAST :: Int
wxPREVIEW_LAST = 32
wxPREVIEW_GOTO :: Int
wxPREVIEW_GOTO = 64
wxPREVIEW_DEFAULT :: Int
wxPREVIEW_DEFAULT = 126
wxID_PREVIEW_CLOSE :: Int
wxID_PREVIEW_CLOSE = 1
wxID_PREVIEW_NEXT :: Int
wxID_PREVIEW_NEXT = 2
wxID_PREVIEW_PREVIOUS :: Int
wxID_PREVIEW_PREVIOUS = 3
wxID_PREVIEW_PRINT :: Int
wxID_PREVIEW_PRINT = 4
wxID_PREVIEW_ZOOM :: Int
wxID_PREVIEW_ZOOM = 5
wxID_PREVIEW_FIRST :: Int
wxID_PREVIEW_FIRST = 6
wxID_PREVIEW_LAST :: Int
wxID_PREVIEW_LAST = 7
wxID_PREVIEW_GOTO :: Int
wxID_PREVIEW_GOTO = 8
wxPRINTID_STATIC :: Int
wxPRINTID_STATIC = 10
wxPRINTID_RANGE :: Int
wxPRINTID_RANGE = 11
wxPRINTID_FROM :: Int
wxPRINTID_FROM = 12
wxPRINTID_TO :: Int
wxPRINTID_TO = 13
wxPRINTID_COPIES :: Int
wxPRINTID_COPIES = 14
wxPRINTID_PRINTTOFILE :: Int
wxPRINTID_PRINTTOFILE = 15
wxPRINTID_SETUP :: Int
wxPRINTID_SETUP = 16
wxPRINTID_LEFTMARGIN :: Int
wxPRINTID_LEFTMARGIN = 30
wxPRINTID_RIGHTMARGIN :: Int
wxPRINTID_RIGHTMARGIN = 31
wxPRINTID_TOPMARGIN :: Int
wxPRINTID_TOPMARGIN = 32
wxPRINTID_BOTTOMMARGIN :: Int
wxPRINTID_BOTTOMMARGIN = 33
wxPRINTID_PRINTCOLOUR :: Int
wxPRINTID_PRINTCOLOUR = 10
wxPRINTID_ORIENTATION :: Int
wxPRINTID_ORIENTATION = 11
wxPRINTID_COMMAND :: Int
wxPRINTID_COMMAND = 12
wxPRINTID_OPTIONS :: Int
wxPRINTID_OPTIONS = 13
wxPRINTID_PAPERSIZE :: Int
wxPRINTID_PAPERSIZE = 14
wxHF_TOOLBAR :: Int
wxHF_TOOLBAR = 1
wxHF_CONTENTS :: Int
wxHF_CONTENTS = 2
wxHF_INDEX :: Int
wxHF_INDEX = 4
wxHF_SEARCH :: Int
wxHF_SEARCH = 8
wxHF_BOOKMARKS :: Int
wxHF_BOOKMARKS = 16
wxHF_OPENFILES :: Int
wxHF_OPENFILES = 32
wxHF_PRINT :: Int
wxHF_PRINT = 64
wxHF_FLATTOOLBAR :: Int
wxHF_FLATTOOLBAR = 128
wxHF_DEFAULTSTYLE :: Int
wxHF_DEFAULTSTYLE = 95
wxLAYOUT_HORIZONTAL :: Int
wxLAYOUT_HORIZONTAL = 0
wxLAYOUT_VERTICAL :: Int
wxLAYOUT_VERTICAL = 1
wxLAYOUT_NONE :: Int
wxLAYOUT_NONE = 0
wxLAYOUT_TOP :: Int
wxLAYOUT_TOP = 1
wxLAYOUT_LEFT :: Int
wxLAYOUT_LEFT = 2
wxLAYOUT_RIGHT :: Int
wxLAYOUT_RIGHT = 3
wxLAYOUT_BOTTOM :: Int
wxLAYOUT_BOTTOM = 4
wxSASH_DRAG_NONE :: Int
wxSASH_DRAG_NONE = 0
wxSASH_DRAG_DRAGGING :: Int
wxSASH_DRAG_DRAGGING = 1
wxSASH_DRAG_LEFT_DOWN :: Int
wxSASH_DRAG_LEFT_DOWN = 2
wxSASH_TOP :: Int
wxSASH_TOP = 0
wxSASH_RIGHT :: Int
wxSASH_RIGHT = 1
wxSASH_BOTTOM :: Int
wxSASH_BOTTOM = 2
wxSASH_LEFT :: Int
wxSASH_LEFT = 3
wxSASH_NONE :: Int
wxSASH_NONE = 100
wxSW_NOBORDER :: Int
wxSW_NOBORDER = 0
wxSW_BORDER :: Int
wxSW_BORDER = 32
wxSW_3DSASH :: Int
wxSW_3DSASH = 64
wxSW_3DBORDER :: Int
wxSW_3DBORDER = 128
wxSW_3D :: Int
wxSW_3D = 192
wxSASH_STATUS_OK :: Int
wxSASH_STATUS_OK = 0
wxSASH_STATUS_OUT_OF_RANGE :: Int
wxSASH_STATUS_OUT_OF_RANGE = 1
wxXRC_NONE :: Int
wxXRC_NONE = 0
wxXRC_USE_LOCALE :: Int
wxXRC_USE_LOCALE = 1
wxXRC_NO_SUBCLASSING :: Int
wxXRC_NO_SUBCLASSING = 2
wxXRC_NO_RELOADING :: Int
wxXRC_NO_RELOADING = 4
wxSYS_WHITE_BRUSH :: Int
wxSYS_WHITE_BRUSH = 0
wxSYS_LTGRAY_BRUSH :: Int
wxSYS_LTGRAY_BRUSH = 1
wxSYS_GRAY_BRUSH :: Int
wxSYS_GRAY_BRUSH = 2
wxSYS_DKGRAY_BRUSH :: Int
wxSYS_DKGRAY_BRUSH = 3
wxSYS_BLACK_BRUSH :: Int
wxSYS_BLACK_BRUSH = 4
wxSYS_NULL_BRUSH :: Int
wxSYS_NULL_BRUSH = 5
wxSYS_HOLLOW_BRUSH :: Int
wxSYS_HOLLOW_BRUSH = 5
wxSYS_WHITE_PEN :: Int
wxSYS_WHITE_PEN = 6
wxSYS_BLACK_PEN :: Int
wxSYS_BLACK_PEN = 7
wxSYS_NULL_PEN :: Int
wxSYS_NULL_PEN = 8
wxSYS_OEM_FIXED_FONT :: Int
wxSYS_OEM_FIXED_FONT = 10
wxSYS_ANSI_FIXED_FONT :: Int
wxSYS_ANSI_FIXED_FONT = 11
wxSYS_ANSI_VAR_FONT :: Int
wxSYS_ANSI_VAR_FONT = 12
wxSYS_SYSTEM_FONT :: Int
wxSYS_SYSTEM_FONT = 13
wxSYS_DEVICE_DEFAULT_FONT :: Int
wxSYS_DEVICE_DEFAULT_FONT = 14
wxSYS_DEFAULT_PALETTE :: Int
wxSYS_DEFAULT_PALETTE = 15
wxSYS_SYSTEM_FIXED_FONT :: Int
wxSYS_SYSTEM_FIXED_FONT = 16
wxSYS_DEFAULT_GUI_FONT :: Int
wxSYS_DEFAULT_GUI_FONT = 17
wxSYS_COLOUR_SCROLLBAR :: Int
wxSYS_COLOUR_SCROLLBAR = 0
wxSYS_COLOUR_BACKGROUND :: Int
wxSYS_COLOUR_BACKGROUND = 1
wxSYS_COLOUR_ACTIVECAPTION :: Int
wxSYS_COLOUR_ACTIVECAPTION = 2
wxSYS_COLOUR_INACTIVECAPTION :: Int
wxSYS_COLOUR_INACTIVECAPTION = 3
wxSYS_COLOUR_MENU :: Int
wxSYS_COLOUR_MENU = 4
wxSYS_COLOUR_WINDOW :: Int
wxSYS_COLOUR_WINDOW = 5
wxSYS_COLOUR_WINDOWFRAME :: Int
wxSYS_COLOUR_WINDOWFRAME = 6
wxSYS_COLOUR_MENUTEXT :: Int
wxSYS_COLOUR_MENUTEXT = 7
wxSYS_COLOUR_WINDOWTEXT :: Int
wxSYS_COLOUR_WINDOWTEXT = 8
wxSYS_COLOUR_CAPTIONTEXT :: Int
wxSYS_COLOUR_CAPTIONTEXT = 9
wxSYS_COLOUR_ACTIVEBORDER :: Int
wxSYS_COLOUR_ACTIVEBORDER = 10
wxSYS_COLOUR_INACTIVEBORDER :: Int
wxSYS_COLOUR_INACTIVEBORDER = 11
wxSYS_COLOUR_APPWORKSPACE :: Int
wxSYS_COLOUR_APPWORKSPACE = 12
wxSYS_COLOUR_HIGHLIGHT :: Int
wxSYS_COLOUR_HIGHLIGHT = 13
wxSYS_COLOUR_HIGHLIGHTTEXT :: Int
wxSYS_COLOUR_HIGHLIGHTTEXT = 14
wxSYS_COLOUR_BTNFACE :: Int
wxSYS_COLOUR_BTNFACE = 15
wxSYS_COLOUR_BTNSHADOW :: Int
wxSYS_COLOUR_BTNSHADOW = 16
wxSYS_COLOUR_GRAYTEXT :: Int
wxSYS_COLOUR_GRAYTEXT = 17
wxSYS_COLOUR_BTNTEXT :: Int
wxSYS_COLOUR_BTNTEXT = 18
wxSYS_COLOUR_INACTIVECAPTIONTEXT :: Int
wxSYS_COLOUR_INACTIVECAPTIONTEXT = 19
wxSYS_COLOUR_BTNHIGHLIGHT :: Int
wxSYS_COLOUR_BTNHIGHLIGHT = 20
wxSYS_COLOUR_3DDKSHADOW :: Int
wxSYS_COLOUR_3DDKSHADOW = 21
wxSYS_COLOUR_3DLIGHT :: Int
wxSYS_COLOUR_3DLIGHT = 22
wxSYS_COLOUR_INFOTEXT :: Int
wxSYS_COLOUR_INFOTEXT = 23
wxSYS_COLOUR_INFOBK :: Int
wxSYS_COLOUR_INFOBK = 24
wxSYS_COLOUR_LISTBOX :: Int
wxSYS_COLOUR_LISTBOX = 25
wxSYS_COLOUR_DESKTOP :: Int
wxSYS_COLOUR_DESKTOP = 1
wxSYS_COLOUR_3DFACE :: Int
wxSYS_COLOUR_3DFACE = 15
wxSYS_COLOUR_3DSHADOW :: Int
wxSYS_COLOUR_3DSHADOW = 16
wxSYS_COLOUR_3DHIGHLIGHT :: Int
wxSYS_COLOUR_3DHIGHLIGHT = 20
wxSYS_COLOUR_3DHILIGHT :: Int
wxSYS_COLOUR_3DHILIGHT = 20
wxSYS_COLOUR_BTNHILIGHT :: Int
wxSYS_COLOUR_BTNHILIGHT = 20
wxSYS_MOUSE_BUTTONS :: Int
wxSYS_MOUSE_BUTTONS = 1
wxSYS_BORDER_X :: Int
wxSYS_BORDER_X = 2
wxSYS_BORDER_Y :: Int
wxSYS_BORDER_Y = 3
wxSYS_CURSOR_X :: Int
wxSYS_CURSOR_X = 4
wxSYS_CURSOR_Y :: Int
wxSYS_CURSOR_Y = 5
wxSYS_DCLICK_X :: Int
wxSYS_DCLICK_X = 6
wxSYS_DCLICK_Y :: Int
wxSYS_DCLICK_Y = 7
wxSYS_DRAG_X :: Int
wxSYS_DRAG_X = 8
wxSYS_DRAG_Y :: Int
wxSYS_DRAG_Y = 9
wxSYS_EDGE_X :: Int
wxSYS_EDGE_X = 10
wxSYS_EDGE_Y :: Int
wxSYS_EDGE_Y = 11
wxSYS_HSCROLL_ARROW_X :: Int
wxSYS_HSCROLL_ARROW_X = 12
wxSYS_HSCROLL_ARROW_Y :: Int
wxSYS_HSCROLL_ARROW_Y = 13
wxSYS_HTHUMB_X :: Int
wxSYS_HTHUMB_X = 14
wxSYS_ICON_X :: Int
wxSYS_ICON_X = 15
wxSYS_ICON_Y :: Int
wxSYS_ICON_Y = 16
wxSYS_ICONSPACING_X :: Int
wxSYS_ICONSPACING_X = 17
wxSYS_ICONSPACING_Y :: Int
wxSYS_ICONSPACING_Y = 18
wxSYS_WINDOWMIN_X :: Int
wxSYS_WINDOWMIN_X = 19
wxSYS_WINDOWMIN_Y :: Int
wxSYS_WINDOWMIN_Y = 20
wxSYS_SCREEN_X :: Int
wxSYS_SCREEN_X = 21
wxSYS_SCREEN_Y :: Int
wxSYS_SCREEN_Y = 22
wxSYS_FRAMESIZE_X :: Int
wxSYS_FRAMESIZE_X = 23
wxSYS_FRAMESIZE_Y :: Int
wxSYS_FRAMESIZE_Y = 24
wxSYS_SMALLICON_X :: Int
wxSYS_SMALLICON_X = 25
wxSYS_SMALLICON_Y :: Int
wxSYS_SMALLICON_Y = 26
wxSYS_HSCROLL_Y :: Int
wxSYS_HSCROLL_Y = 27
wxSYS_VSCROLL_X :: Int
wxSYS_VSCROLL_X = 28
wxSYS_VSCROLL_ARROW_X :: Int
wxSYS_VSCROLL_ARROW_X = 29
wxSYS_VSCROLL_ARROW_Y :: Int
wxSYS_VSCROLL_ARROW_Y = 30
wxSYS_VTHUMB_Y :: Int
wxSYS_VTHUMB_Y = 31
wxSYS_CAPTION_Y :: Int
wxSYS_CAPTION_Y = 32
wxSYS_MENU_Y :: Int
wxSYS_MENU_Y = 33
wxSYS_NETWORK_PRESENT :: Int
wxSYS_NETWORK_PRESENT = 34
wxSYS_PENWINDOWS_PRESENT :: Int
wxSYS_PENWINDOWS_PRESENT = 35
wxSYS_SHOW_SOUNDS :: Int
wxSYS_SHOW_SOUNDS = 36
wxSYS_SWAP_BUTTONS :: Int
wxSYS_SWAP_BUTTONS = 37
wxSYS_SCREEN_NONE :: Int
wxSYS_SCREEN_NONE = 0
wxSYS_SCREEN_TINY :: Int
wxSYS_SCREEN_TINY = 1
wxSYS_SCREEN_PDA :: Int
wxSYS_SCREEN_PDA = 2
wxSYS_SCREEN_SMALL :: Int
wxSYS_SCREEN_SMALL = 3
wxSYS_SCREEN_DESKTOP :: Int
wxSYS_SCREEN_DESKTOP = 4
wxCAL_BORDER_NONE :: Int
wxCAL_BORDER_NONE = 0
wxCAL_BORDER_SQUARE :: Int
wxCAL_BORDER_SQUARE = 1
wxCAL_BORDER_ROUND :: Int
wxCAL_BORDER_ROUND = 2
wxCAL_HITTEST_NOWHERE :: Int
wxCAL_HITTEST_NOWHERE = 0
wxCAL_HITTEST_HEADER :: Int
wxCAL_HITTEST_HEADER = 1
wxCAL_HITTEST_DAY :: Int
wxCAL_HITTEST_DAY = 2
wxUNKNOWN :: Int
wxUNKNOWN = 0
wxSTRING :: Int
wxSTRING = 1
wxBOOLEAN :: Int
wxBOOLEAN = 2
wxINTEGER :: Int
wxINTEGER = 3
wxFLOAT :: Int
wxFLOAT = 4
wxMUTEX_NO_ERROR :: Int
wxMUTEX_NO_ERROR = 0
wxMUTEX_DEAD_LOCK :: Int
wxMUTEX_DEAD_LOCK = 1
wxMUTEX_BUSY :: Int
wxMUTEX_BUSY = 2
wxMUTEX_UNLOCKED :: Int
wxMUTEX_UNLOCKED = 3
wxMUTEX_MISC_ERROR :: Int
wxMUTEX_MISC_ERROR = 4
wxPLATFORM_CURRENT :: Int
wxPLATFORM_CURRENT = (-1)
wxPLATFORM_UNIX :: Int
wxPLATFORM_UNIX = 0
wxPLATFORM_WINDOWS :: Int
wxPLATFORM_WINDOWS = 1
wxPLATFORM_OS2 :: Int
wxPLATFORM_OS2 = 2
wxPLATFORM_MAC :: Int
wxPLATFORM_MAC = 3
wxLED_ALIGN_LEFT :: Int
wxLED_ALIGN_LEFT = 1
wxLED_ALIGN_RIGHT :: Int
wxLED_ALIGN_RIGHT = 2
wxLED_ALIGN_CENTER :: Int
wxLED_ALIGN_CENTER = 4
wxLED_ALIGN_MASK :: Int
wxLED_ALIGN_MASK = 4
wxLED_DRAW_FADED :: Int
wxLED_DRAW_FADED = 8
wxDS_MANAGE_SCROLLBARS :: Int
wxDS_MANAGE_SCROLLBARS = 16
wxDS_DRAG_CORNER :: Int
wxDS_DRAG_CORNER = 32
wxEL_ALLOW_NEW :: Int
wxEL_ALLOW_NEW = 256
wxEL_ALLOW_EDIT :: Int
wxEL_ALLOW_EDIT = 512
wxEL_ALLOW_DELETE :: Int
wxEL_ALLOW_DELETE = 1024
wxTR_NO_BUTTONS :: Int
wxTR_NO_BUTTONS = 0
wxTR_HAS_BUTTONS :: Int
wxTR_HAS_BUTTONS = 1
wxTR_TWIST_BUTTONS :: Int
wxTR_TWIST_BUTTONS = 2
wxTR_NO_LINES :: Int
wxTR_NO_LINES = 4
wxTR_LINES_AT_ROOT :: Int
wxTR_LINES_AT_ROOT = 8
wxTR_AQUA_BUTTONS :: Int
wxTR_AQUA_BUTTONS = 16
wxTR_SINGLE :: Int
wxTR_SINGLE = 0
wxTR_MULTIPLE :: Int
wxTR_MULTIPLE = 32
wxTR_EXTENDED :: Int
wxTR_EXTENDED = 64
wxTR_FULL_ROW_HIGHLIGHT :: Int
wxTR_FULL_ROW_HIGHLIGHT = 8192
wxTR_EDIT_LABELS :: Int
wxTR_EDIT_LABELS = 512
wxTR_ROW_LINES :: Int
wxTR_ROW_LINES = 1024
wxTR_HIDE_ROOT :: Int
wxTR_HIDE_ROOT = 2048
wxTR_HAS_VARIABLE_ROW_HEIGHT :: Int
wxTR_HAS_VARIABLE_ROW_HEIGHT = 128
wxCBAR_DOCKED_HORIZONTALLY :: Int
wxCBAR_DOCKED_HORIZONTALLY = 0
wxCBAR_DOCKED_VERTICALLY :: Int
wxCBAR_DOCKED_VERTICALLY = 1
wxCBAR_FLOATING :: Int
wxCBAR_FLOATING = 2
wxCBAR_HIDDEN :: Int
wxCBAR_HIDDEN = 3
fL_ALIGN_TOP :: Int
fL_ALIGN_TOP = 0
fL_ALIGN_BOTTOM :: Int
fL_ALIGN_BOTTOM = 1
fL_ALIGN_LEFT :: Int
fL_ALIGN_LEFT = 2
fL_ALIGN_RIGHT :: Int
fL_ALIGN_RIGHT = 3
fL_ALIGN_TOP_PANE :: Int
fL_ALIGN_TOP_PANE = 1
fL_ALIGN_BOTTOM_PANE :: Int
fL_ALIGN_BOTTOM_PANE = 2
fL_ALIGN_LEFT_PANE :: Int
fL_ALIGN_LEFT_PANE = 4
fL_ALIGN_RIGHT_PANE :: Int
fL_ALIGN_RIGHT_PANE = 8
wxALL_PANES :: Int
wxALL_PANES = 15
cB_NO_ITEMS_HITTED :: Int
cB_NO_ITEMS_HITTED = 0
cB_UPPER_ROW_HANDLE_HITTED :: Int
cB_UPPER_ROW_HANDLE_HITTED = 1
cB_LOWER_ROW_HANDLE_HITTED :: Int
cB_LOWER_ROW_HANDLE_HITTED = 2
cB_LEFT_BAR_HANDLE_HITTED :: Int
cB_LEFT_BAR_HANDLE_HITTED = 3
cB_RIGHT_BAR_HANDLE_HITTED :: Int
cB_RIGHT_BAR_HANDLE_HITTED = 4
cB_BAR_CONTENT_HITTED :: Int
cB_BAR_CONTENT_HITTED = 5
wxOK :: Int
wxOK = 4
wxYES :: Int
wxYES = 2
wxNO :: Int
wxNO = 8
wxYES_NO :: Int
wxYES_NO = 10
wxCANCEL :: Int
wxCANCEL = 16
wxNO_DEFAULT :: Int
wxNO_DEFAULT = 128
wxYES_DEFAULT :: Int
wxYES_DEFAULT = 0
wxFR_DOWN :: Int
wxFR_DOWN = 1
wxFR_WHOLEWORD :: Int
wxFR_WHOLEWORD = 2
wxFR_MATCHCASE :: Int
wxFR_MATCHCASE = 4
wxFR_REPLACEDIALOG :: Int
wxFR_REPLACEDIALOG = 1
wxFR_NOUPDOWN :: Int
wxFR_NOUPDOWN = 2
wxFR_NOMATCHCASE :: Int
wxFR_NOMATCHCASE = 4
wxFR_NOWHOLEWORD :: Int
wxFR_NOWHOLEWORD = 8
wxQUANTIZE_INCLUDE_WINDOWS_COLOURS :: Int
wxQUANTIZE_INCLUDE_WINDOWS_COLOURS = 1
wxQUANTIZE_RETURN_8BIT_DATA :: Int
wxQUANTIZE_RETURN_8BIT_DATA = 2
wxQUANTIZE_FILL_DESTINATION_IMAGE :: Int
wxQUANTIZE_FILL_DESTINATION_IMAGE = 4
wxLANGUAGE_DEFAULT :: Int
wxLANGUAGE_DEFAULT = 0
wxLANGUAGE_UNKNOWN :: Int
wxLANGUAGE_UNKNOWN = 1
wxLANGUAGE_ABKHAZIAN :: Int
wxLANGUAGE_ABKHAZIAN = 2
wxLANGUAGE_AFAR :: Int
wxLANGUAGE_AFAR = 3
wxLANGUAGE_AFRIKAANS :: Int
wxLANGUAGE_AFRIKAANS = 4
wxLANGUAGE_ALBANIAN :: Int
wxLANGUAGE_ALBANIAN = 5
wxLANGUAGE_AMHARIC :: Int
wxLANGUAGE_AMHARIC = 6
wxLANGUAGE_ARABIC :: Int
wxLANGUAGE_ARABIC = 7
wxLANGUAGE_ARABIC_ALGERIA :: Int
wxLANGUAGE_ARABIC_ALGERIA = 8
wxLANGUAGE_ARABIC_BAHRAIN :: Int
wxLANGUAGE_ARABIC_BAHRAIN = 9
wxLANGUAGE_ARABIC_EGYPT :: Int
wxLANGUAGE_ARABIC_EGYPT = 10
wxLANGUAGE_ARABIC_IRAQ :: Int
wxLANGUAGE_ARABIC_IRAQ = 11
wxLANGUAGE_ARABIC_JORDAN :: Int
wxLANGUAGE_ARABIC_JORDAN = 12
wxLANGUAGE_ARABIC_KUWAIT :: Int
wxLANGUAGE_ARABIC_KUWAIT = 13
wxLANGUAGE_ARABIC_LEBANON :: Int
wxLANGUAGE_ARABIC_LEBANON = 14
wxLANGUAGE_ARABIC_LIBYA :: Int
wxLANGUAGE_ARABIC_LIBYA = 15
wxLANGUAGE_ARABIC_MOROCCO :: Int
wxLANGUAGE_ARABIC_MOROCCO = 16
wxLANGUAGE_ARABIC_OMAN :: Int
wxLANGUAGE_ARABIC_OMAN = 17
wxLANGUAGE_ARABIC_QATAR :: Int
wxLANGUAGE_ARABIC_QATAR = 18
wxLANGUAGE_ARABIC_SAUDI_ARABIA :: Int
wxLANGUAGE_ARABIC_SAUDI_ARABIA = 19
wxLANGUAGE_ARABIC_SUDAN :: Int
wxLANGUAGE_ARABIC_SUDAN = 20
wxLANGUAGE_ARABIC_SYRIA :: Int
wxLANGUAGE_ARABIC_SYRIA = 21
wxLANGUAGE_ARABIC_TUNISIA :: Int
wxLANGUAGE_ARABIC_TUNISIA = 22
wxLANGUAGE_ARABIC_UAE :: Int
wxLANGUAGE_ARABIC_UAE = 23
wxLANGUAGE_ARABIC_YEMEN :: Int
wxLANGUAGE_ARABIC_YEMEN = 24
wxLANGUAGE_ARMENIAN :: Int
wxLANGUAGE_ARMENIAN = 25
wxLANGUAGE_ASSAMESE :: Int
wxLANGUAGE_ASSAMESE = 26
wxLANGUAGE_AYMARA :: Int
wxLANGUAGE_AYMARA = 27
wxLANGUAGE_AZERI :: Int
wxLANGUAGE_AZERI = 28
wxLANGUAGE_AZERI_CYRILLIC :: Int
wxLANGUAGE_AZERI_CYRILLIC = 29
wxLANGUAGE_AZERI_LATIN :: Int
wxLANGUAGE_AZERI_LATIN = 30
wxLANGUAGE_BASHKIR :: Int
wxLANGUAGE_BASHKIR = 31
wxLANGUAGE_BASQUE :: Int
wxLANGUAGE_BASQUE = 32
wxLANGUAGE_BELARUSIAN :: Int
wxLANGUAGE_BELARUSIAN = 33
wxLANGUAGE_BENGALI :: Int
wxLANGUAGE_BENGALI = 34
wxLANGUAGE_BHUTANI :: Int
wxLANGUAGE_BHUTANI = 35
wxLANGUAGE_BIHARI :: Int
wxLANGUAGE_BIHARI = 36
wxLANGUAGE_BISLAMA :: Int
wxLANGUAGE_BISLAMA = 37
wxLANGUAGE_BRETON :: Int
wxLANGUAGE_BRETON = 38
wxLANGUAGE_BULGARIAN :: Int
wxLANGUAGE_BULGARIAN = 39
wxLANGUAGE_BURMESE :: Int
wxLANGUAGE_BURMESE = 40
wxLANGUAGE_CAMBODIAN :: Int
wxLANGUAGE_CAMBODIAN = 41
wxLANGUAGE_CATALAN :: Int
wxLANGUAGE_CATALAN = 42
wxLANGUAGE_CHINESE :: Int
wxLANGUAGE_CHINESE = 43
wxLANGUAGE_CHINESE_SIMPLIFIED :: Int
wxLANGUAGE_CHINESE_SIMPLIFIED = 44
wxLANGUAGE_CHINESE_TRADITIONAL :: Int
wxLANGUAGE_CHINESE_TRADITIONAL = 45
wxLANGUAGE_CHINESE_HONGKONG :: Int
wxLANGUAGE_CHINESE_HONGKONG = 46
wxLANGUAGE_CHINESE_MACAU :: Int
wxLANGUAGE_CHINESE_MACAU = 47
wxLANGUAGE_CHINESE_SINGAPORE :: Int
wxLANGUAGE_CHINESE_SINGAPORE = 48
wxLANGUAGE_CHINESE_TAIWAN :: Int
wxLANGUAGE_CHINESE_TAIWAN = 49
wxLANGUAGE_CORSICAN :: Int
wxLANGUAGE_CORSICAN = 50
wxLANGUAGE_CROATIAN :: Int
wxLANGUAGE_CROATIAN = 51
wxLANGUAGE_CZECH :: Int
wxLANGUAGE_CZECH = 52
wxLANGUAGE_DANISH :: Int
wxLANGUAGE_DANISH = 53
wxLANGUAGE_DUTCH :: Int
wxLANGUAGE_DUTCH = 54
wxLANGUAGE_DUTCH_BELGIAN :: Int
wxLANGUAGE_DUTCH_BELGIAN = 55
wxLANGUAGE_ENGLISH :: Int
wxLANGUAGE_ENGLISH = 56
wxLANGUAGE_ENGLISH_UK :: Int
wxLANGUAGE_ENGLISH_UK = 57
wxLANGUAGE_ENGLISH_US :: Int
wxLANGUAGE_ENGLISH_US = 58
wxLANGUAGE_ENGLISH_AUSTRALIA :: Int
wxLANGUAGE_ENGLISH_AUSTRALIA = 59
wxLANGUAGE_ENGLISH_BELIZE :: Int
wxLANGUAGE_ENGLISH_BELIZE = 60
wxLANGUAGE_ENGLISH_BOTSWANA :: Int
wxLANGUAGE_ENGLISH_BOTSWANA = 61
wxLANGUAGE_ENGLISH_CANADA :: Int
wxLANGUAGE_ENGLISH_CANADA = 62
wxLANGUAGE_ENGLISH_CARIBBEAN :: Int
wxLANGUAGE_ENGLISH_CARIBBEAN = 63
wxLANGUAGE_ENGLISH_DENMARK :: Int
wxLANGUAGE_ENGLISH_DENMARK = 64
wxLANGUAGE_ENGLISH_EIRE :: Int
wxLANGUAGE_ENGLISH_EIRE = 65
wxLANGUAGE_ENGLISH_JAMAICA :: Int
wxLANGUAGE_ENGLISH_JAMAICA = 66
wxLANGUAGE_ENGLISH_NEW_ZEALAND :: Int
wxLANGUAGE_ENGLISH_NEW_ZEALAND = 67
wxLANGUAGE_ENGLISH_PHILIPPINES :: Int
wxLANGUAGE_ENGLISH_PHILIPPINES = 68
wxLANGUAGE_ENGLISH_SOUTH_AFRICA :: Int
wxLANGUAGE_ENGLISH_SOUTH_AFRICA = 69
wxLANGUAGE_ENGLISH_TRINIDAD :: Int
wxLANGUAGE_ENGLISH_TRINIDAD = 70
wxLANGUAGE_ENGLISH_ZIMBABWE :: Int
wxLANGUAGE_ENGLISH_ZIMBABWE = 71
wxLANGUAGE_ESPERANTO :: Int
wxLANGUAGE_ESPERANTO = 72
wxLANGUAGE_ESTONIAN :: Int
wxLANGUAGE_ESTONIAN = 73
wxLANGUAGE_FAEROESE :: Int
wxLANGUAGE_FAEROESE = 74
wxLANGUAGE_FARSI :: Int
wxLANGUAGE_FARSI = 75
wxLANGUAGE_FIJI :: Int
wxLANGUAGE_FIJI = 76
wxLANGUAGE_FINNISH :: Int
wxLANGUAGE_FINNISH = 77
wxLANGUAGE_FRENCH :: Int
wxLANGUAGE_FRENCH = 78
wxLANGUAGE_FRENCH_BELGIAN :: Int
wxLANGUAGE_FRENCH_BELGIAN = 79
wxLANGUAGE_FRENCH_CANADIAN :: Int
wxLANGUAGE_FRENCH_CANADIAN = 80
wxLANGUAGE_FRENCH_LUXEMBOURG :: Int
wxLANGUAGE_FRENCH_LUXEMBOURG = 81
wxLANGUAGE_FRENCH_MONACO :: Int
wxLANGUAGE_FRENCH_MONACO = 82
wxLANGUAGE_FRENCH_SWISS :: Int
wxLANGUAGE_FRENCH_SWISS = 83
wxLANGUAGE_FRISIAN :: Int
wxLANGUAGE_FRISIAN = 84
wxLANGUAGE_GALICIAN :: Int
wxLANGUAGE_GALICIAN = 85
wxLANGUAGE_GEORGIAN :: Int
wxLANGUAGE_GEORGIAN = 86
wxLANGUAGE_GERMAN :: Int
wxLANGUAGE_GERMAN = 87
wxLANGUAGE_GERMAN_AUSTRIAN :: Int
wxLANGUAGE_GERMAN_AUSTRIAN = 88
wxLANGUAGE_GERMAN_BELGIUM :: Int
wxLANGUAGE_GERMAN_BELGIUM = 89
wxLANGUAGE_GERMAN_LIECHTENSTEIN :: Int
wxLANGUAGE_GERMAN_LIECHTENSTEIN = 90
wxLANGUAGE_GERMAN_LUXEMBOURG :: Int
wxLANGUAGE_GERMAN_LUXEMBOURG = 91
wxLANGUAGE_GERMAN_SWISS :: Int
wxLANGUAGE_GERMAN_SWISS = 92
wxLANGUAGE_GREEK :: Int
wxLANGUAGE_GREEK = 93
wxLANGUAGE_GREENLANDIC :: Int
wxLANGUAGE_GREENLANDIC = 94
wxLANGUAGE_GUARANI :: Int
wxLANGUAGE_GUARANI = 95
wxLANGUAGE_GUJARATI :: Int
wxLANGUAGE_GUJARATI = 96
wxLANGUAGE_HAUSA :: Int
wxLANGUAGE_HAUSA = 97
wxLANGUAGE_HEBREW :: Int
wxLANGUAGE_HEBREW = 98
wxLANGUAGE_HINDI :: Int
wxLANGUAGE_HINDI = 99
wxLANGUAGE_HUNGARIAN :: Int
wxLANGUAGE_HUNGARIAN = 100
wxLANGUAGE_ICELANDIC :: Int
wxLANGUAGE_ICELANDIC = 101
wxLANGUAGE_INDONESIAN :: Int
wxLANGUAGE_INDONESIAN = 102
wxLANGUAGE_INTERLINGUA :: Int
wxLANGUAGE_INTERLINGUA = 103
wxLANGUAGE_INTERLINGUE :: Int
wxLANGUAGE_INTERLINGUE = 104
wxLANGUAGE_INUKTITUT :: Int
wxLANGUAGE_INUKTITUT = 105
wxLANGUAGE_INUPIAK :: Int
wxLANGUAGE_INUPIAK = 106
wxLANGUAGE_IRISH :: Int
wxLANGUAGE_IRISH = 107
wxLANGUAGE_ITALIAN :: Int
wxLANGUAGE_ITALIAN = 108
wxLANGUAGE_ITALIAN_SWISS :: Int
wxLANGUAGE_ITALIAN_SWISS = 109
wxLANGUAGE_JAPANESE :: Int
wxLANGUAGE_JAPANESE = 110
wxLANGUAGE_JAVANESE :: Int
wxLANGUAGE_JAVANESE = 111
wxLANGUAGE_KANNADA :: Int
wxLANGUAGE_KANNADA = 112
wxLANGUAGE_KASHMIRI :: Int
wxLANGUAGE_KASHMIRI = 113
wxLANGUAGE_KASHMIRI_INDIA :: Int
wxLANGUAGE_KASHMIRI_INDIA = 114
wxLANGUAGE_KAZAKH :: Int
wxLANGUAGE_KAZAKH = 115
wxLANGUAGE_KERNEWEK :: Int
wxLANGUAGE_KERNEWEK = 116
wxLANGUAGE_KINYARWANDA :: Int
wxLANGUAGE_KINYARWANDA = 117
wxLANGUAGE_KIRGHIZ :: Int
wxLANGUAGE_KIRGHIZ = 118
wxLANGUAGE_KIRUNDI :: Int
wxLANGUAGE_KIRUNDI = 119
wxLANGUAGE_KONKANI :: Int
wxLANGUAGE_KONKANI = 120
wxLANGUAGE_KOREAN :: Int
wxLANGUAGE_KOREAN = 121
wxLANGUAGE_KURDISH :: Int
wxLANGUAGE_KURDISH = 122
wxLANGUAGE_LAOTHIAN :: Int
wxLANGUAGE_LAOTHIAN = 123
wxLANGUAGE_LATIN :: Int
wxLANGUAGE_LATIN = 124
wxLANGUAGE_LATVIAN :: Int
wxLANGUAGE_LATVIAN = 125
wxLANGUAGE_LINGALA :: Int
wxLANGUAGE_LINGALA = 126
wxLANGUAGE_LITHUANIAN :: Int
wxLANGUAGE_LITHUANIAN = 127
wxLANGUAGE_MACEDONIAN :: Int
wxLANGUAGE_MACEDONIAN = 128
wxLANGUAGE_MALAGASY :: Int
wxLANGUAGE_MALAGASY = 129
wxLANGUAGE_MALAY :: Int
wxLANGUAGE_MALAY = 130
wxLANGUAGE_MALAYALAM :: Int
wxLANGUAGE_MALAYALAM = 131
wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM :: Int
wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM = 132
wxLANGUAGE_MALAY_MALAYSIA :: Int
wxLANGUAGE_MALAY_MALAYSIA = 133
wxLANGUAGE_MALTESE :: Int
wxLANGUAGE_MALTESE = 134
wxLANGUAGE_MANIPURI :: Int
wxLANGUAGE_MANIPURI = 135
wxLANGUAGE_MAORI :: Int
wxLANGUAGE_MAORI = 136
wxLANGUAGE_MARATHI :: Int
wxLANGUAGE_MARATHI = 137
wxLANGUAGE_MOLDAVIAN :: Int
wxLANGUAGE_MOLDAVIAN = 138
wxLANGUAGE_MONGOLIAN :: Int
wxLANGUAGE_MONGOLIAN = 139
wxLANGUAGE_NAURU :: Int
wxLANGUAGE_NAURU = 140
wxLANGUAGE_NEPALI :: Int
wxLANGUAGE_NEPALI = 141
wxLANGUAGE_NEPALI_INDIA :: Int
wxLANGUAGE_NEPALI_INDIA = 142
wxLANGUAGE_NORWEGIAN_BOKMAL :: Int
wxLANGUAGE_NORWEGIAN_BOKMAL = 143
wxLANGUAGE_NORWEGIAN_NYNORSK :: Int
wxLANGUAGE_NORWEGIAN_NYNORSK = 144
wxLANGUAGE_OCCITAN :: Int
wxLANGUAGE_OCCITAN = 145
wxLANGUAGE_ORIYA :: Int
wxLANGUAGE_ORIYA = 146
wxLANGUAGE_OROMO :: Int
wxLANGUAGE_OROMO = 147
wxLANGUAGE_PASHTO :: Int
wxLANGUAGE_PASHTO = 148
wxLANGUAGE_POLISH :: Int
wxLANGUAGE_POLISH = 149
wxLANGUAGE_PORTUGUESE :: Int
wxLANGUAGE_PORTUGUESE = 150
wxLANGUAGE_PORTUGUESE_BRAZILIAN :: Int
wxLANGUAGE_PORTUGUESE_BRAZILIAN = 151
wxLANGUAGE_PUNJABI :: Int
wxLANGUAGE_PUNJABI = 152
wxLANGUAGE_QUECHUA :: Int
wxLANGUAGE_QUECHUA = 153
wxLANGUAGE_RHAETO_ROMANCE :: Int
wxLANGUAGE_RHAETO_ROMANCE = 154
wxLANGUAGE_ROMANIAN :: Int
wxLANGUAGE_ROMANIAN = 155
wxLANGUAGE_RUSSIAN :: Int
wxLANGUAGE_RUSSIAN = 156
wxLANGUAGE_RUSSIAN_UKRAINE :: Int
wxLANGUAGE_RUSSIAN_UKRAINE = 157
wxLANGUAGE_SAMOAN :: Int
wxLANGUAGE_SAMOAN = 158
wxLANGUAGE_SANGHO :: Int
wxLANGUAGE_SANGHO = 159
wxLANGUAGE_SANSKRIT :: Int
wxLANGUAGE_SANSKRIT = 160
wxLANGUAGE_SCOTS_GAELIC :: Int
wxLANGUAGE_SCOTS_GAELIC = 161
wxLANGUAGE_SERBIAN :: Int
wxLANGUAGE_SERBIAN = 162
wxLANGUAGE_SERBIAN_CYRILLIC :: Int
wxLANGUAGE_SERBIAN_CYRILLIC = 163
wxLANGUAGE_SERBIAN_LATIN :: Int
wxLANGUAGE_SERBIAN_LATIN = 164
wxLANGUAGE_SERBO_CROATIAN :: Int
wxLANGUAGE_SERBO_CROATIAN = 165
wxLANGUAGE_SESOTHO :: Int
wxLANGUAGE_SESOTHO = 166
wxLANGUAGE_SETSWANA :: Int
wxLANGUAGE_SETSWANA = 167
wxLANGUAGE_SHONA :: Int
wxLANGUAGE_SHONA = 168
wxLANGUAGE_SINDHI :: Int
wxLANGUAGE_SINDHI = 169
wxLANGUAGE_SINHALESE :: Int
wxLANGUAGE_SINHALESE = 170
wxLANGUAGE_SISWATI :: Int
wxLANGUAGE_SISWATI = 171
wxLANGUAGE_SLOVAK :: Int
wxLANGUAGE_SLOVAK = 172
wxLANGUAGE_SLOVENIAN :: Int
wxLANGUAGE_SLOVENIAN = 173
wxLANGUAGE_SOMALI :: Int
wxLANGUAGE_SOMALI = 174
wxLANGUAGE_SPANISH :: Int
wxLANGUAGE_SPANISH = 175
wxLANGUAGE_SPANISH_ARGENTINA :: Int
wxLANGUAGE_SPANISH_ARGENTINA = 176
wxLANGUAGE_SPANISH_BOLIVIA :: Int
wxLANGUAGE_SPANISH_BOLIVIA = 177
wxLANGUAGE_SPANISH_CHILE :: Int
wxLANGUAGE_SPANISH_CHILE = 178
wxLANGUAGE_SPANISH_COLOMBIA :: Int
wxLANGUAGE_SPANISH_COLOMBIA = 179
wxLANGUAGE_SPANISH_COSTA_RICA :: Int
wxLANGUAGE_SPANISH_COSTA_RICA = 180
wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC :: Int
wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC = 181
wxLANGUAGE_SPANISH_ECUADOR :: Int
wxLANGUAGE_SPANISH_ECUADOR = 182
wxLANGUAGE_SPANISH_EL_SALVADOR :: Int
wxLANGUAGE_SPANISH_EL_SALVADOR = 183
wxLANGUAGE_SPANISH_GUATEMALA :: Int
wxLANGUAGE_SPANISH_GUATEMALA = 184
wxLANGUAGE_SPANISH_HONDURAS :: Int
wxLANGUAGE_SPANISH_HONDURAS = 185
wxLANGUAGE_SPANISH_MEXICAN :: Int
wxLANGUAGE_SPANISH_MEXICAN = 186
wxLANGUAGE_SPANISH_MODERN :: Int
wxLANGUAGE_SPANISH_MODERN = 187
wxLANGUAGE_SPANISH_NICARAGUA :: Int
wxLANGUAGE_SPANISH_NICARAGUA = 188
wxLANGUAGE_SPANISH_PANAMA :: Int
wxLANGUAGE_SPANISH_PANAMA = 189
wxLANGUAGE_SPANISH_PARAGUAY :: Int
wxLANGUAGE_SPANISH_PARAGUAY = 190
wxLANGUAGE_SPANISH_PERU :: Int
wxLANGUAGE_SPANISH_PERU = 191
wxLANGUAGE_SPANISH_PUERTO_RICO :: Int
wxLANGUAGE_SPANISH_PUERTO_RICO = 192
wxLANGUAGE_SPANISH_URUGUAY :: Int
wxLANGUAGE_SPANISH_URUGUAY = 193
wxLANGUAGE_SPANISH_US :: Int
wxLANGUAGE_SPANISH_US = 194
wxLANGUAGE_SPANISH_VENEZUELA :: Int
wxLANGUAGE_SPANISH_VENEZUELA = 195
wxLANGUAGE_SUNDANESE :: Int
wxLANGUAGE_SUNDANESE = 196
wxLANGUAGE_SWAHILI :: Int
wxLANGUAGE_SWAHILI = 197
wxLANGUAGE_SWEDISH :: Int
wxLANGUAGE_SWEDISH = 198
wxLANGUAGE_SWEDISH_FINLAND :: Int
wxLANGUAGE_SWEDISH_FINLAND = 199
wxLANGUAGE_TAGALOG :: Int
wxLANGUAGE_TAGALOG = 200
wxLANGUAGE_TAJIK :: Int
wxLANGUAGE_TAJIK = 201
wxLANGUAGE_TAMIL :: Int
wxLANGUAGE_TAMIL = 202
wxLANGUAGE_TATAR :: Int
wxLANGUAGE_TATAR = 203
wxLANGUAGE_TELUGU :: Int
wxLANGUAGE_TELUGU = 204
wxLANGUAGE_THAI :: Int
wxLANGUAGE_THAI = 205
wxLANGUAGE_TIBETAN :: Int
wxLANGUAGE_TIBETAN = 206
wxLANGUAGE_TIGRINYA :: Int
wxLANGUAGE_TIGRINYA = 207
wxLANGUAGE_TONGA :: Int
wxLANGUAGE_TONGA = 208
wxLANGUAGE_TSONGA :: Int
wxLANGUAGE_TSONGA = 209
wxLANGUAGE_TURKISH :: Int
wxLANGUAGE_TURKISH = 210
wxLANGUAGE_TURKMEN :: Int
wxLANGUAGE_TURKMEN = 211
wxLANGUAGE_TWI :: Int
wxLANGUAGE_TWI = 212
wxLANGUAGE_UIGHUR :: Int
wxLANGUAGE_UIGHUR = 213
wxLANGUAGE_UKRAINIAN :: Int
wxLANGUAGE_UKRAINIAN = 214
wxLANGUAGE_URDU :: Int
wxLANGUAGE_URDU = 215
wxLANGUAGE_URDU_INDIA :: Int
wxLANGUAGE_URDU_INDIA = 216
wxLANGUAGE_URDU_PAKISTAN :: Int
wxLANGUAGE_URDU_PAKISTAN = 217
wxLANGUAGE_UZBEK :: Int
wxLANGUAGE_UZBEK = 218
wxLANGUAGE_UZBEK_CYRILLIC :: Int
wxLANGUAGE_UZBEK_CYRILLIC = 219
wxLANGUAGE_UZBEK_LATIN :: Int
wxLANGUAGE_UZBEK_LATIN = 220
wxLANGUAGE_VIETNAMESE :: Int
wxLANGUAGE_VIETNAMESE = 221
wxLANGUAGE_VOLAPUK :: Int
wxLANGUAGE_VOLAPUK = 222
wxLANGUAGE_WELSH :: Int
wxLANGUAGE_WELSH = 223
wxLANGUAGE_WOLOF :: Int
wxLANGUAGE_WOLOF = 224
wxLANGUAGE_XHOSA :: Int
wxLANGUAGE_XHOSA = 225
wxLANGUAGE_YIDDISH :: Int
wxLANGUAGE_YIDDISH = 226
wxLANGUAGE_YORUBA :: Int
wxLANGUAGE_YORUBA = 227
wxLANGUAGE_ZHUANG :: Int
wxLANGUAGE_ZHUANG = 228
wxLANGUAGE_ZULU :: Int
wxLANGUAGE_ZULU = 229
wxLANGUAGE_USER_DEFINE :: Int
wxLANGUAGE_USER_DEFINE = 230
wxLOCALE_THOUSANDS_SEP :: Int
wxLOCALE_THOUSANDS_SEP = 0
wxLOCALE_DECIMAL_POINT :: Int
wxLOCALE_DECIMAL_POINT = 1
wxLOCALE_LOAD_DEFAULT :: Int
wxLOCALE_LOAD_DEFAULT = 1
wxLOCALE_CONV_ENCODING :: Int
wxLOCALE_CONV_ENCODING = 2
wxSTC_INVALID_POSITION :: Int
wxSTC_INVALID_POSITION = (-1)
wxSTC_START :: Int
wxSTC_START = 2000
wxSTC_OPTIONAL_START :: Int
wxSTC_OPTIONAL_START = 3000
wxSTC_LEXER_START :: Int
wxSTC_LEXER_START = 4000
wxSTC_WS_INVISIBLE :: Int
wxSTC_WS_INVISIBLE = 0
wxSTC_WS_VISIBLEALWAYS :: Int
wxSTC_WS_VISIBLEALWAYS = 1
wxSTC_WS_VISIBLEAFTERINDENT :: Int
wxSTC_WS_VISIBLEAFTERINDENT = 2
wxSTC_EOL_CRLF :: Int
wxSTC_EOL_CRLF = 0
wxSTC_EOL_CR :: Int
wxSTC_EOL_CR = 1
wxSTC_EOL_LF :: Int
wxSTC_EOL_LF = 2
wxSTC_CP_UTF8 :: Int
wxSTC_CP_UTF8 = 65001
wxSTC_CP_DBCS :: Int
wxSTC_CP_DBCS = 1
wxSTC_MARKER_MAX :: Int
wxSTC_MARKER_MAX = 31
wxSTC_MARK_CIRCLE :: Int
wxSTC_MARK_CIRCLE = 0
wxSTC_MARK_ROUNDRECT :: Int
wxSTC_MARK_ROUNDRECT = 1
wxSTC_MARK_ARROW :: Int
wxSTC_MARK_ARROW = 2
wxSTC_MARK_SMALLRECT :: Int
wxSTC_MARK_SMALLRECT = 3
wxSTC_MARK_SHORTARROW :: Int
wxSTC_MARK_SHORTARROW = 4
wxSTC_MARK_EMPTY :: Int
wxSTC_MARK_EMPTY = 5
wxSTC_MARK_ARROWDOWN :: Int
wxSTC_MARK_ARROWDOWN = 6
wxSTC_MARK_MINUS :: Int
wxSTC_MARK_MINUS = 7
wxSTC_MARK_PLUS :: Int
wxSTC_MARK_PLUS = 8
wxSTC_MARK_VLINE :: Int
wxSTC_MARK_VLINE = 9
wxSTC_MARK_LCORNER :: Int
wxSTC_MARK_LCORNER = 10
wxSTC_MARK_TCORNER :: Int
wxSTC_MARK_TCORNER = 11
wxSTC_MARK_BOXPLUS :: Int
wxSTC_MARK_BOXPLUS = 12
wxSTC_MARK_BOXPLUSCONNECTED :: Int
wxSTC_MARK_BOXPLUSCONNECTED = 13
wxSTC_MARK_BOXMINUS :: Int
wxSTC_MARK_BOXMINUS = 14
wxSTC_MARK_BOXMINUSCONNECTED :: Int
wxSTC_MARK_BOXMINUSCONNECTED = 15
wxSTC_MARK_LCORNERCURVE :: Int
wxSTC_MARK_LCORNERCURVE = 16
wxSTC_MARK_TCORNERCURVE :: Int
wxSTC_MARK_TCORNERCURVE = 17
wxSTC_MARK_CIRCLEPLUS :: Int
wxSTC_MARK_CIRCLEPLUS = 18
wxSTC_MARK_CIRCLEPLUSCONNECTED :: Int
wxSTC_MARK_CIRCLEPLUSCONNECTED = 19
wxSTC_MARK_CIRCLEMINUS :: Int
wxSTC_MARK_CIRCLEMINUS = 20
wxSTC_MARK_CIRCLEMINUSCONNECTED :: Int
wxSTC_MARK_CIRCLEMINUSCONNECTED = 21
wxSTC_MARK_BACKGROUND :: Int
wxSTC_MARK_BACKGROUND = 22
wxSTC_MARK_DOTDOTDOT :: Int
wxSTC_MARK_DOTDOTDOT = 23
wxSTC_MARK_ARROWS :: Int
wxSTC_MARK_ARROWS = 24
wxSTC_MARK_PIXMAP :: Int
wxSTC_MARK_PIXMAP = 25
wxSTC_MARK_CHARACTER :: Int
wxSTC_MARK_CHARACTER = 10000
wxSTC_MARKNUM_FOLDEREND :: Int
wxSTC_MARKNUM_FOLDEREND = 25
wxSTC_MARKNUM_FOLDEROPENMID :: Int
wxSTC_MARKNUM_FOLDEROPENMID = 26
wxSTC_MARKNUM_FOLDERMIDTAIL :: Int
wxSTC_MARKNUM_FOLDERMIDTAIL = 27
wxSTC_MARKNUM_FOLDERTAIL :: Int
wxSTC_MARKNUM_FOLDERTAIL = 28
wxSTC_MARKNUM_FOLDERSUB :: Int
wxSTC_MARKNUM_FOLDERSUB = 29
wxSTC_MARKNUM_FOLDER :: Int
wxSTC_MARKNUM_FOLDER = 30
wxSTC_MARKNUM_FOLDEROPEN :: Int
wxSTC_MARKNUM_FOLDEROPEN = 31
wxSTC_MASK_FOLDERS :: Int
wxSTC_MASK_FOLDERS = (-33554432)
wxSTC_MARGIN_SYMBOL :: Int
wxSTC_MARGIN_SYMBOL = 0
wxSTC_MARGIN_NUMBER :: Int
wxSTC_MARGIN_NUMBER = 1
wxSTC_STYLE_DEFAULT :: Int
wxSTC_STYLE_DEFAULT = 32
wxSTC_STYLE_LINENUMBER :: Int
wxSTC_STYLE_LINENUMBER = 33
wxSTC_STYLE_BRACELIGHT :: Int
wxSTC_STYLE_BRACELIGHT = 34
wxSTC_STYLE_BRACEBAD :: Int
wxSTC_STYLE_BRACEBAD = 35
wxSTC_STYLE_CONTROLCHAR :: Int
wxSTC_STYLE_CONTROLCHAR = 36
wxSTC_STYLE_INDENTGUIDE :: Int
wxSTC_STYLE_INDENTGUIDE = 37
wxSTC_STYLE_LASTPREDEFINED :: Int
wxSTC_STYLE_LASTPREDEFINED = 39
wxSTC_STYLE_MAX :: Int
wxSTC_STYLE_MAX = 127
wxSTC_CHARSET_ANSI :: Int
wxSTC_CHARSET_ANSI = 0
wxSTC_CHARSET_DEFAULT :: Int
wxSTC_CHARSET_DEFAULT = 1
wxSTC_CHARSET_BALTIC :: Int
wxSTC_CHARSET_BALTIC = 186
wxSTC_CHARSET_CHINESEBIG5 :: Int
wxSTC_CHARSET_CHINESEBIG5 = 136
wxSTC_CHARSET_EASTEUROPE :: Int
wxSTC_CHARSET_EASTEUROPE = 238
wxSTC_CHARSET_GB2312 :: Int
wxSTC_CHARSET_GB2312 = 134
wxSTC_CHARSET_GREEK :: Int
wxSTC_CHARSET_GREEK = 161
wxSTC_CHARSET_HANGUL :: Int
wxSTC_CHARSET_HANGUL = 129
wxSTC_CHARSET_MAC :: Int
wxSTC_CHARSET_MAC = 77
wxSTC_CHARSET_OEM :: Int
wxSTC_CHARSET_OEM = 255
wxSTC_CHARSET_RUSSIAN :: Int
wxSTC_CHARSET_RUSSIAN = 204
wxSTC_CHARSET_SHIFTJIS :: Int
wxSTC_CHARSET_SHIFTJIS = 128
wxSTC_CHARSET_SYMBOL :: Int
wxSTC_CHARSET_SYMBOL = 2
wxSTC_CHARSET_TURKISH :: Int
wxSTC_CHARSET_TURKISH = 162
wxSTC_CHARSET_JOHAB :: Int
wxSTC_CHARSET_JOHAB = 130
wxSTC_CHARSET_HEBREW :: Int
wxSTC_CHARSET_HEBREW = 177
wxSTC_CHARSET_ARABIC :: Int
wxSTC_CHARSET_ARABIC = 178
wxSTC_CHARSET_VIETNAMESE :: Int
wxSTC_CHARSET_VIETNAMESE = 163
wxSTC_CHARSET_THAI :: Int
wxSTC_CHARSET_THAI = 222
wxSTC_CASE_MIXED :: Int
wxSTC_CASE_MIXED = 0
wxSTC_CASE_UPPER :: Int
wxSTC_CASE_UPPER = 1
wxSTC_CASE_LOWER :: Int
wxSTC_CASE_LOWER = 2
wxSTC_INDIC_MAX :: Int
wxSTC_INDIC_MAX = 7
wxSTC_INDIC_PLAIN :: Int
wxSTC_INDIC_PLAIN = 0
wxSTC_INDIC_SQUIGGLE :: Int
wxSTC_INDIC_SQUIGGLE = 1
wxSTC_INDIC_TT :: Int
wxSTC_INDIC_TT = 2
wxSTC_INDIC_DIAGONAL :: Int
wxSTC_INDIC_DIAGONAL = 3
wxSTC_INDIC_STRIKE :: Int
wxSTC_INDIC_STRIKE = 4
wxSTC_INDIC_HIDDEN :: Int
wxSTC_INDIC_HIDDEN = 5
wxSTC_INDIC0_MASK :: Int
wxSTC_INDIC0_MASK = 32
wxSTC_INDIC1_MASK :: Int
wxSTC_INDIC1_MASK = 64
wxSTC_INDIC2_MASK :: Int
wxSTC_INDIC2_MASK = 128
wxSTC_INDICS_MASK :: Int
wxSTC_INDICS_MASK = 224
wxSTC_PRINT_NORMAL :: Int
wxSTC_PRINT_NORMAL = 0
wxSTC_PRINT_INVERTLIGHT :: Int
wxSTC_PRINT_INVERTLIGHT = 1
wxSTC_PRINT_BLACKONWHITE :: Int
wxSTC_PRINT_BLACKONWHITE = 2
wxSTC_PRINT_COLOURONWHITE :: Int
wxSTC_PRINT_COLOURONWHITE = 3
wxSTC_PRINT_COLOURONWHITEDEFAULTBG :: Int
wxSTC_PRINT_COLOURONWHITEDEFAULTBG = 4
wxSTC_FIND_WHOLEWORD :: Int
wxSTC_FIND_WHOLEWORD = 2
wxSTC_FIND_MATCHCASE :: Int
wxSTC_FIND_MATCHCASE = 4
wxSTC_FIND_WORDSTART :: Int
wxSTC_FIND_WORDSTART = 1048576
wxSTC_FIND_REGEXP :: Int
wxSTC_FIND_REGEXP = 2097152
wxSTC_FIND_POSIX :: Int
wxSTC_FIND_POSIX = 4194304
wxSTC_FOLDLEVELBASE :: Int
wxSTC_FOLDLEVELBASE = 1024
wxSTC_FOLDLEVELWHITEFLAG :: Int
wxSTC_FOLDLEVELWHITEFLAG = 4096
wxSTC_FOLDLEVELHEADERFLAG :: Int
wxSTC_FOLDLEVELHEADERFLAG = 8192
wxSTC_FOLDLEVELBOXHEADERFLAG :: Int
wxSTC_FOLDLEVELBOXHEADERFLAG = 16384
wxSTC_FOLDLEVELBOXFOOTERFLAG :: Int
wxSTC_FOLDLEVELBOXFOOTERFLAG = 32768
wxSTC_FOLDLEVELCONTRACTED :: Int
wxSTC_FOLDLEVELCONTRACTED = 65536
wxSTC_FOLDLEVELUNINDENT :: Int
wxSTC_FOLDLEVELUNINDENT = 131072
wxSTC_FOLDLEVELNUMBERMASK :: Int
wxSTC_FOLDLEVELNUMBERMASK = 4095
wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED :: Int
wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED = 2
wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED :: Int
wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED = 4
wxSTC_FOLDFLAG_LINEAFTER_EXPANDED :: Int
wxSTC_FOLDFLAG_LINEAFTER_EXPANDED = 8
wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED :: Int
wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED = 16
wxSTC_FOLDFLAG_LEVELNUMBERS :: Int
wxSTC_FOLDFLAG_LEVELNUMBERS = 64
wxSTC_FOLDFLAG_BOX :: Int
wxSTC_FOLDFLAG_BOX = 1
wxSTC_TIME_FOREVER :: Int
wxSTC_TIME_FOREVER = 10000000
wxSTC_WRAP_NONE :: Int
wxSTC_WRAP_NONE = 0
wxSTC_WRAP_WORD :: Int
wxSTC_WRAP_WORD = 1
wxSTC_CACHE_NONE :: Int
wxSTC_CACHE_NONE = 0
wxSTC_CACHE_CARET :: Int
wxSTC_CACHE_CARET = 1
wxSTC_CACHE_PAGE :: Int
wxSTC_CACHE_PAGE = 2
wxSTC_CACHE_DOCUMENT :: Int
wxSTC_CACHE_DOCUMENT = 3
wxSTC_EDGE_NONE :: Int
wxSTC_EDGE_NONE = 0
wxSTC_EDGE_LINE :: Int
wxSTC_EDGE_LINE = 1
wxSTC_EDGE_BACKGROUND :: Int
wxSTC_EDGE_BACKGROUND = 2
wxSTC_CURSORNORMAL :: Int
wxSTC_CURSORNORMAL = (-1)
wxSTC_CURSORWAIT :: Int
wxSTC_CURSORWAIT = 4
wxSTC_VISIBLE_SLOP :: Int
wxSTC_VISIBLE_SLOP = 1
wxSTC_VISIBLE_STRICT :: Int
wxSTC_VISIBLE_STRICT = 4
wxSTC_CARET_SLOP :: Int
wxSTC_CARET_SLOP = 1
wxSTC_CARET_STRICT :: Int
wxSTC_CARET_STRICT = 4
wxSTC_CARET_JUMPS :: Int
wxSTC_CARET_JUMPS = 16
wxSTC_CARET_EVEN :: Int
wxSTC_CARET_EVEN = 8
wxSTC_SEL_STREAM :: Int
wxSTC_SEL_STREAM = 0
wxSTC_SEL_RECTANGLE :: Int
wxSTC_SEL_RECTANGLE = 1
wxSTC_SEL_LINES :: Int
wxSTC_SEL_LINES = 2
wxSTC_KEYWORDSET_MAX :: Int
wxSTC_KEYWORDSET_MAX = 8
wxSTC_MOD_INSERTTEXT :: Int
wxSTC_MOD_INSERTTEXT = 1
wxSTC_MOD_DELETETEXT :: Int
wxSTC_MOD_DELETETEXT = 2
wxSTC_MOD_CHANGESTYLE :: Int
wxSTC_MOD_CHANGESTYLE = 4
wxSTC_MOD_CHANGEFOLD :: Int
wxSTC_MOD_CHANGEFOLD = 8
wxSTC_PERFORMED_USER :: Int
wxSTC_PERFORMED_USER = 16
wxSTC_PERFORMED_UNDO :: Int
wxSTC_PERFORMED_UNDO = 32
wxSTC_PERFORMED_REDO :: Int
wxSTC_PERFORMED_REDO = 64
wxSTC_LASTSTEPINUNDOREDO :: Int
wxSTC_LASTSTEPINUNDOREDO = 256
wxSTC_MOD_CHANGEMARKER :: Int
wxSTC_MOD_CHANGEMARKER = 512
wxSTC_MOD_BEFOREINSERT :: Int
wxSTC_MOD_BEFOREINSERT = 1024
wxSTC_MOD_BEFOREDELETE :: Int
wxSTC_MOD_BEFOREDELETE = 2048
wxSTC_MODEVENTMASKALL :: Int
wxSTC_MODEVENTMASKALL = 3959
wxSTC_KEY_DOWN :: Int
wxSTC_KEY_DOWN = 300
wxSTC_KEY_UP :: Int
wxSTC_KEY_UP = 301
wxSTC_KEY_LEFT :: Int
wxSTC_KEY_LEFT = 302
wxSTC_KEY_RIGHT :: Int
wxSTC_KEY_RIGHT = 303
wxSTC_KEY_HOME :: Int
wxSTC_KEY_HOME = 304
wxSTC_KEY_END :: Int
wxSTC_KEY_END = 305
wxSTC_KEY_PRIOR :: Int
wxSTC_KEY_PRIOR = 306
wxSTC_KEY_NEXT :: Int
wxSTC_KEY_NEXT = 307
wxSTC_KEY_DELETE :: Int
wxSTC_KEY_DELETE = 308
wxSTC_KEY_INSERT :: Int
wxSTC_KEY_INSERT = 309
wxSTC_KEY_ESCAPE :: Int
wxSTC_KEY_ESCAPE = 7
wxSTC_KEY_BACK :: Int
wxSTC_KEY_BACK = 8
wxSTC_KEY_TAB :: Int
wxSTC_KEY_TAB = 9
wxSTC_KEY_RETURN :: Int
wxSTC_KEY_RETURN = 13
wxSTC_KEY_ADD :: Int
wxSTC_KEY_ADD = 310
wxSTC_KEY_SUBTRACT :: Int
wxSTC_KEY_SUBTRACT = 311
wxSTC_KEY_DIVIDE :: Int
wxSTC_KEY_DIVIDE = 312
wxSTC_SCMOD_SHIFT :: Int
wxSTC_SCMOD_SHIFT = 1
wxSTC_SCMOD_CTRL :: Int
wxSTC_SCMOD_CTRL = 2
wxSTC_SCMOD_ALT :: Int
wxSTC_SCMOD_ALT = 4
wxSTC_LEX_CONTAINER :: Int
wxSTC_LEX_CONTAINER = 0
wxSTC_LEX_NULL :: Int
wxSTC_LEX_NULL = 1
wxSTC_LEX_PYTHON :: Int
wxSTC_LEX_PYTHON = 2
wxSTC_LEX_CPP :: Int
wxSTC_LEX_CPP = 3
wxSTC_LEX_HTML :: Int
wxSTC_LEX_HTML = 4
wxSTC_LEX_XML :: Int
wxSTC_LEX_XML = 5
wxSTC_LEX_PERL :: Int
wxSTC_LEX_PERL = 6
wxSTC_LEX_SQL :: Int
wxSTC_LEX_SQL = 7
wxSTC_LEX_VB :: Int
wxSTC_LEX_VB = 8
wxSTC_LEX_PROPERTIES :: Int
wxSTC_LEX_PROPERTIES = 9
wxSTC_LEX_ERRORLIST :: Int
wxSTC_LEX_ERRORLIST = 10
wxSTC_LEX_MAKEFILE :: Int
wxSTC_LEX_MAKEFILE = 11
wxSTC_LEX_BATCH :: Int
wxSTC_LEX_BATCH = 12
wxSTC_LEX_XCODE :: Int
wxSTC_LEX_XCODE = 13
wxSTC_LEX_LATEX :: Int
wxSTC_LEX_LATEX = 14
wxSTC_LEX_LUA :: Int
wxSTC_LEX_LUA = 15
wxSTC_LEX_DIFF :: Int
wxSTC_LEX_DIFF = 16
wxSTC_LEX_CONF :: Int
wxSTC_LEX_CONF = 17
wxSTC_LEX_PASCAL :: Int
wxSTC_LEX_PASCAL = 18
wxSTC_LEX_AVE :: Int
wxSTC_LEX_AVE = 19
wxSTC_LEX_ADA :: Int
wxSTC_LEX_ADA = 20
wxSTC_LEX_LISP :: Int
wxSTC_LEX_LISP = 21
wxSTC_LEX_RUBY :: Int
wxSTC_LEX_RUBY = 22
wxSTC_LEX_EIFFEL :: Int
wxSTC_LEX_EIFFEL = 23
wxSTC_LEX_EIFFELKW :: Int
wxSTC_LEX_EIFFELKW = 24
wxSTC_LEX_TCL :: Int
wxSTC_LEX_TCL = 25
wxSTC_LEX_NNCRONTAB :: Int
wxSTC_LEX_NNCRONTAB = 26
wxSTC_LEX_BULLANT :: Int
wxSTC_LEX_BULLANT = 27
wxSTC_LEX_VBSCRIPT :: Int
wxSTC_LEX_VBSCRIPT = 28
wxSTC_LEX_ASP :: Int
wxSTC_LEX_ASP = 29
wxSTC_LEX_PHP :: Int
wxSTC_LEX_PHP = 30
wxSTC_LEX_BAAN :: Int
wxSTC_LEX_BAAN = 31
wxSTC_LEX_MATLAB :: Int
wxSTC_LEX_MATLAB = 32
wxSTC_LEX_SCRIPTOL :: Int
wxSTC_LEX_SCRIPTOL = 33
wxSTC_LEX_ASM :: Int
wxSTC_LEX_ASM = 34
wxSTC_LEX_CPPNOCASE :: Int
wxSTC_LEX_CPPNOCASE = 35
wxSTC_LEX_FORTRAN :: Int
wxSTC_LEX_FORTRAN = 36
wxSTC_LEX_F77 :: Int
wxSTC_LEX_F77 = 37
wxSTC_LEX_CSS :: Int
wxSTC_LEX_CSS = 38
wxSTC_LEX_POV :: Int
wxSTC_LEX_POV = 39
wxSTC_LEX_LOUT :: Int
wxSTC_LEX_LOUT = 40
wxSTC_LEX_ESCRIPT :: Int
wxSTC_LEX_ESCRIPT = 41
wxSTC_LEX_PS :: Int
wxSTC_LEX_PS = 42
wxSTC_LEX_NSIS :: Int
wxSTC_LEX_NSIS = 43
wxSTC_LEX_MMIXAL :: Int
wxSTC_LEX_MMIXAL = 44
wxSTC_LEX_PHPSCRIPT :: Int
wxSTC_LEX_PHPSCRIPT = 69
wxSTC_LEX_TADS3 :: Int
wxSTC_LEX_TADS3 = 70
wxSTC_LEX_REBOL :: Int
wxSTC_LEX_REBOL = 71
wxSTC_LEX_SMALLTALK :: Int
wxSTC_LEX_SMALLTALK = 72
wxSTC_LEX_FLAGSHIP :: Int
wxSTC_LEX_FLAGSHIP = 73
wxSTC_LEX_CSOUND :: Int
wxSTC_LEX_CSOUND = 74
wxSTC_LEX_FREEBASIC :: Int
wxSTC_LEX_FREEBASIC = 75
wxSTC_LEX_AUTOMATIC :: Int
wxSTC_LEX_AUTOMATIC = 1000
wxSTC_LEX_HASKELL :: Int
wxSTC_LEX_HASKELL = 68
wxSTC_P_DEFAULT :: Int
wxSTC_P_DEFAULT = 0
wxSTC_P_COMMENTLINE :: Int
wxSTC_P_COMMENTLINE = 1
wxSTC_P_NUMBER :: Int
wxSTC_P_NUMBER = 2
wxSTC_P_STRING :: Int
wxSTC_P_STRING = 3
wxSTC_P_CHARACTER :: Int
wxSTC_P_CHARACTER = 4
wxSTC_P_WORD :: Int
wxSTC_P_WORD = 5
wxSTC_P_TRIPLE :: Int
wxSTC_P_TRIPLE = 6
wxSTC_P_TRIPLEDOUBLE :: Int
wxSTC_P_TRIPLEDOUBLE = 7
wxSTC_P_CLASSNAME :: Int
wxSTC_P_CLASSNAME = 8
wxSTC_P_DEFNAME :: Int
wxSTC_P_DEFNAME = 9
wxSTC_P_OPERATOR :: Int
wxSTC_P_OPERATOR = 10
wxSTC_P_IDENTIFIER :: Int
wxSTC_P_IDENTIFIER = 11
wxSTC_P_COMMENTBLOCK :: Int
wxSTC_P_COMMENTBLOCK = 12
wxSTC_P_STRINGEOL :: Int
wxSTC_P_STRINGEOL = 13
wxSTC_C_DEFAULT :: Int
wxSTC_C_DEFAULT = 0
wxSTC_C_COMMENT :: Int
wxSTC_C_COMMENT = 1
wxSTC_C_COMMENTLINE :: Int
wxSTC_C_COMMENTLINE = 2
wxSTC_C_COMMENTDOC :: Int
wxSTC_C_COMMENTDOC = 3
wxSTC_C_NUMBER :: Int
wxSTC_C_NUMBER = 4
wxSTC_C_WORD :: Int
wxSTC_C_WORD = 5
wxSTC_C_STRING :: Int
wxSTC_C_STRING = 6
wxSTC_C_CHARACTER :: Int
wxSTC_C_CHARACTER = 7
wxSTC_C_UUID :: Int
wxSTC_C_UUID = 8
wxSTC_C_PREPROCESSOR :: Int
wxSTC_C_PREPROCESSOR = 9
wxSTC_C_OPERATOR :: Int
wxSTC_C_OPERATOR = 10
wxSTC_C_IDENTIFIER :: Int
wxSTC_C_IDENTIFIER = 11
wxSTC_C_STRINGEOL :: Int
wxSTC_C_STRINGEOL = 12
wxSTC_C_VERBATIM :: Int
wxSTC_C_VERBATIM = 13
wxSTC_C_REGEX :: Int
wxSTC_C_REGEX = 14
wxSTC_C_COMMENTLINEDOC :: Int
wxSTC_C_COMMENTLINEDOC = 15
wxSTC_C_WORD2 :: Int
wxSTC_C_WORD2 = 16
wxSTC_C_COMMENTDOCKEYWORD :: Int
wxSTC_C_COMMENTDOCKEYWORD = 17
wxSTC_C_COMMENTDOCKEYWORDERROR :: Int
wxSTC_C_COMMENTDOCKEYWORDERROR = 18
wxSTC_C_GLOBALCLASS :: Int
wxSTC_C_GLOBALCLASS = 19
wxSTC_H_DEFAULT :: Int
wxSTC_H_DEFAULT = 0
wxSTC_H_TAG :: Int
wxSTC_H_TAG = 1
wxSTC_H_TAGUNKNOWN :: Int
wxSTC_H_TAGUNKNOWN = 2
wxSTC_H_ATTRIBUTE :: Int
wxSTC_H_ATTRIBUTE = 3
wxSTC_H_ATTRIBUTEUNKNOWN :: Int
wxSTC_H_ATTRIBUTEUNKNOWN = 4
wxSTC_H_NUMBER :: Int
wxSTC_H_NUMBER = 5
wxSTC_H_DOUBLESTRING :: Int
wxSTC_H_DOUBLESTRING = 6
wxSTC_H_SINGLESTRING :: Int
wxSTC_H_SINGLESTRING = 7
wxSTC_H_OTHER :: Int
wxSTC_H_OTHER = 8
wxSTC_H_COMMENT :: Int
wxSTC_H_COMMENT = 9
wxSTC_H_ENTITY :: Int
wxSTC_H_ENTITY = 10
wxSTC_H_TAGEND :: Int
wxSTC_H_TAGEND = 11
wxSTC_H_XMLSTART :: Int
wxSTC_H_XMLSTART = 12
wxSTC_H_XMLEND :: Int
wxSTC_H_XMLEND = 13
wxSTC_H_SCRIPT :: Int
wxSTC_H_SCRIPT = 14
wxSTC_H_ASP :: Int
wxSTC_H_ASP = 15
wxSTC_H_ASPAT :: Int
wxSTC_H_ASPAT = 16
wxSTC_H_CDATA :: Int
wxSTC_H_CDATA = 17
wxSTC_H_QUESTION :: Int
wxSTC_H_QUESTION = 18
wxSTC_H_VALUE :: Int
wxSTC_H_VALUE = 19
wxSTC_H_XCCOMMENT :: Int
wxSTC_H_XCCOMMENT = 20
wxSTC_H_SGML_DEFAULT :: Int
wxSTC_H_SGML_DEFAULT = 21
wxSTC_H_SGML_COMMAND :: Int
wxSTC_H_SGML_COMMAND = 22
wxSTC_H_SGML_1ST_PARAM :: Int
wxSTC_H_SGML_1ST_PARAM = 23
wxSTC_H_SGML_DOUBLESTRING :: Int
wxSTC_H_SGML_DOUBLESTRING = 24
wxSTC_H_SGML_SIMPLESTRING :: Int
wxSTC_H_SGML_SIMPLESTRING = 25
wxSTC_H_SGML_ERROR :: Int
wxSTC_H_SGML_ERROR = 26
wxSTC_H_SGML_SPECIAL :: Int
wxSTC_H_SGML_SPECIAL = 27
wxSTC_H_SGML_ENTITY :: Int
wxSTC_H_SGML_ENTITY = 28
wxSTC_H_SGML_COMMENT :: Int
wxSTC_H_SGML_COMMENT = 29
wxSTC_H_SGML_1ST_PARAM_COMMENT :: Int
wxSTC_H_SGML_1ST_PARAM_COMMENT = 30
wxSTC_H_SGML_BLOCK_DEFAULT :: Int
wxSTC_H_SGML_BLOCK_DEFAULT = 31
wxSTC_HA_DEFAULT :: Int
wxSTC_HA_DEFAULT = 0
wxSTC_HA_IDENTIFIER :: Int
wxSTC_HA_IDENTIFIER = 1
wxSTC_HA_KEYWORD :: Int
wxSTC_HA_KEYWORD = 2
wxSTC_HA_NUMBER :: Int
wxSTC_HA_NUMBER = 3
wxSTC_HA_STRING :: Int
wxSTC_HA_STRING = 4
wxSTC_HA_CHARACTER :: Int
wxSTC_HA_CHARACTER = 5
wxSTC_HA_CLASS :: Int
wxSTC_HA_CLASS = 6
wxSTC_HA_MODULE :: Int
wxSTC_HA_MODULE = 7
wxSTC_HA_CAPITAL :: Int
wxSTC_HA_CAPITAL = 8
wxSTC_HA_DATA :: Int
wxSTC_HA_DATA = 9
wxSTC_HA_IMPORT :: Int
wxSTC_HA_IMPORT = 10
wxSTC_HA_OPERATOR :: Int
wxSTC_HA_OPERATOR = 11
wxSTC_HA_INSTANCE :: Int
wxSTC_HA_INSTANCE = 12
wxSTC_HA_COMMENTLINE :: Int
wxSTC_HA_COMMENTLINE = 13
wxSTC_HA_COMMENTBLOCK :: Int
wxSTC_HA_COMMENTBLOCK = 14
wxSTC_HA_COMMENTBLOCK2 :: Int
wxSTC_HA_COMMENTBLOCK2 = 15
wxSTC_HA_COMMENTBLOCK3 :: Int
wxSTC_HA_COMMENTBLOCK3 = 16
wxSTC_HA_PREPROCESSOR :: Int
wxSTC_HA_PREPROCESSOR = 17
wxSTC_HJ_START :: Int
wxSTC_HJ_START = 40
wxSTC_HJ_DEFAULT :: Int
wxSTC_HJ_DEFAULT = 41
wxSTC_HJ_COMMENT :: Int
wxSTC_HJ_COMMENT = 42
wxSTC_HJ_COMMENTLINE :: Int
wxSTC_HJ_COMMENTLINE = 43
wxSTC_HJ_COMMENTDOC :: Int
wxSTC_HJ_COMMENTDOC = 44
wxSTC_HJ_NUMBER :: Int
wxSTC_HJ_NUMBER = 45
wxSTC_HJ_WORD :: Int
wxSTC_HJ_WORD = 46
wxSTC_HJ_KEYWORD :: Int
wxSTC_HJ_KEYWORD = 47
wxSTC_HJ_DOUBLESTRING :: Int
wxSTC_HJ_DOUBLESTRING = 48
wxSTC_HJ_SINGLESTRING :: Int
wxSTC_HJ_SINGLESTRING = 49
wxSTC_HJ_SYMBOLS :: Int
wxSTC_HJ_SYMBOLS = 50
wxSTC_HJ_STRINGEOL :: Int
wxSTC_HJ_STRINGEOL = 51
wxSTC_HJ_REGEX :: Int
wxSTC_HJ_REGEX = 52
wxSTC_HJA_START :: Int
wxSTC_HJA_START = 55
wxSTC_HJA_DEFAULT :: Int
wxSTC_HJA_DEFAULT = 56
wxSTC_HJA_COMMENT :: Int
wxSTC_HJA_COMMENT = 57
wxSTC_HJA_COMMENTLINE :: Int
wxSTC_HJA_COMMENTLINE = 58
wxSTC_HJA_COMMENTDOC :: Int
wxSTC_HJA_COMMENTDOC = 59
wxSTC_HJA_NUMBER :: Int
wxSTC_HJA_NUMBER = 60
wxSTC_HJA_WORD :: Int
wxSTC_HJA_WORD = 61
wxSTC_HJA_KEYWORD :: Int
wxSTC_HJA_KEYWORD = 62
wxSTC_HJA_DOUBLESTRING :: Int
wxSTC_HJA_DOUBLESTRING = 63
wxSTC_HJA_SINGLESTRING :: Int
wxSTC_HJA_SINGLESTRING = 64
wxSTC_HJA_SYMBOLS :: Int
wxSTC_HJA_SYMBOLS = 65
wxSTC_HJA_STRINGEOL :: Int
wxSTC_HJA_STRINGEOL = 66
wxSTC_HJA_REGEX :: Int
wxSTC_HJA_REGEX = 67
wxSTC_HB_START :: Int
wxSTC_HB_START = 70
wxSTC_HB_DEFAULT :: Int
wxSTC_HB_DEFAULT = 71
wxSTC_HB_COMMENTLINE :: Int
wxSTC_HB_COMMENTLINE = 72
wxSTC_HB_NUMBER :: Int
wxSTC_HB_NUMBER = 73
wxSTC_HB_WORD :: Int
wxSTC_HB_WORD = 74
wxSTC_HB_STRING :: Int
wxSTC_HB_STRING = 75
wxSTC_HB_IDENTIFIER :: Int
wxSTC_HB_IDENTIFIER = 76
wxSTC_HB_STRINGEOL :: Int
wxSTC_HB_STRINGEOL = 77
wxSTC_HBA_START :: Int
wxSTC_HBA_START = 80
wxSTC_HBA_DEFAULT :: Int
wxSTC_HBA_DEFAULT = 81
wxSTC_HBA_COMMENTLINE :: Int
wxSTC_HBA_COMMENTLINE = 82
wxSTC_HBA_NUMBER :: Int
wxSTC_HBA_NUMBER = 83
wxSTC_HBA_WORD :: Int
wxSTC_HBA_WORD = 84
wxSTC_HBA_STRING :: Int
wxSTC_HBA_STRING = 85
wxSTC_HBA_IDENTIFIER :: Int
wxSTC_HBA_IDENTIFIER = 86
wxSTC_HBA_STRINGEOL :: Int
wxSTC_HBA_STRINGEOL = 87
wxSTC_HP_START :: Int
wxSTC_HP_START = 90
wxSTC_HP_DEFAULT :: Int
wxSTC_HP_DEFAULT = 91
wxSTC_HP_COMMENTLINE :: Int
wxSTC_HP_COMMENTLINE = 92
wxSTC_HP_NUMBER :: Int
wxSTC_HP_NUMBER = 93
wxSTC_HP_STRING :: Int
wxSTC_HP_STRING = 94
wxSTC_HP_CHARACTER :: Int
wxSTC_HP_CHARACTER = 95
wxSTC_HP_WORD :: Int
wxSTC_HP_WORD = 96
wxSTC_HP_TRIPLE :: Int
wxSTC_HP_TRIPLE = 97
wxSTC_HP_TRIPLEDOUBLE :: Int
wxSTC_HP_TRIPLEDOUBLE = 98
wxSTC_HP_CLASSNAME :: Int
wxSTC_HP_CLASSNAME = 99
wxSTC_HP_DEFNAME :: Int
wxSTC_HP_DEFNAME = 100
wxSTC_HP_OPERATOR :: Int
wxSTC_HP_OPERATOR = 101
wxSTC_HP_IDENTIFIER :: Int
wxSTC_HP_IDENTIFIER = 102
wxSTC_HPA_START :: Int
wxSTC_HPA_START = 105
wxSTC_HPA_DEFAULT :: Int
wxSTC_HPA_DEFAULT = 106
wxSTC_HPA_COMMENTLINE :: Int
wxSTC_HPA_COMMENTLINE = 107
wxSTC_HPA_NUMBER :: Int
wxSTC_HPA_NUMBER = 108
wxSTC_HPA_STRING :: Int
wxSTC_HPA_STRING = 109
wxSTC_HPA_CHARACTER :: Int
wxSTC_HPA_CHARACTER = 110
wxSTC_HPA_WORD :: Int
wxSTC_HPA_WORD = 111
wxSTC_HPA_TRIPLE :: Int
wxSTC_HPA_TRIPLE = 112
wxSTC_HPA_TRIPLEDOUBLE :: Int
wxSTC_HPA_TRIPLEDOUBLE = 113
wxSTC_HPA_CLASSNAME :: Int
wxSTC_HPA_CLASSNAME = 114
wxSTC_HPA_DEFNAME :: Int
wxSTC_HPA_DEFNAME = 115
wxSTC_HPA_OPERATOR :: Int
wxSTC_HPA_OPERATOR = 116
wxSTC_HPA_IDENTIFIER :: Int
wxSTC_HPA_IDENTIFIER = 117
wxSTC_HPHP_DEFAULT :: Int
wxSTC_HPHP_DEFAULT = 118
wxSTC_HPHP_HSTRING :: Int
wxSTC_HPHP_HSTRING = 119
wxSTC_HPHP_SIMPLESTRING :: Int
wxSTC_HPHP_SIMPLESTRING = 120
wxSTC_HPHP_WORD :: Int
wxSTC_HPHP_WORD = 121
wxSTC_HPHP_NUMBER :: Int
wxSTC_HPHP_NUMBER = 122
wxSTC_HPHP_VARIABLE :: Int
wxSTC_HPHP_VARIABLE = 123
wxSTC_HPHP_COMMENT :: Int
wxSTC_HPHP_COMMENT = 124
wxSTC_HPHP_COMMENTLINE :: Int
wxSTC_HPHP_COMMENTLINE = 125
wxSTC_HPHP_HSTRING_VARIABLE :: Int
wxSTC_HPHP_HSTRING_VARIABLE = 126
wxSTC_HPHP_OPERATOR :: Int
wxSTC_HPHP_OPERATOR = 127
wxSTC_PL_DEFAULT :: Int
wxSTC_PL_DEFAULT = 0
wxSTC_PL_ERROR :: Int
wxSTC_PL_ERROR = 1
wxSTC_PL_COMMENTLINE :: Int
wxSTC_PL_COMMENTLINE = 2
wxSTC_PL_POD :: Int
wxSTC_PL_POD = 3
wxSTC_PL_NUMBER :: Int
wxSTC_PL_NUMBER = 4
wxSTC_PL_WORD :: Int
wxSTC_PL_WORD = 5
wxSTC_PL_STRING :: Int
wxSTC_PL_STRING = 6
wxSTC_PL_CHARACTER :: Int
wxSTC_PL_CHARACTER = 7
wxSTC_PL_PUNCTUATION :: Int
wxSTC_PL_PUNCTUATION = 8
wxSTC_PL_PREPROCESSOR :: Int
wxSTC_PL_PREPROCESSOR = 9
wxSTC_PL_OPERATOR :: Int
wxSTC_PL_OPERATOR = 10
wxSTC_PL_IDENTIFIER :: Int
wxSTC_PL_IDENTIFIER = 11
wxSTC_PL_SCALAR :: Int
wxSTC_PL_SCALAR = 12
wxSTC_PL_ARRAY :: Int
wxSTC_PL_ARRAY = 13
wxSTC_PL_HASH :: Int
wxSTC_PL_HASH = 14
wxSTC_PL_SYMBOLTABLE :: Int
wxSTC_PL_SYMBOLTABLE = 15
wxSTC_PL_REGEX :: Int
wxSTC_PL_REGEX = 17
wxSTC_PL_REGSUBST :: Int
wxSTC_PL_REGSUBST = 18
wxSTC_PL_LONGQUOTE :: Int
wxSTC_PL_LONGQUOTE = 19
wxSTC_PL_BACKTICKS :: Int
wxSTC_PL_BACKTICKS = 20
wxSTC_PL_DATASECTION :: Int
wxSTC_PL_DATASECTION = 21
wxSTC_PL_HERE_DELIM :: Int
wxSTC_PL_HERE_DELIM = 22
wxSTC_PL_HERE_Q :: Int
wxSTC_PL_HERE_Q = 23
wxSTC_PL_HERE_QQ :: Int
wxSTC_PL_HERE_QQ = 24
wxSTC_PL_HERE_QX :: Int
wxSTC_PL_HERE_QX = 25
wxSTC_PL_STRING_Q :: Int
wxSTC_PL_STRING_Q = 26
wxSTC_PL_STRING_QQ :: Int
wxSTC_PL_STRING_QQ = 27
wxSTC_PL_STRING_QX :: Int
wxSTC_PL_STRING_QX = 28
wxSTC_PL_STRING_QR :: Int
wxSTC_PL_STRING_QR = 29
wxSTC_PL_STRING_QW :: Int
wxSTC_PL_STRING_QW = 30
wxSTC_B_DEFAULT :: Int
wxSTC_B_DEFAULT = 0
wxSTC_B_COMMENT :: Int
wxSTC_B_COMMENT = 1
wxSTC_B_NUMBER :: Int
wxSTC_B_NUMBER = 2
wxSTC_B_KEYWORD :: Int
wxSTC_B_KEYWORD = 3
wxSTC_B_STRING :: Int
wxSTC_B_STRING = 4
wxSTC_B_PREPROCESSOR :: Int
wxSTC_B_PREPROCESSOR = 5
wxSTC_B_OPERATOR :: Int
wxSTC_B_OPERATOR = 6
wxSTC_B_IDENTIFIER :: Int
wxSTC_B_IDENTIFIER = 7
wxSTC_B_DATE :: Int
wxSTC_B_DATE = 8
wxSTC_PROPS_DEFAULT :: Int
wxSTC_PROPS_DEFAULT = 0
wxSTC_PROPS_COMMENT :: Int
wxSTC_PROPS_COMMENT = 1
wxSTC_PROPS_SECTION :: Int
wxSTC_PROPS_SECTION = 2
wxSTC_PROPS_ASSIGNMENT :: Int
wxSTC_PROPS_ASSIGNMENT = 3
wxSTC_PROPS_DEFVAL :: Int
wxSTC_PROPS_DEFVAL = 4
wxSTC_L_DEFAULT :: Int
wxSTC_L_DEFAULT = 0
wxSTC_L_COMMAND :: Int
wxSTC_L_COMMAND = 1
wxSTC_L_TAG :: Int
wxSTC_L_TAG = 2
wxSTC_L_MATH :: Int
wxSTC_L_MATH = 3
wxSTC_L_COMMENT :: Int
wxSTC_L_COMMENT = 4
wxSTC_LUA_DEFAULT :: Int
wxSTC_LUA_DEFAULT = 0
wxSTC_LUA_COMMENT :: Int
wxSTC_LUA_COMMENT = 1
wxSTC_LUA_COMMENTLINE :: Int
wxSTC_LUA_COMMENTLINE = 2
wxSTC_LUA_COMMENTDOC :: Int
wxSTC_LUA_COMMENTDOC = 3
wxSTC_LUA_NUMBER :: Int
wxSTC_LUA_NUMBER = 4
wxSTC_LUA_WORD :: Int
wxSTC_LUA_WORD = 5
wxSTC_LUA_STRING :: Int
wxSTC_LUA_STRING = 6
wxSTC_LUA_CHARACTER :: Int
wxSTC_LUA_CHARACTER = 7
wxSTC_LUA_LITERALSTRING :: Int
wxSTC_LUA_LITERALSTRING = 8
wxSTC_LUA_PREPROCESSOR :: Int
wxSTC_LUA_PREPROCESSOR = 9
wxSTC_LUA_OPERATOR :: Int
wxSTC_LUA_OPERATOR = 10
wxSTC_LUA_IDENTIFIER :: Int
wxSTC_LUA_IDENTIFIER = 11
wxSTC_LUA_STRINGEOL :: Int
wxSTC_LUA_STRINGEOL = 12
wxSTC_LUA_WORD2 :: Int
wxSTC_LUA_WORD2 = 13
wxSTC_LUA_WORD3 :: Int
wxSTC_LUA_WORD3 = 14
wxSTC_LUA_WORD4 :: Int
wxSTC_LUA_WORD4 = 15
wxSTC_LUA_WORD5 :: Int
wxSTC_LUA_WORD5 = 16
wxSTC_LUA_WORD6 :: Int
wxSTC_LUA_WORD6 = 17
wxSTC_LUA_WORD7 :: Int
wxSTC_LUA_WORD7 = 18
wxSTC_LUA_WORD8 :: Int
wxSTC_LUA_WORD8 = 19
wxSTC_ERR_DEFAULT :: Int
wxSTC_ERR_DEFAULT = 0
wxSTC_ERR_PYTHON :: Int
wxSTC_ERR_PYTHON = 1
wxSTC_ERR_GCC :: Int
wxSTC_ERR_GCC = 2
wxSTC_ERR_MS :: Int
wxSTC_ERR_MS = 3
wxSTC_ERR_CMD :: Int
wxSTC_ERR_CMD = 4
wxSTC_ERR_BORLAND :: Int
wxSTC_ERR_BORLAND = 5
wxSTC_ERR_PERL :: Int
wxSTC_ERR_PERL = 6
wxSTC_ERR_NET :: Int
wxSTC_ERR_NET = 7
wxSTC_ERR_LUA :: Int
wxSTC_ERR_LUA = 8
wxSTC_ERR_CTAG :: Int
wxSTC_ERR_CTAG = 9
wxSTC_ERR_DIFF_CHANGED :: Int
wxSTC_ERR_DIFF_CHANGED = 10
wxSTC_ERR_DIFF_ADDITION :: Int
wxSTC_ERR_DIFF_ADDITION = 11
wxSTC_ERR_DIFF_DELETION :: Int
wxSTC_ERR_DIFF_DELETION = 12
wxSTC_ERR_DIFF_MESSAGE :: Int
wxSTC_ERR_DIFF_MESSAGE = 13
wxSTC_ERR_PHP :: Int
wxSTC_ERR_PHP = 14
wxSTC_ERR_ELF :: Int
wxSTC_ERR_ELF = 15
wxSTC_ERR_IFC :: Int
wxSTC_ERR_IFC = 16
wxSTC_BAT_DEFAULT :: Int
wxSTC_BAT_DEFAULT = 0
wxSTC_BAT_COMMENT :: Int
wxSTC_BAT_COMMENT = 1
wxSTC_BAT_WORD :: Int
wxSTC_BAT_WORD = 2
wxSTC_BAT_LABEL :: Int
wxSTC_BAT_LABEL = 3
wxSTC_BAT_HIDE :: Int
wxSTC_BAT_HIDE = 4
wxSTC_BAT_COMMAND :: Int
wxSTC_BAT_COMMAND = 5
wxSTC_BAT_IDENTIFIER :: Int
wxSTC_BAT_IDENTIFIER = 6
wxSTC_BAT_OPERATOR :: Int
wxSTC_BAT_OPERATOR = 7
wxSTC_MAKE_DEFAULT :: Int
wxSTC_MAKE_DEFAULT = 0
wxSTC_MAKE_COMMENT :: Int
wxSTC_MAKE_COMMENT = 1
wxSTC_MAKE_PREPROCESSOR :: Int
wxSTC_MAKE_PREPROCESSOR = 2
wxSTC_MAKE_IDENTIFIER :: Int
wxSTC_MAKE_IDENTIFIER = 3
wxSTC_MAKE_OPERATOR :: Int
wxSTC_MAKE_OPERATOR = 4
wxSTC_MAKE_TARGET :: Int
wxSTC_MAKE_TARGET = 5
wxSTC_MAKE_IDEOL :: Int
wxSTC_MAKE_IDEOL = 9
wxSTC_DIFF_DEFAULT :: Int
wxSTC_DIFF_DEFAULT = 0
wxSTC_DIFF_COMMENT :: Int
wxSTC_DIFF_COMMENT = 1
wxSTC_DIFF_COMMAND :: Int
wxSTC_DIFF_COMMAND = 2
wxSTC_DIFF_HEADER :: Int
wxSTC_DIFF_HEADER = 3
wxSTC_DIFF_POSITION :: Int
wxSTC_DIFF_POSITION = 4
wxSTC_DIFF_DELETED :: Int
wxSTC_DIFF_DELETED = 5
wxSTC_DIFF_ADDED :: Int
wxSTC_DIFF_ADDED = 6
wxSTC_CONF_DEFAULT :: Int
wxSTC_CONF_DEFAULT = 0
wxSTC_CONF_COMMENT :: Int
wxSTC_CONF_COMMENT = 1
wxSTC_CONF_NUMBER :: Int
wxSTC_CONF_NUMBER = 2
wxSTC_CONF_IDENTIFIER :: Int
wxSTC_CONF_IDENTIFIER = 3
wxSTC_CONF_EXTENSION :: Int
wxSTC_CONF_EXTENSION = 4
wxSTC_CONF_PARAMETER :: Int
wxSTC_CONF_PARAMETER = 5
wxSTC_CONF_STRING :: Int
wxSTC_CONF_STRING = 6
wxSTC_CONF_OPERATOR :: Int
wxSTC_CONF_OPERATOR = 7
wxSTC_CONF_IP :: Int
wxSTC_CONF_IP = 8
wxSTC_CONF_DIRECTIVE :: Int
wxSTC_CONF_DIRECTIVE = 9
wxSTC_AVE_DEFAULT :: Int
wxSTC_AVE_DEFAULT = 0
wxSTC_AVE_COMMENT :: Int
wxSTC_AVE_COMMENT = 1
wxSTC_AVE_NUMBER :: Int
wxSTC_AVE_NUMBER = 2
wxSTC_AVE_WORD :: Int
wxSTC_AVE_WORD = 3
wxSTC_AVE_STRING :: Int
wxSTC_AVE_STRING = 6
wxSTC_AVE_ENUM :: Int
wxSTC_AVE_ENUM = 7
wxSTC_AVE_STRINGEOL :: Int
wxSTC_AVE_STRINGEOL = 8
wxSTC_AVE_IDENTIFIER :: Int
wxSTC_AVE_IDENTIFIER = 9
wxSTC_AVE_OPERATOR :: Int
wxSTC_AVE_OPERATOR = 10
wxSTC_AVE_WORD1 :: Int
wxSTC_AVE_WORD1 = 11
wxSTC_AVE_WORD2 :: Int
wxSTC_AVE_WORD2 = 12
wxSTC_AVE_WORD3 :: Int
wxSTC_AVE_WORD3 = 13
wxSTC_AVE_WORD4 :: Int
wxSTC_AVE_WORD4 = 14
wxSTC_AVE_WORD5 :: Int
wxSTC_AVE_WORD5 = 15
wxSTC_AVE_WORD6 :: Int
wxSTC_AVE_WORD6 = 16
wxSTC_ADA_DEFAULT :: Int
wxSTC_ADA_DEFAULT = 0
wxSTC_ADA_WORD :: Int
wxSTC_ADA_WORD = 1
wxSTC_ADA_IDENTIFIER :: Int
wxSTC_ADA_IDENTIFIER = 2
wxSTC_ADA_NUMBER :: Int
wxSTC_ADA_NUMBER = 3
wxSTC_ADA_DELIMITER :: Int
wxSTC_ADA_DELIMITER = 4
wxSTC_ADA_CHARACTER :: Int
wxSTC_ADA_CHARACTER = 5
wxSTC_ADA_CHARACTEREOL :: Int
wxSTC_ADA_CHARACTEREOL = 6
wxSTC_ADA_STRING :: Int
wxSTC_ADA_STRING = 7
wxSTC_ADA_STRINGEOL :: Int
wxSTC_ADA_STRINGEOL = 8
wxSTC_ADA_LABEL :: Int
wxSTC_ADA_LABEL = 9
wxSTC_ADA_COMMENTLINE :: Int
wxSTC_ADA_COMMENTLINE = 10
wxSTC_ADA_ILLEGAL :: Int
wxSTC_ADA_ILLEGAL = 11
wxSTC_BAAN_DEFAULT :: Int
wxSTC_BAAN_DEFAULT = 0
wxSTC_BAAN_COMMENT :: Int
wxSTC_BAAN_COMMENT = 1
wxSTC_BAAN_COMMENTDOC :: Int
wxSTC_BAAN_COMMENTDOC = 2
wxSTC_BAAN_NUMBER :: Int
wxSTC_BAAN_NUMBER = 3
wxSTC_BAAN_WORD :: Int
wxSTC_BAAN_WORD = 4
wxSTC_BAAN_STRING :: Int
wxSTC_BAAN_STRING = 5
wxSTC_BAAN_PREPROCESSOR :: Int
wxSTC_BAAN_PREPROCESSOR = 6
wxSTC_BAAN_OPERATOR :: Int
wxSTC_BAAN_OPERATOR = 7
wxSTC_BAAN_IDENTIFIER :: Int
wxSTC_BAAN_IDENTIFIER = 8
wxSTC_BAAN_STRINGEOL :: Int
wxSTC_BAAN_STRINGEOL = 9
wxSTC_BAAN_WORD2 :: Int
wxSTC_BAAN_WORD2 = 10
wxSTC_LISP_DEFAULT :: Int
wxSTC_LISP_DEFAULT = 0
wxSTC_LISP_COMMENT :: Int
wxSTC_LISP_COMMENT = 1
wxSTC_LISP_NUMBER :: Int
wxSTC_LISP_NUMBER = 2
wxSTC_LISP_KEYWORD :: Int
wxSTC_LISP_KEYWORD = 3
wxSTC_LISP_STRING :: Int
wxSTC_LISP_STRING = 6
wxSTC_LISP_STRINGEOL :: Int
wxSTC_LISP_STRINGEOL = 8
wxSTC_LISP_IDENTIFIER :: Int
wxSTC_LISP_IDENTIFIER = 9
wxSTC_LISP_OPERATOR :: Int
wxSTC_LISP_OPERATOR = 10
wxSTC_EIFFEL_DEFAULT :: Int
wxSTC_EIFFEL_DEFAULT = 0
wxSTC_EIFFEL_COMMENTLINE :: Int
wxSTC_EIFFEL_COMMENTLINE = 1
wxSTC_EIFFEL_NUMBER :: Int
wxSTC_EIFFEL_NUMBER = 2
wxSTC_EIFFEL_WORD :: Int
wxSTC_EIFFEL_WORD = 3
wxSTC_EIFFEL_STRING :: Int
wxSTC_EIFFEL_STRING = 4
wxSTC_EIFFEL_CHARACTER :: Int
wxSTC_EIFFEL_CHARACTER = 5
wxSTC_EIFFEL_OPERATOR :: Int
wxSTC_EIFFEL_OPERATOR = 6
wxSTC_EIFFEL_IDENTIFIER :: Int
wxSTC_EIFFEL_IDENTIFIER = 7
wxSTC_EIFFEL_STRINGEOL :: Int
wxSTC_EIFFEL_STRINGEOL = 8
wxSTC_NNCRONTAB_DEFAULT :: Int
wxSTC_NNCRONTAB_DEFAULT = 0
wxSTC_NNCRONTAB_COMMENT :: Int
wxSTC_NNCRONTAB_COMMENT = 1
wxSTC_NNCRONTAB_TASK :: Int
wxSTC_NNCRONTAB_TASK = 2
wxSTC_NNCRONTAB_SECTION :: Int
wxSTC_NNCRONTAB_SECTION = 3
wxSTC_NNCRONTAB_KEYWORD :: Int
wxSTC_NNCRONTAB_KEYWORD = 4
wxSTC_NNCRONTAB_MODIFIER :: Int
wxSTC_NNCRONTAB_MODIFIER = 5
wxSTC_NNCRONTAB_ASTERISK :: Int
wxSTC_NNCRONTAB_ASTERISK = 6
wxSTC_NNCRONTAB_NUMBER :: Int
wxSTC_NNCRONTAB_NUMBER = 7
wxSTC_NNCRONTAB_STRING :: Int
wxSTC_NNCRONTAB_STRING = 8
wxSTC_NNCRONTAB_ENVIRONMENT :: Int
wxSTC_NNCRONTAB_ENVIRONMENT = 9
wxSTC_NNCRONTAB_IDENTIFIER :: Int
wxSTC_NNCRONTAB_IDENTIFIER = 10
wxSTC_MATLAB_DEFAULT :: Int
wxSTC_MATLAB_DEFAULT = 0
wxSTC_MATLAB_COMMENT :: Int
wxSTC_MATLAB_COMMENT = 1
wxSTC_MATLAB_COMMAND :: Int
wxSTC_MATLAB_COMMAND = 2
wxSTC_MATLAB_NUMBER :: Int
wxSTC_MATLAB_NUMBER = 3
wxSTC_MATLAB_KEYWORD :: Int
wxSTC_MATLAB_KEYWORD = 4
wxSTC_MATLAB_STRING :: Int
wxSTC_MATLAB_STRING = 5
wxSTC_MATLAB_OPERATOR :: Int
wxSTC_MATLAB_OPERATOR = 6
wxSTC_MATLAB_IDENTIFIER :: Int
wxSTC_MATLAB_IDENTIFIER = 7
wxSTC_SCRIPTOL_DEFAULT :: Int
wxSTC_SCRIPTOL_DEFAULT = 0
wxSTC_SCRIPTOL_COMMENT :: Int
wxSTC_SCRIPTOL_COMMENT = 1
wxSTC_SCRIPTOL_COMMENTLINE :: Int
wxSTC_SCRIPTOL_COMMENTLINE = 2
wxSTC_SCRIPTOL_COMMENTDOC :: Int
wxSTC_SCRIPTOL_COMMENTDOC = 3
wxSTC_SCRIPTOL_NUMBER :: Int
wxSTC_SCRIPTOL_NUMBER = 4
wxSTC_SCRIPTOL_WORD :: Int
wxSTC_SCRIPTOL_WORD = 5
wxSTC_SCRIPTOL_STRING :: Int
wxSTC_SCRIPTOL_STRING = 6
wxSTC_SCRIPTOL_CHARACTER :: Int
wxSTC_SCRIPTOL_CHARACTER = 7
wxSTC_SCRIPTOL_UUID :: Int
wxSTC_SCRIPTOL_UUID = 8
wxSTC_SCRIPTOL_PREPROCESSOR :: Int
wxSTC_SCRIPTOL_PREPROCESSOR = 9
wxSTC_SCRIPTOL_OPERATOR :: Int
wxSTC_SCRIPTOL_OPERATOR = 10
wxSTC_SCRIPTOL_IDENTIFIER :: Int
wxSTC_SCRIPTOL_IDENTIFIER = 11
wxSTC_SCRIPTOL_STRINGEOL :: Int
wxSTC_SCRIPTOL_STRINGEOL = 12
wxSTC_SCRIPTOL_VERBATIM :: Int
wxSTC_SCRIPTOL_VERBATIM = 13
wxSTC_SCRIPTOL_REGEX :: Int
wxSTC_SCRIPTOL_REGEX = 14
wxSTC_SCRIPTOL_COMMENTLINEDOC :: Int
wxSTC_SCRIPTOL_COMMENTLINEDOC = 15
wxSTC_SCRIPTOL_WORD2 :: Int
wxSTC_SCRIPTOL_WORD2 = 16
wxSTC_SCRIPTOL_COMMENTDOCKEYWORD :: Int
wxSTC_SCRIPTOL_COMMENTDOCKEYWORD = 17
wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR :: Int
wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR = 18
wxSTC_SCRIPTOL_COMMENTBASIC :: Int
wxSTC_SCRIPTOL_COMMENTBASIC = 19
wxSTC_ASM_DEFAULT :: Int
wxSTC_ASM_DEFAULT = 0
wxSTC_ASM_COMMENT :: Int
wxSTC_ASM_COMMENT = 1
wxSTC_ASM_NUMBER :: Int
wxSTC_ASM_NUMBER = 2
wxSTC_ASM_STRING :: Int
wxSTC_ASM_STRING = 3
wxSTC_ASM_OPERATOR :: Int
wxSTC_ASM_OPERATOR = 4
wxSTC_ASM_IDENTIFIER :: Int
wxSTC_ASM_IDENTIFIER = 5
wxSTC_ASM_CPUINSTRUCTION :: Int
wxSTC_ASM_CPUINSTRUCTION = 6
wxSTC_ASM_MATHINSTRUCTION :: Int
wxSTC_ASM_MATHINSTRUCTION = 7
wxSTC_ASM_REGISTER :: Int
wxSTC_ASM_REGISTER = 8
wxSTC_ASM_DIRECTIVE :: Int
wxSTC_ASM_DIRECTIVE = 9
wxSTC_ASM_DIRECTIVEOPERAND :: Int
wxSTC_ASM_DIRECTIVEOPERAND = 10
wxSTC_F_DEFAULT :: Int
wxSTC_F_DEFAULT = 0
wxSTC_F_COMMENT :: Int
wxSTC_F_COMMENT = 1
wxSTC_F_NUMBER :: Int
wxSTC_F_NUMBER = 2
wxSTC_F_STRING1 :: Int
wxSTC_F_STRING1 = 3
wxSTC_F_STRING2 :: Int
wxSTC_F_STRING2 = 4
wxSTC_F_STRINGEOL :: Int
wxSTC_F_STRINGEOL = 5
wxSTC_F_OPERATOR :: Int
wxSTC_F_OPERATOR = 6
wxSTC_F_IDENTIFIER :: Int
wxSTC_F_IDENTIFIER = 7
wxSTC_F_WORD :: Int
wxSTC_F_WORD = 8
wxSTC_F_WORD2 :: Int
wxSTC_F_WORD2 = 9
wxSTC_F_WORD3 :: Int
wxSTC_F_WORD3 = 10
wxSTC_F_PREPROCESSOR :: Int
wxSTC_F_PREPROCESSOR = 11
wxSTC_F_OPERATOR2 :: Int
wxSTC_F_OPERATOR2 = 12
wxSTC_F_LABEL :: Int
wxSTC_F_LABEL = 13
wxSTC_F_CONTINUATION :: Int
wxSTC_F_CONTINUATION = 14
wxSTC_CSS_DEFAULT :: Int
wxSTC_CSS_DEFAULT = 0
wxSTC_CSS_TAG :: Int
wxSTC_CSS_TAG = 1
wxSTC_CSS_CLASS :: Int
wxSTC_CSS_CLASS = 2
wxSTC_CSS_PSEUDOCLASS :: Int
wxSTC_CSS_PSEUDOCLASS = 3
wxSTC_CSS_UNKNOWN_PSEUDOCLASS :: Int
wxSTC_CSS_UNKNOWN_PSEUDOCLASS = 4
wxSTC_CSS_OPERATOR :: Int
wxSTC_CSS_OPERATOR = 5
wxSTC_CSS_IDENTIFIER :: Int
wxSTC_CSS_IDENTIFIER = 6
wxSTC_CSS_UNKNOWN_IDENTIFIER :: Int
wxSTC_CSS_UNKNOWN_IDENTIFIER = 7
wxSTC_CSS_VALUE :: Int
wxSTC_CSS_VALUE = 8
wxSTC_CSS_COMMENT :: Int
wxSTC_CSS_COMMENT = 9
wxSTC_CSS_ID :: Int
wxSTC_CSS_ID = 10
wxSTC_CSS_IMPORTANT :: Int
wxSTC_CSS_IMPORTANT = 11
wxSTC_CSS_DIRECTIVE :: Int
wxSTC_CSS_DIRECTIVE = 12
wxSTC_CSS_DOUBLESTRING :: Int
wxSTC_CSS_DOUBLESTRING = 13
wxSTC_CSS_SINGLESTRING :: Int
wxSTC_CSS_SINGLESTRING = 14
wxSTC_POV_DEFAULT :: Int
wxSTC_POV_DEFAULT = 0
wxSTC_POV_COMMENT :: Int
wxSTC_POV_COMMENT = 1
wxSTC_POV_COMMENTLINE :: Int
wxSTC_POV_COMMENTLINE = 2
wxSTC_POV_NUMBER :: Int
wxSTC_POV_NUMBER = 3
wxSTC_POV_OPERATOR :: Int
wxSTC_POV_OPERATOR = 4
wxSTC_POV_IDENTIFIER :: Int
wxSTC_POV_IDENTIFIER = 5
wxSTC_POV_STRING :: Int
wxSTC_POV_STRING = 6
wxSTC_POV_STRINGEOL :: Int
wxSTC_POV_STRINGEOL = 7
wxSTC_POV_DIRECTIVE :: Int
wxSTC_POV_DIRECTIVE = 8
wxSTC_POV_BADDIRECTIVE :: Int
wxSTC_POV_BADDIRECTIVE = 9
wxSTC_POV_WORD2 :: Int
wxSTC_POV_WORD2 = 10
wxSTC_POV_WORD3 :: Int
wxSTC_POV_WORD3 = 11
wxSTC_POV_WORD4 :: Int
wxSTC_POV_WORD4 = 12
wxSTC_POV_WORD5 :: Int
wxSTC_POV_WORD5 = 13
wxSTC_POV_WORD6 :: Int
wxSTC_POV_WORD6 = 14
wxSTC_POV_WORD7 :: Int
wxSTC_POV_WORD7 = 15
wxSTC_POV_WORD8 :: Int
wxSTC_POV_WORD8 = 16
wxSTC_LOUT_DEFAULT :: Int
wxSTC_LOUT_DEFAULT = 0
wxSTC_LOUT_COMMENT :: Int
wxSTC_LOUT_COMMENT = 1
wxSTC_LOUT_NUMBER :: Int
wxSTC_LOUT_NUMBER = 2
wxSTC_LOUT_WORD :: Int
wxSTC_LOUT_WORD = 3
wxSTC_LOUT_WORD2 :: Int
wxSTC_LOUT_WORD2 = 4
wxSTC_LOUT_WORD3 :: Int
wxSTC_LOUT_WORD3 = 5
wxSTC_LOUT_WORD4 :: Int
wxSTC_LOUT_WORD4 = 6
wxSTC_LOUT_STRING :: Int
wxSTC_LOUT_STRING = 7
wxSTC_LOUT_OPERATOR :: Int
wxSTC_LOUT_OPERATOR = 8
wxSTC_LOUT_IDENTIFIER :: Int
wxSTC_LOUT_IDENTIFIER = 9
wxSTC_LOUT_STRINGEOL :: Int
wxSTC_LOUT_STRINGEOL = 10
wxSTC_ESCRIPT_DEFAULT :: Int
wxSTC_ESCRIPT_DEFAULT = 0
wxSTC_ESCRIPT_COMMENT :: Int
wxSTC_ESCRIPT_COMMENT = 1
wxSTC_ESCRIPT_COMMENTLINE :: Int
wxSTC_ESCRIPT_COMMENTLINE = 2
wxSTC_ESCRIPT_COMMENTDOC :: Int
wxSTC_ESCRIPT_COMMENTDOC = 3
wxSTC_ESCRIPT_NUMBER :: Int
wxSTC_ESCRIPT_NUMBER = 4
wxSTC_ESCRIPT_WORD :: Int
wxSTC_ESCRIPT_WORD = 5
wxSTC_ESCRIPT_STRING :: Int
wxSTC_ESCRIPT_STRING = 6
wxSTC_ESCRIPT_OPERATOR :: Int
wxSTC_ESCRIPT_OPERATOR = 7
wxSTC_ESCRIPT_IDENTIFIER :: Int
wxSTC_ESCRIPT_IDENTIFIER = 8
wxSTC_ESCRIPT_BRACE :: Int
wxSTC_ESCRIPT_BRACE = 9
wxSTC_ESCRIPT_WORD2 :: Int
wxSTC_ESCRIPT_WORD2 = 10
wxSTC_ESCRIPT_WORD3 :: Int
wxSTC_ESCRIPT_WORD3 = 11
wxSTC_PS_DEFAULT :: Int
wxSTC_PS_DEFAULT = 0
wxSTC_PS_COMMENT :: Int
wxSTC_PS_COMMENT = 1
wxSTC_PS_DSC_COMMENT :: Int
wxSTC_PS_DSC_COMMENT = 2
wxSTC_PS_DSC_VALUE :: Int
wxSTC_PS_DSC_VALUE = 3
wxSTC_PS_NUMBER :: Int
wxSTC_PS_NUMBER = 4
wxSTC_PS_NAME :: Int
wxSTC_PS_NAME = 5
wxSTC_PS_KEYWORD :: Int
wxSTC_PS_KEYWORD = 6
wxSTC_PS_LITERAL :: Int
wxSTC_PS_LITERAL = 7
wxSTC_PS_IMMEVAL :: Int
wxSTC_PS_IMMEVAL = 8
wxSTC_PS_PAREN_ARRAY :: Int
wxSTC_PS_PAREN_ARRAY = 9
wxSTC_PS_PAREN_DICT :: Int
wxSTC_PS_PAREN_DICT = 10
wxSTC_PS_PAREN_PROC :: Int
wxSTC_PS_PAREN_PROC = 11
wxSTC_PS_TEXT :: Int
wxSTC_PS_TEXT = 12
wxSTC_PS_HEXSTRING :: Int
wxSTC_PS_HEXSTRING = 13
wxSTC_PS_BASE85STRING :: Int
wxSTC_PS_BASE85STRING = 14
wxSTC_PS_BADSTRINGCHAR :: Int
wxSTC_PS_BADSTRINGCHAR = 15
wxSTC_NSIS_DEFAULT :: Int
wxSTC_NSIS_DEFAULT = 0
wxSTC_NSIS_COMMENT :: Int
wxSTC_NSIS_COMMENT = 1
wxSTC_NSIS_STRINGDQ :: Int
wxSTC_NSIS_STRINGDQ = 2
wxSTC_NSIS_STRINGLQ :: Int
wxSTC_NSIS_STRINGLQ = 3
wxSTC_NSIS_STRINGRQ :: Int
wxSTC_NSIS_STRINGRQ = 4
wxSTC_NSIS_FUNCTION :: Int
wxSTC_NSIS_FUNCTION = 5
wxSTC_NSIS_VARIABLE :: Int
wxSTC_NSIS_VARIABLE = 6
wxSTC_NSIS_LABEL :: Int
wxSTC_NSIS_LABEL = 7
wxSTC_NSIS_USERDEFINED :: Int
wxSTC_NSIS_USERDEFINED = 8
wxSTC_NSIS_SECTIONDEF :: Int
wxSTC_NSIS_SECTIONDEF = 9
wxSTC_NSIS_SUBSECTIONDEF :: Int
wxSTC_NSIS_SUBSECTIONDEF = 10
wxSTC_NSIS_IFDEFINEDEF :: Int
wxSTC_NSIS_IFDEFINEDEF = 11
wxSTC_NSIS_MACRODEF :: Int
wxSTC_NSIS_MACRODEF = 12
wxSTC_NSIS_STRINGVAR :: Int
wxSTC_NSIS_STRINGVAR = 13
wxSTC_MMIXAL_LEADWS :: Int
wxSTC_MMIXAL_LEADWS = 0
wxSTC_MMIXAL_COMMENT :: Int
wxSTC_MMIXAL_COMMENT = 1
wxSTC_MMIXAL_LABEL :: Int
wxSTC_MMIXAL_LABEL = 2
wxSTC_MMIXAL_OPCODE :: Int
wxSTC_MMIXAL_OPCODE = 3
wxSTC_MMIXAL_OPCODE_PRE :: Int
wxSTC_MMIXAL_OPCODE_PRE = 4
wxSTC_MMIXAL_OPCODE_VALID :: Int
wxSTC_MMIXAL_OPCODE_VALID = 5
wxSTC_MMIXAL_OPCODE_UNKNOWN :: Int
wxSTC_MMIXAL_OPCODE_UNKNOWN = 6
wxSTC_MMIXAL_OPCODE_POST :: Int
wxSTC_MMIXAL_OPCODE_POST = 7
wxSTC_MMIXAL_OPERANDS :: Int
wxSTC_MMIXAL_OPERANDS = 8
wxSTC_MMIXAL_NUMBER :: Int
wxSTC_MMIXAL_NUMBER = 9
wxSTC_MMIXAL_REF :: Int
wxSTC_MMIXAL_REF = 10
wxSTC_MMIXAL_CHAR :: Int
wxSTC_MMIXAL_CHAR = 11
wxSTC_MMIXAL_STRING :: Int
wxSTC_MMIXAL_STRING = 12
wxSTC_MMIXAL_REGISTER :: Int
wxSTC_MMIXAL_REGISTER = 13
wxSTC_MMIXAL_HEX :: Int
wxSTC_MMIXAL_HEX = 14
wxSTC_MMIXAL_OPERATOR :: Int
wxSTC_MMIXAL_OPERATOR = 15
wxSTC_MMIXAL_SYMBOL :: Int
wxSTC_MMIXAL_SYMBOL = 16
wxSTC_MMIXAL_INCLUDE :: Int
wxSTC_MMIXAL_INCLUDE = 17
wxSTC_CLW_DEFAULT :: Int
wxSTC_CLW_DEFAULT = 0
wxSTC_CLW_LABEL :: Int
wxSTC_CLW_LABEL = 1
wxSTC_CLW_COMMENT :: Int
wxSTC_CLW_COMMENT = 2
wxSTC_CLW_STRING :: Int
wxSTC_CLW_STRING = 3
wxSTC_CLW_USER_IDENTIFIER :: Int
wxSTC_CLW_USER_IDENTIFIER = 4
wxSTC_CLW_INTEGER_CONSTANT :: Int
wxSTC_CLW_INTEGER_CONSTANT = 5
wxSTC_CLW_REAL_CONSTANT :: Int
wxSTC_CLW_REAL_CONSTANT = 6
wxSTC_CLW_PICTURE_STRING :: Int
wxSTC_CLW_PICTURE_STRING = 7
wxSTC_CLW_KEYWORD :: Int
wxSTC_CLW_KEYWORD = 8
wxSTC_CLW_COMPILER_DIRECTIVE :: Int
wxSTC_CLW_COMPILER_DIRECTIVE = 9
wxSTC_CLW_RUNTIME_EXPRESSIONS :: Int
wxSTC_CLW_RUNTIME_EXPRESSIONS = 10
wxSTC_CLW_BUILTIN_PROCEDURES_FUNCTION :: Int
wxSTC_CLW_BUILTIN_PROCEDURES_FUNCTION = 11
wxSTC_CLW_STRUCTURE_DATA_TYPE :: Int
wxSTC_CLW_STRUCTURE_DATA_TYPE = 12
wxSTC_CLW_ATTRIBUTE :: Int
wxSTC_CLW_ATTRIBUTE = 13
wxSTC_CLW_STANDARD_EQUATE :: Int
wxSTC_CLW_STANDARD_EQUATE = 14
wxSTC_CLW_ERROR :: Int
wxSTC_CLW_ERROR = 15
wxSTC_CLW_DEPRECATED :: Int
wxSTC_CLW_DEPRECATED = 16
wxSTC_LOT_DEFAULT :: Int
wxSTC_LOT_DEFAULT = 0
wxSTC_LOT_HEADER :: Int
wxSTC_LOT_HEADER = 1
wxSTC_LOT_BREAK :: Int
wxSTC_LOT_BREAK = 2
wxSTC_LOT_SET :: Int
wxSTC_LOT_SET = 3
wxSTC_LOT_PASS :: Int
wxSTC_LOT_PASS = 4
wxSTC_LOT_FAIL :: Int
wxSTC_LOT_FAIL = 5
wxSTC_LOT_ABORT :: Int
wxSTC_LOT_ABORT = 6
wxSTC_YAML_DEFAULT :: Int
wxSTC_YAML_DEFAULT = 0
wxSTC_YAML_COMMENT :: Int
wxSTC_YAML_COMMENT = 1
wxSTC_YAML_IDENTIFIER :: Int
wxSTC_YAML_IDENTIFIER = 2
wxSTC_YAML_KEYWORD :: Int
wxSTC_YAML_KEYWORD = 3
wxSTC_YAML_NUMBER :: Int
wxSTC_YAML_NUMBER = 4
wxSTC_YAML_REFERENCE :: Int
wxSTC_YAML_REFERENCE = 5
wxSTC_YAML_DOCUMENT :: Int
wxSTC_YAML_DOCUMENT = 6
wxSTC_YAML_TEXT :: Int
wxSTC_YAML_TEXT = 7
wxSTC_YAML_ERROR :: Int
wxSTC_YAML_ERROR = 8
wxSTC_TEX_DEFAULT :: Int
wxSTC_TEX_DEFAULT = 0
wxSTC_TEX_SPECIAL :: Int
wxSTC_TEX_SPECIAL = 1
wxSTC_TEX_GROUP :: Int
wxSTC_TEX_GROUP = 2
wxSTC_TEX_SYMBOL :: Int
wxSTC_TEX_SYMBOL = 3
wxSTC_TEX_COMMAND :: Int
wxSTC_TEX_COMMAND = 4
wxSTC_TEX_TEXT :: Int
wxSTC_TEX_TEXT = 5
wxSTC_METAPOST_DEFAULT :: Int
wxSTC_METAPOST_DEFAULT = 0
wxSTC_METAPOST_SPECIAL :: Int
wxSTC_METAPOST_SPECIAL = 1
wxSTC_METAPOST_GROUP :: Int
wxSTC_METAPOST_GROUP = 2
wxSTC_METAPOST_SYMBOL :: Int
wxSTC_METAPOST_SYMBOL = 3
wxSTC_METAPOST_COMMAND :: Int
wxSTC_METAPOST_COMMAND = 4
wxSTC_METAPOST_TEXT :: Int
wxSTC_METAPOST_TEXT = 5
wxSTC_METAPOST_EXTRA :: Int
wxSTC_METAPOST_EXTRA = 6
wxSTC_ERLANG_DEFAULT :: Int
wxSTC_ERLANG_DEFAULT = 0
wxSTC_ERLANG_COMMENT :: Int
wxSTC_ERLANG_COMMENT = 1
wxSTC_ERLANG_VARIABLE :: Int
wxSTC_ERLANG_VARIABLE = 2
wxSTC_ERLANG_NUMBER :: Int
wxSTC_ERLANG_NUMBER = 3
wxSTC_ERLANG_KEYWORD :: Int
wxSTC_ERLANG_KEYWORD = 4
wxSTC_ERLANG_STRING :: Int
wxSTC_ERLANG_STRING = 5
wxSTC_ERLANG_OPERATOR :: Int
wxSTC_ERLANG_OPERATOR = 6
wxSTC_ERLANG_ATOM :: Int
wxSTC_ERLANG_ATOM = 7
wxSTC_ERLANG_FUNCTION_NAME :: Int
wxSTC_ERLANG_FUNCTION_NAME = 8
wxSTC_ERLANG_CHARACTER :: Int
wxSTC_ERLANG_CHARACTER = 9
wxSTC_ERLANG_MACRO :: Int
wxSTC_ERLANG_MACRO = 10
wxSTC_ERLANG_RECORD :: Int
wxSTC_ERLANG_RECORD = 11
wxSTC_ERLANG_SEPARATOR :: Int
wxSTC_ERLANG_SEPARATOR = 12
wxSTC_ERLANG_NODE_NAME :: Int
wxSTC_ERLANG_NODE_NAME = 13
wxSTC_ERLANG_UNKNOWN :: Int
wxSTC_ERLANG_UNKNOWN = 31
wxSTC_MSSQL_DEFAULT :: Int
wxSTC_MSSQL_DEFAULT = 0
wxSTC_MSSQL_COMMENT :: Int
wxSTC_MSSQL_COMMENT = 1
wxSTC_MSSQL_LINE_COMMENT :: Int
wxSTC_MSSQL_LINE_COMMENT = 2
wxSTC_MSSQL_NUMBER :: Int
wxSTC_MSSQL_NUMBER = 3
wxSTC_MSSQL_STRING :: Int
wxSTC_MSSQL_STRING = 4
wxSTC_MSSQL_OPERATOR :: Int
wxSTC_MSSQL_OPERATOR = 5
wxSTC_MSSQL_IDENTIFIER :: Int
wxSTC_MSSQL_IDENTIFIER = 6
wxSTC_MSSQL_VARIABLE :: Int
wxSTC_MSSQL_VARIABLE = 7
wxSTC_MSSQL_COLUMN_NAME :: Int
wxSTC_MSSQL_COLUMN_NAME = 8
wxSTC_MSSQL_STATEMENT :: Int
wxSTC_MSSQL_STATEMENT = 9
wxSTC_MSSQL_DATATYPE :: Int
wxSTC_MSSQL_DATATYPE = 10
wxSTC_MSSQL_SYSTABLE :: Int
wxSTC_MSSQL_SYSTABLE = 11
wxSTC_MSSQL_GLOBAL_VARIABLE :: Int
wxSTC_MSSQL_GLOBAL_VARIABLE = 12
wxSTC_MSSQL_FUNCTION :: Int
wxSTC_MSSQL_FUNCTION = 13
wxSTC_MSSQL_STORED_PROCEDURE :: Int
wxSTC_MSSQL_STORED_PROCEDURE = 14
wxSTC_MSSQL_DEFAULT_PREF_DATATYPE :: Int
wxSTC_MSSQL_DEFAULT_PREF_DATATYPE = 15
wxSTC_MSSQL_COLUMN_NAME_2 :: Int
wxSTC_MSSQL_COLUMN_NAME_2 = 16
wxSTC_V_DEFAULT :: Int
wxSTC_V_DEFAULT = 0
wxSTC_V_COMMENT :: Int
wxSTC_V_COMMENT = 1
wxSTC_V_COMMENTLINE :: Int
wxSTC_V_COMMENTLINE = 2
wxSTC_V_COMMENTLINEBANG :: Int
wxSTC_V_COMMENTLINEBANG = 3
wxSTC_V_NUMBER :: Int
wxSTC_V_NUMBER = 4
wxSTC_V_WORD :: Int
wxSTC_V_WORD = 5
wxSTC_V_STRING :: Int
wxSTC_V_STRING = 6
wxSTC_V_WORD2 :: Int
wxSTC_V_WORD2 = 7
wxSTC_V_WORD3 :: Int
wxSTC_V_WORD3 = 8
wxSTC_V_PREPROCESSOR :: Int
wxSTC_V_PREPROCESSOR = 9
wxSTC_V_OPERATOR :: Int
wxSTC_V_OPERATOR = 10
wxSTC_V_IDENTIFIER :: Int
wxSTC_V_IDENTIFIER = 11
wxSTC_V_STRINGEOL :: Int
wxSTC_V_STRINGEOL = 12
wxSTC_V_USER :: Int
wxSTC_V_USER = 19
wxSTC_KIX_DEFAULT :: Int
wxSTC_KIX_DEFAULT = 0
wxSTC_KIX_COMMENT :: Int
wxSTC_KIX_COMMENT = 1
wxSTC_KIX_STRING1 :: Int
wxSTC_KIX_STRING1 = 2
wxSTC_KIX_STRING2 :: Int
wxSTC_KIX_STRING2 = 3
wxSTC_KIX_NUMBER :: Int
wxSTC_KIX_NUMBER = 4
wxSTC_KIX_VAR :: Int
wxSTC_KIX_VAR = 5
wxSTC_KIX_MACRO :: Int
wxSTC_KIX_MACRO = 6
wxSTC_KIX_KEYWORD :: Int
wxSTC_KIX_KEYWORD = 7
wxSTC_KIX_FUNCTIONS :: Int
wxSTC_KIX_FUNCTIONS = 8
wxSTC_KIX_OPERATOR :: Int
wxSTC_KIX_OPERATOR = 9
wxSTC_KIX_IDENTIFIER :: Int
wxSTC_KIX_IDENTIFIER = 31
wxSTC_GC_DEFAULT :: Int
wxSTC_GC_DEFAULT = 0
wxSTC_GC_COMMENTLINE :: Int
wxSTC_GC_COMMENTLINE = 1
wxSTC_GC_COMMENTBLOCK :: Int
wxSTC_GC_COMMENTBLOCK = 2
wxSTC_GC_GLOBAL :: Int
wxSTC_GC_GLOBAL = 3
wxSTC_GC_EVENT :: Int
wxSTC_GC_EVENT = 4
wxSTC_GC_ATTRIBUTE :: Int
wxSTC_GC_ATTRIBUTE = 5
wxSTC_GC_CONTROL :: Int
wxSTC_GC_CONTROL = 6
wxSTC_GC_COMMAND :: Int
wxSTC_GC_COMMAND = 7
wxSTC_GC_STRING :: Int
wxSTC_GC_STRING = 8
wxSTC_GC_OPERATOR :: Int
wxSTC_GC_OPERATOR = 9
wxSTC_SN_DEFAULT :: Int
wxSTC_SN_DEFAULT = 0
wxSTC_SN_CODE :: Int
wxSTC_SN_CODE = 1
wxSTC_SN_COMMENTLINE :: Int
wxSTC_SN_COMMENTLINE = 2
wxSTC_SN_COMMENTLINEBANG :: Int
wxSTC_SN_COMMENTLINEBANG = 3
wxSTC_SN_NUMBER :: Int
wxSTC_SN_NUMBER = 4
wxSTC_SN_WORD :: Int
wxSTC_SN_WORD = 5
wxSTC_SN_STRING :: Int
wxSTC_SN_STRING = 6
wxSTC_SN_WORD2 :: Int
wxSTC_SN_WORD2 = 7
wxSTC_SN_WORD3 :: Int
wxSTC_SN_WORD3 = 8
wxSTC_SN_PREPROCESSOR :: Int
wxSTC_SN_PREPROCESSOR = 9
wxSTC_SN_OPERATOR :: Int
wxSTC_SN_OPERATOR = 10
wxSTC_SN_IDENTIFIER :: Int
wxSTC_SN_IDENTIFIER = 11
wxSTC_SN_STRINGEOL :: Int
wxSTC_SN_STRINGEOL = 12
wxSTC_SN_REGEXTAG :: Int
wxSTC_SN_REGEXTAG = 13
wxSTC_SN_SIGNAL :: Int
wxSTC_SN_SIGNAL = 14
wxSTC_SN_USER :: Int
wxSTC_SN_USER = 19
wxSTC_AU3_DEFAULT :: Int
wxSTC_AU3_DEFAULT = 0
wxSTC_AU3_COMMENT :: Int
wxSTC_AU3_COMMENT = 1
wxSTC_AU3_COMMENTBLOCK :: Int
wxSTC_AU3_COMMENTBLOCK = 2
wxSTC_AU3_NUMBER :: Int
wxSTC_AU3_NUMBER = 3
wxSTC_AU3_FUNCTION :: Int
wxSTC_AU3_FUNCTION = 4
wxSTC_AU3_KEYWORD :: Int
wxSTC_AU3_KEYWORD = 5
wxSTC_AU3_MACRO :: Int
wxSTC_AU3_MACRO = 6
wxSTC_AU3_STRING :: Int
wxSTC_AU3_STRING = 7
wxSTC_AU3_OPERATOR :: Int
wxSTC_AU3_OPERATOR = 8
wxSTC_AU3_VARIABLE :: Int
wxSTC_AU3_VARIABLE = 9
wxSTC_AU3_SENT :: Int
wxSTC_AU3_SENT = 10
wxSTC_AU3_PREPROCESSOR :: Int
wxSTC_AU3_PREPROCESSOR = 11
wxSTC_AU3_SPECIAL :: Int
wxSTC_AU3_SPECIAL = 12
wxSTC_AU3_EXPAND :: Int
wxSTC_AU3_EXPAND = 13
wxSTC_AU3_COMOBJ :: Int
wxSTC_AU3_COMOBJ = 14
wxSTC_APDL_DEFAULT :: Int
wxSTC_APDL_DEFAULT = 0
wxSTC_APDL_COMMENT :: Int
wxSTC_APDL_COMMENT = 1
wxSTC_APDL_COMMENTBLOCK :: Int
wxSTC_APDL_COMMENTBLOCK = 2
wxSTC_APDL_NUMBER :: Int
wxSTC_APDL_NUMBER = 3
wxSTC_APDL_STRING :: Int
wxSTC_APDL_STRING = 4
wxSTC_APDL_OPERATOR :: Int
wxSTC_APDL_OPERATOR = 5
wxSTC_APDL_WORD :: Int
wxSTC_APDL_WORD = 6
wxSTC_APDL_PROCESSOR :: Int
wxSTC_APDL_PROCESSOR = 7
wxSTC_APDL_COMMAND :: Int
wxSTC_APDL_COMMAND = 8
wxSTC_APDL_SLASHCOMMAND :: Int
wxSTC_APDL_SLASHCOMMAND = 9
wxSTC_APDL_STARCOMMAND :: Int
wxSTC_APDL_STARCOMMAND = 10
wxSTC_APDL_ARGUMENT :: Int
wxSTC_APDL_ARGUMENT = 11
wxSTC_APDL_FUNCTION :: Int
wxSTC_APDL_FUNCTION = 12
wxSTC_SH_DEFAULT :: Int
wxSTC_SH_DEFAULT = 0
wxSTC_SH_ERROR :: Int
wxSTC_SH_ERROR = 1
wxSTC_SH_COMMENTLINE :: Int
wxSTC_SH_COMMENTLINE = 2
wxSTC_SH_NUMBER :: Int
wxSTC_SH_NUMBER = 3
wxSTC_SH_WORD :: Int
wxSTC_SH_WORD = 4
wxSTC_SH_STRING :: Int
wxSTC_SH_STRING = 5
wxSTC_SH_CHARACTER :: Int
wxSTC_SH_CHARACTER = 6
wxSTC_SH_OPERATOR :: Int
wxSTC_SH_OPERATOR = 7
wxSTC_SH_IDENTIFIER :: Int
wxSTC_SH_IDENTIFIER = 8
wxSTC_SH_SCALAR :: Int
wxSTC_SH_SCALAR = 9
wxSTC_SH_PARAM :: Int
wxSTC_SH_PARAM = 10
wxSTC_SH_BACKTICKS :: Int
wxSTC_SH_BACKTICKS = 11
wxSTC_SH_HERE_DELIM :: Int
wxSTC_SH_HERE_DELIM = 12
wxSTC_SH_HERE_Q :: Int
wxSTC_SH_HERE_Q = 13
wxSTC_ASN1_DEFAULT :: Int
wxSTC_ASN1_DEFAULT = 0
wxSTC_ASN1_COMMENT :: Int
wxSTC_ASN1_COMMENT = 1
wxSTC_ASN1_IDENTIFIER :: Int
wxSTC_ASN1_IDENTIFIER = 2
wxSTC_ASN1_STRING :: Int
wxSTC_ASN1_STRING = 3
wxSTC_ASN1_OID :: Int
wxSTC_ASN1_OID = 4
wxSTC_ASN1_SCALAR :: Int
wxSTC_ASN1_SCALAR = 5
wxSTC_ASN1_KEYWORD :: Int
wxSTC_ASN1_KEYWORD = 6
wxSTC_ASN1_ATTRIBUTE :: Int
wxSTC_ASN1_ATTRIBUTE = 7
wxSTC_ASN1_DESCRIPTOR :: Int
wxSTC_ASN1_DESCRIPTOR = 8
wxSTC_ASN1_TYPE :: Int
wxSTC_ASN1_TYPE = 9
wxSTC_ASN1_OPERATOR :: Int
wxSTC_ASN1_OPERATOR = 10
wxSTC_VHDL_DEFAULT :: Int
wxSTC_VHDL_DEFAULT = 0
wxSTC_VHDL_COMMENT :: Int
wxSTC_VHDL_COMMENT = 1
wxSTC_VHDL_COMMENTLINEBANG :: Int
wxSTC_VHDL_COMMENTLINEBANG = 2
wxSTC_VHDL_NUMBER :: Int
wxSTC_VHDL_NUMBER = 3
wxSTC_VHDL_STRING :: Int
wxSTC_VHDL_STRING = 4
wxSTC_VHDL_OPERATOR :: Int
wxSTC_VHDL_OPERATOR = 5
wxSTC_VHDL_IDENTIFIER :: Int
wxSTC_VHDL_IDENTIFIER = 6
wxSTC_VHDL_STRINGEOL :: Int
wxSTC_VHDL_STRINGEOL = 7
wxSTC_VHDL_KEYWORD :: Int
wxSTC_VHDL_KEYWORD = 8
wxSTC_VHDL_STDOPERATOR :: Int
wxSTC_VHDL_STDOPERATOR = 9
wxSTC_VHDL_ATTRIBUTE :: Int
wxSTC_VHDL_ATTRIBUTE = 10
wxSTC_VHDL_STDFUNCTION :: Int
wxSTC_VHDL_STDFUNCTION = 11
wxSTC_VHDL_STDPACKAGE :: Int
wxSTC_VHDL_STDPACKAGE = 12
wxSTC_VHDL_STDTYPE :: Int
wxSTC_VHDL_STDTYPE = 13
wxSTC_VHDL_USERWORD :: Int
wxSTC_VHDL_USERWORD = 14
wxSTC_CAML_DEFAULT :: Int
wxSTC_CAML_DEFAULT = 0
wxSTC_CAML_IDENTIFIER :: Int
wxSTC_CAML_IDENTIFIER = 1
wxSTC_CAML_TAGNAME :: Int
wxSTC_CAML_TAGNAME = 2
wxSTC_CAML_KEYWORD :: Int
wxSTC_CAML_KEYWORD = 3
wxSTC_CAML_KEYWORD2 :: Int
wxSTC_CAML_KEYWORD2 = 4
wxSTC_CAML_KEYWORD3 :: Int
wxSTC_CAML_KEYWORD3 = 5
wxSTC_CAML_LINENUM :: Int
wxSTC_CAML_LINENUM = 6
wxSTC_CAML_OPERATOR :: Int
wxSTC_CAML_OPERATOR = 7
wxSTC_CAML_NUMBER :: Int
wxSTC_CAML_NUMBER = 8
wxSTC_CAML_CHAR :: Int
wxSTC_CAML_CHAR = 9
wxSTC_CAML_STRING :: Int
wxSTC_CAML_STRING = 11
wxSTC_CAML_COMMENT :: Int
wxSTC_CAML_COMMENT = 12
wxSTC_CAML_COMMENT1 :: Int
wxSTC_CAML_COMMENT1 = 13
wxSTC_CAML_COMMENT2 :: Int
wxSTC_CAML_COMMENT2 = 14
wxSTC_CAML_COMMENT3 :: Int
wxSTC_CAML_COMMENT3 = 15
wxSTC_T3_DEFAULT :: Int
wxSTC_T3_DEFAULT = 0
wxSTC_T3_X_DEFAULT :: Int
wxSTC_T3_X_DEFAULT = 1
wxSTC_T3_PREPROCESSOR :: Int
wxSTC_T3_PREPROCESSOR = 2
wxSTC_T3_BLOCK_COMMENT :: Int
wxSTC_T3_BLOCK_COMMENT = 3
wxSTC_T3_LINE_COMMENT :: Int
wxSTC_T3_LINE_COMMENT = 4
wxSTC_T3_OPERATOR :: Int
wxSTC_T3_OPERATOR = 5
wxSTC_T3_KEYWORD :: Int
wxSTC_T3_KEYWORD = 6
wxSTC_T3_NUMBER :: Int
wxSTC_T3_NUMBER = 7
wxSTC_T3_IDENTIFIER :: Int
wxSTC_T3_IDENTIFIER = 8
wxSTC_T3_S_STRING :: Int
wxSTC_T3_S_STRING = 9
wxSTC_T3_D_STRING :: Int
wxSTC_T3_D_STRING = 10
wxSTC_T3_X_STRING :: Int
wxSTC_T3_X_STRING = 11
wxSTC_T3_LIB_DIRECTIVE :: Int
wxSTC_T3_LIB_DIRECTIVE = 12
wxSTC_T3_MSG_PARAM :: Int
wxSTC_T3_MSG_PARAM = 13
wxSTC_T3_HTML_TAG :: Int
wxSTC_T3_HTML_TAG = 14
wxSTC_T3_HTML_DEFAULT :: Int
wxSTC_T3_HTML_DEFAULT = 15
wxSTC_T3_HTML_STRING :: Int
wxSTC_T3_HTML_STRING = 16
wxSTC_T3_USER1 :: Int
wxSTC_T3_USER1 = 17
wxSTC_T3_USER2 :: Int
wxSTC_T3_USER2 = 18
wxSTC_T3_USER3 :: Int
wxSTC_T3_USER3 = 19
wxSTC_REBOL_DEFAULT :: Int
wxSTC_REBOL_DEFAULT = 0
wxSTC_REBOL_COMMENTLINE :: Int
wxSTC_REBOL_COMMENTLINE = 1
wxSTC_REBOL_COMMENTBLOCK :: Int
wxSTC_REBOL_COMMENTBLOCK = 2
wxSTC_REBOL_PREFACE :: Int
wxSTC_REBOL_PREFACE = 3
wxSTC_REBOL_OPERATOR :: Int
wxSTC_REBOL_OPERATOR = 4
wxSTC_REBOL_CHARACTER :: Int
wxSTC_REBOL_CHARACTER = 5
wxSTC_REBOL_QUOTEDSTRING :: Int
wxSTC_REBOL_QUOTEDSTRING = 6
wxSTC_REBOL_BRACEDSTRING :: Int
wxSTC_REBOL_BRACEDSTRING = 7
wxSTC_REBOL_NUMBER :: Int
wxSTC_REBOL_NUMBER = 8
wxSTC_REBOL_PAIR :: Int
wxSTC_REBOL_PAIR = 9
wxSTC_REBOL_TUPLE :: Int
wxSTC_REBOL_TUPLE = 10
wxSTC_REBOL_BINARY :: Int
wxSTC_REBOL_BINARY = 11
wxSTC_REBOL_MONEY :: Int
wxSTC_REBOL_MONEY = 12
wxSTC_REBOL_ISSUE :: Int
wxSTC_REBOL_ISSUE = 13
wxSTC_REBOL_TAG :: Int
wxSTC_REBOL_TAG = 14
wxSTC_REBOL_FILE :: Int
wxSTC_REBOL_FILE = 15
wxSTC_REBOL_EMAIL :: Int
wxSTC_REBOL_EMAIL = 16
wxSTC_REBOL_URL :: Int
wxSTC_REBOL_URL = 17
wxSTC_REBOL_DATE :: Int
wxSTC_REBOL_DATE = 18
wxSTC_REBOL_TIME :: Int
wxSTC_REBOL_TIME = 19
wxSTC_REBOL_IDENTIFIER :: Int
wxSTC_REBOL_IDENTIFIER = 20
wxSTC_REBOL_WORD :: Int
wxSTC_REBOL_WORD = 21
wxSTC_REBOL_WORD2 :: Int
wxSTC_REBOL_WORD2 = 22
wxSTC_REBOL_WORD3 :: Int
wxSTC_REBOL_WORD3 = 23
wxSTC_REBOL_WORD4 :: Int
wxSTC_REBOL_WORD4 = 24
wxSTC_REBOL_WORD5 :: Int
wxSTC_REBOL_WORD5 = 25
wxSTC_REBOL_WORD6 :: Int
wxSTC_REBOL_WORD6 = 26
wxSTC_REBOL_WORD7 :: Int
wxSTC_REBOL_WORD7 = 27
wxSTC_REBOL_WORD8 :: Int
wxSTC_REBOL_WORD8 = 28
wxSTC_SQL_DEFAULT :: Int
wxSTC_SQL_DEFAULT = 0
wxSTC_SQL_COMMENT :: Int
wxSTC_SQL_COMMENT = 1
wxSTC_SQL_COMMENTLINE :: Int
wxSTC_SQL_COMMENTLINE = 2
wxSTC_SQL_COMMENTDOC :: Int
wxSTC_SQL_COMMENTDOC = 3
wxSTC_SQL_NUMBER :: Int
wxSTC_SQL_NUMBER = 4
wxSTC_SQL_WORD :: Int
wxSTC_SQL_WORD = 5
wxSTC_SQL_STRING :: Int
wxSTC_SQL_STRING = 6
wxSTC_SQL_CHARACTER :: Int
wxSTC_SQL_CHARACTER = 7
wxSTC_SQL_SQLPLUS :: Int
wxSTC_SQL_SQLPLUS = 8
wxSTC_SQL_SQLPLUS_PROMPT :: Int
wxSTC_SQL_SQLPLUS_PROMPT = 9
wxSTC_SQL_OPERATOR :: Int
wxSTC_SQL_OPERATOR = 10
wxSTC_SQL_IDENTIFIER :: Int
wxSTC_SQL_IDENTIFIER = 11
wxSTC_SQL_SQLPLUS_COMMENT :: Int
wxSTC_SQL_SQLPLUS_COMMENT = 13
wxSTC_SQL_COMMENTLINEDOC :: Int
wxSTC_SQL_COMMENTLINEDOC = 15
wxSTC_SQL_WORD2 :: Int
wxSTC_SQL_WORD2 = 16
wxSTC_SQL_COMMENTDOCKEYWORD :: Int
wxSTC_SQL_COMMENTDOCKEYWORD = 17
wxSTC_SQL_COMMENTDOCKEYWORDERROR :: Int
wxSTC_SQL_COMMENTDOCKEYWORDERROR = 18
wxSTC_SQL_USER1 :: Int
wxSTC_SQL_USER1 = 19
wxSTC_SQL_USER2 :: Int
wxSTC_SQL_USER2 = 20
wxSTC_SQL_USER3 :: Int
wxSTC_SQL_USER3 = 21
wxSTC_SQL_USER4 :: Int
wxSTC_SQL_USER4 = 22
wxSTC_SQL_QUOTEDIDENTIFIER :: Int
wxSTC_SQL_QUOTEDIDENTIFIER = 23
wxSTC_ST_DEFAULT :: Int
wxSTC_ST_DEFAULT = 0
wxSTC_ST_STRING :: Int
wxSTC_ST_STRING = 1
wxSTC_ST_NUMBER :: Int
wxSTC_ST_NUMBER = 2
wxSTC_ST_COMMENT :: Int
wxSTC_ST_COMMENT = 3
wxSTC_ST_SYMBOL :: Int
wxSTC_ST_SYMBOL = 4
wxSTC_ST_BINARY :: Int
wxSTC_ST_BINARY = 5
wxSTC_ST_BOOL :: Int
wxSTC_ST_BOOL = 6
wxSTC_ST_SELF :: Int
wxSTC_ST_SELF = 7
wxSTC_ST_SUPER :: Int
wxSTC_ST_SUPER = 8
wxSTC_ST_NIL :: Int
wxSTC_ST_NIL = 9
wxSTC_ST_GLOBAL :: Int
wxSTC_ST_GLOBAL = 10
wxSTC_ST_RETURN :: Int
wxSTC_ST_RETURN = 11
wxSTC_ST_SPECIAL :: Int
wxSTC_ST_SPECIAL = 12
wxSTC_ST_KWSEND :: Int
wxSTC_ST_KWSEND = 13
wxSTC_ST_ASSIGN :: Int
wxSTC_ST_ASSIGN = 14
wxSTC_ST_CHARACTER :: Int
wxSTC_ST_CHARACTER = 15
wxSTC_ST_SPEC_SEL :: Int
wxSTC_ST_SPEC_SEL = 16
wxSTC_FS_DEFAULT :: Int
wxSTC_FS_DEFAULT = 0
wxSTC_FS_COMMENT :: Int
wxSTC_FS_COMMENT = 1
wxSTC_FS_COMMENTLINE :: Int
wxSTC_FS_COMMENTLINE = 2
wxSTC_FS_COMMENTDOC :: Int
wxSTC_FS_COMMENTDOC = 3
wxSTC_FS_COMMENTLINEDOC :: Int
wxSTC_FS_COMMENTLINEDOC = 4
wxSTC_FS_COMMENTDOCKEYWORD :: Int
wxSTC_FS_COMMENTDOCKEYWORD = 5
wxSTC_FS_COMMENTDOCKEYWORDERROR :: Int
wxSTC_FS_COMMENTDOCKEYWORDERROR = 6
wxSTC_FS_KEYWORD :: Int
wxSTC_FS_KEYWORD = 7
wxSTC_FS_KEYWORD2 :: Int
wxSTC_FS_KEYWORD2 = 8
wxSTC_FS_KEYWORD3 :: Int
wxSTC_FS_KEYWORD3 = 9
wxSTC_FS_KEYWORD4 :: Int
wxSTC_FS_KEYWORD4 = 10
wxSTC_FS_NUMBER :: Int
wxSTC_FS_NUMBER = 11
wxSTC_FS_STRING :: Int
wxSTC_FS_STRING = 12
wxSTC_FS_PREPROCESSOR :: Int
wxSTC_FS_PREPROCESSOR = 13
wxSTC_FS_OPERATOR :: Int
wxSTC_FS_OPERATOR = 14
wxSTC_FS_IDENTIFIER :: Int
wxSTC_FS_IDENTIFIER = 15
wxSTC_FS_DATE :: Int
wxSTC_FS_DATE = 16
wxSTC_FS_STRINGEOL :: Int
wxSTC_FS_STRINGEOL = 17
wxSTC_FS_CONSTANT :: Int
wxSTC_FS_CONSTANT = 18
wxSTC_FS_ASM :: Int
wxSTC_FS_ASM = 19
wxSTC_FS_LABEL :: Int
wxSTC_FS_LABEL = 20
wxSTC_FS_ERROR :: Int
wxSTC_FS_ERROR = 21
wxSTC_FS_HEXNUMBER :: Int
wxSTC_FS_HEXNUMBER = 22
wxSTC_FS_BINNUMBER :: Int
wxSTC_FS_BINNUMBER = 23
wxSTC_CSOUND_DEFAULT :: Int
wxSTC_CSOUND_DEFAULT = 0
wxSTC_CSOUND_COMMENT :: Int
wxSTC_CSOUND_COMMENT = 1
wxSTC_CSOUND_NUMBER :: Int
wxSTC_CSOUND_NUMBER = 2
wxSTC_CSOUND_OPERATOR :: Int
wxSTC_CSOUND_OPERATOR = 3
wxSTC_CSOUND_INSTR :: Int
wxSTC_CSOUND_INSTR = 4
wxSTC_CSOUND_IDENTIFIER :: Int
wxSTC_CSOUND_IDENTIFIER = 5
wxSTC_CSOUND_OPCODE :: Int
wxSTC_CSOUND_OPCODE = 6
wxSTC_CSOUND_HEADERSTMT :: Int
wxSTC_CSOUND_HEADERSTMT = 7
wxSTC_CSOUND_USERKEYWORD :: Int
wxSTC_CSOUND_USERKEYWORD = 8
wxSTC_CSOUND_COMMENTBLOCK :: Int
wxSTC_CSOUND_COMMENTBLOCK = 9
wxSTC_CSOUND_PARAM :: Int
wxSTC_CSOUND_PARAM = 10
wxSTC_CSOUND_ARATE_VAR :: Int
wxSTC_CSOUND_ARATE_VAR = 11
wxSTC_CSOUND_KRATE_VAR :: Int
wxSTC_CSOUND_KRATE_VAR = 12
wxSTC_CSOUND_IRATE_VAR :: Int
wxSTC_CSOUND_IRATE_VAR = 13
wxSTC_CSOUND_GLOBAL_VAR :: Int
wxSTC_CSOUND_GLOBAL_VAR = 14
wxSTC_CSOUND_STRINGEOL :: Int
wxSTC_CSOUND_STRINGEOL = 15
wxSTC_CMD_REDO :: Int
wxSTC_CMD_REDO = 2011
wxSTC_CMD_SELECTALL :: Int
wxSTC_CMD_SELECTALL = 2013
wxSTC_CMD_UNDO :: Int
wxSTC_CMD_UNDO = 2176
wxSTC_CMD_CUT :: Int
wxSTC_CMD_CUT = 2177
wxSTC_CMD_COPY :: Int
wxSTC_CMD_COPY = 2178
wxSTC_CMD_PASTE :: Int
wxSTC_CMD_PASTE = 2179
wxSTC_CMD_CLEAR :: Int
wxSTC_CMD_CLEAR = 2180
wxSTC_CMD_LINEDOWN :: Int
wxSTC_CMD_LINEDOWN = 2300
wxSTC_CMD_LINEDOWNEXTEND :: Int
wxSTC_CMD_LINEDOWNEXTEND = 2301
wxSTC_CMD_LINEUP :: Int
wxSTC_CMD_LINEUP = 2302
wxSTC_CMD_LINEUPEXTEND :: Int
wxSTC_CMD_LINEUPEXTEND = 2303
wxSTC_CMD_CHARLEFT :: Int
wxSTC_CMD_CHARLEFT = 2304
wxSTC_CMD_CHARLEFTEXTEND :: Int
wxSTC_CMD_CHARLEFTEXTEND = 2305
wxSTC_CMD_CHARRIGHT :: Int
wxSTC_CMD_CHARRIGHT = 2306
wxSTC_CMD_CHARRIGHTEXTEND :: Int
wxSTC_CMD_CHARRIGHTEXTEND = 2307
wxSTC_CMD_WORDLEFT :: Int
wxSTC_CMD_WORDLEFT = 2308
wxSTC_CMD_WORDLEFTEXTEND :: Int
wxSTC_CMD_WORDLEFTEXTEND = 2309
wxSTC_CMD_WORDRIGHT :: Int
wxSTC_CMD_WORDRIGHT = 2310
wxSTC_CMD_WORDRIGHTEXTEND :: Int
wxSTC_CMD_WORDRIGHTEXTEND = 2311
wxSTC_CMD_HOME :: Int
wxSTC_CMD_HOME = 2312
wxSTC_CMD_HOMEEXTEND :: Int
wxSTC_CMD_HOMEEXTEND = 2313
wxSTC_CMD_LINEEND :: Int
wxSTC_CMD_LINEEND = 2314
wxSTC_CMD_LINEENDEXTEND :: Int
wxSTC_CMD_LINEENDEXTEND = 2315
wxSTC_CMD_DOCUMENTSTART :: Int
wxSTC_CMD_DOCUMENTSTART = 2316
wxSTC_CMD_DOCUMENTSTARTEXTEND :: Int
wxSTC_CMD_DOCUMENTSTARTEXTEND = 2317
wxSTC_CMD_DOCUMENTEND :: Int
wxSTC_CMD_DOCUMENTEND = 2318
wxSTC_CMD_DOCUMENTENDEXTEND :: Int
wxSTC_CMD_DOCUMENTENDEXTEND = 2319
wxSTC_CMD_PAGEUP :: Int
wxSTC_CMD_PAGEUP = 2320
wxSTC_CMD_PAGEUPEXTEND :: Int
wxSTC_CMD_PAGEUPEXTEND = 2321
wxSTC_CMD_PAGEDOWN :: Int
wxSTC_CMD_PAGEDOWN = 2322
wxSTC_CMD_PAGEDOWNEXTEND :: Int
wxSTC_CMD_PAGEDOWNEXTEND = 2323
wxSTC_CMD_EDITTOGGLEOVERTYPE :: Int
wxSTC_CMD_EDITTOGGLEOVERTYPE = 2324
wxSTC_CMD_CANCEL :: Int
wxSTC_CMD_CANCEL = 2325
wxSTC_CMD_DELETEBACK :: Int
wxSTC_CMD_DELETEBACK = 2326
wxSTC_CMD_TAB :: Int
wxSTC_CMD_TAB = 2327
wxSTC_CMD_BACKTAB :: Int
wxSTC_CMD_BACKTAB = 2328
wxSTC_CMD_NEWLINE :: Int
wxSTC_CMD_NEWLINE = 2329
wxSTC_CMD_FORMFEED :: Int
wxSTC_CMD_FORMFEED = 2330
wxSTC_CMD_VCHOME :: Int
wxSTC_CMD_VCHOME = 2331
wxSTC_CMD_VCHOMEEXTEND :: Int
wxSTC_CMD_VCHOMEEXTEND = 2332
wxSTC_CMD_ZOOMIN :: Int
wxSTC_CMD_ZOOMIN = 2333
wxSTC_CMD_ZOOMOUT :: Int
wxSTC_CMD_ZOOMOUT = 2334
wxSTC_CMD_DELWORDLEFT :: Int
wxSTC_CMD_DELWORDLEFT = 2335
wxSTC_CMD_DELWORDRIGHT :: Int
wxSTC_CMD_DELWORDRIGHT = 2336
wxSTC_CMD_LINECUT :: Int
wxSTC_CMD_LINECUT = 2337
wxSTC_CMD_LINEDELETE :: Int
wxSTC_CMD_LINEDELETE = 2338
wxSTC_CMD_LINETRANSPOSE :: Int
wxSTC_CMD_LINETRANSPOSE = 2339
wxSTC_CMD_LINEDUPLICATE :: Int
wxSTC_CMD_LINEDUPLICATE = 2404
wxSTC_CMD_LOWERCASE :: Int
wxSTC_CMD_LOWERCASE = 2340
wxSTC_CMD_UPPERCASE :: Int
wxSTC_CMD_UPPERCASE = 2341
wxSTC_CMD_LINESCROLLDOWN :: Int
wxSTC_CMD_LINESCROLLDOWN = 2342
wxSTC_CMD_LINESCROLLUP :: Int
wxSTC_CMD_LINESCROLLUP = 2343
wxSTC_CMD_DELETEBACKNOTLINE :: Int
wxSTC_CMD_DELETEBACKNOTLINE = 2344
wxSTC_CMD_HOMEDISPLAY :: Int
wxSTC_CMD_HOMEDISPLAY = 2345
wxSTC_CMD_HOMEDISPLAYEXTEND :: Int
wxSTC_CMD_HOMEDISPLAYEXTEND = 2346
wxSTC_CMD_LINEENDDISPLAY :: Int
wxSTC_CMD_LINEENDDISPLAY = 2347
wxSTC_CMD_LINEENDDISPLAYEXTEND :: Int
wxSTC_CMD_LINEENDDISPLAYEXTEND = 2348
wxSTC_CMD_HOMEWRAP :: Int
wxSTC_CMD_HOMEWRAP = 2349
wxSTC_CMD_HOMEWRAPEXTEND :: Int
wxSTC_CMD_HOMEWRAPEXTEND = 2450
wxSTC_CMD_LINEENDWRAP :: Int
wxSTC_CMD_LINEENDWRAP = 2451
wxSTC_CMD_LINEENDWRAPEXTEND :: Int
wxSTC_CMD_LINEENDWRAPEXTEND = 2452
wxSTC_CMD_VCHOMEWRAP :: Int
wxSTC_CMD_VCHOMEWRAP = 2453
wxSTC_CMD_VCHOMEWRAPEXTEND :: Int
wxSTC_CMD_VCHOMEWRAPEXTEND = 2454
wxSTC_CMD_LINECOPY :: Int
wxSTC_CMD_LINECOPY = 2455
wxSTC_CMD_WORDPARTLEFT :: Int
wxSTC_CMD_WORDPARTLEFT = 2390
wxSTC_CMD_WORDPARTLEFTEXTEND :: Int
wxSTC_CMD_WORDPARTLEFTEXTEND = 2391
wxSTC_CMD_WORDPARTRIGHT :: Int
wxSTC_CMD_WORDPARTRIGHT = 2392
wxSTC_CMD_WORDPARTRIGHTEXTEND :: Int
wxSTC_CMD_WORDPARTRIGHTEXTEND = 2393
wxSTC_CMD_DELLINELEFT :: Int
wxSTC_CMD_DELLINELEFT = 2395
wxSTC_CMD_DELLINERIGHT :: Int
wxSTC_CMD_DELLINERIGHT = 2396
wxSTC_CMD_PARADOWN :: Int
wxSTC_CMD_PARADOWN = 2413
wxSTC_CMD_PARADOWNEXTEND :: Int
wxSTC_CMD_PARADOWNEXTEND = 2414
wxSTC_CMD_PARAUP :: Int
wxSTC_CMD_PARAUP = 2415
wxSTC_CMD_PARAUPEXTEND :: Int
wxSTC_CMD_PARAUPEXTEND = 2416
wxSTC_CMD_LINEDOWNRECTEXTEND :: Int
wxSTC_CMD_LINEDOWNRECTEXTEND = 2426
wxSTC_CMD_LINEUPRECTEXTEND :: Int
wxSTC_CMD_LINEUPRECTEXTEND = 2427
wxSTC_CMD_CHARLEFTRECTEXTEND :: Int
wxSTC_CMD_CHARLEFTRECTEXTEND = 2428
wxSTC_CMD_CHARRIGHTRECTEXTEND :: Int
wxSTC_CMD_CHARRIGHTRECTEXTEND = 2429
wxSTC_CMD_HOMERECTEXTEND :: Int
wxSTC_CMD_HOMERECTEXTEND = 2430
wxSTC_CMD_VCHOMERECTEXTEND :: Int
wxSTC_CMD_VCHOMERECTEXTEND = 2431
wxSTC_CMD_LINEENDRECTEXTEND :: Int
wxSTC_CMD_LINEENDRECTEXTEND = 2432
wxSTC_CMD_PAGEUPRECTEXTEND :: Int
wxSTC_CMD_PAGEUPRECTEXTEND = 2433
wxSTC_CMD_PAGEDOWNRECTEXTEND :: Int
wxSTC_CMD_PAGEDOWNRECTEXTEND = 2434
wxSTC_CMD_STUTTEREDPAGEUP :: Int
wxSTC_CMD_STUTTEREDPAGEUP = 2435
wxSTC_CMD_STUTTEREDPAGEUPEXTEND :: Int
wxSTC_CMD_STUTTEREDPAGEUPEXTEND = 2436
wxSTC_CMD_STUTTEREDPAGEDOWN :: Int
wxSTC_CMD_STUTTEREDPAGEDOWN = 2437
wxSTC_CMD_STUTTEREDPAGEDOWNEXTEND :: Int
wxSTC_CMD_STUTTEREDPAGEDOWNEXTEND = 2438
wxSTC_CMD_WORDLEFTEND :: Int
wxSTC_CMD_WORDLEFTEND = 2439
wxSTC_CMD_WORDLEFTENDEXTEND :: Int
wxSTC_CMD_WORDLEFTENDEXTEND = 2440
wxSTC_CMD_WORDRIGHTEND :: Int
wxSTC_CMD_WORDRIGHTEND = 2441
wxSTC_CMD_WORDRIGHTENDEXTEND :: Int
wxSTC_CMD_WORDRIGHTENDEXTEND = 2442
| Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | 223,432 | 0 | 15 | 39,003 | 36,295 | 22,395 | 13,900 | 8,314 | 1 |
module Sound.Analysis.Vamp.ParameterDescriptor (
ParameterDescriptor(..)
, Extents(..)
, Quantization(..)
, peekParameterDescriptor
) where
import Bindings.Sound.Analysis.Vamp
import Foreign
import Foreign.C
import Sound.Analysis.Vamp.Types
data ParameterDescriptor = ParameterDescriptor {
identifier :: String
, name :: String
, description :: String
, unit :: String
, extents :: Extents
, defaultValue :: Float
, quantization :: Maybe Quantization
} deriving (Eq, Show)
peekParameterDescriptor :: C'VampParameterDescriptor -> IO ParameterDescriptor
peekParameterDescriptor x = do
x1 <- peekCString (c'VampParameterDescriptor'identifier x)
x2 <- peekCString (c'VampParameterDescriptor'name x)
x3 <- peekCString (c'VampParameterDescriptor'description x)
x4 <- peekCString (c'VampParameterDescriptor'unit x)
let x5 = Extents (realToFrac (c'VampParameterDescriptor'minValue x))
(realToFrac (c'VampParameterDescriptor'maxValue x))
x6 = realToFrac (c'VampParameterDescriptor'defaultValue x)
x7 <- if toBool (c'VampParameterDescriptor'isQuantized x)
then do
let res = realToFrac (c'VampParameterDescriptor'quantizeStep x)
arr = c'VampParameterDescriptor'valueNames x
names <- if arr == nullPtr
then return []
else peekArray0 nullPtr arr >>= mapM peekCString
return (Just (Quantization res names))
else return Nothing
return (ParameterDescriptor x1 x2 x3 x4 x5 x6 x7)
| kaoskorobase/hvamp | Sound/Analysis/Vamp/ParameterDescriptor.hs | lgpl-3.0 | 1,603 | 0 | 16 | 393 | 390 | 204 | 186 | 37 | 3 |
import Data.Set hiding (map)
import qualified Data.List
data Atom = At Char (Maybe Integer)
deriving (Eq, Ord)
instance Show Atom where
show (At p Nothing) = [p]
show (At p (Just i)) = p : show i
p = At 'p' Nothing
p1 = At 'p' (Just 1)
p2 = At 'p' (Just 2)
q = At 'q' Nothing
r = At 'r' Nothing
s = At 's' Nothing
type Aset = Set Atom
showAset r = Data.List.intercalate "," (map show (elems r))
data Clause = Aset :< Aset
deriving (Eq, Ord)
instance Show Clause where
show (r :< q) = "(" ++ showAset r ++ " <- " ++ showAset q ++ ")"
pos <~ neg = fromList pos :< fromList neg
resolve (a :< b) (c :< d) =
let isec a b = elems (intersection a b)
undel a b q = union a (delete q b)
in case (isec a d, isec b c) of
([], [q]) -> Just (undel a c q :< undel d b q)
_ -> Nothing
expand clf = fromList ([k | c1 <- t, c2 <- t, Just k <- [resolve c1 c2]] ++ t)
where t = elems clf
converge = until =<< ((==) =<<) -- http://stackoverflow.com/a/23924238/1875565
contradictory clf = []<~[] `member` converge expand clf
test1 = contradictory (fromList [[q]<~[p], [p]<~[q], [p,q]<~[], []<~[p,q]])
test2 = contradictory (fromList [[q]<~[p], [p]<~[q], [p,q]<~[]])
-- prva zadaca, peti zadatak
z1z5 = fromList [[p,q,s]<~[r], [r,s]<~[p], []<~[q,r], [p]<~[s], []<~[p,r], [r]<~[]]
test3 = contradictory z1z5
| vedgar/mlr | Haskell/rezolucija.hs | unlicense | 1,350 | 61 | 10 | 314 | 771 | 419 | 352 | 34 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.