Changeset 3328 for src/Pugs/Junc.hs

Show
Ignore:
Timestamp:
05/17/05 11:33:37 (4 years ago)
Author:
scook0
svk:copy_cache_prev:
4908
Message:

Style updates for Haddocks

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Junc.hs

    r2725 r3328  
    1515import qualified Data.Set as Set 
    1616 
    17 -- |Construct a @none(...)@ junction from a list of values. 
    18 -- Delegates to 'opJunc'. 
     17{-| 
     18Construct a @none(...)@ junction from a list of values. 
     19 
     20Delegates to 'opJunc'. 
     21-} 
    1922opJuncNone :: [Val] -> Val 
    2023opJuncNone = opJunc JNone 
    21 -- |Construct an @all(...)@ junction from a list of values. 
    22 -- Delegates to 'opJunc'. 
     24 
     25{-| 
     26Construct an @all(...)@ junction from a list of values. 
     27 
     28Delegates to 'opJunc'. 
     29-} 
    2330opJuncAll :: [Val] -> Val 
    2431opJuncAll = opJunc JAll 
    25 -- |Construct a n@any(...)@ junction from a list of values. 
    26 -- Delegates to 'opJunc'. 
     32 
     33{-| 
     34Construct a n@any(...)@ junction from a list of values. 
     35 
     36Delegates to 'opJunc'. 
     37-} 
    2738opJuncAny :: [Val] -> Val 
    2839opJuncAny = opJunc JAny 
    29 -- |Construct a @one(...)@ junction from a list of values. 
    30 -- Handled differently! 
     40 
     41{-| 
     42Construct a @one(...)@ junction from a list of values. 
     43 
     44Does /not/ delegate to 'opJunc'! 
     45-} 
    3146opJuncOne :: [Val] -> Val 
    3247opJuncOne args = VJunc (MkJunc JOne dups vals) 
     
    3651    groups = group $ sort args 
    3752 
    38 -- |Construct a junction of the specified junctive type, containing all the 
    39 -- values in the list. 
     53{-| 
     54Construct a junction of the specified junctive type, containing all the 
     55values in the list. 
     56-} 
    4057opJunc :: JuncType -> [Val] -> Val 
    4158opJunc t vals = VJunc $ MkJunc t Set.empty (joined `Set.union` Set.fromList vs) 
     
    4663    sameType _                      = False 
    4764 
    48 -- |Check if the specified value is a 'VJunc' of one of the specified 
    49 -- junctive types. 
     65{-| 
     66Check if the specified value is a 'VJunc' of one of the specified 
     67junctive types. If it is, return it as a 'VJunc'. 
     68-} 
    5069juncTypeIs :: Val -- ^ Value to test 
    5170           -> [JuncType] -- ^ Types to check against 
     
    5877    = Nothing 
    5978 
     79mergeJunc :: JuncType -> [Val] -> [Val] -> VJunc 
    6080mergeJunc j ds vs 
    6181    = case j of 
     
    90110    appList _ _ = internalError "appList: list doesn't begin with ApplyArg" 
    91111 
     112isTotalJunc :: ApplyArg -> Bool 
    92113isTotalJunc arg 
    93114    | (ApplyArg _ (VJunc j) b) <- arg 
     
    97118    = False 
    98119 
     120isPartialJunc :: ApplyArg -> Bool 
    99121isPartialJunc arg 
    100122    | (ApplyArg _ (VJunc j) b) <- arg