Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
nimia/bottle
codeedit/Editor/BottleWidgets.hs
gpl-3.0
spaceView :: Sized Anim.Frame spaceView = Spacer.makeHorizontal 20
66
spaceView :: Sized Anim.Frame spaceView = Spacer.makeHorizontal 20
66
spaceView = Spacer.makeHorizontal 20
36
false
true
0
6
7
21
10
11
null
null
mitchellwrosen/kerchief
src/Utils.hs
bsd-3-clause
-- | maybeThen a f m performs action |a| unconditionally, possibly preceded by -- action |f b| if |m| is Just b. maybeThen :: Monad m => m a -> (b -> m c) -> Maybe b -> m a maybeThen thn _ Nothing = thn
203
maybeThen :: Monad m => m a -> (b -> m c) -> Maybe b -> m a maybeThen thn _ Nothing = thn
90
maybeThen thn _ Nothing = thn
30
true
true
0
11
46
63
29
34
null
null
jtapolczai/wumpus
Agent/Intelligent/Affect/Fragments.hs
apache-2.0
itemHere :: NodeName -> Item -- |Item to look for. -> AreaFilter itemHere name it circ = entityHereFilt name circ [item, gteOne] where item :: AreaFilterCheck item = ("item", itemLens it . _1, itemName it, Nothing) gteOne :: AreaFilterCheck gteOne = ("gteOne", itemLens it . _1, itemName it, Just $ NodeGT (itemLens it . _2) 1) itemLens Gold = _AMVisualGold itemLens Meat = _AMVisualMeat itemLens Fruit = _AMVisualFruit itemName Gold = AMNVisualGold itemName Meat = AMNVisualMeat itemName Fruit = AMNVisualFruit -- |Wrapper around 'entityHere' that assignes vertices to the nodes too.
717
itemHere :: NodeName -> Item -- |Item to look for. -> AreaFilter itemHere name it circ = entityHereFilt name circ [item, gteOne] where item :: AreaFilterCheck item = ("item", itemLens it . _1, itemName it, Nothing) gteOne :: AreaFilterCheck gteOne = ("gteOne", itemLens it . _1, itemName it, Just $ NodeGT (itemLens it . _2) 1) itemLens Gold = _AMVisualGold itemLens Meat = _AMVisualMeat itemLens Fruit = _AMVisualFruit itemName Gold = AMNVisualGold itemName Meat = AMNVisualMeat itemName Fruit = AMNVisualFruit -- |Wrapper around 'entityHere' that assignes vertices to the nodes too.
717
itemHere name it circ = entityHereFilt name circ [item, gteOne] where item :: AreaFilterCheck item = ("item", itemLens it . _1, itemName it, Nothing) gteOne :: AreaFilterCheck gteOne = ("gteOne", itemLens it . _1, itemName it, Just $ NodeGT (itemLens it . _2) 1) itemLens Gold = _AMVisualGold itemLens Meat = _AMVisualMeat itemLens Fruit = _AMVisualFruit itemName Gold = AMNVisualGold itemName Meat = AMNVisualMeat itemName Fruit = AMNVisualFruit -- |Wrapper around 'entityHere' that assignes vertices to the nodes too.
634
false
true
0
12
223
174
92
82
null
null
zhangyz/llvm-slicing
src/LLVM/Slicing/Data/SliceType.hs
apache-2.0
s2 = updSli2 ["ta","hello"] IntSet.empty s1
43
s2 = updSli2 ["ta","hello"] IntSet.empty s1
43
s2 = updSli2 ["ta","hello"] IntSet.empty s1
43
false
false
1
6
5
25
11
14
null
null
ribag/ganeti-experiments
src/Ganeti/Constants.hs
gpl-2.0
-- * Kvm flag values htKvmDisabled :: String htKvmDisabled = "disabled"
72
htKvmDisabled :: String htKvmDisabled = "disabled"
50
htKvmDisabled = "disabled"
26
true
true
0
4
11
12
7
5
null
null
sukhmel/experiments.haskell
mahjonggCalc.hs
mit
notEmpty :: (a, [b]) -> Maybe a notEmpty (a, s) = a <$ listToMaybe s
68
notEmpty :: (a, [b]) -> Maybe a notEmpty (a, s) = a <$ listToMaybe s
68
notEmpty (a, s) = a <$ listToMaybe s
36
false
true
0
7
14
43
23
20
null
null
julienschmaltz/madl
src/Parser/MadlTypeChecker.hs
mit
typecheckDataExpression :: Context -> FunctionContext -> WithSourceInfo DataExpression -> Checked DataExpression typecheckDataExpression context fcontext dataexpression = case removeSourceInfo dataexpression of DataInteger integerexpression -> fmap DataInteger checkedIntegerExpression where checkedIntegerExpression = typecheckDataIntegerExpression context fcontext $ setSource integerexpression DataType typeexpression -> fmap DataType checkedTypeExpression where checkedTypeExpression = typecheckTypeExpression context $ setSource typeexpression d@(DataAttribute attr) -> checkedAttribute *> (Right d) where checkedAttribute = evaluateFunctionAttribute context fcontext $ setSource attr DataFunctionApplication f dataIns -> liftM2 DataFunctionApplication checkedFunction checkedDataIns where checkedDataIns = typecheckVariablesMatch context fcontext (setSource dataIns) =<< inputTypes inputTypes = fmap (fst . evaluateFunctionExpression context) checkedFunction checkedFunction = typecheckFunctionExpression context $ setSource f DataUnknown name -> typecheckDataUnknown context fcontext (setSource name) >>= typecheckDataExpression context fcontext where setSource = flip setSourceInfo dataexpression -- | Type check a data integer expression, and removes all instances of @DataIntegerUnknown@
1,378
typecheckDataExpression :: Context -> FunctionContext -> WithSourceInfo DataExpression -> Checked DataExpression typecheckDataExpression context fcontext dataexpression = case removeSourceInfo dataexpression of DataInteger integerexpression -> fmap DataInteger checkedIntegerExpression where checkedIntegerExpression = typecheckDataIntegerExpression context fcontext $ setSource integerexpression DataType typeexpression -> fmap DataType checkedTypeExpression where checkedTypeExpression = typecheckTypeExpression context $ setSource typeexpression d@(DataAttribute attr) -> checkedAttribute *> (Right d) where checkedAttribute = evaluateFunctionAttribute context fcontext $ setSource attr DataFunctionApplication f dataIns -> liftM2 DataFunctionApplication checkedFunction checkedDataIns where checkedDataIns = typecheckVariablesMatch context fcontext (setSource dataIns) =<< inputTypes inputTypes = fmap (fst . evaluateFunctionExpression context) checkedFunction checkedFunction = typecheckFunctionExpression context $ setSource f DataUnknown name -> typecheckDataUnknown context fcontext (setSource name) >>= typecheckDataExpression context fcontext where setSource = flip setSourceInfo dataexpression -- | Type check a data integer expression, and removes all instances of @DataIntegerUnknown@
1,378
typecheckDataExpression context fcontext dataexpression = case removeSourceInfo dataexpression of DataInteger integerexpression -> fmap DataInteger checkedIntegerExpression where checkedIntegerExpression = typecheckDataIntegerExpression context fcontext $ setSource integerexpression DataType typeexpression -> fmap DataType checkedTypeExpression where checkedTypeExpression = typecheckTypeExpression context $ setSource typeexpression d@(DataAttribute attr) -> checkedAttribute *> (Right d) where checkedAttribute = evaluateFunctionAttribute context fcontext $ setSource attr DataFunctionApplication f dataIns -> liftM2 DataFunctionApplication checkedFunction checkedDataIns where checkedDataIns = typecheckVariablesMatch context fcontext (setSource dataIns) =<< inputTypes inputTypes = fmap (fst . evaluateFunctionExpression context) checkedFunction checkedFunction = typecheckFunctionExpression context $ setSource f DataUnknown name -> typecheckDataUnknown context fcontext (setSource name) >>= typecheckDataExpression context fcontext where setSource = flip setSourceInfo dataexpression -- | Type check a data integer expression, and removes all instances of @DataIntegerUnknown@
1,265
false
true
10
10
210
270
126
144
null
null
573/leksah
src/IDE/Pane/Info.hs
gpl-2.0
setInfoStyle :: IDEAction setInfoStyle = getPane >>= setInfoStyle' where setInfoStyle' Nothing = return () setInfoStyle' (Just IDEInfo{..}) = do prefs <- readIDE prefs preferDark <- getDarkState buffer <- getBuffer descriptionView setStyle preferDark buffer $ case sourceStyle prefs of (False,_) -> Nothing (True,v) -> Just v
439
setInfoStyle :: IDEAction setInfoStyle = getPane >>= setInfoStyle' where setInfoStyle' Nothing = return () setInfoStyle' (Just IDEInfo{..}) = do prefs <- readIDE prefs preferDark <- getDarkState buffer <- getBuffer descriptionView setStyle preferDark buffer $ case sourceStyle prefs of (False,_) -> Nothing (True,v) -> Just v
439
setInfoStyle = getPane >>= setInfoStyle' where setInfoStyle' Nothing = return () setInfoStyle' (Just IDEInfo{..}) = do prefs <- readIDE prefs preferDark <- getDarkState buffer <- getBuffer descriptionView setStyle preferDark buffer $ case sourceStyle prefs of (False,_) -> Nothing (True,v) -> Just v
413
false
true
0
11
158
124
59
65
null
null
cchalmers/optical
src/Optical/Ocular.hs
bsd-3-clause
-- | Lens onto the single value in the last parameter. single :: Single t => Lens (t a) (t b) a b single = l where l :: forall t a b. Single t => Lens (t a) (t b) a b l = cloneLens optic \\ (unsafeCoerceConstraint :: Single t :- Ocular (->) (->) (Pretext (->) a b) t)
272
single :: Single t => Lens (t a) (t b) a b single = l where l :: forall t a b. Single t => Lens (t a) (t b) a b l = cloneLens optic \\ (unsafeCoerceConstraint :: Single t :- Ocular (->) (->) (Pretext (->) a b) t)
217
single = l where l :: forall t a b. Single t => Lens (t a) (t b) a b l = cloneLens optic \\ (unsafeCoerceConstraint :: Single t :- Ocular (->) (->) (Pretext (->) a b) t)
174
true
true
1
11
65
148
73
75
null
null
headprogrammingczar/Data
data-eval/IRC/Data/L.hs
bsd-3-clause
morseChar 'x' = "-..-"
22
morseChar 'x' = "-..-"
22
morseChar 'x' = "-..-"
22
false
false
1
5
3
13
4
9
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo IndexByteArrayOp_Word16 = mkGenPrimOp (fsLit "indexWord16Array#") [] [byteArrayPrimTy, intPrimTy] (wordPrimTy)
122
primOpInfo IndexByteArrayOp_Word16 = mkGenPrimOp (fsLit "indexWord16Array#") [] [byteArrayPrimTy, intPrimTy] (wordPrimTy)
122
primOpInfo IndexByteArrayOp_Word16 = mkGenPrimOp (fsLit "indexWord16Array#") [] [byteArrayPrimTy, intPrimTy] (wordPrimTy)
122
false
false
0
7
10
35
18
17
null
null
mankyKitty/SimplyEasy
src/dpt/DependentlyTyped.hs
mit
varpar i x = Par x
29
varpar i x = Par x
29
varpar i x = Par x
29
false
false
1
5
16
18
6
12
null
null
Notogora/magictext
insert.hs
gpl-2.0
-- * Insert, insert a string "x" into row y är den här delen core --todo comment acording to coding convention insertintofile :: String -> Integer -> String -> IO () insertintofile input row file = do contents <- readFile file if null contents then return () else do (length contents `seq` ( writeFile file $ (unwords(insert_row input row (rows_func (words contents) contents []))))) -- This a forced way to WriteFile I read about on the net --todo comment acording to coding convention
515
insertintofile :: String -> Integer -> String -> IO () insertintofile input row file = do contents <- readFile file if null contents then return () else do (length contents `seq` ( writeFile file $ (unwords(insert_row input row (rows_func (words contents) contents []))))) -- This a forced way to WriteFile I read about on the net --todo comment acording to coding convention
403
insertintofile input row file = do contents <- readFile file if null contents then return () else do (length contents `seq` ( writeFile file $ (unwords(insert_row input row (rows_func (words contents) contents []))))) -- This a forced way to WriteFile I read about on the net --todo comment acording to coding convention
348
true
true
0
21
111
127
64
63
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Input/InputConstants.hs
mit
scancodeKp0 :: Int scancodeKp0 = fromIntegral $ [C.pure| int {SCANCODE_KP_0} |]
79
scancodeKp0 :: Int scancodeKp0 = fromIntegral $ [C.pure| int {SCANCODE_KP_0} |]
79
scancodeKp0 = fromIntegral $ [C.pure| int {SCANCODE_KP_0} |]
60
false
true
0
6
10
21
13
8
null
null
nico202/NeMosim
src/api/autogen/Cpp.hs
gpl-2.0
vectorInput :: BaseType -> Doc vectorInput = constant . ref . vectorVal
71
vectorInput :: BaseType -> Doc vectorInput = constant . ref . vectorVal
71
vectorInput = constant . ref . vectorVal
40
false
true
0
6
11
23
12
11
null
null
jfischoff/hs-mitsuba
tests/Tests/Mitsuba/Types.hs
bsd-3-clause
actualSppm = ISppm $ SPPM { sppmMaxDepth = 1 , sppmPhotonCount = 2 , sppmInitialRadius = 3 , sppmAlpha = 4 , sppmGranularity = 5 , sppmRrDepth = 6 , sppmMaxPasses = 7 }
248
actualSppm = ISppm $ SPPM { sppmMaxDepth = 1 , sppmPhotonCount = 2 , sppmInitialRadius = 3 , sppmAlpha = 4 , sppmGranularity = 5 , sppmRrDepth = 6 , sppmMaxPasses = 7 }
248
actualSppm = ISppm $ SPPM { sppmMaxDepth = 1 , sppmPhotonCount = 2 , sppmInitialRadius = 3 , sppmAlpha = 4 , sppmGranularity = 5 , sppmRrDepth = 6 , sppmMaxPasses = 7 }
248
false
false
3
6
113
58
34
24
null
null
limaner2002/EPC-tools
scheduler-ui/src/Scheduler.hs
bsd-3-clause
incJobStatus Cancelling = Cancelled
35
incJobStatus Cancelling = Cancelled
35
incJobStatus Cancelling = Cancelled
35
false
false
0
5
3
9
4
5
null
null
ghorn/euler
Euler/E015.hs
bsd-3-clause
routeMatrix :: Int -> Matrix Int routeMatrix n' = runSTMatrix $ do let n = n' + 1 m <- newMatrix 0 n n writeMatrix m (n-1) (n-1) 1 chooseRoutes n m (n-2) return m
172
routeMatrix :: Int -> Matrix Int routeMatrix n' = runSTMatrix $ do let n = n' + 1 m <- newMatrix 0 n n writeMatrix m (n-1) (n-1) 1 chooseRoutes n m (n-2) return m
172
routeMatrix n' = runSTMatrix $ do let n = n' + 1 m <- newMatrix 0 n n writeMatrix m (n-1) (n-1) 1 chooseRoutes n m (n-2) return m
139
false
true
0
12
44
106
48
58
null
null
iand675/hobjc
src/Language/ObjC/Runtime.hs
bsd-3-clause
-- | Sets the version number of a class definition. -- -- You can use the version number of the class definition to provide versioning of the interface that your class represents to other classes. This is especially useful for object serialization (that is, archiving of the object in a flattened form), where it is important to recognize changes to the layout of the instance variables in different class-definition versions. -- -- Classes derived from the Foundation framework NSObject class can set the class-definition version number using the setVersion: class method, which is implemented using the class_setVersion function. classSetVersion :: MonadIO m => Class -> Int -> m () classSetVersion c = liftIO . class_setVersion c . fromIntegral
747
classSetVersion :: MonadIO m => Class -> Int -> m () classSetVersion c = liftIO . class_setVersion c . fromIntegral
115
classSetVersion c = liftIO . class_setVersion c . fromIntegral
62
true
true
0
9
117
50
26
24
null
null
lukexi/rumpus
src/Rumpus/Systems/Physics.hs
bsd-3-clause
-- Yet another hack for release - this is specifically to make it so -- that the creator, which animates new objects to full size, can have that animation -- "rerouted" to the new size if the object's start function sets one. setSize :: (MonadIO m, MonadState ECS m, MonadReader EntityID m) => V3 GLfloat -> m () setSize newSize = do maybeAnim <- getComponent mySizeAnimation case maybeAnim of Nothing -> setSizeNoAnim newSize Just sizeAnim -> do --newAnim <- redirectAnimation sizeAnim newSize --mySizeAnimation ==> newAnim mySizeAnimation ==> sizeAnim { animTo = newSize }
634
setSize :: (MonadIO m, MonadState ECS m, MonadReader EntityID m) => V3 GLfloat -> m () setSize newSize = do maybeAnim <- getComponent mySizeAnimation case maybeAnim of Nothing -> setSizeNoAnim newSize Just sizeAnim -> do --newAnim <- redirectAnimation sizeAnim newSize --mySizeAnimation ==> newAnim mySizeAnimation ==> sizeAnim { animTo = newSize }
408
setSize newSize = do maybeAnim <- getComponent mySizeAnimation case maybeAnim of Nothing -> setSizeNoAnim newSize Just sizeAnim -> do --newAnim <- redirectAnimation sizeAnim newSize --mySizeAnimation ==> newAnim mySizeAnimation ==> sizeAnim { animTo = newSize }
321
true
true
0
15
152
111
54
57
null
null
valderman/selda
selda-tests/test/Tests/Query.hs
mit
nestedLeftJoin = do res <- query $ do p <- select people _ :*: city :*: cs <- leftJoin (\(name' :*: _) -> p!pName .== name') $ do a <- select addresses _ :*: cs <- leftJoin (\(n :*: _) -> n .== just (a!aName)) $ aggregate $ do c <- select comments n <- groupBy (c!cName) return (n :*: count (c!cComment)) return (a!aName :*: a!aCity :*: cs) return (p!pName :*: city :*: cs) ass ("user with comment not in result: " ++ show res) (link `elem` res) ass ("user without comment not in result: " ++ show res) (velvet `elem` res) where link = "Link" :*: Just "Kakariko" :*: Just (1 :: Int) velvet = "Velvet" :*: Nothing :*: Nothing
694
nestedLeftJoin = do res <- query $ do p <- select people _ :*: city :*: cs <- leftJoin (\(name' :*: _) -> p!pName .== name') $ do a <- select addresses _ :*: cs <- leftJoin (\(n :*: _) -> n .== just (a!aName)) $ aggregate $ do c <- select comments n <- groupBy (c!cName) return (n :*: count (c!cComment)) return (a!aName :*: a!aCity :*: cs) return (p!pName :*: city :*: cs) ass ("user with comment not in result: " ++ show res) (link `elem` res) ass ("user without comment not in result: " ++ show res) (velvet `elem` res) where link = "Link" :*: Just "Kakariko" :*: Just (1 :: Int) velvet = "Velvet" :*: Nothing :*: Nothing
694
nestedLeftJoin = do res <- query $ do p <- select people _ :*: city :*: cs <- leftJoin (\(name' :*: _) -> p!pName .== name') $ do a <- select addresses _ :*: cs <- leftJoin (\(n :*: _) -> n .== just (a!aName)) $ aggregate $ do c <- select comments n <- groupBy (c!cName) return (n :*: count (c!cComment)) return (a!aName :*: a!aCity :*: cs) return (p!pName :*: city :*: cs) ass ("user with comment not in result: " ++ show res) (link `elem` res) ass ("user without comment not in result: " ++ show res) (velvet `elem` res) where link = "Link" :*: Just "Kakariko" :*: Just (1 :: Int) velvet = "Velvet" :*: Nothing :*: Nothing
694
false
false
8
24
190
337
163
174
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Dependency/Modular/Tree.hs
bsd-3-clause
inn :: TreeF a (Tree a) -> Tree a inn (PChoiceF p i ts) = PChoice p i ts
86
inn :: TreeF a (Tree a) -> Tree a inn (PChoiceF p i ts) = PChoice p i ts
86
inn (PChoiceF p i ts) = PChoice p i ts
52
false
true
0
8
32
53
24
29
null
null
shlevy/ghc
libraries/base/GHC/Conc/Sync.hs
bsd-3-clause
sharedCAF :: a -> (Ptr a -> IO (Ptr a)) -> IO a sharedCAF a get_or_set = mask_ $ do stable_ref <- newStablePtr a let ref = castPtr (castStablePtrToPtr stable_ref) ref2 <- get_or_set ref if ref==ref2 then return a else do freeStablePtr stable_ref deRefStablePtr (castPtrToStablePtr (castPtr ref2))
351
sharedCAF :: a -> (Ptr a -> IO (Ptr a)) -> IO a sharedCAF a get_or_set = mask_ $ do stable_ref <- newStablePtr a let ref = castPtr (castStablePtrToPtr stable_ref) ref2 <- get_or_set ref if ref==ref2 then return a else do freeStablePtr stable_ref deRefStablePtr (castPtrToStablePtr (castPtr ref2))
351
sharedCAF a get_or_set = mask_ $ do stable_ref <- newStablePtr a let ref = castPtr (castStablePtrToPtr stable_ref) ref2 <- get_or_set ref if ref==ref2 then return a else do freeStablePtr stable_ref deRefStablePtr (castPtrToStablePtr (castPtr ref2))
303
false
true
2
15
101
136
60
76
null
null
haskell-distributed/distributed-process
src/Control/Distributed/Process/Internal/Primitives.hs
bsd-3-clause
registerRemoteAsync :: NodeId -> String -> ProcessId -> Process () registerRemoteAsync nid label pid = do here <- getSelfNode sendCtrlMsg (if nid == here then Nothing else Just nid) (Register label nid (Just pid) False)
243
registerRemoteAsync :: NodeId -> String -> ProcessId -> Process () registerRemoteAsync nid label pid = do here <- getSelfNode sendCtrlMsg (if nid == here then Nothing else Just nid) (Register label nid (Just pid) False)
243
registerRemoteAsync nid label pid = do here <- getSelfNode sendCtrlMsg (if nid == here then Nothing else Just nid) (Register label nid (Just pid) False)
176
false
true
0
11
58
86
42
44
null
null
Solumin/ScriptNScribe
src/Synth.hs
mit
solveForJ Add (Vn n _) (Just (Vn i _)) = Just . Vn (n - i)
58
solveForJ Add (Vn n _) (Just (Vn i _)) = Just . Vn (n - i)
58
solveForJ Add (Vn n _) (Just (Vn i _)) = Just . Vn (n - i)
58
false
false
0
9
15
49
24
25
null
null
thoughtpolice/hs-nacl
src/Crypto/Key.hs
bsd-3-clause
readBytes :: String -> ByteString readBytes = B.pack . map reader . chunk 2 where reader :: String -> Word8 reader x = case readHex x of [(a, "")] -> a _ -> error "invalid key bytes in readBytes" chunk :: Int -> [a] -> [[a]] chunk _ [] = [] chunk n xs = y1 : chunk n y2 where (y1, y2) = splitAt n xs
372
readBytes :: String -> ByteString readBytes = B.pack . map reader . chunk 2 where reader :: String -> Word8 reader x = case readHex x of [(a, "")] -> a _ -> error "invalid key bytes in readBytes" chunk :: Int -> [a] -> [[a]] chunk _ [] = [] chunk n xs = y1 : chunk n y2 where (y1, y2) = splitAt n xs
372
readBytes = B.pack . map reader . chunk 2 where reader :: String -> Word8 reader x = case readHex x of [(a, "")] -> a _ -> error "invalid key bytes in readBytes" chunk :: Int -> [a] -> [[a]] chunk _ [] = [] chunk n xs = y1 : chunk n y2 where (y1, y2) = splitAt n xs
338
false
true
4
10
139
147
77
70
null
null
rsasse/tamarin-prover
src/Main/Console.hs
gpl-3.0
-- | Add an argument with the empty string as the value. addEmptyArg :: String -> Arguments -> Arguments addEmptyArg a = addArg a ""
132
addEmptyArg :: String -> Arguments -> Arguments addEmptyArg a = addArg a ""
75
addEmptyArg a = addArg a ""
27
true
true
0
6
24
28
14
14
null
null
kojiromike/Idris-dev
src/Util/System.hs
bsd-3-clause
isDarwin :: Bool isDarwin = os == "darwin"
42
isDarwin :: Bool isDarwin = os == "darwin"
42
isDarwin = os == "darwin"
25
false
true
1
6
7
25
10
15
null
null
wolftune/hoogle
src/Input/Haddock.hs
bsd-3-clause
typeItem (EPackage x) = "package"
33
typeItem (EPackage x) = "package"
33
typeItem (EPackage x) = "package"
33
false
false
0
7
4
15
7
8
null
null
maximilianhuber/univOpWrap
src/System/HsTColors.hs
bsd-3-clause
magentaPrint = colorPrint ANSIMagenta
37
magentaPrint = colorPrint ANSIMagenta
37
magentaPrint = colorPrint ANSIMagenta
37
false
false
1
5
3
13
4
9
null
null
kmate/HaRe
old/testing/simplifyExpr/LambdaIn2_TokOut.hs
bsd-3-clause
f = \g@(z:zs) -> \(i:is) -> z : [i]
35
f = \g@(z:zs) -> \(i:is) -> z : [i]
35
f = \g@(z:zs) -> \(i:is) -> z : [i]
35
false
false
1
9
8
44
23
21
null
null
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/GetWorkflowExecutionHistory.hs
mpl-2.0
-- | Specifies the workflow execution for which to return the history. gwehExecution :: Lens' GetWorkflowExecutionHistory WorkflowExecution gwehExecution = lens _gwehExecution (\s a -> s { _gwehExecution = a })
210
gwehExecution :: Lens' GetWorkflowExecutionHistory WorkflowExecution gwehExecution = lens _gwehExecution (\s a -> s { _gwehExecution = a })
139
gwehExecution = lens _gwehExecution (\s a -> s { _gwehExecution = a })
70
true
true
0
9
29
40
22
18
null
null
pstiasny/mgr
Rays.hs
lgpl-3.0
collideAll :: [Collider a] -> Collider a collideAll colliders ray = fst $ foldl collideWith (Nothing, ray) colliders where collideWith (mhit, ray) collider = case collider ray of Just h -> (Just h, cutRay (tHit h) ray) Nothing -> (mhit, ray)
271
collideAll :: [Collider a] -> Collider a collideAll colliders ray = fst $ foldl collideWith (Nothing, ray) colliders where collideWith (mhit, ray) collider = case collider ray of Just h -> (Just h, cutRay (tHit h) ray) Nothing -> (mhit, ray)
271
collideAll colliders ray = fst $ foldl collideWith (Nothing, ray) colliders where collideWith (mhit, ray) collider = case collider ray of Just h -> (Just h, cutRay (tHit h) ray) Nothing -> (mhit, ray)
230
false
true
5
8
70
111
56
55
null
null
rgleichman/glance
gui/Clock.hs
gpl-3.0
drawSecondHand quality seconds = do save rotate (-pi/2) setLineCap LineCapSquare setLineJoin LineJoinMiter rotate (seconds * pi/30); -- shadow of second hand-part when quality $ do setOperator OperatorAtop setSourceRGBA 0.16 0.18 0.19 0.125 setLineWidth (1.3125 / 60) moveTo (-1.5/5 + 0.025) 0.025 lineTo (3/5 + 0.025) 0.025 stroke -- second hand setOperator OperatorOver setSourceRGB 0.39 0.58 0.77 setLineWidth (0.75/60) moveTo (-1.5/5) 0 lineTo (3/5) 0 stroke arc 0 0 (1/20) 0 (pi*2) fill arc (63/100) 0 (1/35) 0 (pi*2) stroke setLineWidth (1/100) moveTo (10/15) 0 lineTo (12/15) 0 stroke setSourceRGB 0.31 0.31 0.31 arc 0 0 (1/25) 0 (pi*2) fill restore
742
drawSecondHand quality seconds = do save rotate (-pi/2) setLineCap LineCapSquare setLineJoin LineJoinMiter rotate (seconds * pi/30); -- shadow of second hand-part when quality $ do setOperator OperatorAtop setSourceRGBA 0.16 0.18 0.19 0.125 setLineWidth (1.3125 / 60) moveTo (-1.5/5 + 0.025) 0.025 lineTo (3/5 + 0.025) 0.025 stroke -- second hand setOperator OperatorOver setSourceRGB 0.39 0.58 0.77 setLineWidth (0.75/60) moveTo (-1.5/5) 0 lineTo (3/5) 0 stroke arc 0 0 (1/20) 0 (pi*2) fill arc (63/100) 0 (1/35) 0 (pi*2) stroke setLineWidth (1/100) moveTo (10/15) 0 lineTo (12/15) 0 stroke setSourceRGB 0.31 0.31 0.31 arc 0 0 (1/25) 0 (pi*2) fill restore
742
drawSecondHand quality seconds = do save rotate (-pi/2) setLineCap LineCapSquare setLineJoin LineJoinMiter rotate (seconds * pi/30); -- shadow of second hand-part when quality $ do setOperator OperatorAtop setSourceRGBA 0.16 0.18 0.19 0.125 setLineWidth (1.3125 / 60) moveTo (-1.5/5 + 0.025) 0.025 lineTo (3/5 + 0.025) 0.025 stroke -- second hand setOperator OperatorOver setSourceRGB 0.39 0.58 0.77 setLineWidth (0.75/60) moveTo (-1.5/5) 0 lineTo (3/5) 0 stroke arc 0 0 (1/20) 0 (pi*2) fill arc (63/100) 0 (1/35) 0 (pi*2) stroke setLineWidth (1/100) moveTo (10/15) 0 lineTo (12/15) 0 stroke setSourceRGB 0.31 0.31 0.31 arc 0 0 (1/25) 0 (pi*2) fill restore
742
false
false
0
14
185
368
168
200
null
null
blargg/crdt
src/Data/MultiAckSet.hs
isc
addNeighbor :: (Ord n, Universe i) => n -> MultiAckSet n i a -> MultiAckSet n i a addNeighbor n = MultiAckSet . M.insertWith (flip const) n AS.empty . toMap
157
addNeighbor :: (Ord n, Universe i) => n -> MultiAckSet n i a -> MultiAckSet n i a addNeighbor n = MultiAckSet . M.insertWith (flip const) n AS.empty . toMap
157
addNeighbor n = MultiAckSet . M.insertWith (flip const) n AS.empty . toMap
74
false
true
0
9
30
81
38
43
null
null
Heather/Idris-dev
src/Idris/Elab/Interface.hs
bsd-3-clause
memberDocs (PData d _ _ _ _ pdata) = Just (basename $ d_name pdata, d)
70
memberDocs (PData d _ _ _ _ pdata) = Just (basename $ d_name pdata, d)
70
memberDocs (PData d _ _ _ _ pdata) = Just (basename $ d_name pdata, d)
70
false
false
0
8
14
41
20
21
null
null
brendanhay/gogol
gogol-containeranalysis/gen/Network/Google/Resource/ContainerAnalysis/Projects/Notes/List.hs
mpl-2.0
-- | OAuth access token. pnlAccessToken :: Lens' ProjectsNotesList (Maybe Text) pnlAccessToken = lens _pnlAccessToken (\ s a -> s{_pnlAccessToken = a})
159
pnlAccessToken :: Lens' ProjectsNotesList (Maybe Text) pnlAccessToken = lens _pnlAccessToken (\ s a -> s{_pnlAccessToken = a})
134
pnlAccessToken = lens _pnlAccessToken (\ s a -> s{_pnlAccessToken = a})
79
true
true
1
9
29
52
25
27
null
null
fboyer/craft3e
Chapter3.hs
mit
prop_myOr :: Bool -> Bool -> Bool prop_myOr x y = myOr x y == (x || y)
72
prop_myOr :: Bool -> Bool -> Bool prop_myOr x y = myOr x y == (x || y)
72
prop_myOr x y = myOr x y == (x || y)
38
false
true
0
7
19
40
20
20
null
null
frasertweedale/hs-jose
src/Crypto/JWT.hs
apache-2.0
toKeyMap :: M.Map T.Text Value -> KeyMap.KeyMap Value toKeyMap = KeyMap.fromMap . M.mapKeysMonotonic Key.fromText
113
toKeyMap :: M.Map T.Text Value -> KeyMap.KeyMap Value toKeyMap = KeyMap.fromMap . M.mapKeysMonotonic Key.fromText
113
toKeyMap = KeyMap.fromMap . M.mapKeysMonotonic Key.fromText
59
false
true
0
7
13
42
20
22
null
null
arekfu/grammar-haskell
src/Grammar/CFG.hs
bsd-3-clause
toSymbol :: LabelToSymbolDict a -- ^ the label-to-symbol dictionary -> Label -- ^ the label to convert -> Maybe a -- ^ the resulting symbol, maybe toSymbol dict label = dict V.!? label
229
toSymbol :: LabelToSymbolDict a -- ^ the label-to-symbol dictionary -> Label -- ^ the label to convert -> Maybe a toSymbol dict label = dict V.!? label
184
toSymbol dict label = dict V.!? label
37
true
true
0
7
77
39
20
19
null
null
MathiasVP/syntax-checker-checker
qcsyntax.hs
mit
genCase :: Int -> Gen Expression genCase size = liftM3 Case (genExpression size') (listOf $ genCaseClause size') (genExpression size') where size' = size `div` 2
217
genCase :: Int -> Gen Expression genCase size = liftM3 Case (genExpression size') (listOf $ genCaseClause size') (genExpression size') where size' = size `div` 2
217
genCase size = liftM3 Case (genExpression size') (listOf $ genCaseClause size') (genExpression size') where size' = size `div` 2
184
false
true
0
8
80
66
33
33
null
null
taktoa/SatOpt
library/SatOpt.hs
mit
dispMat (FMat m) = recip $ square m + square normm
51
dispMat (FMat m) = recip $ square m + square normm
51
dispMat (FMat m) = recip $ square m + square normm
51
false
false
0
7
11
29
13
16
null
null
pikajude/yesod
yesod/Yesod/Default/Main.hs
mit
-- | Run your app, taking environment and port settings from the -- commandline. -- -- @'fromArgs'@ helps parse a custom configuration -- -- > main :: IO () -- > main = defaultMain (fromArgs parseExtra) makeApplication -- defaultMain :: (Show env, Read env) => IO (AppConfig env extra) -> (AppConfig env extra -> IO Application) -> IO () defaultMain load getApp = do config <- load app <- getApp config runSettings ( setPort (appPort config) $ setHost (appHost config) $ defaultSettings ) app
581
defaultMain :: (Show env, Read env) => IO (AppConfig env extra) -> (AppConfig env extra -> IO Application) -> IO () defaultMain load getApp = do config <- load app <- getApp config runSettings ( setPort (appPort config) $ setHost (appHost config) $ defaultSettings ) app
351
defaultMain load getApp = do config <- load app <- getApp config runSettings ( setPort (appPort config) $ setHost (appHost config) $ defaultSettings ) app
199
true
true
0
14
172
137
67
70
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Insert.hs
mpl-2.0
-- | V1 error format. riXgafv :: Lens' ReportsInsert (Maybe Xgafv) riXgafv = lens _riXgafv (\ s a -> s{_riXgafv = a})
117
riXgafv :: Lens' ReportsInsert (Maybe Xgafv) riXgafv = lens _riXgafv (\ s a -> s{_riXgafv = a})
95
riXgafv = lens _riXgafv (\ s a -> s{_riXgafv = a})
50
true
true
1
9
21
52
25
27
null
null
markus1189/fgl
Data/Graph/Inductive/Example.hs
bsd-3-clause
clr486 = mkGraph (zip [1..9] ["shorts","socks","watch","pants","shoes", "shirt","belt","tie","jacket"]) (labUEdges [(1,4),(1,5),(2,5),(4,5),(4,7),(6,7),(6,8),(7,9),(8,9)])
218
clr486 = mkGraph (zip [1..9] ["shorts","socks","watch","pants","shoes", "shirt","belt","tie","jacket"]) (labUEdges [(1,4),(1,5),(2,5),(4,5),(4,7),(6,7),(6,8),(7,9),(8,9)])
218
clr486 = mkGraph (zip [1..9] ["shorts","socks","watch","pants","shoes", "shirt","belt","tie","jacket"]) (labUEdges [(1,4),(1,5),(2,5),(4,5),(4,7),(6,7),(6,8),(7,9),(8,9)])
218
false
false
0
9
55
138
87
51
null
null
adbrowne/dodgerblue
src/DodgerBlue/Testing.hs
bsd-3-clause
isProgramStateIdle ( ExternalProgramRunning (_, x) ) = maybe False (> 2) x
74
isProgramStateIdle ( ExternalProgramRunning (_, x) ) = maybe False (> 2) x
74
isProgramStateIdle ( ExternalProgramRunning (_, x) ) = maybe False (> 2) x
74
false
false
0
8
11
32
17
15
null
null
trygvis/hledger
hledger-lib/Hledger/Utils.hs
gpl-3.0
whitespacechars = " \t\n\r\'\""
31
whitespacechars = " \t\n\r\'\""
31
whitespacechars = " \t\n\r\'\""
31
false
false
1
5
3
10
3
7
null
null
lukexi/ghc-7.8-arm64
compiler/main/DynFlags.hs
bsd-3-clause
wayDesc WayPar = "Parallel"
32
wayDesc WayPar = "Parallel"
32
wayDesc WayPar = "Parallel"
32
false
false
0
4
8
10
4
6
null
null
javache/GIF87a
GIF87a/Encoder.hs
gpl-2.0
encode :: Image -> BL.ByteString encode img = runPut $ do putByteString $ signature img encodeScreenDescriptor (screenDescriptor img) (isJust $ globalColorMap img) forM_ (fromMaybe [] $ globalColorMap img) encodeColorMapBlock forM_ (descriptors img) (\block -> case block of Left a -> encodeImageDescriptor (screenDescriptor img) a Right b -> encodeExtensionBlock b ) putChar ';'
431
encode :: Image -> BL.ByteString encode img = runPut $ do putByteString $ signature img encodeScreenDescriptor (screenDescriptor img) (isJust $ globalColorMap img) forM_ (fromMaybe [] $ globalColorMap img) encodeColorMapBlock forM_ (descriptors img) (\block -> case block of Left a -> encodeImageDescriptor (screenDescriptor img) a Right b -> encodeExtensionBlock b ) putChar ';'
431
encode img = runPut $ do putByteString $ signature img encodeScreenDescriptor (screenDescriptor img) (isJust $ globalColorMap img) forM_ (fromMaybe [] $ globalColorMap img) encodeColorMapBlock forM_ (descriptors img) (\block -> case block of Left a -> encodeImageDescriptor (screenDescriptor img) a Right b -> encodeExtensionBlock b ) putChar ';'
398
false
true
0
16
103
145
66
79
null
null
lowasser/TrieMap
Data/TrieMap/Utils.hs
bsd-3-clause
n `quoPow` 64 = n `shiftR` 6
28
n `quoPow` 64 = n `shiftR` 6
28
n `quoPow` 64 = n `shiftR` 6
28
false
false
0
5
6
26
13
13
null
null
dylanmann/CurriersOfCatan
src/Board.hs
gpl-3.0
cornerIndices :: [CornerLocation] cornerIndices = map CornerLocation [(1,-1,False),(0,0,True),(0,-1,False),(-1,1,True),(0,0,False),(0,1,True),(2,-1,False),(1,0,True),(2,-2,False),(1,-1,True),(1,-2,False),(0,-1,True),(0,-2,False),(-1,0,True),(-1,-1,False),(-2,1,True),(-1,0,False),(-2,2,True),(-1,1,False),(-1,2,True),(0,1,False),(0,2,True),(1,0,False),(1,1,True),(3,-1,False),(2,0,True),(3,-2,False),(2,-1,True),(3,-3,False),(2,-2,True),(2,-3,False),(1,-2,True),(1,-3,False),(0,-2,True),(0,-3,False),(-1,-1,True),(-1,-2,False),(-2,0,True),(-2,-1,False),(-3,1,True),(-2,0,False),(-3,2,True),(-2,1,False),(-3,3,True),(-2,2,False),(-2,3,True),(-1,2,False),(-1,3,True),(0,2,False),(0,3,True),(1,1,False),(1,2,True),(2,0,False),(2,1,True)]
735
cornerIndices :: [CornerLocation] cornerIndices = map CornerLocation [(1,-1,False),(0,0,True),(0,-1,False),(-1,1,True),(0,0,False),(0,1,True),(2,-1,False),(1,0,True),(2,-2,False),(1,-1,True),(1,-2,False),(0,-1,True),(0,-2,False),(-1,0,True),(-1,-1,False),(-2,1,True),(-1,0,False),(-2,2,True),(-1,1,False),(-1,2,True),(0,1,False),(0,2,True),(1,0,False),(1,1,True),(3,-1,False),(2,0,True),(3,-2,False),(2,-1,True),(3,-3,False),(2,-2,True),(2,-3,False),(1,-2,True),(1,-3,False),(0,-2,True),(0,-3,False),(-1,-1,True),(-1,-2,False),(-2,0,True),(-2,-1,False),(-3,1,True),(-2,0,False),(-3,2,True),(-2,1,False),(-3,3,True),(-2,2,False),(-2,3,True),(-1,2,False),(-1,3,True),(0,2,False),(0,3,True),(1,1,False),(1,2,True),(2,0,False),(2,1,True)]
734
cornerIndices = map CornerLocation [(1,-1,False),(0,0,True),(0,-1,False),(-1,1,True),(0,0,False),(0,1,True),(2,-1,False),(1,0,True),(2,-2,False),(1,-1,True),(1,-2,False),(0,-1,True),(0,-2,False),(-1,0,True),(-1,-1,False),(-2,1,True),(-1,0,False),(-2,2,True),(-1,1,False),(-1,2,True),(0,1,False),(0,2,True),(1,0,False),(1,1,True),(3,-1,False),(2,0,True),(3,-2,False),(2,-1,True),(3,-3,False),(2,-2,True),(2,-3,False),(1,-2,True),(1,-3,False),(0,-2,True),(0,-3,False),(-1,-1,True),(-1,-2,False),(-2,0,True),(-2,-1,False),(-3,1,True),(-2,0,False),(-3,2,True),(-2,1,False),(-3,3,True),(-2,2,False),(-2,3,True),(-1,2,False),(-1,3,True),(0,2,False),(0,3,True),(1,1,False),(1,2,True),(2,0,False),(2,1,True)]
700
false
true
0
8
8
753
485
268
null
null
rueshyna/gogol
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs
mpl-2.0
lcdllAddtional :: Lens' LoggingConfigDriverLogLevels (HashMap Text Text) lcdllAddtional = lens _lcdllAddtional (\ s a -> s{_lcdllAddtional = a}) . _Coerce
168
lcdllAddtional :: Lens' LoggingConfigDriverLogLevels (HashMap Text Text) lcdllAddtional = lens _lcdllAddtional (\ s a -> s{_lcdllAddtional = a}) . _Coerce
168
lcdllAddtional = lens _lcdllAddtional (\ s a -> s{_lcdllAddtional = a}) . _Coerce
95
false
true
0
10
33
53
27
26
null
null
borgsmidt/adv-prog-2013
src/salsa/SalsaInterp.hs
mit
-- Captures the effect of a definition in a Salsa computation definition :: Definition -> Salsa () definition (Viewdef ident wExpr hExpr) = Salsa $ \context -> let width = eval context wExpr height = eval context hExpr in ((), addView ident (ident, width, height) context)
328
definition :: Definition -> Salsa () definition (Viewdef ident wExpr hExpr) = Salsa $ \context -> let width = eval context wExpr height = eval context hExpr in ((), addView ident (ident, width, height) context)
266
definition (Viewdef ident wExpr hExpr) = Salsa $ \context -> let width = eval context wExpr height = eval context hExpr in ((), addView ident (ident, width, height) context)
229
true
true
0
11
101
93
48
45
null
null
rudymatela/leancheck
bench/tiers.hs
bsd-3-clause
showDotsLongerThan :: Show a => Int -> [a] -> String showDotsLongerThan n xs = "[" ++ intercalate "," (dotsLongerThan n $ map show xs) ++ "]" where dotsLongerThan n xs = take n xs ++ ["..." | not . null $ drop n xs]
265
showDotsLongerThan :: Show a => Int -> [a] -> String showDotsLongerThan n xs = "[" ++ intercalate "," (dotsLongerThan n $ map show xs) ++ "]" where dotsLongerThan n xs = take n xs ++ ["..." | not . null $ drop n xs]
265
showDotsLongerThan n xs = "[" ++ intercalate "," (dotsLongerThan n $ map show xs) ++ "]" where dotsLongerThan n xs = take n xs ++ ["..." | not . null $ drop n xs]
212
false
true
0
10
93
110
51
59
null
null
phonohawk/HsOpenSSL
OpenSSL/PEM.hs
cc0-1.0
-- |@'readX509' pem@ reads an X.509 certificate in PEM string. readX509 :: String -> IO X509 readX509 pemStr = newConstMem pemStr >>= readX509'
147
readX509 :: String -> IO X509 readX509 pemStr = newConstMem pemStr >>= readX509'
84
readX509 pemStr = newConstMem pemStr >>= readX509'
54
true
true
0
7
26
34
15
19
null
null
ony/hledger
hledger-lib/Hledger/Query.hs
gpl-3.0
-- XXX pack matchesAccount (Depth d) a = accountNameLevel a <= d
64
matchesAccount (Depth d) a = accountNameLevel a <= d
52
matchesAccount (Depth d) a = accountNameLevel a <= d
52
true
false
1
8
11
28
12
16
null
null
wizzup/advent_of_code
templates/multi-line.hs
mit
stepTwo :: String -> Int stepTwo _ = 1
38
stepTwo :: String -> Int stepTwo _ = 1
38
stepTwo _ = 1
13
false
true
0
5
8
18
9
9
null
null
trenta3/zeno-0.2.0.1
src/Zeno/HaskellParser.hs
mit
simplifyCases :: ZExpr -> ZExpr simplifyCases (Let (NonRec (show -> "fail", _)) rhs) = rhs
91
simplifyCases :: ZExpr -> ZExpr simplifyCases (Let (NonRec (show -> "fail", _)) rhs) = rhs
90
simplifyCases (Let (NonRec (show -> "fail", _)) rhs) = rhs
58
false
true
0
11
15
42
22
20
null
null
zhiyuanshi/fcore
frontend/SymbolicEvaluator.hs
bsd-2-clause
-- genVars n = map (text . ("x"++) . show) [1..n] fun e = fst . exec . seval $ e
81
fun e = fst . exec . seval $ e
30
fun e = fst . exec . seval $ e
30
true
false
3
5
21
27
11
16
null
null
robrix/surface
src/Expr.hs
bsd-3-clause
(.+.) :: Type -> Type -> Type a .+. Fix (Sum b) = Fix (Sum (a : b))
67
(.+.) :: Type -> Type -> Type a .+. Fix (Sum b) = Fix (Sum (a : b))
67
a .+. Fix (Sum b) = Fix (Sum (a : b))
37
false
true
0
11
17
53
26
27
null
null
syohex/ghc-mod
CabalDev.hs
bsd-3-clause
searchIt path = do let cabalDir = mpath path exist <- doesDirectoryExist cabalDir if exist then findConf cabalDir else searchIt $ init path where mpath a = joinPath a </> "cabal-dev/"
223
searchIt path = do let cabalDir = mpath path exist <- doesDirectoryExist cabalDir if exist then findConf cabalDir else searchIt $ init path where mpath a = joinPath a </> "cabal-dev/"
223
searchIt path = do let cabalDir = mpath path exist <- doesDirectoryExist cabalDir if exist then findConf cabalDir else searchIt $ init path where mpath a = joinPath a </> "cabal-dev/"
223
false
false
4
10
70
78
31
47
null
null
urbanslug/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
deAnnotate :: AnnExpr bndr annot -> Expr bndr deAnnotate (_, e) = deAnnotate' e
79
deAnnotate :: AnnExpr bndr annot -> Expr bndr deAnnotate (_, e) = deAnnotate' e
79
deAnnotate (_, e) = deAnnotate' e
33
false
true
0
8
13
40
18
22
null
null
grnet/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pPowerDelay :: Field pPowerDelay = -- FIXME: we can't use the proper type "NonNegative Double", since -- the default constant is a plain Double, not a non-negative one. -- And trying to fix the constant introduces a cyclic import. withDoc "Time in seconds to wait between powering on nodes" . defaultField [| C.oobPowerDelay |] $ simpleField "power_delay" [t| Double |]
381
pPowerDelay :: Field pPowerDelay = -- FIXME: we can't use the proper type "NonNegative Double", since -- the default constant is a plain Double, not a non-negative one. -- And trying to fix the constant introduces a cyclic import. withDoc "Time in seconds to wait between powering on nodes" . defaultField [| C.oobPowerDelay |] $ simpleField "power_delay" [t| Double |]
381
pPowerDelay = -- FIXME: we can't use the proper type "NonNegative Double", since -- the default constant is a plain Double, not a non-negative one. -- And trying to fix the constant introduces a cyclic import. withDoc "Time in seconds to wait between powering on nodes" . defaultField [| C.oobPowerDelay |] $ simpleField "power_delay" [t| Double |]
360
false
true
0
7
71
40
24
16
null
null
tattsun/stock
src/Stock/Tags.hs
mit
getRegionCount _ = tagCountPrivCount
36
getRegionCount _ = tagCountPrivCount
36
getRegionCount _ = tagCountPrivCount
36
false
false
0
5
3
9
4
5
null
null
pparkkin/eta
compiler/ETA/SimplCore/SimplEnv.hs
bsd-3-clause
mapFloats :: SimplEnv -> ((Id,CoreExpr) -> (Id,CoreExpr)) -> SimplEnv mapFloats env@SimplEnv { seFloats = Floats fs ff } fun = env { seFloats = Floats (mapOL app fs) ff } where app (NonRec b e) = case fun (b,e) of (b',e') -> NonRec b' e' app (Rec bs) = Rec (map fun bs) {- ************************************************************************ * * Substitution of Vars * * ************************************************************************ Note [Global Ids in the substitution] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We look up even a global (eg imported) Id in the substitution. Consider case X.g_34 of b { (a,b) -> ... case X.g_34 of { (p,q) -> ...} ... } The binder-swap in the occurrence analyser will add a binding for a LocalId version of g (with the same unique though): case X.g_34 of b { (a,b) -> let g_34 = b in ... case X.g_34 of { (p,q) -> ...} ... } So we want to look up the inner X.g_34 in the substitution, where we'll find that it has been substituted by b. (Or conceivably cloned.) -}
1,224
mapFloats :: SimplEnv -> ((Id,CoreExpr) -> (Id,CoreExpr)) -> SimplEnv mapFloats env@SimplEnv { seFloats = Floats fs ff } fun = env { seFloats = Floats (mapOL app fs) ff } where app (NonRec b e) = case fun (b,e) of (b',e') -> NonRec b' e' app (Rec bs) = Rec (map fun bs) {- ************************************************************************ * * Substitution of Vars * * ************************************************************************ Note [Global Ids in the substitution] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We look up even a global (eg imported) Id in the substitution. Consider case X.g_34 of b { (a,b) -> ... case X.g_34 of { (p,q) -> ...} ... } The binder-swap in the occurrence analyser will add a binding for a LocalId version of g (with the same unique though): case X.g_34 of b { (a,b) -> let g_34 = b in ... case X.g_34 of { (p,q) -> ...} ... } So we want to look up the inner X.g_34 in the substitution, where we'll find that it has been substituted by b. (Or conceivably cloned.) -}
1,224
mapFloats env@SimplEnv { seFloats = Floats fs ff } fun = env { seFloats = Floats (mapOL app fs) ff } where app (NonRec b e) = case fun (b,e) of (b',e') -> NonRec b' e' app (Rec bs) = Rec (map fun bs) {- ************************************************************************ * * Substitution of Vars * * ************************************************************************ Note [Global Ids in the substitution] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We look up even a global (eg imported) Id in the substitution. Consider case X.g_34 of b { (a,b) -> ... case X.g_34 of { (p,q) -> ...} ... } The binder-swap in the occurrence analyser will add a binding for a LocalId version of g (with the same unique though): case X.g_34 of b { (a,b) -> let g_34 = b in ... case X.g_34 of { (p,q) -> ...} ... } So we want to look up the inner X.g_34 in the substitution, where we'll find that it has been substituted by b. (Or conceivably cloned.) -}
1,154
false
true
0
10
383
158
82
76
null
null
sos22/himap
MailFilter.hs
gpl-3.0
parseMailFilter :: String -> Maybe MailFilter parseMailFilter = mboxDefnParser . tokenize
89
parseMailFilter :: String -> Maybe MailFilter parseMailFilter = mboxDefnParser . tokenize
89
parseMailFilter = mboxDefnParser . tokenize
43
false
true
0
6
10
22
11
11
null
null
snoyberg/ghc
libraries/base/GHC/Enum.hs
bsd-3-clause
toEnumError :: (Show a) => String -> Int -> (a,a) -> b toEnumError inst_ty i bnds = errorWithoutStackTrace $ "Enum.toEnum{" ++ inst_ty ++ "}: tag (" ++ show i ++ ") is outside of bounds " ++ show bnds
240
toEnumError :: (Show a) => String -> Int -> (a,a) -> b toEnumError inst_ty i bnds = errorWithoutStackTrace $ "Enum.toEnum{" ++ inst_ty ++ "}: tag (" ++ show i ++ ") is outside of bounds " ++ show bnds
240
toEnumError inst_ty i bnds = errorWithoutStackTrace $ "Enum.toEnum{" ++ inst_ty ++ "}: tag (" ++ show i ++ ") is outside of bounds " ++ show bnds
185
false
true
0
10
78
75
38
37
null
null
farrellm/advent-2016
src/Day21.hs
mit
invert cs (Rotate i) = update cs (Rotate (- i))
49
invert cs (Rotate i) = update cs (Rotate (- i))
49
invert cs (Rotate i) = update cs (Rotate (- i))
49
false
false
0
8
11
36
16
20
null
null
leshchevds/ganeti
test/hs/Test/Ganeti/PartialParams.hs
bsd-2-clause
-- | Tests that the partial params behave correctly as a monoid action. testToFilledMonoidLaw1 :: (PartialParams f p, Show f, Eq f, Monoid p) => f -> Property testToFilledMonoidLaw1 f = fillParams f mempty ==? f
234
testToFilledMonoidLaw1 :: (PartialParams f p, Show f, Eq f, Monoid p) => f -> Property testToFilledMonoidLaw1 f = fillParams f mempty ==? f
162
testToFilledMonoidLaw1 f = fillParams f mempty ==? f
52
true
true
0
6
58
57
29
28
null
null
ocharles/virtual-dom
src/VirtualDom/HTML/Attributes.hs
bsd-3-clause
inputMode_ :: Traversal' HTMLElement (Maybe JSString) inputMode_ = attributes . at "inputmode"
94
inputMode_ :: Traversal' HTMLElement (Maybe JSString) inputMode_ = attributes . at "inputmode"
94
inputMode_ = attributes . at "inputmode"
40
false
true
2
7
11
34
14
20
null
null
zachsully/hakaru
haskell/Language/Hakaru/CodeGen/AST.hs
bsd-3-clause
a .*. b = CBinary CMulOp a b
29
a .*. b = CBinary CMulOp a b
29
a .*. b = CBinary CMulOp a b
29
false
false
1
5
8
19
9
10
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2014-Alejandro_Serrano_Mena-Beginning_Haskell/old/code/src/C06/Main.hs
unlicense
-- lens can be used for anything that has well-defined way to get/return value fullNameSL :: Simple Lens PersonI String fullNameSL = lens (\(PersonI f l) -> f ++ " " ++ l) (\_ newFullName -> case words newFullName of f:l:_ -> PersonI f l _ -> error "Incorrect name")
371
fullNameSL :: Simple Lens PersonI String fullNameSL = lens (\(PersonI f l) -> f ++ " " ++ l) (\_ newFullName -> case words newFullName of f:l:_ -> PersonI f l _ -> error "Incorrect name")
291
fullNameSL = lens (\(PersonI f l) -> f ++ " " ++ l) (\_ newFullName -> case words newFullName of f:l:_ -> PersonI f l _ -> error "Incorrect name")
250
true
true
0
12
154
93
47
46
null
null
haskell-distributed/network-transport
src/Network/Transport/Internal.hs
bsd-3-clause
-- | Logging (for debugging) tlog :: MonadIO m => String -> m () tlog _ = return ()
83
tlog :: MonadIO m => String -> m () tlog _ = return ()
54
tlog _ = return ()
18
true
true
0
9
18
41
18
23
null
null
JacquesCarette/literate-scientific-software
People/Dan/Presentations/CommitteeMeeting4/BodyOld.hs
bsd-2-clause
s6_2_3 = Section ((inModel ^. defn) :+: S "s") (map Con s6_2_3_IMods)
69
s6_2_3 = Section ((inModel ^. defn) :+: S "s") (map Con s6_2_3_IMods)
69
s6_2_3 = Section ((inModel ^. defn) :+: S "s") (map Con s6_2_3_IMods)
69
false
false
0
9
11
36
18
18
null
null
shockkolate/containers
Data/IntSet/Base.hs
bsd-3-clause
maxView :: IntSet -> Maybe (Key, IntSet) maxView t = case t of Nil -> Nothing Bin p m l r | m < 0 -> case go l of (result, l') -> Just (result, bin p m l' r) _ -> Just (go t) where go (Bin p m l r) = case go r of (result, r') -> (result, bin p m l r') go (Tip kx bm) = case highestBitSet bm of bi -> (kx + bi, tip kx (bm .&. complement (bitmapOfSuffix bi))) go Nil = error "maxView Nil" -- | /O(min(n,W))/. Retrieves the minimal key of the set, and the set -- stripped of that element, or 'Nothing' if passed an empty set.
563
maxView :: IntSet -> Maybe (Key, IntSet) maxView t = case t of Nil -> Nothing Bin p m l r | m < 0 -> case go l of (result, l') -> Just (result, bin p m l' r) _ -> Just (go t) where go (Bin p m l r) = case go r of (result, r') -> (result, bin p m l r') go (Tip kx bm) = case highestBitSet bm of bi -> (kx + bi, tip kx (bm .&. complement (bitmapOfSuffix bi))) go Nil = error "maxView Nil" -- | /O(min(n,W))/. Retrieves the minimal key of the set, and the set -- stripped of that element, or 'Nothing' if passed an empty set.
563
maxView t = case t of Nil -> Nothing Bin p m l r | m < 0 -> case go l of (result, l') -> Just (result, bin p m l' r) _ -> Just (go t) where go (Bin p m l r) = case go r of (result, r') -> (result, bin p m l r') go (Tip kx bm) = case highestBitSet bm of bi -> (kx + bi, tip kx (bm .&. complement (bitmapOfSuffix bi))) go Nil = error "maxView Nil" -- | /O(min(n,W))/. Retrieves the minimal key of the set, and the set -- stripped of that element, or 'Nothing' if passed an empty set.
522
false
true
2
16
158
239
121
118
null
null
brendanhay/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GetPublisherProFilesByAccountIdResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gppfbairProFiles' getPublisherProFilesByAccountIdResponse :: GetPublisherProFilesByAccountIdResponse getPublisherProFilesByAccountIdResponse = GetPublisherProFilesByAccountIdResponse' {_gppfbairProFiles = Nothing}
419
getPublisherProFilesByAccountIdResponse :: GetPublisherProFilesByAccountIdResponse getPublisherProFilesByAccountIdResponse = GetPublisherProFilesByAccountIdResponse' {_gppfbairProFiles = Nothing}
201
getPublisherProFilesByAccountIdResponse = GetPublisherProFilesByAccountIdResponse' {_gppfbairProFiles = Nothing}
114
true
true
1
7
48
28
16
12
null
null
anr/prog-haskell
chapter-04.hs
mit
-- 5 and5 :: Bool -> Bool -> Bool and5 x y = if x == True then if y == True then True else False else False
145
and5 :: Bool -> Bool -> Bool and5 x y = if x == True then if y == True then True else False else False
139
and5 x y = if x == True then if y == True then True else False else False
110
true
true
0
7
65
54
28
26
null
null
keera-studios/gtk-helpers
gtk3/src/Data/Board/GameBoardIO.hs
bsd-3-clause
gameBoardMapM_ :: (Ix index) => GameBoard index a -> ((index,index) -> a -> IO ()) -> IO () gameBoardMapM_ (GameBoard array) f = arrayMapM_ array f' where f' x e = maybe (return ()) (f x) e
192
gameBoardMapM_ :: (Ix index) => GameBoard index a -> ((index,index) -> a -> IO ()) -> IO () gameBoardMapM_ (GameBoard array) f = arrayMapM_ array f' where f' x e = maybe (return ()) (f x) e
192
gameBoardMapM_ (GameBoard array) f = arrayMapM_ array f' where f' x e = maybe (return ()) (f x) e
100
false
true
0
12
39
109
54
55
null
null
capitanbatata/sandbox
hedgehog-vs-qc/test/qc/Main.hs
gpl-3.0
randomTraceND :: Gen Trace randomTraceND = Trace <$> listOf1 randomFooND
72
randomTraceND :: Gen Trace randomTraceND = Trace <$> listOf1 randomFooND
72
randomTraceND = Trace <$> listOf1 randomFooND
45
false
true
0
6
9
21
10
11
null
null
MegaShow/college-programming
Homework/Haskell Function Programming/Lab3.hs
mit
-------------------------------------------------------------------------------- -- 习题5 定义isTaut函数 -------------------------------------------------------------------------------- --判断是否永远为真 judge :: Prop -> [Subst] -> Bool judge n [] = True
242
judge :: Prop -> [Subst] -> Bool judge n [] = True
50
judge n [] = True
17
true
true
0
7
18
33
19
14
null
null
ezyang/ghc
hadrian/src/Hadrian/Package.hs
bsd-3-clause
isLibrary _ = False
19
isLibrary _ = False
19
isLibrary _ = False
19
false
false
0
4
3
10
4
6
null
null
dmbarbour/Sirea
src/Sirea/Internal/LTypes.hs
bsd-3-clause
ln_toMaybe _ = Nothing
22
ln_toMaybe _ = Nothing
22
ln_toMaybe _ = Nothing
22
false
false
0
5
3
9
4
5
null
null
madgodofmagic/fregging-janitor
MultiSSH.hs
gpl-3.0
main :: IO () main = do args <- getArgs myname <- getProgName case args of (username:command:timeout_secs:serverlist:[]) -> do thelist <- readFile serverlist getResults username command timeout_secs thelist (username:command:timeout_secs:[]) -> do getContents >>= getResults username command timeout_secs _ -> fail $ "Usage: " ++ myname ++ " remote_username command timeout_secs [serverlist_filename]"
437
main :: IO () main = do args <- getArgs myname <- getProgName case args of (username:command:timeout_secs:serverlist:[]) -> do thelist <- readFile serverlist getResults username command timeout_secs thelist (username:command:timeout_secs:[]) -> do getContents >>= getResults username command timeout_secs _ -> fail $ "Usage: " ++ myname ++ " remote_username command timeout_secs [serverlist_filename]"
437
main = do args <- getArgs myname <- getProgName case args of (username:command:timeout_secs:serverlist:[]) -> do thelist <- readFile serverlist getResults username command timeout_secs thelist (username:command:timeout_secs:[]) -> do getContents >>= getResults username command timeout_secs _ -> fail $ "Usage: " ++ myname ++ " remote_username command timeout_secs [serverlist_filename]"
423
false
true
1
16
86
146
67
79
null
null
plilja/h99
p9.hs
apache-2.0
pack :: (Eq a) => [a] -> [[a]] pack [] = []
43
pack :: (Eq a) => [a] -> [[a]] pack [] = []
43
pack [] = []
12
false
true
0
8
11
40
22
18
null
null
lifengsun/haskell-exercise
scheme/05/conditionalparser.hs
gpl-3.0
unpackStr notString = throwError $ TypeMismatch "string" notString
66
unpackStr notString = throwError $ TypeMismatch "string" notString
66
unpackStr notString = throwError $ TypeMismatch "string" notString
66
false
false
0
6
7
18
8
10
null
null
EduPH/LPOenH
codigo/Herbrand.hs
gpl-3.0
signaturaTerm (Ter c []) = ([c],[],[])
38
signaturaTerm (Ter c []) = ([c],[],[])
38
signaturaTerm (Ter c []) = ([c],[],[])
38
false
false
0
8
5
35
19
16
null
null
themoritz/cabal
Cabal/Distribution/Backpack.hs
bsd-3-clause
----------------------------------------------------------------------- -- Conversions to UnitId -- | When typechecking, we don't demand that a freshly instantiated -- 'IndefFullUnitId' be compiled; instead, we just depend on the -- installed indefinite unit installed at the 'ComponentId'. abstractUnitId :: OpenUnitId -> UnitId abstractUnitId (DefiniteUnitId def_uid) = unDefUnitId def_uid
392
abstractUnitId :: OpenUnitId -> UnitId abstractUnitId (DefiniteUnitId def_uid) = unDefUnitId def_uid
100
abstractUnitId (DefiniteUnitId def_uid) = unDefUnitId def_uid
61
true
true
0
6
45
36
19
17
null
null
adinapoli/xmonad-contrib
XMonad/Util/Themes.hs
bsd-3-clause
wfarrTheme :: ThemeInfo wfarrTheme = newTheme { themeName = "wfarrTheme" , themeAuthor = "Will Farrington" , themeDescription = "A nice blue/black theme." , theme = defaultTheme { activeColor = "#4c7899" , inactiveColor = "#333333" , activeBorderColor = "#285577" , inactiveBorderColor = "#222222" , activeTextColor = "#ffffff" , inactiveTextColor = "#888888" , fontName = "-*-fixed-medium-r-*--10-*-*-*-*-*-iso8859-1" , decoHeight = 12 } }
937
wfarrTheme :: ThemeInfo wfarrTheme = newTheme { themeName = "wfarrTheme" , themeAuthor = "Will Farrington" , themeDescription = "A nice blue/black theme." , theme = defaultTheme { activeColor = "#4c7899" , inactiveColor = "#333333" , activeBorderColor = "#285577" , inactiveBorderColor = "#222222" , activeTextColor = "#ffffff" , inactiveTextColor = "#888888" , fontName = "-*-fixed-medium-r-*--10-*-*-*-*-*-iso8859-1" , decoHeight = 12 } }
937
wfarrTheme = newTheme { themeName = "wfarrTheme" , themeAuthor = "Will Farrington" , themeDescription = "A nice blue/black theme." , theme = defaultTheme { activeColor = "#4c7899" , inactiveColor = "#333333" , activeBorderColor = "#285577" , inactiveBorderColor = "#222222" , activeTextColor = "#ffffff" , inactiveTextColor = "#888888" , fontName = "-*-fixed-medium-r-*--10-*-*-*-*-*-iso8859-1" , decoHeight = 12 } }
913
false
true
0
9
556
97
58
39
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/DMSEventSubscription.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html#cfn-dms-eventsubscription-subscriptionname dmsesSubscriptionName :: Lens' DMSEventSubscription (Maybe (Val Text)) dmsesSubscriptionName = lens _dMSEventSubscriptionSubscriptionName (\s a -> s { _dMSEventSubscriptionSubscriptionName = a })
345
dmsesSubscriptionName :: Lens' DMSEventSubscription (Maybe (Val Text)) dmsesSubscriptionName = lens _dMSEventSubscriptionSubscriptionName (\s a -> s { _dMSEventSubscriptionSubscriptionName = a })
195
dmsesSubscriptionName = lens _dMSEventSubscriptionSubscriptionName (\s a -> s { _dMSEventSubscriptionSubscriptionName = a })
124
true
true
0
9
22
52
28
24
null
null
ekmett/zlib-lens
src/Codec/Compression/Zlib/Lens.hs
bsd-3-clause
-- | -- Compresses a 'L.ByteString' using the given compression format and the given advanced parameters. compressed' :: Format -> Params -> Iso' L.ByteString L.ByteString compressed' fmt (Params c d) = dimap (compress fmt c) (fmap (decompress fmt d))
251
compressed' :: Format -> Params -> Iso' L.ByteString L.ByteString compressed' fmt (Params c d) = dimap (compress fmt c) (fmap (decompress fmt d))
145
compressed' fmt (Params c d) = dimap (compress fmt c) (fmap (decompress fmt d))
79
true
true
0
9
38
70
35
35
null
null
uuhan/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
rFunArgToPArg :: RFunArg -> PArg rFunArgToPArg (RFunArg n _ RExplicit e) = PExp 0 (rArgOpts e) n Placeholder
108
rFunArgToPArg :: RFunArg -> PArg rFunArgToPArg (RFunArg n _ RExplicit e) = PExp 0 (rArgOpts e) n Placeholder
108
rFunArgToPArg (RFunArg n _ RExplicit e) = PExp 0 (rArgOpts e) n Placeholder
75
false
true
0
7
17
45
22
23
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M01/D10/Solution.hs
mit
{-- And measure the size of the value downloaded as a String and then downloaded as Text. What is the space-savings? --} ebook :: URL -> IO ByteString ebook = simpleHttp
170
ebook :: URL -> IO ByteString ebook = simpleHttp
48
ebook = simpleHttp
18
true
true
0
7
31
25
11
14
null
null
robashton/ghcmud
app/Main.hs
bsd-3-clause
loadFailure NoRoomsInWorld = print "No rooms in the loaded world"
65
loadFailure NoRoomsInWorld = print "No rooms in the loaded world"
65
loadFailure NoRoomsInWorld = print "No rooms in the loaded world"
65
false
false
0
5
9
12
5
7
null
null
osa1/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
c_irts FUnit l x = x
20
c_irts FUnit l x = x
20
c_irts FUnit l x = x
20
false
false
0
5
5
13
6
7
null
null
SimplyNaOH/voronoi
src/BreakpointTree.hs
gpl-3.0
deleteX :: BTree -> BTree deleteX Nil = error "deleteX: Cannot delete Nil"
74
deleteX :: BTree -> BTree deleteX Nil = error "deleteX: Cannot delete Nil"
74
deleteX Nil = error "deleteX: Cannot delete Nil"
48
false
true
0
5
12
21
10
11
null
null
siddhanathan/Krypton
chem.hs
gpl-3.0
digitsReverse :: Int -> [Int] digitsReverse 0 = []
50
digitsReverse :: Int -> [Int] digitsReverse 0 = []
50
digitsReverse 0 = []
20
false
true
0
6
8
23
12
11
null
null
ford-prefect/haskell-gi
lib/Data/GI/CodeGen/Code.hs
lgpl-2.1
-- | Like `dotModulePath`, but add a "GI." prefix. dotWithPrefix :: ModulePath -> Text dotWithPrefix mp = dotModulePath ("GI" <> mp)
132
dotWithPrefix :: ModulePath -> Text dotWithPrefix mp = dotModulePath ("GI" <> mp)
81
dotWithPrefix mp = dotModulePath ("GI" <> mp)
45
true
true
0
7
20
29
15
14
null
null
plow-technologies/live-vdom-todomvc
src/View.hs
bsd-3-clause
todoBodyFooter :: (TodoFilter -> Message ()) -> Message () -> TodoFilter -> S.Seq Todo -> LiveVDom todoBodyFooter updateFilter clearTodos selected todoItems = [valentine| <footer id="footer"> <span id="todo-count"> <strong> ${todoItemsCount $ S.length todoItems} <ul id="filters"> ${filterOption "All" selected FilterNone updateFilter } ${filterOption "Active" selected FilterActive updateFilter } ${filterOption "Completed" selected FilterCompleted updateFilter } ${buttonWith clearTodos [Property "id" $ JSPString "clear-completed"] "Clear completed"} |]
584
todoBodyFooter :: (TodoFilter -> Message ()) -> Message () -> TodoFilter -> S.Seq Todo -> LiveVDom todoBodyFooter updateFilter clearTodos selected todoItems = [valentine| <footer id="footer"> <span id="todo-count"> <strong> ${todoItemsCount $ S.length todoItems} <ul id="filters"> ${filterOption "All" selected FilterNone updateFilter } ${filterOption "Active" selected FilterActive updateFilter } ${filterOption "Completed" selected FilterCompleted updateFilter } ${buttonWith clearTodos [Property "id" $ JSPString "clear-completed"] "Clear completed"} |]
584
todoBodyFooter updateFilter clearTodos selected todoItems = [valentine| <footer id="footer"> <span id="todo-count"> <strong> ${todoItemsCount $ S.length todoItems} <ul id="filters"> ${filterOption "All" selected FilterNone updateFilter } ${filterOption "Active" selected FilterActive updateFilter } ${filterOption "Completed" selected FilterCompleted updateFilter } ${buttonWith clearTodos [Property "id" $ JSPString "clear-completed"] "Clear completed"} |]
485
false
true
0
10
89
62
32
30
null
null
thalerjonathan/phd
public/towards/SugarScape/experimental/concurrent/src/SugarScape/Agent/Common.hs
gpl-3.0
updateAgentState :: MonadState SugAgentState m => (SugAgentState -> SugAgentState) -> m () updateAgentState = modify
153
updateAgentState :: MonadState SugAgentState m => (SugAgentState -> SugAgentState) -> m () updateAgentState = modify
152
updateAgentState = modify
25
false
true
0
8
51
36
18
18
null
null
Philonous/d-bus
src/DBus/Scaffold.hs
mit
nodePropertyDescriptions :: INode -> [PropertyDescription] nodePropertyDescriptions node = mapIInterfaces interfacPropertyDescriptions (fromMaybe "" $ nodeName node) node
189
nodePropertyDescriptions :: INode -> [PropertyDescription] nodePropertyDescriptions node = mapIInterfaces interfacPropertyDescriptions (fromMaybe "" $ nodeName node) node
189
nodePropertyDescriptions node = mapIInterfaces interfacPropertyDescriptions (fromMaybe "" $ nodeName node) node
130
false
true
0
8
34
41
20
21
null
null