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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
music-suite/musicxml2 | src/Data/Music/MusicXml/Score.hs | bsd-3-clause | noTies :: [Tie]
noTies = [] | 27 | noTies :: [Tie]
noTies = [] | 27 | noTies = [] | 11 | false | true | 0 | 5 | 5 | 16 | 9 | 7 | null | null |
gcampax/ghc | compiler/main/HscTypes.hs | bsd-3-clause | getSafeMode :: IfaceTrustInfo -> SafeHaskellMode
getSafeMode (TrustInfo x) = x | 78 | getSafeMode :: IfaceTrustInfo -> SafeHaskellMode
getSafeMode (TrustInfo x) = x | 78 | getSafeMode (TrustInfo x) = x | 29 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x2F96F' = "\x7E02" | 34 | decomposeChar '\x2F96F' = "\x7E02" | 34 | decomposeChar '\x2F96F' = "\x7E02" | 34 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
RaminHAL9001/rose-trie | src/Data/Tree/RoseTrie.hs | gpl-3.0 | -- | This function merges two trees together, given a leaf-merging function that can optionally
-- create or remove leaves based on whether or not leaves exist on the left and right at any given
-- point in the path @[p]@.
--
-- Also required are two 'RoseTrie' functions: a function that can convert the first (left)
--... | 3,273 | mergeWithKeyM
:: forall m p a b c . (Monad m, Ord p)
=> RunRoseTrie
-> ([p] -> Maybe a -> Maybe b -> m (Maybe c))
-> (RoseTrie p a -> m (RoseTrie p c))
-> (RoseTrie p b -> m (RoseTrie p c))
-> RoseTrie p a -> RoseTrie p b -> m (RoseTrie p c)
mergeWithKeyM control = loop [] where
loop px merge left right (... | 1,442 | mergeWithKeyM control = loop [] where
loop px merge left right (RoseTrie (leftLeaf, leftBranches)) (RoseTrie (rightLeaf, rightBranches)) = do
let leaf = merge px leftLeaf rightLeaf
let map = liftM (M.fromList . concat) $
mapM (\ (p, leftIfPaired) -> do
tree <- uncurry (loop (px++... | 1,188 | true | true | 0 | 25 | 704 | 532 | 287 | 245 | null | null |
8l/metafun | src/Language/Kiff/Parser.hs | gpl-3.0 | semi = IT.semi lexer | 26 | semi = IT.semi lexer | 26 | semi = IT.semi lexer | 26 | false | false | 0 | 6 | 9 | 11 | 5 | 6 | null | null |
CGenie/platform | shared/src/Unison/ABT.hs | mit | tm :: (Foldable f, Ord v) => f (Term f v ()) -> Term f v ()
tm = tm' () | 71 | tm :: (Foldable f, Ord v) => f (Term f v ()) -> Term f v ()
tm = tm' () | 71 | tm = tm' () | 11 | false | true | 0 | 10 | 20 | 59 | 29 | 30 | null | null |
spechub/Hets | Common/Lib/MapSet.hs | gpl-2.0 | -- | all elementes united
elems :: Ord b => MapSet a b -> Set.Set b
elems = setElems . toMap | 92 | elems :: Ord b => MapSet a b -> Set.Set b
elems = setElems . toMap | 66 | elems = setElems . toMap | 24 | true | true | 0 | 8 | 20 | 37 | 18 | 19 | null | null |
caasi/spj-book-student-1992 | src/PrettyPrint.hs | bsd-3-clause | toPrecedence ">=" = 3 | 21 | toPrecedence ">=" = 3 | 21 | toPrecedence ">=" = 3 | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
xmonad/xmonad-contrib | XMonad/Prompt.hs | bsd-3-clause | handleSubmap :: XP ()
-> M.Map (KeyMask, KeySym) (XP ())
-> KeyStroke
-> Event
-> XP ()
handleSubmap defaultAction keymap stroke KeyEvent{ev_event_type = t, ev_state = m} = do
keymask <- gets cleanMask <*> pure m
when (t == keyPress) $ handleInputSubmap defaul... | 349 | handleSubmap :: XP ()
-> M.Map (KeyMask, KeySym) (XP ())
-> KeyStroke
-> Event
-> XP ()
handleSubmap defaultAction keymap stroke KeyEvent{ev_event_type = t, ev_state = m} = do
keymask <- gets cleanMask <*> pure m
when (t == keyPress) $ handleInputSubmap defaul... | 349 | handleSubmap defaultAction keymap stroke KeyEvent{ev_event_type = t, ev_state = m} = do
keymask <- gets cleanMask <*> pure m
when (t == keyPress) $ handleInputSubmap defaultAction keymap keymask stroke | 209 | false | true | 0 | 10 | 105 | 125 | 61 | 64 | null | null |
anton-dessiatov/stack | src/Stack/Types/Resolver.hs | bsd-3-clause | renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d | 58 | renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d | 58 | renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d | 58 | false | false | 0 | 7 | 9 | 28 | 13 | 15 | null | null |
Pochoir/Pochoir | src/PShow.hs | gpl-3.0 | pShowPointerSet iL@(i:is) l_kernelParams = concat $ map pShowPointerSetTerm iL
where pShowPointerSetTerm (iterName, array, dim) =
let l_arrayName = aName array
l_arrayBaseName = l_arrayName ++ "_base"
l_arrayTotalSize = "l_" ++ l_arrayName ++ "_total_size"
... | 924 | pShowPointerSet iL@(i:is) l_kernelParams = concat $ map pShowPointerSetTerm iL
where pShowPointerSetTerm (iterName, array, dim) =
let l_arrayName = aName array
l_arrayBaseName = l_arrayName ++ "_base"
l_arrayTotalSize = "l_" ++ l_arrayName ++ "_total_size"
... | 924 | pShowPointerSet iL@(i:is) l_kernelParams = concat $ map pShowPointerSetTerm iL
where pShowPointerSetTerm (iterName, array, dim) =
let l_arrayName = aName array
l_arrayBaseName = l_arrayName ++ "_base"
l_arrayTotalSize = "l_" ++ l_arrayName ++ "_total_size"
... | 924 | false | false | 4 | 14 | 317 | 210 | 103 | 107 | null | null |
pgj/bead | src/Bead/Persistence/NoSQLDir.hs | bsd-3-clause | evaluationOfScore :: ScoreKey -> Persist (Maybe EvaluationKey)
evaluationOfScore = objectIn "evaluation" EvaluationKey isEvaluationDir | 134 | evaluationOfScore :: ScoreKey -> Persist (Maybe EvaluationKey)
evaluationOfScore = objectIn "evaluation" EvaluationKey isEvaluationDir | 134 | evaluationOfScore = objectIn "evaluation" EvaluationKey isEvaluationDir | 71 | false | true | 0 | 8 | 12 | 31 | 15 | 16 | null | null |
volhovM/orgstat | src/OrgStat/Ast.hs | gpl-3.0 | atDepth 0 f o = f o | 19 | atDepth 0 f o = f o | 19 | atDepth 0 f o = f o | 19 | false | false | 0 | 5 | 6 | 16 | 7 | 9 | null | null |
verement/etamoo | src/MOO/Task.hs | bsd-3-clause | handleDebug :: MOO Value -> MOO Value
handleDebug = (`catchException` handler)
where handler Exception {
exceptionDebugBit = False
, exceptionCode = code
} = return code
handler except = passException except
-- | Placeholder for features not yet implemented | 304 | handleDebug :: MOO Value -> MOO Value
handleDebug = (`catchException` handler)
where handler Exception {
exceptionDebugBit = False
, exceptionCode = code
} = return code
handler except = passException except
-- | Placeholder for features not yet implemented | 304 | handleDebug = (`catchException` handler)
where handler Exception {
exceptionDebugBit = False
, exceptionCode = code
} = return code
handler except = passException except
-- | Placeholder for features not yet implemented | 266 | false | true | 1 | 8 | 85 | 66 | 36 | 30 | null | null |
phadej/streaming-commons | Data/Streaming/Network.hs | mit | getReadBufferSize :: HasReadBufferSize a => a -> Int
getReadBufferSize = getConstant . readBufferSizeLens Constant | 114 | getReadBufferSize :: HasReadBufferSize a => a -> Int
getReadBufferSize = getConstant . readBufferSizeLens Constant | 114 | getReadBufferSize = getConstant . readBufferSizeLens Constant | 61 | false | true | 0 | 8 | 13 | 35 | 15 | 20 | null | null |
rueshyna/gogol | gogol-dns/gen/Network/Google/DNS/Types.hs | mpl-2.0 | -- | Default request referring to version 'v2beta1' of the Google Cloud DNS API. This contains the host and root path used as a starting point for constructing service requests.
dNSService :: ServiceConfig
dNSService
= defaultService (ServiceId "dns:v2beta1")
"www.googleapis.com" | 288 | dNSService :: ServiceConfig
dNSService
= defaultService (ServiceId "dns:v2beta1")
"www.googleapis.com" | 110 | dNSService
= defaultService (ServiceId "dns:v2beta1")
"www.googleapis.com" | 82 | true | true | 0 | 7 | 46 | 26 | 12 | 14 | null | null |
mydaum/cabal | Cabal/Distribution/PackageDescription/Parse.hs | bsd-3-clause | deprecatedFieldsBuildInfo :: [(String,String)]
deprecatedFieldsBuildInfo = [ ("hs-source-dir","hs-source-dirs") ] | 113 | deprecatedFieldsBuildInfo :: [(String,String)]
deprecatedFieldsBuildInfo = [ ("hs-source-dir","hs-source-dirs") ] | 113 | deprecatedFieldsBuildInfo = [ ("hs-source-dir","hs-source-dirs") ] | 66 | false | true | 0 | 6 | 7 | 29 | 18 | 11 | null | null |
DanielAtSamraksh/checkReceivedSnapshots | ReceivedSnapshots.hs | mit | -- die err = do putStrLn err
-- exitFailure
printSnapshots :: [Snapshot] -> IO()
printSnapshots ss = mapM_ print ss | 144 | printSnapshots :: [Snapshot] -> IO()
printSnapshots ss = mapM_ print ss | 71 | printSnapshots ss = mapM_ print ss | 34 | true | true | 0 | 8 | 48 | 39 | 18 | 21 | null | null |
literate-unitb/literate-unitb | src/Document/Tests/TrainStationRefinement.hs | mit | result0 :: String
result0 = unlines
[ " o m0/m0:enter/FIS/in@prime"
, " o m0/m0:leave/FIS/in@prime"
, " o m0/m0:prog0/LIVE/discharge/tr/lhs"
, " o m0/m0:prog0/LIVE/discharge/tr/rhs"
, " o m0/m0:tr0/TR/WFIS/t/t@prime"
, " o m0/m0:tr0/TR/m0:leave/EN"
, " o m0/m0:tr0/TR/m0:leave/N... | 350 | result0 :: String
result0 = unlines
[ " o m0/m0:enter/FIS/in@prime"
, " o m0/m0:leave/FIS/in@prime"
, " o m0/m0:prog0/LIVE/discharge/tr/lhs"
, " o m0/m0:prog0/LIVE/discharge/tr/rhs"
, " o m0/m0:tr0/TR/WFIS/t/t@prime"
, " o m0/m0:tr0/TR/m0:leave/EN"
, " o m0/m0:tr0/TR/m0:leave/N... | 350 | result0 = unlines
[ " o m0/m0:enter/FIS/in@prime"
, " o m0/m0:leave/FIS/in@prime"
, " o m0/m0:prog0/LIVE/discharge/tr/lhs"
, " o m0/m0:prog0/LIVE/discharge/tr/rhs"
, " o m0/m0:tr0/TR/WFIS/t/t@prime"
, " o m0/m0:tr0/TR/m0:leave/EN"
, " o m0/m0:tr0/TR/m0:leave/NEG"
, "passed ... | 332 | false | true | 0 | 6 | 89 | 44 | 24 | 20 | null | null |
notae/haskell-exercise | cp/SBVTest3.hs | bsd-3-clause | {-|
Apply as SBV predicate:
>>> allSat p4
Solution #1:
s0 = 1 :: Word8
s1 = 4 :: Word8
Solution #2:
s0 = 2 :: Word8
s1 = 3 :: Word8
Found 2 different solutions.
-}
p4 :: SWord8 -> SWord8 -> Symbolic SBool
p4 x y = do
constrain $ x `inRange` (1, 3)
constrain $ y `inRange` (3, 5)
constrain $ p3 x y
return... | 475 | p4 :: SWord8 -> SWord8 -> Symbolic SBool
p4 x y = do
constrain $ x `inRange` (1, 3)
constrain $ y `inRange` (3, 5)
constrain $ p3 x y
return true
{-|
Encode residue field with type Word8
>>> allSat p0
Solution #1:
s0 = 1 :: Word8
Solution #2:
s0 = 2 :: Word8
Found 2 different solutions.
-} | 303 | p4 x y = do
constrain $ x `inRange` (1, 3)
constrain $ y `inRange` (3, 5)
constrain $ p3 x y
return true
{-|
Encode residue field with type Word8
>>> allSat p0
Solution #1:
s0 = 1 :: Word8
Solution #2:
s0 = 2 :: Word8
Found 2 different solutions.
-} | 262 | true | true | 0 | 8 | 118 | 85 | 44 | 41 | null | null |
lukexi/ghc-7.8-arm64 | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | ppLit (LMFloatLit r LMFloat ) = ppFloat $ narrowFp r | 53 | ppLit (LMFloatLit r LMFloat ) = ppFloat $ narrowFp r | 53 | ppLit (LMFloatLit r LMFloat ) = ppFloat $ narrowFp r | 53 | false | false | 0 | 6 | 10 | 25 | 11 | 14 | null | null |
abbradar/yaxmpp | src/Network/XMPP/Session.hs | bsd-3-clause | restartOrThrow _ _ _ e = throwM e | 33 | restartOrThrow _ _ _ e = throwM e | 33 | restartOrThrow _ _ _ e = throwM e | 33 | false | false | 0 | 5 | 7 | 18 | 8 | 10 | null | null |
brendanhay/gogol | gogol/src/Network/Google.hs | mpl-2.0 | -- | Run a 'Google' action using the specified environment and
-- credentials annotated with sufficient authorization scopes.
runGoogle :: (MonadResource m, HasEnv s r) => r -> Google s a -> m a
runGoogle e m = liftResourceT $ runReaderT (unGoogle m) (e ^. environment) | 269 | runGoogle :: (MonadResource m, HasEnv s r) => r -> Google s a -> m a
runGoogle e m = liftResourceT $ runReaderT (unGoogle m) (e ^. environment) | 143 | runGoogle e m = liftResourceT $ runReaderT (unGoogle m) (e ^. environment) | 74 | true | true | 0 | 9 | 45 | 77 | 38 | 39 | null | null |
lisperatu/subgetter | Core.hs | gpl-3.0 | main = subsForFile . unwords =<< getArgs | 40 | main = subsForFile . unwords =<< getArgs | 40 | main = subsForFile . unwords =<< getArgs | 40 | false | false | 3 | 5 | 6 | 22 | 8 | 14 | null | null |
brendanhay/gogol | gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/Get.hs | mpl-2.0 | -- | How dates, times, and durations should be represented in the output.
-- This is ignored if value_render_option is FORMATTED_VALUE. The default
-- dateTime render option is SERIAL_NUMBER.
svgDateTimeRenderOption :: Lens' SpreadsheetsValuesGet (Maybe SpreadsheetsValuesGetDateTimeRenderOption)
svgDateTimeRenderOption... | 403 | svgDateTimeRenderOption :: Lens' SpreadsheetsValuesGet (Maybe SpreadsheetsValuesGetDateTimeRenderOption)
svgDateTimeRenderOption
= lens _svgDateTimeRenderOption
(\ s a -> s{_svgDateTimeRenderOption = a}) | 211 | svgDateTimeRenderOption
= lens _svgDateTimeRenderOption
(\ s a -> s{_svgDateTimeRenderOption = a}) | 106 | true | true | 0 | 8 | 53 | 51 | 27 | 24 | null | null |
slpopejoy/fadno-xml | src/Fadno/MusicXml/MusicXml30.hs | bsd-2-clause | parseOnOff :: String -> P.XParse OnOff
parseOnOff s
| s == "on" = return $ OnOffOn
| s == "off" = return $ OnOffOff
| otherwise = P.xfail $ "OnOff: " ++ s | 178 | parseOnOff :: String -> P.XParse OnOff
parseOnOff s
| s == "on" = return $ OnOffOn
| s == "off" = return $ OnOffOff
| otherwise = P.xfail $ "OnOff: " ++ s | 178 | parseOnOff s
| s == "on" = return $ OnOffOn
| s == "off" = return $ OnOffOff
| otherwise = P.xfail $ "OnOff: " ++ s | 139 | false | true | 0 | 8 | 56 | 73 | 34 | 39 | null | null |
I3ck/HGE2D | src/examples/Example4.hs | mit | --define our initial state
es4 = EngineState
{ getTitle = myGetTitle
, getTime = myGetTime
, setTime = mySetTime
, moveTime = myMoveTime
, click = myClick
, mUp = myMouseUp
, hover = myHover
, drag = myDrag
, kDown = myKeyDown
, kUp = myKeyUp
, resize = myResize
, getSize... | 2,290 | es4 = EngineState
{ getTitle = myGetTitle
, getTime = myGetTime
, setTime = mySetTime
, moveTime = myMoveTime
, click = myClick
, mUp = myMouseUp
, hover = myHover
, drag = myDrag
, kDown = myKeyDown
, kUp = myKeyUp
, resize = myResize
, getSize = myGetSize
, toGlInst... | 2,263 | es4 = EngineState
{ getTitle = myGetTitle
, getTime = myGetTime
, setTime = mySetTime
, moveTime = myMoveTime
, click = myClick
, mUp = myMouseUp
, hover = myHover
, drag = myDrag
, kDown = myKeyDown
, kUp = myKeyUp
, resize = myResize
, getSize = myGetSize
, toGlInst... | 2,263 | true | false | 25 | 11 | 663 | 434 | 247 | 187 | null | null |
input-output-hk/cardano-sl-explorer | src/explorer/Main.hs | mit | main :: IO ()
main = do
args <- getExplorerOptions
printFlags
runProduction (action args) | 101 | main :: IO ()
main = do
args <- getExplorerOptions
printFlags
runProduction (action args) | 101 | main = do
args <- getExplorerOptions
printFlags
runProduction (action args) | 87 | false | true | 0 | 9 | 25 | 38 | 17 | 21 | null | null |
kim/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/CompleteMultipartUpload.hs | mpl-2.0 | -- | The total size, in bytes, of the entire archive. This value should be the sum
-- of all the sizes of the individual parts that you uploaded.
cmuArchiveSize :: Lens' CompleteMultipartUpload (Maybe Text)
cmuArchiveSize = lens _cmuArchiveSize (\s a -> s { _cmuArchiveSize = a }) | 280 | cmuArchiveSize :: Lens' CompleteMultipartUpload (Maybe Text)
cmuArchiveSize = lens _cmuArchiveSize (\s a -> s { _cmuArchiveSize = a }) | 134 | cmuArchiveSize = lens _cmuArchiveSize (\s a -> s { _cmuArchiveSize = a }) | 73 | true | true | 1 | 9 | 47 | 52 | 26 | 26 | null | null |
monto-editor/services-haskell | src/Main.hs | bsd-3-clause | main :: IO ()
main =
Z.withContext $ \ctx -> do
_ <- installHandler sigINT (Catch exitSuccess) Nothing
_ <- installHandler sigTERM (Catch exitSuccess) Nothing
cfg <- execParser $ info (helper <*> parseConfig ctx)
( fullDesc <> header "service-haskell - Monto services for Haskell" )
outlineIco... | 2,556 | main :: IO ()
main =
Z.withContext $ \ctx -> do
_ <- installHandler sigINT (Catch exitSuccess) Nothing
_ <- installHandler sigTERM (Catch exitSuccess) Nothing
cfg <- execParser $ info (helper <*> parseConfig ctx)
( fullDesc <> header "service-haskell - Monto services for Haskell" )
outlineIco... | 2,556 | main =
Z.withContext $ \ctx -> do
_ <- installHandler sigINT (Catch exitSuccess) Nothing
_ <- installHandler sigTERM (Catch exitSuccess) Nothing
cfg <- execParser $ info (helper <*> parseConfig ctx)
( fullDesc <> header "service-haskell - Monto services for Haskell" )
outlineIcons <- getOutli... | 2,542 | false | true | 0 | 31 | 847 | 595 | 281 | 314 | null | null |
fumieval/machines | src/Data/Machine/Mealy.hs | bsd-3-clause | logMealy :: Semigroup a => Mealy a a
logMealy = Mealy $ \a -> (a, h a) where
h a = Mealy $ \b -> let c = a <> b in (c, h c)
| 126 | logMealy :: Semigroup a => Mealy a a
logMealy = Mealy $ \a -> (a, h a) where
h a = Mealy $ \b -> let c = a <> b in (c, h c)
| 126 | logMealy = Mealy $ \a -> (a, h a) where
h a = Mealy $ \b -> let c = a <> b in (c, h c)
| 89 | false | true | 0 | 13 | 37 | 84 | 43 | 41 | null | null |
agocorona/MFlow | tests/workflow1.hs | bsd-3-clause | eserve timereserve keyBook= runFlowOnce f undefined where
f :: FlowM Html (Workflow IO) ()
f= do
let rbook = getDBRef keyBook
lift . logWF $ "You requested the reserve for: "++ keyBook
t <- lift $ getTimeoutFlag timereserve -- $ 5 * 24 * 60 * 60
r <- compensate (step $ withTimeoutIO t (reserveAndM... | 1,313 | buyReserve timereserve keyBook= runFlowOnce f undefined where
f :: FlowM Html (Workflow IO) ()
f= do
let rbook = getDBRef keyBook
lift . logWF $ "You requested the reserve for: "++ keyBook
t <- lift $ getTimeoutFlag timereserve -- $ 5 * 24 * 60 * 60
r <- compensate (step $ withTimeoutIO t (reserve... | 1,313 | buyReserve timereserve keyBook= runFlowOnce f undefined where
f :: FlowM Html (Workflow IO) ()
f= do
let rbook = getDBRef keyBook
lift . logWF $ "You requested the reserve for: "++ keyBook
t <- lift $ getTimeoutFlag timereserve -- $ 5 * 24 * 60 * 60
r <- compensate (step $ withTimeoutIO t (reserve... | 1,313 | false | false | 0 | 17 | 454 | 305 | 142 | 163 | null | null |
green-haskell/ghc | compiler/codeGen/StgCmmClosure.hs | bsd-3-clause | getTyDescription :: Type -> String
getTyDescription ty
= case (tcSplitSigmaTy ty) of { (_, _, tau_ty) ->
case tau_ty of
TyVarTy _ -> "*"
AppTy fun _ -> getTyDescription fun
FunTy _ res -> '-' : '>' : fun_result res
TyConApp tyc... | 589 | getTyDescription :: Type -> String
getTyDescription ty
= case (tcSplitSigmaTy ty) of { (_, _, tau_ty) ->
case tau_ty of
TyVarTy _ -> "*"
AppTy fun _ -> getTyDescription fun
FunTy _ res -> '-' : '>' : fun_result res
TyConApp tyc... | 589 | getTyDescription ty
= case (tcSplitSigmaTy ty) of { (_, _, tau_ty) ->
case tau_ty of
TyVarTy _ -> "*"
AppTy fun _ -> getTyDescription fun
FunTy _ res -> '-' : '>' : fun_result res
TyConApp tycon _ -> getOccString t... | 554 | false | true | 0 | 12 | 240 | 171 | 81 | 90 | null | null |
AmpersandTarski/ampersand | src/Ampersand/Test/Parser/ArbitraryTree.hs | gpl-3.0 | -- Generates a simple non-empty string of ascii characters
safeStr1 :: Gen String
safeStr1 = listOf1 printable `suchThat` noEsc | 127 | safeStr1 :: Gen String
safeStr1 = listOf1 printable `suchThat` noEsc | 68 | safeStr1 = listOf1 printable `suchThat` noEsc | 45 | true | true | 0 | 6 | 18 | 24 | 13 | 11 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'IntMapL.insertLookupWithKey'
iml_insertLookupWithKey = IntMapL.insertLookupWithKey | 87 | iml_insertLookupWithKey = IntMapL.insertLookupWithKey | 53 | iml_insertLookupWithKey = IntMapL.insertLookupWithKey | 53 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
todays-mitsui/discussion | test/UnitConverter.hs | mit | i = VarT $ Var "I_" | 19 | i = VarT $ Var "I_" | 19 | i = VarT $ Var "I_" | 19 | false | false | 3 | 5 | 5 | 18 | 6 | 12 | null | null |
mietek/stack | src/Stack/Config.hs | bsd-3-clause | -- Interprets ConfigMonoid options.
configFromConfigMonoid
:: (MonadLogger m, MonadIO m, MonadCatch m, MonadReader env m, HasHttpManager env)
=> Path Abs Dir -- ^ stack root, e.g. ~/.stack
-> Maybe Project
-> ConfigMonoid
-> m Config
configFromConfigMonoid configStackRoot mproject ConfigMonoid{..} =... | 2,042 | configFromConfigMonoid
:: (MonadLogger m, MonadIO m, MonadCatch m, MonadReader env m, HasHttpManager env)
=> Path Abs Dir -- ^ stack root, e.g. ~/.stack
-> Maybe Project
-> ConfigMonoid
-> m Config
configFromConfigMonoid configStackRoot mproject ConfigMonoid{..} = do
let configDocker = Docker.d... | 2,006 | configFromConfigMonoid configStackRoot mproject ConfigMonoid{..} = do
let configDocker = Docker.dockerOptsFromMonoid mproject configStackRoot configMonoidDockerOpts
configConnectionCount = fromMaybe 8 configMonoidConnectionCount
configHideTHLoading = fromMaybe True configMonoidHideTHLoading
... | 1,788 | true | true | 43 | 9 | 548 | 322 | 168 | 154 | null | null |
DavidAlphaFox/ghc | libraries/bytestring/Data/ByteString/Builder/Prim/Binary.hs | bsd-3-clause | doubleHost :: FixedPrim Double
doubleHost = storableToF | 55 | doubleHost :: FixedPrim Double
doubleHost = storableToF | 55 | doubleHost = storableToF | 24 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
mjansen/tcp-analyse | TCPOptions.hs | mit | tcpOptionACR = 14 | 20 | tcpOptionACR = 14 | 20 | tcpOptionACR = 14 | 20 | false | false | 0 | 4 | 5 | 6 | 3 | 3 | null | null |
brendanhay/gogol | gogol-tpu/gen/Network/Google/Resource/TPU/Projects/Locations/Nodes/Stop.hs | mpl-2.0 | -- | Multipart request metadata.
pPayload :: Lens' ProjectsLocationsNodesStop StopNodeRequest
pPayload = lens _pPayload (\ s a -> s{_pPayload = a}) | 147 | pPayload :: Lens' ProjectsLocationsNodesStop StopNodeRequest
pPayload = lens _pPayload (\ s a -> s{_pPayload = a}) | 114 | pPayload = lens _pPayload (\ s a -> s{_pPayload = a}) | 53 | true | true | 0 | 9 | 20 | 40 | 22 | 18 | null | null |
YLiLarry/parser241-production-rule | src/Parser241/Parser/ProductionRule/Internal/Maker.hs | bsd-3-clause | maker :: (Symbol a, [[Symbol a]]) -> Maker a
maker = Maker | 58 | maker :: (Symbol a, [[Symbol a]]) -> Maker a
maker = Maker | 58 | maker = Maker | 13 | false | true | 0 | 9 | 11 | 36 | 19 | 17 | null | null |
danoctavian/tcp-proxy | simple-proxy/Main.hs | mit | runSimpleProxy = do
debugM logger "starting simple proxy"
Proxy.run $ Proxy.Config { Proxy.proxyPort = 1080
, Proxy.initHook = \_ _ -> do
debugM logger "wtf this ran now"
return Proxy.DataHooks {
Proxy.incoming = DC.map P.id
, Pro... | 610 | runSimpleProxy = do
debugM logger "starting simple proxy"
Proxy.run $ Proxy.Config { Proxy.proxyPort = 1080
, Proxy.initHook = \_ _ -> do
debugM logger "wtf this ran now"
return Proxy.DataHooks {
Proxy.incoming = DC.map P.id
, Pro... | 610 | runSimpleProxy = do
debugM logger "starting simple proxy"
Proxy.run $ Proxy.Config { Proxy.proxyPort = 1080
, Proxy.initHook = \_ _ -> do
debugM logger "wtf this ran now"
return Proxy.DataHooks {
Proxy.incoming = DC.map P.id
, Pro... | 610 | false | false | 0 | 19 | 259 | 136 | 70 | 66 | null | null |
GaloisInc/halvm-ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickHsRecordBinds :: HsRecordBinds Id -> TM (HsRecordBinds Id)
addTickHsRecordBinds (HsRecFields fields dd)
= do { fields' <- mapM addTickHsRecField fields
; return (HsRecFields fields' dd) } | 205 | addTickHsRecordBinds :: HsRecordBinds Id -> TM (HsRecordBinds Id)
addTickHsRecordBinds (HsRecFields fields dd)
= do { fields' <- mapM addTickHsRecField fields
; return (HsRecFields fields' dd) } | 205 | addTickHsRecordBinds (HsRecFields fields dd)
= do { fields' <- mapM addTickHsRecField fields
; return (HsRecFields fields' dd) } | 139 | false | true | 0 | 9 | 36 | 67 | 32 | 35 | null | null |
scolobb/fgl | Data/Graph/Inductive/Internal/Thread.hs | bsd-3-clause | -- (3) abstract from split
--
threadList' :: (Collect r c) -> (Split t i r) -> [i] -> t -> (c,t)
threadList' (_,c) _ [] t = (c,t) | 138 | threadList' :: (Collect r c) -> (Split t i r) -> [i] -> t -> (c,t)
threadList' (_,c) _ [] t = (c,t) | 107 | threadList' (_,c) _ [] t = (c,t) | 40 | true | true | 0 | 11 | 37 | 85 | 45 | 40 | null | null |
sdiehl/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | -- See Note [TcLevel and untouchable type variables] for what this Int is
-- See also Note [TcLevel assignment]
{-
Note [TcLevel and untouchable type variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Each unification variable (MetaTv)
and each Implication
has a level number (of type TcLevel)
* INVARIAN... | 3,395 | maxTcLevel :: TcLevel -> TcLevel -> TcLevel
maxTcLevel (TcLevel a) (TcLevel b) = TcLevel (a `max` b) | 100 | maxTcLevel (TcLevel a) (TcLevel b) = TcLevel (a `max` b) | 56 | true | true | 0 | 7 | 782 | 51 | 28 | 23 | null | null |
meiersi-11ce/stack | src/Stack/Build/Source.hs | bsd-3-clause | localFlags :: (Map (Maybe PackageName) (Map FlagName Bool))
-> BuildConfig
-> PackageName
-> Map FlagName Bool
localFlags boptsflags bconfig name = Map.unions
[ fromMaybe Map.empty $ Map.lookup (Just name) $ boptsflags
, fromMaybe Map.empty $ Map.lookup Nothing $ boptsflags
... | 383 | localFlags :: (Map (Maybe PackageName) (Map FlagName Bool))
-> BuildConfig
-> PackageName
-> Map FlagName Bool
localFlags boptsflags bconfig name = Map.unions
[ fromMaybe Map.empty $ Map.lookup (Just name) $ boptsflags
, fromMaybe Map.empty $ Map.lookup Nothing $ boptsflags
... | 383 | localFlags boptsflags bconfig name = Map.unions
[ fromMaybe Map.empty $ Map.lookup (Just name) $ boptsflags
, fromMaybe Map.empty $ Map.lookup Nothing $ boptsflags
, fromMaybe Map.empty $ Map.lookup name $ bcFlags bconfig
] | 239 | false | true | 0 | 10 | 97 | 134 | 64 | 70 | null | null |
rueshyna/gogol | gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Insert.hs | mpl-2.0 | -- | Creates a value of 'TablesInsert' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tiPayload'
--
-- * 'tiDataSetId'
--
-- * 'tiProjectId'
tablesInsert
:: Table -- ^ 'tiPayload'
-> Text -- ^ 'tiDataSetId'
-> Text -- ^ '... | 532 | tablesInsert
:: Table -- ^ 'tiPayload'
-> Text -- ^ 'tiDataSetId'
-> Text -- ^ 'tiProjectId'
-> TablesInsert
tablesInsert pTiPayload_ pTiDataSetId_ pTiProjectId_ =
TablesInsert'
{ _tiPayload = pTiPayload_
, _tiDataSetId = pTiDataSetId_
, _tiProjectId = pTiProjectId_
} | 304 | tablesInsert pTiPayload_ pTiDataSetId_ pTiProjectId_ =
TablesInsert'
{ _tiPayload = pTiPayload_
, _tiDataSetId = pTiDataSetId_
, _tiProjectId = pTiProjectId_
} | 179 | true | true | 0 | 7 | 114 | 62 | 40 | 22 | null | null |
fmapfmapfmap/amazonka | amazonka-elasticache/gen/Network/AWS/ElastiCache/CreateCacheSubnetGroup.hs | mpl-2.0 | -- | Undocumented member.
crsCacheSubnetGroup :: Lens' CreateCacheSubnetGroupResponse (Maybe CacheSubnetGroup)
crsCacheSubnetGroup = lens _crsCacheSubnetGroup (\ s a -> s{_crsCacheSubnetGroup = a}) | 197 | crsCacheSubnetGroup :: Lens' CreateCacheSubnetGroupResponse (Maybe CacheSubnetGroup)
crsCacheSubnetGroup = lens _crsCacheSubnetGroup (\ s a -> s{_crsCacheSubnetGroup = a}) | 171 | crsCacheSubnetGroup = lens _crsCacheSubnetGroup (\ s a -> s{_crsCacheSubnetGroup = a}) | 86 | true | true | 0 | 9 | 20 | 46 | 25 | 21 | null | null |
fmapfmapfmap/amazonka | amazonka-cloudtrail/gen/Network/AWS/CloudTrail/Types/Product.hs | mpl-2.0 | -- | Specifies a value for the specified AttributeKey.
laAttributeValue :: Lens' LookupAttribute Text
laAttributeValue = lens _laAttributeValue (\ s a -> s{_laAttributeValue = a}) | 179 | laAttributeValue :: Lens' LookupAttribute Text
laAttributeValue = lens _laAttributeValue (\ s a -> s{_laAttributeValue = a}) | 124 | laAttributeValue = lens _laAttributeValue (\ s a -> s{_laAttributeValue = a}) | 77 | true | true | 0 | 9 | 24 | 40 | 22 | 18 | null | null |
CarstenKoenig/AdventOfCode2016 | Day12/Main.hs | mit | copy :: Target -> Register -> CPU -> CPU
copy (ToValue v) RegA cpu =
moveNext $ cpu { regA = v } | 98 | copy :: Target -> Register -> CPU -> CPU
copy (ToValue v) RegA cpu =
moveNext $ cpu { regA = v } | 98 | copy (ToValue v) RegA cpu =
moveNext $ cpu { regA = v } | 57 | false | true | 0 | 7 | 24 | 48 | 25 | 23 | null | null |
gbataille/pandoc | src/Text/Pandoc/Writers/MediaWiki.hs | gpl-2.0 | blockToMediaWiki (RawBlock f str)
| f == Format "mediawiki" = return str
| f == Format "html" = return str
| otherwise = return "" | 155 | blockToMediaWiki (RawBlock f str)
| f == Format "mediawiki" = return str
| f == Format "html" = return str
| otherwise = return "" | 155 | blockToMediaWiki (RawBlock f str)
| f == Format "mediawiki" = return str
| f == Format "html" = return str
| otherwise = return "" | 155 | false | false | 1 | 9 | 49 | 64 | 28 | 36 | null | null |
zaxtax/hakaru | commands/Hakaru.hs | bsd-3-clause | iterateM_ :: Monad m => (a -> m a) -> a -> m b
iterateM_ f = g
where g x = f x >>= g | 88 | iterateM_ :: Monad m => (a -> m a) -> a -> m b
iterateM_ f = g
where g x = f x >>= g | 88 | iterateM_ f = g
where g x = f x >>= g | 41 | false | true | 0 | 9 | 29 | 59 | 28 | 31 | null | null |
zcesur/h99 | src/Problems01thru10.hs | gpl-3.0 | length'' :: Num b => [a] -> b
length'' [] = 0 | 45 | length'' :: Num b => [a] -> b
length'' [] = 0 | 45 | length'' [] = 0 | 15 | false | true | 0 | 9 | 11 | 36 | 16 | 20 | null | null |
bno1/adventofcode_2016 | d07/main.hs | mit | main :: IO ()
main = do
content <- readFile "input.txt"
let ips = map parseIP $ lines content
let tls_ips = filter checkIPTLS ips
print $ length tls_ips
let ssl_ips = filter checkIPSSL ips
print $ length ssl_ips | 237 | main :: IO ()
main = do
content <- readFile "input.txt"
let ips = map parseIP $ lines content
let tls_ips = filter checkIPTLS ips
print $ length tls_ips
let ssl_ips = filter checkIPSSL ips
print $ length ssl_ips | 237 | main = do
content <- readFile "input.txt"
let ips = map parseIP $ lines content
let tls_ips = filter checkIPTLS ips
print $ length tls_ips
let ssl_ips = filter checkIPSSL ips
print $ length ssl_ips | 223 | false | true | 2 | 7 | 64 | 82 | 37 | 45 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Atomic/MonadStateWrite.hs | bsd-3-clause | deleteItemInv :: MonadStateWrite m => ItemId -> ItemQuant -> ActorId -> m ()
deleteItemInv iid kit aid =
updateActor aid $ \b -> b {binv = rmFromBag kit iid (binv b)} | 168 | deleteItemInv :: MonadStateWrite m => ItemId -> ItemQuant -> ActorId -> m ()
deleteItemInv iid kit aid =
updateActor aid $ \b -> b {binv = rmFromBag kit iid (binv b)} | 168 | deleteItemInv iid kit aid =
updateActor aid $ \b -> b {binv = rmFromBag kit iid (binv b)} | 91 | false | true | 0 | 11 | 32 | 75 | 37 | 38 | null | null |
srhb/quickcheck | Test/QuickCheck/Gen.hs | bsd-3-clause | -- | Adjust the size parameter, by transforming it with the given
-- function.
scale :: (Int -> Int) -> Gen a -> Gen a
scale f g = sized (\n -> resize (f n) g) | 159 | scale :: (Int -> Int) -> Gen a -> Gen a
scale f g = sized (\n -> resize (f n) g) | 80 | scale f g = sized (\n -> resize (f n) g) | 40 | true | true | 0 | 10 | 35 | 66 | 32 | 34 | null | null |
sol/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | quoted :: GenParser Char ParserState Inline
quoted = doubleQuoted <|> singleQuoted | 82 | quoted :: GenParser Char ParserState Inline
quoted = doubleQuoted <|> singleQuoted | 82 | quoted = doubleQuoted <|> singleQuoted | 38 | false | true | 0 | 5 | 10 | 22 | 11 | 11 | null | null |
tpsinnem/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | -- | Gets all namespaces directly referred by a NsItem
referredNss :: NsItem -- ^ The name to get all directly
-- referred namespaces for
-> S.Set NsName
referredNss (_, Nothing, _) = S.empty | 227 | referredNss :: NsItem -- ^ The name to get all directly
-- referred namespaces for
-> S.Set NsName
referredNss (_, Nothing, _) = S.empty | 172 | referredNss (_, Nothing, _) = S.empty | 37 | true | true | 0 | 7 | 69 | 37 | 21 | 16 | null | null |
garetxe/cabal | Cabal/Distribution/Simple.hs | bsd-3-clause | runConfigureScript :: Verbosity -> Bool -> ConfigFlags -> LocalBuildInfo
-> IO ()
runConfigureScript verbosity backwardsCompatHack flags lbi = do
env <- getEnvironment
let programConfig = withPrograms lbi
(ccProg, ccFlags) <- configureCCompiler verbosity programConfig
-- The C compiler's comp... | 1,804 | runConfigureScript :: Verbosity -> Bool -> ConfigFlags -> LocalBuildInfo
-> IO ()
runConfigureScript verbosity backwardsCompatHack flags lbi = do
env <- getEnvironment
let programConfig = withPrograms lbi
(ccProg, ccFlags) <- configureCCompiler verbosity programConfig
-- The C compiler's comp... | 1,804 | runConfigureScript verbosity backwardsCompatHack flags lbi = do
env <- getEnvironment
let programConfig = withPrograms lbi
(ccProg, ccFlags) <- configureCCompiler verbosity programConfig
-- The C compiler's compilation and linker flags (e.g.
-- "C compiler flags" and "Gcc Linker flags" from GHC) have already
... | 1,703 | false | true | 0 | 15 | 382 | 390 | 198 | 192 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/CodeGen/Types.hs | bsd-3-clause | buildType (SMeasure x) = [callStruct . typeName . SMeasure $ x] | 64 | buildType (SMeasure x) = [callStruct . typeName . SMeasure $ x] | 64 | buildType (SMeasure x) = [callStruct . typeName . SMeasure $ x] | 64 | false | false | 0 | 8 | 11 | 30 | 15 | 15 | null | null |
diagrams/diagrams-input | src/Diagrams/SVG/Arguments.hs | bsd-3-clause | setAttrs =
do ca <- coreAttributes
pa <- presentationAttributes
xlink <- xlinkAttributes
ignoreAttrs
return (ca,pa,xlink) | 143 | setAttrs =
do ca <- coreAttributes
pa <- presentationAttributes
xlink <- xlinkAttributes
ignoreAttrs
return (ca,pa,xlink) | 143 | setAttrs =
do ca <- coreAttributes
pa <- presentationAttributes
xlink <- xlinkAttributes
ignoreAttrs
return (ca,pa,xlink) | 143 | false | false | 0 | 8 | 36 | 45 | 21 | 24 | null | null |
sdiehl/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | -- Overloaded record field selectors
mkRecFldSelOcc :: String -> OccName
mkRecFldSelOcc s = mk_deriv varName "$sel" [fsLit s] | 125 | mkRecFldSelOcc :: String -> OccName
mkRecFldSelOcc s = mk_deriv varName "$sel" [fsLit s] | 88 | mkRecFldSelOcc s = mk_deriv varName "$sel" [fsLit s] | 52 | true | true | 0 | 7 | 17 | 32 | 16 | 16 | null | null |
michalkonecny/aern | aern-mpfr-rounded/src/Numeric/AERN/MPFRBasis/Interval.hs | bsd-3-clause | {-| Convenience Unicode notation for '<\/>?' -}
(<⊔>?) :: MI -> MI -> Maybe MI
(<⊔>?) = (BRO.<⊔>?) | 99 | (<⊔>?) :: MI -> MI -> Maybe MI
(<⊔>?) = (BRO.<⊔>?) | 50 | (<⊔>?) = (BRO.<⊔>?) | 19 | true | true | 0 | 7 | 18 | 31 | 19 | 12 | null | null |
NCrashed/PowerCom | src/powercom/Channel/Miscs.hs | gpl-3.0 | sendDisconnectUser :: ProcessId -> String -> Process ()
sendDisconnectUser = sendTyped1 "disconnect" | 100 | sendDisconnectUser :: ProcessId -> String -> Process ()
sendDisconnectUser = sendTyped1 "disconnect" | 100 | sendDisconnectUser = sendTyped1 "disconnect" | 44 | false | true | 0 | 8 | 11 | 27 | 13 | 14 | null | null |
DavidAlphaFox/darcs | src/Darcs/Patch/Rebase/Fixup.hs | gpl-2.0 | flToNamesPrims (PrimFixup p :>: fs) =
case flToNamesPrims fs of
names :> prims ->
case totalCommuterIdFL commutePrimName (p :> names) of
names' :> p' -> names' :> (p' :>: prims)
-- Note that this produces a list result because of the need to use effect to
-- extract the result.
... | 403 | flToNamesPrims (PrimFixup p :>: fs) =
case flToNamesPrims fs of
names :> prims ->
case totalCommuterIdFL commutePrimName (p :> names) of
names' :> p' -> names' :> (p' :>: prims)
-- Note that this produces a list result because of the need to use effect to
-- extract the result.
... | 403 | flToNamesPrims (PrimFixup p :>: fs) =
case flToNamesPrims fs of
names :> prims ->
case totalCommuterIdFL commutePrimName (p :> names) of
names' :> p' -> names' :> (p' :>: prims)
-- Note that this produces a list result because of the need to use effect to
-- extract the result.
... | 403 | false | false | 0 | 13 | 104 | 76 | 39 | 37 | null | null |
kim/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/CreateLaunchConfiguration.hs | mpl-2.0 | -- | Used for groups that launch instances into a virtual private cloud (VPC).
-- Specifies whether to assign a public IP address to each instance. For more
-- information, see <http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html Auto Scaling and Amazon VPC> in the /Auto Scaling Develop... | 1,046 | clcAssociatePublicIpAddress :: Lens' CreateLaunchConfiguration (Maybe Bool)
clcAssociatePublicIpAddress =
lens _clcAssociatePublicIpAddress
(\s a -> s { _clcAssociatePublicIpAddress = a }) | 200 | clcAssociatePublicIpAddress =
lens _clcAssociatePublicIpAddress
(\s a -> s { _clcAssociatePublicIpAddress = a }) | 124 | true | true | 0 | 9 | 144 | 54 | 33 | 21 | null | null |
fpco/hlint | data/Default.hs | bsd-3-clause | warn = flip (g `on` h) ==> flip g `on` h | 41 | warn = flip (g `on` h) ==> flip g `on` h | 41 | warn = flip (g `on` h) ==> flip g `on` h | 41 | false | false | 0 | 9 | 11 | 31 | 17 | 14 | null | null |
suhailshergill/liboleg | Language/TEval/TInfLetP.hs | bsd-3-clause | teval' env (I n) = return TInt | 30 | teval' env (I n) = return TInt | 30 | teval' env (I n) = return TInt | 30 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
mikehat/blaze-css | src/Text/Blaze/Css21/Style.hs | bsd-3-clause | outlineColor = B.cssStyle "outline-color" "outline-color: " . B.stringValue . toString | 86 | outlineColor = B.cssStyle "outline-color" "outline-color: " . B.stringValue . toString | 86 | outlineColor = B.cssStyle "outline-color" "outline-color: " . B.stringValue . toString | 86 | false | false | 1 | 8 | 9 | 27 | 11 | 16 | null | null |
tjakway/ghcjvm | compiler/ghci/ByteCodeLink.hs | bsd-3-clause | lookupLiteral _ _ (BCONPtrStr _) =
-- should be eliminated during assembleBCOs
panic "lookupLiteral: BCONPtrStr" | 116 | lookupLiteral _ _ (BCONPtrStr _) =
-- should be eliminated during assembleBCOs
panic "lookupLiteral: BCONPtrStr" | 116 | lookupLiteral _ _ (BCONPtrStr _) =
-- should be eliminated during assembleBCOs
panic "lookupLiteral: BCONPtrStr" | 116 | false | false | 0 | 7 | 18 | 23 | 11 | 12 | null | null |
mainland/nikola | src/Data/Vector/CUDA/UnboxedForeign.hs | bsd-3-clause | postscanl = G.postscanl | 23 | postscanl = G.postscanl | 23 | postscanl = G.postscanl | 23 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
AndrewRademacher/stack | src/Stack/Fetch.hs | bsd-3-clause | -- | Figure out where to fetch from.
getToFetch :: (MonadMask m, MonadLogger m, MonadIO m, MonadReader env m, HasConfig env)
=> Maybe (Path Abs Dir) -- ^ directory to unpack into, @Nothing@ means no unpack
-> Map PackageIdentifier ResolvedPackage
-> m ToFetchResult
getToFetch mdest reso... | 2,657 | getToFetch :: (MonadMask m, MonadLogger m, MonadIO m, MonadReader env m, HasConfig env)
=> Maybe (Path Abs Dir) -- ^ directory to unpack into, @Nothing@ means no unpack
-> Map PackageIdentifier ResolvedPackage
-> m ToFetchResult
getToFetch mdest resolvedAll = do
(toFetch0, unpacked)... | 2,620 | getToFetch mdest resolvedAll = do
(toFetch0, unpacked) <- liftM partitionEithers $ mapM checkUnpacked $ Map.toList resolvedAll
toFetch1 <- mapM goIndex $ Map.toList $ Map.fromListWith (++) toFetch0
return ToFetchResult
{ tfrToFetch = Map.unions toFetch1
, tfrAlreadyUnpacked = Map.fromList un... | 2,358 | true | true | 1 | 26 | 859 | 566 | 291 | 275 | null | null |
sdiehl/ghc | compiler/utils/FiniteMap.hs | bsd-3-clause | foldRight :: (elt -> a -> a) -> a -> Map key elt -> a
foldRight = Map.foldr | 89 | foldRight :: (elt -> a -> a) -> a -> Map key elt -> a
foldRight = Map.foldr | 89 | foldRight = Map.foldr | 28 | false | true | 0 | 8 | 31 | 41 | 21 | 20 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | happyReduction_112 _ _ = notHappyAtAll | 39 | happyReduction_112 _ _ = notHappyAtAll | 39 | happyReduction_112 _ _ = notHappyAtAll | 39 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
DaMSL/K3 | src/Language/K3/Parser/SQL.hs | apache-2.0 | keyValueMapping :: TypeMapping -> Bool
keyValueMapping tm = maybe False (either (\pfx -> pfx `elem` ["key", "value"]) keyValuePrefix) tm | 136 | keyValueMapping :: TypeMapping -> Bool
keyValueMapping tm = maybe False (either (\pfx -> pfx `elem` ["key", "value"]) keyValuePrefix) tm | 136 | keyValueMapping tm = maybe False (either (\pfx -> pfx `elem` ["key", "value"]) keyValuePrefix) tm | 97 | false | true | 0 | 11 | 18 | 53 | 29 | 24 | null | null |
Fermat/higher-rank | src/Syntax.hs | bsd-3-clause | norm g (Const a p) =
case lookup a g of
Nothing -> Const a p
Just b -> norm g b | 89 | norm g (Const a p) =
case lookup a g of
Nothing -> Const a p
Just b -> norm g b | 89 | norm g (Const a p) =
case lookup a g of
Nothing -> Const a p
Just b -> norm g b | 89 | false | false | 3 | 7 | 31 | 53 | 24 | 29 | null | null |
sdiehl/ghc | testsuite/tests/programs/andy_cherry/DataTypes.hs | bsd-3-clause | charToMoveTok '0' = Just (PartCastleTok) | 40 | charToMoveTok '0' = Just (PartCastleTok) | 40 | charToMoveTok '0' = Just (PartCastleTok) | 40 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
KommuSoft/dep-software | Dep.Samples.hs | gpl-3.0 | fsm1e "h" = F | 13 | fsm1e "h" = F | 13 | fsm1e "h" = F | 13 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
ezyang/ghc | compiler/prelude/THNames.hs | bsd-3-clause | -- data Phases = ...
allPhasesDataConName, fromPhaseDataConName, beforePhaseDataConName :: Name
allPhasesDataConName = thCon (fsLit "AllPhases") allPhasesDataConKey | 168 | allPhasesDataConName, fromPhaseDataConName, beforePhaseDataConName :: Name
allPhasesDataConName = thCon (fsLit "AllPhases") allPhasesDataConKey | 147 | allPhasesDataConName = thCon (fsLit "AllPhases") allPhasesDataConKey | 72 | true | true | 0 | 7 | 19 | 27 | 16 | 11 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo CasSmallArrayOp = mkGenPrimOp (fsLit "casSmallArray#") [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, intPrimTy, alphaTy, alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, intPrimTy, alphaTy])) | 258 | primOpInfo CasSmallArrayOp = mkGenPrimOp (fsLit "casSmallArray#") [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, intPrimTy, alphaTy, alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, intPrimTy, alphaTy])) | 258 | primOpInfo CasSmallArrayOp = mkGenPrimOp (fsLit "casSmallArray#") [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, intPrimTy, alphaTy, alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, intPrimTy, alphaTy])) | 258 | false | false | 0 | 10 | 22 | 76 | 41 | 35 | null | null |
Rathcke/uni | ap/exam/src/subs/SubsInterpreter.hs | gpl-3.0 | getFunction :: FunName -> SubsM Primitive
getFunction name = do
penv <- getPEnv
case Map.lookup name penv of
Just a -> return a
Nothing -> fail "Key does not exist in 'getFunction'"
-- End Utility Functions
-- Expr and Stms Evaluation | 248 | getFunction :: FunName -> SubsM Primitive
getFunction name = do
penv <- getPEnv
case Map.lookup name penv of
Just a -> return a
Nothing -> fail "Key does not exist in 'getFunction'"
-- End Utility Functions
-- Expr and Stms Evaluation | 248 | getFunction name = do
penv <- getPEnv
case Map.lookup name penv of
Just a -> return a
Nothing -> fail "Key does not exist in 'getFunction'"
-- End Utility Functions
-- Expr and Stms Evaluation | 206 | false | true | 0 | 10 | 54 | 65 | 30 | 35 | null | null |
langthom/data-structures | sortingAlgorithms/SelectionSort/Haskell/Main.hs | bsd-3-clause | sample :: [Integer]
sample = [ 5, 9, 24, 72, 0, (-5), 18, 999, 212 ] | 68 | sample :: [Integer]
sample = [ 5, 9, 24, 72, 0, (-5), 18, 999, 212 ] | 68 | sample = [ 5, 9, 24, 72, 0, (-5), 18, 999, 212 ] | 48 | false | true | 0 | 7 | 15 | 46 | 29 | 17 | null | null |
rueshyna/gogol | gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs | mpl-2.0 | -- | The saved columns being requested.
sclItems :: Lens' SavedColumnList [SavedColumn]
sclItems
= lens _sclItems (\ s a -> s{_sclItems = a}) .
_Default
. _Coerce | 176 | sclItems :: Lens' SavedColumnList [SavedColumn]
sclItems
= lens _sclItems (\ s a -> s{_sclItems = a}) .
_Default
. _Coerce | 136 | sclItems
= lens _sclItems (\ s a -> s{_sclItems = a}) .
_Default
. _Coerce | 88 | true | true | 2 | 9 | 40 | 58 | 28 | 30 | null | null |
romanb/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/DescribeNotificationConfigurations.hs | mpl-2.0 | -- | The name of the group.
dncAutoScalingGroupNames :: Lens' DescribeNotificationConfigurations [Text]
dncAutoScalingGroupNames =
lens _dncAutoScalingGroupNames
(\s a -> s { _dncAutoScalingGroupNames = a })
. _List | 239 | dncAutoScalingGroupNames :: Lens' DescribeNotificationConfigurations [Text]
dncAutoScalingGroupNames =
lens _dncAutoScalingGroupNames
(\s a -> s { _dncAutoScalingGroupNames = a })
. _List | 211 | dncAutoScalingGroupNames =
lens _dncAutoScalingGroupNames
(\s a -> s { _dncAutoScalingGroupNames = a })
. _List | 135 | true | true | 0 | 10 | 50 | 47 | 26 | 21 | null | null |
olsner/ghc | testsuite/tests/module/T1148.hs | bsd-3-clause | at :: (Ix i, Bounded i, Array.IArray Array.UArray e) => T i e -> i -> e
at (T a) i = unsafeAt a (index (minBound, maxBound) i) | 126 | at :: (Ix i, Bounded i, Array.IArray Array.UArray e) => T i e -> i -> e
at (T a) i = unsafeAt a (index (minBound, maxBound) i) | 126 | at (T a) i = unsafeAt a (index (minBound, maxBound) i) | 54 | false | true | 0 | 11 | 27 | 86 | 42 | 44 | null | null |
shepheb/go10c | Compiler.hs | bsd-3-clause | -- >= is < with the arguments swapped
compileExpr (BinOp (LOp "<=") left right) = compileComparisonOp IFG IFA "<=" swap left right | 130 | compileExpr (BinOp (LOp "<=") left right) = compileComparisonOp IFG IFA "<=" swap left right | 92 | compileExpr (BinOp (LOp "<=") left right) = compileComparisonOp IFG IFA "<=" swap left right | 92 | true | false | 0 | 9 | 21 | 39 | 19 | 20 | null | null |
dalaing/sdl2 | src/SDL/Raw/Event.hs | bsd-3-clause | joystickGetGUID :: MonadIO m => Joystick -> m JoystickGUID
joystickGetGUID joystick = liftIO . alloca $ \ptr -> do
joystickGetGUIDFFI joystick ptr
peek ptr
| 160 | joystickGetGUID :: MonadIO m => Joystick -> m JoystickGUID
joystickGetGUID joystick = liftIO . alloca $ \ptr -> do
joystickGetGUIDFFI joystick ptr
peek ptr
| 160 | joystickGetGUID joystick = liftIO . alloca $ \ptr -> do
joystickGetGUIDFFI joystick ptr
peek ptr
| 101 | false | true | 0 | 9 | 28 | 55 | 25 | 30 | null | null |
snoyberg/ghc | testsuite/tests/dependent/should_compile/dynamic-paper.hs | bsd-3-clause | fromDynamicMonad :: forall d. Typeable d => Dynamic -> Maybe d
fromDynamicMonad (Dyn ra x)
= do Refl <- eqT ra (typeRep :: TypeRep d)
return x | 154 | fromDynamicMonad :: forall d. Typeable d => Dynamic -> Maybe d
fromDynamicMonad (Dyn ra x)
= do Refl <- eqT ra (typeRep :: TypeRep d)
return x | 153 | fromDynamicMonad (Dyn ra x)
= do Refl <- eqT ra (typeRep :: TypeRep d)
return x | 90 | false | true | 0 | 10 | 38 | 68 | 32 | 36 | null | null |
pellagic-puffbomb/haskpy-dependency-graphs | src/DependencyGraph.hs | gpl-3.0 | sub :: String
sub = "//### EDGES ###//\n" | 41 | sub :: String
sub = "//### EDGES ###//\n" | 41 | sub = "//### EDGES ###//\n" | 27 | false | true | 0 | 6 | 7 | 18 | 7 | 11 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | defaultNetCustom :: String
defaultNetCustom = "" | 48 | defaultNetCustom :: String
defaultNetCustom = "" | 48 | defaultNetCustom = "" | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
michelk/bindings-saga-cmd.hs | src/sagaPipe.hs | gpl-3.0 | _PROGRAM_VERSION = "0.2" | 24 | _PROGRAM_VERSION = "0.2" | 24 | _PROGRAM_VERSION = "0.2" | 24 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
brendanhay/gogol | gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Backups/Operations/List.hs | mpl-2.0 | -- | V1 error format.
pibolXgafv :: Lens' ProjectsInstancesBackupsOperationsList (Maybe Xgafv)
pibolXgafv
= lens _pibolXgafv (\ s a -> s{_pibolXgafv = a}) | 156 | pibolXgafv :: Lens' ProjectsInstancesBackupsOperationsList (Maybe Xgafv)
pibolXgafv
= lens _pibolXgafv (\ s a -> s{_pibolXgafv = a}) | 134 | pibolXgafv
= lens _pibolXgafv (\ s a -> s{_pibolXgafv = a}) | 61 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
erochest/cabal-new | CabalNew/Opts.hs | apache-2.0 | readBackendOption :: Monad m => String -> m YesodBackend
readBackendOption backend = go $ map toLower backend
where go "s" = return Sqlite
go "p" = return Postgres
go "pf" = return PostFay
go "mongo" = return MongoDB
go "mysql" = return MySQL
go "sim... | 402 | readBackendOption :: Monad m => String -> m YesodBackend
readBackendOption backend = go $ map toLower backend
where go "s" = return Sqlite
go "p" = return Postgres
go "pf" = return PostFay
go "mongo" = return MongoDB
go "mysql" = return MySQL
go "sim... | 402 | readBackendOption backend = go $ map toLower backend
where go "s" = return Sqlite
go "p" = return Postgres
go "pf" = return PostFay
go "mongo" = return MongoDB
go "mysql" = return MySQL
go "simple" = return Simple
go _ = fail $ "Inva... | 345 | false | true | 0 | 8 | 144 | 121 | 56 | 65 | null | null |
ddssff/lens | src/Control/Lens/Traversal.hs | bsd-3-clause | --------------------------
-- Traversal Combinators
--------------------------
-- | Map each element of a structure targeted by a 'Lens' or 'Traversal',
-- evaluate these actions from left to right, and collect the results.
--
-- This function is only provided for consistency, 'id' is strictly more general.
--
-- >>> ... | 1,027 | traverseOf :: LensLike f s t a b -> (a -> f b) -> s -> f t
traverseOf = id | 74 | traverseOf = id | 15 | true | true | 0 | 9 | 238 | 80 | 56 | 24 | null | null |
zsol/visual-graphrewrite | GraphRewrite/Internal/Convert.hs | bsd-3-clause | -- | Converts a 'ParseResult' as returned by 'Language.Haskell.Parser' to our internal 'SimpModule' format. Returns an empty 'SimpModule' if the parse failed.
convParse :: ParseResult HsModule -> SimpModule String
convParse (ParseFailed loc err) = error $ "Parse of module failed at " ++ show loc ++ " with message: " ++... | 324 | convParse :: ParseResult HsModule -> SimpModule String
convParse (ParseFailed loc err) = error $ "Parse of module failed at " ++ show loc ++ " with message: " ++ err | 165 | convParse (ParseFailed loc err) = error $ "Parse of module failed at " ++ show loc ++ " with message: " ++ err | 110 | true | true | 0 | 8 | 51 | 52 | 25 | 27 | null | null |
kejace/ethereum-client-haskell | src/Blockchain/Data/Wire.hs | bsd-3-clause | numberToTerminationReason _ = error "numberToTerminationReasion called with unsupported number" | 95 | numberToTerminationReason _ = error "numberToTerminationReasion called with unsupported number" | 95 | numberToTerminationReason _ = error "numberToTerminationReasion called with unsupported number" | 95 | false | false | 0 | 5 | 8 | 12 | 5 | 7 | null | null |
MihaiVisu/HaskellStuff | tutorial6 week8/KeymapTree.hs | mit | -- Exercise 15
select :: Ord k => (a -> Bool) -> Keymap k a -> Keymap k a
select = undefined | 93 | select :: Ord k => (a -> Bool) -> Keymap k a -> Keymap k a
select = undefined | 77 | select = undefined | 18 | true | true | 0 | 8 | 22 | 44 | 22 | 22 | null | null |
AccelerateHS/accelerate-c | Data/Array/Accelerate/C/Exp.hs | bsd-3-clause | floorToC :: FloatingType a -> IntegralType b -> C.Exp -> C.Exp
floorToC ta tb x
= ccast (NumScalarType (IntegralNumType tb))
$ ccall (FloatingNumType ta `postfix` "floor") [x] | 179 | floorToC :: FloatingType a -> IntegralType b -> C.Exp -> C.Exp
floorToC ta tb x
= ccast (NumScalarType (IntegralNumType tb))
$ ccall (FloatingNumType ta `postfix` "floor") [x] | 179 | floorToC ta tb x
= ccast (NumScalarType (IntegralNumType tb))
$ ccall (FloatingNumType ta `postfix` "floor") [x] | 116 | false | true | 2 | 9 | 30 | 79 | 39 | 40 | null | null |
yesodweb/yesod | yesod/Yesod/Default/Config.hs | mit | parseArgConfig :: (Show env, Read env, Enum env, Bounded env) => IO (ArgConfig env)
parseArgConfig = do
let envs = [minBound..maxBound]
args <- getArgs
(portS, args') <- getPort id args
portI <-
case reads portS of
(i, _):_ -> return i
[] -> error $ "Invalid port value: "... | 1,390 | parseArgConfig :: (Show env, Read env, Enum env, Bounded env) => IO (ArgConfig env)
parseArgConfig = do
let envs = [minBound..maxBound]
args <- getArgs
(portS, args') <- getPort id args
portI <-
case reads portS of
(i, _):_ -> return i
[] -> error $ "Invalid port value: "... | 1,390 | parseArgConfig = do
let envs = [minBound..maxBound]
args <- getArgs
(portS, args') <- getPort id args
portI <-
case reads portS of
(i, _):_ -> return i
[] -> error $ "Invalid port value: " ++ show portS
case args' of
[e] -> do
case reads $ capitali... | 1,306 | false | true | 2 | 20 | 467 | 493 | 234 | 259 | null | null |
oldmanmike/sdl2 | src/SDL/Raw/Video.hs | bsd-3-clause | saveBMP :: MonadIO m => Ptr Surface -> CString -> m CInt
saveBMP surface file = liftIO $ do
rw <- withCString "wb" $ rwFromFile file
saveBMP_RW surface rw 1
| 161 | saveBMP :: MonadIO m => Ptr Surface -> CString -> m CInt
saveBMP surface file = liftIO $ do
rw <- withCString "wb" $ rwFromFile file
saveBMP_RW surface rw 1
| 161 | saveBMP surface file = liftIO $ do
rw <- withCString "wb" $ rwFromFile file
saveBMP_RW surface rw 1
| 104 | false | true | 0 | 10 | 34 | 72 | 31 | 41 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.