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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gabriel439/succinct | src/Succinct/Dictionary/Rank9.hs | bsd-2-clause | rank9WordBuilder :: G.Vector v Word64 => Builder Word64 (Rank9 v)
rank9WordBuilder = f <$> vector <*> r9Builder vector
where
f ws rs = Rank9 (G.length ws `shiftL` 6) ws rs
{-# INLINE f #-}
| 199 | rank9WordBuilder :: G.Vector v Word64 => Builder Word64 (Rank9 v)
rank9WordBuilder = f <$> vector <*> r9Builder vector
where
f ws rs = Rank9 (G.length ws `shiftL` 6) ws rs
{-# INLINE f #-}
| 199 | rank9WordBuilder = f <$> vector <*> r9Builder vector
where
f ws rs = Rank9 (G.length ws `shiftL` 6) ws rs
{-# INLINE f #-}
| 133 | false | true | 0 | 9 | 44 | 79 | 39 | 40 | null | null |
mightymoose/liquidhaskell | benchmarks/text-0.11.2.3/Data/Text/Lazy/Encoding.hs | bsd-3-clause | -- | Decode text from little endian UTF-16 encoding.
decodeUtf16LEWith :: OnDecodeError -> B.ByteString -> Text
decodeUtf16LEWith onErr bs = F.unstream (E.streamUtf16LE onErr bs) | 178 | decodeUtf16LEWith :: OnDecodeError -> B.ByteString -> Text
decodeUtf16LEWith onErr bs = F.unstream (E.streamUtf16LE onErr bs) | 125 | decodeUtf16LEWith onErr bs = F.unstream (E.streamUtf16LE onErr bs) | 66 | true | true | 0 | 8 | 23 | 42 | 21 | 21 | null | null |
narrative/stack | src/main/Main.hs | bsd-3-clause | munlockFile (Just lk) = liftIO $ unlockFile lk | 46 | munlockFile (Just lk) = liftIO $ unlockFile lk | 46 | munlockFile (Just lk) = liftIO $ unlockFile lk | 46 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
pbl64k/icfpc2016 | Ori/Geom.hs | mit | reflEnd :: Seg -> OState -> OState
reflEnd s (s1, (s2, end)) = (s1, (s2, fmap (fmap f) end))
where
f = reflectPt s
--tweak x = reflectPt (Seg (V2 0 1) (V2 (prime2%1) 0)) (reflectPt (Seg (V2 0 0) (V2 (prime1%1) 1)) x)
--tweak x = reflectPt (Seg (V2 0 1) (V2 (prime2%1) 0)) (reflectPt (Seg (V2 0 0) (V2 (prime... | 530 | reflEnd :: Seg -> OState -> OState
reflEnd s (s1, (s2, end)) = (s1, (s2, fmap (fmap f) end))
where
f = reflectPt s
--tweak x = reflectPt (Seg (V2 0 1) (V2 (prime2%1) 0)) (reflectPt (Seg (V2 0 0) (V2 (prime1%1) 1)) x)
--tweak x = reflectPt (Seg (V2 0 1) (V2 (prime2%1) 0)) (reflectPt (Seg (V2 0 0) (V2 (prime... | 530 | reflEnd s (s1, (s2, end)) = (s1, (s2, fmap (fmap f) end))
where
f = reflectPt s
--tweak x = reflectPt (Seg (V2 0 1) (V2 (prime2%1) 0)) (reflectPt (Seg (V2 0 0) (V2 (prime1%1) 1)) x)
--tweak x = reflectPt (Seg (V2 0 1) (V2 (prime2%1) 0)) (reflectPt (Seg (V2 0 0) (V2 (prime1%1) 1)) (reflectPt (Seg (V2 0 (5%1... | 495 | false | true | 0 | 9 | 112 | 73 | 41 | 32 | null | null |
gcampax/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | cmmIndex :: DynFlags
-> Width -- Width w
-> CmmExpr -- Address of vector of items of width w
-> Int -- Which element of the vector (0 based)
-> CmmExpr -- Address of i'th element
cmmIndex dflags width base idx = cmmOffset dflags base (idx * widthInBytes width) | 318 | cmmIndex :: DynFlags
-> Width -- Width w
-> CmmExpr -- Address of vector of items of width w
-> Int -- Which element of the vector (0 based)
-> CmmExpr
cmmIndex dflags width base idx = cmmOffset dflags base (idx * widthInBytes width) | 287 | cmmIndex dflags width base idx = cmmOffset dflags base (idx * widthInBytes width) | 81 | true | true | 0 | 10 | 106 | 62 | 31 | 31 | null | null |
mboes/dedukti | Dedukti/Parser/External.hs | gpl-3.0 | -- | Terms and types.
--
-- We first try to parse the term as a pi or lambda binding. If it fails,
-- we parse the rest as an applicative.
--
-- > term ::= domain term
-- > | applicative
term = (B <$> domain <*> term <%%> nann) <|> applicative | 250 | term = (B <$> domain <*> term <%%> nann) <|> applicative | 56 | term = (B <$> domain <*> term <%%> nann) <|> applicative | 56 | true | false | 0 | 9 | 59 | 32 | 20 | 12 | null | null |
jean-edouard/manager | updatemgr/UpdateMgr/Error.hs | gpl-2.0 | localE :: LocalErr -> UpdateMgrError
localE e = UpdateMgrError Nothing (Just e) | 79 | localE :: LocalErr -> UpdateMgrError
localE e = UpdateMgrError Nothing (Just e) | 79 | localE e = UpdateMgrError Nothing (Just e) | 42 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
lukexi/rumpus | util/ObjectArchive/Jacobs Tune/Tiles.hs | bsd-3-clause | tileCoords = [V2 x z | x <- ns, z <- ns] | 40 | tileCoords = [V2 x z | x <- ns, z <- ns] | 40 | tileCoords = [V2 x z | x <- ns, z <- ns] | 40 | false | false | 1 | 8 | 11 | 34 | 15 | 19 | null | null |
nevrenato/Hets_Fork | Comorphisms/SuleCFOL2SoftFOL.hs | gpl-2.0 | getDomElems :: SPTerm -> Result [SPTerm]
getDomElems trm = case trm of
SPQuantTerm SPForall [var] frm ->
mapM (\ t -> case t of
SPComplexTerm SPEqual [a1, a2]
| var == a1 -> return a2
| var == a2 -> return a1
_ -> fail $ "expecting equation with " ++ show var
++ ... | 451 | getDomElems :: SPTerm -> Result [SPTerm]
getDomElems trm = case trm of
SPQuantTerm SPForall [var] frm ->
mapM (\ t -> case t of
SPComplexTerm SPEqual [a1, a2]
| var == a1 -> return a2
| var == a2 -> return a1
_ -> fail $ "expecting equation with " ++ show var
++ ... | 451 | getDomElems trm = case trm of
SPQuantTerm SPForall [var] frm ->
mapM (\ t -> case t of
SPComplexTerm SPEqual [a1, a2]
| var == a1 -> return a2
| var == a2 -> return a1
_ -> fail $ "expecting equation with " ++ show var
++ ", got: " ++ showDoc t "") $ splitDisjs f... | 410 | false | true | 4 | 12 | 143 | 151 | 75 | 76 | null | null |
a-ford/notghc | NotGHC.hs | bsd-3-clause | -- ghc --show-options
showVersionMode, showNumVersionMode :: Mode
showVersionMode = mkPreStartupMode ShowVersion | 125 | showVersionMode, showNumVersionMode :: Mode
showVersionMode = mkPreStartupMode ShowVersion | 102 | showVersionMode = mkPreStartupMode ShowVersion | 58 | true | true | 2 | 6 | 23 | 27 | 11 | 16 | null | null |
brendanhay/gogol | gogol-cloudscheduler/gen/Network/Google/CloudScheduler/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'HTTPTarget' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'httptOAuthToken'
--
-- * 'httptHTTPMethod'
--
-- * 'httptOidcToken'
--
-- * 'httptBody'
--
-- * 'httptURI'
--
-- * 'httptHeaders'
hTTPTarget
:: H... | 543 | hTTPTarget
:: HTTPTarget
hTTPTarget =
HTTPTarget'
{ _httptOAuthToken = Nothing
, _httptHTTPMethod = Nothing
, _httptOidcToken = Nothing
, _httptBody = Nothing
, _httptURI = Nothing
, _httptHeaders = Nothing
} | 242 | hTTPTarget =
HTTPTarget'
{ _httptOAuthToken = Nothing
, _httptHTTPMethod = Nothing
, _httptOidcToken = Nothing
, _httptBody = Nothing
, _httptURI = Nothing
, _httptHeaders = Nothing
} | 213 | true | true | 0 | 7 | 118 | 74 | 48 | 26 | null | null |
brendanhay/gogol | gogol-alertcenter/gen/Network/Google/AlertCenter/Types/Product.hs | mpl-2.0 | -- | Required. The email of the user that this event belongs to.
awEmail :: Lens' AccountWarning (Maybe Text)
awEmail = lens _awEmail (\ s a -> s{_awEmail = a}) | 160 | awEmail :: Lens' AccountWarning (Maybe Text)
awEmail = lens _awEmail (\ s a -> s{_awEmail = a}) | 95 | awEmail = lens _awEmail (\ s a -> s{_awEmail = a}) | 50 | true | true | 0 | 9 | 29 | 46 | 25 | 21 | null | null |
AndrewRademacher/hasql-postgres | library/Hasql/Postgres/ErrorCode.hs | mit | -- * Class 27 — Triggered Data Change Violation
-------------------------
-- | Code \"27000\".
triggered_data_change_violation :: ErrorCode = "27000" | 171 | triggered_data_change_violation :: ErrorCode = "27000" | 75 | triggered_data_change_violation :: ErrorCode = "27000" | 75 | true | false | 0 | 5 | 40 | 14 | 8 | 6 | null | null |
vaibhavsagar/duffer.hs | duffer/src/Duffer/Loose/Parser.hs | bsd-3-clause | parseObject :: Parser GitObject
parseObject = choice
[ "blob" .*> (GitBlob <$> parseBlob)
, "tree" .*> (GitTree <$> parseTree)
, "commit" .*> (GitCommit <$> parseCommit)
, "tag" .*> (GitTag <$> parseTag)
] where (.*>) oType = (parseHeader oType *>) | 282 | parseObject :: Parser GitObject
parseObject = choice
[ "blob" .*> (GitBlob <$> parseBlob)
, "tree" .*> (GitTree <$> parseTree)
, "commit" .*> (GitCommit <$> parseCommit)
, "tag" .*> (GitTag <$> parseTag)
] where (.*>) oType = (parseHeader oType *>) | 282 | parseObject = choice
[ "blob" .*> (GitBlob <$> parseBlob)
, "tree" .*> (GitTree <$> parseTree)
, "commit" .*> (GitCommit <$> parseCommit)
, "tag" .*> (GitTag <$> parseTag)
] where (.*>) oType = (parseHeader oType *>) | 250 | false | true | 1 | 8 | 72 | 102 | 52 | 50 | null | null |
ndmitchell/nsis | src/Development/NSIS/Sugar.hs | bsd-3-clause | true = return $ Value [Literal "1"] | 35 | true = return $ Value [Literal "1"] | 35 | true = return $ Value [Literal "1"] | 35 | false | false | 3 | 7 | 6 | 23 | 9 | 14 | null | null |
a143753/AOJ | 0029.hs | apache-2.0 | merge (x:[]) = [x] | 18 | merge (x:[]) = [x] | 18 | merge (x:[]) = [x] | 18 | false | false | 0 | 8 | 3 | 21 | 11 | 10 | null | null |
fishtreesugar/laohuangli-hs | src/Data/Time/Calendar/Laohuangli.hs | bsd-3-clause | getTodayLaohuangli :: IO Laohuangli
getTodayLaohuangli = do
(y, m, d) <- getToday
w <- getDayOfWeek
numGood <- (+2) <$> modRandom 98 3
numBad <- (+2) <$> modRandom 87 3
let filteredActs = if isWeekend w then filter isWeekendAct activities else activities
randActs <- pickRandom filteredActs (numGood + numBa... | 553 | getTodayLaohuangli :: IO Laohuangli
getTodayLaohuangli = do
(y, m, d) <- getToday
w <- getDayOfWeek
numGood <- (+2) <$> modRandom 98 3
numBad <- (+2) <$> modRandom 87 3
let filteredActs = if isWeekend w then filter isWeekendAct activities else activities
randActs <- pickRandom filteredActs (numGood + numBa... | 553 | getTodayLaohuangli = do
(y, m, d) <- getToday
w <- getDayOfWeek
numGood <- (+2) <$> modRandom 98 3
numBad <- (+2) <$> modRandom 87 3
let filteredActs = if isWeekend w then filter isWeekendAct activities else activities
randActs <- pickRandom filteredActs (numGood + numBad)
dir <- getDirection
ds <- get... | 517 | false | true | 0 | 11 | 92 | 208 | 108 | 100 | null | null |
romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeSubnets.hs | mpl-2.0 | -- | One or more subnet IDs.
--
-- Default: Describes all your subnets.
dsSubnetIds :: Lens' DescribeSubnets [Text]
dsSubnetIds = lens _dsSubnetIds (\s a -> s { _dsSubnetIds = a }) . _List | 188 | dsSubnetIds :: Lens' DescribeSubnets [Text]
dsSubnetIds = lens _dsSubnetIds (\s a -> s { _dsSubnetIds = a }) . _List | 116 | dsSubnetIds = lens _dsSubnetIds (\s a -> s { _dsSubnetIds = a }) . _List | 72 | true | true | 0 | 10 | 33 | 49 | 28 | 21 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpOutOfLine NoDuplicateOp = True | 36 | primOpOutOfLine NoDuplicateOp = True | 36 | primOpOutOfLine NoDuplicateOp = True | 36 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
ehlemur/HLearn | src/HLearn/Data/SpaceTree/CoverTree.hs | bsd-3-clause | coverdist :: (QuotientField (Scalar dp) Int, Floating (Scalar dp)) =>
CoverTree_ exprat childC leafC dp -> Scalar dp
coverdist node = sepdist node*exprat_ | 159 | coverdist :: (QuotientField (Scalar dp) Int, Floating (Scalar dp)) =>
CoverTree_ exprat childC leafC dp -> Scalar dp
coverdist node = sepdist node*exprat_ | 159 | coverdist node = sepdist node*exprat_ | 37 | false | true | 0 | 8 | 27 | 66 | 32 | 34 | null | null |
spoqa/nirum | src/Nirum/Constructs/Annotation.hs | gpl-3.0 | empty :: AnnotationSet
empty = AnnotationSet { annotations = M.empty } | 70 | empty :: AnnotationSet
empty = AnnotationSet { annotations = M.empty } | 70 | empty = AnnotationSet { annotations = M.empty } | 47 | false | true | 0 | 7 | 10 | 21 | 12 | 9 | null | null |
atsukotakahashi/wi | src/library/Yi/Config/Simple.hs | gpl-2.0 | -- the putStrLn shouldn't be necessary, but it doesn't print anything
-- if it's not there...
isModeRegistered :: T.Text -> ConfigM Bool
isModeRegistered name =
any (\(AnyMode mode) -> modeName mode == name) <$> use modeTableA | 229 | isModeRegistered :: T.Text -> ConfigM Bool
isModeRegistered name =
any (\(AnyMode mode) -> modeName mode == name) <$> use modeTableA | 134 | isModeRegistered name =
any (\(AnyMode mode) -> modeName mode == name) <$> use modeTableA | 91 | true | true | 0 | 9 | 38 | 60 | 29 | 31 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_345 (124#) = happyShift action_104 | 41 | action_345 (124#) = happyShift action_104 | 41 | action_345 (124#) = happyShift action_104 | 41 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
Muzietto/transformerz | haskell/nilsson/TestNilsson_03.hs | mit | -- IntVal (4 + xxxx)
----------------------------
------------- RT + ET + WT + ST -----------------
testEval5dLiteral :: Test
testEval5dLiteral =
TestCase $ assertEqual "eval5d should evaluate a silly literal while updating state and filling the log"
((Just (IntVal 18), ["liter... | 371 | testEval5dLiteral :: Test
testEval5dLiteral =
TestCase $ assertEqual "eval5d should evaluate a silly literal while updating state and filling the log"
((Just (IntVal 18), ["literal"]), 1) (runEval5d Map.empty 0 $ eval5d (Lit 18)) | 265 | testEval5dLiteral =
TestCase $ assertEqual "eval5d should evaluate a silly literal while updating state and filling the log"
((Just (IntVal 18), ["literal"]), 1) (runEval5d Map.empty 0 $ eval5d (Lit 18)) | 239 | true | true | 0 | 11 | 89 | 72 | 39 | 33 | null | null |
keera-studios/hsQt | Qtc/Gui/QWidget.hs | bsd-2-clause | qchildrenRect :: QWidget a -> (()) -> IO (QRect ())
qchildrenRect x0 ()
= withQRectResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QWidget_childrenRect cobj_x0 | 165 | qchildrenRect :: QWidget a -> (()) -> IO (QRect ())
qchildrenRect x0 ()
= withQRectResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QWidget_childrenRect cobj_x0 | 165 | qchildrenRect x0 ()
= withQRectResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QWidget_childrenRect cobj_x0 | 113 | false | true | 0 | 10 | 32 | 68 | 32 | 36 | null | null |
jdiez17/HaskellHawk | IRC/Parser.hs | mit | parseLocation :: Parser String
parseLocation = many (noneOf " ") <* string " :" | 79 | parseLocation :: Parser String
parseLocation = many (noneOf " ") <* string " :" | 79 | parseLocation = many (noneOf " ") <* string " :" | 48 | false | true | 0 | 8 | 13 | 30 | 14 | 16 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110718set1ATLAS.hs | gpl-3.0 | sets :: [Int]
sets = [1] | 25 | sets :: [Int]
sets = [1] | 25 | sets = [1] | 11 | false | true | 0 | 5 | 6 | 17 | 10 | 7 | null | null |
michalkonecny/aern2 | aern2-mfun/src/AERN2/BoxFunMinMax/VarMap.hs | bsd-3-clause | -- |Intersect two varMaps
-- This assumes that both VarMaps have the same variables in the same order
intersectVarMap :: VarMap -> VarMap -> VarMap
intersectVarMap =
zipWith
(\(v, (l1, r1)) (_, (l2, r2)) ->
(v,
(
max l1 l2,
min r1 r2
)
)
) | 291 | intersectVarMap :: VarMap -> VarMap -> VarMap
intersectVarMap =
zipWith
(\(v, (l1, r1)) (_, (l2, r2)) ->
(v,
(
max l1 l2,
min r1 r2
)
)
) | 189 | intersectVarMap =
zipWith
(\(v, (l1, r1)) (_, (l2, r2)) ->
(v,
(
max l1 l2,
min r1 r2
)
)
) | 143 | true | true | 0 | 10 | 97 | 87 | 48 | 39 | null | null |
nicuveo/RCL | src/RCL/Response.hs | mit | extractCode j = parseJSON j | 27 | extractCode j = parseJSON j | 27 | extractCode j = parseJSON j | 27 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
termite2/debug | Debug/DbgTypes.hs | bsd-3-clause | -- Conjunction of state, next, label, and untracked relations
tranRel :: (Rel c v a s, ?m::c) => Model c a b d -> Transition a b d -> a
tranRel model tr = (sAbstract $ tranFrom tr)
.& (tranTo' model tr)
.& (tranUntracked tr)
.& (tranAbstractLabel tr) | 299 | tranRel :: (Rel c v a s, ?m::c) => Model c a b d -> Transition a b d -> a
tranRel model tr = (sAbstract $ tranFrom tr)
.& (tranTo' model tr)
.& (tranUntracked tr)
.& (tranAbstractLabel tr) | 237 | tranRel model tr = (sAbstract $ tranFrom tr)
.& (tranTo' model tr)
.& (tranUntracked tr)
.& (tranAbstractLabel tr) | 163 | true | true | 6 | 9 | 96 | 116 | 57 | 59 | null | null |
GallagherCommaJack/scheming-machine | ParserEvaluator.hs | gpl-3.0 | --eval env (List (Atom "defmacro" : List (Atom var : params) : body)) = makeNormalMacro env params body >>= defineVar env var
eval env (List (Atom "lambda" : List params : body)) = makeNormalFunc env params body | 211 | eval env (List (Atom "lambda" : List params : body)) = makeNormalFunc env params body | 85 | eval env (List (Atom "lambda" : List params : body)) = makeNormalFunc env params body | 85 | true | false | 0 | 10 | 36 | 44 | 20 | 24 | null | null |
zmeadows/zwerg | lib/Zwerg/Graphics/Brick/Builder.hs | mit | buildPortUI (ViewInventory m) = do
menuWidget <- buildMenuWidget
return $ [BC.vCenterLayer $ BC.hCenterLayer $ hLimit 40 $ BB.border $ menuWidget]
where focusedUUID = fst $ item $ focus m :: UUID
makeItemWidget :: (UUID, Bool) -> UIBuilder (BT.Widget ())
makeItemWidget (itemUUID, markedForDr... | 1,206 | buildPortUI (ViewInventory m) = do
menuWidget <- buildMenuWidget
return $ [BC.vCenterLayer $ BC.hCenterLayer $ hLimit 40 $ BB.border $ menuWidget]
where focusedUUID = fst $ item $ focus m :: UUID
makeItemWidget :: (UUID, Bool) -> UIBuilder (BT.Widget ())
makeItemWidget (itemUUID, markedForDr... | 1,206 | buildPortUI (ViewInventory m) = do
menuWidget <- buildMenuWidget
return $ [BC.vCenterLayer $ BC.hCenterLayer $ hLimit 40 $ BB.border $ menuWidget]
where focusedUUID = fst $ item $ focus m :: UUID
makeItemWidget :: (UUID, Bool) -> UIBuilder (BT.Widget ())
makeItemWidget (itemUUID, markedForDr... | 1,206 | false | false | 48 | 13 | 356 | 312 | 161 | 151 | null | null |
lambdas/haskell-jsend | src/Data/JSend.hs | bsd-3-clause | fail :: a -> Response Null a Null
fail = Fail | 45 | fail :: a -> Response Null a Null
fail = Fail | 45 | fail = Fail | 11 | false | true | 0 | 7 | 10 | 28 | 12 | 16 | null | null |
onponomarev/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | luxiDefRwto :: Int
luxiDefRwto = 180 | 36 | luxiDefRwto :: Int
luxiDefRwto = 180 | 36 | luxiDefRwto = 180 | 17 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
DanielWaterworth/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | {-!
deriving instance Binary SpecialName
deriving instance NFData SpecialName
!-}
sInstanceN :: Name -> [String] -> SpecialName
sInstanceN n ss = InstanceN n (map T.pack ss) | 174 | sInstanceN :: Name -> [String] -> SpecialName
sInstanceN n ss = InstanceN n (map T.pack ss) | 91 | sInstanceN n ss = InstanceN n (map T.pack ss) | 45 | true | true | 0 | 8 | 26 | 43 | 22 | 21 | null | null |
rhofour/rlglue-haskell-codec | src/RL_Glue/Network.hs | apache-2.0 | putTerminalRewardObs :: (Terminal, Reward, Observation) -> Put
putTerminalRewardObs (terminal, reward, Observation absType) = do
putWord32be (fromIntegral terminal)
putFloat64be reward
putAbstractType absType
-- Actually connect | 235 | putTerminalRewardObs :: (Terminal, Reward, Observation) -> Put
putTerminalRewardObs (terminal, reward, Observation absType) = do
putWord32be (fromIntegral terminal)
putFloat64be reward
putAbstractType absType
-- Actually connect | 235 | putTerminalRewardObs (terminal, reward, Observation absType) = do
putWord32be (fromIntegral terminal)
putFloat64be reward
putAbstractType absType
-- Actually connect | 172 | false | true | 0 | 9 | 30 | 64 | 32 | 32 | null | null |
gafiatulin/codewars | src/5 kyu/Peano.hs | mit | sub p1 Zero = p1 | 16 | sub p1 Zero = p1 | 16 | sub p1 Zero = p1 | 16 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
kmate/HaRe | old/testing/instantiate/Mod3AST.hs | bsd-3-clause | g = 42 | 6 | g = 42 | 6 | g = 42 | 6 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
ryzhyk/cocoon | cocoon/Boogie/Boogie.hs | apache-2.0 | mkFuncStatement ctx mset locals nxt (SLet _ _ n v) = mkFuncNext ctx mset locals' nxt
where locals' = M.insert n (mkAbstExpr ctx mset locals v) locals | 153 | mkFuncStatement ctx mset locals nxt (SLet _ _ n v) = mkFuncNext ctx mset locals' nxt
where locals' = M.insert n (mkAbstExpr ctx mset locals v) locals | 153 | mkFuncStatement ctx mset locals nxt (SLet _ _ n v) = mkFuncNext ctx mset locals' nxt
where locals' = M.insert n (mkAbstExpr ctx mset locals v) locals | 153 | false | false | 1 | 7 | 30 | 76 | 32 | 44 | null | null |
yav/alsa-haskell | Sound/Alsa/Error.hs | mit | checkResult_ :: Integral a => String -> a -> IO ()
checkResult_ f r = checkResult f r >> return () | 98 | checkResult_ :: Integral a => String -> a -> IO ()
checkResult_ f r = checkResult f r >> return () | 98 | checkResult_ f r = checkResult f r >> return () | 47 | false | true | 0 | 9 | 20 | 50 | 23 | 27 | null | null |
olsner/ghc | compiler/cmm/PprC.hs | bsd-3-clause | signedOp (MO_S_Neg _) = True | 32 | signedOp (MO_S_Neg _) = True | 32 | signedOp (MO_S_Neg _) = True | 32 | false | false | 0 | 7 | 8 | 15 | 7 | 8 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/sum_1.hs | mit | fromIntFloat :: MyInt -> Float
fromIntFloat = primIntToFloat | 62 | fromIntFloat :: MyInt -> Float
fromIntFloat = primIntToFloat | 62 | fromIntFloat = primIntToFloat | 29 | false | true | 0 | 7 | 9 | 22 | 9 | 13 | null | null |
nevrenato/Hets_Fork | Search/Common/Intersection.hs | gpl-2.0 | -- tmp!!!
takeJust :: [Maybe a] -> [a]
takeJust ((Just x):xs) = x:(takeJust xs) | 84 | takeJust :: [Maybe a] -> [a]
takeJust ((Just x):xs) = x:(takeJust xs) | 69 | takeJust ((Just x):xs) = x:(takeJust xs) | 40 | true | true | 2 | 11 | 18 | 59 | 28 | 31 | null | null |
lambda-llama/sized | src/Data/Sized/ByteString.hs | mit | length :: forall a. KnownNat a => SizedByteString a -> Int
length = const $ rep (Proxy :: Proxy a) | 98 | length :: forall a. KnownNat a => SizedByteString a -> Int
length = const $ rep (Proxy :: Proxy a) | 98 | length = const $ rep (Proxy :: Proxy a) | 39 | false | true | 2 | 9 | 19 | 53 | 24 | 29 | null | null |
Heather/clay | src/Clay/Size.hs | bsd-3-clause | -- | Size in vmax's (the larger of vw or vh).
vmax i = Size (value i <> "vmax") | 79 | vmax i = Size (value i <> "vmax") | 33 | vmax i = Size (value i <> "vmax") | 33 | true | false | 0 | 8 | 18 | 23 | 11 | 12 | null | null |
anttisalonen/freekick | haskell/addutil/Libaddutil/STMServer.hs | agpl-3.0 | clientLoop :: Handle -> TChan String -> IO ()
clientLoop handle chan =
listenLoop (hGetLine handle) chan
`catch` (\e -> putStrLn ("Error during listen: " ++ show (e :: IOException)))
`finally` hClose handle | 252 | clientLoop :: Handle -> TChan String -> IO ()
clientLoop handle chan =
listenLoop (hGetLine handle) chan
`catch` (\e -> putStrLn ("Error during listen: " ++ show (e :: IOException)))
`finally` hClose handle | 251 | clientLoop handle chan =
listenLoop (hGetLine handle) chan
`catch` (\e -> putStrLn ("Error during listen: " ++ show (e :: IOException)))
`finally` hClose handle | 205 | false | true | 0 | 13 | 78 | 85 | 44 | 41 | null | null |
aretoky/egison2 | hs-src/Language/Egison/Parser.hs | mit | parseValuePat :: Parser EgisonExpr
parseValuePat = do char ','
expr <- parseExpr
return $ ValuePatExpr expr | 145 | parseValuePat :: Parser EgisonExpr
parseValuePat = do char ','
expr <- parseExpr
return $ ValuePatExpr expr | 145 | parseValuePat = do char ','
expr <- parseExpr
return $ ValuePatExpr expr | 110 | false | true | 0 | 8 | 53 | 37 | 16 | 21 | null | null |
andrewthad/vinyl-vectors | src/Data/Vector/Vinyl/Default/NonEmpty/Tagged.hs | bsd-3-clause | -- | /O(n)/ Scan with strict accumulator
postscanl' :: (G.Vector (Vector k) (Rec (TaggedFunctor Identity) rs), G.Vector (Vector k) (Rec (TaggedFunctor Identity) ss))
=> (Rec (TaggedFunctor Identity) rs -> Rec (TaggedFunctor Identity) ss -> Rec (TaggedFunctor Identity) rs) -> Rec (TaggedFunctor Identity) rs -> (Vector... | 431 | postscanl' :: (G.Vector (Vector k) (Rec (TaggedFunctor Identity) rs), G.Vector (Vector k) (Rec (TaggedFunctor Identity) ss))
=> (Rec (TaggedFunctor Identity) rs -> Rec (TaggedFunctor Identity) ss -> Rec (TaggedFunctor Identity) rs) -> Rec (TaggedFunctor Identity) rs -> (Vector k) (Rec (TaggedFunctor Identity) ss) -> ... | 390 | postscanl' = G.postscanl' | 25 | true | true | 0 | 14 | 61 | 196 | 95 | 101 | null | null |
diku-dk/futhark | src/Futhark/Analysis/Interference.hs | isc | analyseExp ::
LocalScope GPUMem m =>
LastUseMap ->
InUse ->
Exp GPUMem ->
m (InUse, LastUsed, Graph VName)
analyseExp lumap inuse_outside expr =
case expr of
If _ then_body else_body _ -> do
res1 <- analyseBody lumap inuse_outside then_body
res2 <- analyseBody lumap inuse_outside else_body
... | 553 | analyseExp ::
LocalScope GPUMem m =>
LastUseMap ->
InUse ->
Exp GPUMem ->
m (InUse, LastUsed, Graph VName)
analyseExp lumap inuse_outside expr =
case expr of
If _ then_body else_body _ -> do
res1 <- analyseBody lumap inuse_outside then_body
res2 <- analyseBody lumap inuse_outside else_body
... | 553 | analyseExp lumap inuse_outside expr =
case expr of
If _ then_body else_body _ -> do
res1 <- analyseBody lumap inuse_outside then_body
res2 <- analyseBody lumap inuse_outside else_body
return $ res1 <> res2
DoLoop merge _ body ->
analyseLoopParams merge <$> analyseBody lumap inuse_outsi... | 436 | false | true | 0 | 12 | 139 | 186 | 85 | 101 | null | null |
sgillespie/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | shouldInlinePrimOp _ CopyMutableArrayArrayOp
[src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =
Just $ \ [] -> doCopyMutableArrayOp src src_off dst dst_off (fromInteger n) | 186 | shouldInlinePrimOp _ CopyMutableArrayArrayOp
[src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =
Just $ \ [] -> doCopyMutableArrayOp src src_off dst dst_off (fromInteger n) | 186 | shouldInlinePrimOp _ CopyMutableArrayArrayOp
[src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =
Just $ \ [] -> doCopyMutableArrayOp src src_off dst dst_off (fromInteger n) | 186 | false | false | 0 | 10 | 35 | 70 | 37 | 33 | null | null |
peterokagey/haskellOEIS | src/Miscellaneous/A318271.hs | apache-2.0 | -- A brute force approach.
-- It would be better if [1,1,1,1,...,1] didn't have so many redundant calculations.
minimumTime :: [Int] -> Int
minimumTime [] = 0 | 158 | minimumTime :: [Int] -> Int
minimumTime [] = 0 | 46 | minimumTime [] = 0 | 18 | true | true | 0 | 6 | 26 | 25 | 14 | 11 | null | null |
jamesdabbs/pi-base-2 | src/Actions.hs | bsd-3-clause | getSessionForToken :: Maybe AuthToken -> Action (Entity Session)
getSessionForToken mtoken = case mtoken of
Nothing -> halt $ err401 { errBody = "No token provided" }
Just tok -> do
-- TODO: verify that we _do_ start with `bearer `
msession <- runDB . getBy . UniqueToken . T.drop 7 . decodeUtf8 $ tok
c... | 550 | getSessionForToken :: Maybe AuthToken -> Action (Entity Session)
getSessionForToken mtoken = case mtoken of
Nothing -> halt $ err401 { errBody = "No token provided" }
Just tok -> do
-- TODO: verify that we _do_ start with `bearer `
msession <- runDB . getBy . UniqueToken . T.drop 7 . decodeUtf8 $ tok
c... | 550 | getSessionForToken mtoken = case mtoken of
Nothing -> halt $ err401 { errBody = "No token provided" }
Just tok -> do
-- TODO: verify that we _do_ start with `bearer `
msession <- runDB . getBy . UniqueToken . T.drop 7 . decodeUtf8 $ tok
case msession of
Nothing -> halt $ err403 { errBody = "Forbi... | 485 | false | true | 0 | 18 | 155 | 164 | 81 | 83 | null | null |
NorfairKing/the-notes | src/Statistics/Main.hs | gpl-2.0 | pointEstimateDefinition :: Note
pointEstimateDefinition = de $ do
lab pointEstimateDefinitionLabel
lab pointEstimatorDefinitionLabel
let x = ("X" !:)
n = "n"
s ["Let", m $ lst (x 1) (x n), "be", m n, independent, and, identicallyDistributed, randomVariables, "from some distribution", m df_]
... | 655 | pointEstimateDefinition :: Note
pointEstimateDefinition = de $ do
lab pointEstimateDefinitionLabel
lab pointEstimatorDefinitionLabel
let x = ("X" !:)
n = "n"
s ["Let", m $ lst (x 1) (x n), "be", m n, independent, and, identicallyDistributed, randomVariables, "from some distribution", m df_]
... | 655 | pointEstimateDefinition = de $ do
lab pointEstimateDefinitionLabel
lab pointEstimatorDefinitionLabel
let x = ("X" !:)
n = "n"
s ["Let", m $ lst (x 1) (x n), "be", m n, independent, and, identicallyDistributed, randomVariables, "from some distribution", m df_]
s ["A", pointEstimator', or, poi... | 623 | false | true | 0 | 13 | 143 | 276 | 143 | 133 | null | null |
swamp-agr/carbuyer-advisor | fay/TextAdvise.hs | mit | t2t4 :: (T.Text, T.Text) -> Fay (T.Text, T.Text, T.Text, T.Text)
t2t4 (a,b) = return (a,b,"","") | 96 | t2t4 :: (T.Text, T.Text) -> Fay (T.Text, T.Text, T.Text, T.Text)
t2t4 (a,b) = return (a,b,"","") | 96 | t2t4 (a,b) = return (a,b,"","") | 31 | false | true | 0 | 8 | 14 | 76 | 42 | 34 | null | null |
mainland/dph | dph-lifted-base/Data/Array/Parallel/PArray/Reference.hs | bsd-3-clause | - Conversions ----------------------------------------------------------------
-- | Convert a `Vector` to a `PArray`
fromVector :: Vector a -> PArray a
fromVector = id
| 168 | fromVector :: Vector a -> PArray a
fromVector = id | 50 | fromVector = id | 15 | true | true | 0 | 6 | 21 | 28 | 14 | 14 | null | null |
oden-lang/oden | test/Oden/Compiler/InstantiateSpec.hs | mit | missing :: Metadata SourceInfo
missing = Metadata Missing | 57 | missing :: Metadata SourceInfo
missing = Metadata Missing | 57 | missing = Metadata Missing | 26 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
bergmark/http2 | Network/HTTP2/Types.hs | bsd-3-clause | toFrameTypeId 8 = FrameWindowUpdate | 36 | toFrameTypeId 8 = FrameWindowUpdate | 36 | toFrameTypeId 8 = FrameWindowUpdate | 36 | false | false | 1 | 5 | 4 | 13 | 4 | 9 | null | null |
kim/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types.hs | mpl-2.0 | -- | The default value for the option group option.
ogosDefaultValue :: Lens' OptionGroupOptionSetting (Maybe Text)
ogosDefaultValue = lens _ogosDefaultValue (\s a -> s { _ogosDefaultValue = a }) | 195 | ogosDefaultValue :: Lens' OptionGroupOptionSetting (Maybe Text)
ogosDefaultValue = lens _ogosDefaultValue (\s a -> s { _ogosDefaultValue = a }) | 143 | ogosDefaultValue = lens _ogosDefaultValue (\s a -> s { _ogosDefaultValue = a }) | 79 | true | true | 1 | 9 | 28 | 51 | 25 | 26 | null | null |
sdiehl/ghc | testsuite/tests/profiling/should_run/T15897.hs | bsd-3-clause | main = do
[n] <- getArgs
replicateM (read n) (newIORef [1,2,3]) | 71 | main = do
[n] <- getArgs
replicateM (read n) (newIORef [1,2,3]) | 71 | main = do
[n] <- getArgs
replicateM (read n) (newIORef [1,2,3]) | 71 | false | false | 0 | 10 | 18 | 45 | 23 | 22 | null | null |
finlay/random-dist | test/Main.hs | bsd-3-clause | --import Test.Framework
main :: IO()
main = mainSlice | 54 | main :: IO()
main = mainSlice | 29 | main = mainSlice | 16 | true | true | 0 | 7 | 8 | 23 | 10 | 13 | null | null |
mudphone/ProgrammingInHaskell | src/Ch4.hs | bsd-3-clause | disj4 :: Bool -> Bool -> Bool
disj4 False b = b | 47 | disj4 :: Bool -> Bool -> Bool
disj4 False b = b | 47 | disj4 False b = b | 17 | false | true | 0 | 8 | 11 | 30 | 13 | 17 | null | null |
iemxblog/sivi-haskell | src/Sivi/GCode/Base.hs | gpl-2.0 | getGCode :: Machine m =>
CuttingParameters m -- Cutting parameters
-> Operation m GCode () -- ^ op : Operation to tun
-> GCode -- ^ Resulting GCode program
getGCode = runOperation | 271 | getGCode :: Machine m =>
CuttingParameters m -- Cutting parameters
-> Operation m GCode () -- ^ op : Operation to tun
-> GCode
getGCode = runOperation | 219 | getGCode = runOperation | 23 | true | true | 0 | 9 | 123 | 41 | 21 | 20 | null | null |
wavewave/hoodle-daemon | exe/Network.hs | gpl-2.0 | ipfind :: IO String
ipfind = do
let ipv4num (IPv4 x) = x
ismacnull (MAC a b c d e f) = a == 0 && b == 0 && c == 0
&& d == 0 && e == 0 && f == 0
ifcs <- getNetworkInterfaces
let ifcs2 = Prelude.filter (not . ismacnull . mac)
. Prel... | 451 | ipfind :: IO String
ipfind = do
let ipv4num (IPv4 x) = x
ismacnull (MAC a b c d e f) = a == 0 && b == 0 && c == 0
&& d == 0 && e == 0 && f == 0
ifcs <- getNetworkInterfaces
let ifcs2 = Prelude.filter (not . ismacnull . mac)
. Prel... | 451 | ipfind = do
let ipv4num (IPv4 x) = x
ismacnull (MAC a b c d e f) = a == 0 && b == 0 && c == 0
&& d == 0 && e == 0 && f == 0
ifcs <- getNetworkInterfaces
let ifcs2 = Prelude.filter (not . ismacnull . mac)
. Prelude.filter (((/=) 0)... | 431 | false | true | 0 | 20 | 175 | 200 | 99 | 101 | null | null |
ardumont/haskell-lab | test/BSTTests.hs | gpl-2.0 | testInserts :: Test
testInserts = TestList["testInsert1" ~: testInsert1,
"testInsert2" ~: testInsert2] | 125 | testInserts :: Test
testInserts = TestList["testInsert1" ~: testInsert1,
"testInsert2" ~: testInsert2] | 125 | testInserts = TestList["testInsert1" ~: testInsert1,
"testInsert2" ~: testInsert2] | 105 | false | true | 0 | 7 | 33 | 28 | 15 | 13 | null | null |
dagit/lin-alg | src/Numeric/LinearAlgebra/Vector.hs | bsd-3-clause | (<.>) :: (Num a, Vector v) => v a -> v a -> a -- dot product
v1 <.> v2 = vFold (+) (v1 <*> v2) | 94 | (<.>) :: (Num a, Vector v) => v a -> v a -> a
v1 <.> v2 = vFold (+) (v1 <*> v2) | 79 | v1 <.> v2 = vFold (+) (v1 <*> v2) | 33 | true | true | 0 | 10 | 25 | 69 | 34 | 35 | null | null |
quintenpalmer/fresh | haskell/src/Lexer/Lexer.hs | mit | get_token_type :: String -> TokenType
get_token_type current
| Literals.is_type_delimiter current = Tokens.Colon
| Literals.is_type current = Tokens.Type
| Literals.is_open_expression current = Tokens.LParen
| Literals.is_close_expression current = Tokens.RParen
| Literals.is_open_arguments current ... | 1,110 | get_token_type :: String -> TokenType
get_token_type current
| Literals.is_type_delimiter current = Tokens.Colon
| Literals.is_type current = Tokens.Type
| Literals.is_open_expression current = Tokens.LParen
| Literals.is_close_expression current = Tokens.RParen
| Literals.is_open_arguments current ... | 1,110 | get_token_type current
| Literals.is_type_delimiter current = Tokens.Colon
| Literals.is_type current = Tokens.Type
| Literals.is_open_expression current = Tokens.LParen
| Literals.is_close_expression current = Tokens.RParen
| Literals.is_open_arguments current = Tokens.LBracket
| Literals.is_cl... | 1,072 | false | true | 0 | 9 | 169 | 298 | 131 | 167 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | validStorageOperations :: Map String (FrozenSet String)
validStorageOperations =
Map.fromList [(Types.storageTypeToRaw StorageLvmVg,
ConstantUtils.mkSet [soFixConsistency])] | 192 | validStorageOperations :: Map String (FrozenSet String)
validStorageOperations =
Map.fromList [(Types.storageTypeToRaw StorageLvmVg,
ConstantUtils.mkSet [soFixConsistency])] | 192 | validStorageOperations =
Map.fromList [(Types.storageTypeToRaw StorageLvmVg,
ConstantUtils.mkSet [soFixConsistency])] | 136 | false | true | 0 | 9 | 31 | 49 | 25 | 24 | null | null |
NorfairKing/haphviz | src/Text/Dot/Attributes/Arrows.hs | mit | normal :: AttributeValue
normal = "normal" | 42 | normal :: AttributeValue
normal = "normal" | 42 | normal = "normal" | 17 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
enolan/emp-pl-site | test/TestImport.hs | agpl-3.0 | withServerM :: ReaderT (TestApp App) WD a -> IO a
withServerM test = do
-- Set IP target
ip <- takeWhile (/='\n') <$> readProcess "hostname" ["-i"] ""
man <- newManager defaultManagerSettings
res <- runClientM (client (Proxy :: Proxy HostnameApi) (pack ip)) $ ClientEnv man $ BaseUrl Http "selenium" 31337 ""
c... | 1,208 | withServerM :: ReaderT (TestApp App) WD a -> IO a
withServerM test = do
-- Set IP target
ip <- takeWhile (/='\n') <$> readProcess "hostname" ["-i"] ""
man <- newManager defaultManagerSettings
res <- runClientM (client (Proxy :: Proxy HostnameApi) (pack ip)) $ ClientEnv man $ BaseUrl Http "selenium" 31337 ""
c... | 1,208 | withServerM test = do
-- Set IP target
ip <- takeWhile (/='\n') <$> readProcess "hostname" ["-i"] ""
man <- newManager defaultManagerSettings
res <- runClientM (client (Proxy :: Proxy HostnameApi) (pack ip)) $ ClientEnv man $ BaseUrl Http "selenium" 31337 ""
case res of
Left ex -> fail $ show ex
Right... | 1,158 | false | true | 3 | 19 | 291 | 348 | 162 | 186 | null | null |
gamebytes/helm | src/FRP/Helm/Transition.hs | mit | {-| Given an animation, a function is created which loops the time of the animation
to always be in the animations length boundary. -}
cycleTime :: InternalTransition a -> Time -> Time
cycleTime [] = const 0 | 211 | cycleTime :: InternalTransition a -> Time -> Time
cycleTime [] = const 0 | 72 | cycleTime [] = const 0 | 22 | true | true | 0 | 9 | 40 | 37 | 16 | 21 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/BassFlute.hs | bsd-3-clause | note12 :: Note
note12 = Note
(Pitch 261.626 48 "c4")
13
(Range
(NoteRange
(NoteRangeAmplitude 9680.16 37 9.0e-2)
(NoteRangeHarmonicFreq 1 261.62))
(NoteRange
(NoteRangeAmplitude 261.62 1 6268.0)
(NoteRangeHarmonicFreq 38 9941.78)))
[Harmoni... | 1,408 | note12 :: Note
note12 = Note
(Pitch 261.626 48 "c4")
13
(Range
(NoteRange
(NoteRangeAmplitude 9680.16 37 9.0e-2)
(NoteRangeHarmonicFreq 1 261.62))
(NoteRange
(NoteRangeAmplitude 261.62 1 6268.0)
(NoteRangeHarmonicFreq 38 9941.78)))
[Harmoni... | 1,408 | note12 = Note
(Pitch 261.626 48 "c4")
13
(Range
(NoteRange
(NoteRangeAmplitude 9680.16 37 9.0e-2)
(NoteRangeHarmonicFreq 1 261.62))
(NoteRange
(NoteRangeAmplitude 261.62 1 6268.0)
(NoteRangeHarmonicFreq 38 9941.78)))
[Harmonic 1 1.533 6268.... | 1,393 | false | true | 0 | 10 | 407 | 534 | 269 | 265 | null | null |
nakaji-dayo/persistent | persistent-sqlite/Database/Persist/Sqlite.hs | mit | withSqliteConn :: (MonadBaseControl IO m, MonadIO m, MonadLogger m)
=> Text -> (SqlBackend -> m a) -> m a
withSqliteConn = withSqlConn . open' | 157 | withSqliteConn :: (MonadBaseControl IO m, MonadIO m, MonadLogger m)
=> Text -> (SqlBackend -> m a) -> m a
withSqliteConn = withSqlConn . open' | 157 | withSqliteConn = withSqlConn . open' | 36 | false | true | 0 | 10 | 38 | 59 | 30 | 29 | null | null |
xkollar/handy-haskell | other/pt-2012-03/graph/kwak.hs | gpl-3.0 | magic :: [(Int, Int)] -> Graphic
magic es = overGraphics $ map (drawSq . anotater f) grid where
typeExplicit = es :: [(Int,Int)]
grid = [(x,y)| y <- [ymin..ymax], x <- [xmin..xmax]]
xmin = minimum xs
xmax = maximum xs
ymin = minimum ys
ymax = maximum ys
xs = map fst aes
ys = map snd aes
... | 1,027 | magic :: [(Int, Int)] -> Graphic
magic es = overGraphics $ map (drawSq . anotater f) grid where
typeExplicit = es :: [(Int,Int)]
grid = [(x,y)| y <- [ymin..ymax], x <- [xmin..xmax]]
xmin = minimum xs
xmax = maximum xs
ymin = minimum ys
ymax = maximum ys
xs = map fst aes
ys = map snd aes
... | 1,027 | magic es = overGraphics $ map (drawSq . anotater f) grid where
typeExplicit = es :: [(Int,Int)]
grid = [(x,y)| y <- [ymin..ymax], x <- [xmin..xmax]]
xmin = minimum xs
xmax = maximum xs
ymin = minimum ys
ymax = maximum ys
xs = map fst aes
ys = map snd aes
aes = allEdges es
f t@(x,... | 994 | false | true | 0 | 14 | 317 | 445 | 237 | 208 | null | null |
Persi/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | prop_readIfClause4 = isWarning readIfClause "if false; then true; else if true; then echo lol; fi" | 98 | prop_readIfClause4 = isWarning readIfClause "if false; then true; else if true; then echo lol; fi" | 98 | prop_readIfClause4 = isWarning readIfClause "if false; then true; else if true; then echo lol; fi" | 98 | false | false | 0 | 5 | 14 | 11 | 5 | 6 | null | null |
3noch/nestify | nestify-cli/CovenantEyes/Nestify/CLI.hs | mit | go :: CmdOptions -> IO ()
go (CmdOptions delim) = interact $ unlines . (intercalate delim <$>) . nestifyStr . (splitOn delim <$>) . lines | 138 | go :: CmdOptions -> IO ()
go (CmdOptions delim) = interact $ unlines . (intercalate delim <$>) . nestifyStr . (splitOn delim <$>) . lines | 137 | go (CmdOptions delim) = interact $ unlines . (intercalate delim <$>) . nestifyStr . (splitOn delim <$>) . lines | 111 | false | true | 0 | 10 | 25 | 67 | 33 | 34 | null | null |
DanielWaterworth/Idris-dev | src/Idris/REPLParser.hs | bsd-3-clause | colours :: [(String, Maybe Color)]
colours = [ ("black", Just Black)
, ("red", Just Red)
, ("green", Just Green)
, ("yellow", Just Yellow)
, ("blue", Just Blue)
, ("magenta", Just Magenta)
, ("cyan", Just Cyan)
, ("white", Just White)
, ("d... | 349 | colours :: [(String, Maybe Color)]
colours = [ ("black", Just Black)
, ("red", Just Red)
, ("green", Just Green)
, ("yellow", Just Yellow)
, ("blue", Just Blue)
, ("magenta", Just Magenta)
, ("cyan", Just Cyan)
, ("white", Just White)
, ("d... | 349 | colours = [ ("black", Just Black)
, ("red", Just Red)
, ("green", Just Green)
, ("yellow", Just Yellow)
, ("blue", Just Blue)
, ("magenta", Just Magenta)
, ("cyan", Just Cyan)
, ("white", Just White)
, ("default", Nothing)
] | 314 | false | true | 2 | 7 | 132 | 134 | 75 | 59 | null | null |
GaloisInc/haskell-tor | test/Test/TorCell.hs | bsd-3-clause | prop_DestroyReasonSerial1 :: DestroyReason -> Bool
prop_DestroyReasonSerial1 = serialProp getDestroyReason putDestroyReason | 123 | prop_DestroyReasonSerial1 :: DestroyReason -> Bool
prop_DestroyReasonSerial1 = serialProp getDestroyReason putDestroyReason | 123 | prop_DestroyReasonSerial1 = serialProp getDestroyReason putDestroyReason | 72 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
reenberg/XMonadContrib | XMonad/Hooks/UrgencyHook.hs | bsd-3-clause | -- The Non-ICCCM Manifesto:
-- Note: Some non-standard choices have been made in this implementation to
-- account for the fact that things are different in a tiling window manager:
-- 1. In normal window managers, windows may overlap, so clients wait for focus to
-- be set before urgency is cleared. In a tiling... | 1,688 | handleEvent :: UrgencyHook h => WithUrgencyHook h -> Event -> X ()
handleEvent wuh event =
case event of
PropertyEvent { ev_event_type = t, ev_atom = a, ev_window = w } -> do
when (t == propertyNotify && a == wM_HINTS) $ withDisplay $ \dpy -> do
WMHints { wmh_flags = flags } <- io $ ge... | 845 | handleEvent wuh event =
case event of
PropertyEvent { ev_event_type = t, ev_atom = a, ev_window = w } -> do
when (t == propertyNotify && a == wM_HINTS) $ withDisplay $ \dpy -> do
WMHints { wmh_flags = flags } <- io $ getWMHints dpy w
if (testBit flags urgencyHintBit) then... | 778 | true | true | 0 | 21 | 456 | 285 | 146 | 139 | null | null |
Fermat/Gottlob | Language/ProofChecking.hs | bsd-3-clause | comp b (In m1 (TApp s1 s2)) s = do
r <- comp b (TApp s1 s2) s
return $ In m1 r | 82 | comp b (In m1 (TApp s1 s2)) s = do
r <- comp b (TApp s1 s2) s
return $ In m1 r | 82 | comp b (In m1 (TApp s1 s2)) s = do
r <- comp b (TApp s1 s2) s
return $ In m1 r | 82 | false | false | 0 | 10 | 26 | 63 | 29 | 34 | null | null |
etarasov/iptadmin | src/IptAdmin/EditChainPage.hs | bsd-3-clause | pageHandlers :: IptAdmin Response
pageHandlers = msum [ methodSP GET pageHandlerGet
, methodSP POST pageHandlerPost
] | 157 | pageHandlers :: IptAdmin Response
pageHandlers = msum [ methodSP GET pageHandlerGet
, methodSP POST pageHandlerPost
] | 157 | pageHandlers = msum [ methodSP GET pageHandlerGet
, methodSP POST pageHandlerPost
] | 123 | false | true | 0 | 7 | 55 | 33 | 16 | 17 | null | null |
ezyang/ghc | libraries/base/Text/Printf.hs | bsd-3-clause | uprintfs ('%':'%':cs) us = ('%' :) . uprintfs cs us | 53 | uprintfs ('%':'%':cs) us = ('%' :) . uprintfs cs us | 53 | uprintfs ('%':'%':cs) us = ('%' :) . uprintfs cs us | 53 | false | false | 0 | 7 | 11 | 36 | 18 | 18 | null | null |
polarina/sdl2 | Graphics/UI/SDL/Event.hs | bsd-3-clause | gameControllerGetButtonFromString :: MonadIO m => CString -> m GameControllerButton
gameControllerGetButtonFromString v1 = liftIO $ gameControllerGetButtonFromString' v1 | 169 | gameControllerGetButtonFromString :: MonadIO m => CString -> m GameControllerButton
gameControllerGetButtonFromString v1 = liftIO $ gameControllerGetButtonFromString' v1 | 169 | gameControllerGetButtonFromString v1 = liftIO $ gameControllerGetButtonFromString' v1 | 85 | false | true | 0 | 7 | 15 | 35 | 16 | 19 | null | null |
dsj36/dropray | src/Core/Geometry.hs | gpl-3.0 | getVectorEntry Y (Vector _ y _) = y | 35 | getVectorEntry Y (Vector _ y _) = y | 35 | getVectorEntry Y (Vector _ y _) = y | 35 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
fpco/primitive | Data/Primitive/Internal/Compat.hs | bsd-3-clause | isTrue# :: Bool -> Bool
isTrue# b = b | 37 | isTrue# :: Bool -> Bool
isTrue# b = b | 37 | isTrue# b = b | 13 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
choener/GrammarProducts | old/MultiAlign.hs | gpl-3.0 | main :: IO ()
main = return () | 30 | main :: IO ()
main = return () | 30 | main = return () | 16 | false | true | 0 | 6 | 7 | 21 | 10 | 11 | null | null |
gcampax/ghc | compiler/main/HscTypes.hs | bsd-3-clause | noVectInfo :: VectInfo
noVectInfo
= VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyVarSet emptyNameSet | 109 | noVectInfo :: VectInfo
noVectInfo
= VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyVarSet emptyNameSet | 109 | noVectInfo
= VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyVarSet emptyNameSet | 86 | false | true | 0 | 6 | 12 | 25 | 11 | 14 | null | null |
travitch/language-python-builder | src/Language/Python/Common/Builder.hs | bsd-3-clause | iterForAC :: annot -> CompForQ annot -> CompIterQ annot
iterForAC annot iterFor = do
iterFor' <- iterFor
return $ IterFor iterFor' annot | 140 | iterForAC :: annot -> CompForQ annot -> CompIterQ annot
iterForAC annot iterFor = do
iterFor' <- iterFor
return $ IterFor iterFor' annot | 140 | iterForAC annot iterFor = do
iterFor' <- iterFor
return $ IterFor iterFor' annot | 84 | false | true | 0 | 8 | 25 | 49 | 22 | 27 | null | null |
ntc2/cryptol | src/Cryptol/REPL/Monad.hs | bsd-3-clause | getRW :: REPL RW
getRW = REPL readIORef | 40 | getRW :: REPL RW
getRW = REPL readIORef | 40 | getRW = REPL readIORef | 23 | false | true | 0 | 6 | 8 | 23 | 9 | 14 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | syslogNo :: String
syslogNo = Logging.syslogUsageToRaw SyslogNo | 63 | syslogNo :: String
syslogNo = Logging.syslogUsageToRaw SyslogNo | 63 | syslogNo = Logging.syslogUsageToRaw SyslogNo | 44 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
tarleb/rundoc | src/Metropolis/Worker.hs | agpl-3.0 | rWorker :: MetropolisWorker
rWorker _ src =
runCommandWithInput "R" ["--vanilla", "--slave", "--no-readline"] src | 115 | rWorker :: MetropolisWorker
rWorker _ src =
runCommandWithInput "R" ["--vanilla", "--slave", "--no-readline"] src | 115 | rWorker _ src =
runCommandWithInput "R" ["--vanilla", "--slave", "--no-readline"] src | 87 | false | true | 0 | 6 | 14 | 32 | 17 | 15 | null | null |
tpsinnem/Idris-dev | src/Idris/ElabDecls.hs | bsd-3-clause | elabDecl' what info d@(PClauses f o n ps)
| what /= ETypes
= do logElab 1 $ "Elaborating clause " ++ show n
i <- getIState -- get the type options too
let o' = case lookupCtxt n (idris_flags i) of
[fs] -> fs
[] -> []
elabClauses info f (o ++ o') n... | 323 | elabDecl' what info d@(PClauses f o n ps)
| what /= ETypes
= do logElab 1 $ "Elaborating clause " ++ show n
i <- getIState -- get the type options too
let o' = case lookupCtxt n (idris_flags i) of
[fs] -> fs
[] -> []
elabClauses info f (o ++ o') n... | 323 | elabDecl' what info d@(PClauses f o n ps)
| what /= ETypes
= do logElab 1 $ "Elaborating clause " ++ show n
i <- getIState -- get the type options too
let o' = case lookupCtxt n (idris_flags i) of
[fs] -> fs
[] -> []
elabClauses info f (o ++ o') n... | 323 | false | false | 0 | 15 | 127 | 135 | 61 | 74 | null | null |
bgamari/text | tests/Tests/Properties.hs | bsd-2-clause | t_utf32BE = forAll genUnicode $ (E.decodeUtf32BE . E.encodeUtf32BE) `eq` id | 78 | t_utf32BE = forAll genUnicode $ (E.decodeUtf32BE . E.encodeUtf32BE) `eq` id | 78 | t_utf32BE = forAll genUnicode $ (E.decodeUtf32BE . E.encodeUtf32BE) `eq` id | 78 | false | false | 0 | 9 | 12 | 30 | 16 | 14 | null | null |
gabluc/CIS194-Solutions | src/Homework5/Calc.hs | bsd-3-clause | eval (Mul a b) = eval a * eval b | 32 | eval (Mul a b) = eval a * eval b | 32 | eval (Mul a b) = eval a * eval b | 32 | false | false | 0 | 7 | 9 | 27 | 12 | 15 | null | null |
capitanbatata/sandbox | rank-n-polymorphism/src/ScottVsChurchEncoding.hs | gpl-3.0 | consC :: a -> ListC a -> ListC a
consC x fas = ListC $ \co ni -> (foldC fas) co (co x ni) | 89 | consC :: a -> ListC a -> ListC a
consC x fas = ListC $ \co ni -> (foldC fas) co (co x ni) | 89 | consC x fas = ListC $ \co ni -> (foldC fas) co (co x ni) | 56 | false | true | 0 | 9 | 23 | 60 | 29 | 31 | null | null |
sdiehl/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | eqHsBang _ _ = False | 58 | eqHsBang _ _ = False | 58 | eqHsBang _ _ = False | 58 | false | false | 0 | 5 | 42 | 11 | 5 | 6 | null | null |
ssbl/bf-interpreter | Main.hs | mit | main = do
(file : _) <- getArgs
contents <- readFile file
run $ filter (`elem` "<>,.-+[]") contents | 105 | main = do
(file : _) <- getArgs
contents <- readFile file
run $ filter (`elem` "<>,.-+[]") contents | 105 | main = do
(file : _) <- getArgs
contents <- readFile file
run $ filter (`elem` "<>,.-+[]") contents | 105 | false | false | 0 | 9 | 23 | 48 | 24 | 24 | null | null |
shlevy/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | isIdHsWrapper _ = False | 28 | isIdHsWrapper _ = False | 28 | isIdHsWrapper _ = False | 28 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
decomputed/euler | src/Numeric/Euler/Primes.hs | apache-2.0 | {-------------------------------------------------
-------------------------------------------------}
initialSundaramSieve :: Int -> [Int]
initialSundaramSieve limit =
let topi = floor (sqrt (fromIntegral limit / 2) :: Double) in
[i + j + 2 * i * j | i <- [1..topi],
j <- [i..floor ((fromIntegral(limit-i) / from... | 349 | initialSundaramSieve :: Int -> [Int]
initialSundaramSieve limit =
let topi = floor (sqrt (fromIntegral limit / 2) :: Double) in
[i + j + 2 * i * j | i <- [1..topi],
j <- [i..floor ((fromIntegral(limit-i) / fromIntegral(2*i+1)) :: Double)]] | 246 | initialSundaramSieve limit =
let topi = floor (sqrt (fromIntegral limit / 2) :: Double) in
[i + j + 2 * i * j | i <- [1..topi],
j <- [i..floor ((fromIntegral(limit-i) / fromIntegral(2*i+1)) :: Double)]] | 209 | true | true | 0 | 18 | 50 | 140 | 73 | 67 | null | null |
atsukotakahashi/wi | src/library/Yi/Buffer/HighLevel.hs | gpl-2.0 | -- | Get the previous point, unless at the beginning of the file
prevPointB :: BufferM Point
prevPointB = do
sof <- atSof
if sof then pointB
else do p <- pointB
return $ Point (fromPoint p - 1)
-- | Get the next point, unless at the end of the file | 279 | prevPointB :: BufferM Point
prevPointB = do
sof <- atSof
if sof then pointB
else do p <- pointB
return $ Point (fromPoint p - 1)
-- | Get the next point, unless at the end of the file | 214 | prevPointB = do
sof <- atSof
if sof then pointB
else do p <- pointB
return $ Point (fromPoint p - 1)
-- | Get the next point, unless at the end of the file | 186 | true | true | 0 | 14 | 82 | 61 | 30 | 31 | null | null |
4ZP6Capstone2015/ampersand | src/Database/Design/Ampersand/FSpec/ShowMeatGrinder.hs | gpl-3.0 | isFrontEndInvariant :: Rule -> Bool
isFrontEndInvariant r = not (isSignal r) && not (ruleIsInvariantUniOrInj r) | 111 | isFrontEndInvariant :: Rule -> Bool
isFrontEndInvariant r = not (isSignal r) && not (ruleIsInvariantUniOrInj r) | 111 | isFrontEndInvariant r = not (isSignal r) && not (ruleIsInvariantUniOrInj r) | 75 | false | true | 0 | 8 | 14 | 40 | 19 | 21 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.