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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
damoxc/ganeti
|
src/Ganeti/OpCodes.hs
|
gpl-2.0
|
opSummaryVal OpNodeRemove { opNodeName = s } = Just (fromNonEmpty s)
| 68
|
opSummaryVal OpNodeRemove { opNodeName = s } = Just (fromNonEmpty s)
| 68
|
opSummaryVal OpNodeRemove { opNodeName = s } = Just (fromNonEmpty s)
| 68
| false
| false
| 0
| 8
| 10
| 27
| 13
| 14
| null | null |
opentower/carnap
|
Carnap/src/Carnap/Languages/PureFirstOrder/Logic/OpenLogic.hs
|
gpl-3.0
|
openLogicFONKCalc :: TableauCalc PureLexiconFOL (Form Bool) (OpenLogicFONK PureLexiconFOL)
openLogicFONKCalc = mkTBCalc
{ tbParseForm = thomasBolducAndZachFOL2019FormulaParser
, tbParseRule = parseOpenLogicFONK
, tbNotation = dropOuterParens
}
| 260
|
openLogicFONKCalc :: TableauCalc PureLexiconFOL (Form Bool) (OpenLogicFONK PureLexiconFOL)
openLogicFONKCalc = mkTBCalc
{ tbParseForm = thomasBolducAndZachFOL2019FormulaParser
, tbParseRule = parseOpenLogicFONK
, tbNotation = dropOuterParens
}
| 259
|
openLogicFONKCalc = mkTBCalc
{ tbParseForm = thomasBolducAndZachFOL2019FormulaParser
, tbParseRule = parseOpenLogicFONK
, tbNotation = dropOuterParens
}
| 168
| false
| true
| 0
| 7
| 40
| 54
| 29
| 25
| null | null |
rcobbe/language-tools
|
lib/LT/Text.hs
|
apache-2.0
|
fromString :: String -> Text
fromString = Text . T.pack
| 55
|
fromString :: String -> Text
fromString = Text . T.pack
| 55
|
fromString = Text . T.pack
| 26
| false
| true
| 1
| 7
| 9
| 29
| 12
| 17
| null | null |
fhsjaagshs/niagra
|
src/Data/Niagra/Builder/Buffer.hs
|
mit
|
{- Buffer Operations -}
-- |Shrink a buffer to its length.
shrinkBuffer :: PrimMonad m
=> Buffer (PrimState m)
-> m (Buffer (PrimState m))
shrinkBuffer b@(Buffer _ _ 0#) = return b
| 207
|
shrinkBuffer :: PrimMonad m
=> Buffer (PrimState m)
-> m (Buffer (PrimState m))
shrinkBuffer b@(Buffer _ _ 0#) = return b
| 147
|
shrinkBuffer b@(Buffer _ _ 0#) = return b
| 41
| true
| true
| 0
| 11
| 58
| 67
| 33
| 34
| null | null |
atomb/dalvik
|
Dexdumper.hs
|
bsd-3-clause
|
main :: IO ()
main = mapM_ processFile =<< getArgs
| 50
|
main :: IO ()
main = mapM_ processFile =<< getArgs
| 50
|
main = mapM_ processFile =<< getArgs
| 36
| false
| true
| 0
| 7
| 9
| 28
| 12
| 16
| null | null |
gregorias/pixelosolver
|
src/PixeloSolver/AI/OCR.hs
|
bsd-3-clause
|
-- | Given dimenstions and images of hints it merges hints that might represent
-- the same number based on NumberTolerances
mergeHints :: NumberTolerances -> [((Int, Int), a)] -> [[a]]
mergeHints _ [] = []
| 206
|
mergeHints :: NumberTolerances -> [((Int, Int), a)] -> [[a]]
mergeHints _ [] = []
| 81
|
mergeHints _ [] = []
| 20
| true
| true
| 0
| 10
| 34
| 57
| 31
| 26
| null | null |
danr/hipspec
|
testsuite/prod/zeno_version/PropT21.hs
|
gpl-3.0
|
rotate :: Nat -> [a] -> [a]
rotate Z xs = xs
| 44
|
rotate :: Nat -> [a] -> [a]
rotate Z xs = xs
| 44
|
rotate Z xs = xs
| 16
| false
| true
| 0
| 7
| 11
| 30
| 16
| 14
| null | null |
google/hs-niche-containers
|
rle/src/Data/RLE.hs
|
apache-2.0
|
fromList :: Eq a => [a] -> RLE a
fromList = foldr cons empty
| 60
|
fromList :: Eq a => [a] -> RLE a
fromList = foldr cons empty
| 60
|
fromList = foldr cons empty
| 27
| false
| true
| 0
| 7
| 13
| 33
| 16
| 17
| null | null |
dstruthers/Agate_old
|
Types.hs
|
mit
|
isList :: Expr -> Bool
isList Null = True
| 48
|
isList :: Expr -> Bool
isList Null = True
| 48
|
isList Null = True
| 25
| false
| true
| 0
| 5
| 15
| 18
| 9
| 9
| null | null |
gbwey/persistentold
|
persistent/Database/Persist/Sql/Migration.hs
|
mit
|
printMigration :: MonadIO m => Migration m -> m ()
printMigration m = do
mig <- parseMigration' m
mapM_ (liftIO . Data.Text.IO.putStrLn . flip snoc ';') (allSql mig)
| 169
|
printMigration :: MonadIO m => Migration m -> m ()
printMigration m = do
mig <- parseMigration' m
mapM_ (liftIO . Data.Text.IO.putStrLn . flip snoc ';') (allSql mig)
| 169
|
printMigration m = do
mig <- parseMigration' m
mapM_ (liftIO . Data.Text.IO.putStrLn . flip snoc ';') (allSql mig)
| 118
| false
| true
| 0
| 11
| 31
| 77
| 36
| 41
| null | null |
Spheniscida/symmath
|
Symmath/RPNParse.hs
|
mit
|
rpnToTerm :: String -> Either String SymTerm
rpnToTerm s = case parse (rpnP []) "<term>" s of
Left e -> Left . show $ e
Right t -> Right t
| 170
|
rpnToTerm :: String -> Either String SymTerm
rpnToTerm s = case parse (rpnP []) "<term>" s of
Left e -> Left . show $ e
Right t -> Right t
| 170
|
rpnToTerm s = case parse (rpnP []) "<term>" s of
Left e -> Left . show $ e
Right t -> Right t
| 125
| false
| true
| 0
| 9
| 61
| 71
| 33
| 38
| null | null |
AlexeyRaga/eta
|
compiler/ETA/CodeGen/Prim.hs
|
bsd-3-clause
|
simpleOp ReadByteArrayOp_Int = Just $ byteArrayIndexOp jint mempty
| 66
|
simpleOp ReadByteArrayOp_Int = Just $ byteArrayIndexOp jint mempty
| 66
|
simpleOp ReadByteArrayOp_Int = Just $ byteArrayIndexOp jint mempty
| 66
| false
| false
| 0
| 6
| 7
| 18
| 8
| 10
| null | null |
rueshyna/gogol
|
gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs
|
mpl-2.0
|
-- | The source syntax of this method.
metSyntax :: Lens' Method (Maybe MethodSyntax)
metSyntax
= lens _metSyntax (\ s a -> s{_metSyntax = a})
| 144
|
metSyntax :: Lens' Method (Maybe MethodSyntax)
metSyntax
= lens _metSyntax (\ s a -> s{_metSyntax = a})
| 105
|
metSyntax
= lens _metSyntax (\ s a -> s{_metSyntax = a})
| 58
| true
| true
| 0
| 9
| 26
| 48
| 25
| 23
| null | null |
smurphy8/wavelets
|
src/Data/Wavelets.hs
|
bsd-3-clause
|
haar :: Floating t => WaveletFilter t
haar = wavelet [sqrt_2, -sqrt_2]
| 70
|
haar :: Floating t => WaveletFilter t
haar = wavelet [sqrt_2, -sqrt_2]
| 70
|
haar = wavelet [sqrt_2, -sqrt_2]
| 32
| false
| true
| 0
| 7
| 11
| 32
| 16
| 16
| null | null |
drhodes/jade2hdl
|
src/Jade/Memo.hs
|
bsd-3-clause
|
getMemo :: J Memo
getMemo = globalMemo <$> get
| 46
|
getMemo :: J Memo
getMemo = globalMemo <$> get
| 46
|
getMemo = globalMemo <$> get
| 28
| false
| true
| 0
| 5
| 8
| 18
| 9
| 9
| null | null |
input-output-hk/pos-haskell-prototype
|
lib/src/Test/Pos/Configuration.hs
|
mit
|
withDefNtpConfiguration :: (NtpConfiguration -> r) -> r
withDefNtpConfiguration fn = fn (ccNtp defaultTestConf)
| 111
|
withDefNtpConfiguration :: (NtpConfiguration -> r) -> r
withDefNtpConfiguration fn = fn (ccNtp defaultTestConf)
| 111
|
withDefNtpConfiguration fn = fn (ccNtp defaultTestConf)
| 55
| false
| true
| 0
| 7
| 12
| 34
| 17
| 17
| null | null |
j-mueller/talks
|
2016-05-laf/src/Main.hs
|
mit
|
notation = slide "Motivation" "Notation" $ const [bullets [
"$KB$: Set of defeasible rules in Aspic+",
"$\\langle \\r \\rangle$: Name of defeasible rule $r$"
]]
| 172
|
notation = slide "Motivation" "Notation" $ const [bullets [
"$KB$: Set of defeasible rules in Aspic+",
"$\\langle \\r \\rangle$: Name of defeasible rule $r$"
]]
| 172
|
notation = slide "Motivation" "Notation" $ const [bullets [
"$KB$: Set of defeasible rules in Aspic+",
"$\\langle \\r \\rangle$: Name of defeasible rule $r$"
]]
| 172
| false
| false
| 0
| 9
| 36
| 30
| 15
| 15
| null | null |
meiersi/blaze-builder
|
benchmarks/BuilderBufferRange.hs
|
bsd-3-clause
|
putBuilder :: B.Builder -> Put
putBuilder (B.Builder b) =
Put step
where
finalStep _ pf = return $ B.Done pf
step k = go (b finalStep)
where
go buildStep (BR pf pe) = do
signal <- buildStep pf pe
case signal of
B.Done pf' -> do
let !br' = BR pf' pe
k br'
B.BufferFull minSize pf' nextBuildStep ->
return $ BufferFull minSize pf' (go nextBuildStep)
B.ModifyChunks _ _ _ ->
error "putBuilder: ModifyChunks not implemented"
| 564
|
putBuilder :: B.Builder -> Put
putBuilder (B.Builder b) =
Put step
where
finalStep _ pf = return $ B.Done pf
step k = go (b finalStep)
where
go buildStep (BR pf pe) = do
signal <- buildStep pf pe
case signal of
B.Done pf' -> do
let !br' = BR pf' pe
k br'
B.BufferFull minSize pf' nextBuildStep ->
return $ BufferFull minSize pf' (go nextBuildStep)
B.ModifyChunks _ _ _ ->
error "putBuilder: ModifyChunks not implemented"
| 564
|
putBuilder (B.Builder b) =
Put step
where
finalStep _ pf = return $ B.Done pf
step k = go (b finalStep)
where
go buildStep (BR pf pe) = do
signal <- buildStep pf pe
case signal of
B.Done pf' -> do
let !br' = BR pf' pe
k br'
B.BufferFull minSize pf' nextBuildStep ->
return $ BufferFull minSize pf' (go nextBuildStep)
B.ModifyChunks _ _ _ ->
error "putBuilder: ModifyChunks not implemented"
| 533
| false
| true
| 2
| 16
| 219
| 202
| 88
| 114
| null | null |
brendanhay/gogol
|
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'CreativeFilteringReasonsReasonsItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cfrriFilteringStatus'
--
-- * 'cfrriFilteringCount'
creativeFilteringReasonsReasonsItem
:: CreativeFilteringReasonsReasonsItem
creativeFilteringReasonsReasonsItem =
CreativeFilteringReasonsReasonsItem'
{_cfrriFilteringStatus = Nothing, _cfrriFilteringCount = Nothing}
| 473
|
creativeFilteringReasonsReasonsItem
:: CreativeFilteringReasonsReasonsItem
creativeFilteringReasonsReasonsItem =
CreativeFilteringReasonsReasonsItem'
{_cfrriFilteringStatus = Nothing, _cfrriFilteringCount = Nothing}
| 225
|
creativeFilteringReasonsReasonsItem =
CreativeFilteringReasonsReasonsItem'
{_cfrriFilteringStatus = Nothing, _cfrriFilteringCount = Nothing}
| 146
| true
| true
| 1
| 7
| 59
| 39
| 23
| 16
| null | null |
DavidAlphaFox/ghc
|
libraries/Cabal/Cabal/tests/UnitTests/Distribution/Compat/ReadP.hs
|
bsd-3-clause
|
prop_Look :: String -> Bool
prop_Look s =
readP_to_S look s =~ [(s,s)]
| 72
|
prop_Look :: String -> Bool
prop_Look s =
readP_to_S look s =~ [(s,s)]
| 72
|
prop_Look s =
readP_to_S look s =~ [(s,s)]
| 44
| false
| true
| 1
| 7
| 14
| 46
| 21
| 25
| null | null |
romanb/amazonka
|
amazonka-redshift/gen/Network/AWS/Redshift/RestoreFromClusterSnapshot.hs
|
mpl-2.0
|
-- | Specifies the name of the HSM client certificate the Amazon Redshift cluster
-- uses to retrieve the data encryption keys stored in an HSM.
rfcsHsmClientCertificateIdentifier :: Lens' RestoreFromClusterSnapshot (Maybe Text)
rfcsHsmClientCertificateIdentifier =
lens _rfcsHsmClientCertificateIdentifier
(\s a -> s { _rfcsHsmClientCertificateIdentifier = a })
| 374
|
rfcsHsmClientCertificateIdentifier :: Lens' RestoreFromClusterSnapshot (Maybe Text)
rfcsHsmClientCertificateIdentifier =
lens _rfcsHsmClientCertificateIdentifier
(\s a -> s { _rfcsHsmClientCertificateIdentifier = a })
| 229
|
rfcsHsmClientCertificateIdentifier =
lens _rfcsHsmClientCertificateIdentifier
(\s a -> s { _rfcsHsmClientCertificateIdentifier = a })
| 145
| true
| true
| 0
| 9
| 56
| 47
| 26
| 21
| null | null |
tranma/big-oh
|
src/Test/BigOh/Plot.hs
|
bsd-3-clause
|
failed = withColor Red False
| 34
|
failed = withColor Red False
| 34
|
failed = withColor Red False
| 34
| false
| false
| 0
| 5
| 10
| 11
| 5
| 6
| null | null |
lamdu/lamdu
|
src/Lamdu/Data/Export/JSON.hs
|
gpl-3.0
|
fileExportNominal :: Monad m => T.NominalId -> FilePath -> T m (IO ())
fileExportNominal nomId =
export ("nominal: " ++ show nomId) (exportNominal nomId)
| 157
|
fileExportNominal :: Monad m => T.NominalId -> FilePath -> T m (IO ())
fileExportNominal nomId =
export ("nominal: " ++ show nomId) (exportNominal nomId)
| 157
|
fileExportNominal nomId =
export ("nominal: " ++ show nomId) (exportNominal nomId)
| 86
| false
| true
| 0
| 11
| 27
| 65
| 31
| 34
| null | null |
diflying/logitext
|
Coq.hs
|
bsd-3-clause
|
render (Atom n) = n
| 19
|
render (Atom n) = n
| 19
|
render (Atom n) = n
| 19
| false
| false
| 0
| 7
| 4
| 15
| 7
| 8
| null | null |
pegurnee/2015-01-341
|
projects/project4_mini_haskell/assist_lib.hs
|
mit
|
last' (_:x:xs) = last' (x:xs)
| 29
|
last' (_:x:xs) = last' (x:xs)
| 29
|
last' (_:x:xs) = last' (x:xs)
| 29
| false
| false
| 0
| 7
| 4
| 31
| 15
| 16
| null | null |
vlastachu/haskell-ccg
|
app/Main.hs
|
bsd-3-clause
|
isFunctor _ = False
| 26
|
isFunctor _ = False
| 26
|
isFunctor _ = False
| 26
| false
| false
| 0
| 5
| 10
| 9
| 4
| 5
| null | null |
martin-kolinek/stack
|
src/Stack/Options/Completion.hs
|
bsd-3-clause
|
targetCompleter :: Completer
targetCompleter = buildConfigCompleter $ \input -> do
lpvs <- fmap lpProject getLocalPackages
return $
filter (input `isPrefixOf`) $
concatMap allComponentNames (Map.toList lpvs)
where
allComponentNames (name, lpv) =
map (T.unpack . renderPkgComponent . (name,)) (Set.toList (lpvComponents lpv))
| 362
|
targetCompleter :: Completer
targetCompleter = buildConfigCompleter $ \input -> do
lpvs <- fmap lpProject getLocalPackages
return $
filter (input `isPrefixOf`) $
concatMap allComponentNames (Map.toList lpvs)
where
allComponentNames (name, lpv) =
map (T.unpack . renderPkgComponent . (name,)) (Set.toList (lpvComponents lpv))
| 362
|
targetCompleter = buildConfigCompleter $ \input -> do
lpvs <- fmap lpProject getLocalPackages
return $
filter (input `isPrefixOf`) $
concatMap allComponentNames (Map.toList lpvs)
where
allComponentNames (name, lpv) =
map (T.unpack . renderPkgComponent . (name,)) (Set.toList (lpvComponents lpv))
| 333
| false
| true
| 0
| 13
| 76
| 125
| 62
| 63
| null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/HTMLObjectElement.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement.form Mozilla HTMLObjectElement.form documentation>
getForm :: (MonadDOM m) => HTMLObjectElement -> m HTMLFormElement
getForm self = liftDOM ((self ^. js "form") >>= fromJSValUnchecked)
| 258
|
getForm :: (MonadDOM m) => HTMLObjectElement -> m HTMLFormElement
getForm self = liftDOM ((self ^. js "form") >>= fromJSValUnchecked)
| 133
|
getForm self = liftDOM ((self ^. js "form") >>= fromJSValUnchecked)
| 67
| true
| true
| 0
| 10
| 25
| 51
| 26
| 25
| null | null |
antalsz/hs-to-coq
|
examples/ghc/gen-files/Lexer.hs
|
mit
|
option_prags = 13
| 17
|
option_prags = 13
| 17
|
option_prags = 13
| 17
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
ssaavedra/liquidhaskell
|
src/Language/Haskell/Liquid/Types.hs
|
bsd-3-clause
|
mapBind f (RApp c ts rs r) = RApp c (mapBind f <$> ts) (mapBindRef f <$> rs) r
| 78
|
mapBind f (RApp c ts rs r) = RApp c (mapBind f <$> ts) (mapBindRef f <$> rs) r
| 78
|
mapBind f (RApp c ts rs r) = RApp c (mapBind f <$> ts) (mapBindRef f <$> rs) r
| 78
| false
| false
| 0
| 8
| 18
| 52
| 25
| 27
| null | null |
apyrgio/ganeti
|
src/Ganeti/Jobs.hs
|
bsd-2-clause
|
execJobSet anno master cref ((opcodes, descr):jobs) = do
putStrLn descr
jrs <- bracket (L.getLuxiClient master) L.closeClient $
execJobsWait metaopcodes logfn
case jrs of
Bad x -> return $ Bad x
Ok x -> let failures = filter ((/= JOB_STATUS_SUCCESS) . snd) x in
if null failures
then execCancelWrapper anno master cref jobs
else return . Bad . unlines $ [
"Not all jobs completed successfully: " ++ show failures,
"Aborting."]
where metaopcodes = map (map anno) opcodes
logfn = putStrLn . ("Got job IDs " ++)
. commaJoin . map (show . fromJobId)
-- | Signal handler for graceful termination.
| 737
|
execJobSet anno master cref ((opcodes, descr):jobs) = do
putStrLn descr
jrs <- bracket (L.getLuxiClient master) L.closeClient $
execJobsWait metaopcodes logfn
case jrs of
Bad x -> return $ Bad x
Ok x -> let failures = filter ((/= JOB_STATUS_SUCCESS) . snd) x in
if null failures
then execCancelWrapper anno master cref jobs
else return . Bad . unlines $ [
"Not all jobs completed successfully: " ++ show failures,
"Aborting."]
where metaopcodes = map (map anno) opcodes
logfn = putStrLn . ("Got job IDs " ++)
. commaJoin . map (show . fromJobId)
-- | Signal handler for graceful termination.
| 737
|
execJobSet anno master cref ((opcodes, descr):jobs) = do
putStrLn descr
jrs <- bracket (L.getLuxiClient master) L.closeClient $
execJobsWait metaopcodes logfn
case jrs of
Bad x -> return $ Bad x
Ok x -> let failures = filter ((/= JOB_STATUS_SUCCESS) . snd) x in
if null failures
then execCancelWrapper anno master cref jobs
else return . Bad . unlines $ [
"Not all jobs completed successfully: " ++ show failures,
"Aborting."]
where metaopcodes = map (map anno) opcodes
logfn = putStrLn . ("Got job IDs " ++)
. commaJoin . map (show . fromJobId)
-- | Signal handler for graceful termination.
| 737
| false
| false
| 5
| 17
| 245
| 235
| 109
| 126
| null | null |
nevrenato/HetsAlloy
|
OWL2/MS2Ship.hs
|
gpl-2.0
|
emptyBox :: Box
emptyBox = Box [] [] []
| 39
|
emptyBox :: Box
emptyBox = Box [] [] []
| 39
|
emptyBox = Box [] [] []
| 23
| false
| true
| 0
| 6
| 8
| 24
| 12
| 12
| null | null |
Antystenes/IBM1
|
.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/autogen/Paths_IBM1.hs
|
bsd-3-clause
|
version :: Version
version = Version [0,1,0,0] []
| 49
|
version :: Version
version = Version [0,1,0,0] []
| 49
|
version = Version [0,1,0,0] []
| 30
| false
| true
| 0
| 6
| 7
| 30
| 17
| 13
| null | null |
soumith/fbthrift
|
thrift/lib/hs/Thrift/Protocol/JSON.hs
|
apache-2.0
|
buildJSONValue (TByte b) = int8Dec b
| 36
|
buildJSONValue (TByte b) = int8Dec b
| 36
|
buildJSONValue (TByte b) = int8Dec b
| 36
| false
| false
| 0
| 7
| 5
| 18
| 8
| 10
| null | null |
mrakgr/futhark
|
src/Futhark/Analysis/HORepresentation/SOAC.hs
|
bsd-3-clause
|
fromExp (Op (Futhark.Write cs len lam ivs as)) = do
ivs' <- traverse varInput ivs
return $ Right $ Write cs len lam ivs' as
| 127
|
fromExp (Op (Futhark.Write cs len lam ivs as)) = do
ivs' <- traverse varInput ivs
return $ Right $ Write cs len lam ivs' as
| 127
|
fromExp (Op (Futhark.Write cs len lam ivs as)) = do
ivs' <- traverse varInput ivs
return $ Right $ Write cs len lam ivs' as
| 127
| false
| false
| 0
| 10
| 28
| 65
| 30
| 35
| null | null |
siddhanathan/ghc
|
compiler/typecheck/TcRnTypes.hs
|
bsd-3-clause
|
ctEvFlavour (CtGiven {}) = Given
| 34
|
ctEvFlavour (CtGiven {}) = Given
| 34
|
ctEvFlavour (CtGiven {}) = Given
| 34
| false
| false
| 0
| 7
| 6
| 16
| 8
| 8
| null | null |
michiexile/hplex
|
pershom/src/Math/Misc/Natural.hs
|
bsd-3-clause
|
ten = C 10
| 10
|
ten = C 10
| 10
|
ten = C 10
| 10
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
trbauer/progargs
|
Prog/Args/Impl.hs
|
mit
|
printUsage :: Spec o -> IO ()
printUsage spec = hPutStr stdout (fmtSpec spec) >> hFlush stdout
| 94
|
printUsage :: Spec o -> IO ()
printUsage spec = hPutStr stdout (fmtSpec spec) >> hFlush stdout
| 94
|
printUsage spec = hPutStr stdout (fmtSpec spec) >> hFlush stdout
| 64
| false
| true
| 0
| 8
| 16
| 44
| 20
| 24
| null | null |
brenov/set
|
interpreter/State.hs
|
mit
|
-- - Remove variable
-- Var Variable
-- State Current state
-- Return Updated state
removeVariable :: Var -> State -> State
removeVariable _ (_, [], _) = error "Error: Variable not found."
| 192
|
removeVariable :: Var -> State -> State
removeVariable _ (_, [], _) = error "Error: Variable not found."
| 104
|
removeVariable _ (_, [], _) = error "Error: Variable not found."
| 64
| true
| true
| 0
| 7
| 36
| 42
| 24
| 18
| null | null |
boj/garbage
|
src/NaiveGame2.hs
|
bsd-3-clause
|
numChunks :: Int
numChunks = 100
| 32
|
numChunks :: Int
numChunks = 100
| 32
|
numChunks = 100
| 15
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
fmapfmapfmap/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
|
mpl-2.0
|
-- | The percentage of completion for the import snapshot task.
stdProgress :: Lens' SnapshotTaskDetail (Maybe Text)
stdProgress = lens _stdProgress (\ s a -> s{_stdProgress = a})
| 179
|
stdProgress :: Lens' SnapshotTaskDetail (Maybe Text)
stdProgress = lens _stdProgress (\ s a -> s{_stdProgress = a})
| 115
|
stdProgress = lens _stdProgress (\ s a -> s{_stdProgress = a})
| 62
| true
| true
| 0
| 9
| 27
| 46
| 25
| 21
| null | null |
ranjitjhala/gradr
|
Application.hs
|
mit
|
-- | main function for use by yesod devel
develMain :: IO ()
develMain = develMainHelper getApplicationDev
| 106
|
develMain :: IO ()
develMain = develMainHelper getApplicationDev
| 64
|
develMain = develMainHelper getApplicationDev
| 45
| true
| true
| 0
| 7
| 16
| 25
| 11
| 14
| null | null |
dalaing/sdl2
|
src/SDL/Raw/Thread.hs
|
bsd-3-clause
|
atomicUnlock :: MonadIO m => Ptr SpinLock -> m ()
atomicUnlock v1 = liftIO $ atomicUnlockFFI v1
| 95
|
atomicUnlock :: MonadIO m => Ptr SpinLock -> m ()
atomicUnlock v1 = liftIO $ atomicUnlockFFI v1
| 95
|
atomicUnlock v1 = liftIO $ atomicUnlockFFI v1
| 45
| false
| true
| 0
| 9
| 16
| 44
| 19
| 25
| null | null |
haskell-distributed/distributed-process-client-server
|
src/Control/Distributed/Process/ManagedProcess/Server.hs
|
bsd-3-clause
|
-- | The server loop will execute against the supplied 'ProcessDefinition', allowing
-- the process to change its behaviour (in terms of message handlers, exit handling,
-- termination, unhandled message policy, etc)
become :: forall s . ProcessDefinition s -> s -> Action s
become def st = return $ ProcessBecome def st
| 320
|
become :: forall s . ProcessDefinition s -> s -> Action s
become def st = return $ ProcessBecome def st
| 103
|
become def st = return $ ProcessBecome def st
| 45
| true
| true
| 2
| 9
| 52
| 52
| 25
| 27
| null | null |
agocorona/transient
|
src/Transient/Internals.cont.hs
|
mit
|
roption= unsafePerformIO $ newMVar []
| 37
|
roption= unsafePerformIO $ newMVar []
| 37
|
roption= unsafePerformIO $ newMVar []
| 37
| false
| false
| 0
| 7
| 4
| 15
| 7
| 8
| null | null |
aslatter/xhb
|
build-utils/src/HaskellCombinators.hs
|
bsd-3-clause
|
hsPTuple = HsPTuple
| 19
|
hsPTuple = HsPTuple
| 19
|
hsPTuple = HsPTuple
| 19
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
ntc2/optparse-applicative
|
Options/Applicative/Types.hs
|
bsd-3-clause
|
oneM :: Parser a -> ParserM a
oneM p = ParserM (BindP p)
| 56
|
oneM :: Parser a -> ParserM a
oneM p = ParserM (BindP p)
| 56
|
oneM p = ParserM (BindP p)
| 26
| false
| true
| 0
| 7
| 12
| 37
| 16
| 21
| null | null |
bitemyapp/wreq
|
httpbin/HttpBin/Server.hs
|
bsd-3-clause
|
put = post
| 10
|
put = post
| 10
|
put = post
| 10
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
Crazycolorz5/Haskell-Code
|
MyUsefulFunctions.hs
|
unlicense
|
isSorted (x:xs) = (x <= head xs) && isSorted xs
| 47
|
isSorted (x:xs) = (x <= head xs) && isSorted xs
| 47
|
isSorted (x:xs) = (x <= head xs) && isSorted xs
| 47
| false
| false
| 0
| 8
| 9
| 33
| 16
| 17
| null | null |
phylake/kademlia
|
test/SerializationTests.hs
|
bsd-3-clause
|
node2 :: Node
node2 = Node 2 $ SockAddrInet (PortNum 1024) 0x7F000001
| 69
|
node2 :: Node
node2 = Node 2 $ SockAddrInet (PortNum 1024) 0x7F000001
| 69
|
node2 = Node 2 $ SockAddrInet (PortNum 1024) 0x7F000001
| 55
| false
| true
| 0
| 8
| 11
| 29
| 14
| 15
| null | null |
capitanbatata/sandbox
|
incremental-envs/src/Lib.hs
|
gpl-3.0
|
someFunc :: IO ()
someFunc = putStrLn "someFunc"
| 48
|
someFunc :: IO ()
someFunc = putStrLn "someFunc"
| 48
|
someFunc = putStrLn "someFunc"
| 30
| false
| true
| 0
| 6
| 7
| 19
| 9
| 10
| null | null |
antalsz/hs-to-coq
|
examples/graph/graph/Data/Graph/Inductive/Basic.hs
|
mit
|
-- | The inverse of 'hasLoop'.
isSimple :: (Graph gr) => gr a b -> Bool
isSimple = not . hasLoop
| 96
|
isSimple :: (Graph gr) => gr a b -> Bool
isSimple = not . hasLoop
| 65
|
isSimple = not . hasLoop
| 24
| true
| true
| 0
| 7
| 20
| 34
| 18
| 16
| null | null |
emilaxelsson/compass
|
src/Language/Embedded/Algorithms.hs
|
bsd-3-clause
|
normalForm :: (Binding :<: f, App :<: f, Traversable f) => Term f -> Term f
normalForm = go []
where
go env t
| Just (Var v) <- project t
= case lookup v env of
Just u -> go env u
_ -> t
go env t
| Just (Lam v a) <- project t
= inject $ Lam v $ go (filter ((/=v) . fst) env) a
go env t
| Just (App f a) <- project t
= case go env f of
f' | Just (Lam v b) <- project f' -> go ((v,a):env) b
f' -> inject $ App f' a
go env (Term f) = Term $ fmap (go env) f
| 547
|
normalForm :: (Binding :<: f, App :<: f, Traversable f) => Term f -> Term f
normalForm = go []
where
go env t
| Just (Var v) <- project t
= case lookup v env of
Just u -> go env u
_ -> t
go env t
| Just (Lam v a) <- project t
= inject $ Lam v $ go (filter ((/=v) . fst) env) a
go env t
| Just (App f a) <- project t
= case go env f of
f' | Just (Lam v b) <- project f' -> go ((v,a):env) b
f' -> inject $ App f' a
go env (Term f) = Term $ fmap (go env) f
| 547
|
normalForm = go []
where
go env t
| Just (Var v) <- project t
= case lookup v env of
Just u -> go env u
_ -> t
go env t
| Just (Lam v a) <- project t
= inject $ Lam v $ go (filter ((/=v) . fst) env) a
go env t
| Just (App f a) <- project t
= case go env f of
f' | Just (Lam v b) <- project f' -> go ((v,a):env) b
f' -> inject $ App f' a
go env (Term f) = Term $ fmap (go env) f
| 471
| false
| true
| 0
| 15
| 211
| 321
| 150
| 171
| null | null |
da-x/ghc
|
libraries/base/Data/List/NonEmpty.hs
|
bsd-3-clause
|
-- | Prepend an element to the stream.
(<|) :: a -> NonEmpty a -> NonEmpty a
a <| ~(b :| bs) = a :| b : bs
| 106
|
(<|) :: a -> NonEmpty a -> NonEmpty a
a <| ~(b :| bs) = a :| b : bs
| 67
|
a <| ~(b :| bs) = a :| b : bs
| 29
| true
| true
| 3
| 7
| 27
| 55
| 28
| 27
| null | null |
brendanhay/gogol
|
gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs
|
mpl-2.0
|
-- | Email address of the user who created this version.\'OutputOnly
verCreatedBy :: Lens' Version (Maybe Text)
verCreatedBy
= lens _verCreatedBy (\ s a -> s{_verCreatedBy = a})
| 179
|
verCreatedBy :: Lens' Version (Maybe Text)
verCreatedBy
= lens _verCreatedBy (\ s a -> s{_verCreatedBy = a})
| 110
|
verCreatedBy
= lens _verCreatedBy (\ s a -> s{_verCreatedBy = a})
| 67
| true
| true
| 1
| 9
| 29
| 52
| 25
| 27
| null | null |
bheklilr/haskell-sheets
|
src/Data/Sheets/Series.hs
|
mit
|
newSeries :: Foldable container => container elem_type -> Series Int32 elem_type
newSeries values = Series [] (rangeIdxFrom values) $ V.fromList . F.toList $ values
| 164
|
newSeries :: Foldable container => container elem_type -> Series Int32 elem_type
newSeries values = Series [] (rangeIdxFrom values) $ V.fromList . F.toList $ values
| 164
|
newSeries values = Series [] (rangeIdxFrom values) $ V.fromList . F.toList $ values
| 83
| false
| true
| 0
| 10
| 23
| 62
| 29
| 33
| null | null |
elieux/ghc
|
compiler/typecheck/TcEvidence.hs
|
bsd-3-clause
|
mkTcAppCos :: TcCoercion -> [TcCoercion] -> TcCoercion
mkTcAppCos co1 tys = foldl mkTcAppCo co1 tys
| 99
|
mkTcAppCos :: TcCoercion -> [TcCoercion] -> TcCoercion
mkTcAppCos co1 tys = foldl mkTcAppCo co1 tys
| 99
|
mkTcAppCos co1 tys = foldl mkTcAppCo co1 tys
| 44
| false
| true
| 0
| 7
| 14
| 34
| 17
| 17
| null | null |
brendanhay/gogol
|
gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs
|
mpl-2.0
|
-- | Time a static file served by this handler should be cached by web
-- proxies and browsers.
sfhExpiration :: Lens' StaticFilesHandler (Maybe Scientific)
sfhExpiration
= lens _sfhExpiration
(\ s a -> s{_sfhExpiration = a})
. mapping _GDuration
| 260
|
sfhExpiration :: Lens' StaticFilesHandler (Maybe Scientific)
sfhExpiration
= lens _sfhExpiration
(\ s a -> s{_sfhExpiration = a})
. mapping _GDuration
| 164
|
sfhExpiration
= lens _sfhExpiration
(\ s a -> s{_sfhExpiration = a})
. mapping _GDuration
| 103
| true
| true
| 2
| 8
| 52
| 61
| 29
| 32
| null | null |
acharal/hopes
|
src/prover/Logic/SR.hs
|
gpl-2.0
|
observe :: Monad m => (forall ans. SR ans m a) -> m a
observe m = runCCT (reify m >>= pick)
where pick HZero = fail "no answer"
pick (HOne a) = return a
pick (HChoice a _) = return a
| 206
|
observe :: Monad m => (forall ans. SR ans m a) -> m a
observe m = runCCT (reify m >>= pick)
where pick HZero = fail "no answer"
pick (HOne a) = return a
pick (HChoice a _) = return a
| 206
|
observe m = runCCT (reify m >>= pick)
where pick HZero = fail "no answer"
pick (HOne a) = return a
pick (HChoice a _) = return a
| 152
| false
| true
| 0
| 10
| 65
| 113
| 51
| 62
| null | null |
lynnard/cocos2d-hs
|
src/Graphics/UI/Cocos2d/Event.hs
|
bsd-3-clause
|
castEventListenerAccelerationToNonconst (EventListenerAccelerationConstGc fptr' ptr') = EventListenerAccelerationGc fptr' $ HoppyF.castPtr ptr'
| 143
|
castEventListenerAccelerationToNonconst (EventListenerAccelerationConstGc fptr' ptr') = EventListenerAccelerationGc fptr' $ HoppyF.castPtr ptr'
| 143
|
castEventListenerAccelerationToNonconst (EventListenerAccelerationConstGc fptr' ptr') = EventListenerAccelerationGc fptr' $ HoppyF.castPtr ptr'
| 143
| false
| false
| 0
| 7
| 9
| 29
| 13
| 16
| null | null |
joachifm/pwcrypt
|
test/CryptoSpec.hs
|
mit
|
spec :: Spec
spec = do
salt <- io getSalt
let pass = "Pass"
mesg = "Mesg"
c = 10
let (mac, txt) = encrypt pass salt c mesg
describe "decrypt" $ do
it "retrieves the plaintext" $ do
decrypt pass salt c mac txt `shouldBe` Right mesg
describe "decode" $ do
it "deserializes an encoded entry" $ do
let enc = encode salt c mac txt
decode enc `shouldBe` Right (salt, c, mac, txt)
describe "decodeAndDecrypt" $ do
it "decodes, then decrypts" $ do
let enc = encryptAndEncode pass salt c mesg
decodeAndDecrypt pass enc `shouldBe` Right mesg
describe "recrypt" $ do
newSalt <- io getSalt
it "updates the passphrase and encryption parameters" $ do
let origEnc = encryptAndEncode pass salt c mesg
newEnc = encryptAndEncode "NewPass" newSalt 1024 mesg
recrypt pass "NewPass" newSalt 1024 origEnc `shouldBe` Right newEnc
it "returns the original if the parameters do not change" $ do
let origEnc = encryptAndEncode pass salt c mesg
recrypt pass pass salt c origEnc `shouldBe` Right origEnc
| 1,098
|
spec :: Spec
spec = do
salt <- io getSalt
let pass = "Pass"
mesg = "Mesg"
c = 10
let (mac, txt) = encrypt pass salt c mesg
describe "decrypt" $ do
it "retrieves the plaintext" $ do
decrypt pass salt c mac txt `shouldBe` Right mesg
describe "decode" $ do
it "deserializes an encoded entry" $ do
let enc = encode salt c mac txt
decode enc `shouldBe` Right (salt, c, mac, txt)
describe "decodeAndDecrypt" $ do
it "decodes, then decrypts" $ do
let enc = encryptAndEncode pass salt c mesg
decodeAndDecrypt pass enc `shouldBe` Right mesg
describe "recrypt" $ do
newSalt <- io getSalt
it "updates the passphrase and encryption parameters" $ do
let origEnc = encryptAndEncode pass salt c mesg
newEnc = encryptAndEncode "NewPass" newSalt 1024 mesg
recrypt pass "NewPass" newSalt 1024 origEnc `shouldBe` Right newEnc
it "returns the original if the parameters do not change" $ do
let origEnc = encryptAndEncode pass salt c mesg
recrypt pass pass salt c origEnc `shouldBe` Right origEnc
| 1,098
|
spec = do
salt <- io getSalt
let pass = "Pass"
mesg = "Mesg"
c = 10
let (mac, txt) = encrypt pass salt c mesg
describe "decrypt" $ do
it "retrieves the plaintext" $ do
decrypt pass salt c mac txt `shouldBe` Right mesg
describe "decode" $ do
it "deserializes an encoded entry" $ do
let enc = encode salt c mac txt
decode enc `shouldBe` Right (salt, c, mac, txt)
describe "decodeAndDecrypt" $ do
it "decodes, then decrypts" $ do
let enc = encryptAndEncode pass salt c mesg
decodeAndDecrypt pass enc `shouldBe` Right mesg
describe "recrypt" $ do
newSalt <- io getSalt
it "updates the passphrase and encryption parameters" $ do
let origEnc = encryptAndEncode pass salt c mesg
newEnc = encryptAndEncode "NewPass" newSalt 1024 mesg
recrypt pass "NewPass" newSalt 1024 origEnc `shouldBe` Right newEnc
it "returns the original if the parameters do not change" $ do
let origEnc = encryptAndEncode pass salt c mesg
recrypt pass pass salt c origEnc `shouldBe` Right origEnc
| 1,085
| false
| true
| 0
| 17
| 291
| 371
| 168
| 203
| null | null |
prashant007/AMPL
|
myAMPL/src/test_del/AMPL_am.hs
|
mit
|
------------------------------------------------------------------------------
seq_step (AMC_ADD:c,e,V_INT n:V_INT m:s) defs = (c,e,V_INT (n + m):s)
| 148
|
seq_step (AMC_ADD:c,e,V_INT n:V_INT m:s) defs = (c,e,V_INT (n + m):s)
| 69
|
seq_step (AMC_ADD:c,e,V_INT n:V_INT m:s) defs = (c,e,V_INT (n + m):s)
| 69
| true
| false
| 0
| 9
| 10
| 62
| 33
| 29
| null | null |
ekmett/wxHaskell
|
wx/src/Graphics/UI/WX/Controls.hs
|
lgpl-2.1
|
-- | Run the wizard.
-- IMPORTANT: `windowDestroy` needs to be called on the wizard when it is no longer used. After
-- `windowDestroy` has been called, the wizard or any of its children must not be accessed anymore.
runWizard :: Wizard a -> WizardPage b -> IO Bool
runWizard wiz page = wizardRunWizard wiz page >>= return . (/=0)
| 330
|
runWizard :: Wizard a -> WizardPage b -> IO Bool
runWizard wiz page = wizardRunWizard wiz page >>= return . (/=0)
| 113
|
runWizard wiz page = wizardRunWizard wiz page >>= return . (/=0)
| 64
| true
| true
| 0
| 7
| 59
| 53
| 27
| 26
| null | null |
gbataille/pandoc
|
src/Text/Pandoc/SelfContained.hs
|
gpl-2.0
|
convertTag media sourceURL t@(TagOpen "script" as) =
case fromAttrib "src" t of
[] -> return t
src -> do
enc <- getDataURI media sourceURL (fromAttrib "type" t) src
return $ TagOpen "script" (("src",enc) : [(x,y) | (x,y) <- as, x /= "src"])
| 285
|
convertTag media sourceURL t@(TagOpen "script" as) =
case fromAttrib "src" t of
[] -> return t
src -> do
enc <- getDataURI media sourceURL (fromAttrib "type" t) src
return $ TagOpen "script" (("src",enc) : [(x,y) | (x,y) <- as, x /= "src"])
| 285
|
convertTag media sourceURL t@(TagOpen "script" as) =
case fromAttrib "src" t of
[] -> return t
src -> do
enc <- getDataURI media sourceURL (fromAttrib "type" t) src
return $ TagOpen "script" (("src",enc) : [(x,y) | (x,y) <- as, x /= "src"])
| 285
| false
| false
| 0
| 17
| 86
| 130
| 66
| 64
| null | null |
jgm/aws
|
Aws/Credentials.hs
|
bsd-3-clause
|
loadCredentialsDefault :: IO (Maybe Credentials)
loadCredentialsDefault = do
file <- credentialsDefaultFile
loadCredentialsFromEnvOrFile file credentialsDefaultKey
| 167
|
loadCredentialsDefault :: IO (Maybe Credentials)
loadCredentialsDefault = do
file <- credentialsDefaultFile
loadCredentialsFromEnvOrFile file credentialsDefaultKey
| 167
|
loadCredentialsDefault = do
file <- credentialsDefaultFile
loadCredentialsFromEnvOrFile file credentialsDefaultKey
| 118
| false
| true
| 2
| 8
| 17
| 42
| 16
| 26
| null | null |
keera-studios/hsQt
|
Qtc/Gui/QErrorMessage.hs
|
bsd-2-clause
|
qErrorMessage_deleteLater :: QErrorMessage a -> IO ()
qErrorMessage_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QErrorMessage_deleteLater cobj_x0
| 159
|
qErrorMessage_deleteLater :: QErrorMessage a -> IO ()
qErrorMessage_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QErrorMessage_deleteLater cobj_x0
| 159
|
qErrorMessage_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QErrorMessage_deleteLater cobj_x0
| 105
| false
| true
| 0
| 7
| 22
| 41
| 19
| 22
| null | null |
ganeti-github-testing/ganeti-test-1
|
src/Ganeti/OpParams.hs
|
bsd-2-clause
|
pMoveTargetNode :: Field
pMoveTargetNode =
withDoc "Target node for instance move" .
renameField "MoveTargetNode" $
simpleField "target_node" [t| NonEmptyString |]
| 169
|
pMoveTargetNode :: Field
pMoveTargetNode =
withDoc "Target node for instance move" .
renameField "MoveTargetNode" $
simpleField "target_node" [t| NonEmptyString |]
| 169
|
pMoveTargetNode =
withDoc "Target node for instance move" .
renameField "MoveTargetNode" $
simpleField "target_node" [t| NonEmptyString |]
| 144
| false
| true
| 0
| 6
| 25
| 41
| 19
| 22
| null | null |
slpopejoy/fadno-braids
|
src/Fadno/Braids/Graphics.hs
|
bsd-2-clause
|
drawStrand :: Integral a => DrawConf -> Strand a -> Diagram B
drawStrand dc s = foldMap (cap . fromVertices) $ foldl rs [[firstp (head ss)]] $
zip [(0 :: Int)..] ss
where
ss = toStrand' s
cap = lineCap LineCapButt
firstp (y,_,_) = p2 (0,fromIntegral y)
margin = (1 - crossGap dc) / 2
rs [] _ = error "no strands"
rs (ps:pss) (x,(y,p,y')) | p == U = [pt 1,pt (1 - margin)]:(pt margin:ps):pss
| otherwise = (pt 1:ps):pss
where pt = warpPt x y y'
| 545
|
drawStrand :: Integral a => DrawConf -> Strand a -> Diagram B
drawStrand dc s = foldMap (cap . fromVertices) $ foldl rs [[firstp (head ss)]] $
zip [(0 :: Int)..] ss
where
ss = toStrand' s
cap = lineCap LineCapButt
firstp (y,_,_) = p2 (0,fromIntegral y)
margin = (1 - crossGap dc) / 2
rs [] _ = error "no strands"
rs (ps:pss) (x,(y,p,y')) | p == U = [pt 1,pt (1 - margin)]:(pt margin:ps):pss
| otherwise = (pt 1:ps):pss
where pt = warpPt x y y'
| 545
|
drawStrand dc s = foldMap (cap . fromVertices) $ foldl rs [[firstp (head ss)]] $
zip [(0 :: Int)..] ss
where
ss = toStrand' s
cap = lineCap LineCapButt
firstp (y,_,_) = p2 (0,fromIntegral y)
margin = (1 - crossGap dc) / 2
rs [] _ = error "no strands"
rs (ps:pss) (x,(y,p,y')) | p == U = [pt 1,pt (1 - margin)]:(pt margin:ps):pss
| otherwise = (pt 1:ps):pss
where pt = warpPt x y y'
| 483
| false
| true
| 0
| 12
| 189
| 287
| 146
| 141
| null | null |
Persi/shellcheck
|
ShellCheck/Analytics.hs
|
gpl-3.0
|
isVariableName (x:r) = isVariableStartChar x && all isVariableChar r
| 68
|
isVariableName (x:r) = isVariableStartChar x && all isVariableChar r
| 68
|
isVariableName (x:r) = isVariableStartChar x && all isVariableChar r
| 68
| false
| false
| 0
| 7
| 8
| 28
| 13
| 15
| null | null |
atemerev/icfpc2013
|
src/solver-lib/ProgramCounting.hs
|
apache-2.0
|
isBasicExpr (Shr16 tag) = isBasicExpr tag
| 41
|
isBasicExpr (Shr16 tag) = isBasicExpr tag
| 41
|
isBasicExpr (Shr16 tag) = isBasicExpr tag
| 41
| false
| false
| 0
| 7
| 5
| 18
| 8
| 10
| null | null |
ksaveljev/hake-2
|
src/Constants.hs
|
bsd-3-clause
|
teSparks = 9 :: Int
| 35
|
teSparks = 9 :: Int
| 35
|
teSparks = 9 :: Int
| 35
| false
| false
| 0
| 4
| 20
| 9
| 5
| 4
| null | null |
trenttobler/hs-asteroids
|
src/LinePt2.hs
|
bsd-3-clause
|
lineP1X, lineP1Y, lineP2X, lineP2Y :: LinePt2 t -> t
lineP1X a = pt2X $ lineP1 a
| 81
|
lineP1X, lineP1Y, lineP2X, lineP2Y :: LinePt2 t -> t
lineP1X a = pt2X $ lineP1 a
| 80
|
lineP1X a = pt2X $ lineP1 a
| 27
| false
| true
| 0
| 6
| 16
| 34
| 19
| 15
| null | null |
elfeck/grouphs
|
test/Test.hs
|
mit
|
z57 = znz 57
| 12
|
z57 = znz 57
| 12
|
z57 = znz 57
| 12
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
ardumont/write-yourself-a-scheme-lab
|
Scheme/REPL.hs
|
gpl-2.0
|
makeNormalFunc :: Env -> [LispVal] -> [LispVal] -> IOThrowsError LispVal
makeNormalFunc = makeFunc Nothing
| 106
|
makeNormalFunc :: Env -> [LispVal] -> [LispVal] -> IOThrowsError LispVal
makeNormalFunc = makeFunc Nothing
| 106
|
makeNormalFunc = makeFunc Nothing
| 33
| false
| true
| 0
| 8
| 13
| 35
| 18
| 17
| null | null |
anton-k/sharc-timbre
|
src/Sharc/Instruments/ClarinetEflat.hs
|
bsd-3-clause
|
note5 :: Note
note5 = Note
(Pitch 261.626 48 "c4")
6
(Range
(NoteRange
(NoteRangeAmplitude 9156.91 35 2.71)
(NoteRangeHarmonicFreq 1 261.62))
(NoteRange
(NoteRangeAmplitude 261.62 1 5886.0)
(NoteRangeHarmonicFreq 38 9941.78)))
[Harmonic 1 2.834 5886.0
,Harmonic 2 2.782 66.3
,Harmonic 3 0.798 2399.7
,Harmonic 4 1.153 174.07
,Harmonic 5 (-0.944) 1843.27
,Harmonic 6 (-2.087) 857.81
,Harmonic 7 (-0.791) 2396.06
,Harmonic 8 (-2.465) 241.87
,Harmonic 9 (-0.721) 1064.87
,Harmonic 10 (-1.846) 219.92
,Harmonic 11 0.804 205.56
,Harmonic 12 (-1.719) 121.65
,Harmonic 13 0.401 134.77
,Harmonic 14 0.214 202.92
,Harmonic 15 (-1.551) 25.46
,Harmonic 16 (-0.335) 26.1
,Harmonic 17 (-1.05) 49.75
,Harmonic 18 2.421 72.63
,Harmonic 19 0.557 32.65
,Harmonic 20 (-2.197) 8.36
,Harmonic 21 1.045 16.63
,Harmonic 22 (-2.127) 66.88
,Harmonic 23 2.693 11.87
,Harmonic 24 (-0.745) 20.15
,Harmonic 25 2.913 26.27
,Harmonic 26 (-0.69) 23.38
,Harmonic 27 (-2.943) 51.23
,Harmonic 28 0.884 17.15
,Harmonic 29 (-2.823) 25.54
,Harmonic 30 1.924 12.21
,Harmonic 31 (-1.059) 3.83
,Harmonic 32 2.004 5.24
,Harmonic 33 (-1.366) 5.77
,Harmonic 34 1.751 3.67
,Harmonic 35 (-0.156) 2.71
,Harmonic 36 2.005 4.18
,Harmonic 37 (-1.302) 3.14
,Harmonic 38 2.055 2.92]
| 1,459
|
note5 :: Note
note5 = Note
(Pitch 261.626 48 "c4")
6
(Range
(NoteRange
(NoteRangeAmplitude 9156.91 35 2.71)
(NoteRangeHarmonicFreq 1 261.62))
(NoteRange
(NoteRangeAmplitude 261.62 1 5886.0)
(NoteRangeHarmonicFreq 38 9941.78)))
[Harmonic 1 2.834 5886.0
,Harmonic 2 2.782 66.3
,Harmonic 3 0.798 2399.7
,Harmonic 4 1.153 174.07
,Harmonic 5 (-0.944) 1843.27
,Harmonic 6 (-2.087) 857.81
,Harmonic 7 (-0.791) 2396.06
,Harmonic 8 (-2.465) 241.87
,Harmonic 9 (-0.721) 1064.87
,Harmonic 10 (-1.846) 219.92
,Harmonic 11 0.804 205.56
,Harmonic 12 (-1.719) 121.65
,Harmonic 13 0.401 134.77
,Harmonic 14 0.214 202.92
,Harmonic 15 (-1.551) 25.46
,Harmonic 16 (-0.335) 26.1
,Harmonic 17 (-1.05) 49.75
,Harmonic 18 2.421 72.63
,Harmonic 19 0.557 32.65
,Harmonic 20 (-2.197) 8.36
,Harmonic 21 1.045 16.63
,Harmonic 22 (-2.127) 66.88
,Harmonic 23 2.693 11.87
,Harmonic 24 (-0.745) 20.15
,Harmonic 25 2.913 26.27
,Harmonic 26 (-0.69) 23.38
,Harmonic 27 (-2.943) 51.23
,Harmonic 28 0.884 17.15
,Harmonic 29 (-2.823) 25.54
,Harmonic 30 1.924 12.21
,Harmonic 31 (-1.059) 3.83
,Harmonic 32 2.004 5.24
,Harmonic 33 (-1.366) 5.77
,Harmonic 34 1.751 3.67
,Harmonic 35 (-0.156) 2.71
,Harmonic 36 2.005 4.18
,Harmonic 37 (-1.302) 3.14
,Harmonic 38 2.055 2.92]
| 1,459
|
note5 = Note
(Pitch 261.626 48 "c4")
6
(Range
(NoteRange
(NoteRangeAmplitude 9156.91 35 2.71)
(NoteRangeHarmonicFreq 1 261.62))
(NoteRange
(NoteRangeAmplitude 261.62 1 5886.0)
(NoteRangeHarmonicFreq 38 9941.78)))
[Harmonic 1 2.834 5886.0
,Harmonic 2 2.782 66.3
,Harmonic 3 0.798 2399.7
,Harmonic 4 1.153 174.07
,Harmonic 5 (-0.944) 1843.27
,Harmonic 6 (-2.087) 857.81
,Harmonic 7 (-0.791) 2396.06
,Harmonic 8 (-2.465) 241.87
,Harmonic 9 (-0.721) 1064.87
,Harmonic 10 (-1.846) 219.92
,Harmonic 11 0.804 205.56
,Harmonic 12 (-1.719) 121.65
,Harmonic 13 0.401 134.77
,Harmonic 14 0.214 202.92
,Harmonic 15 (-1.551) 25.46
,Harmonic 16 (-0.335) 26.1
,Harmonic 17 (-1.05) 49.75
,Harmonic 18 2.421 72.63
,Harmonic 19 0.557 32.65
,Harmonic 20 (-2.197) 8.36
,Harmonic 21 1.045 16.63
,Harmonic 22 (-2.127) 66.88
,Harmonic 23 2.693 11.87
,Harmonic 24 (-0.745) 20.15
,Harmonic 25 2.913 26.27
,Harmonic 26 (-0.69) 23.38
,Harmonic 27 (-2.943) 51.23
,Harmonic 28 0.884 17.15
,Harmonic 29 (-2.823) 25.54
,Harmonic 30 1.924 12.21
,Harmonic 31 (-1.059) 3.83
,Harmonic 32 2.004 5.24
,Harmonic 33 (-1.366) 5.77
,Harmonic 34 1.751 3.67
,Harmonic 35 (-0.156) 2.71
,Harmonic 36 2.005 4.18
,Harmonic 37 (-1.302) 3.14
,Harmonic 38 2.055 2.92]
| 1,445
| false
| true
| 0
| 10
| 407
| 573
| 295
| 278
| null | null |
kojiromike/Idris-dev
|
src/Idris/Core/ProofTerm.hs
|
bsd-3-clause
|
same (Just x) n = x == n
| 24
|
same (Just x) n = x == n
| 24
|
same (Just x) n = x == n
| 24
| false
| false
| 0
| 7
| 7
| 21
| 10
| 11
| null | null |
DavidAlphaFox/ghc
|
utils/haddock/haddock-api/src/Haddock.hs
|
bsd-3-clause
|
modulePackageInfo :: DynFlags
-> [Flag] -- ^ Haddock flags are checked as they may
-- contain the package name or version
-- provided by the user which we
-- prioritise
-> Module -> (PackageName, Data.Version.Version)
modulePackageInfo dflags flags modu =
(fromMaybe (packageName pkg) (optPackageName flags),
fromMaybe (packageVersion pkg) (optPackageVersion flags))
where
pkg = getPackageDetails dflags (modulePackageKey modu)
-------------------------------------------------------------------------------
-- * Reading and dumping interface files
-------------------------------------------------------------------------------
| 761
|
modulePackageInfo :: DynFlags
-> [Flag] -- ^ Haddock flags are checked as they may
-- contain the package name or version
-- provided by the user which we
-- prioritise
-> Module -> (PackageName, Data.Version.Version)
modulePackageInfo dflags flags modu =
(fromMaybe (packageName pkg) (optPackageName flags),
fromMaybe (packageVersion pkg) (optPackageVersion flags))
where
pkg = getPackageDetails dflags (modulePackageKey modu)
-------------------------------------------------------------------------------
-- * Reading and dumping interface files
-------------------------------------------------------------------------------
| 761
|
modulePackageInfo dflags flags modu =
(fromMaybe (packageName pkg) (optPackageName flags),
fromMaybe (packageVersion pkg) (optPackageVersion flags))
where
pkg = getPackageDetails dflags (modulePackageKey modu)
-------------------------------------------------------------------------------
-- * Reading and dumping interface files
-------------------------------------------------------------------------------
| 423
| false
| true
| 0
| 9
| 198
| 108
| 59
| 49
| null | null |
mcschroeder/ghc
|
compiler/prelude/TysWiredIn.hs
|
bsd-3-clause
|
isPArrFakeCon :: DataCon -> Bool
isPArrFakeCon dcon = dcon == parrFakeCon (dataConSourceArity dcon)
| 105
|
isPArrFakeCon :: DataCon -> Bool
isPArrFakeCon dcon = dcon == parrFakeCon (dataConSourceArity dcon)
| 105
|
isPArrFakeCon dcon = dcon == parrFakeCon (dataConSourceArity dcon)
| 67
| false
| true
| 0
| 8
| 18
| 31
| 15
| 16
| null | null |
ezyang/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
modIntIdKey = mkPreludeMiscIdUnique 24
| 56
|
modIntIdKey = mkPreludeMiscIdUnique 24
| 56
|
modIntIdKey = mkPreludeMiscIdUnique 24
| 56
| false
| false
| 0
| 5
| 21
| 9
| 4
| 5
| null | null |
passionfruit18/ldl_exposition
|
src/LDLogic.hs
|
gpl-3.0
|
reg2nnf :: Reg p -> RegNNF p
{-
reg2nnf (Reg x) = RegNNF $ (foldReg Base fr Plus Comp Star) x where -- Reg and RegNNF wrapping and unwrapping the newtypes
fr = Test . ldl2nnf
-}
reg2nnf = over Reg (foldReg Base fr Plus Comp Star) where
fr = Test . ldl2nnf
-- do we have to nnf the BasicPropLogic? Not sure. Well I don't think so.
{-
-- ** Eq and Ord derivation
deriving instance Ord p => Ord (LDLogicNNF p)
deriving instance Ord p => Ord (RegNNF p)
deriving instance Ord p => Ord (Literal p)
deriving instance Ord p => Ord (DOS p)
deriving instance Eq p => Eq (LDLogicNNF p)
deriving instance Eq p => Eq (RegNNF p)
deriving instance Eq p => Eq (Literal p)
deriving instance Eq p => Eq (DOS p)
-}
| 701
|
reg2nnf :: Reg p -> RegNNF p
reg2nnf = over Reg (foldReg Base fr Plus Comp Star) where
fr = Test . ldl2nnf
-- do we have to nnf the BasicPropLogic? Not sure. Well I don't think so.
{-
-- ** Eq and Ord derivation
deriving instance Ord p => Ord (LDLogicNNF p)
deriving instance Ord p => Ord (RegNNF p)
deriving instance Ord p => Ord (Literal p)
deriving instance Ord p => Ord (DOS p)
deriving instance Eq p => Eq (LDLogicNNF p)
deriving instance Eq p => Eq (RegNNF p)
deriving instance Eq p => Eq (Literal p)
deriving instance Eq p => Eq (DOS p)
-}
| 550
|
reg2nnf = over Reg (foldReg Base fr Plus Comp Star) where
fr = Test . ldl2nnf
-- do we have to nnf the BasicPropLogic? Not sure. Well I don't think so.
{-
-- ** Eq and Ord derivation
deriving instance Ord p => Ord (LDLogicNNF p)
deriving instance Ord p => Ord (RegNNF p)
deriving instance Ord p => Ord (Literal p)
deriving instance Ord p => Ord (DOS p)
deriving instance Eq p => Eq (LDLogicNNF p)
deriving instance Eq p => Eq (RegNNF p)
deriving instance Eq p => Eq (Literal p)
deriving instance Eq p => Eq (DOS p)
-}
| 521
| true
| true
| 0
| 7
| 145
| 53
| 28
| 25
| null | null |
JamieBeverley/InnerEar
|
src/InnerEar/Exercises/SpectralShape.hs
|
gpl-3.0
|
-- represents fundamental frequency for sound generation
configs :: [Config]
configs = [F 100 "100 Hz",F 200 "200 Hz", F 400 "400 Hz", F 800 "800 Hz", F 1600 "1600Hz", F 3200 "3200Hz"]
| 185
|
configs :: [Config]
configs = [F 100 "100 Hz",F 200 "200 Hz", F 400 "400 Hz", F 800 "800 Hz", F 1600 "1600Hz", F 3200 "3200Hz"]
| 127
|
configs = [F 100 "100 Hz",F 200 "200 Hz", F 400 "400 Hz", F 800 "800 Hz", F 1600 "1600Hz", F 3200 "3200Hz"]
| 107
| true
| true
| 0
| 6
| 33
| 63
| 33
| 30
| null | null |
amir/hmscrobbler
|
src/LastFM.hs
|
unlicense
|
getLastfmSession' :: Text -> Text -> IO (Maybe Text)
getLastfmSession' key secret = withConnection $ \conn -> do
to <- getLastfmToken key
case to of
Just t -> do
let b = pack t
putStrLn $ "approve: " ++ link (apiKey key <* token b)
_ <- getChar
r <- lastfm conn . sign (Secret secret) $ getSession <*> token b <*> apiKey key <* json
case r of
Right p ->
case parseMaybe getSession' p of
Just s -> do
writeSession s
return $ Just s
Nothing -> return Nothing
Left e ->
return Nothing
| 607
|
getLastfmSession' :: Text -> Text -> IO (Maybe Text)
getLastfmSession' key secret = withConnection $ \conn -> do
to <- getLastfmToken key
case to of
Just t -> do
let b = pack t
putStrLn $ "approve: " ++ link (apiKey key <* token b)
_ <- getChar
r <- lastfm conn . sign (Secret secret) $ getSession <*> token b <*> apiKey key <* json
case r of
Right p ->
case parseMaybe getSession' p of
Just s -> do
writeSession s
return $ Just s
Nothing -> return Nothing
Left e ->
return Nothing
| 607
|
getLastfmSession' key secret = withConnection $ \conn -> do
to <- getLastfmToken key
case to of
Just t -> do
let b = pack t
putStrLn $ "approve: " ++ link (apiKey key <* token b)
_ <- getChar
r <- lastfm conn . sign (Secret secret) $ getSession <*> token b <*> apiKey key <* json
case r of
Right p ->
case parseMaybe getSession' p of
Just s -> do
writeSession s
return $ Just s
Nothing -> return Nothing
Left e ->
return Nothing
| 554
| false
| true
| 0
| 25
| 221
| 236
| 103
| 133
| null | null |
nevrenato/HetsAlloy
|
Comorphisms/SuleCFOL2SoftFOL.hs
|
gpl-2.0
|
transFuncMap :: IdTypeSPIdMap ->
CSign.Sign e f ->
(FuncMap, IdTypeSPIdMap)
transFuncMap idMap sign = Map.foldWithKey toSPOpType (Map.empty, idMap)
. MapSet.toMap $ CSign.opMap sign
where toSPOpType iden typeSet (fm, im) =
if isSingleton typeSet then
let oType = Set.findMin typeSet
sid' = sid fm oType
in (Map.insert sid' (Set.singleton (transOpType oType)) fm,
insertSPId iden (COp oType) sid' im)
else foldr insOIdSet (fm, im)
$ Rel.partSet (leqF sign) typeSet
where insOIdSet tset (fm', im') =
let sid' = sid fm' (Set.findMax tset)
in (Map.insert sid' (Set.map transOpType tset) fm',
Set.fold (\ x -> insertSPId iden (COp x) sid')
im' tset)
sid fma t = disSPOId CKOp (transId CKOp iden)
(uType (transOpType t))
(Set.union (Map.keysSet fma)
(elemsSPIdSet idMap))
uType t = fst t ++ [snd t]
| 1,239
|
transFuncMap :: IdTypeSPIdMap ->
CSign.Sign e f ->
(FuncMap, IdTypeSPIdMap)
transFuncMap idMap sign = Map.foldWithKey toSPOpType (Map.empty, idMap)
. MapSet.toMap $ CSign.opMap sign
where toSPOpType iden typeSet (fm, im) =
if isSingleton typeSet then
let oType = Set.findMin typeSet
sid' = sid fm oType
in (Map.insert sid' (Set.singleton (transOpType oType)) fm,
insertSPId iden (COp oType) sid' im)
else foldr insOIdSet (fm, im)
$ Rel.partSet (leqF sign) typeSet
where insOIdSet tset (fm', im') =
let sid' = sid fm' (Set.findMax tset)
in (Map.insert sid' (Set.map transOpType tset) fm',
Set.fold (\ x -> insertSPId iden (COp x) sid')
im' tset)
sid fma t = disSPOId CKOp (transId CKOp iden)
(uType (transOpType t))
(Set.union (Map.keysSet fma)
(elemsSPIdSet idMap))
uType t = fst t ++ [snd t]
| 1,239
|
transFuncMap idMap sign = Map.foldWithKey toSPOpType (Map.empty, idMap)
. MapSet.toMap $ CSign.opMap sign
where toSPOpType iden typeSet (fm, im) =
if isSingleton typeSet then
let oType = Set.findMin typeSet
sid' = sid fm oType
in (Map.insert sid' (Set.singleton (transOpType oType)) fm,
insertSPId iden (COp oType) sid' im)
else foldr insOIdSet (fm, im)
$ Rel.partSet (leqF sign) typeSet
where insOIdSet tset (fm', im') =
let sid' = sid fm' (Set.findMax tset)
in (Map.insert sid' (Set.map transOpType tset) fm',
Set.fold (\ x -> insertSPId iden (COp x) sid')
im' tset)
sid fma t = disSPOId CKOp (transId CKOp iden)
(uType (transOpType t))
(Set.union (Map.keysSet fma)
(elemsSPIdSet idMap))
uType t = fst t ++ [snd t]
| 1,131
| false
| true
| 1
| 15
| 569
| 379
| 189
| 190
| null | null |
divarvel/hammertime
|
tests/Hammertime/CLI/Tests.hs
|
gpl-3.0
|
testBogusStart =
let result = runCliParser ["start"]
in case result of
Left (ParserFailure m _) -> m "test" >> return ()
Right a -> assertFailure "bogus start accepted"
--------------------------------------------------------------------------------
-- Stop
--
| 285
|
testBogusStart =
let result = runCliParser ["start"]
in case result of
Left (ParserFailure m _) -> m "test" >> return ()
Right a -> assertFailure "bogus start accepted"
--------------------------------------------------------------------------------
-- Stop
--
| 285
|
testBogusStart =
let result = runCliParser ["start"]
in case result of
Left (ParserFailure m _) -> m "test" >> return ()
Right a -> assertFailure "bogus start accepted"
--------------------------------------------------------------------------------
-- Stop
--
| 285
| false
| false
| 1
| 12
| 56
| 74
| 34
| 40
| null | null |
fpco/fay
|
src/Fay/Compiler.hs
|
bsd-3-clause
|
compileModuleFromAST _ mod = throwError $ UnsupportedModuleSyntax "compileModuleFromAST" mod
| 92
|
compileModuleFromAST _ mod = throwError $ UnsupportedModuleSyntax "compileModuleFromAST" mod
| 92
|
compileModuleFromAST _ mod = throwError $ UnsupportedModuleSyntax "compileModuleFromAST" mod
| 92
| false
| false
| 0
| 6
| 8
| 20
| 9
| 11
| null | null |
ml9951/ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
size_type ty | Just exp_ty <- tcView ty = size_type exp_ty
| 58
|
size_type ty | Just exp_ty <- tcView ty = size_type exp_ty
| 58
|
size_type ty | Just exp_ty <- tcView ty = size_type exp_ty
| 58
| false
| false
| 0
| 9
| 10
| 31
| 12
| 19
| null | null |
ConsensusResearch/MultiBranch
|
forging.hs
|
gpl-2.0
|
geN :: BN -> BN -> PS.Bool
geN x y = bool2bool (x>=y)
| 53
|
geN :: BN -> BN -> PS.Bool
geN x y = bool2bool (x>=y)
| 53
|
geN x y = bool2bool (x>=y)
| 26
| false
| true
| 0
| 7
| 12
| 40
| 19
| 21
| null | null |
mvr/cf
|
src/Math/ContinuedFraction/Interval.hs
|
mit
|
mergeInterval (Interval Infinity (Finite s) _) (Interval Infinity Infinity _)
= Interval Infinity Infinity True
| 113
|
mergeInterval (Interval Infinity (Finite s) _) (Interval Infinity Infinity _)
= Interval Infinity Infinity True
| 113
|
mergeInterval (Interval Infinity (Finite s) _) (Interval Infinity Infinity _)
= Interval Infinity Infinity True
| 113
| false
| false
| 0
| 9
| 16
| 44
| 21
| 23
| null | null |
alexander-at-github/eta
|
compiler/ETA/DeSugar/Coverage.hs
|
bsd-3-clause
|
addTickStmtAndBinders :: Maybe (Bool -> BoxLabel) -> ParStmtBlock Id Id
-> TM (ParStmtBlock Id Id)
addTickStmtAndBinders isGuard (ParStmtBlock stmts ids returnExpr) =
liftM3 ParStmtBlock
(addTickLStmts isGuard stmts)
(return ids)
(addTickSyntaxExpr hpcSrcSpan returnExpr)
| 321
|
addTickStmtAndBinders :: Maybe (Bool -> BoxLabel) -> ParStmtBlock Id Id
-> TM (ParStmtBlock Id Id)
addTickStmtAndBinders isGuard (ParStmtBlock stmts ids returnExpr) =
liftM3 ParStmtBlock
(addTickLStmts isGuard stmts)
(return ids)
(addTickSyntaxExpr hpcSrcSpan returnExpr)
| 321
|
addTickStmtAndBinders isGuard (ParStmtBlock stmts ids returnExpr) =
liftM3 ParStmtBlock
(addTickLStmts isGuard stmts)
(return ids)
(addTickSyntaxExpr hpcSrcSpan returnExpr)
| 200
| false
| true
| 0
| 10
| 81
| 99
| 45
| 54
| null | null |
gspia/reflex-dom-htmlea
|
lib/src/Reflex/Dom/HTML5/Elements/Elements.hs
|
bsd-3-clause
|
-- | A short-hand notion for @ elDynAttr\' \"option\" ... @
optionD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Option → m a → m (Element EventResult (DomBuilderSpace m) t, a)
optionD' bm = elDynAttr' "option" (A.attrMap <$> bm)
| 246
|
optionD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Option → m a → m (Element EventResult (DomBuilderSpace m) t, a)
optionD' bm = elDynAttr' "option" (A.attrMap <$> bm)
| 186
|
optionD' bm = elDynAttr' "option" (A.attrMap <$> bm)
| 53
| true
| true
| 0
| 14
| 46
| 97
| 49
| 48
| null | null |
Austin-Haskell/origami
|
bools.hs
|
gpl-3.0
|
myAny' f xs = foldr (\x -> \y -> ) False xs
| 43
|
myAny' f xs = foldr (\x -> \y -> ) False xs
| 43
|
myAny' f xs = foldr (\x -> \y -> ) False xs
| 43
| false
| false
| 0
| 8
| 11
| 32
| 16
| 16
| null | null |
yuvallanger/threepenny-gui
|
src/Graphics/UI/Threepenny/Attributes.hs
|
bsd-3-clause
|
colspan = intAttr "colspan"
| 41
|
colspan = intAttr "colspan"
| 41
|
colspan = intAttr "colspan"
| 41
| false
| false
| 1
| 5
| 17
| 12
| 4
| 8
| null | null |
tkasu/haskellbook-adventure
|
app/Chap11.hs
|
bsd-3-clause
|
-- acceptance test for mapTree
mapOkay =
if mapTree (+1) testTree' == mapExpected
then print "yup okay!"
else error "test failed!"
| 143
|
mapOkay =
if mapTree (+1) testTree' == mapExpected
then print "yup okay!"
else error "test failed!"
| 112
|
mapOkay =
if mapTree (+1) testTree' == mapExpected
then print "yup okay!"
else error "test failed!"
| 112
| true
| false
| 1
| 8
| 33
| 37
| 18
| 19
| null | null |
alpicola/mel
|
src/K/Eliminate.hs
|
mit
|
elimDecl :: KDecl -> Elim KDecl
elimDecl (KFunDecl b bs e) = do
b' <- elimBinder b
e' <- elimExpr e
bs' <- mapM elimBinder bs
return $ KFunDecl b' bs' e'
| 161
|
elimDecl :: KDecl -> Elim KDecl
elimDecl (KFunDecl b bs e) = do
b' <- elimBinder b
e' <- elimExpr e
bs' <- mapM elimBinder bs
return $ KFunDecl b' bs' e'
| 161
|
elimDecl (KFunDecl b bs e) = do
b' <- elimBinder b
e' <- elimExpr e
bs' <- mapM elimBinder bs
return $ KFunDecl b' bs' e'
| 129
| false
| true
| 0
| 9
| 39
| 82
| 35
| 47
| null | null |
marknsikora/codejam
|
351101/C.hs
|
mit
|
numify c = replicate count digit where
digit = case findIndex (c `elem`) dict of
Just n -> intToDigit n
Nothing -> error "Invalid character"
count = case elemIndex c =<< find (c `elem`) dict of
Just n -> n + 1
Nothing -> error "Invalid character"
dict = [" ","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"]
| 336
|
numify c = replicate count digit where
digit = case findIndex (c `elem`) dict of
Just n -> intToDigit n
Nothing -> error "Invalid character"
count = case elemIndex c =<< find (c `elem`) dict of
Just n -> n + 1
Nothing -> error "Invalid character"
dict = [" ","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"]
| 336
|
numify c = replicate count digit where
digit = case findIndex (c `elem`) dict of
Just n -> intToDigit n
Nothing -> error "Invalid character"
count = case elemIndex c =<< find (c `elem`) dict of
Just n -> n + 1
Nothing -> error "Invalid character"
dict = [" ","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"]
| 336
| false
| false
| 0
| 10
| 74
| 141
| 76
| 65
| null | null |
green-haskell/ghc
|
compiler/cmm/CLabel.hs
|
bsd-3-clause
|
labelType (RtsLabel (RtsApFast _)) = CodeLabel
| 59
|
labelType (RtsLabel (RtsApFast _)) = CodeLabel
| 59
|
labelType (RtsLabel (RtsApFast _)) = CodeLabel
| 59
| false
| false
| 0
| 9
| 18
| 21
| 10
| 11
| null | null |
headprogrammingczar/cabal
|
cabal-install/Distribution/Client/IndexUtils.hs
|
bsd-3-clause
|
-- TODO: Are we sure no unicode?
------------------------------------------------------------------------
-- Reading and updating the index cache
--
-- | Variation on 'sequence' which evaluates the actions lazily
--
-- Pattern matching on the result list will execute just the first action;
-- more generally pattern matching on the first @n@ '(:)' nodes will execute
-- the first @n@ actions.
lazySequence :: [IO a] -> IO [a]
lazySequence = unsafeInterleaveIO . go
where
go [] = return []
go (x:xs) = do x' <- x
xs' <- lazySequence xs
return (x' : xs')
-- | Which index do we mean?
| 638
|
lazySequence :: [IO a] -> IO [a]
lazySequence = unsafeInterleaveIO . go
where
go [] = return []
go (x:xs) = do x' <- x
xs' <- lazySequence xs
return (x' : xs')
-- | Which index do we mean?
| 242
|
lazySequence = unsafeInterleaveIO . go
where
go [] = return []
go (x:xs) = do x' <- x
xs' <- lazySequence xs
return (x' : xs')
-- | Which index do we mean?
| 209
| true
| true
| 1
| 10
| 153
| 103
| 55
| 48
| null | null |
jfoutz/language-bash
|
src/Language/Bash/Parse/Word.hs
|
bsd-3-clause
|
-- | Parse a here document as a word. This parses substitutions, but not
-- most quoting.
heredocWord :: Stream s m Char => ParsecT s u m Word
heredocWord = spans [] True inner
where
inner = try (Escape <$ char '\\' <*> oneOf "$\\`")
<|> backquote
<|> dollar
-- | Parse a parameter name.
| 310
|
heredocWord :: Stream s m Char => ParsecT s u m Word
heredocWord = spans [] True inner
where
inner = try (Escape <$ char '\\' <*> oneOf "$\\`")
<|> backquote
<|> dollar
-- | Parse a parameter name.
| 220
|
heredocWord = spans [] True inner
where
inner = try (Escape <$ char '\\' <*> oneOf "$\\`")
<|> backquote
<|> dollar
-- | Parse a parameter name.
| 167
| true
| true
| 0
| 11
| 78
| 79
| 39
| 40
| null | null |
haskellbr/missingh
|
missingh-all/src/Data/List/Utils.hs
|
mit
|
-- An empty search list: always false
hasAny _ [] = False
| 57
|
hasAny _ [] = False
| 19
|
hasAny _ [] = False
| 19
| true
| false
| 0
| 6
| 11
| 14
| 7
| 7
| null | null |
zerobuzz/reasonable-lens
|
src/Control/Lens/Util/TH.hs
|
mit
|
bndrName (KindedTV n _) = n
| 27
|
bndrName (KindedTV n _) = n
| 27
|
bndrName (KindedTV n _) = n
| 27
| false
| false
| 0
| 7
| 5
| 17
| 8
| 9
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.