Changeset 2617 for src/Pugs/Junc.hs

Show
Ignore:
Timestamp:
05/02/05 13:20:40 (4 years ago)
Author:
scook0
svk:copy_cache_prev:
4152
Message:

More Haddocks (AST/Junc/Types)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Junc.hs

    r2165 r2617  
    1515import qualified Data.Set as Set 
    1616 
     17-- |Construct a @none(...)@ junction from a list of values. 
     18-- Delegates to 'opJunc'. 
    1719opJuncNone :: [Val] -> Val 
    1820opJuncNone = opJunc JNone 
     21-- |Construct an @all(...)@ junction from a list of values. 
     22-- Delegates to 'opJunc'. 
    1923opJuncAll :: [Val] -> Val 
    2024opJuncAll = opJunc JAll 
     25-- |Construct a n@any(...)@ junction from a list of values. 
     26-- Delegates to 'opJunc'. 
    2127opJuncAny :: [Val] -> Val 
    2228opJuncAny = opJunc JAny 
     29-- |Construct a @one(...)@ junction from a list of values. 
     30-- Handled differently! 
    2331opJuncOne :: [Val] -> Val 
    2432opJuncOne args = VJunc (Junc JOne dups vals) 
     
    2836    groups = group $ sort args 
    2937 
     38-- |Construct a junction of the specified junctive type, containing all the 
     39-- values in the list. 
    3040opJunc :: JuncType -> [Val] -> Val 
    3141opJunc t vals = VJunc $ Junc t Set.empty (joined `Set.union` Set.fromList vs) 
     
    3646    sameType _                      = False 
    3747 
    38 juncTypeIs :: Val -> [JuncType] -> Maybe VJunc 
     48-- |Check if the specified value is a 'VJunc' of one of the specified 
     49-- junctive types. 
     50juncTypeIs :: Val -- ^ Value to test 
     51           -> [JuncType] -- ^ Types to check against 
     52           -> Maybe VJunc -- ^ Returns 'Nothing' if the test fails 
    3953juncTypeIs v ts 
    4054    | (VJunc j) <- v