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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
leshchevds/ganeti | src/Ganeti/Utils.hs | bsd-2-clause | recombineEithers :: (Show a, Show b) =>
[a] -> [b] -> [Bool] -> Result [Either a b]
recombineEithers lefts rights trail =
foldM recombiner ([], lefts, rights) trail >>= checker
where checker (eithers, [], []) = Ok eithers
checker (_, lefts', rights') =
Bad $ "Inconsistent... | 785 | recombineEithers :: (Show a, Show b) =>
[a] -> [b] -> [Bool] -> Result [Either a b]
recombineEithers lefts rights trail =
foldM recombiner ([], lefts, rights) trail >>= checker
where checker (eithers, [], []) = Ok eithers
checker (_, lefts', rights') =
Bad $ "Inconsistent... | 785 | recombineEithers lefts rights trail =
foldM recombiner ([], lefts, rights) trail >>= checker
where checker (eithers, [], []) = Ok eithers
checker (_, lefts', rights') =
Bad $ "Inconsistent results after recombination, l'=" ++
show lefts' ++ ", r'=" ++ show rights'
r... | 681 | false | true | 2 | 11 | 287 | 299 | 154 | 145 | null | null |
chemist/hf | src/Utils.hs | apache-2.0 | merge2 :: Ord b => (a -> b) -> [a] -> [a] -> [a]
merge2 f (a:as) (b:bs)
| f(a) < f(b) = a : merge2 f as (b:bs)
| otherwise = b : merge2 f (a:as) bs | 153 | merge2 :: Ord b => (a -> b) -> [a] -> [a] -> [a]
merge2 f (a:as) (b:bs)
| f(a) < f(b) = a : merge2 f as (b:bs)
| otherwise = b : merge2 f (a:as) bs | 153 | merge2 f (a:as) (b:bs)
| f(a) < f(b) = a : merge2 f as (b:bs)
| otherwise = b : merge2 f (a:as) bs | 104 | false | true | 1 | 10 | 43 | 136 | 69 | 67 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The visitorId identifies the visitor.
vlrVisitorId :: Lens' VideoListResponse (Maybe Text)
vlrVisitorId
= lens _vlrVisitorId (\ s a -> s{_vlrVisitorId = a}) | 163 | vlrVisitorId :: Lens' VideoListResponse (Maybe Text)
vlrVisitorId
= lens _vlrVisitorId (\ s a -> s{_vlrVisitorId = a}) | 120 | vlrVisitorId
= lens _vlrVisitorId (\ s a -> s{_vlrVisitorId = a}) | 67 | true | true | 0 | 9 | 25 | 48 | 25 | 23 | null | null |
cobbpg/elerea | FRP/Elerea/Simple.hs | bsd-3-clause | addSignal :: (a -> IO a) -- ^ sampling function
-> (a -> IO ()) -- ^ aging function
-> IORef (Phase a) -- ^ the mutable variable behind the signal
-> IORef UpdatePool -- ^ the pool of update actions
-> IO (Signal a) -- ^ the signal created
addSignal sample update ref... | 2,181 | addSignal :: (a -> IO a) -- ^ sampling function
-> (a -> IO ()) -- ^ aging function
-> IORef (Phase a) -- ^ the mutable variable behind the signal
-> IORef UpdatePool -- ^ the pool of update actions
-> IO (Signal a)
addSignal sample update ref pool = do
let upd = read... | 2,154 | addSignal sample update ref pool = do
let upd = readIORef ref >>= \v -> case v of
Ready x -> update x
_ -> return ()
fin = readIORef ref >>= \v -> case v of
Updated x _ -> writeIORef ref $! Ready x
_ -> error "Signal not updated!"
s... | 1,888 | true | true | 0 | 16 | 728 | 312 | 171 | 141 | null | null |
yeyan/xmonad-wallpaper | src/XMonad/Wallpaper/Expand.hs | lgpl-3.0 | interpolate (Variable var) = maybe "" id <$> getEnv var | 55 | interpolate (Variable var) = maybe "" id <$> getEnv var | 55 | interpolate (Variable var) = maybe "" id <$> getEnv var | 55 | false | false | 0 | 7 | 9 | 27 | 12 | 15 | null | null |
jhartikainen/hs-language-php | Tokenizer.hs | bsd-3-clause | parsePHPCode :: Parser ParseResult
parsePHPCode = do
reserved "<?php"
seq <- sequenceOfStmt
(optional $ string "?>") <|> phpEof
return $ PHPCode seq | 164 | parsePHPCode :: Parser ParseResult
parsePHPCode = do
reserved "<?php"
seq <- sequenceOfStmt
(optional $ string "?>") <|> phpEof
return $ PHPCode seq | 164 | parsePHPCode = do
reserved "<?php"
seq <- sequenceOfStmt
(optional $ string "?>") <|> phpEof
return $ PHPCode seq | 129 | false | true | 0 | 10 | 37 | 54 | 24 | 30 | null | null |
astro/haskell-torrent | src/Data/ByteString/Builder.hs | bsd-2-clause | putInt64le :: Int64 -> Builder
putInt64le = putWord64le . fromIntegral | 70 | putInt64le :: Int64 -> Builder
putInt64le = putWord64le . fromIntegral | 70 | putInt64le = putWord64le . fromIntegral | 39 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
mydaum/cabal | Cabal/Distribution/Simple/BuildTarget.hs | bsd-3-clause | matchModuleFileStem :: [ModuleName] -> FilePath -> Match ModuleName
matchModuleFileStem ms =
increaseConfidenceFor
. matchInexactly caseFold
[ (toFilePath m, m) | m <- ms ]
. dropExtension | 210 | matchModuleFileStem :: [ModuleName] -> FilePath -> Match ModuleName
matchModuleFileStem ms =
increaseConfidenceFor
. matchInexactly caseFold
[ (toFilePath m, m) | m <- ms ]
. dropExtension | 210 | matchModuleFileStem ms =
increaseConfidenceFor
. matchInexactly caseFold
[ (toFilePath m, m) | m <- ms ]
. dropExtension | 142 | false | true | 2 | 8 | 47 | 64 | 31 | 33 | null | null |
KaneTW/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | -- | Locate the platform-specific location for the init script
getInitScript :: Idris FilePath
getInitScript = do idrisDir <- getIdrisUserDataDir
return $ idrisDir </> "repl" </> "init"
-- | Run the initialisation script | 240 | getInitScript :: Idris FilePath
getInitScript = do idrisDir <- getIdrisUserDataDir
return $ idrisDir </> "repl" </> "init"
-- | Run the initialisation script | 177 | getInitScript = do idrisDir <- getIdrisUserDataDir
return $ idrisDir </> "repl" </> "init"
-- | Run the initialisation script | 145 | true | true | 1 | 9 | 52 | 42 | 19 | 23 | null | null |
fultonms/artificial-intelligence | a1/Tiling.hs | mit | testRows :: [[Tile]] -> Bool
testRows [] = True | 47 | testRows :: [[Tile]] -> Bool
testRows [] = True | 47 | testRows [] = True | 18 | false | true | 0 | 7 | 8 | 26 | 14 | 12 | null | null |
frenetic-lang/netcore-1.0 | src/Frenetic/Slices/Sat.hs | bsd-3-clause | inOutput :: (Slice -> Map.Map Loc Predicate) -> Slice -> Z3Packet -> BoolExp
inOutput gress slice pkt = nOr (onInternal ++ onGress) where
onInternal = map (\l -> atLoc l pkt) (Set.toList (internal slice))
onGress = map (\(l, pred) -> ZAnd (atLoc l pkt) (match pred pkt))
(Map.toList (gress slice)) | 318 | inOutput :: (Slice -> Map.Map Loc Predicate) -> Slice -> Z3Packet -> BoolExp
inOutput gress slice pkt = nOr (onInternal ++ onGress) where
onInternal = map (\l -> atLoc l pkt) (Set.toList (internal slice))
onGress = map (\(l, pred) -> ZAnd (atLoc l pkt) (match pred pkt))
(Map.toList (gress slice)) | 318 | inOutput gress slice pkt = nOr (onInternal ++ onGress) where
onInternal = map (\l -> atLoc l pkt) (Set.toList (internal slice))
onGress = map (\(l, pred) -> ZAnd (atLoc l pkt) (match pred pkt))
(Map.toList (gress slice)) | 241 | false | true | 0 | 10 | 70 | 151 | 78 | 73 | null | null |
ngzax/urbit | pkg/hs/urbit-king/lib/Urbit/Vere/Behn.hs | mit | wakeEv :: Ev
wakeEv = EvBlip $ BlipEvBehn $ BehnEvWake () () | 60 | wakeEv :: Ev
wakeEv = EvBlip $ BlipEvBehn $ BehnEvWake () () | 60 | wakeEv = EvBlip $ BlipEvBehn $ BehnEvWake () () | 47 | false | true | 4 | 6 | 11 | 36 | 15 | 21 | null | null |
jwtouron/haskell-play | ProjectEuler/Problem1.hs | mit | multipleOf x y = y `mod` x == 0 | 31 | multipleOf x y = y `mod` x == 0 | 31 | multipleOf x y = y `mod` x == 0 | 31 | false | false | 0 | 6 | 8 | 21 | 11 | 10 | null | null |
alios/geojson-types | src/Data/GeoJSON/Position.hs | bsd-3-clause | takeBoundingBoxArray :: HasBoundingBox t a => Int -> t -> a
takeBoundingBoxArray n a = (boundingBoxArray . boundingBox $ a) !! n | 128 | takeBoundingBoxArray :: HasBoundingBox t a => Int -> t -> a
takeBoundingBoxArray n a = (boundingBoxArray . boundingBox $ a) !! n | 128 | takeBoundingBoxArray n a = (boundingBoxArray . boundingBox $ a) !! n | 68 | false | true | 0 | 8 | 21 | 48 | 24 | 24 | null | null |
swamp-agr/carbuyer-advisor | fay/FFIExample.hs | mit | clickInputCombo :: Text -> Fay ()
clickInputCombo eid = do
elem <- getElementById eid
onClick elem $ onComboBoxClick eid | 125 | clickInputCombo :: Text -> Fay ()
clickInputCombo eid = do
elem <- getElementById eid
onClick elem $ onComboBoxClick eid | 125 | clickInputCombo eid = do
elem <- getElementById eid
onClick elem $ onComboBoxClick eid | 91 | false | true | 0 | 8 | 23 | 46 | 20 | 26 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_FOLDLEVELBOXFOOTERFLAG :: Int
wxSTC_FOLDLEVELBOXFOOTERFLAG = 32768 | 72 | wxSTC_FOLDLEVELBOXFOOTERFLAG :: Int
wxSTC_FOLDLEVELBOXFOOTERFLAG = 32768 | 72 | wxSTC_FOLDLEVELBOXFOOTERFLAG = 32768 | 36 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
phischu/fragnix | tests/packages/scotty/Data.IntSet.Internal.hs | bsd-3-clause | showTree :: IntSet -> String
showTree s
= showTreeWith True False s | 69 | showTree :: IntSet -> String
showTree s
= showTreeWith True False s | 69 | showTree s
= showTreeWith True False s | 40 | false | true | 0 | 5 | 13 | 25 | 12 | 13 | null | null |
abailly/hevents | test/Hevents/Eff/Demo.hs | mit | counterState :<|> incCounter :<|> decCounter = client counterApi | 64 | counterState :<|> incCounter :<|> decCounter = client counterApi | 64 | counterState :<|> incCounter :<|> decCounter = client counterApi | 64 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
maque/Hate | samples/sample_sprite.hs | mit | sampleUpdate :: UpdateFn SampleState
sampleUpdate _ = sehes . traverse %= moveSehe | 83 | sampleUpdate :: UpdateFn SampleState
sampleUpdate _ = sehes . traverse %= moveSehe | 82 | sampleUpdate _ = sehes . traverse %= moveSehe | 45 | false | true | 0 | 6 | 12 | 25 | 12 | 13 | null | null |
mgsloan/zeroth | src/Language/Haskell/TH/ZeroTH.hs | bsd-3-clause | emptySrcLoc :: SrcLoc
emptySrcLoc = SrcLoc "" 0 0 | 49 | emptySrcLoc :: SrcLoc
emptySrcLoc = SrcLoc "" 0 0 | 49 | emptySrcLoc = SrcLoc "" 0 0 | 27 | false | true | 0 | 6 | 8 | 27 | 10 | 17 | null | null |
ksaveljev/hake-2 | src/Client/MenuGlobals.hs | bsd-3-clause | infiniteAmmoBoxRef :: Ref MenuListS
infiniteAmmoBoxRef = Ref 31 | 63 | infiniteAmmoBoxRef :: Ref MenuListS
infiniteAmmoBoxRef = Ref 31 | 63 | infiniteAmmoBoxRef = Ref 31 | 27 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
rwbarton/rw | Crawl/Explore.hs | bsd-3-clause | stairDirection DNGN_EXIT_LABYRINTH = GoUp | 41 | stairDirection DNGN_EXIT_LABYRINTH = GoUp | 41 | stairDirection DNGN_EXIT_LABYRINTH = GoUp | 41 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
tehgeekmeister/jello | Interpreter.hs | bsd-2-clause | lookup'' :: (Show a, Eq a) => a -> [(a, JelloVal)] -> JelloVal
lookup'' name state = maybe (error $ (show name) ++ " is undefined.") id $ lookup name state | 155 | lookup'' :: (Show a, Eq a) => a -> [(a, JelloVal)] -> JelloVal
lookup'' name state = maybe (error $ (show name) ++ " is undefined.") id $ lookup name state | 155 | lookup'' name state = maybe (error $ (show name) ++ " is undefined.") id $ lookup name state | 92 | false | true | 0 | 11 | 30 | 84 | 42 | 42 | null | null |
DavidAlphaFox/darcs | src/Darcs/Patch/Match.hs | gpl-2.0 | touchmatch r (Sealed2 hp) = let files = listTouchedFiles $ patchcontents $ hopefully hp
in any (isJust . matchRegex (mkRegex r)) files | 162 | touchmatch r (Sealed2 hp) = let files = listTouchedFiles $ patchcontents $ hopefully hp
in any (isJust . matchRegex (mkRegex r)) files | 162 | touchmatch r (Sealed2 hp) = let files = listTouchedFiles $ patchcontents $ hopefully hp
in any (isJust . matchRegex (mkRegex r)) files | 162 | false | false | 0 | 12 | 49 | 60 | 28 | 32 | null | null |
frozencemetery/hdata | HData/Heap/Binary.hs | gpl-3.0 | maxelt (H e l r s) =
let lm = fromMaybe e $ maxelt l
rm = fromMaybe e $ maxelt r
in Just $ max e $ max lm rm | 118 | maxelt (H e l r s) =
let lm = fromMaybe e $ maxelt l
rm = fromMaybe e $ maxelt r
in Just $ max e $ max lm rm | 118 | maxelt (H e l r s) =
let lm = fromMaybe e $ maxelt l
rm = fromMaybe e $ maxelt r
in Just $ max e $ max lm rm | 118 | false | false | 0 | 10 | 40 | 73 | 33 | 40 | null | null |
fmthoma/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (HsArrForm op _ args)
= hang (ptext (sLit "(|") <+> ppr_lexpr op)
4 (sep (map (pprCmdArg.unLoc) args) <+> ptext (sLit "|)")) | 144 | ppr_expr (HsArrForm op _ args)
= hang (ptext (sLit "(|") <+> ppr_lexpr op)
4 (sep (map (pprCmdArg.unLoc) args) <+> ptext (sLit "|)")) | 144 | ppr_expr (HsArrForm op _ args)
= hang (ptext (sLit "(|") <+> ppr_lexpr op)
4 (sep (map (pprCmdArg.unLoc) args) <+> ptext (sLit "|)")) | 144 | false | false | 0 | 12 | 32 | 77 | 37 | 40 | null | null |
siddhanathan/yi | yi-language/src/Yi/Lexer/Alex.hs | gpl-2.0 | moveCh :: Posn -> Char -> Posn
moveCh (Posn o l c) '\t' = Posn (o+1) l (((c+8) `div` 8)*8) | 96 | moveCh :: Posn -> Char -> Posn
moveCh (Posn o l c) '\t' = Posn (o+1) l (((c+8) `div` 8)*8) | 96 | moveCh (Posn o l c) '\t' = Posn (o+1) l (((c+8) `div` 8)*8) | 65 | false | true | 0 | 11 | 25 | 76 | 39 | 37 | null | null |
gabesoft/kapi | src/Persistence/RssReaders/Subscriptions.hs | bsd-3-clause | mkCountsSearch :: Text -> [RecordId] -> B.Search
mkCountsSearch bucketKey ids =
B.mkAggregateSearch (Just $ B.QueryBoolQuery boolQuery) termsAgg
where
boolQuery = B.mkBoolQuery [unreadQuery, subIdsQuery] [] [] []
unreadQuery = B.TermQuery (B.Term "read" "false") Nothing
subIdsQuery = B.TermsQuery subIdL... | 563 | mkCountsSearch :: Text -> [RecordId] -> B.Search
mkCountsSearch bucketKey ids =
B.mkAggregateSearch (Just $ B.QueryBoolQuery boolQuery) termsAgg
where
boolQuery = B.mkBoolQuery [unreadQuery, subIdsQuery] [] [] []
unreadQuery = B.TermQuery (B.Term "read" "false") Nothing
subIdsQuery = B.TermsQuery subIdL... | 563 | mkCountsSearch bucketKey ids =
B.mkAggregateSearch (Just $ B.QueryBoolQuery boolQuery) termsAgg
where
boolQuery = B.mkBoolQuery [unreadQuery, subIdsQuery] [] [] []
unreadQuery = B.TermQuery (B.Term "read" "false") Nothing
subIdsQuery = B.TermsQuery subIdLabel (NE.fromList ids)
termsAgg = B.mkAggrega... | 514 | false | true | 1 | 10 | 94 | 179 | 90 | 89 | null | null |
zhensydow/ptrader | src/PTrader/Portfolio.hs | gpl-3.0 | calcSoldStocks :: StockID -> Portfolio Int
calcSoldStocks (StockID idx) = do
res <- execPFParamStatement sql [(":par",Int $ fromIntegral idx)]
case res of
Right [[[(_,Int n)]]] -> return $ fromIntegral n
_ -> return 0
where
sql = "SELECT SUM(amount) FROM sell WHERE stockid=:par"
-- ------------... | 385 | calcSoldStocks :: StockID -> Portfolio Int
calcSoldStocks (StockID idx) = do
res <- execPFParamStatement sql [(":par",Int $ fromIntegral idx)]
case res of
Right [[[(_,Int n)]]] -> return $ fromIntegral n
_ -> return 0
where
sql = "SELECT SUM(amount) FROM sell WHERE stockid=:par"
-- ------------... | 385 | calcSoldStocks (StockID idx) = do
res <- execPFParamStatement sql [(":par",Int $ fromIntegral idx)]
case res of
Right [[[(_,Int n)]]] -> return $ fromIntegral n
_ -> return 0
where
sql = "SELECT SUM(amount) FROM sell WHERE stockid=:par"
-- -------------------------------------------------------... | 342 | false | true | 1 | 15 | 69 | 122 | 58 | 64 | null | null |
jaiyalas/haha | src/Lambda/Text/Num.hs | mit | ch0 = chZ | 9 | ch0 = chZ | 9 | ch0 = chZ | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
vimster/Perplexity-Calculator | src/Main.hs | bsd-3-clause | testFrequencies :: Frequencies
testFrequencies = Map.fromList [(("a", "a"), 0),(("b", "b"), 2), (("c", "c"), 1)] | 112 | testFrequencies :: Frequencies
testFrequencies = Map.fromList [(("a", "a"), 0),(("b", "b"), 2), (("c", "c"), 1)] | 112 | testFrequencies = Map.fromList [(("a", "a"), 0),(("b", "b"), 2), (("c", "c"), 1)] | 81 | false | true | 0 | 8 | 13 | 67 | 39 | 28 | null | null |
rahulmutt/ghcvm | libraries/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | getBufferMode dev Nothing = do
is_tty <- IODevice.isTerminal dev
if is_tty
then return LineBuffering
else return (BlockBuffering Nothing)
-- -----------------------------------------------------------------------------
-- Flushing buffers
-- | syncs the file with the buffer, including moving the
-- fi... | 419 | getBufferMode dev Nothing = do
is_tty <- IODevice.isTerminal dev
if is_tty
then return LineBuffering
else return (BlockBuffering Nothing)
-- -----------------------------------------------------------------------------
-- Flushing buffers
-- | syncs the file with the buffer, including moving the
-- fi... | 419 | getBufferMode dev Nothing = do
is_tty <- IODevice.isTerminal dev
if is_tty
then return LineBuffering
else return (BlockBuffering Nothing)
-- -----------------------------------------------------------------------------
-- Flushing buffers
-- | syncs the file with the buffer, including moving the
-- fi... | 419 | false | false | 0 | 10 | 72 | 51 | 26 | 25 | null | null |
aristidb/xml-enumerator-combinators | Text/XML/Enumerator/Combinators/General.hs | bsd-3-clause | permuteFallback fb f is = do
x <- chooseSplit f is
case x of
Nothing -> do y <- fb
case y of
Nothing -> return Nothing
Just as -> fmap (as ++) `liftM` permuteFallback fb f is
Just (a, is') -> fmap (a:) `liftM` permuteFallback fb f is' | 318 | permuteFallback fb f is = do
x <- chooseSplit f is
case x of
Nothing -> do y <- fb
case y of
Nothing -> return Nothing
Just as -> fmap (as ++) `liftM` permuteFallback fb f is
Just (a, is') -> fmap (a:) `liftM` permuteFallback fb f is' | 318 | permuteFallback fb f is = do
x <- chooseSplit f is
case x of
Nothing -> do y <- fb
case y of
Nothing -> return Nothing
Just as -> fmap (as ++) `liftM` permuteFallback fb f is
Just (a, is') -> fmap (a:) `liftM` permuteFallback fb f is' | 318 | false | false | 0 | 17 | 132 | 125 | 61 | 64 | null | null |
thalerjonathan/phd | public/ArtIterating/code/haskell/PureAgentsAct/src/SpacialGameMsg/SGModelMsg.hs | gpl-3.0 | tickNeighbourStateCount :: SGAgent -> SGAgent
tickNeighbourStateCount a = PA.updateState a (\s -> s { sgNeighbourStateCount = nf - 1 })
where
nf = (sgNeighbourStateCount (PA.state a)) | 195 | tickNeighbourStateCount :: SGAgent -> SGAgent
tickNeighbourStateCount a = PA.updateState a (\s -> s { sgNeighbourStateCount = nf - 1 })
where
nf = (sgNeighbourStateCount (PA.state a)) | 195 | tickNeighbourStateCount a = PA.updateState a (\s -> s { sgNeighbourStateCount = nf - 1 })
where
nf = (sgNeighbourStateCount (PA.state a)) | 149 | false | true | 1 | 10 | 37 | 77 | 36 | 41 | null | null |
NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter24/LogFileParser/src/LogFileParser.hs | mit | logSample :: LogFileString
logSample = [r|
-- wheee a comment
# 2025-02-05
08:00 Breakfast
09:00 Sanitizing moisture collector
11:00 Exercising in high-grav gym
12:00 Lunch
13:00 Programming
17:00 Commuting home in rover
17:30 R&R
19:00 Dinner
21:00 Shower
21:15 Read
22:00 Sleep
# 2025-02-07 -- dates not nececessari... | 551 | logSample :: LogFileString
logSample = [r|
-- wheee a comment
# 2025-02-05
08:00 Breakfast
09:00 Sanitizing moisture collector
11:00 Exercising in high-grav gym
12:00 Lunch
13:00 Programming
17:00 Commuting home in rover
17:30 R&R
19:00 Dinner
21:00 Shower
21:15 Read
22:00 Sleep
# 2025-02-07 -- dates not nececessari... | 551 | logSample = [r|
-- wheee a comment
# 2025-02-05
08:00 Breakfast
09:00 Sanitizing moisture collector
11:00 Exercising in high-grav gym
12:00 Lunch
13:00 Programming
17:00 Commuting home in rover
17:30 R&R
19:00 Dinner
21:00 Shower
21:15 Read
22:00 Sleep
# 2025-02-07 -- dates not nececessarily sequential
08:00 Breakfa... | 524 | false | true | 0 | 6 | 90 | 22 | 11 | 11 | null | null |
spechub/Hets | Driver/WriteLibDefn.hs | gpl-2.0 | versionedATermTable :: ShATermLG a => a -> IO ATermTable
versionedATermTable atcon = do
(att1, versionno) <- toShATermLG emptyATermTable hetsVersionNumeric
(att2, aterm) <- toShATermLG att1 atcon
return $ fst $ addATerm (ShAAppl "hets" [versionno, aterm] []) att2 | 275 | versionedATermTable :: ShATermLG a => a -> IO ATermTable
versionedATermTable atcon = do
(att1, versionno) <- toShATermLG emptyATermTable hetsVersionNumeric
(att2, aterm) <- toShATermLG att1 atcon
return $ fst $ addATerm (ShAAppl "hets" [versionno, aterm] []) att2 | 275 | versionedATermTable atcon = do
(att1, versionno) <- toShATermLG emptyATermTable hetsVersionNumeric
(att2, aterm) <- toShATermLG att1 atcon
return $ fst $ addATerm (ShAAppl "hets" [versionno, aterm] []) att2 | 218 | false | true | 0 | 11 | 47 | 98 | 48 | 50 | null | null |
mboes/vCard | Text/VCard/Format/Directory.hs | lgpl-3.0 | parserFromSpec "float" = D.pa_float | 35 | parserFromSpec "float" = D.pa_float | 35 | parserFromSpec "float" = D.pa_float | 35 | false | false | 1 | 6 | 3 | 15 | 5 | 10 | null | null |
jb55/cabal2nix | src/Cabal2Nix/Name.hs | bsd-3-clause | libNixName "xml2" = return "libxml2" | 66 | libNixName "xml2" = return "libxml2" | 66 | libNixName "xml2" = return "libxml2" | 66 | false | false | 0 | 5 | 34 | 13 | 5 | 8 | null | null |
mbg/system-f-with-kind-polymorphism | Main.hs | mit | addGlobalType :: String -> Type -> Kind -> Maybe Kind -> Env ()
addGlobalType n t k Nothing = do
env <- get
put $ env { typeEnv = M.insert n (GlDef t k) (typeEnv env) } | 176 | addGlobalType :: String -> Type -> Kind -> Maybe Kind -> Env ()
addGlobalType n t k Nothing = do
env <- get
put $ env { typeEnv = M.insert n (GlDef t k) (typeEnv env) } | 176 | addGlobalType n t k Nothing = do
env <- get
put $ env { typeEnv = M.insert n (GlDef t k) (typeEnv env) } | 112 | false | true | 0 | 12 | 44 | 89 | 43 | 46 | null | null |
spechub/Hets | ExtModal/Print_AS.hs | gpl-2.0 | printMPrec :: Bool -> MODALITY -> MODALITY -> Doc
printMPrec b oP cP =
(if (if b then (>) else (>=)) (modPrec oP) $ modPrec cP then id else parens)
$ pretty cP | 163 | printMPrec :: Bool -> MODALITY -> MODALITY -> Doc
printMPrec b oP cP =
(if (if b then (>) else (>=)) (modPrec oP) $ modPrec cP then id else parens)
$ pretty cP | 163 | printMPrec b oP cP =
(if (if b then (>) else (>=)) (modPrec oP) $ modPrec cP then id else parens)
$ pretty cP | 113 | false | true | 2 | 10 | 36 | 80 | 43 | 37 | null | null |
grnet/snf-ganeti | test/hs/Test/Ganeti/HTools/Cluster.hs | bsd-2-clause | -- | Checks if an instance is mirrored.
isMirrored :: Instance.Instance -> Bool
isMirrored = (/= Types.MirrorNone) . Instance.mirrorType | 136 | isMirrored :: Instance.Instance -> Bool
isMirrored = (/= Types.MirrorNone) . Instance.mirrorType | 96 | isMirrored = (/= Types.MirrorNone) . Instance.mirrorType | 56 | true | true | 1 | 7 | 18 | 38 | 18 | 20 | null | null |
thumphries/cryptopals | src/Set1.hs | bsd-3-clause | badHistogram :: ByteString -> Double
badHistogram = foldl' countAscii 0 . B.unpack | 82 | badHistogram :: ByteString -> Double
badHistogram = foldl' countAscii 0 . B.unpack | 82 | badHistogram = foldl' countAscii 0 . B.unpack | 45 | false | true | 0 | 6 | 11 | 26 | 13 | 13 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Spec/Expand.hs | bsd-3-clause | putInline :: Var -> TInline -> ExpandM ()
putInline var ti = modify $ \es ->
es { es_tinlines = M.insert (varSymbol var) ti $ es_tinlines es } | 144 | putInline :: Var -> TInline -> ExpandM ()
putInline var ti = modify $ \es ->
es { es_tinlines = M.insert (varSymbol var) ti $ es_tinlines es } | 144 | putInline var ti = modify $ \es ->
es { es_tinlines = M.insert (varSymbol var) ti $ es_tinlines es } | 102 | false | true | 0 | 12 | 29 | 66 | 33 | 33 | null | null |
gcampax/ghc | compiler/rename/RnTypes.hs | bsd-3-clause | dataKindsErr :: Bool -> HsType RdrName -> SDoc
dataKindsErr is_type thing
= hang (ptext (sLit "Illegal") <+> what <> colon <+> quotes (ppr thing))
2 (ptext (sLit "Perhaps you intended to use DataKinds"))
where
what | is_type = ptext (sLit "type")
| otherwise = ptext (sLit "kind")
{-
*********... | 580 | dataKindsErr :: Bool -> HsType RdrName -> SDoc
dataKindsErr is_type thing
= hang (ptext (sLit "Illegal") <+> what <> colon <+> quotes (ppr thing))
2 (ptext (sLit "Perhaps you intended to use DataKinds"))
where
what | is_type = ptext (sLit "type")
| otherwise = ptext (sLit "kind")
{-
*********... | 580 | dataKindsErr is_type thing
= hang (ptext (sLit "Illegal") <+> what <> colon <+> quotes (ppr thing))
2 (ptext (sLit "Perhaps you intended to use DataKinds"))
where
what | is_type = ptext (sLit "type")
| otherwise = ptext (sLit "kind")
{-
********************************************************... | 533 | false | true | 0 | 12 | 190 | 121 | 57 | 64 | null | null |
yiannist/ganeti | src/Ganeti/HTools/Cluster/Moves.hs | bsd-2-clause | -- Replace the secondary (r:ns)
applyMoveEx force nl inst (ReplaceSecondary new_sdx) =
let old_pdx = Instance.pNode inst
old_sdx = Instance.sNode inst
old_s = Container.find old_sdx nl
tgt_n = Container.find new_sdx nl
pnode = Container.find old_pdx nl
pnode' = Node.removePri pnode inst
... | 876 | applyMoveEx force nl inst (ReplaceSecondary new_sdx) =
let old_pdx = Instance.pNode inst
old_sdx = Instance.sNode inst
old_s = Container.find old_sdx nl
tgt_n = Container.find new_sdx nl
pnode = Container.find old_pdx nl
pnode' = Node.removePri pnode inst
int_s = Node.removeSec old... | 844 | applyMoveEx force nl inst (ReplaceSecondary new_sdx) =
let old_pdx = Instance.pNode inst
old_sdx = Instance.sNode inst
old_s = Container.find old_sdx nl
tgt_n = Container.find new_sdx nl
pnode = Container.find old_pdx nl
pnode' = Node.removePri pnode inst
int_s = Node.removeSec old... | 844 | true | false | 0 | 15 | 284 | 231 | 113 | 118 | null | null |
li-zhirui/EoplLangs | src/ContinuationPassing/Evaluator.hs | bsd-3-clause | extendCheckRatorCont :: [Expression] -> Environment -> Continuation
-> Continuation
extendCheckRatorCont randExprs env cont = Continuation $ \rator ->
evalCallExprTail randExprs rator [] env cont | 218 | extendCheckRatorCont :: [Expression] -> Environment -> Continuation
-> Continuation
extendCheckRatorCont randExprs env cont = Continuation $ \rator ->
evalCallExprTail randExprs rator [] env cont | 218 | extendCheckRatorCont randExprs env cont = Continuation $ \rator ->
evalCallExprTail randExprs rator [] env cont | 113 | false | true | 0 | 8 | 46 | 55 | 28 | 27 | null | null |
pranjaltale16/codeworld | codeworld-compiler/src/CodeWorld/Compile/Requirements/LegacyLanguage.hs | apache-2.0 | lexeme :: Parser a -> Parser a
lexeme = L.lexeme ws | 51 | lexeme :: Parser a -> Parser a
lexeme = L.lexeme ws | 51 | lexeme = L.lexeme ws | 20 | false | true | 0 | 7 | 10 | 32 | 13 | 19 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/utils/Bag.hs | bsd-3-clause | mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m ()
mapBagM_ _ EmptyBag = return () | 89 | mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m ()
mapBagM_ _ EmptyBag = return () | 89 | mapBagM_ _ EmptyBag = return () | 38 | false | true | 0 | 10 | 27 | 58 | 26 | 32 | null | null |
gcampax/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | bumpSubGoalDepth CountTyFunApps (SubGoalDepth c f) = SubGoalDepth c (f+1) | 75 | bumpSubGoalDepth CountTyFunApps (SubGoalDepth c f) = SubGoalDepth c (f+1) | 75 | bumpSubGoalDepth CountTyFunApps (SubGoalDepth c f) = SubGoalDepth c (f+1) | 75 | false | false | 0 | 7 | 10 | 31 | 15 | 16 | null | null |
jmitchell/Idris-dev | src/IRTS/Simplified.hs | bsd-3-clause | simplify tl (DConst c) = return (SConst c) | 42 | simplify tl (DConst c) = return (SConst c) | 42 | simplify tl (DConst c) = return (SConst c) | 42 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
rahulmutt/ghcvm | compiler/Eta/Utils/Pretty.hs | bsd-3-clause | punctuate _ [] = [] | 23 | punctuate _ [] = [] | 23 | punctuate _ [] = [] | 23 | false | false | 0 | 6 | 8 | 15 | 7 | 8 | null | null |
bitemyapp/ganeti | src/Ganeti/OpCodes.hs | bsd-2-clause | -- FIXME: instance rename should show both names; currently it shows none
-- opSummaryVal OpInstanceRename { opInstanceName = s } = Just s
opSummaryVal OpInstanceStartup { opInstanceName = s } = Just s | 201 | opSummaryVal OpInstanceStartup { opInstanceName = s } = Just s | 62 | opSummaryVal OpInstanceStartup { opInstanceName = s } = Just s | 62 | true | false | 0 | 8 | 32 | 23 | 12 | 11 | null | null |
cheme/nanomsg-hs | System/NanoMsg.hs | mit | newSinglefmessage :: ByteString -> IO SingleFMessage
newSinglefmessage (PS pbs pof ple) = do
ptR <- mallocForeignPtr :: IO (ForeignPtr (Ptr ()))
let iovecR = NNFIoVec (castForeignPtr ptR) (fromIntegral nN_MSG)
let l = ple - pof
p <- nnAllocmsg l 0 >>= eitherError "newSinglefmessage"
withForeignPtr ptR (`... | 520 | newSinglefmessage :: ByteString -> IO SingleFMessage
newSinglefmessage (PS pbs pof ple) = do
ptR <- mallocForeignPtr :: IO (ForeignPtr (Ptr ()))
let iovecR = NNFIoVec (castForeignPtr ptR) (fromIntegral nN_MSG)
let l = ple - pof
p <- nnAllocmsg l 0 >>= eitherError "newSinglefmessage"
withForeignPtr ptR (`... | 520 | newSinglefmessage (PS pbs pof ple) = do
ptR <- mallocForeignPtr :: IO (ForeignPtr (Ptr ()))
let iovecR = NNFIoVec (castForeignPtr ptR) (fromIntegral nN_MSG)
let l = ple - pof
p <- nnAllocmsg l 0 >>= eitherError "newSinglefmessage"
withForeignPtr ptR (`poke` p)
withForeignPtr pbs (\pbs' -> copyBytes p ... | 467 | false | true | 0 | 13 | 96 | 206 | 99 | 107 | null | null |
jameshsmith/HRL | Server/Core/SerialUtil.hs | mit | liftGet2 f = liftM2 f get get | 29 | liftGet2 f = liftM2 f get get | 29 | liftGet2 f = liftM2 f get get | 29 | false | false | 1 | 5 | 6 | 22 | 7 | 15 | null | null |
np/hlatex | Language/LaTeX/Types.hs | bsd-3-clause | scaleBy rx (LengthCmd cmd) = LengthScaledBy rx (LengthCmd cmd) | 70 | scaleBy rx (LengthCmd cmd) = LengthScaledBy rx (LengthCmd cmd) | 70 | scaleBy rx (LengthCmd cmd) = LengthScaledBy rx (LengthCmd cmd) | 70 | false | false | 0 | 7 | 16 | 29 | 13 | 16 | null | null |
troydm/edda | src/EDDA/Data/Query.hs | mit | getStationsBySystemNames :: [Str] -> ConfigT [Document]
getStationsBySystemNames systemNames = query $ getStationsBySystemNameCursor systemNames | 144 | getStationsBySystemNames :: [Str] -> ConfigT [Document]
getStationsBySystemNames systemNames = query $ getStationsBySystemNameCursor systemNames | 144 | getStationsBySystemNames systemNames = query $ getStationsBySystemNameCursor systemNames | 88 | false | true | 0 | 7 | 12 | 34 | 17 | 17 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/TemplateVersions/List.hs | mpl-2.0 | -- | JSONP
ptvlCallback :: Lens' ProjectsTemplateVersionsList (Maybe Text)
ptvlCallback
= lens _ptvlCallback (\ s a -> s{_ptvlCallback = a}) | 142 | ptvlCallback :: Lens' ProjectsTemplateVersionsList (Maybe Text)
ptvlCallback
= lens _ptvlCallback (\ s a -> s{_ptvlCallback = a}) | 131 | ptvlCallback
= lens _ptvlCallback (\ s a -> s{_ptvlCallback = a}) | 67 | true | true | 0 | 9 | 21 | 49 | 25 | 24 | null | null |
higgsd/euler | hs/26.hs | bsd-2-clause | nn = 1000 | 9 | nn = 1000 | 9 | nn = 1000 | 9 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
dmpots/fibon | tools/fibon-run/Fibon/Run/Main.hs | bsd-3-clause | runSeqSteps :: StepRunner input output
runSeqSteps = runSteps sequence | 71 | runSeqSteps :: StepRunner input output
runSeqSteps = runSteps sequence | 71 | runSeqSteps = runSteps sequence | 32 | false | true | 0 | 5 | 9 | 19 | 9 | 10 | null | null |
prowdsponsor/country-codes | src/Data/CountryCodes/ISO31661.hs | bsd-3-clause | fromMName "Haiti" = Just HT | 27 | fromMName "Haiti" = Just HT | 27 | fromMName "Haiti" = Just HT | 27 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
pierric/neural-network | Backend-blashs/vec128/Data/NeuralNetwork/Backend/BLASHS/SIMD.hs | bsd-3-clause | tanh' x = let a = tanh x
b = times a a
in minus (konst 1) b | 83 | tanh' x = let a = tanh x
b = times a a
in minus (konst 1) b | 83 | tanh' x = let a = tanh x
b = times a a
in minus (konst 1) b | 83 | false | false | 0 | 9 | 41 | 44 | 20 | 24 | null | null |
dmcclean/HaTeX | Text/LaTeX/Packages/AMSMath.hs | bsd-3-clause | -- | /γ/ symbol.
gamma :: LaTeXC l => l
gamma = comm0 "gamma" | 61 | gamma :: LaTeXC l => l
gamma = comm0 "gamma" | 44 | gamma = comm0 "gamma" | 21 | true | true | 0 | 7 | 13 | 29 | 12 | 17 | null | null |
mcschroeder/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | tcVect (HsVectTypeOut _ _ _)
= panic "TcBinds.tcVect: Unexpected 'HsVectTypeOut'" | 83 | tcVect (HsVectTypeOut _ _ _)
= panic "TcBinds.tcVect: Unexpected 'HsVectTypeOut'" | 83 | tcVect (HsVectTypeOut _ _ _)
= panic "TcBinds.tcVect: Unexpected 'HsVectTypeOut'" | 83 | false | false | 0 | 7 | 11 | 22 | 10 | 12 | null | null |
holzensp/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | sse4_2Enabled :: NatM Bool
sse4_2Enabled = do
dflags <- getDynFlags
return (isSse4_2Enabled dflags) | 103 | sse4_2Enabled :: NatM Bool
sse4_2Enabled = do
dflags <- getDynFlags
return (isSse4_2Enabled dflags) | 103 | sse4_2Enabled = do
dflags <- getDynFlags
return (isSse4_2Enabled dflags) | 76 | false | true | 0 | 9 | 16 | 33 | 15 | 18 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- | List of resources which can be queried using Local UniX Interface
qrViaLuxi :: FrozenSet String
qrViaLuxi = ConstantUtils.mkSet [qrGroup,
qrExport,
qrInstance,
qrJob,
qrLock,
... | 439 | qrViaLuxi :: FrozenSet String
qrViaLuxi = ConstantUtils.mkSet [qrGroup,
qrExport,
qrInstance,
qrJob,
qrLock,
qrNetwork,
qr... | 368 | qrViaLuxi = ConstantUtils.mkSet [qrGroup,
qrExport,
qrInstance,
qrJob,
qrLock,
qrNetwork,
qrNode,
... | 338 | true | true | 0 | 6 | 258 | 49 | 27 | 22 | null | null |
bjpop/berp | libs/src/Berp/Base/StdNames.hs | bsd-3-clause | appendName :: Hashed String
appendName = hashedStr "append" | 59 | appendName :: Hashed String
appendName = hashedStr "append" | 59 | appendName = hashedStr "append" | 31 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
elieux/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | gHC_ST = mkBaseModule (fsLit "GHC.ST") | 47 | gHC_ST = mkBaseModule (fsLit "GHC.ST") | 47 | gHC_ST = mkBaseModule (fsLit "GHC.ST") | 47 | false | false | 0 | 7 | 13 | 15 | 7 | 8 | null | null |
wolverian/scheme48 | Main.hs | mit | eval env (List (Atom "lambda" : DottedList params varargs : body)) =
makeVarArgs varargs env params body | 112 | eval env (List (Atom "lambda" : DottedList params varargs : body)) =
makeVarArgs varargs env params body | 112 | eval env (List (Atom "lambda" : DottedList params varargs : body)) =
makeVarArgs varargs env params body | 112 | false | false | 0 | 11 | 24 | 46 | 21 | 25 | null | null |
thsutton/type-assignment | tests/Examples.hs | bsd-3-clause | -- | The combinator I = \x.x
combinatorI :: v -> Term v
combinatorI xn = Abs xn (Var xn) | 88 | combinatorI :: v -> Term v
combinatorI xn = Abs xn (Var xn) | 59 | combinatorI xn = Abs xn (Var xn) | 32 | true | true | 0 | 7 | 19 | 33 | 16 | 17 | null | null |
ian-ross/c2hs-macos-test | c2hs-0.26.1/src/Control/StateTrans.hs | mit | -- interaction with the encapsulated 'IO' monad
-- --------------------------------------------
-- | lifts an 'IO' state transformer into 'STB'
--
liftIO :: IO a -> STB bs gs a
liftIO m = STB $ \bs gs -> m >>= \r -> return (bs, gs, Right r) | 244 | liftIO :: IO a -> STB bs gs a
liftIO m = STB $ \bs gs -> m >>= \r -> return (bs, gs, Right r) | 96 | liftIO m = STB $ \bs gs -> m >>= \r -> return (bs, gs, Right r) | 64 | true | true | 2 | 10 | 48 | 72 | 37 | 35 | null | null |
acowley/ghc | compiler/utils/StringBuffer.hs | bsd-3-clause | skipBOM :: Handle -> Integer -> Integer -> IO Integer
skipBOM h size offset =
-- Only skip BOM at the beginning of a file.
if size > 0 && offset == 0
then do
-- Validate assumption that handle is in binary mode.
ASSERTM( hGetEncoding h >>= return . isNothing )
-- Temporarily select text mode t... | 604 | skipBOM :: Handle -> Integer -> Integer -> IO Integer
skipBOM h size offset =
-- Only skip BOM at the beginning of a file.
if size > 0 && offset == 0
then do
-- Validate assumption that handle is in binary mode.
ASSERTM( hGetEncoding h >>= return . isNothing )
-- Temporarily select text mode t... | 604 | skipBOM h size offset =
-- Only skip BOM at the beginning of a file.
if size > 0 && offset == 0
then do
-- Validate assumption that handle is in binary mode.
ASSERTM( hGetEncoding h >>= return . isNothing )
-- Temporarily select text mode to make `hLookAhead` and
-- `hGetChar` return ful... | 550 | false | true | 0 | 13 | 173 | 150 | 72 | 78 | null | null |
mzero/barley | seed/Chapter2/Step_2_2.hs | apache-2.0 | lineNumbers :: Int -> [String] -> [String]
lineNumbers n xs =
if xs == []
then []
else [oneNumber n (head xs)] ++ lineNumbers (n+1) (tail xs) | 153 | lineNumbers :: Int -> [String] -> [String]
lineNumbers n xs =
if xs == []
then []
else [oneNumber n (head xs)] ++ lineNumbers (n+1) (tail xs) | 153 | lineNumbers n xs =
if xs == []
then []
else [oneNumber n (head xs)] ++ lineNumbers (n+1) (tail xs) | 110 | false | true | 0 | 10 | 38 | 82 | 43 | 39 | null | null |
nevrenato/Hets_Fork | Temporal/ModalCaslToNuSmvLtl.hs | gpl-2.0 | convert' (Casl.XPast' phi) = liftM Ltl.Z (convert' phi) | 68 | convert' (Casl.XPast' phi) = liftM Ltl.Z (convert' phi) | 68 | convert' (Casl.XPast' phi) = liftM Ltl.Z (convert' phi) | 68 | false | false | 0 | 8 | 20 | 30 | 14 | 16 | null | null |
vigoo/snapshot-versions | app/Main.hs | bsd-3-clause | main :: IO ()
main =
withParameters $ \(Parameters{..}) ->
withOutput pOutput pDebug $ do
info $ "Fetching snapshot " <> pSnapshot <> "..."
withVersionMap pSnapshot $ do
info $ "Fetched."
info $ "Initializing package index"
indexReader <- createIndexReader
info $ "Getti... | 493 | main :: IO ()
main =
withParameters $ \(Parameters{..}) ->
withOutput pOutput pDebug $ do
info $ "Fetching snapshot " <> pSnapshot <> "..."
withVersionMap pSnapshot $ do
info $ "Fetched."
info $ "Initializing package index"
indexReader <- createIndexReader
info $ "Getti... | 493 | main =
withParameters $ \(Parameters{..}) ->
withOutput pOutput pDebug $ do
info $ "Fetching snapshot " <> pSnapshot <> "..."
withVersionMap pSnapshot $ do
info $ "Fetched."
info $ "Initializing package index"
indexReader <- createIndexReader
info $ "Getting dependent l... | 479 | false | true | 0 | 17 | 127 | 140 | 65 | 75 | null | null |
waterlink/hgo | Parser.hs | mit | mulOp :: Parser S.MulOp
mulOp = mult <|> div <|> mod <|> lshift <|> rshift <|> and <|> andxor
where
mult :: Parser S.MulOp
mult = try $ do
L.operator "*"
return S.Mult
div :: Parser S.MulOp
div = try $ do
L.operator "/"
return S.Div
mod :: Parser S.MulOp
mod = try $ d... | 738 | mulOp :: Parser S.MulOp
mulOp = mult <|> div <|> mod <|> lshift <|> rshift <|> and <|> andxor
where
mult :: Parser S.MulOp
mult = try $ do
L.operator "*"
return S.Mult
div :: Parser S.MulOp
div = try $ do
L.operator "/"
return S.Div
mod :: Parser S.MulOp
mod = try $ d... | 738 | mulOp = mult <|> div <|> mod <|> lshift <|> rshift <|> and <|> andxor
where
mult :: Parser S.MulOp
mult = try $ do
L.operator "*"
return S.Mult
div :: Parser S.MulOp
div = try $ do
L.operator "/"
return S.Div
mod :: Parser S.MulOp
mod = try $ do
L.operator "%"
... | 714 | false | true | 20 | 9 | 258 | 342 | 145 | 197 | null | null |
keera-studios/hsQt | Qtc/Gui/QSplitter.hs | bsd-2-clause | qSplitter_deleteLater :: QSplitter a -> IO ()
qSplitter_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QSplitter_deleteLater cobj_x0 | 143 | qSplitter_deleteLater :: QSplitter a -> IO ()
qSplitter_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QSplitter_deleteLater cobj_x0 | 143 | qSplitter_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QSplitter_deleteLater cobj_x0 | 97 | false | true | 0 | 7 | 22 | 41 | 19 | 22 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Monitoring/Server.hs | bsd-2-clause | -- | Prepare function for monitoring agent.
prepMain :: PrepFn CheckResult PrepResult
prepMain opts _ = do
accessLog <- daemonsExtraLogFile GanetiMond AccessLog
errorLog <- daemonsExtraLogFile GanetiMond ErrorLog
return $
setPort
(maybe C.defaultMondPort fromIntegral (optPort opts))
(defaultHttpCo... | 418 | prepMain :: PrepFn CheckResult PrepResult
prepMain opts _ = do
accessLog <- daemonsExtraLogFile GanetiMond AccessLog
errorLog <- daemonsExtraLogFile GanetiMond ErrorLog
return $
setPort
(maybe C.defaultMondPort fromIntegral (optPort opts))
(defaultHttpConf accessLog errorLog)
-- * Query answers
... | 374 | prepMain opts _ = do
accessLog <- daemonsExtraLogFile GanetiMond AccessLog
errorLog <- daemonsExtraLogFile GanetiMond ErrorLog
return $
setPort
(maybe C.defaultMondPort fromIntegral (optPort opts))
(defaultHttpConf accessLog errorLog)
-- * Query answers
-- | Reply to the supported API version nu... | 332 | true | true | 1 | 12 | 75 | 91 | 41 | 50 | null | null |
FranklinChen/music-score | src/Music/Time/Types.hs | bsd-3-clause | -- Name?
stopsWhenStops :: Span -> Span -> Bool
a `stopsWhenStops` b = _offsetS a == _offsetS b | 95 | stopsWhenStops :: Span -> Span -> Bool
a `stopsWhenStops` b = _offsetS a == _offsetS b | 86 | a `stopsWhenStops` b = _offsetS a == _offsetS b | 47 | true | true | 0 | 6 | 17 | 41 | 20 | 21 | null | null |
plow-technologies/persistent | persistent-template/test/main.hs | mit | (&) :: a -> (a -> b) -> b
x & f = f x | 37 | (&) :: a -> (a -> b) -> b
x & f = f x | 37 | x & f = f x | 11 | false | true | 0 | 9 | 14 | 38 | 19 | 19 | null | null |
brendanhay/gogol | gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Product.hs | mpl-2.0 | -- | Whether the latest report is currently running.
qmRunning :: Lens' QueryMetadata (Maybe Bool)
qmRunning
= lens _qmRunning (\ s a -> s{_qmRunning = a}) | 157 | qmRunning :: Lens' QueryMetadata (Maybe Bool)
qmRunning
= lens _qmRunning (\ s a -> s{_qmRunning = a}) | 104 | qmRunning
= lens _qmRunning (\ s a -> s{_qmRunning = a}) | 58 | true | true | 0 | 9 | 27 | 48 | 25 | 23 | null | null |
batterseapower/machine-learning | Algorithms/MachineLearning/Tests/Driver.hs | gpl-2.0 | plot :: [[(Double, Target)]] -> IO ()
plot sampless = do
plotPaths [EPS "output.ps"] (map (sortBy (comparing fst)) sampless)
void $ rawSystem "open" ["output.ps"] | 170 | plot :: [[(Double, Target)]] -> IO ()
plot sampless = do
plotPaths [EPS "output.ps"] (map (sortBy (comparing fst)) sampless)
void $ rawSystem "open" ["output.ps"] | 170 | plot sampless = do
plotPaths [EPS "output.ps"] (map (sortBy (comparing fst)) sampless)
void $ rawSystem "open" ["output.ps"] | 132 | false | true | 0 | 13 | 31 | 84 | 42 | 42 | null | null |
jbearer/hspl | src/Control/Hspl/Internal/UI.hs | mit | -- | Get a user-showable representation of a 'Goal'. Any subexpressions are wrapped in parentheses
-- if necessary so that the output is syntactically and semantically correct. However, the outer
-- goal is unparenthesized. When formatting a goal to use as a subexpression in a larger expression,
-- use 'parensGoal'.
fo... | 392 | formatGoal :: Goal -> String
formatGoal (PredGoal p _) = formatPredicate p | 74 | formatGoal (PredGoal p _) = formatPredicate p | 45 | true | true | 0 | 6 | 61 | 37 | 19 | 18 | null | null |
kim/amazonka | amazonka-cloudformation/gen/Network/AWS/CloudFormation/Types.hs | mpl-2.0 | -- | The amount of time within which stack creation should complete.
sTimeoutInMinutes :: Lens' Stack (Maybe Natural)
sTimeoutInMinutes =
lens _sTimeoutInMinutes (\s a -> s { _sTimeoutInMinutes = a })
. mapping _Nat | 227 | sTimeoutInMinutes :: Lens' Stack (Maybe Natural)
sTimeoutInMinutes =
lens _sTimeoutInMinutes (\s a -> s { _sTimeoutInMinutes = a })
. mapping _Nat | 158 | sTimeoutInMinutes =
lens _sTimeoutInMinutes (\s a -> s { _sTimeoutInMinutes = a })
. mapping _Nat | 109 | true | true | 0 | 10 | 45 | 53 | 28 | 25 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | happyReduce_27 = happyReduce 5# 11# happyReduction_27 | 53 | happyReduce_27 = happyReduce 5# 11# happyReduction_27 | 53 | happyReduce_27 = happyReduce 5# 11# happyReduction_27 | 53 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
erochest/greek | SplitXml.hs | apache-2.0 | _ContentEntity :: Prism' Content T.Text
_ContentEntity = prism' ContentEntity get
where get (ContentEntity t) = Just t
get _ = Nothing | 164 | _ContentEntity :: Prism' Content T.Text
_ContentEntity = prism' ContentEntity get
where get (ContentEntity t) = Just t
get _ = Nothing | 164 | _ContentEntity = prism' ContentEntity get
where get (ContentEntity t) = Just t
get _ = Nothing | 124 | false | true | 1 | 7 | 50 | 50 | 24 | 26 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/Layout.hs | lgpl-2.1 | -- | (primitive) The layout is stretchable and can be assigned a larger area in both the horizontal and vertical
-- direction. See also combinators like 'fill' and 'floatCentre'.
stretch :: Layout -> Layout
stretch layout
= updateOptions layout (\options' -> options'{ stretchV = True, stretchH = True }) | 306 | stretch :: Layout -> Layout
stretch layout
= updateOptions layout (\options' -> options'{ stretchV = True, stretchH = True }) | 127 | stretch layout
= updateOptions layout (\options' -> options'{ stretchV = True, stretchH = True }) | 99 | true | true | 0 | 9 | 50 | 53 | 28 | 25 | null | null |
RefactoringTools/HaRe | experiments/AzGhcPlay.hs | bsd-3-clause | tokenLocs toks = map (\(GHC.L l _, s) -> (l,s)) toks | 52 | tokenLocs toks = map (\(GHC.L l _, s) -> (l,s)) toks | 52 | tokenLocs toks = map (\(GHC.L l _, s) -> (l,s)) toks | 52 | false | false | 0 | 10 | 10 | 41 | 22 | 19 | null | null |
Numberartificial/workflow | snipets/src/Craft/Chapter13.hs | mit | -- Introducing classes
-- ^^^^^^^^^^^^^^^^^^^
-- Definitions of classes cannot be hidden, so the definitions etc. here are not
-- executable.
-- class Eq a where
-- (==) :: a -> a -> Bool
-- Functions which use equality
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- Testing for three values equal: more general than Int -> In... | 412 | allEqual :: Eq a => a -> a -> a -> Bool
allEqual m n p = (m==n) && (n==p) | 73 | allEqual m n p = (m==n) && (n==p) | 33 | true | true | 0 | 8 | 83 | 64 | 37 | 27 | null | null |
mahrz/xxp | core/src/Xxp.hs | mit | commandCreate = Create { adaptor = def &= argPos 0 &= typ "<adaptor>"
, experiment = def &= argPos 1 &= typ "<experiment>"
}
&= details [ "Examples:", "xxp create cpp test1"] | 233 | commandCreate = Create { adaptor = def &= argPos 0 &= typ "<adaptor>"
, experiment = def &= argPos 1 &= typ "<experiment>"
}
&= details [ "Examples:", "xxp create cpp test1"] | 233 | commandCreate = Create { adaptor = def &= argPos 0 &= typ "<adaptor>"
, experiment = def &= argPos 1 &= typ "<experiment>"
}
&= details [ "Examples:", "xxp create cpp test1"] | 233 | false | false | 3 | 9 | 90 | 69 | 33 | 36 | null | null |
ktvoelker/cookie-jar | src/Network/DNS/Public/Types.hs | gpl-3.0 | -- |Show the ASCII form of a domain name
showDomain :: Domain -> BS.ByteString
showDomain (Domain xs) = BS.drop 1 . BS.concat . map (BS.cons period) . reverse $ xs | 163 | showDomain :: Domain -> BS.ByteString
showDomain (Domain xs) = BS.drop 1 . BS.concat . map (BS.cons period) . reverse $ xs | 122 | showDomain (Domain xs) = BS.drop 1 . BS.concat . map (BS.cons period) . reverse $ xs | 84 | true | true | 0 | 11 | 29 | 61 | 30 | 31 | null | null |
nushio3/formura | src/Formura/OrthotopeMachine/Manifestation.hs | mit | manifestation :: WithCommandLineOption => OMProgram -> TranM MMProgram
manifestation omprog = do
ig2 <- manifestG $ omprog ^. omInitGraph
sg2 <- manifestG $ omprog ^. omStepGraph
return $ MachineProgram
{ _omGlobalEnvironment = omprog ^. omGlobalEnvironment
, _omStateSignature = omprog ^. omStateSigna... | 444 | manifestation :: WithCommandLineOption => OMProgram -> TranM MMProgram
manifestation omprog = do
ig2 <- manifestG $ omprog ^. omInitGraph
sg2 <- manifestG $ omprog ^. omStepGraph
return $ MachineProgram
{ _omGlobalEnvironment = omprog ^. omGlobalEnvironment
, _omStateSignature = omprog ^. omStateSigna... | 444 | manifestation omprog = do
ig2 <- manifestG $ omprog ^. omInitGraph
sg2 <- manifestG $ omprog ^. omStepGraph
return $ MachineProgram
{ _omGlobalEnvironment = omprog ^. omGlobalEnvironment
, _omStateSignature = omprog ^. omStateSignature
, _omInitGraph = ig2
, _omStepGraph = sg2}... | 373 | false | true | 0 | 11 | 101 | 103 | 52 | 51 | null | null |
maximilianhuber/softwareProjekt | src/GalFld/Core/Polynomials.hs | bsd-3-clause | -- |Erzeugt ein Polynom aus einer Liste von Monomen
-- Unsichere Variante: Es wird angenommen, dass die Monome
-- in dem Grade nach absteigend sortierter Reihenfolge auftreten!
pTupUnsave :: [(Int,a)] -> Polynom a
pTupUnsave ms = PMS ms True | 243 | pTupUnsave :: [(Int,a)] -> Polynom a
pTupUnsave ms = PMS ms True | 64 | pTupUnsave ms = PMS ms True | 27 | true | true | 0 | 7 | 40 | 38 | 21 | 17 | null | null |
seppeljordan/octree | Data/Octree/Internal.hs | bsd-3-clause | octreeStep ot NED = ned ot | 26 | octreeStep ot NED = ned ot | 26 | octreeStep ot NED = ned ot | 26 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
athanclark/linear-grammar | src/Linear/Grammar.hs | bsd-3-clause | hasName :: String -> LinVar -> Bool
hasName n (LinVar m _) = n == m | 67 | hasName :: String -> LinVar -> Bool
hasName n (LinVar m _) = n == m | 67 | hasName n (LinVar m _) = n == m | 31 | false | true | 0 | 7 | 15 | 36 | 18 | 18 | null | null |
Mahdi89/eTeak | src/Type.hs | bsd-3-clause | isStructType (StructArrayType {}) = True | 40 | isStructType (StructArrayType {}) = True | 40 | isStructType (StructArrayType {}) = True | 40 | false | false | 0 | 7 | 4 | 16 | 8 | 8 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M02/D16/Solution.hs | mit | {--
>>> map (uncurry coprime) jack0diamonds
[True,True,True]
Well, I'll be blowed.
--}
{-- BONUS -----------------------------------------------------------------
From the set of numbers stored in:
--}
rndNums :: FilePath
rndNums = "Y2018/M02/D16/rndnums.txt" | 264 | rndNums :: FilePath
rndNums = "Y2018/M02/D16/rndnums.txt" | 57 | rndNums = "Y2018/M02/D16/rndnums.txt" | 37 | true | true | 0 | 4 | 33 | 13 | 8 | 5 | null | null |
pacak/sqroll | src/Database/Sqroll/Sqlite3.hs | bsd-3-clause | sqlColumnString :: SqlStmt -> Int -> IO String
sqlColumnString stmt n =
sqlite3_column_text stmt (fromIntegral n) >>= peekCString | 133 | sqlColumnString :: SqlStmt -> Int -> IO String
sqlColumnString stmt n =
sqlite3_column_text stmt (fromIntegral n) >>= peekCString | 133 | sqlColumnString stmt n =
sqlite3_column_text stmt (fromIntegral n) >>= peekCString | 86 | false | true | 0 | 8 | 21 | 42 | 20 | 22 | null | null |
nevrenato/Hets_Fork | Interfaces/Command.hs | gpl-2.0 | inspectCmdList :: [InspectCmd]
inspectCmdList = [minBound .. maxBound] | 70 | inspectCmdList :: [InspectCmd]
inspectCmdList = [minBound .. maxBound] | 70 | inspectCmdList = [minBound .. maxBound] | 39 | false | true | 0 | 5 | 7 | 20 | 12 | 8 | null | null |
phaazon/vector | tests/Tests/Vector.hs | bsd-3-clause | testMonadFunctions :: forall a v. (COMMON_CONTEXT(a, v), Monad v) => v a -> [Test]
testMonadFunctions _ = $(testProperties
[ 'prop_return, 'prop_bind ])
where
prop_return :: P (a -> v a) = return `eq` return
prop_bind :: P (v a -> (a -> v a) -> v a) = (>>=) `eq` (>>=) | 282 | testMonadFunctions :: forall a v. (COMMON_CONTEXT(a, v), Monad v) => v a -> [Test]
testMonadFunctions _ = $(testProperties
[ 'prop_return, 'prop_bind ])
where
prop_return :: P (a -> v a) = return `eq` return
prop_bind :: P (v a -> (a -> v a) -> v a) = (>>=) `eq` (>>=) | 282 | testMonadFunctions _ = $(testProperties
[ 'prop_return, 'prop_bind ])
where
prop_return :: P (a -> v a) = return `eq` return
prop_bind :: P (v a -> (a -> v a) -> v a) = (>>=) `eq` (>>=) | 199 | false | true | 6 | 11 | 64 | 146 | 80 | 66 | null | null |
andreasabel/helf | src/OrderedCom2.hs | mit | ty = A.Typ | 10 | ty = A.Typ | 10 | ty = A.Typ | 10 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.