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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kolmodin/cabal | Cabal/Distribution/PackageDescription.hs | bsd-3-clause | defaultRenaming :: ModuleRenaming
defaultRenaming = ModuleRenaming True [] | 74 | defaultRenaming :: ModuleRenaming
defaultRenaming = ModuleRenaming True [] | 74 | defaultRenaming = ModuleRenaming True [] | 40 | false | true | 0 | 6 | 7 | 18 | 9 | 9 | null | null |
kmerz/noodle | src/main.hs | bsd-2-clause | getVoteNames = foldl voteNameMap M.empty | 40 | getVoteNames = foldl voteNameMap M.empty | 40 | getVoteNames = foldl voteNameMap M.empty | 40 | false | false | 0 | 6 | 4 | 13 | 6 | 7 | null | null |
typelead/epm | epm/Distribution/Client/Config.hs | bsd-3-clause | liftReportFlag :: FieldDescr ReportFlags -> FieldDescr SavedConfig
liftReportFlag = liftField
savedReportFlags (\flags conf -> conf { savedReportFlags = flags }) | 163 | liftReportFlag :: FieldDescr ReportFlags -> FieldDescr SavedConfig
liftReportFlag = liftField
savedReportFlags (\flags conf -> conf { savedReportFlags = flags }) | 163 | liftReportFlag = liftField
savedReportFlags (\flags conf -> conf { savedReportFlags = flags }) | 96 | false | true | 0 | 9 | 21 | 45 | 23 | 22 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/Script/Unicode.hs | mit | splitText :: Text -> FileReference -> Either Error [(Composed, FileCharReference)]
splitText t r = ensureConsistent t r & _Right . each . _1 %~ Composed | 152 | splitText :: Text -> FileReference -> Either Error [(Composed, FileCharReference)]
splitText t r = ensureConsistent t r & _Right . each . _1 %~ Composed | 152 | splitText t r = ensureConsistent t r & _Right . each . _1 %~ Composed | 69 | false | true | 0 | 10 | 24 | 65 | 31 | 34 | null | null |
sherwoodwang/wxHaskell | wx/src/Graphics/UI/WX/Controls.hs | lgpl-2.1 | -- | Create a single-line text entry control. Note: 'alignment' has to
-- be set at creation time (or the entry has default alignment (=left) ).
-- This is an alias for textEntry
--
-- * Instances: 'Wrap', 'Aligned', 'Commanding', 'Updating' -- 'Textual', 'Literate', 'Dimensions', 'Colored', 'Visible', 'Child',
-- ... | 510 | entry :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ())
entry parent props
= textCtrlEx parent getRichTE props | 118 | entry parent props
= textCtrlEx parent getRichTE props | 56 | true | true | 0 | 11 | 89 | 70 | 36 | 34 | null | null |
supki/liblastfm | src/Lastfm/Request.hs | mit | -- | Change request API method
--
-- Primarily used in API call wrappers, not intended for usage by library user
api :: Text -> Request f a
api = add "method" | 158 | api :: Text -> Request f a
api = add "method" | 45 | api = add "method" | 18 | true | true | 0 | 7 | 31 | 32 | 15 | 17 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs | mpl-2.0 | -- | The creation time of the event.
aeCreateTime :: Lens' ApplicationEvent (Maybe UTCTime)
aeCreateTime
= lens _aeCreateTime (\ s a -> s{_aeCreateTime = a})
. mapping _DateTime | 185 | aeCreateTime :: Lens' ApplicationEvent (Maybe UTCTime)
aeCreateTime
= lens _aeCreateTime (\ s a -> s{_aeCreateTime = a})
. mapping _DateTime | 148 | aeCreateTime
= lens _aeCreateTime (\ s a -> s{_aeCreateTime = a})
. mapping _DateTime | 93 | true | true | 2 | 9 | 35 | 59 | 28 | 31 | null | null |
bobgru/conifer | src/Conics.hs | bsd-3-clause | drawEllipse :: EllipseInfo -> Diagram B
drawEllipse ei = unitCircle # transformByEllipseInfo ei | 95 | drawEllipse :: EllipseInfo -> Diagram B
drawEllipse ei = unitCircle # transformByEllipseInfo ei | 95 | drawEllipse ei = unitCircle # transformByEllipseInfo ei | 55 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
lenary/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | implicitNamesIn :: [Name] -> IState -> PTerm -> [Name]
implicitNamesIn uvars ist tm
= let (imps, fns) = execState (ni 0 [] tm) ([], []) in
nub imps \\ nub fns
where
addImp n = do (imps, fns) <- get
put (n : imps, fns)
addFn n = do (imps, fns) <- get
put (i... | 3,119 | implicitNamesIn :: [Name] -> IState -> PTerm -> [Name]
implicitNamesIn uvars ist tm
= let (imps, fns) = execState (ni 0 [] tm) ([], []) in
nub imps \\ nub fns
where
addImp n = do (imps, fns) <- get
put (n : imps, fns)
addFn n = do (imps, fns) <- get
put (i... | 3,119 | implicitNamesIn uvars ist tm
= let (imps, fns) = execState (ni 0 [] tm) ([], []) in
nub imps \\ nub fns
where
addImp n = do (imps, fns) <- get
put (n : imps, fns)
addFn n = do (imps, fns) <- get
put (imps, n: fns)
notCAF [] = False
notCAF (PExp _ ... | 3,064 | false | true | 11 | 13 | 1,449 | 1,566 | 730 | 836 | null | null |
dongarerahul/lyah | chapter11-functorApplicativeMonad/Lift.hs | apache-2.0 | sequenceAA (x:xs) = (:) <$> x <*> sequenceAA xs | 48 | sequenceAA (x:xs) = (:) <$> x <*> sequenceAA xs | 48 | sequenceAA (x:xs) = (:) <$> x <*> sequenceAA xs | 48 | false | false | 5 | 6 | 9 | 35 | 17 | 18 | null | null |
sonyandy/var | src/Data/Tuple/ITuple.hs | bsd-3-clause | toTupleDefault :: (Generic t, GITuple (Rep t)) => t -> Tuple (ListRepDefault t)
toTupleDefault = flip gcons U . from | 116 | toTupleDefault :: (Generic t, GITuple (Rep t)) => t -> Tuple (ListRepDefault t)
toTupleDefault = flip gcons U . from | 116 | toTupleDefault = flip gcons U . from | 36 | false | true | 0 | 9 | 19 | 54 | 27 | 27 | null | null |
leroux/packages-haskeline | System/Console/Haskeline/Backend/Terminfo.hs | bsd-2-clause | lookupCells :: TermRows -> Int -> Int
lookupCells (TermRows rc _) r = Map.findWithDefault 0 r rc | 96 | lookupCells :: TermRows -> Int -> Int
lookupCells (TermRows rc _) r = Map.findWithDefault 0 r rc | 96 | lookupCells (TermRows rc _) r = Map.findWithDefault 0 r rc | 58 | false | true | 0 | 7 | 16 | 41 | 20 | 21 | null | null |
benkolera/phb | hs/Site/WorkCategory.hs | mit | listWorkCategorysSplices :: PhbSplice
listWorkCategorysSplices =
C.withSplices
C.runChildren
("workCategoryRow" ## workCategoryRowSplice)
. lift $ do
runPersist $ do
ct <- liftIO getCurrentTime
loadActiveWorkCategories ct | 245 | listWorkCategorysSplices :: PhbSplice
listWorkCategorysSplices =
C.withSplices
C.runChildren
("workCategoryRow" ## workCategoryRowSplice)
. lift $ do
runPersist $ do
ct <- liftIO getCurrentTime
loadActiveWorkCategories ct | 245 | listWorkCategorysSplices =
C.withSplices
C.runChildren
("workCategoryRow" ## workCategoryRowSplice)
. lift $ do
runPersist $ do
ct <- liftIO getCurrentTime
loadActiveWorkCategories ct | 207 | false | true | 3 | 12 | 46 | 68 | 28 | 40 | null | null |
AlexanderPankiv/ghc | compiler/cmm/PprC.hs | bsd-3-clause | machRep_F_CType _ = panic "machRep_F_CType" | 45 | machRep_F_CType _ = panic "machRep_F_CType" | 45 | machRep_F_CType _ = panic "machRep_F_CType" | 45 | false | false | 0 | 4 | 6 | 13 | 5 | 8 | null | null |
eggzilla/BioHMM | src/Bio/HMMParser.hs | gpl-3.0 | genParseHMMER3s :: GenParser Char st [HMMER3]
genParseHMMER3s = do
hmmers <- many1 genParseHMMER3
eof
return hmmers
-- | Parse the input as HMMER3 datatype | 163 | genParseHMMER3s :: GenParser Char st [HMMER3]
genParseHMMER3s = do
hmmers <- many1 genParseHMMER3
eof
return hmmers
-- | Parse the input as HMMER3 datatype | 163 | genParseHMMER3s = do
hmmers <- many1 genParseHMMER3
eof
return hmmers
-- | Parse the input as HMMER3 datatype | 117 | false | true | 0 | 8 | 31 | 41 | 19 | 22 | null | null |
jml/hazard | lib/Hazard/Games.hs | apache-2.0 | joinGame _ (Finished {}) = throwError AlreadyFinished | 53 | joinGame _ (Finished {}) = throwError AlreadyFinished | 53 | joinGame _ (Finished {}) = throwError AlreadyFinished | 53 | false | false | 0 | 7 | 6 | 21 | 10 | 11 | null | null |
acple/renzu | src/Renzu/Getter.hs | bsd-3-clause | preview :: MonadReader s m => Fold (Alt Maybe a) s t a b -> m (Maybe a)
preview l = previews l id | 97 | preview :: MonadReader s m => Fold (Alt Maybe a) s t a b -> m (Maybe a)
preview l = previews l id | 97 | preview l = previews l id | 25 | false | true | 0 | 10 | 23 | 66 | 29 | 37 | null | null |
brendanhay/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/ExpansionFiles/Patch.hs | mpl-2.0 | -- | Multipart request metadata.
eefpPayload :: Lens' EditsExpansionFilesPatch ExpansionFile
eefpPayload
= lens _eefpPayload (\ s a -> s{_eefpPayload = a}) | 157 | eefpPayload :: Lens' EditsExpansionFilesPatch ExpansionFile
eefpPayload
= lens _eefpPayload (\ s a -> s{_eefpPayload = a}) | 124 | eefpPayload
= lens _eefpPayload (\ s a -> s{_eefpPayload = a}) | 64 | true | true | 1 | 9 | 22 | 44 | 22 | 22 | null | null |
IreneKnapp/direct-http | Haskell/Network/HTTP.hs | mit | fromHeader HttpHost = UTF8.fromString "Host" | 44 | fromHeader HttpHost = UTF8.fromString "Host" | 44 | fromHeader HttpHost = UTF8.fromString "Host" | 44 | false | false | 0 | 6 | 4 | 14 | 6 | 8 | null | null |
mettekou/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | pprPat (AsPat name pat) = hcat [pprPrefixOcc (unLoc name), char '@', pprParendLPat pat] | 93 | pprPat (AsPat name pat) = hcat [pprPrefixOcc (unLoc name), char '@', pprParendLPat pat] | 93 | pprPat (AsPat name pat) = hcat [pprPrefixOcc (unLoc name), char '@', pprParendLPat pat] | 93 | false | false | 0 | 9 | 18 | 45 | 21 | 24 | null | null |
siddhanathan/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | fromListClassOpKey = mkPreludeMiscIdUnique 199 | 46 | fromListClassOpKey = mkPreludeMiscIdUnique 199 | 46 | fromListClassOpKey = mkPreludeMiscIdUnique 199 | 46 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
acowley/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | word16TyConKey = mkPreludeTyConUnique 61 | 65 | word16TyConKey = mkPreludeTyConUnique 61 | 65 | word16TyConKey = mkPreludeTyConUnique 61 | 65 | false | false | 0 | 5 | 28 | 9 | 4 | 5 | null | null |
Atidot/hs-mesos | src/System/Mesos/Internal.hs | mit | peekMaybeCPP pp = do
p <- peek pp
if p == Ptr.nullPtr
then return Nothing
else fmap Just $ peekCPP p | 112 | peekMaybeCPP pp = do
p <- peek pp
if p == Ptr.nullPtr
then return Nothing
else fmap Just $ peekCPP p | 112 | peekMaybeCPP pp = do
p <- peek pp
if p == Ptr.nullPtr
then return Nothing
else fmap Just $ peekCPP p | 112 | false | false | 0 | 9 | 32 | 49 | 22 | 27 | null | null |
jwiegley/ghc-release | libraries/binary/benchmarks/Get.hs | gpl-3.0 | runAttoL decoder inp = case AL.parse decoder inp of
AL.Done _ r -> r
a -> error (show a)
-- Defs. | 146 | runAttoL decoder inp = case AL.parse decoder inp of
AL.Done _ r -> r
a -> error (show a)
-- Defs. | 146 | runAttoL decoder inp = case AL.parse decoder inp of
AL.Done _ r -> r
a -> error (show a)
-- Defs. | 146 | false | false | 0 | 10 | 69 | 51 | 24 | 27 | null | null |
shlevy/ghc | compiler/cmm/BlockId.hs | bsd-3-clause | mkBlockId :: Unique -> BlockId
mkBlockId unique = mkHooplLabel $ getKey unique | 78 | mkBlockId :: Unique -> BlockId
mkBlockId unique = mkHooplLabel $ getKey unique | 78 | mkBlockId unique = mkHooplLabel $ getKey unique | 47 | false | true | 2 | 7 | 11 | 31 | 13 | 18 | null | null |
oldmanmike/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isSigmaTy (ForAllTy (Anon a) _) = isPredTy a | 46 | isSigmaTy (ForAllTy (Anon a) _) = isPredTy a | 46 | isSigmaTy (ForAllTy (Anon a) _) = isPredTy a | 46 | false | false | 0 | 8 | 9 | 27 | 12 | 15 | null | null |
jml/hodor | Hodor/Commands.hs | apache-2.0 | cmdListContexts :: HodorM ()
cmdListContexts = do
allContexts <$> loadTodoFile >>= mapM_ (liftIO . putStrLn . format) | 119 | cmdListContexts :: HodorM ()
cmdListContexts = do
allContexts <$> loadTodoFile >>= mapM_ (liftIO . putStrLn . format) | 119 | cmdListContexts = do
allContexts <$> loadTodoFile >>= mapM_ (liftIO . putStrLn . format) | 90 | false | true | 0 | 11 | 18 | 41 | 20 | 21 | null | null |
chreekat/snowdrift | Import.hs | agpl-3.0 | -- Like Database.Esqueleto.valList, but more generic.
valList :: (Esqueleto query expr backend, PersistField typ, Foldable l) => l typ -> expr (ValueList typ)
valList = Database.Esqueleto.valList . toList | 204 | valList :: (Esqueleto query expr backend, PersistField typ, Foldable l) => l typ -> expr (ValueList typ)
valList = Database.Esqueleto.valList . toList | 150 | valList = Database.Esqueleto.valList . toList | 45 | true | true | 0 | 9 | 27 | 60 | 31 | 29 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Codebase.hs | mit | getTypeOfReferent :: (BuiltinAnnotation a, Var v, Monad m)
=> Codebase m v a -> Referent.Referent -> m (Maybe (Type v a))
getTypeOfReferent c (Referent.Ref r) = getTypeOfTerm c r | 196 | getTypeOfReferent :: (BuiltinAnnotation a, Var v, Monad m)
=> Codebase m v a -> Referent.Referent -> m (Maybe (Type v a))
getTypeOfReferent c (Referent.Ref r) = getTypeOfTerm c r | 196 | getTypeOfReferent c (Referent.Ref r) = getTypeOfTerm c r | 56 | false | true | 0 | 12 | 46 | 84 | 41 | 43 | null | null |
phylake/avm3 | abc/util.hs | mit | toBytes {- 0x20 -} (PushNull) = 1 | 33 | toBytes {- 0x20 -} (PushNull) = 1 | 33 | toBytes {- 0x20 -} (PushNull) = 1 | 33 | false | false | 0 | 6 | 6 | 13 | 7 | 6 | null | null |
gabesoft/kapi | src/Api/Xandar.hs | bsd-3-clause | mkPostQueryGetSingleLink :: Text -> String
mkPostQueryGetSingleLink = mkLink1 apiPostQueryProxy apiPostQueryProxyGetSingle | 122 | mkPostQueryGetSingleLink :: Text -> String
mkPostQueryGetSingleLink = mkLink1 apiPostQueryProxy apiPostQueryProxyGetSingle | 122 | mkPostQueryGetSingleLink = mkLink1 apiPostQueryProxy apiPostQueryProxyGetSingle | 79 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
diku-dk/futhark | unittests/Futhark/IR/Mem/IxFunTests.hs | isc | test_rotate_flatSlice_transpose_slice_iota :: [TestTree]
test_rotate_flatSlice_transpose_slice_iota =
singleton $
testCase "flatSlice . transpose . slice . iota " $
compareOps $
rotate (flatSlice (permute (slice (iota [20, 20]) $ Slice [DimSlice 1 5 2, DimSlice 1 5 2]) [1, 0]) flat_slice_1) [2, 1]
... | 376 | test_rotate_flatSlice_transpose_slice_iota :: [TestTree]
test_rotate_flatSlice_transpose_slice_iota =
singleton $
testCase "flatSlice . transpose . slice . iota " $
compareOps $
rotate (flatSlice (permute (slice (iota [20, 20]) $ Slice [DimSlice 1 5 2, DimSlice 1 5 2]) [1, 0]) flat_slice_1) [2, 1]
... | 376 | test_rotate_flatSlice_transpose_slice_iota =
singleton $
testCase "flatSlice . transpose . slice . iota " $
compareOps $
rotate (flatSlice (permute (slice (iota [20, 20]) $ Slice [DimSlice 1 5 2, DimSlice 1 5 2]) [1, 0]) flat_slice_1) [2, 1]
where
flat_slice_1 = FlatSlice 1 [FlatDimIndex 2 2] | 319 | false | true | 0 | 16 | 74 | 128 | 66 | 62 | null | null |
kowey/GenI | geni-gui/src/NLP/GenI/Gui.hs | gpl-2.0 | configGui :: ProgStateRef -> IO () -> IO ()
configGui pstRef loadFn = do
pst <- readIORef pstRef
--
f <- frame []
p <- panel f []
nb <- notebook p []
let browseTxt = "Browse"
--
let fakeBoxed title lst = hstretch $ column 3 $ map hfill $
[ hrule 1 , alignRight $ label title,... | 7,462 | configGui :: ProgStateRef -> IO () -> IO ()
configGui pstRef loadFn = do
pst <- readIORef pstRef
--
f <- frame []
p <- panel f []
nb <- notebook p []
let browseTxt = "Browse"
--
let fakeBoxed title lst = hstretch $ column 3 $ map hfill $
[ hrule 1 , alignRight $ label title,... | 7,462 | configGui pstRef loadFn = do
pst <- readIORef pstRef
--
f <- frame []
p <- panel f []
nb <- notebook p []
let browseTxt = "Browse"
--
let fakeBoxed title lst = hstretch $ column 3 $ map hfill $
[ hrule 1 , alignRight $ label title, vspace 5 ]
++ map hfill lst
le... | 7,417 | false | true | 0 | 24 | 2,588 | 1,600 | 773 | 827 | null | null |
stevejb71/Idris-dev | src/IRTS/CodegenJavaScript.hs | bsd-3-clause | jsERROR :: CompileInfo -> String -> JS
jsERROR _ = JSError | 58 | jsERROR :: CompileInfo -> String -> JS
jsERROR _ = JSError | 58 | jsERROR _ = JSError | 19 | false | true | 0 | 6 | 10 | 26 | 12 | 14 | null | null |
d0kt0r0/estuary | client/src/Estuary/Help/MiniTidal.hs | gpl-3.0 | referenceText "rarely" = "applies another function to a pattern, around 25% of the time, at random. It takes two inputs, the function to be applied, and the pattern you are applying it to." | 189 | referenceText "rarely" = "applies another function to a pattern, around 25% of the time, at random. It takes two inputs, the function to be applied, and the pattern you are applying it to." | 189 | referenceText "rarely" = "applies another function to a pattern, around 25% of the time, at random. It takes two inputs, the function to be applied, and the pattern you are applying it to." | 189 | false | false | 0 | 5 | 32 | 9 | 4 | 5 | null | null |
CulpaBS/wbBach | src/Futhark/Representation/SOACS/Simplify.hs | bsd-3-clause | removeUnnecessaryCopy _ _ = cannotSimplify | 42 | removeUnnecessaryCopy _ _ = cannotSimplify | 42 | removeUnnecessaryCopy _ _ = cannotSimplify | 42 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
Heather/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | getArgs (a:as) (RBind n (Pi _ _ ty _) sc) =
let (args, res) = getArgs as sc
erased = if InaccessibleArg `elem` argopts a then RErased else RNotErased
arg' = case a of
PImp {} -> RFunArg n ty RImplicit erased
PExp {} -> RFunArg n ty RExplicit erased
PConstraint ... | 443 | getArgs (a:as) (RBind n (Pi _ _ ty _) sc) =
let (args, res) = getArgs as sc
erased = if InaccessibleArg `elem` argopts a then RErased else RNotErased
arg' = case a of
PImp {} -> RFunArg n ty RImplicit erased
PExp {} -> RFunArg n ty RExplicit erased
PConstraint ... | 443 | getArgs (a:as) (RBind n (Pi _ _ ty _) sc) =
let (args, res) = getArgs as sc
erased = if InaccessibleArg `elem` argopts a then RErased else RNotErased
arg' = case a of
PImp {} -> RFunArg n ty RImplicit erased
PExp {} -> RFunArg n ty RExplicit erased
PConstraint ... | 443 | false | false | 1 | 12 | 144 | 185 | 91 | 94 | null | null |
srush/ProbDist | NLP/Probability/Distribution.hs | bsd-3-clause | estimateMLE :: (Ord event) => Estimator event (Observed event)
estimateMLE obs = Distribution $ prob
where
prob e = M.findWithDefault 0.0 e dist
total = calcTotal obs
dist = M.map (/ total) $ counts obs | 243 | estimateMLE :: (Ord event) => Estimator event (Observed event)
estimateMLE obs = Distribution $ prob
where
prob e = M.findWithDefault 0.0 e dist
total = calcTotal obs
dist = M.map (/ total) $ counts obs | 243 | estimateMLE obs = Distribution $ prob
where
prob e = M.findWithDefault 0.0 e dist
total = calcTotal obs
dist = M.map (/ total) $ counts obs | 180 | false | true | 0 | 9 | 75 | 86 | 43 | 43 | null | null |
np/lens | tests/hunit.hs | bsd-3-clause | case_read_state_record_field_and_apply_function =
runState test trig @?= (8, trig)
where test = use $ points.to last.to (vectorFrom origin).x | 145 | case_read_state_record_field_and_apply_function =
runState test trig @?= (8, trig)
where test = use $ points.to last.to (vectorFrom origin).x | 145 | case_read_state_record_field_and_apply_function =
runState test trig @?= (8, trig)
where test = use $ points.to last.to (vectorFrom origin).x | 145 | false | false | 5 | 8 | 20 | 59 | 27 | 32 | null | null |
enolan/cabal | Cabal/tests/PackageTests/PackageTester.hs | bsd-3-clause | assertOutputDoesNotContain :: String -> Result -> Assertion
assertOutputDoesNotContain needle result =
when (needle `isInfixOf` (concatOutput output)) $
assertFailure $
"unexpected: " ++ needle ++
" in output: " ++ output
where output = outputText result
-- | Replace line breaks with spaces, correctl... | 338 | assertOutputDoesNotContain :: String -> Result -> Assertion
assertOutputDoesNotContain needle result =
when (needle `isInfixOf` (concatOutput output)) $
assertFailure $
"unexpected: " ++ needle ++
" in output: " ++ output
where output = outputText result
-- | Replace line breaks with spaces, correctl... | 338 | assertOutputDoesNotContain needle result =
when (needle `isInfixOf` (concatOutput output)) $
assertFailure $
"unexpected: " ++ needle ++
" in output: " ++ output
where output = outputText result
-- | Replace line breaks with spaces, correctly handling "\r\n". | 278 | false | true | 0 | 14 | 63 | 74 | 38 | 36 | null | null |
nikivazou/hscolour | Language/Haskell/HsColour/InlineCSS.hs | gpl-2.0 | style ReverseVideo = "" | 25 | style ReverseVideo = "" | 25 | style ReverseVideo = "" | 25 | false | false | 0 | 4 | 5 | 10 | 4 | 6 | null | null |
capitanbatata/functional-systems-in-haskell | fsh-exercises/src/Rock2.hs | mit | outcome us them | us == them = Tie
| otherwise = Lose | 70 | outcome us them | us == them = Tie
| otherwise = Lose | 70 | outcome us them | us == them = Tie
| otherwise = Lose | 70 | false | false | 0 | 8 | 29 | 30 | 13 | 17 | null | null |
KommuSoft/dep-software | Dep.Printing.Schematics.hs | gpl-3.0 | --Turn contains the highest direction
shiftAdd :: (Bits b,Num b) => Int -> b -> b -> b
shiftAdd s m x = (x .&. m)+(shiftR x s .&. m) | 133 | shiftAdd :: (Bits b,Num b) => Int -> b -> b -> b
shiftAdd s m x = (x .&. m)+(shiftR x s .&. m) | 94 | shiftAdd s m x = (x .&. m)+(shiftR x s .&. m) | 45 | true | true | 0 | 9 | 30 | 74 | 37 | 37 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/ShippingSettings/Update.hs | mpl-2.0 | -- | V1 error format.
ssuXgafv :: Lens' ShippingSettingsUpdate (Maybe Xgafv)
ssuXgafv = lens _ssuXgafv (\ s a -> s{_ssuXgafv = a}) | 130 | ssuXgafv :: Lens' ShippingSettingsUpdate (Maybe Xgafv)
ssuXgafv = lens _ssuXgafv (\ s a -> s{_ssuXgafv = a}) | 108 | ssuXgafv = lens _ssuXgafv (\ s a -> s{_ssuXgafv = a}) | 53 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
Siprj/ragnarok | src/Network/SIP/Serialization/Uri.hs | mit | serializeUser Nothing = "" | 26 | serializeUser Nothing = "" | 26 | serializeUser Nothing = "" | 26 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
AaronShiny/Bezier | src/Graphics/Bezier.hs | gpl-2.0 | defPoint1d :: Point1d
defPoint1d = defCoordinate | 48 | defPoint1d :: Point1d
defPoint1d = defCoordinate | 48 | defPoint1d = defCoordinate | 26 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
kylcarte/wangtiles | src/Data/TileMap.hs | bsd-3-clause | tmSubMapsByIndex :: (CoordType c) => TileMap c -> [SubMap c]
tmSubMapsByIndex tm = map (`tmSubMapByIndex` tm) $ tmValues tm | 123 | tmSubMapsByIndex :: (CoordType c) => TileMap c -> [SubMap c]
tmSubMapsByIndex tm = map (`tmSubMapByIndex` tm) $ tmValues tm | 123 | tmSubMapsByIndex tm = map (`tmSubMapByIndex` tm) $ tmValues tm | 62 | false | true | 0 | 10 | 18 | 57 | 28 | 29 | null | null |
erantapaa/haskell-platform | hptool/src/Paths.hs | bsd-3-clause | hpSourceBase :: FilePath -> HpVersion -> FilePath
hpSourceBase part hp = hpSourceDir hp </> part | 96 | hpSourceBase :: FilePath -> HpVersion -> FilePath
hpSourceBase part hp = hpSourceDir hp </> part | 96 | hpSourceBase part hp = hpSourceDir hp </> part | 46 | false | true | 0 | 6 | 14 | 31 | 15 | 16 | null | null |
rfw/cosanostra | glue/run-day.hs | mit | main :: IO ()
main = do
[gamePath, ballotPath] <- getArgs
game <- either error id <$> decodeEither <$> BS.readFile gamePath
ballot <- either error id <$> decodeEither <$> BS.readFile ballotPath
let (_, game') = runState (either error id <$> (runExceptT $ runDay ballot)) game
game' `seq` BS.writeFil... | 345 | main :: IO ()
main = do
[gamePath, ballotPath] <- getArgs
game <- either error id <$> decodeEither <$> BS.readFile gamePath
ballot <- either error id <$> decodeEither <$> BS.readFile ballotPath
let (_, game') = runState (either error id <$> (runExceptT $ runDay ballot)) game
game' `seq` BS.writeFil... | 345 | main = do
[gamePath, ballotPath] <- getArgs
game <- either error id <$> decodeEither <$> BS.readFile gamePath
ballot <- either error id <$> decodeEither <$> BS.readFile ballotPath
let (_, game') = runState (either error id <$> (runExceptT $ runDay ballot)) game
game' `seq` BS.writeFile gamePath $ e... | 331 | false | true | 0 | 15 | 72 | 143 | 68 | 75 | null | null |
rjohnsondev/haskellshop | src/Render/Categories.hs | bsd-2-clause | -- Category Tree
interpretedRenderCategory :: Cat.Category -> I.Splice AppHandler
interpretedRenderCategory x = do
c <- lift $ with db $ Cat.children $ Just (Cat.categoryId x)
I.callTemplate "_interpreted_categories_children"
(do "category" ##
I.runChildrenWith
... | 591 | interpretedRenderCategory :: Cat.Category -> I.Splice AppHandler
interpretedRenderCategory x = do
c <- lift $ with db $ Cat.children $ Just (Cat.categoryId x)
I.callTemplate "_interpreted_categories_children"
(do "category" ##
I.runChildrenWith
(do... | 573 | interpretedRenderCategory x = do
c <- lift $ with db $ Cat.children $ Just (Cat.categoryId x)
I.callTemplate "_interpreted_categories_children"
(do "category" ##
I.runChildrenWith
(do "children" ## interpretedRenderCategories c
... | 508 | true | true | 0 | 21 | 208 | 161 | 74 | 87 | null | null |
beni55/ghcjs | src/Gen2/ClosureInfo.hs | mit | closureInfoStat debug (ClosureInfo obj rs name layout CIStackFrame srefs) =
setObjInfoL debug obj rs layout StackFrame name 0 srefs | 135 | closureInfoStat debug (ClosureInfo obj rs name layout CIStackFrame srefs) =
setObjInfoL debug obj rs layout StackFrame name 0 srefs | 135 | closureInfoStat debug (ClosureInfo obj rs name layout CIStackFrame srefs) =
setObjInfoL debug obj rs layout StackFrame name 0 srefs | 135 | false | false | 0 | 7 | 22 | 46 | 21 | 25 | null | null |
genos/online_problems | advent_of_code_2018/day04/src/Main.hs | mit | dateTime :: Parser DateTime
dateTime = do
_year <- char '[' *> decimal
_month <- char '-' *> decimal
_day <- char '-' *> decimal
_hour <- space *> decimal
_minute <- char ':' *> decimal <* char ']' <* space
pure DT { _year , _month , _day , _hour , _minute } | 278 | dateTime :: Parser DateTime
dateTime = do
_year <- char '[' *> decimal
_month <- char '-' *> decimal
_day <- char '-' *> decimal
_hour <- space *> decimal
_minute <- char ':' *> decimal <* char ']' <* space
pure DT { _year , _month , _day , _hour , _minute } | 278 | dateTime = do
_year <- char '[' *> decimal
_month <- char '-' *> decimal
_day <- char '-' *> decimal
_hour <- space *> decimal
_minute <- char ':' *> decimal <* char ']' <* space
pure DT { _year , _month , _day , _hour , _minute } | 250 | false | true | 0 | 11 | 73 | 115 | 54 | 61 | null | null |
phischu/fragnix | builtins/ghc-prim/GHC.Prim.hs | bsd-3-clause | -- | Add two vectors element-wise.
plusFloatX16# :: FloatX16# -> FloatX16# -> FloatX16#
plusFloatX16# = plusFloatX16# | 119 | plusFloatX16# :: FloatX16# -> FloatX16# -> FloatX16#
plusFloatX16# = plusFloatX16# | 82 | plusFloatX16# = plusFloatX16# | 29 | true | true | 0 | 8 | 17 | 27 | 12 | 15 | null | null |
ranjitjhala/gradr | Handler/Common.hs | mit | -- These handlers embed files in the executable at compile time to avoid a
-- runtime dependency, and for efficiency.
getFaviconR :: Handler TypedContent
getFaviconR = do cacheSeconds $ 60 * 60 * 24 * 30 -- cache for a month
return $ TypedContent "image/x-icon"
$ toContent $(em... | 349 | getFaviconR :: Handler TypedContent
getFaviconR = do cacheSeconds $ 60 * 60 * 24 * 30 -- cache for a month
return $ TypedContent "image/x-icon"
$ toContent $(embedFile "config/favicon.ico") | 230 | getFaviconR = do cacheSeconds $ 60 * 60 * 24 * 30 -- cache for a month
return $ TypedContent "image/x-icon"
$ toContent $(embedFile "config/favicon.ico") | 194 | true | true | 0 | 11 | 90 | 60 | 29 | 31 | null | null |
byorgey/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | pDefs :: [(Name, Def)] -> Idris ()
pDefs ds = mapM_ (\ (n, d) ->
do i <- getIState
logLvl 5 $ "Added " ++ show (n, d)
putIState (i { tt_ctxt = addCtxtDef n d (tt_ctxt i) }))
ds | 263 | pDefs :: [(Name, Def)] -> Idris ()
pDefs ds = mapM_ (\ (n, d) ->
do i <- getIState
logLvl 5 $ "Added " ++ show (n, d)
putIState (i { tt_ctxt = addCtxtDef n d (tt_ctxt i) }))
ds | 263 | pDefs ds = mapM_ (\ (n, d) ->
do i <- getIState
logLvl 5 $ "Added " ++ show (n, d)
putIState (i { tt_ctxt = addCtxtDef n d (tt_ctxt i) }))
ds | 228 | false | true | 0 | 15 | 126 | 117 | 58 | 59 | null | null |
jaspervdj/patat | lib/Patat/Theme.hs | gpl-2.0 | defaultTheme :: Theme
defaultTheme = Theme
{ themeBorders = dull Ansi.Yellow
, themeHeader = dull Ansi.Blue
, themeCodeBlock = dull Ansi.White `mappend` ondull Ansi.Black
, themeBulletList = dull Ansi.Magenta
, themeBulletListMarkers = Just "-*"
, themeOr... | 1,726 | defaultTheme :: Theme
defaultTheme = Theme
{ themeBorders = dull Ansi.Yellow
, themeHeader = dull Ansi.Blue
, themeCodeBlock = dull Ansi.White `mappend` ondull Ansi.Black
, themeBulletList = dull Ansi.Magenta
, themeBulletListMarkers = Just "-*"
, themeOr... | 1,726 | defaultTheme = Theme
{ themeBorders = dull Ansi.Yellow
, themeHeader = dull Ansi.Blue
, themeCodeBlock = dull Ansi.White `mappend` ondull Ansi.Black
, themeBulletList = dull Ansi.Magenta
, themeBulletListMarkers = Just "-*"
, themeOrderedList = dul... | 1,704 | false | true | 0 | 9 | 507 | 432 | 232 | 200 | null | null |
bamboo/sneerkell | test/Data/Transit/CacheSpec.hs | lgpl-3.0 | spec :: Spec
spec =
describe "Transit caching" $
it "caches all ~#tag, keyword and symbol values, and strings if they are longer than 3 characters" $ do
let cache = foldl (flip TC.insert) TC.empty [ "~#puk", "tst", "test" ]
TC.lookup "^0" cache `shouldBe` Just "~#puk"
TC.lookup "^1" cache `shoul... | 382 | spec :: Spec
spec =
describe "Transit caching" $
it "caches all ~#tag, keyword and symbol values, and strings if they are longer than 3 characters" $ do
let cache = foldl (flip TC.insert) TC.empty [ "~#puk", "tst", "test" ]
TC.lookup "^0" cache `shouldBe` Just "~#puk"
TC.lookup "^1" cache `shoul... | 382 | spec =
describe "Transit caching" $
it "caches all ~#tag, keyword and symbol values, and strings if they are longer than 3 characters" $ do
let cache = foldl (flip TC.insert) TC.empty [ "~#puk", "tst", "test" ]
TC.lookup "^0" cache `shouldBe` Just "~#puk"
TC.lookup "^1" cache `shouldBe` Just "te... | 369 | false | true | 0 | 14 | 86 | 121 | 57 | 64 | null | null |
mbakke/ganeti | src/Ganeti/Query/Instance.hs | bsd-2-clause | getPrimaryNodeGroupName :: ConfigData -> Instance -> ResultEntry
getPrimaryNodeGroupName cfg inst =
rsErrorNoData $ groupName <$> getPrimaryNodeGroup cfg inst | 160 | getPrimaryNodeGroupName :: ConfigData -> Instance -> ResultEntry
getPrimaryNodeGroupName cfg inst =
rsErrorNoData $ groupName <$> getPrimaryNodeGroup cfg inst | 160 | getPrimaryNodeGroupName cfg inst =
rsErrorNoData $ groupName <$> getPrimaryNodeGroup cfg inst | 95 | false | true | 0 | 6 | 19 | 37 | 18 | 19 | null | null |
psandahl/big-engine | test/VertexTests.hs | mit | vertP_N_Tx_C_alignment :: Assertion
vertP_N_Tx_C_alignment = 4 @=? alignment sampleVertP_N_Tx_C | 95 | vertP_N_Tx_C_alignment :: Assertion
vertP_N_Tx_C_alignment = 4 @=? alignment sampleVertP_N_Tx_C | 95 | vertP_N_Tx_C_alignment = 4 @=? alignment sampleVertP_N_Tx_C | 59 | false | true | 0 | 6 | 8 | 24 | 10 | 14 | null | null |
k16shikano/hpdft | src/PDF/DocumentStructure.hs | mit | findRefs :: ((Obj,Obj) -> Bool) -> Dict -> Maybe Int
findRefs pred dict = case find pred dict of
Just (_, ObjRef x) -> Just x
Nothing -> Nothing
-- find Info | 174 | findRefs :: ((Obj,Obj) -> Bool) -> Dict -> Maybe Int
findRefs pred dict = case find pred dict of
Just (_, ObjRef x) -> Just x
Nothing -> Nothing
-- find Info | 174 | findRefs pred dict = case find pred dict of
Just (_, ObjRef x) -> Just x
Nothing -> Nothing
-- find Info | 121 | false | true | 3 | 8 | 48 | 74 | 39 | 35 | null | null |
forsyde/forsyde-atom | src/ForSyDe/Atom/MoC/SDF/SADF.hs | bsd-3-clause | detector33 c ns od i s1 s2 s3 = (od -$- g -*<<)
where g = wrapFromSecond ns (arg3 c) -$- st -*- s1 -*- s2 -*- s3
st = SDF i :- g | 140 | detector33 c ns od i s1 s2 s3 = (od -$- g -*<<)
where g = wrapFromSecond ns (arg3 c) -$- st -*- s1 -*- s2 -*- s3
st = SDF i :- g | 140 | detector33 c ns od i s1 s2 s3 = (od -$- g -*<<)
where g = wrapFromSecond ns (arg3 c) -$- st -*- s1 -*- s2 -*- s3
st = SDF i :- g | 140 | false | false | 1 | 12 | 45 | 78 | 38 | 40 | null | null |
mpickering/HaRe | test/testdata/LiftToToplevel/LetIn2.hs | bsd-3-clause | --A definition can be lifted from a where or let to the top level binding group.
--Lifting a definition widens the scope of the definition.
--In this example, lift 'sq' in 'sumSquares'
--This example aims to test lifting a definition from a let clause to top Level.
sumSquares x y = let sq 0=0
sq ... | 386 | sumSquares x y = let sq 0=0
sq z=z^pow
pow=2
in sq x + sq y | 118 | sumSquares x y = let sq 0=0
sq z=z^pow
pow=2
in sq x + sq y | 118 | true | false | 0 | 9 | 123 | 56 | 28 | 28 | null | null |
Kludgy/polyparse-fork | src/Text/ParserCombinators/HuttonMeijerWallace.hs | lgpl-2.1 | -- | Apply the parser to some real input, given an initial state value.
-- If the parser fails, raise 'error' to halt the program.
-- (This is the original exported behaviour - to allow the caller to
-- deal with the error differently, see @papply'@.)
papply :: Parser s t String a -> s -> [Either Strin... | 448 | papply :: Parser s t String a -> s -> [Either String t]
-> [(a,s,[Either String t])]
papply (P p) st inp = either error id (p st inp) | 190 | papply (P p) st inp = either error id (p st inp) | 48 | true | true | 0 | 13 | 137 | 97 | 50 | 47 | null | null |
guillaume-nargeot/project-euler-haskell | src/Util.hs | bsd-3-clause | ints :: (Enum t, Num t) => [t]
ints = [1..] | 43 | ints :: (Enum t, Num t) => [t]
ints = [1..] | 43 | ints = [1..] | 12 | false | true | 0 | 8 | 10 | 39 | 19 | 20 | null | null |
oldmanmike/ghc | compiler/utils/Outputable.hs | bsd-3-clause | darrow = unicodeSyntax (char '⇒') (docToSDoc $ Pretty.text "=>") | 68 | darrow = unicodeSyntax (char '⇒') (docToSDoc $ Pretty.text "=>") | 68 | darrow = unicodeSyntax (char '⇒') (docToSDoc $ Pretty.text "=>") | 68 | false | false | 0 | 9 | 12 | 29 | 14 | 15 | null | null |
vincenthz/hs-packer | Tests/Tests.hs | bsd-2-clause | getAtomLength (W32BE _) = 4 | 27 | getAtomLength (W32BE _) = 4 | 27 | getAtomLength (W32BE _) = 4 | 27 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
league/postgrest | src/PostgREST/QueryBuilder.hs | mit | pgFmtJsonPath :: Maybe JsonPath -> SqlFragment
pgFmtJsonPath (Just [x]) = "->>" <> pgFmtLit x | 93 | pgFmtJsonPath :: Maybe JsonPath -> SqlFragment
pgFmtJsonPath (Just [x]) = "->>" <> pgFmtLit x | 93 | pgFmtJsonPath (Just [x]) = "->>" <> pgFmtLit x | 46 | false | true | 0 | 8 | 13 | 37 | 18 | 19 | null | null |
ddssff/lens | src/Control/Lens/Plated.hs | bsd-3-clause | gplate1 :: (Generic1 f, GPlated1 f (Rep1 f)) => Traversal' (f a) (f a)
gplate1 f x = GHC.Generics.to1 <$> gplate1' f (GHC.Generics.from1 x) | 139 | gplate1 :: (Generic1 f, GPlated1 f (Rep1 f)) => Traversal' (f a) (f a)
gplate1 f x = GHC.Generics.to1 <$> gplate1' f (GHC.Generics.from1 x) | 139 | gplate1 f x = GHC.Generics.to1 <$> gplate1' f (GHC.Generics.from1 x) | 68 | false | true | 0 | 9 | 23 | 77 | 39 | 38 | null | null |
rayl/xmonad-config | xmonad.hs | bsd-3-clause | spawnBar :: Int -> Pos -> IO Handle
spawnBar s p = spawnPipe cmd
where cmd = unwords [ "/usr/bin/xmobar"
, "-f -*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, "-B black"
, "-F grey"
, pos
, "-a '}{'"... | 788 | spawnBar :: Int -> Pos -> IO Handle
spawnBar s p = spawnPipe cmd
where cmd = unwords [ "/usr/bin/xmobar"
, "-f -*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, "-B black"
, "-F grey"
, pos
, "-a '}{'"... | 788 | spawnBar s p = spawnPipe cmd
where cmd = unwords [ "/usr/bin/xmobar"
, "-f -*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, "-B black"
, "-F grey"
, pos
, "-a '}{'"
, "-s '%'"
... | 752 | false | true | 6 | 14 | 446 | 208 | 104 | 104 | null | null |
rwbarton/rw | Crawl/Status.hs | bsd-3-clause | isPoisoned :: Player -> Bool
isPoisoned = hasStatus "Pois" | 58 | isPoisoned :: Player -> Bool
isPoisoned = hasStatus "Pois" | 58 | isPoisoned = hasStatus "Pois" | 29 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
kindl/Hypatia | src/Parser.hs | mit | qconid = parseLocated fromQConid | 32 | qconid = parseLocated fromQConid | 32 | qconid = parseLocated fromQConid | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
gcampax/ghc | compiler/main/HscTypes.hs | bsd-3-clause | -- | Get the 'DataCon' from a 'TyThing' if it is a data constructor thing. Panics otherwise
tyThingDataCon :: TyThing -> DataCon
tyThingDataCon (AConLike (RealDataCon dc)) = dc | 176 | tyThingDataCon :: TyThing -> DataCon
tyThingDataCon (AConLike (RealDataCon dc)) = dc | 84 | tyThingDataCon (AConLike (RealDataCon dc)) = dc | 47 | true | true | 0 | 9 | 27 | 31 | 16 | 15 | null | null |
raichoo/Idris-dev | src/IRTS/JavaScript/AST.hs | bsd-3-clause | compileJS' indent (JSIndex lhs rhs) =
compileJS' indent lhs
`T.append` "["
`T.append` compileJS' indent rhs
`T.append` "]" | 132 | compileJS' indent (JSIndex lhs rhs) =
compileJS' indent lhs
`T.append` "["
`T.append` compileJS' indent rhs
`T.append` "]" | 132 | compileJS' indent (JSIndex lhs rhs) =
compileJS' indent lhs
`T.append` "["
`T.append` compileJS' indent rhs
`T.append` "]" | 132 | false | false | 0 | 6 | 26 | 66 | 31 | 35 | null | null |
pgj/bead | src/Bead/Persistence/NoSQLDirFile.hs | bsd-3-clause | overwriteFile :: FilePath -> FilePath -> TIO ()
overwriteFile old new = stepM action reverseBefore reverseAfter >> return () where
action = do
let fname = new
h <- openFile fname ReadMode
hSetEncoding h utf8
s <- hGetContents h
s `deepseq` hClose h
copyFile old new
return s
reverseBefor... | 498 | overwriteFile :: FilePath -> FilePath -> TIO ()
overwriteFile old new = stepM action reverseBefore reverseAfter >> return () where
action = do
let fname = new
h <- openFile fname ReadMode
hSetEncoding h utf8
s <- hGetContents h
s `deepseq` hClose h
copyFile old new
return s
reverseBefor... | 498 | overwriteFile old new = stepM action reverseBefore reverseAfter >> return () where
action = do
let fname = new
h <- openFile fname ReadMode
hSetEncoding h utf8
s <- hGetContents h
s `deepseq` hClose h
copyFile old new
return s
reverseBefore = return ()
reverseAfter original = do
... | 450 | false | true | 3 | 9 | 122 | 167 | 69 | 98 | null | null |
phischu/fragnix | tests/packages/scotty/Text.Regex.Posix.Sequence.hs | bsd-3-clause | compile :: CompOption -- ^ Flags (summed together)
-> ExecOption -- ^ Flags (summed together)
-> (Seq Char) -- ^ The regular expression to compile (ASCII only, no null bytes)
-> IO (Either WrapError Regex) -- ^ Returns: the compiled regular expression
compile flags e pattern = withSeq p... | 348 | compile :: CompOption -- ^ Flags (summed together)
-> ExecOption -- ^ Flags (summed together)
-> (Seq Char) -- ^ The regular expression to compile (ASCII only, no null bytes)
-> IO (Either WrapError Regex)
compile flags e pattern = withSeq pattern (wrapCompile flags e) | 302 | compile flags e pattern = withSeq pattern (wrapCompile flags e) | 64 | true | true | 0 | 11 | 84 | 68 | 34 | 34 | null | null |
input-output-hk/pos-haskell-prototype | wallet/test/integration/Test/Integration/Framework/DSL.hs | mit | expectSuccess
:: (MonadIO m, MonadFail m)
=> Either ClientError a
-> m ()
expectSuccess = \case
Left e -> wantedSuccessButError e
Right _ -> return ()
-- | Expect a transaction to be part of a wallet history. | 231 | expectSuccess
:: (MonadIO m, MonadFail m)
=> Either ClientError a
-> m ()
expectSuccess = \case
Left e -> wantedSuccessButError e
Right _ -> return ()
-- | Expect a transaction to be part of a wallet history. | 231 | expectSuccess = \case
Left e -> wantedSuccessButError e
Right _ -> return ()
-- | Expect a transaction to be part of a wallet history. | 145 | false | true | 0 | 10 | 60 | 75 | 34 | 41 | null | null |
lynchronan/haskoin-crypto | testsuite/Haskoin/Crypto/Point/Tests.hs | unlicense | doubleMulPoint :: Point -> Bool
doubleMulPoint p = doublePoint p == mulPoint 2 p | 80 | doubleMulPoint :: Point -> Bool
doubleMulPoint p = doublePoint p == mulPoint 2 p | 80 | doubleMulPoint p = doublePoint p == mulPoint 2 p | 48 | false | true | 0 | 7 | 13 | 35 | 15 | 20 | null | null |
pepeiborra/safe-failure | Safe/Failure.hs | bsd-3-clause | liftFailure :: Failure e m
=> (a -> Bool)
-> e
-> (a -> b)
-> a
-> m b
liftFailure test e f val = if test val then failure e else return (f val) | 204 | liftFailure :: Failure e m
=> (a -> Bool)
-> e
-> (a -> b)
-> a
-> m b
liftFailure test e f val = if test val then failure e else return (f val) | 204 | liftFailure test e f val = if test val then failure e else return (f val) | 73 | false | true | 0 | 10 | 95 | 85 | 42 | 43 | null | null |
unknownloner/HaskellSynth | src/Main.hs | mit | numSamples :: Double
numSamples = (4 * 4) / bps * 2 | 51 | numSamples :: Double
numSamples = (4 * 4) / bps * 2 | 51 | numSamples = (4 * 4) / bps * 2 | 30 | false | true | 0 | 8 | 11 | 26 | 14 | 12 | null | null |
aaronc/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | nsroot (NS n _) = n | 19 | nsroot (NS n _) = n | 19 | nsroot (NS n _) = n | 19 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
eallik/clint-DAV | Network/Protocol/HTTP/DAV.hs | gpl-3.0 | matchStatusCodeException _ _ = Nothing | 38 | matchStatusCodeException _ _ = Nothing | 38 | matchStatusCodeException _ _ = Nothing | 38 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
coccinelle/herodotos | hBugs/src/Options.hs | gpl-2.0 | help_msg = usageInfo usage options | 34 | help_msg = usageInfo usage options | 34 | help_msg = usageInfo usage options | 34 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
sdiehl/ghc | compiler/types/TyCoRep.hs | bsd-3-clause | typeSize :: Type -> Int
typeSize (LitTy {}) = 1 | 63 | typeSize :: Type -> Int
typeSize (LitTy {}) = 1 | 63 | typeSize (LitTy {}) = 1 | 39 | false | true | 0 | 7 | 25 | 25 | 13 | 12 | null | null |
phischu/fragnix | tests/packages/scotty/Paths_transformers_compat.hs | bsd-3-clause | getLibDir = catchIO (getEnv "transformers_compat_libdir") (\_ -> return libdir) | 79 | getLibDir = catchIO (getEnv "transformers_compat_libdir") (\_ -> return libdir) | 79 | getLibDir = catchIO (getEnv "transformers_compat_libdir") (\_ -> return libdir) | 79 | false | false | 0 | 8 | 8 | 28 | 14 | 14 | null | null |
rce/jahti | src/Adb.hs | mit | adb :: String
adb = "C:\\Users\\rce\\AppData\\Local\\Android\\sdk\\platform-tools\\adb.exe" | 91 | adb :: String
adb = "C:\\Users\\rce\\AppData\\Local\\Android\\sdk\\platform-tools\\adb.exe" | 91 | adb = "C:\\Users\\rce\\AppData\\Local\\Android\\sdk\\platform-tools\\adb.exe" | 77 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
esmolanka/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | isExportModule :: ExportItem DocName -> Maybe Module
isExportModule (ExportModule m) = Just m | 93 | isExportModule :: ExportItem DocName -> Maybe Module
isExportModule (ExportModule m) = Just m | 93 | isExportModule (ExportModule m) = Just m | 40 | false | true | 0 | 7 | 12 | 33 | 15 | 18 | null | null |
typelead/epm | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | -- ------------------------------------------------------------
-- * Unicode stuff
-- ------------------------------------------------------------
-- This is a modification of the UTF8 code from gtk2hs and the
-- utf8-string package.
fromUTF8 :: String -> String
fromUTF8 [] = [] | 285 | fromUTF8 :: String -> String
fromUTF8 [] = [] | 49 | fromUTF8 [] = [] | 20 | true | true | 0 | 6 | 38 | 27 | 16 | 11 | null | null |
diku-dk/futhark | src/Futhark/IR/GPU/Op.hs | isc | typeCheckHostOp _ _ f (OtherOp op) = f op | 41 | typeCheckHostOp _ _ f (OtherOp op) = f op | 41 | typeCheckHostOp _ _ f (OtherOp op) = f op | 41 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
lpeterse/haskell-libssh | Test.hs | lgpl-3.0 | forkSession :: Ptr Session -> IO (Async ())
forkSession session
= asyncBound
$ do event <- ssh_event_new
cb1 <- wrapAuthPasswordCallback authPasswordCallback
cb2 <- wrapAuthNoneCallback authNoneCallback
cb3 <- wrapAuthPubkeyCallback authPubkeyC... | 2,946 | forkSession :: Ptr Session -> IO (Async ())
forkSession session
= asyncBound
$ do event <- ssh_event_new
cb1 <- wrapAuthPasswordCallback authPasswordCallback
cb2 <- wrapAuthNoneCallback authNoneCallback
cb3 <- wrapAuthPubkeyCallback authPubkeyC... | 2,946 | forkSession session
= asyncBound
$ do event <- ssh_event_new
cb1 <- wrapAuthPasswordCallback authPasswordCallback
cb2 <- wrapAuthNoneCallback authNoneCallback
cb3 <- wrapAuthPubkeyCallback authPubkeyCallback
cb4 <- wrapServiceRequestCa... | 2,902 | false | true | 5 | 19 | 1,104 | 658 | 287 | 371 | null | null |
ml9951/ghc | compiler/deSugar/DsUtils.hs | bsd-3-clause | mkOptTickBox :: [Tickish Id] -> CoreExpr -> CoreExpr
mkOptTickBox = flip (foldr Tick) | 85 | mkOptTickBox :: [Tickish Id] -> CoreExpr -> CoreExpr
mkOptTickBox = flip (foldr Tick) | 85 | mkOptTickBox = flip (foldr Tick) | 32 | false | true | 0 | 7 | 12 | 34 | 17 | 17 | null | null |
ZjMNZHgG5jMXw/http-conduit-backtrack | Text/HTML/DOM/Form.hs | bsd-3-clause | radio :: Axis
radio c = input c >>= attributeIs "type" "radio" | 62 | radio :: Axis
radio c = input c >>= attributeIs "type" "radio" | 62 | radio c = input c >>= attributeIs "type" "radio" | 48 | false | true | 2 | 6 | 11 | 33 | 14 | 19 | null | null |
cryptica/slapnet | src/Solver/SComponentWithCut.hs | gpl-3.0 | checkPrePostTransitions :: PetriNet -> SIMap Place -> SIMap Place ->
SIMap Transition -> SIMap Transition -> SIMap Transition ->
SBool
checkPrePostTransitions net p1 p2 t0 t1 t2 =
bAnd (map (checkPrePostTransition t0 [p1,p2]) (transitions net)) &&&
bAnd (map (checkPrePostTransiti... | 725 | checkPrePostTransitions :: PetriNet -> SIMap Place -> SIMap Place ->
SIMap Transition -> SIMap Transition -> SIMap Transition ->
SBool
checkPrePostTransitions net p1 p2 t0 t1 t2 =
bAnd (map (checkPrePostTransition t0 [p1,p2]) (transitions net)) &&&
bAnd (map (checkPrePostTransiti... | 725 | checkPrePostTransitions net p1 p2 t0 t1 t2 =
bAnd (map (checkPrePostTransition t0 [p1,p2]) (transitions net)) &&&
bAnd (map (checkPrePostTransition t1 [p1]) (transitions net)) &&&
bAnd (map (checkPrePostTransition t2 [p2]) (transitions net))
where checkPrePostTransition ts ps... | 574 | false | true | 1 | 12 | 227 | 260 | 127 | 133 | null | null |
spechub/Hets | Common/XPath.hs | gpl-2.0 | -- | all node types without processing-instruction
nodeTypes :: [NodeTest]
nodeTypes = [Node, Comment, Text] | 108 | nodeTypes :: [NodeTest]
nodeTypes = [Node, Comment, Text] | 57 | nodeTypes = [Node, Comment, Text] | 33 | true | true | 0 | 5 | 14 | 24 | 15 | 9 | null | null |
ifo/write-yourself-a-scheme-in-48-hours | src/datatypeparser.hs | isc | main :: IO ()
main =
getArgs >>=
\args -> putStrLn (readExpr (args !! 0)) | 77 | main :: IO ()
main =
getArgs >>=
\args -> putStrLn (readExpr (args !! 0)) | 77 | main =
getArgs >>=
\args -> putStrLn (readExpr (args !! 0)) | 63 | false | true | 1 | 11 | 18 | 44 | 21 | 23 | null | null |
JonathanReeve/JonathanReeve.github.io | src/CV.hs | gpl-2.0 | badge :: T.Text -> URI -> Html ()
badge path repo = img_ [src_ badgeURL] where
badgeURL = T.concat ["https://img.shields.io/", path, repo, opts]
opts = ".svg?style=flat-square&colorB=494E8E"
-- data Update = Update Date Event deriving Show | 244 | badge :: T.Text -> URI -> Html ()
badge path repo = img_ [src_ badgeURL] where
badgeURL = T.concat ["https://img.shields.io/", path, repo, opts]
opts = ".svg?style=flat-square&colorB=494E8E"
-- data Update = Update Date Event deriving Show | 244 | badge path repo = img_ [src_ badgeURL] where
badgeURL = T.concat ["https://img.shields.io/", path, repo, opts]
opts = ".svg?style=flat-square&colorB=494E8E"
-- data Update = Update Date Event deriving Show | 210 | false | true | 2 | 9 | 39 | 82 | 38 | 44 | null | null |
brendanhay/gogol | gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs | mpl-2.0 | -- | A map of key-value pairs of tag metadata to be included in the event
-- data for tag monitoring. Notes: - This parameter must be type MAP. -
-- Each parameter in the map are type TEMPLATE, however cannot contain
-- variable references. \'mutable
-- tagmanager.accounts.containers.workspaces.tags.create \'mutable
--... | 520 | tMonitoringMetadata :: Lens' Tag (Maybe Parameter)
tMonitoringMetadata
= lens _tMonitoringMetadata
(\ s a -> s{_tMonitoringMetadata = a}) | 145 | tMonitoringMetadata
= lens _tMonitoringMetadata
(\ s a -> s{_tMonitoringMetadata = a}) | 94 | true | true | 0 | 8 | 75 | 54 | 30 | 24 | null | null |
elieux/ghc | libraries/base/Text/ParserCombinators/ReadPrec.hs | bsd-3-clause | readPrec_to_S :: ReadPrec a -> (Int -> ReadS a)
readPrec_to_S (P f) n = readP_to_S (f n) | 88 | readPrec_to_S :: ReadPrec a -> (Int -> ReadS a)
readPrec_to_S (P f) n = readP_to_S (f n) | 88 | readPrec_to_S (P f) n = readP_to_S (f n) | 40 | false | true | 0 | 8 | 16 | 48 | 23 | 25 | null | null |
jimsnow/glome | GlomeTrace/Data/Glome/Tex.hs | gpl-2.0 | -- | Contained object casts a shadow, but can't be seen.
-- (May not work for primitives which implement a shadow test by
-- calling rayint.)
onlyshadow s = SolidItem $ OnlyShadow s | 181 | onlyshadow s = SolidItem $ OnlyShadow s | 39 | onlyshadow s = SolidItem $ OnlyShadow s | 39 | true | false | 0 | 6 | 32 | 19 | 10 | 9 | null | null |
RefactoringTools/HaRe | hareview/src/Language/Hareview/GUIActions.hs | bsd-3-clause | -- -------------------------------------------------------------------
-- * filemenu menu actions
-- -------------------------------------------------------------------
clearTreeView :: TreeView -> IO ()
clearTreeView t = do
c <- treeViewGetColumn t 0
case c of
Just col-> treeViewRemoveColumn t col
Nothing... | 374 | clearTreeView :: TreeView -> IO ()
clearTreeView t = do
c <- treeViewGetColumn t 0
case c of
Just col-> treeViewRemoveColumn t col
Nothing -> return undefined
return ()
-- | resets the GUI, | 204 | clearTreeView t = do
c <- treeViewGetColumn t 0
case c of
Just col-> treeViewRemoveColumn t col
Nothing -> return undefined
return ()
-- | resets the GUI, | 169 | true | true | 0 | 10 | 58 | 77 | 36 | 41 | null | null |
mightymoose/liquidhaskell | benchmarks/llrbtree-0.1.1/Data/Set/WBTree.hs | bsd-3-clause | ----------------------------------------------------------------
node :: WBTree a -> a -> WBTree a -> WBTree a
node l x r = Node (size l + size r + 1) l x r | 157 | node :: WBTree a -> a -> WBTree a -> WBTree a
node l x r = Node (size l + size r + 1) l x r | 91 | node l x r = Node (size l + size r + 1) l x r | 45 | true | true | 0 | 9 | 29 | 66 | 31 | 35 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.