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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
keithodulaigh/Hets | GMP/GMP-CoLoSS/GMP/Logics/Generic.hs | gpl-2.0 | to_inds xs = [0 .. length xs - 1] | 33 | to_inds xs = [0 .. length xs - 1] | 33 | to_inds xs = [0 .. length xs - 1] | 33 | false | false | 0 | 7 | 8 | 22 | 11 | 11 | null | null |
jfulseca/Pudding | src/Pudding/Test/Utilities/DoubleFunctions.hs | gpl-3.0 | prop_fmodCutoff :: Double -> (NonZero Double) -> Bool
prop_fmodCutoff a (NonZero b) = (abs (a `fmod` b)) < (abs b) | 114 | prop_fmodCutoff :: Double -> (NonZero Double) -> Bool
prop_fmodCutoff a (NonZero b) = (abs (a `fmod` b)) < (abs b) | 114 | prop_fmodCutoff a (NonZero b) = (abs (a `fmod` b)) < (abs b) | 60 | false | true | 0 | 10 | 19 | 67 | 33 | 34 | null | null |
olsner/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | pprUserTypeCtxt (TySynCtxt c) = text "the RHS of the type synonym" <+> quotes (ppr c) | 89 | pprUserTypeCtxt (TySynCtxt c) = text "the RHS of the type synonym" <+> quotes (ppr c) | 89 | pprUserTypeCtxt (TySynCtxt c) = text "the RHS of the type synonym" <+> quotes (ppr c) | 89 | false | false | 0 | 8 | 18 | 31 | 14 | 17 | null | null |
anchor/vaultaire-collector-nagios | lib/Vaultaire/Collector/Nagios/Perfdata/Util.hs | mit | ensureValid x = x | 17 | ensureValid x = x | 17 | ensureValid x = x | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
relrod/- | src/Language/Dash/Context.hs | bsd-3-clause | indexCtx :: Context -> (String, Binding) -> Maybe Int
indexCtx = flip elemIndex | 79 | indexCtx :: Context -> (String, Binding) -> Maybe Int
indexCtx = flip elemIndex | 79 | indexCtx = flip elemIndex | 25 | false | true | 0 | 7 | 12 | 31 | 16 | 15 | null | null |
elitak/forest | Language/Forest/Parser.hs | epl-1.0 | recordTy :: Parser DirectoryTy
recordTy = do { fields <- braces fieldList
; return (Record "temporary" fields)
} <?> "Forest Record Type" | 165 | recordTy :: Parser DirectoryTy
recordTy = do { fields <- braces fieldList
; return (Record "temporary" fields)
} <?> "Forest Record Type" | 165 | recordTy = do { fields <- braces fieldList
; return (Record "temporary" fields)
} <?> "Forest Record Type" | 134 | false | true | 0 | 10 | 49 | 45 | 22 | 23 | null | null |
wohanley/trans | Trans.hs | agpl-3.0 | -- I want this in a where clause but I can't get the syntax to work
inversionFoldFunction probability (gen, acc) powerOf2 =
let (rand, gen') = random gen :: (Float, StdGen)
in (gen', possibly (invert powerOf2) rand probability acc) | 239 | inversionFoldFunction probability (gen, acc) powerOf2 =
let (rand, gen') = random gen :: (Float, StdGen)
in (gen', possibly (invert powerOf2) rand probability acc) | 171 | inversionFoldFunction probability (gen, acc) powerOf2 =
let (rand, gen') = random gen :: (Float, StdGen)
in (gen', possibly (invert powerOf2) rand probability acc) | 171 | true | false | 0 | 10 | 46 | 71 | 38 | 33 | null | null |
teuffy/interactive-brokers | library/API/IB/Parse.hs | bsd-3-clause | parseBoolBinaryField :: Parser Bool
parseBoolBinaryField = parseField $ (char '0' *> return False) <|> (char '1' *> return True) | 128 | parseBoolBinaryField :: Parser Bool
parseBoolBinaryField = parseField $ (char '0' *> return False) <|> (char '1' *> return True) | 128 | parseBoolBinaryField = parseField $ (char '0' *> return False) <|> (char '1' *> return True) | 92 | false | true | 1 | 9 | 18 | 52 | 23 | 29 | null | null |
sdiehl/unirewrite | test/Test.hs | mit | evalTests :: TestTree
evalTests = testGroup "Evaluations Tests"
[
testCase "evalTest1" $ etest1
, testCase "evalTest2" $ etest2
, testCase "evalTest3" $ etest3
, testCase "evalTest4" $ etest4
, testCase "evalTest5" $ etest5
] | 241 | evalTests :: TestTree
evalTests = testGroup "Evaluations Tests"
[
testCase "evalTest1" $ etest1
, testCase "evalTest2" $ etest2
, testCase "evalTest3" $ etest3
, testCase "evalTest4" $ etest4
, testCase "evalTest5" $ etest5
] | 241 | evalTests = testGroup "Evaluations Tests"
[
testCase "evalTest1" $ etest1
, testCase "evalTest2" $ etest2
, testCase "evalTest3" $ etest3
, testCase "evalTest4" $ etest4
, testCase "evalTest5" $ etest5
] | 219 | false | true | 0 | 7 | 49 | 67 | 33 | 34 | null | null |
ocharles/hackage-server | Distribution/Server/Features/StaticFiles.hs | bsd-3-clause | errorToHtml (MText x :xs) = toHtml x: errorToHtml xs | 55 | errorToHtml (MText x :xs) = toHtml x: errorToHtml xs | 55 | errorToHtml (MText x :xs) = toHtml x: errorToHtml xs | 55 | false | false | 0 | 8 | 11 | 29 | 13 | 16 | null | null |
MasseR/shoppinglist | Handler/ShoppinglistHandler.hs | bsd-2-clause | postShoppinglistHandlerR :: ShoppingListId -> Handler RepHtml
postShoppinglistHandlerR shoppingListId = do
_ <- runDB $ get404 shoppingListId
listItemIds <- map (shoppingListItemItem . entityVal) <$> (runDB $ selectList [ShoppingListItemList ==. shoppingListId, ShoppingListItemCount >. 0] [])
itemNames <- map (it... | 1,545 | postShoppinglistHandlerR :: ShoppingListId -> Handler RepHtml
postShoppinglistHandlerR shoppingListId = do
_ <- runDB $ get404 shoppingListId
listItemIds <- map (shoppingListItemItem . entityVal) <$> (runDB $ selectList [ShoppingListItemList ==. shoppingListId, ShoppingListItemCount >. 0] [])
itemNames <- map (it... | 1,545 | postShoppinglistHandlerR shoppingListId = do
_ <- runDB $ get404 shoppingListId
listItemIds <- map (shoppingListItemItem . entityVal) <$> (runDB $ selectList [ShoppingListItemList ==. shoppingListId, ShoppingListItemCount >. 0] [])
itemNames <- map (itemName . entityVal) <$> (runDB $ selectList [ItemId <-. listIt... | 1,483 | false | true | 0 | 23 | 462 | 467 | 224 | 243 | null | null |
gbataille/pandoc | src/Text/Pandoc/Writers/OpenDocument.hs | gpl-2.0 | addTextStyle :: Doc -> State WriterState ()
addTextStyle i = modify $ \s -> s { stTextStyles = i : stTextStyles s } | 115 | addTextStyle :: Doc -> State WriterState ()
addTextStyle i = modify $ \s -> s { stTextStyles = i : stTextStyles s } | 115 | addTextStyle i = modify $ \s -> s { stTextStyles = i : stTextStyles s } | 71 | false | true | 0 | 10 | 22 | 49 | 25 | 24 | null | null |
FranklinChen/brick | src/Brick/Main.hs | bsd-3-clause | renderApp :: Vty -> App s e -> s -> RenderState -> IO RenderState
renderApp vty app appState rs = do
sz <- displayBounds $ outputIface vty
let (newRS, pic, theCursor) = renderFinal (appAttrMap app appState)
(appDraw app appState)
sz
... | 856 | renderApp :: Vty -> App s e -> s -> RenderState -> IO RenderState
renderApp vty app appState rs = do
sz <- displayBounds $ outputIface vty
let (newRS, pic, theCursor) = renderFinal (appAttrMap app appState)
(appDraw app appState)
sz
... | 856 | renderApp vty app appState rs = do
sz <- displayBounds $ outputIface vty
let (newRS, pic, theCursor) = renderFinal (appAttrMap app appState)
(appDraw app appState)
sz
(appChooseCursor app appState)
... | 790 | false | true | 0 | 18 | 303 | 194 | 96 | 98 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Writers/EPUB.hs | gpl-2.0 | metaValueToString (MetaBool b) = show b | 39 | metaValueToString (MetaBool b) = show b | 39 | metaValueToString (MetaBool b) = show b | 39 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
kurnevsky/missile | src/GameTree.hs | agpl-3.0 | gameTreeBack :: GameTree -> GameTree
gameTreeBack gameTree =
gameTree { gtCurPlayer = snd $ head $ moves $ head $ gtFields gameTree
, gtFields = tail $ gtFields gameTree
} | 195 | gameTreeBack :: GameTree -> GameTree
gameTreeBack gameTree =
gameTree { gtCurPlayer = snd $ head $ moves $ head $ gtFields gameTree
, gtFields = tail $ gtFields gameTree
} | 195 | gameTreeBack gameTree =
gameTree { gtCurPlayer = snd $ head $ moves $ head $ gtFields gameTree
, gtFields = tail $ gtFields gameTree
} | 158 | false | true | 0 | 10 | 53 | 58 | 30 | 28 | null | null |
uuhan/Idris-dev | src/Idris/Delaborate.hs | bsd-3-clause | pprintProv i e InferredVal = text "Inferred value" | 50 | pprintProv i e InferredVal = text "Inferred value" | 50 | pprintProv i e InferredVal = text "Inferred value" | 50 | false | false | 0 | 5 | 7 | 19 | 7 | 12 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/GlassBR/Unitals.hs | bsd-2-clause | isSafeProb = vc "isSafeProb" (nounPhraseSP "probability of failure safety requirement")
(Variable "is-safeProb") Boolean | 122 | isSafeProb = vc "isSafeProb" (nounPhraseSP "probability of failure safety requirement")
(Variable "is-safeProb") Boolean | 122 | isSafeProb = vc "isSafeProb" (nounPhraseSP "probability of failure safety requirement")
(Variable "is-safeProb") Boolean | 122 | false | false | 0 | 7 | 14 | 29 | 13 | 16 | null | null |
ezyang/ghc | compiler/vectorise/Vectorise/Monad/Global.hs | bsd-3-clause | -- 'PA' dictionaries ------------------------------------------------------------
-- |Lookup the 'PA' dfun of a vectorised type constructor in the global environment.
--
lookupTyConPA :: TyCon -> VM (Maybe Var)
lookupTyConPA tc
= readGEnv $ \env -> lookupNameEnv (global_pa_funs env) (tyConName tc) | 301 | lookupTyConPA :: TyCon -> VM (Maybe Var)
lookupTyConPA tc
= readGEnv $ \env -> lookupNameEnv (global_pa_funs env) (tyConName tc) | 130 | lookupTyConPA tc
= readGEnv $ \env -> lookupNameEnv (global_pa_funs env) (tyConName tc) | 89 | true | true | 0 | 9 | 40 | 56 | 29 | 27 | null | null |
jgonggrijp/net-prove | src/LG/TestGraph.hs | bsd-3-clause | k141516 = [c16d] :●: [c15u, c14'u] | 34 | k141516 = [c16d] :●: [c15u, c14'u] | 34 | k141516 = [c16d] :●: [c15u, c14'u] | 34 | false | false | 1 | 6 | 5 | 21 | 11 | 10 | null | null |
riwsky/connect4 | Main.hs | gpl-3.0 | play _ m g@(Game {currentTurn=p, board=board}) = let nextBoard = addMove board m p
nextPlayer = if nextBoard == board then p else other p in
checkWinner (g {board = nextBoard, currentTurn = nextPlayer}) | 308 | play _ m g@(Game {currentTurn=p, board=board}) = let nextBoard = addMove board m p
nextPlayer = if nextBoard == board then p else other p in
checkWinner (g {board = nextBoard, currentTurn = nextPlayer}) | 308 | play _ m g@(Game {currentTurn=p, board=board}) = let nextBoard = addMove board m p
nextPlayer = if nextBoard == board then p else other p in
checkWinner (g {board = nextBoard, currentTurn = nextPlayer}) | 308 | false | false | 0 | 10 | 139 | 92 | 50 | 42 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | replaceModes :: FrozenSet String
replaceModes =
ConstantUtils.mkSet $ map Types.replaceDisksModeToRaw [minBound..] | 116 | replaceModes :: FrozenSet String
replaceModes =
ConstantUtils.mkSet $ map Types.replaceDisksModeToRaw [minBound..] | 116 | replaceModes =
ConstantUtils.mkSet $ map Types.replaceDisksModeToRaw [minBound..] | 83 | false | true | 0 | 7 | 12 | 30 | 15 | 15 | null | null |
worksap-ate/aws-sdk | Cloud/AWS/EC2/Params.hs | bsd-3-clause | blockDeviceMappingsParam :: [BlockDeviceMappingParam] -> QueryParam
blockDeviceMappingsParam =
("BlockDeviceMapping" |.#.) . map blockDeviceMappingParams | 157 | blockDeviceMappingsParam :: [BlockDeviceMappingParam] -> QueryParam
blockDeviceMappingsParam =
("BlockDeviceMapping" |.#.) . map blockDeviceMappingParams | 157 | blockDeviceMappingsParam =
("BlockDeviceMapping" |.#.) . map blockDeviceMappingParams | 89 | false | true | 0 | 6 | 15 | 29 | 16 | 13 | null | null |
marcellussiegburg/autotool | collection/src/Up/Type.hs | gpl-2.0 | read_write e =
Just e ==
down (parse ( parse_complete reader) "<>"
( render $ toDoc e ) ) | 144 | read_write e =
Just e ==
down (parse ( parse_complete reader) "<>"
( render $ toDoc e ) ) | 144 | read_write e =
Just e ==
down (parse ( parse_complete reader) "<>"
( render $ toDoc e ) ) | 144 | false | false | 3 | 8 | 73 | 49 | 22 | 27 | null | null |
mcmaniac/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprGInstr platform (GITOF src dst) = pprSizeSizeRegReg platform (sLit "gitof") II32 FF32 src dst | 97 | pprGInstr platform (GITOF src dst) = pprSizeSizeRegReg platform (sLit "gitof") II32 FF32 src dst | 97 | pprGInstr platform (GITOF src dst) = pprSizeSizeRegReg platform (sLit "gitof") II32 FF32 src dst | 97 | false | false | 0 | 7 | 14 | 38 | 18 | 20 | null | null |
netogallo/XHints | src/XMonad/Actions/XHints/Helpers.hs | bsd-3-clause | newTextHint :: forall status state . Typeable status =>
(Text -> XHint status state (Either Text Text))
-> (Text -> XHint status state ())
newTextHint hint selection = do
XHintsContext{hintWindow=w, graphicsContext = gc, hintDisplay = dpy} <- hintContext
result <- hint selection
li... | 351 | newTextHint :: forall status state . Typeable status =>
(Text -> XHint status state (Either Text Text))
-> (Text -> XHint status state ())
newTextHint hint selection = do
XHintsContext{hintWindow=w, graphicsContext = gc, hintDisplay = dpy} <- hintContext
result <- hint selection
li... | 351 | newTextHint hint selection = do
XHintsContext{hintWindow=w, graphicsContext = gc, hintDisplay = dpy} <- hintContext
result <- hint selection
liftIO $ showHint dpy w gc result | 181 | false | true | 0 | 12 | 86 | 125 | 63 | 62 | null | null |
athanclark/tries | src/Data/Trie/HashMap.hs | bsd-3-clause | -- | Returns a list of all the nodes along the path to the furthest point in the
-- query, in order of the path walked from the root to the furthest point.
matches :: ( Hashable p
, Eq p
) => NonEmpty p -> HashMapTrie p a -> [(NonEmpty p, a, [p])]
matches (p:|ps) (HashMapTrie (HashMapStep xs)) =
... | 751 | matches :: ( Hashable p
, Eq p
) => NonEmpty p -> HashMapTrie p a -> [(NonEmpty p, a, [p])]
matches (p:|ps) (HashMapTrie (HashMapStep xs)) =
let (HashMapChildren mx mxs) = fromMaybe mempty (HM.lookup p xs)
foundHere = case mx of
Nothing -> []
Just x -> [(p:|[],x,ps)]
in ... | 595 | matches (p:|ps) (HashMapTrie (HashMapStep xs)) =
let (HashMapChildren mx mxs) = fromMaybe mempty (HM.lookup p xs)
foundHere = case mx of
Nothing -> []
Just x -> [(p:|[],x,ps)]
in if F.null ps
then foundHere
else let rs = case mxs of
Nothing -> []
... | 481 | true | true | 0 | 18 | 232 | 269 | 140 | 129 | null | null |
hBPF/hBPF | HBPF/Internal.hs | bsd-3-clause | printBPFInstr (ISwapXA) = "txa" | 37 | printBPFInstr (ISwapXA) = "txa" | 37 | printBPFInstr (ISwapXA) = "txa" | 37 | false | false | 0 | 6 | 9 | 12 | 6 | 6 | null | null |
oldmanmike/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | -- the tick application inherits the source position of its
-- expression argument to support nested box allocations
allocATickBox :: BoxLabel -> Bool -> Bool -> SrcSpan -> FreeVars
-> TM (Maybe (Tickish Id))
allocATickBox boxLabel countEntries topOnly pos fvs =
ifGoodTickSrcSpan pos (do
let
... | 603 | allocATickBox :: BoxLabel -> Bool -> Bool -> SrcSpan -> FreeVars
-> TM (Maybe (Tickish Id))
allocATickBox boxLabel countEntries topOnly pos fvs =
ifGoodTickSrcSpan pos (do
let
mydecl_path = case boxLabel of
TopLevelBox x -> x
LocalBox xs -> xs
... | 486 | allocATickBox boxLabel countEntries topOnly pos fvs =
ifGoodTickSrcSpan pos (do
let
mydecl_path = case boxLabel of
TopLevelBox x -> x
LocalBox xs -> xs
_ -> panic "allocATickBox"
tickish <- mkTickish boxLabel countEntries topOnly pos fv... | 380 | true | true | 0 | 15 | 180 | 154 | 71 | 83 | null | null |
bennofs/dynamic-cabal | src/Distribution/Client/Dynamic/Query.hs | bsd-3-clause | generateSource :: Selector LocalBuildInfo o -> String -> FilePath -> Version -> IO String
generateSource (Selector s) modName setupConfig version =
return $ flip generateModule modName $ do
getLBI <- addDecl (Ident "getLBI") $
if version < Version [1,21] []
then applyE fmap' (read' <>. unlines' <>. ap... | 688 | generateSource :: Selector LocalBuildInfo o -> String -> FilePath -> Version -> IO String
generateSource (Selector s) modName setupConfig version =
return $ flip generateModule modName $ do
getLBI <- addDecl (Ident "getLBI") $
if version < Version [1,21] []
then applyE fmap' (read' <>. unlines' <>. ap... | 688 | generateSource (Selector s) modName setupConfig version =
return $ flip generateModule modName $ do
getLBI <- addDecl (Ident "getLBI") $
if version < Version [1,21] []
then applyE fmap' (read' <>. unlines' <>. applyE drop' 1 <>. lines' :: ExpG (String -> LocalBuildInfo)) <>$ applyE readFile' (expr set... | 598 | false | true | 2 | 17 | 138 | 230 | 108 | 122 | null | null |
aflag/haskell-group | arithmeticPuzzle/ArithmeticPuzzle.hs | gpl-2.0 | eval :: BinaryTree -> Float
eval (Leaf x) = x | 45 | eval :: BinaryTree -> Float
eval (Leaf x) = x | 45 | eval (Leaf x) = x | 17 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
shinjiro-itagaki/shinjirecs | shinjirecs-api/src/Helper/MaybeHelper.hs | gpl-3.0 | (||) :: Maybe a -> Maybe a -> Maybe a
(||) (Just x) _ = Just x | 69 | (||) :: Maybe a -> Maybe a -> Maybe a
(||) (Just x) _ = Just x | 69 | (||) (Just x) _ = Just x | 31 | false | true | 0 | 10 | 23 | 50 | 24 | 26 | null | null |
mrakgr/futhark | src/Futhark/Internalise.hs | bsd-3-clause | internaliseLambda (E.CurryBinOpLeft binop e (Info paramtype) (Info rettype) loc) rowts = do
(params, body, rettype') <-
binOpCurriedToLambda binop paramtype rettype e $ uncurry $ flip (,)
internaliseLambda (AnonymFun params body (typeToTypeDecl rettype') loc) rowts | 273 | internaliseLambda (E.CurryBinOpLeft binop e (Info paramtype) (Info rettype) loc) rowts = do
(params, body, rettype') <-
binOpCurriedToLambda binop paramtype rettype e $ uncurry $ flip (,)
internaliseLambda (AnonymFun params body (typeToTypeDecl rettype') loc) rowts | 273 | internaliseLambda (E.CurryBinOpLeft binop e (Info paramtype) (Info rettype) loc) rowts = do
(params, body, rettype') <-
binOpCurriedToLambda binop paramtype rettype e $ uncurry $ flip (,)
internaliseLambda (AnonymFun params body (typeToTypeDecl rettype') loc) rowts | 273 | false | false | 0 | 11 | 41 | 104 | 51 | 53 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Command/Commands.hs | mit | -- | Arg1 unburrow
unburrow :: UnitId -> Command
unburrow = atNothing CT.Unburrow | 92 | unburrow :: UnitId -> Command
unburrow = atNothing CT.Unburrow | 73 | unburrow = atNothing CT.Unburrow | 43 | true | true | 0 | 7 | 23 | 28 | 12 | 16 | null | null |
forsyde/forsyde-shallow | src/ForSyDe/Shallow/Utility/PolyArith.hs | bsd-3-clause | getCoef _ = error "getCoef: Nested fractions found" | 51 | getCoef _ = error "getCoef: Nested fractions found" | 51 | getCoef _ = error "getCoef: Nested fractions found" | 51 | false | false | 0 | 5 | 7 | 12 | 5 | 7 | null | null |
jystic/cthulhu | src/Types.hs | bsd-3-clause | octDigit :: Regex
octDigit = range '0' '7' | 42 | octDigit :: Regex
octDigit = range '0' '7' | 42 | octDigit = range '0' '7' | 24 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
unhammer/bytestring-trie-0.2.4 | src/Data/Trie/Internal.hs | bsd-3-clause | matches_ :: Trie a -> ByteString -> [(Int,a)]
matches_ t q =
#if !defined(__GLASGOW_HASKELL__)
matchFB_ t q (((:) .) . (,)) [] | 130 | matches_ :: Trie a -> ByteString -> [(Int,a)]
matches_ t q =
#if !defined(__GLASGOW_HASKELL__)
matchFB_ t q (((:) .) . (,)) [] | 130 | matches_ t q =
#if !defined(__GLASGOW_HASKELL__)
matchFB_ t q (((:) .) . (,)) [] | 84 | false | true | 0 | 8 | 25 | 64 | 36 | 28 | null | null |
santolucito/haste-compiler | libraries/haste-lib/src/Haste/DOM/JSString.hs | bsd-3-clause | -- | Get all elements of the given class.
elemsByClass :: MonadIO m => ElemClass -> m [Elem]
elemsByClass cls = liftIO $ fromPtr `fmap` (jsElemsByClassName cls) | 160 | elemsByClass :: MonadIO m => ElemClass -> m [Elem]
elemsByClass cls = liftIO $ fromPtr `fmap` (jsElemsByClassName cls) | 118 | elemsByClass cls = liftIO $ fromPtr `fmap` (jsElemsByClassName cls) | 67 | true | true | 0 | 8 | 26 | 52 | 26 | 26 | null | null |
oldmanmike/ghc | compiler/types/Type.hs | bsd-3-clause | -- | Break apart a list of binders into tyvars and anonymous types.
partitionBinders :: [TyBinder] -> ([TyVar], [Type])
partitionBinders = partitionWith named_or_anon
where
named_or_anon bndr = caseBinder bndr Left Right
-- | Break apart a list of binders into a list of named binders and
-- a list of anonymous t... | 325 | partitionBinders :: [TyBinder] -> ([TyVar], [Type])
partitionBinders = partitionWith named_or_anon
where
named_or_anon bndr = caseBinder bndr Left Right
-- | Break apart a list of binders into a list of named binders and
-- a list of anonymous types. | 257 | partitionBinders = partitionWith named_or_anon
where
named_or_anon bndr = caseBinder bndr Left Right
-- | Break apart a list of binders into a list of named binders and
-- a list of anonymous types. | 205 | true | true | 0 | 9 | 58 | 60 | 31 | 29 | null | null |
binarin/learnopengl | src/Main.hs | bsd-3-clause | appWindow :: IORef AppState -> IO GLFW.Window
appWindow stateRef = do
AppState{_window = window} <- readIORef stateRef
return window | 136 | appWindow :: IORef AppState -> IO GLFW.Window
appWindow stateRef = do
AppState{_window = window} <- readIORef stateRef
return window | 136 | appWindow stateRef = do
AppState{_window = window} <- readIORef stateRef
return window | 90 | false | true | 0 | 10 | 22 | 51 | 23 | 28 | null | null |
kim/amazonka | amazonka-elasticache/gen/Network/AWS/ElastiCache/Types.hs | mpl-2.0 | -- | 'SecurityGroupMembership' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'sgmSecurityGroupId' @::@ 'Maybe' 'Text'
--
-- * 'sgmStatus' @::@ 'Maybe' 'Text'
--
securityGroupMembership :: SecurityGroupMembership
securityGroupMembership = SecurityGroupMembership
{ _sgmSecurityGro... | 376 | securityGroupMembership :: SecurityGroupMembership
securityGroupMembership = SecurityGroupMembership
{ _sgmSecurityGroupId = Nothing
, _sgmStatus = Nothing
} | 178 | securityGroupMembership = SecurityGroupMembership
{ _sgmSecurityGroupId = Nothing
, _sgmStatus = Nothing
} | 127 | true | true | 0 | 7 | 63 | 43 | 25 | 18 | null | null |
diku-dk/futhark | src/Futhark/Analysis/PrimExp.hs | isc | primExpType (ValueExp v) = primValueType v | 42 | primExpType (ValueExp v) = primValueType v | 42 | primExpType (ValueExp v) = primValueType v | 42 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
coreyoconnor/bind-marshal | test/old_verify_data_model_proto.hs | bsd-3-clause | -- Examining some example cases.
--
-- dm_sync >> dm_sync
t_0 :: SBCons DummyAction (SBUnit DummyAction)
t_0 = undefined | 120 | t_0 :: SBCons DummyAction (SBUnit DummyAction)
t_0 = undefined | 62 | t_0 = undefined | 15 | true | true | 0 | 7 | 18 | 25 | 14 | 11 | null | null |
sdiehl/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | condIntCode' _ cond x (CmmLit (CmmInt 0 pk)) = do
(x_reg, x_code) <- getSomeReg x
let
code = x_code `snocOL`
TEST (intFormat pk) (OpReg x_reg) (OpReg x_reg)
--
return (CondCode False cond code)
-- anything vs operand | 259 | condIntCode' _ cond x (CmmLit (CmmInt 0 pk)) = do
(x_reg, x_code) <- getSomeReg x
let
code = x_code `snocOL`
TEST (intFormat pk) (OpReg x_reg) (OpReg x_reg)
--
return (CondCode False cond code)
-- anything vs operand | 259 | condIntCode' _ cond x (CmmLit (CmmInt 0 pk)) = do
(x_reg, x_code) <- getSomeReg x
let
code = x_code `snocOL`
TEST (intFormat pk) (OpReg x_reg) (OpReg x_reg)
--
return (CondCode False cond code)
-- anything vs operand | 259 | false | false | 1 | 14 | 79 | 108 | 51 | 57 | null | null |
eryx67/haskell-libtorrent | src/Network/Libtorrent/TorrentInfo/AnnounceEntry.hs | bsd-3-clause | getTier :: MonadIO m => AnnounceEntry -> m Word8
getTier ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| uint8_t { $(announce_entry * hoPtr)->tier } |] | 169 | getTier :: MonadIO m => AnnounceEntry -> m Word8
getTier ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| uint8_t { $(announce_entry * hoPtr)->tier } |] | 169 | getTier ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| uint8_t { $(announce_entry * hoPtr)->tier } |] | 119 | false | true | 3 | 8 | 46 | 57 | 27 | 30 | null | null |
shlevy/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | mkLblExpr :: CLabel -> CmmExpr
mkLblExpr lbl = CmmLit (CmmLabel lbl) | 68 | mkLblExpr :: CLabel -> CmmExpr
mkLblExpr lbl = CmmLit (CmmLabel lbl) | 68 | mkLblExpr lbl = CmmLit (CmmLabel lbl) | 37 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
capn-freako/lambda-ccc | src/LambdaCCC/Unused/SReify.hs | bsd-3-clause | externals :: [External]
externals =
[ externC "reify-rules" reifyRules
"convert some non-local vars to consts"
-- , externC "reify-rules-prefix" reifyRulesPrefix
-- "reify-rules on an application prefix"
, external "reify-rhs"
#ifdef SplitEval
(promoteR . reifyRhs :: String -> ReCo... | 3,262 | externals :: [External]
externals =
[ externC "reify-rules" reifyRules
"convert some non-local vars to consts"
-- , externC "reify-rules-prefix" reifyRulesPrefix
-- "reify-rules on an application prefix"
, external "reify-rhs"
#ifdef SplitEval
(promoteR . reifyRhs :: String -> ReCo... | 3,262 | externals =
[ externC "reify-rules" reifyRules
"convert some non-local vars to consts"
-- , externC "reify-rules-prefix" reifyRulesPrefix
-- "reify-rules on an application prefix"
, external "reify-rhs"
#ifdef SplitEval
(promoteR . reifyRhs :: String -> ReCore)
#else
(promo... | 3,238 | false | true | 0 | 9 | 624 | 357 | 191 | 166 | null | null |
adolenc/AlexanderTheGreat | src/Alexander.hs | mit | -- | Auxilary function.
value' p =
let alpha = coefficient (False,False) $ p (False,False)
beta = coefficient (True,False) $ p (False,True)
in (alpha,beta) | 167 | value' p =
let alpha = coefficient (False,False) $ p (False,False)
beta = coefficient (True,False) $ p (False,True)
in (alpha,beta) | 143 | value' p =
let alpha = coefficient (False,False) $ p (False,False)
beta = coefficient (True,False) $ p (False,True)
in (alpha,beta) | 143 | true | false | 0 | 11 | 35 | 76 | 41 | 35 | null | null |
flowbox-public/ghcjs | src/Gen2/DynamicLinking.hs | mit | dumpHpt :: DynFlags -> HomePackageTable -> String
dumpHpt dflags pt = "hpt:\n" ++ unlines
(map (\hmi -> (moduleNameString . moduleName . mi_module . hm_iface $ hmi) ++
" -> " ++ maybe "<no linkable>" (showPpr dflags) (hm_linkable hmi))
(eltsUFM pt)) | 274 | dumpHpt :: DynFlags -> HomePackageTable -> String
dumpHpt dflags pt = "hpt:\n" ++ unlines
(map (\hmi -> (moduleNameString . moduleName . mi_module . hm_iface $ hmi) ++
" -> " ++ maybe "<no linkable>" (showPpr dflags) (hm_linkable hmi))
(eltsUFM pt)) | 274 | dumpHpt dflags pt = "hpt:\n" ++ unlines
(map (\hmi -> (moduleNameString . moduleName . mi_module . hm_iface $ hmi) ++
" -> " ++ maybe "<no linkable>" (showPpr dflags) (hm_linkable hmi))
(eltsUFM pt)) | 224 | false | true | 0 | 15 | 64 | 99 | 50 | 49 | null | null |
mrak/ptui | src/Pt/StateMachine.hs | bsd-3-clause | transduce Q0 cs t ('\x07':>bs) = BEL : transduce Q0 cs t bs | 59 | transduce Q0 cs t ('\x07':>bs) = BEL : transduce Q0 cs t bs | 59 | transduce Q0 cs t ('\x07':>bs) = BEL : transduce Q0 cs t bs | 59 | false | false | 0 | 7 | 12 | 35 | 17 | 18 | null | null |
carlostome/HCrawler | src/WebGraph.hs | gpl-2.0 | -- | Get all URI's of a graph
getURIs :: WebG -> [URI]
getURIs = fst . unzip . M.toList . webG | 94 | getURIs :: WebG -> [URI]
getURIs = fst . unzip . M.toList . webG | 64 | getURIs = fst . unzip . M.toList . webG | 39 | true | true | 0 | 7 | 21 | 33 | 18 | 15 | null | null |
gambogi/csh-eval | src/CSH/Eval/Cacheable/Fetch.hs | mit | -- | Fetch the 'Signature's provided by a particular 'Member'.
getMemberSignatures :: Word64 -- ^ MemberID.
-> Cacheable [Signature]
getMemberSignatures i c = do
sc <- hitSegment signatureMemberIDCache c
hitRecordFallback i sc (sneakyGhostM signatureMemberIDCache i db c)
where db = liftL... | 411 | getMemberSignatures :: Word64 -- ^ MemberID.
-> Cacheable [Signature]
getMemberSignatures i c = do
sc <- hitSegment signatureMemberIDCache c
hitRecordFallback i sc (sneakyGhostM signatureMemberIDCache i db c)
where db = liftListQ (getSignaturesMemberIDP i) signatureFromRow c
-- | Fetch ... | 348 | getMemberSignatures i c = do
sc <- hitSegment signatureMemberIDCache c
hitRecordFallback i sc (sneakyGhostM signatureMemberIDCache i db c)
where db = liftListQ (getSignaturesMemberIDP i) signatureFromRow c
-- | Fetch a 'Review's 'ReviewMetric's. | 258 | true | true | 0 | 9 | 83 | 84 | 41 | 43 | null | null |
fmthoma/ghc | compiler/main/ErrUtils.hs | bsd-3-clause | logOutput :: DynFlags -> PprStyle -> MsgDoc -> IO ()
-- Like logInfo but with SevOutput rather then SevInfo
logOutput dflags sty msg = log_action dflags dflags SevOutput noSrcSpan sty msg | 187 | logOutput :: DynFlags -> PprStyle -> MsgDoc -> IO ()
logOutput dflags sty msg = log_action dflags dflags SevOutput noSrcSpan sty msg | 132 | logOutput dflags sty msg = log_action dflags dflags SevOutput noSrcSpan sty msg | 79 | true | true | 0 | 9 | 30 | 49 | 24 | 25 | null | null |
forsyde/forsyde-atom | src/ForSyDe/Atom/Skel/Vector/Core.hs | bsd-3-clause | vector (x:xs) = x :> (vector xs) | 32 | vector (x:xs) = x :> (vector xs) | 32 | vector (x:xs) = x :> (vector xs) | 32 | false | false | 0 | 7 | 6 | 26 | 13 | 13 | null | null |
HJvT/com | System/Win32/Com/Exception.hs | bsd-3-clause | dISP_E_BADCALLEE :: HRESULT
dISP_E_BADCALLEE = word32ToInt32 (0x80020010 ::Word32) | 82 | dISP_E_BADCALLEE :: HRESULT
dISP_E_BADCALLEE = word32ToInt32 (0x80020010 ::Word32) | 82 | dISP_E_BADCALLEE = word32ToInt32 (0x80020010 ::Word32) | 54 | false | true | 0 | 6 | 7 | 26 | 12 | 14 | null | null |
sdiehl/ghc | libraries/base/GHC/IO/Encoding.hs | bsd-3-clause | mkTextEncoding' :: CodingFailureMode -> String -> IO TextEncoding
mkTextEncoding' cfm enc =
case [toUpper c | c <- enc, c /= '-'] of
-- UTF-8 and friends we can handle ourselves
"UTF8" -> return $ UTF8.mkUTF8 cfm
"UTF16" -> return $ UTF16.mkUTF16 cfm
"UTF16LE" -> return $ UTF16.mkUTF16le cfm
"U... | 2,207 | mkTextEncoding' :: CodingFailureMode -> String -> IO TextEncoding
mkTextEncoding' cfm enc =
case [toUpper c | c <- enc, c /= '-'] of
-- UTF-8 and friends we can handle ourselves
"UTF8" -> return $ UTF8.mkUTF8 cfm
"UTF16" -> return $ UTF16.mkUTF16 cfm
"UTF16LE" -> return $ UTF16.mkUTF16le cfm
"U... | 2,207 | mkTextEncoding' cfm enc =
case [toUpper c | c <- enc, c /= '-'] of
-- UTF-8 and friends we can handle ourselves
"UTF8" -> return $ UTF8.mkUTF8 cfm
"UTF16" -> return $ UTF16.mkUTF16 cfm
"UTF16LE" -> return $ UTF16.mkUTF16le cfm
"UTF16BE" -> return $ UTF16.mkUTF16be cfm
"UTF32" -> return $ ... | 2,141 | false | true | 4 | 13 | 497 | 401 | 205 | 196 | null | null |
myuon/haste-jQuery | Haste/JQuery.hs | mit | has :: Selector -> JQuery -> IO JQuery
has sel (JQuery q) = JQuery <$> chain "has" sel q | 88 | has :: Selector -> JQuery -> IO JQuery
has sel (JQuery q) = JQuery <$> chain "has" sel q | 88 | has sel (JQuery q) = JQuery <$> chain "has" sel q | 49 | false | true | 0 | 7 | 18 | 44 | 21 | 23 | null | null |
sixohsix/hmidi | examples/SMF.hs | bsd-3-clause | etaevent 5 = do { s <- vstring ; return $ Lyric s }
| 62 | metaevent 5 = do { s <- vstring ; return $ Lyric s } | 62 | metaevent 5 = do { s <- vstring ; return $ Lyric s } | 62 | false | false | 0 | 8 | 24 | 29 | 14 | 15 | null | null |
bflyblue/quadtree | Quadtree.hs | unlicense | posbits h (x,y) = (testBit x h', testBit y h'):posbits h' (x,y)
where h' = h - 1 | 98 | posbits h (x,y) = (testBit x h', testBit y h'):posbits h' (x,y)
where h' = h - 1 | 98 | posbits h (x,y) = (testBit x h', testBit y h'):posbits h' (x,y)
where h' = h - 1 | 98 | false | false | 0 | 7 | 35 | 59 | 31 | 28 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | tagOf_PrimOp DoubleSqrtOp = _ILIT(99) | 37 | tagOf_PrimOp DoubleSqrtOp = _ILIT(99) | 37 | tagOf_PrimOp DoubleSqrtOp = _ILIT(99) | 37 | false | false | 0 | 6 | 3 | 15 | 7 | 8 | null | null |
kindaro/board | src/Main.hs | isc | main :: IO ()
main = do
(_progName, _args) <- getArgsAndInitialize
_window <- createWindow "Hello World"
fullScreen
displayCallback $= display
reshapeCallback $= Just reshape
mainLoop | 207 | main :: IO ()
main = do
(_progName, _args) <- getArgsAndInitialize
_window <- createWindow "Hello World"
fullScreen
displayCallback $= display
reshapeCallback $= Just reshape
mainLoop | 207 | main = do
(_progName, _args) <- getArgsAndInitialize
_window <- createWindow "Hello World"
fullScreen
displayCallback $= display
reshapeCallback $= Just reshape
mainLoop | 193 | false | true | 1 | 8 | 48 | 66 | 28 | 38 | null | null |
jstolarek/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | latexMonoFilter :: String -> String
latexMonoFilter = foldr latexMonoMunge "" | 77 | latexMonoFilter :: String -> String
latexMonoFilter = foldr latexMonoMunge "" | 77 | latexMonoFilter = foldr latexMonoMunge "" | 41 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
randen/haddock | haddock-api/src/Haddock/Convert.hs | bsd-2-clause | synifyType _ (LitTy t) = noLoc $ HsTyLit $ synifyTyLit t | 56 | synifyType _ (LitTy t) = noLoc $ HsTyLit $ synifyTyLit t | 56 | synifyType _ (LitTy t) = noLoc $ HsTyLit $ synifyTyLit t | 56 | false | false | 0 | 7 | 10 | 28 | 13 | 15 | null | null |
ezyang/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | charPrimTyConKey = mkPreludeTyConUnique 7 | 65 | charPrimTyConKey = mkPreludeTyConUnique 7 | 65 | charPrimTyConKey = mkPreludeTyConUnique 7 | 65 | false | false | 0 | 5 | 27 | 9 | 4 | 5 | null | null |
nadavshemer/buildsome | src/Lib/FilePath.hs | gpl-2.0 | isAbsolute :: FilePath -> Bool
isAbsolute = ("/" `BS8.isPrefixOf`) | 66 | isAbsolute :: FilePath -> Bool
isAbsolute = ("/" `BS8.isPrefixOf`) | 66 | isAbsolute = ("/" `BS8.isPrefixOf`) | 35 | false | true | 0 | 7 | 8 | 30 | 15 | 15 | null | null |
Bodigrim/arithmoi | Math/NumberTheory/ArithmeticFunctions/Inverse.hs | mit | -- | The inverse for 'sigma' function.
--
-- Generalizes the 'inverseSigma' function, which is 'inverseSigmaK' 1.
--
-- The return value is parameterized by a 'Semiring', which allows
-- various applications by providing different (multiplicative) embeddings.
-- E. g., list all preimages (see a helper 'asSetOfPreimages... | 1,210 | inverseSigmaK
:: (Semiring b, Euclidean a, UniqueFactorisation a, Integral a, Enum (Prime a), Bits a)
=> Word
-> (a -> b)
-> a
-> b
inverseSigmaK k point = invertFunction point (sigmaA k) (invSigma k) | 210 | inverseSigmaK k point = invertFunction point (sigmaA k) (invSigma k) | 68 | true | true | 0 | 10 | 199 | 128 | 75 | 53 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_ETC1_RGB8_OES :: GLenum
gl_ETC1_RGB8_OES = 0x8D64 | 52 | gl_ETC1_RGB8_OES :: GLenum
gl_ETC1_RGB8_OES = 0x8D64 | 52 | gl_ETC1_RGB8_OES = 0x8D64 | 25 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
damianfral/BrainHask | src/Language/BrainHask/Optimizer.hs | mit | allOpt :: [BFTransformer]
allOpt = [reduceModifies, reduceMoves, optimizeLoops allOpt, removeModifies0, removeMoves0, reduceLoops] | 130 | allOpt :: [BFTransformer]
allOpt = [reduceModifies, reduceMoves, optimizeLoops allOpt, removeModifies0, removeMoves0, reduceLoops] | 130 | allOpt = [reduceModifies, reduceMoves, optimizeLoops allOpt, removeModifies0, removeMoves0, reduceLoops] | 104 | false | true | 0 | 6 | 11 | 35 | 21 | 14 | null | null |
Lupino/dispatch-article | src/Article/RawAPI.hs | bsd-3-clause | mergeData :: HasMySQL u => GenHaxl u w ()
mergeData = uncachedRequest MergeData | 79 | mergeData :: HasMySQL u => GenHaxl u w ()
mergeData = uncachedRequest MergeData | 79 | mergeData = uncachedRequest MergeData | 37 | false | true | 0 | 8 | 12 | 35 | 15 | 20 | null | null |
Lykos/Sara | src/lib/Sara/Compiler.hs | gpl-3.0 | run :: Bool -> Reporter -> String -> String -> ErrorOrIO Int64
run verify reporter filename input = withModule filename $ \mod ->
compile' verify runReporter reporter mod filename input
where runReporter :: Context -> M.Module -> IO (Either Error Int64)
runReporter context mod = reportModule reporter mod >>... | 341 | run :: Bool -> Reporter -> String -> String -> ErrorOrIO Int64
run verify reporter filename input = withModule filename $ \mod ->
compile' verify runReporter reporter mod filename input
where runReporter :: Context -> M.Module -> IO (Either Error Int64)
runReporter context mod = reportModule reporter mod >>... | 341 | run verify reporter filename input = withModule filename $ \mod ->
compile' verify runReporter reporter mod filename input
where runReporter :: Context -> M.Module -> IO (Either Error Int64)
runReporter context mod = reportModule reporter mod >> runStage context mod | 278 | false | true | 3 | 9 | 63 | 116 | 56 | 60 | null | null |
authchir/mini-ml | src/Compiler.hs | isc | clAt :: (Type2 -> Id -> AtomicExprCl) -> AtomicExpr -> AtomicExprCl
clAt s (ALitInt ty n) = ACLitInt ty n | 111 | clAt :: (Type2 -> Id -> AtomicExprCl) -> AtomicExpr -> AtomicExprCl
clAt s (ALitInt ty n) = ACLitInt ty n | 111 | clAt s (ALitInt ty n) = ACLitInt ty n | 43 | false | true | 0 | 8 | 25 | 48 | 24 | 24 | null | null |
zc1036/Compiler-project | src/Analyzer.hs | gpl-3.0 | charSize = 1 | 12 | charSize = 1 | 12 | charSize = 1 | 12 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
MichielDerhaeg/stack | src/System/Process/Run.hs | bsd-3-clause | -- | Like 'System.Process.callProcess', but takes an optional working directory and
-- environment override, and throws 'ProcessExitedUnsuccessfully' if the
-- process exits unsuccessfully and a 'ReadProcessException' if the executable is not found.
--
-- Inherits stdout and stderr.
callProcess' :: (MonadIO m, MonadLog... | 739 | callProcess' :: (MonadIO m, MonadLogger m)
=> (CreateProcess -> CreateProcess) -> Cmd -> m ()
callProcess' modCP cmd = do
c <- liftM modCP (cmdToCreateProcess cmd)
logCreateProcess c
liftIO $ do
(_, _, _, p) <- System.Process.createProcess c
exit_code <- waitForProcess p
... | 455 | callProcess' modCP cmd = do
c <- liftM modCP (cmdToCreateProcess cmd)
logCreateProcess c
liftIO $ do
(_, _, _, p) <- System.Process.createProcess c
exit_code <- waitForProcess p
case exit_code of
ExitSuccess -> return ()
ExitFailure _ -> throwM (ProcessExite... | 348 | true | true | 0 | 15 | 168 | 160 | 79 | 81 | null | null |
tidalcycles/tidal-midi | Sound/Tidal/MIDI/System1M.hs | gpl-3.0 | (rosc1range, rosc1range_p) = pF "rosc1range" (Just 0) | 53 | (rosc1range, rosc1range_p) = pF "rosc1range" (Just 0) | 53 | (rosc1range, rosc1range_p) = pF "rosc1range" (Just 0) | 53 | false | false | 0 | 7 | 6 | 24 | 12 | 12 | null | null |
PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator1Optional/PicturesSVG.hs | cc0-1.0 | height (Above pic1 pic2) = (height pic1) + (height pic2) | 60 | height (Above pic1 pic2) = (height pic1) + (height pic2) | 60 | height (Above pic1 pic2) = (height pic1) + (height pic2) | 60 | false | false | 0 | 7 | 13 | 33 | 16 | 17 | null | null |
sgillespie/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | fromString_RDR = nameRdrName fromStringName | 52 | fromString_RDR = nameRdrName fromStringName | 52 | fromString_RDR = nameRdrName fromStringName | 52 | false | false | 0 | 5 | 12 | 9 | 4 | 5 | null | null |
NKMR6194/carrot | src/Parser.hs | mit | addop = do{ symbol "+"; return AddNode } <|> do{ symbol "-"; return SubNode } | 77 | addop = do{ symbol "+"; return AddNode } <|> do{ symbol "-"; return SubNode } | 77 | addop = do{ symbol "+"; return AddNode } <|> do{ symbol "-"; return SubNode } | 77 | false | false | 1 | 9 | 14 | 44 | 19 | 25 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/Program/HcPkg.hs | bsd-3-clause | recacheInvocation :: HcPkgInfo -> Verbosity -> PackageDB
-> ProgramInvocation
recacheInvocation hpi verbosity packagedb =
programInvocation (hcPkgProgram hpi) $
["recache", packageDbOpts hpi packagedb]
++ verbosityOpts hpi verbosity | 263 | recacheInvocation :: HcPkgInfo -> Verbosity -> PackageDB
-> ProgramInvocation
recacheInvocation hpi verbosity packagedb =
programInvocation (hcPkgProgram hpi) $
["recache", packageDbOpts hpi packagedb]
++ verbosityOpts hpi verbosity | 263 | recacheInvocation hpi verbosity packagedb =
programInvocation (hcPkgProgram hpi) $
["recache", packageDbOpts hpi packagedb]
++ verbosityOpts hpi verbosity | 167 | false | true | 2 | 8 | 56 | 64 | 31 | 33 | null | null |
marcellussiegburg/autotool | collection/src/Rewriting/Completion/Improved.hs | gpl-2.0 | repair_step step = case step of
Deduce{s=s,u=u,t=t} -> Deduce{s=repair s,u=repair u,t=repair t}
Orient{s=s,t=t} -> Orient{s=repair s,t=repair t}
Delete{s=s} -> Delete{s=repair s}
Simplify{s=s,u=u,t=t} -> Simplify{s=repair s,u=repair u,t=repair t} | 262 | repair_step step = case step of
Deduce{s=s,u=u,t=t} -> Deduce{s=repair s,u=repair u,t=repair t}
Orient{s=s,t=t} -> Orient{s=repair s,t=repair t}
Delete{s=s} -> Delete{s=repair s}
Simplify{s=s,u=u,t=t} -> Simplify{s=repair s,u=repair u,t=repair t} | 262 | repair_step step = case step of
Deduce{s=s,u=u,t=t} -> Deduce{s=repair s,u=repair u,t=repair t}
Orient{s=s,t=t} -> Orient{s=repair s,t=repair t}
Delete{s=s} -> Delete{s=repair s}
Simplify{s=s,u=u,t=t} -> Simplify{s=repair s,u=repair u,t=repair t} | 262 | false | false | 0 | 10 | 42 | 192 | 107 | 85 | null | null |
skogsbaer/roundtrip | src/Control/Isomorphism/Partial/Prim.hs | bsd-3-clause | ignore :: alpha -> Iso alpha ()
ignore x = unsafeMakeNamedIsoR "ignore" f g where
f _ = Just ()
g () = Just x
-- | the product type constructor `(,)` is a bifunctor from
-- `Iso` $\times$ `Iso` to `Iso`, so that we have the
-- bifunctorial map `***` which allows two separate isomorphisms
-- to work on the two... | 343 | ignore :: alpha -> Iso alpha ()
ignore x = unsafeMakeNamedIsoR "ignore" f g where
f _ = Just ()
g () = Just x
-- | the product type constructor `(,)` is a bifunctor from
-- `Iso` $\times$ `Iso` to `Iso`, so that we have the
-- bifunctorial map `***` which allows two separate isomorphisms
-- to work on the two... | 343 | ignore x = unsafeMakeNamedIsoR "ignore" f g where
f _ = Just ()
g () = Just x
-- | the product type constructor `(,)` is a bifunctor from
-- `Iso` $\times$ `Iso` to `Iso`, so that we have the
-- bifunctorial map `***` which allows two separate isomorphisms
-- to work on the two components of a tuple. | 311 | false | true | 0 | 8 | 75 | 64 | 32 | 32 | null | null |
konn/offscripter | src/Language/ONScripter/Off/Prelude.hs | bsd-3-clause | (.==) = (:=) | 12 | (.==) = (:=) | 12 | (.==) = (:=) | 12 | false | false | 1 | 5 | 2 | 14 | 7 | 7 | null | null |
jwiegley/ghc-release | utils/haddock/src/Haddock/Backends/Xhtml/Decl.hs | gpl-3.0 | ppr_mono_ty _ (HsListTy ty) u q = brackets (ppr_mono_lty pREC_TOP ty u q) | 87 | ppr_mono_ty _ (HsListTy ty) u q = brackets (ppr_mono_lty pREC_TOP ty u q) | 87 | ppr_mono_ty _ (HsListTy ty) u q = brackets (ppr_mono_lty pREC_TOP ty u q) | 87 | false | false | 0 | 7 | 26 | 36 | 17 | 19 | null | null |
s3rvac/shws | src/Common.hs | gpl-2.0 | getEitherRight (Left _) = error "This Either contains Right item." | 66 | getEitherRight (Left _) = error "This Either contains Right item." | 66 | getEitherRight (Left _) = error "This Either contains Right item." | 66 | false | false | 0 | 7 | 9 | 18 | 8 | 10 | null | null |
pmiddend/jumpie | lib/Jumpie/List.hs | gpl-3.0 | inductiveFilter' ns (x:xs) f = if f x ns
then x : (inductiveFilter' (x:ns) xs f)
else inductiveFilter' ns xs f | 172 | inductiveFilter' ns (x:xs) f = if f x ns
then x : (inductiveFilter' (x:ns) xs f)
else inductiveFilter' ns xs f | 172 | inductiveFilter' ns (x:xs) f = if f x ns
then x : (inductiveFilter' (x:ns) xs f)
else inductiveFilter' ns xs f | 172 | false | false | 1 | 10 | 82 | 66 | 31 | 35 | null | null |
mariefarrell/Hets | CspCASL/testwrap.hs | gpl-2.0 | -- Report on a test failure
testFail :: String -> String -> String -> IO ()
testFail nature expect got =
do putStrLn ("failed - unexpected " ++ nature)
if expect /= ""
then putStrLn ("-> expected:\n" ++ strip expect)
else putStr ""
putStrLn "-> got:"
putStrLn $ strip got
-... | 359 | testFail :: String -> String -> String -> IO ()
testFail nature expect got =
do putStrLn ("failed - unexpected " ++ nature)
if expect /= ""
then putStrLn ("-> expected:\n" ++ strip expect)
else putStr ""
putStrLn "-> got:"
putStrLn $ strip got
-- | Run a test case through ... | 331 | testFail nature expect got =
do putStrLn ("failed - unexpected " ++ nature)
if expect /= ""
then putStrLn ("-> expected:\n" ++ strip expect)
else putStr ""
putStrLn "-> got:"
putStrLn $ strip got
-- | Run a test case through its parser. | 283 | true | true | 0 | 12 | 105 | 102 | 47 | 55 | null | null |
sinelaw/fresh | src/Fresh/InferMonad.hs | gpl-2.0 | purifyVar :: TypeVar (STRef s) (SType s) -> Infer s PType
purifyVar tvar@(TypeVar _ k) = do
link <- readVar tvar
case link of
Unbound name l -> return . PType . TyVar $ TypeVar (PCell $ Unbound name l) k
Link t -> purify t | 246 | purifyVar :: TypeVar (STRef s) (SType s) -> Infer s PType
purifyVar tvar@(TypeVar _ k) = do
link <- readVar tvar
case link of
Unbound name l -> return . PType . TyVar $ TypeVar (PCell $ Unbound name l) k
Link t -> purify t | 246 | purifyVar tvar@(TypeVar _ k) = do
link <- readVar tvar
case link of
Unbound name l -> return . PType . TyVar $ TypeVar (PCell $ Unbound name l) k
Link t -> purify t | 188 | false | true | 0 | 14 | 69 | 120 | 56 | 64 | null | null |
andreasabel/helf | src/Stream.hs | mit | fromList :: Monad m => [a] -> Stream m a
fromList = Stream . List.foldr consF emptyF | 84 | fromList :: Monad m => [a] -> Stream m a
fromList = Stream . List.foldr consF emptyF | 84 | fromList = Stream . List.foldr consF emptyF | 43 | false | true | 1 | 8 | 16 | 47 | 21 | 26 | null | null |
SamirTalwar/advent-of-code | 2021/AOC_24_1.hs | mit | eval :: (Input, State) -> Instruction -> Result (Input, State)
eval (input, state) (Inp a) =
case Vector.uncons input of
Nothing -> NoInputLeft state
Just (i, rest) -> Done (rest, update a i state) | 207 | eval :: (Input, State) -> Instruction -> Result (Input, State)
eval (input, state) (Inp a) =
case Vector.uncons input of
Nothing -> NoInputLeft state
Just (i, rest) -> Done (rest, update a i state) | 207 | eval (input, state) (Inp a) =
case Vector.uncons input of
Nothing -> NoInputLeft state
Just (i, rest) -> Done (rest, update a i state) | 144 | false | true | 0 | 10 | 43 | 104 | 53 | 51 | null | null |
roberth/uu-helium | test/testinstallation/Base.hs | gpl-3.0 | snd3 :: (a,b,c) -> b
snd3 (x,y,z) = y | 37 | snd3 :: (a,b,c) -> b
snd3 (x,y,z) = y | 37 | snd3 (x,y,z) = y | 16 | false | true | 0 | 6 | 8 | 36 | 21 | 15 | null | null |
keithodulaigh/Hets | SoftFOL/ParseTPTPAsLibDefn.hs | gpl-2.0 | createSpec :: [TPTP] -> Annoted SPEC
createSpec = makeSpec . G_basic_spec SoftFOL | 81 | createSpec :: [TPTP] -> Annoted SPEC
createSpec = makeSpec . G_basic_spec SoftFOL | 81 | createSpec = makeSpec . G_basic_spec SoftFOL | 44 | false | true | 0 | 6 | 11 | 28 | 14 | 14 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | {-
- The depth of the atmosphere, in meters.
-}
getCelestialBodyAtmosphereDepth :: KRPCHS.SpaceCenter.CelestialBody -> RPCContext (Float)
getCelestialBodyAtmosphereDepth thisArg = do
let r = makeRequest "SpaceCenter" "CelestialBody_get_AtmosphereDepth" [makeArgument 0 thisArg]
res <- sendRequest r
process... | 332 | getCelestialBodyAtmosphereDepth :: KRPCHS.SpaceCenter.CelestialBody -> RPCContext (Float)
getCelestialBodyAtmosphereDepth thisArg = do
let r = makeRequest "SpaceCenter" "CelestialBody_get_AtmosphereDepth" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 282 | getCelestialBodyAtmosphereDepth thisArg = do
let r = makeRequest "SpaceCenter" "CelestialBody_get_AtmosphereDepth" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 192 | true | true | 0 | 13 | 48 | 72 | 33 | 39 | null | null |
markflorisson/hpack | testrepo/bytestring-0.10.2.0/Data/ByteString/Builder/ASCII.hs | bsd-3-clause | floatHexFixed :: Float -> Builder
floatHexFixed = P.primFixed P.floatHexFixed | 77 | floatHexFixed :: Float -> Builder
floatHexFixed = P.primFixed P.floatHexFixed | 77 | floatHexFixed = P.primFixed P.floatHexFixed | 43 | false | true | 0 | 6 | 8 | 22 | 11 | 11 | null | null |
kd226/Raytrace | src/Types.hs | bsd-3-clause | subMix :: Color -> Color -> Color
subMix a b = a &- b | 53 | subMix :: Color -> Color -> Color
subMix a b = a &- b | 53 | subMix a b = a &- b | 19 | false | true | 0 | 6 | 13 | 28 | 14 | 14 | null | null |
TomMD/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | -- Used to generate the string for a *runtime* error message
matchContextErrString :: Outputable id => HsMatchContext id -> SDoc
matchContextErrString (FunRhs fun _) = ptext (sLit "function") <+> ppr fun | 215 | matchContextErrString :: Outputable id => HsMatchContext id -> SDoc
matchContextErrString (FunRhs fun _) = ptext (sLit "function") <+> ppr fun | 154 | matchContextErrString (FunRhs fun _) = ptext (sLit "function") <+> ppr fun | 86 | true | true | 0 | 10 | 42 | 58 | 26 | 32 | null | null |
akc/gfscript | Setup.hs | bsd-3-clause | makeManPage _ _ _ _ =
runCommand "make hops.1" >>= waitForProcess >>= exitWith | 82 | makeManPage _ _ _ _ =
runCommand "make hops.1" >>= waitForProcess >>= exitWith | 82 | makeManPage _ _ _ _ =
runCommand "make hops.1" >>= waitForProcess >>= exitWith | 82 | false | false | 0 | 7 | 16 | 26 | 12 | 14 | null | null |
mhwombat/exp-prediction-wains | src/ALife/Creatur/Wain/UIVector/Prediction/DataSource.hs | bsd-3-clause | parseLine :: String -> String -> (Int, [UIDouble])
parseLine delimiter text = (t, xs)
where (s:ss) = splitOn delimiter text
t = safeRead s
xs = map safeRead ss | 177 | parseLine :: String -> String -> (Int, [UIDouble])
parseLine delimiter text = (t, xs)
where (s:ss) = splitOn delimiter text
t = safeRead s
xs = map safeRead ss | 177 | parseLine delimiter text = (t, xs)
where (s:ss) = splitOn delimiter text
t = safeRead s
xs = map safeRead ss | 126 | false | true | 2 | 8 | 46 | 77 | 41 | 36 | null | null |
GaloisInc/halvm-ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | isBoxed :: Boxity -> Bool
isBoxed Boxed = True | 48 | isBoxed :: Boxity -> Bool
isBoxed Boxed = True | 48 | isBoxed Boxed = True | 22 | false | true | 0 | 7 | 10 | 24 | 10 | 14 | null | null |
hachibu/project-euler | src/ProjectEuler/Problem017.hs | mit | toWords 70 = "seventy" | 22 | toWords 70 = "seventy" | 22 | toWords 70 = "seventy" | 22 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
Min-/fourseq | src/lib/MyTable.hs | bsd-3-clause | infinitp::Double
infinitp = 1e100 | 33 | infinitp::Double
infinitp = 1e100 | 33 | infinitp = 1e100 | 16 | false | true | 0 | 6 | 3 | 19 | 7 | 12 | null | null |
meiersi/scyther-proof | src/Scyther/Formula.hs | gpl-3.0 | -- Substitution
---------------
-- | Substitute all variables in an atom.
--
-- NOTE: A 'HasType' atom will only have its thread identifier substituted, but
-- not the whole message variable.
substAtom :: Equalities -> Atom -> Atom
substAtom eqs atom = case atom of
ABool _ -> atom
AEq eq -> AEq $ s... | 790 | substAtom :: Equalities -> Atom -> Atom
substAtom eqs atom = case atom of
ABool _ -> atom
AEq eq -> AEq $ substAnyEq eqs eq
AIneq eq -> AIneq $ substInequality eqs eq
AEv ev -> AEv $ substEv eqs ev
AEvOrd ord -> AEvOrd $ substEvOrd eqs ord
ACompr m ... | 597 | substAtom eqs atom = case atom of
ABool _ -> atom
AEq eq -> AEq $ substAnyEq eqs eq
AIneq eq -> AIneq $ substInequality eqs eq
AEv ev -> AEv $ substEv eqs ev
AEvOrd ord -> AEvOrd $ substEvOrd eqs ord
ACompr m -> ACompr $ substMsg eqs m
A... | 557 | true | true | 11 | 6 | 234 | 80 | 52 | 28 | null | null |
tchagnon/cs636-raytracer | a5/Math.hs | apache-2.0 | (Mat4f r0 r1 r2 r3) !| 1 = r1 | 29 | (Mat4f r0 r1 r2 r3) !| 1 = r1 | 29 | (Mat4f r0 r1 r2 r3) !| 1 = r1 | 29 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.