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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eryx67/haskell-libtorrent | src/Network/Libtorrent/TorrentHandle/TorrentStatus.hs | bsd-3-clause | getAllTimeDownload :: MonadIO m => TorrentStatus -> m Int64
getAllTimeDownload ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| int64_t { $(torrent_status * hoPtr)->all_time_download } |] | 189 | getAllTimeDownload :: MonadIO m => TorrentStatus -> m Int64
getAllTimeDownload ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| int64_t { $(torrent_status * hoPtr)->all_time_download } |] | 189 | getAllTimeDownload ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| int64_t { $(torrent_status * hoPtr)->all_time_download } |] | 128 | false | true | 0 | 7 | 31 | 50 | 26 | 24 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/WebGPURenderingContext.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGPURenderingContext.createComputePipelineState Mozilla WebGPURenderingContext.createComputePipelineState documentation>
createComputePipelineStateUnchecked ::
(MonadDOM m) =>
WebGPURender... | 584 | createComputePipelineStateUnchecked ::
(MonadDOM m) =>
WebGPURenderingContext ->
WebGPUFunction -> m WebGPUComputePipelineState
createComputePipelineStateUnchecked self function
= liftDOM
((self ^. ... | 405 | createComputePipelineStateUnchecked self function
= liftDOM
((self ^. jsf "createComputePipelineState" [toJSVal function]) >>=
fromJSValUnchecked) | 163 | true | true | 0 | 11 | 161 | 65 | 33 | 32 | null | null |
dmp1ce/Haskell-Programming-Exercises | Chapter 29/parseIniFiles.hs | unlicense | main :: IO ()
main = do
eArgs <- getParseArgs <$> getArgs
case eArgs of
Left (ArgError s) -> die s
_ -> return ()
let args = fromRight (Args "") eArgs
inis <- filter (isSuffixOf ".ini") <$> (listDirectory $ unArgs args)
-- Filter out all failures
configTuple <- traverse (\file... | 616 | main :: IO ()
main = do
eArgs <- getParseArgs <$> getArgs
case eArgs of
Left (ArgError s) -> die s
_ -> return ()
let args = fromRight (Args "") eArgs
inis <- filter (isSuffixOf ".ini") <$> (listDirectory $ unArgs args)
-- Filter out all failures
configTuple <- traverse (\file... | 616 | main = do
eArgs <- getParseArgs <$> getArgs
case eArgs of
Left (ArgError s) -> die s
_ -> return ()
let args = fromRight (Args "") eArgs
inis <- filter (isSuffixOf ".ini") <$> (listDirectory $ unArgs args)
-- Filter out all failures
configTuple <- traverse (\filename -> do
... | 602 | false | true | 0 | 18 | 193 | 214 | 99 | 115 | null | null |
robdockins/orlin | src/Orlin/AST.hs | bsd-2-clause | interpHexDigit :: PMonad m => Pn -> Char -> m Integer
interpHexDigit pn c =
case c of
'0' -> return 0
'1' -> return 1
'2' -> return 2
'3' -> return 3
'4' -> return 4
'5' -> return 5
'6' -> return 6
'... | 653 | interpHexDigit :: PMonad m => Pn -> Char -> m Integer
interpHexDigit pn c =
case c of
'0' -> return 0
'1' -> return 1
'2' -> return 2
'3' -> return 3
'4' -> return 4
'5' -> return 5
'6' -> return 6
'... | 653 | interpHexDigit pn c =
case c of
'0' -> return 0
'1' -> return 1
'2' -> return 2
'3' -> return 3
'4' -> return 4
'5' -> return 5
'6' -> return 6
'7' -> return 7
'8' -> return 8
... | 599 | false | true | 17 | 9 | 337 | 226 | 96 | 130 | null | null |
np/hlatex | Language/LaTeX/Builder/Beamer.hs | bsd-3-clause | showOvInt (OvPlusOffset off) = ('+':) . ('(':) . shows off . (')':) | 68 | showOvInt (OvPlusOffset off) = ('+':) . ('(':) . shows off . (')':) | 68 | showOvInt (OvPlusOffset off) = ('+':) . ('(':) . shows off . (')':) | 68 | false | false | 0 | 8 | 12 | 43 | 23 | 20 | null | null |
Soares/Storyteller.hs | src/Storyteller/Reader.hs | mit | inlineOperator :: GenParser Char st Inline
inlineOperator = choice (map make operators) where
make (c, o) = Opr o <$> between (char c) (char c) chunks | 154 | inlineOperator :: GenParser Char st Inline
inlineOperator = choice (map make operators) where
make (c, o) = Opr o <$> between (char c) (char c) chunks | 154 | inlineOperator = choice (map make operators) where
make (c, o) = Opr o <$> between (char c) (char c) chunks | 111 | false | true | 3 | 7 | 29 | 78 | 35 | 43 | null | null |
google/codeworld | codeworld-server/src/Main.hs | apache-2.0 | noModuleFinder :: String -> IO (Maybe FilePath)
noModuleFinder _ = return Nothing | 81 | noModuleFinder :: String -> IO (Maybe FilePath)
noModuleFinder _ = return Nothing | 81 | noModuleFinder _ = return Nothing | 33 | false | true | 0 | 9 | 11 | 35 | 15 | 20 | null | null |
jecisc/TP_PF_L3 | PF-TP5/src/Main.hs | mit | interpreteSimpleM :: Environnement (ValeurM SimpleM) -> Expression -> SimpleM (ValeurM SimpleM)
interpreteSimpleM _ (Lit a) = S (VLitteralM a) | 142 | interpreteSimpleM :: Environnement (ValeurM SimpleM) -> Expression -> SimpleM (ValeurM SimpleM)
interpreteSimpleM _ (Lit a) = S (VLitteralM a) | 142 | interpreteSimpleM _ (Lit a) = S (VLitteralM a) | 46 | false | true | 0 | 10 | 18 | 61 | 28 | 33 | null | null |
hvr/lens | tests/properties.hs | bsd-3-clause | badIso :: Iso' Int Bool
badIso = iso even fromEnum | 50 | badIso :: Iso' Int Bool
badIso = iso even fromEnum | 50 | badIso = iso even fromEnum | 26 | false | true | 0 | 6 | 9 | 28 | 11 | 17 | null | null |
hengchu/tiger-haskell | src/tigercodegen.hs | mit | ispseudo _ = False | 18 | ispseudo _ = False | 18 | ispseudo _ = False | 18 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
wavewave/hxournal | lib/Application/HXournal/GUI/Menu.hs | bsd-2-clause | int2PenType 1 = Left EraserWork | 31 | int2PenType 1 = Left EraserWork | 31 | int2PenType 1 = Left EraserWork | 31 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
walck/cyclotomic | test/Properties.hs | gpl-3.0 | test1a :: T.Test
test1a = testGroup "polarRat" [polarRatTest p q | p <- [0..10], q <- [1..10]] | 94 | test1a :: T.Test
test1a = testGroup "polarRat" [polarRatTest p q | p <- [0..10], q <- [1..10]] | 94 | test1a = testGroup "polarRat" [polarRatTest p q | p <- [0..10], q <- [1..10]] | 77 | false | true | 0 | 9 | 16 | 52 | 27 | 25 | null | null |
ddssff/lens | tests/templates.hs | bsd-3-clause | checkAltitude :: Traversal (Perambulation a b) (Perambulation a b') b b'
checkAltitude = altitude | 97 | checkAltitude :: Traversal (Perambulation a b) (Perambulation a b') b b'
checkAltitude = altitude | 97 | checkAltitude = altitude | 24 | false | true | 0 | 7 | 13 | 36 | 18 | 18 | null | null |
Xidian-Haskell-Server-Keeper/XHSK-Home | src/Loint.hs | bsd-3-clause | sortLoint (x@(Loint i _ _ _):xs) =
let smallerOrEq = [b | b@(Loint bi _ _ _) <- xs ,bi <= i ]
larger = [b | b@(Loint bi _ _ _) <- xs ,bi > i ]
in sortLoint smallerOrEq ++ [x] ++ sortLoint larger | 222 | sortLoint (x@(Loint i _ _ _):xs) =
let smallerOrEq = [b | b@(Loint bi _ _ _) <- xs ,bi <= i ]
larger = [b | b@(Loint bi _ _ _) <- xs ,bi > i ]
in sortLoint smallerOrEq ++ [x] ++ sortLoint larger | 222 | sortLoint (x@(Loint i _ _ _):xs) =
let smallerOrEq = [b | b@(Loint bi _ _ _) <- xs ,bi <= i ]
larger = [b | b@(Loint bi _ _ _) <- xs ,bi > i ]
in sortLoint smallerOrEq ++ [x] ++ sortLoint larger | 222 | false | false | 0 | 14 | 73 | 132 | 68 | 64 | null | null |
ben-schulz/Idris-dev | src/IRTS/Compiler.hs | bsd-3-clause | irAlt top vs _ (DefaultCase rhs)
= LDefaultCase <$> irSC top vs rhs | 71 | irAlt top vs _ (DefaultCase rhs)
= LDefaultCase <$> irSC top vs rhs | 71 | irAlt top vs _ (DefaultCase rhs)
= LDefaultCase <$> irSC top vs rhs | 71 | false | false | 0 | 7 | 16 | 32 | 15 | 17 | null | null |
alang9/deque | Data/Deque/NonCat.hs | bsd-3-clause | fixup2' (BigR (XR (B4 a b c d) (B5 n o p q r)) N (TinyL (B3 (P s t) (P u v) (P w x)))) = go15 a b c d s t u v w x n o p q r | 135 | fixup2' (BigR (XR (B4 a b c d) (B5 n o p q r)) N (TinyL (B3 (P s t) (P u v) (P w x)))) = go15 a b c d s t u v w x n o p q r | 135 | fixup2' (BigR (XR (B4 a b c d) (B5 n o p q r)) N (TinyL (B3 (P s t) (P u v) (P w x)))) = go15 a b c d s t u v w x n o p q r | 135 | false | false | 0 | 12 | 54 | 125 | 61 | 64 | null | null |
laszlopandy/elm-compiler | src/CommandLineRouter.hs | bsd-3-clause | main :: IO ()
main =
do allArgs <- Env.getArgs
case allArgs of
[] ->
putStrLn usageMessage
command : args ->
attemptToRun command args | 180 | main :: IO ()
main =
do allArgs <- Env.getArgs
case allArgs of
[] ->
putStrLn usageMessage
command : args ->
attemptToRun command args | 180 | main =
do allArgs <- Env.getArgs
case allArgs of
[] ->
putStrLn usageMessage
command : args ->
attemptToRun command args | 166 | false | true | 0 | 10 | 69 | 58 | 27 | 31 | null | null |
brendanhay/gogol | gogol-vault/gen/Network/Google/Resource/Vault/Matters/Close.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
matUploadType :: Lens' MattersClose (Maybe Text)
matUploadType
= lens _matUploadType
(\ s a -> s{_matUploadType = a}) | 196 | matUploadType :: Lens' MattersClose (Maybe Text)
matUploadType
= lens _matUploadType
(\ s a -> s{_matUploadType = a}) | 125 | matUploadType
= lens _matUploadType
(\ s a -> s{_matUploadType = a}) | 76 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
TomMD/ghc | compiler/main/HscTypes.hs | bsd-3-clause | isImplicitTyThing (AnId id) = isImplicitId id | 49 | isImplicitTyThing (AnId id) = isImplicitId id | 49 | isImplicitTyThing (AnId id) = isImplicitId id | 49 | false | false | 0 | 7 | 9 | 18 | 8 | 10 | null | null |
GaloisInc/halvm-ghc | compiler/main/DynFlags.hs | bsd-3-clause | tARGET_MAX_WORD dflags
= case platformWordSize (targetPlatform dflags) of
4 -> toInteger (maxBound :: Word32)
8 -> toInteger (maxBound :: Word64)
w -> panic ("tARGET_MAX_WORD: Unknown platformWordSize: " ++ show w)
{- -----------------------------------------------------------------------------
... | 1,447 | tARGET_MAX_WORD dflags
= case platformWordSize (targetPlatform dflags) of
4 -> toInteger (maxBound :: Word32)
8 -> toInteger (maxBound :: Word64)
w -> panic ("tARGET_MAX_WORD: Unknown platformWordSize: " ++ show w)
{- -----------------------------------------------------------------------------
... | 1,447 | tARGET_MAX_WORD dflags
= case platformWordSize (targetPlatform dflags) of
4 -> toInteger (maxBound :: Word32)
8 -> toInteger (maxBound :: Word64)
w -> panic ("tARGET_MAX_WORD: Unknown platformWordSize: " ++ show w)
{- -----------------------------------------------------------------------------
... | 1,447 | false | false | 0 | 11 | 239 | 75 | 39 | 36 | null | null |
jstolarek/ghc | libraries/base/Data/Typeable.hs | bsd-3-clause | -- | A flexible variation parameterised in a type constructor
gcast :: forall a b c. (Typeable a, Typeable b) => c a -> Maybe (c b)
gcast x = fmap (\Refl -> x) (eqT :: Maybe (a :~: b)) | 184 | gcast :: forall a b c. (Typeable a, Typeable b) => c a -> Maybe (c b)
gcast x = fmap (\Refl -> x) (eqT :: Maybe (a :~: b)) | 122 | gcast x = fmap (\Refl -> x) (eqT :: Maybe (a :~: b)) | 52 | true | true | 0 | 10 | 39 | 82 | 44 | 38 | null | null |
arirahikkala/straylight-divergence | src/Util.hs | gpl-3.0 | unlessM p a = do doIt <- p; unless doIt a | 41 | unlessM p a = do doIt <- p; unless doIt a | 41 | unlessM p a = do doIt <- p; unless doIt a | 41 | false | false | 0 | 7 | 10 | 27 | 12 | 15 | null | null |
kejace/tidal-experiments | vis/example.hs | gpl-3.0 | f = density 2 $ (flip darken
<$> (density 8 $ "[black blue, grey ~ navy, cornflowerblue blue]*2")
<*> sinewave1
) | 164 | f = density 2 $ (flip darken
<$> (density 8 $ "[black blue, grey ~ navy, cornflowerblue blue]*2")
<*> sinewave1
) | 164 | f = density 2 $ (flip darken
<$> (density 8 $ "[black blue, grey ~ navy, cornflowerblue blue]*2")
<*> sinewave1
) | 164 | false | false | 1 | 12 | 71 | 41 | 18 | 23 | null | null |
jleahred/katas | langs/haskell/machine_revisions_problem/src/Main.hs | gpl-3.0 | printSolutionCandidate:: Show p => Int -> Int -> [Int] -> p -> IO ()
printSolutionCandidate niter
estim
sum_periods
schedule
= do
print $ "Iteration " ++ show niter
... | 578 | printSolutionCandidate:: Show p => Int -> Int -> [Int] -> p -> IO ()
printSolutionCandidate niter
estim
sum_periods
schedule
= do
print $ "Iteration " ++ show niter
... | 578 | printSolutionCandidate niter
estim
sum_periods
schedule
= do
print $ "Iteration " ++ show niter
print schedule
print sum_period... | 509 | false | true | 0 | 11 | 289 | 85 | 39 | 46 | null | null |
gilith/hol | src/HOL/OpenTheory/Article.hs | mit | popObject :: Objective a => [Object] -> Maybe (a,[Object])
popObject [] = Nothing | 81 | popObject :: Objective a => [Object] -> Maybe (a,[Object])
popObject [] = Nothing | 81 | popObject [] = Nothing | 22 | false | true | 0 | 9 | 12 | 42 | 22 | 20 | null | null |
chadbrewbaker/combinat | Math/Combinat/Numbers/Primes.hs | bsd-3-clause | ow' mul sq x' n' = f x' n' 1 where
f x n y
| n == 1 = x `mul` y
| r == 0 = f x2 q y
| otherwise = f x2 q (x `mul` y)
where
(q,r) = quotRem n 2
x2 = sq x
{ | 187 | pow' mul sq x' n' = f x' n' 1 where
f x n y
| n == 1 = x `mul` y
| r == 0 = f x2 q y
| otherwise = f x2 q (x `mul` y)
where
(q,r) = quotRem n 2
x2 = sq x
| 187 | pow' mul sq x' n' = f x' n' 1 where
f x n y
| n == 1 = x `mul` y
| r == 0 = f x2 q y
| otherwise = f x2 q (x `mul` y)
where
(q,r) = quotRem n 2
x2 = sq x
| 187 | false | false | 3 | 8 | 84 | 156 | 65 | 91 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Attrs/Attrs.hs | bsd-3-clause | selected ∷ AttrHasSelected a ⇒ a → a
selected = attrSetSelected Selected | 72 | selected ∷ AttrHasSelected a ⇒ a → a
selected = attrSetSelected Selected | 72 | selected = attrSetSelected Selected | 35 | false | true | 0 | 8 | 11 | 31 | 13 | 18 | null | null |
alexander-b/y0l0bot | src-exec/y0l0bot.hs | agpl-3.0 | nickClean :: B.ByteString -> B.ByteString
nickClean n = case B8.head n of
'@' -> B.tail n
':' -> B.tail n
_ -> n | 162 | nickClean :: B.ByteString -> B.ByteString
nickClean n = case B8.head n of
'@' -> B.tail n
':' -> B.tail n
_ -> n | 162 | nickClean n = case B8.head n of
'@' -> B.tail n
':' -> B.tail n
_ -> n | 120 | false | true | 0 | 9 | 72 | 65 | 29 | 36 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Projects/Locations/Image/Redact.hs | mpl-2.0 | -- | V1 error format.
plirXgafv :: Lens' ProjectsLocationsImageRedact (Maybe Xgafv)
plirXgafv
= lens _plirXgafv (\ s a -> s{_plirXgafv = a}) | 142 | plirXgafv :: Lens' ProjectsLocationsImageRedact (Maybe Xgafv)
plirXgafv
= lens _plirXgafv (\ s a -> s{_plirXgafv = a}) | 120 | plirXgafv
= lens _plirXgafv (\ s a -> s{_plirXgafv = a}) | 58 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
rueshyna/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Purchases/Subscriptions/Get.hs | mpl-2.0 | -- | Creates a value of 'PurchasesSubscriptionsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'psgPackageName'
--
-- * 'psgToken'
--
-- * 'psgSubscriptionId'
purchasesSubscriptionsGet
:: Text -- ^ 'psgPackageName'
-> Text... | 636 | purchasesSubscriptionsGet
:: Text -- ^ 'psgPackageName'
-> Text -- ^ 'psgToken'
-> Text -- ^ 'psgSubscriptionId'
-> PurchasesSubscriptionsGet
purchasesSubscriptionsGet pPsgPackageName_ pPsgToken_ pPsgSubscriptionId_ =
PurchasesSubscriptionsGet'
{ _psgPackageName = pPsgPackageName_
, _psgToke... | 387 | purchasesSubscriptionsGet pPsgPackageName_ pPsgToken_ pPsgSubscriptionId_ =
PurchasesSubscriptionsGet'
{ _psgPackageName = pPsgPackageName_
, _psgToken = pPsgToken_
, _psgSubscriptionId = pPsgSubscriptionId_
} | 229 | true | true | 0 | 7 | 114 | 62 | 40 | 22 | null | null |
a143753/AOJ | 0501.hs | apache-2.0 | play ("0":_) = [] | 17 | play ("0":_) = [] | 17 | play ("0":_) = [] | 17 | false | false | 0 | 7 | 3 | 18 | 9 | 9 | null | null |
event/spim | SpimIndex.hs | agpl-3.0 | saveIndexHook = Map.fromList [("ALARM", removeCurrentTZ)] | 57 | saveIndexHook = Map.fromList [("ALARM", removeCurrentTZ)] | 57 | saveIndexHook = Map.fromList [("ALARM", removeCurrentTZ)] | 57 | false | false | 1 | 7 | 4 | 23 | 11 | 12 | null | null |
oakfang/DemiLang | src/Demi/Executors.hs | mit | promptLine :: String -> IO String
promptLine prompt =
do putStr prompt
hFlush stdout
getLine | 110 | promptLine :: String -> IO String
promptLine prompt =
do putStr prompt
hFlush stdout
getLine | 110 | promptLine prompt =
do putStr prompt
hFlush stdout
getLine | 76 | false | true | 0 | 7 | 32 | 36 | 15 | 21 | null | null |
diflying/logitext | ClassicalFOL.hs | bsd-3-clause | commaSep :: ParsecT String u Identity a -> ParsecT String u Identity [a]
commaSep = P.commaSep lexer | 102 | commaSep :: ParsecT String u Identity a -> ParsecT String u Identity [a]
commaSep = P.commaSep lexer | 102 | commaSep = P.commaSep lexer | 29 | false | true | 0 | 8 | 18 | 47 | 21 | 26 | null | null |
rueshyna/gogol | gogol-storage/gen/Network/Google/Resource/Storage/Objects/Copy.hs | mpl-2.0 | -- | Multipart request metadata.
ocPayload :: Lens' ObjectsCopy Object
ocPayload
= lens _ocPayload (\ s a -> s{_ocPayload = a}) | 129 | ocPayload :: Lens' ObjectsCopy Object
ocPayload
= lens _ocPayload (\ s a -> s{_ocPayload = a}) | 96 | ocPayload
= lens _ocPayload (\ s a -> s{_ocPayload = a}) | 58 | true | true | 1 | 9 | 22 | 44 | 22 | 22 | null | null |
brendanhay/gogol | gogol-digitalassetlinks/gen/Network/Google/DigitalAssetLinks/Types/Product.hs | mpl-2.0 | -- | Every statement has a source asset. REQUIRED
sSource :: Lens' Statement (Maybe Asset)
sSource = lens _sSource (\ s a -> s{_sSource = a}) | 141 | sSource :: Lens' Statement (Maybe Asset)
sSource = lens _sSource (\ s a -> s{_sSource = a}) | 91 | sSource = lens _sSource (\ s a -> s{_sSource = a}) | 50 | true | true | 0 | 9 | 25 | 46 | 25 | 21 | null | null |
alphalambda/codeworld | codeworld-account/src/CodeWorld/Account/Actions.hs | apache-2.0 | renderInsert :: Text -> Text -> SQLData -> QueryParams -> (Query, [NamedParam])
renderInsert tableName keyName keyValue params =
let assignments = map (\(name, _) -> name <> " = :" <> name) params
ps = (":" <> keyName := keyValue) : map (\(name, value) -> ":" <> name := value) params
in (Query $ "UPDATE... | 481 | renderInsert :: Text -> Text -> SQLData -> QueryParams -> (Query, [NamedParam])
renderInsert tableName keyName keyValue params =
let assignments = map (\(name, _) -> name <> " = :" <> name) params
ps = (":" <> keyName := keyValue) : map (\(name, value) -> ":" <> name := value) params
in (Query $ "UPDATE... | 481 | renderInsert tableName keyName keyValue params =
let assignments = map (\(name, _) -> name <> " = :" <> name) params
ps = (":" <> keyName := keyValue) : map (\(name, value) -> ":" <> name := value) params
in (Query $ "UPDATE "
<> tableName
<> " SET "
<> Text.intercala... | 401 | false | true | 0 | 15 | 143 | 175 | 93 | 82 | null | null |
sdiehl/ghc | compiler/main/DriverPhases.hs | bsd-3-clause | startPhase _ = StopLn | 30 | startPhase _ = StopLn | 30 | startPhase _ = StopLn | 30 | false | false | 0 | 4 | 12 | 10 | 4 | 6 | null | null |
rtorr/elm-package | src/Catalog.hs | bsd-3-clause | catalog
:: (MonadIO m, MonadReader Manager.Environment m, MonadError String m)
=> String
-> [(String,String)]
-> m String
catalog path vars =
do domain <- asks Manager.catalog
return $ domain ++ "/" ++ path ++ "?" ++ urlEncodeVars (version : vars)
where
version = ("elm-package-version", s... | 344 | catalog
:: (MonadIO m, MonadReader Manager.Environment m, MonadError String m)
=> String
-> [(String,String)]
-> m String
catalog path vars =
do domain <- asks Manager.catalog
return $ domain ++ "/" ++ path ++ "?" ++ urlEncodeVars (version : vars)
where
version = ("elm-package-version", s... | 344 | catalog path vars =
do domain <- asks Manager.catalog
return $ domain ++ "/" ++ path ++ "?" ++ urlEncodeVars (version : vars)
where
version = ("elm-package-version", showVersion This.version) | 206 | false | true | 0 | 11 | 76 | 132 | 65 | 67 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/base/Data/IntMap.hs | bsd-3-clause | node = "+--" | 22 | node = "+--" | 22 | node = "+--" | 22 | false | false | 0 | 4 | 12 | 6 | 3 | 3 | null | null |
sinelaw/lamdu | bottlelib/Numeric/Utils.hs | gpl-3.0 | encodeHex :: SBS.ByteString -> String
encodeHex = concatMap word8Hex . SBS.unpack | 81 | encodeHex :: SBS.ByteString -> String
encodeHex = concatMap word8Hex . SBS.unpack | 81 | encodeHex = concatMap word8Hex . SBS.unpack | 43 | false | true | 0 | 6 | 10 | 26 | 13 | 13 | null | null |
olsner/ghc | compiler/coreSyn/CoreTidy.hs | bsd-3-clause | tidyUnfolding _ unf _ = unf | 27 | tidyUnfolding _ unf _ = unf | 27 | tidyUnfolding _ unf _ = unf | 27 | false | false | 1 | 5 | 5 | 17 | 6 | 11 | null | null |
julienschmaltz/madl | src/Deadlock/DeadlockDetection.hs | mit | literals (NOT f) = literals f | 29 | literals (NOT f) = literals f | 29 | literals (NOT f) = literals f | 29 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
travitch/dalvik | src/Dalvik/Printer.hs | bsd-3-clause | prettyInstruction _ _ (Cmp CGFloat dst r1 r2) =
mkInsn'8 "cmpg-float" [dst, r1, r2] | 85 | prettyInstruction _ _ (Cmp CGFloat dst r1 r2) =
mkInsn'8 "cmpg-float" [dst, r1, r2] | 85 | prettyInstruction _ _ (Cmp CGFloat dst r1 r2) =
mkInsn'8 "cmpg-float" [dst, r1, r2] | 85 | false | false | 0 | 7 | 15 | 39 | 20 | 19 | null | null |
da-x/lamdu | Lamdu/Sugar/Convert/Hole.hs | gpl-3.0 | holeWrap ::
Type -> Val (Infer.Payload, (Maybe a, IsInjected)) ->
Update (Val (Infer.Payload, (Maybe a, IsInjected)))
holeWrap resultType val =
update resultType <&> mk
where
mk updatedType =
V.Apply func val & V.BApp
& Val (plSameScope updatedType, emptyPl)
plSam... | 575 | holeWrap ::
Type -> Val (Infer.Payload, (Maybe a, IsInjected)) ->
Update (Val (Infer.Payload, (Maybe a, IsInjected)))
holeWrap resultType val =
update resultType <&> mk
where
mk updatedType =
V.Apply func val & V.BApp
& Val (plSameScope updatedType, emptyPl)
plSam... | 575 | holeWrap resultType val =
update resultType <&> mk
where
mk updatedType =
V.Apply func val & V.BApp
& Val (plSameScope updatedType, emptyPl)
plSameScope typ = inferPl & Infer.plType .~ typ
inferPl = val ^. Val.payload . _1
func = Val (plSameScope funcType,... | 449 | false | true | 6 | 13 | 160 | 226 | 108 | 118 | null | null |
ivanperez-keera/Yampa | yampa/tests/TestsFirstSecond.hs | bsd-3-clause | second_t4 :: [(Double,Double)]
second_t4 = testSF1 (arr dup >>> second integral >>> arr swap) | 93 | second_t4 :: [(Double,Double)]
second_t4 = testSF1 (arr dup >>> second integral >>> arr swap) | 93 | second_t4 = testSF1 (arr dup >>> second integral >>> arr swap) | 62 | false | true | 0 | 9 | 13 | 43 | 22 | 21 | null | null |
acowley/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | enumFromThenClassOpKey = mkPreludeMiscIdUnique 164 | 57 | enumFromThenClassOpKey = mkPreludeMiscIdUnique 164 | 57 | enumFromThenClassOpKey = mkPreludeMiscIdUnique 164 | 57 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
bobgru/tree-derivations | src/LSystem3.hs | mit | grammar = case decode (BS.pack jsonInput) of
(Just g) -> g
Nothing -> error $ "Bad grammar in JSON: " ++ jsonInput
-- Assumes string has been converted to a comma-separated list of
-- terminal symbols corresponding to transformations. | 244 | grammar = case decode (BS.pack jsonInput) of
(Just g) -> g
Nothing -> error $ "Bad grammar in JSON: " ++ jsonInput
-- Assumes string has been converted to a comma-separated list of
-- terminal symbols corresponding to transformations. | 244 | grammar = case decode (BS.pack jsonInput) of
(Just g) -> g
Nothing -> error $ "Bad grammar in JSON: " ++ jsonInput
-- Assumes string has been converted to a comma-separated list of
-- terminal symbols corresponding to transformations. | 244 | false | false | 1 | 9 | 48 | 53 | 25 | 28 | null | null |
mettekou/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | tupleDataCon :: Boxity -> Arity -> DataCon
tupleDataCon sort i | i > mAX_TUPLE_SIZE = snd (mk_tuple sort i) | 107 | tupleDataCon :: Boxity -> Arity -> DataCon
tupleDataCon sort i | i > mAX_TUPLE_SIZE = snd (mk_tuple sort i) | 107 | tupleDataCon sort i | i > mAX_TUPLE_SIZE = snd (mk_tuple sort i) | 64 | false | true | 0 | 8 | 18 | 45 | 21 | 24 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1ResourceAttributesName' Lens
v1ResourceAttributesNameL :: Lens_' V1ResourceAttributes (Maybe Text)
v1ResourceAttributesNameL f V1ResourceAttributes{..} = (\v1ResourceAttributesName -> V1ResourceAttributes { v1ResourceAttributesName, ..} ) <$> f v1ResourceAttributesName | 277 | v1ResourceAttributesNameL :: Lens_' V1ResourceAttributes (Maybe Text)
v1ResourceAttributesNameL f V1ResourceAttributes{..} = (\v1ResourceAttributesName -> V1ResourceAttributes { v1ResourceAttributesName, ..} ) <$> f v1ResourceAttributesName | 240 | v1ResourceAttributesNameL f V1ResourceAttributes{..} = (\v1ResourceAttributesName -> V1ResourceAttributes { v1ResourceAttributesName, ..} ) <$> f v1ResourceAttributesName | 170 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
balangs/eTeak | aschem/Picture.hs | bsd-3-clause | orientToMove OrientSW = moveSW | 30 | orientToMove OrientSW = moveSW | 30 | orientToMove OrientSW = moveSW | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
fredfeng/HaskellCodes | hw6.hs | apache-2.0 | getConstraints (Binary EQ e1 e2) f env = let new = TVar ("x-eq"++ show f) in
let (c1, f1, t1) = getConstraints e1 (f+1) env in
let (c2, f2, t2) = getConstraints e2 (f1+770) env in
([(new, TBool), (t1,t2)] ++ c1 ++ c2, f, new) | 309 | getConstraints (Binary EQ e1 e2) f env = let new = TVar ("x-eq"++ show f) in
let (c1, f1, t1) = getConstraints e1 (f+1) env in
let (c2, f2, t2) = getConstraints e2 (f1+770) env in
([(new, TBool), (t1,t2)] ++ c1 ++ c2, f, new) | 309 | getConstraints (Binary EQ e1 e2) f env = let new = TVar ("x-eq"++ show f) in
let (c1, f1, t1) = getConstraints e1 (f+1) env in
let (c2, f2, t2) = getConstraints e2 (f1+770) env in
([(new, TBool), (t1,t2)] ++ c1 ++ c2, f, new) | 309 | false | false | 0 | 15 | 128 | 152 | 80 | 72 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc
setCtLocSpan ctl@(CtLoc { ctl_env = lcl }) loc = setCtLocEnv ctl (lcl { tcl_loc = loc }) | 134 | setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc
setCtLocSpan ctl@(CtLoc { ctl_env = lcl }) loc = setCtLocEnv ctl (lcl { tcl_loc = loc }) | 134 | setCtLocSpan ctl@(CtLoc { ctl_env = lcl }) loc = setCtLocEnv ctl (lcl { tcl_loc = loc }) | 88 | false | true | 7 | 6 | 23 | 56 | 30 | 26 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | The table column properties to update. If the value of
-- \`table_column_properties#width\` is less than 5 points (5\/72 inch), a
-- 400 bad request error is returned.
utcprTableColumnProperties :: Lens' UpdateTableColumnPropertiesRequest (Maybe TableColumnProperties)
utcprTableColumnProperties
= lens _utcprTabl... | 389 | utcprTableColumnProperties :: Lens' UpdateTableColumnPropertiesRequest (Maybe TableColumnProperties)
utcprTableColumnProperties
= lens _utcprTableColumnProperties
(\ s a -> s{_utcprTableColumnProperties = a}) | 216 | utcprTableColumnProperties
= lens _utcprTableColumnProperties
(\ s a -> s{_utcprTableColumnProperties = a}) | 115 | true | true | 0 | 9 | 53 | 50 | 27 | 23 | null | null |
arnizamani/GslcTagger | gslctagger.hs | gpl-3.0 | parseUline line =
let l = if take 1 line == "\t" then drop 1 line else line
(utter,wc') = if take 1 l == "\t" then ("",drop 1 l) else break (=='\t') l
wc = if take 1 wc' == "\t" then drop 1 wc' else wc'
in ("0",utter,wc) | 244 | parseUline line =
let l = if take 1 line == "\t" then drop 1 line else line
(utter,wc') = if take 1 l == "\t" then ("",drop 1 l) else break (=='\t') l
wc = if take 1 wc' == "\t" then drop 1 wc' else wc'
in ("0",utter,wc) | 244 | parseUline line =
let l = if take 1 line == "\t" then drop 1 line else line
(utter,wc') = if take 1 l == "\t" then ("",drop 1 l) else break (=='\t') l
wc = if take 1 wc' == "\t" then drop 1 wc' else wc'
in ("0",utter,wc) | 244 | false | false | 0 | 11 | 73 | 127 | 67 | 60 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | tcInstHeadTyNotSynonym :: Type -> Bool
-- Used in Haskell-98 mode, for the argument types of an instance head
-- These must not be type synonyms, but everywhere else type synonyms
-- are transparent, so we need a special function here
tcInstHeadTyNotSynonym ty
= case ty of
TyConApp tc _ -> not (isTypeSynonymT... | 346 | tcInstHeadTyNotSynonym :: Type -> Bool
tcInstHeadTyNotSynonym ty
= case ty of
TyConApp tc _ -> not (isTypeSynonymTyCon tc)
_ -> True | 150 | tcInstHeadTyNotSynonym ty
= case ty of
TyConApp tc _ -> not (isTypeSynonymTyCon tc)
_ -> True | 111 | true | true | 0 | 10 | 73 | 57 | 27 | 30 | null | null |
hth313/hthforth | src/Translator/Expression.hs | bsd-2-clause | bottomp (Bottom _) = True | 25 | bottomp (Bottom _) = True | 25 | bottomp (Bottom _) = True | 25 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
ihc/futhark | src/Futhark/Pass/ExtractKernels/Distribution.hs | isc | pushInnerTarget :: Target -> Targets -> Targets
pushInnerTarget (pat, res) (Targets inner_target targets) =
Targets (pat', res') (targets ++ [inner_target])
where (pes', res') = unzip $ filter (used . fst) $ zip (patternElements pat) res
pat' = Pattern [] pes'
inner_used = freeIn $ snd inner_target
... | 374 | pushInnerTarget :: Target -> Targets -> Targets
pushInnerTarget (pat, res) (Targets inner_target targets) =
Targets (pat', res') (targets ++ [inner_target])
where (pes', res') = unzip $ filter (used . fst) $ zip (patternElements pat) res
pat' = Pattern [] pes'
inner_used = freeIn $ snd inner_target
... | 374 | pushInnerTarget (pat, res) (Targets inner_target targets) =
Targets (pat', res') (targets ++ [inner_target])
where (pes', res') = unzip $ filter (used . fst) $ zip (patternElements pat) res
pat' = Pattern [] pes'
inner_used = freeIn $ snd inner_target
used pe = patElemName pe `S.member` inne... | 326 | false | true | 3 | 11 | 80 | 145 | 76 | 69 | null | null |
kawamuray/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | -- * User separation
daemonsGroup :: String
daemonsGroup = Runtime.daemonGroup (ExtraGroup DaemonsGroup) | 105 | daemonsGroup :: String
daemonsGroup = Runtime.daemonGroup (ExtraGroup DaemonsGroup) | 83 | daemonsGroup = Runtime.daemonGroup (ExtraGroup DaemonsGroup) | 60 | true | true | 0 | 7 | 12 | 23 | 12 | 11 | null | null |
frp-arduino/frp-arduino | src/Arduino/DSL.hs | gpl-3.0 | flattenS :: Stream [a] -> Stream a
flattenS stream = Stream $ do
streamName <- unStream stream
expressionStreamName <- addAnonymousStream expression
addDependency streamName expressionStreamName
where
expression = DAG.Flatten $ DAG.Input 0 | 263 | flattenS :: Stream [a] -> Stream a
flattenS stream = Stream $ do
streamName <- unStream stream
expressionStreamName <- addAnonymousStream expression
addDependency streamName expressionStreamName
where
expression = DAG.Flatten $ DAG.Input 0 | 263 | flattenS stream = Stream $ do
streamName <- unStream stream
expressionStreamName <- addAnonymousStream expression
addDependency streamName expressionStreamName
where
expression = DAG.Flatten $ DAG.Input 0 | 228 | false | true | 1 | 9 | 54 | 85 | 36 | 49 | null | null |
ndmitchell/nsis | src/Development/NSIS/Optimise.hs | bsd-3-clause | assignSwitch :: [NSIS] -> [NSIS]
assignSwitch = transform f
where
-- this rule just switches the assignment, back and forth, ad infinitum
-- not very principled!
f (IntOp out1 a b c : Assign other ([Var_ out2]) : xs)
| out1 == out2
= IntOp other a b c : Assign out1 ([... | 353 | assignSwitch :: [NSIS] -> [NSIS]
assignSwitch = transform f
where
-- this rule just switches the assignment, back and forth, ad infinitum
-- not very principled!
f (IntOp out1 a b c : Assign other ([Var_ out2]) : xs)
| out1 == out2
= IntOp other a b c : Assign out1 ([... | 353 | assignSwitch = transform f
where
-- this rule just switches the assignment, back and forth, ad infinitum
-- not very principled!
f (IntOp out1 a b c : Assign other ([Var_ out2]) : xs)
| out1 == out2
= IntOp other a b c : Assign out1 ([Var_ other]) : xs
f x = x | 320 | false | true | 0 | 14 | 119 | 119 | 60 | 59 | null | null |
andreasbock/hql | src/Utils/DayCount.hs | gpl-2.0 | modifier Thirty360 dt0 dt1 = dc0/360 + dc1/360 + yearsBetween
where (y0,m0,d0) = Cal.toGregorian dt0
(y1,m1,d1) = Cal.toGregorian dt1
dc0 = fromIntegral $ 30*(12 - m0) + 30 - min 30 d0 + leapFactor
dc1 = fromIntegral $ 30*m1 - 30 + min 30 d1
yearsBetween = fromIntegral $ y1-y0-1
... | 508 | modifier Thirty360 dt0 dt1 = dc0/360 + dc1/360 + yearsBetween
where (y0,m0,d0) = Cal.toGregorian dt0
(y1,m1,d1) = Cal.toGregorian dt1
dc0 = fromIntegral $ 30*(12 - m0) + 30 - min 30 d0 + leapFactor
dc1 = fromIntegral $ 30*m1 - 30 + min 30 d1
yearsBetween = fromIntegral $ y1-y0-1
... | 508 | modifier Thirty360 dt0 dt1 = dc0/360 + dc1/360 + yearsBetween
where (y0,m0,d0) = Cal.toGregorian dt0
(y1,m1,d1) = Cal.toGregorian dt1
dc0 = fromIntegral $ 30*(12 - m0) + 30 - min 30 d0 + leapFactor
dc1 = fromIntegral $ 30*m1 - 30 + min 30 d1
yearsBetween = fromIntegral $ y1-y0-1
... | 508 | false | false | 10 | 18 | 153 | 201 | 101 | 100 | null | null |
wherkendell/diagrams-contrib | src/Diagrams/Swimunit/Plot.hs | bsd-3-clause | ploticon :: [(Double, Double)] -- ^ List of (x,y)-values for lines.
-> Diagram B -- ^ A Diagram to be used as an icon for the point.
-> Diagram B -- ^ Resulting diagram.
ploticon xy icon = ploticon' xy (repeat icon) | 294 | ploticon :: [(Double, Double)] -- ^ List of (x,y)-values for lines.
-> Diagram B -- ^ A Diagram to be used as an icon for the point.
-> Diagram B
ploticon xy icon = ploticon' xy (repeat icon) | 247 | ploticon xy icon = ploticon' xy (repeat icon) | 46 | true | true | 0 | 8 | 120 | 57 | 29 | 28 | null | null |
kadena-io/pact | src-ghc/Pact/ApiReq.hs | bsd-3-clause | -- | Assemble a command and parts from a ApiReq YAML file.
mkApiReq :: FilePath -> IO (ApiReqParts,Command Text)
mkApiReq fp = mkApiReq' False fp | 145 | mkApiReq :: FilePath -> IO (ApiReqParts,Command Text)
mkApiReq fp = mkApiReq' False fp | 86 | mkApiReq fp = mkApiReq' False fp | 32 | true | true | 0 | 8 | 24 | 36 | 18 | 18 | null | null |
keera-studios/hsQt | Qtc/Gui/QKeySequence.hs | bsd-2-clause | qKeySequenceMnemonic :: ((String)) -> IO (QKeySequence ())
qKeySequenceMnemonic (x1)
= withQKeySequenceResult $
withCWString x1 $ \cstr_x1 ->
qtc_QKeySequence_mnemonic cstr_x1 | 185 | qKeySequenceMnemonic :: ((String)) -> IO (QKeySequence ())
qKeySequenceMnemonic (x1)
= withQKeySequenceResult $
withCWString x1 $ \cstr_x1 ->
qtc_QKeySequence_mnemonic cstr_x1 | 185 | qKeySequenceMnemonic (x1)
= withQKeySequenceResult $
withCWString x1 $ \cstr_x1 ->
qtc_QKeySequence_mnemonic cstr_x1 | 126 | false | true | 4 | 9 | 28 | 64 | 30 | 34 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | -- * Dynamic device modification
ddmAdd :: String
ddmAdd = Types.ddmFullToRaw DdmFullAdd | 89 | ddmAdd :: String
ddmAdd = Types.ddmFullToRaw DdmFullAdd | 55 | ddmAdd = Types.ddmFullToRaw DdmFullAdd | 38 | true | true | 0 | 6 | 12 | 17 | 9 | 8 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_333 (147#) = happyShift action_41 | 40 | action_333 (147#) = happyShift action_41 | 40 | action_333 (147#) = happyShift action_41 | 40 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
LukaHorvat/Echo | src/World.hs | mit | getPolarAngleSpan :: PolarWall -> AngleSpan
getPolarAngleSpan [(aphi, ar), (bphi, br)] = AngleSpan aphi bphi | 108 | getPolarAngleSpan :: PolarWall -> AngleSpan
getPolarAngleSpan [(aphi, ar), (bphi, br)] = AngleSpan aphi bphi | 108 | getPolarAngleSpan [(aphi, ar), (bphi, br)] = AngleSpan aphi bphi | 64 | false | true | 0 | 7 | 13 | 41 | 23 | 18 | null | null |
forste/haReFork | refactorer/RefacFunDef.hs | bsd-3-clause | rewritePatsInEnv env (pat@(Pat (HsPParen p1)))
= Exp (HsParen (rewritePatsInEnv env p1)) | 90 | rewritePatsInEnv env (pat@(Pat (HsPParen p1)))
= Exp (HsParen (rewritePatsInEnv env p1)) | 90 | rewritePatsInEnv env (pat@(Pat (HsPParen p1)))
= Exp (HsParen (rewritePatsInEnv env p1)) | 90 | false | false | 0 | 11 | 12 | 46 | 23 | 23 | null | null |
AndrewRademacher/stack | src/Stack/Types/BuildPlan.hs | bsd-3-clause | compToText :: Component -> Text
compToText CompLibrary = "library" | 66 | compToText :: Component -> Text
compToText CompLibrary = "library" | 66 | compToText CompLibrary = "library" | 34 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
23Skidoo/heist | src/Heist/Compiled/Internal.hs | bsd-3-clause | foldMapM :: (Monad f, Monoid m, Foldable list)
=> (a -> f m)
-> list a
-> f m
foldMapM f =
Foldable.foldlM (\xs x -> xs `seq` liftM (xs <>) (f x)) mempty | 182 | foldMapM :: (Monad f, Monoid m, Foldable list)
=> (a -> f m)
-> list a
-> f m
foldMapM f =
Foldable.foldlM (\xs x -> xs `seq` liftM (xs <>) (f x)) mempty | 182 | foldMapM f =
Foldable.foldlM (\xs x -> xs `seq` liftM (xs <>) (f x)) mempty | 77 | false | true | 0 | 11 | 62 | 97 | 50 | 47 | null | null |
zalora/replicator | src/Replicator/Command.hs | mit | printMysql:: Command
printMysql conf = mapM_ info
where
info s = putStrLn $ get conf s "mysql" | 100 | printMysql:: Command
printMysql conf = mapM_ info
where
info s = putStrLn $ get conf s "mysql" | 100 | printMysql conf = mapM_ info
where
info s = putStrLn $ get conf s "mysql" | 79 | false | true | 0 | 6 | 22 | 39 | 18 | 21 | null | null |
AndrewRademacher/stack | src/Stack/Types/Config.hs | bsd-3-clause | customResolverHash :: LoadedResolver-> Maybe SnapshotHash
customResolverHash (ResolverCustomLoaded _ _ hash) = Just hash | 120 | customResolverHash :: LoadedResolver-> Maybe SnapshotHash
customResolverHash (ResolverCustomLoaded _ _ hash) = Just hash | 120 | customResolverHash (ResolverCustomLoaded _ _ hash) = Just hash | 62 | false | true | 0 | 7 | 12 | 34 | 16 | 18 | null | null |
sdiehl/ghc | compiler/utils/State.hs | bsd-3-clause | put :: s -> State s ()
put s' = State $ \_ -> (# (), s' #) | 58 | put :: s -> State s ()
put s' = State $ \_ -> (# (), s' #) | 58 | put s' = State $ \_ -> (# (), s' #) | 35 | false | true | 0 | 8 | 17 | 41 | 21 | 20 | null | null |
brendanhay/gogol | gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs | mpl-2.0 | -- | A list of keys that were not looked up due to resource constraints. The
-- order of results in this field is undefined and has no relation to the
-- order of the keys in the input.
lrDeferred :: Lens' LookupResponse [Key]
lrDeferred
= lens _lrDeferred (\ s a -> s{_lrDeferred = a}) .
_Default
. _Coerc... | 321 | lrDeferred :: Lens' LookupResponse [Key]
lrDeferred
= lens _lrDeferred (\ s a -> s{_lrDeferred = a}) .
_Default
. _Coerce | 135 | lrDeferred
= lens _lrDeferred (\ s a -> s{_lrDeferred = a}) .
_Default
. _Coerce | 94 | true | true | 0 | 11 | 72 | 55 | 30 | 25 | null | null |
haskell-tinc/hpack | src/Hpack/Render.hs | mit | renderVerbatim :: [Verbatim] -> [Element]
renderVerbatim = concatMap $ \ case
VerbatimLiteral s -> [Verbatim s]
VerbatimObject o -> renderVerbatimObject o | 158 | renderVerbatim :: [Verbatim] -> [Element]
renderVerbatim = concatMap $ \ case
VerbatimLiteral s -> [Verbatim s]
VerbatimObject o -> renderVerbatimObject o | 158 | renderVerbatim = concatMap $ \ case
VerbatimLiteral s -> [Verbatim s]
VerbatimObject o -> renderVerbatimObject o | 116 | false | true | 3 | 7 | 24 | 52 | 27 | 25 | null | null |
TOSPIO/yi | src/library/Yi/String.hs | gpl-2.0 | -- | Fills lines up to the given length, splitting the text up if
-- necessary.
fillText :: Int -> R.YiString -> [R.YiString]
fillText margin = map (R.unwords . reverse) . fill 0 [] . R.words
where
fill _ acc [] = [acc]
fill n acc (w:ws)
| n + R.length w >= margin = acc : fill (R.length w) [w] ws
... | 576 | fillText :: Int -> R.YiString -> [R.YiString]
fillText margin = map (R.unwords . reverse) . fill 0 [] . R.words
where
fill _ acc [] = [acc]
fill n acc (w:ws)
| n + R.length w >= margin = acc : fill (R.length w) [w] ws
| otherwise = fill (n + 1 + R.length w) (w:acc) ws
-- | @overInit f@ runs f ove... | 496 | fillText margin = map (R.unwords . reverse) . fill 0 [] . R.words
where
fill _ acc [] = [acc]
fill n acc (w:ws)
| n + R.length w >= margin = acc : fill (R.length w) [w] ws
| otherwise = fill (n + 1 + R.length w) (w:acc) ws
-- | @overInit f@ runs f over the 'R.init' of the input if possible,
-- pr... | 450 | true | true | 1 | 11 | 134 | 182 | 94 | 88 | null | null |
achirkin/easytensor | dimensions/test/Numeric/Dimensions/IdxTest.hs | bsd-3-clause | prop_idxsPredSucc :: [(Word, Word)] -> Bool
prop_idxsPredSucc ins
| (xs, ys) <- minMaxSeq ins
, SomeDims (KnownDims :: Dims ds) <- someDimsVal ys
, Just ids <- idxsFromWords @ds xs
= ids == minBound || ids == maxBound
|| ( succ (pred ids) == ids && pred (succ ids) == ids )
| otherwise = True | 309 | prop_idxsPredSucc :: [(Word, Word)] -> Bool
prop_idxsPredSucc ins
| (xs, ys) <- minMaxSeq ins
, SomeDims (KnownDims :: Dims ds) <- someDimsVal ys
, Just ids <- idxsFromWords @ds xs
= ids == minBound || ids == maxBound
|| ( succ (pred ids) == ids && pred (succ ids) == ids )
| otherwise = True | 309 | prop_idxsPredSucc ins
| (xs, ys) <- minMaxSeq ins
, SomeDims (KnownDims :: Dims ds) <- someDimsVal ys
, Just ids <- idxsFromWords @ds xs
= ids == minBound || ids == maxBound
|| ( succ (pred ids) == ids && pred (succ ids) == ids )
| otherwise = True | 265 | false | true | 1 | 13 | 72 | 145 | 71 | 74 | null | null |
Hofmaier/robertson | demo/dist/build/autogen/Paths_pipesdemo.hs | mit | sysconfdir = "/home/lukas/robertson/demo/.cabal-sandbox/etc" | 60 | sysconfdir = "/home/lukas/robertson/demo/.cabal-sandbox/etc" | 60 | sysconfdir = "/home/lukas/robertson/demo/.cabal-sandbox/etc" | 60 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ihc/futhark | src/Futhark/Optimise/TileLoops.hs | isc | tileInKernelBody :: Names -> VarianceTable
-> KernelSpace -> KernelBody InKernel
-> TileM ([Stm Kernels], KernelSpace, KernelBody InKernel)
tileInKernelBody branch_variant initial_variance initial_kspace (KernelBody () kstms kres) = do
(extra_bnds, kspace', kstms') <-
tileInStms ... | 430 | tileInKernelBody :: Names -> VarianceTable
-> KernelSpace -> KernelBody InKernel
-> TileM ([Stm Kernels], KernelSpace, KernelBody InKernel)
tileInKernelBody branch_variant initial_variance initial_kspace (KernelBody () kstms kres) = do
(extra_bnds, kspace', kstms') <-
tileInStms ... | 430 | tileInKernelBody branch_variant initial_variance initial_kspace (KernelBody () kstms kres) = do
(extra_bnds, kspace', kstms') <-
tileInStms branch_variant initial_variance initial_kspace kstms
return (extra_bnds, kspace', KernelBody () kstms' kres) | 256 | false | true | 0 | 13 | 84 | 126 | 62 | 64 | null | null |
fumieval/audiovisual | src/Data/Input/Event.hs | bsd-3-clause | charToKey '-' = KeyMinus | 24 | charToKey '-' = KeyMinus | 24 | charToKey '-' = KeyMinus | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ivanperez-keera/Yampa | yampa/tests/TestsBasicSF.hs | bsd-3-clause | basicsf_t2r =
[0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25,
2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75,
5.0, 5.25, 5.5, 5.75, 6.0] | 165 | basicsf_t2r =
[0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25,
2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75,
5.0, 5.25, 5.5, 5.75, 6.0] | 165 | basicsf_t2r =
[0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25,
2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75,
5.0, 5.25, 5.5, 5.75, 6.0] | 165 | false | false | 0 | 5 | 40 | 81 | 53 | 28 | null | null |
rahulmutt/codec-jvm | src/Codec/JVM/ASM/Code/Instr.hs | apache-2.0 | bytes :: ByteString -> Instr
bytes = Instr . writeBytes | 55 | bytes :: ByteString -> Instr
bytes = Instr . writeBytes | 55 | bytes = Instr . writeBytes | 26 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
nagyf/hs-chess | src/SAN.hs | mit | roundNumber :: Parser Int
roundNumber = do
digits <- fmap read (many1 digit)
_ <- char '.' >> skipMany whitespace
return digits
-- | A parser for a chess move | 171 | roundNumber :: Parser Int
roundNumber = do
digits <- fmap read (many1 digit)
_ <- char '.' >> skipMany whitespace
return digits
-- | A parser for a chess move | 171 | roundNumber = do
digits <- fmap read (many1 digit)
_ <- char '.' >> skipMany whitespace
return digits
-- | A parser for a chess move | 145 | false | true | 1 | 11 | 42 | 60 | 25 | 35 | null | null |
diku-kmc/repg | src/KMC/Determinization.hs | mit | eofTree :: (Ord a, Eq gamma) => FST a pred func -> PathTree [gamma] a -> PathTree [gamma] a
eofTree fst' tr = runClosure (resume' tr >>= eof fst') | 146 | eofTree :: (Ord a, Eq gamma) => FST a pred func -> PathTree [gamma] a -> PathTree [gamma] a
eofTree fst' tr = runClosure (resume' tr >>= eof fst') | 146 | eofTree fst' tr = runClosure (resume' tr >>= eof fst') | 54 | false | true | 0 | 9 | 28 | 78 | 38 | 40 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs | bsd-3-clause | gl_EYE_PLANE :: GLenum
gl_EYE_PLANE = 0x2502 | 44 | gl_EYE_PLANE :: GLenum
gl_EYE_PLANE = 0x2502 | 44 | gl_EYE_PLANE = 0x2502 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
cumber/havro | test/test.hs | lgpl-3.0 | roundTripPolyvariant
:: Eq a => (forall s. (Schema s, Polyvariant s) => s a) -> a -> Bool
roundTripPolyvariant s x = parses x s . toLazyByteString . encode s $ x | 162 | roundTripPolyvariant
:: Eq a => (forall s. (Schema s, Polyvariant s) => s a) -> a -> Bool
roundTripPolyvariant s x = parses x s . toLazyByteString . encode s $ x | 162 | roundTripPolyvariant s x = parses x s . toLazyByteString . encode s $ x | 71 | false | true | 0 | 10 | 32 | 81 | 39 | 42 | null | null |
lukexi/ghc-7.8-arm64 | compiler/nativeGen/X86/Instr.hs | bsd-3-clause | x86_mkStackAllocInstr
:: Platform
-> Int
-> Instr
x86_mkStackAllocInstr platform amount
= case platformArch platform of
ArchX86 -> SUB II32 (OpImm (ImmInt amount)) (OpReg esp)
ArchX86_64 -> SUB II64 (OpImm (ImmInt amount)) (OpReg rsp)
_ -> panic "x86_mkStackAllocInstr" | 316 | x86_mkStackAllocInstr
:: Platform
-> Int
-> Instr
x86_mkStackAllocInstr platform amount
= case platformArch platform of
ArchX86 -> SUB II32 (OpImm (ImmInt amount)) (OpReg esp)
ArchX86_64 -> SUB II64 (OpImm (ImmInt amount)) (OpReg rsp)
_ -> panic "x86_mkStackAllocInstr" | 316 | x86_mkStackAllocInstr platform amount
= case platformArch platform of
ArchX86 -> SUB II32 (OpImm (ImmInt amount)) (OpReg esp)
ArchX86_64 -> SUB II64 (OpImm (ImmInt amount)) (OpReg rsp)
_ -> panic "x86_mkStackAllocInstr" | 242 | false | true | 0 | 12 | 83 | 107 | 50 | 57 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | Similar to topic_id, except that these topics are merely relevant to the
-- video. These are topics that may be mentioned in, or appear in the
-- video. You can retrieve information about each topic using Freebase
-- Topic API.
vtdRelevantTopicIds :: Lens' VideoTopicDetails [Text]
vtdRelevantTopicIds
= lens _vtd... | 414 | vtdRelevantTopicIds :: Lens' VideoTopicDetails [Text]
vtdRelevantTopicIds
= lens _vtdRelevantTopicIds
(\ s a -> s{_vtdRelevantTopicIds = a})
. _Default
. _Coerce | 181 | vtdRelevantTopicIds
= lens _vtdRelevantTopicIds
(\ s a -> s{_vtdRelevantTopicIds = a})
. _Default
. _Coerce | 127 | true | true | 0 | 11 | 81 | 56 | 31 | 25 | null | null |
albertoruiz/hTensor | lib/Numeric/LinearAlgebra/Array/Internal.hs | bsd-3-clause | lastIdx name t = ((d1,d2),m) where
(d1,d2) = span (\d -> iName d /= name) (dims t)
c = product (map iDim d2)
m = reshape c (coords t) | 145 | lastIdx name t = ((d1,d2),m) where
(d1,d2) = span (\d -> iName d /= name) (dims t)
c = product (map iDim d2)
m = reshape c (coords t) | 145 | lastIdx name t = ((d1,d2),m) where
(d1,d2) = span (\d -> iName d /= name) (dims t)
c = product (map iDim d2)
m = reshape c (coords t) | 145 | false | false | 0 | 11 | 40 | 95 | 50 | 45 | null | null |
kim/amazonka | amazonka-route53/gen/Network/AWS/Route53/Types.hs | mpl-2.0 | -- | The code for a country's subdivision (e.g., a province of Canada). A
-- subdivision code is only valid with the appropriate country code.
gldSubdivisionCode :: Lens' GeoLocationDetails (Maybe Text)
gldSubdivisionCode =
lens _gldSubdivisionCode (\s a -> s { _gldSubdivisionCode = a }) | 292 | gldSubdivisionCode :: Lens' GeoLocationDetails (Maybe Text)
gldSubdivisionCode =
lens _gldSubdivisionCode (\s a -> s { _gldSubdivisionCode = a }) | 149 | gldSubdivisionCode =
lens _gldSubdivisionCode (\s a -> s { _gldSubdivisionCode = a }) | 89 | true | true | 0 | 9 | 47 | 47 | 26 | 21 | null | null |
alanz/hroq | src/Data/Concurrent/Queue/Roq/StatsGatherer.hs | bsd-3-clause | handleInfoProcessMonitorNotification :: State -> ProcessMonitorNotification -> Process (ProcessAction State)
handleInfoProcessMonitorNotification st n@(ProcessMonitorNotification _ref pid _reason) = do
-- logm $ "HroqStatsGatherer.handleInfoProcessMonitorNotification called with: " ++ show n
let qd = stQdict st
... | 1,178 | handleInfoProcessMonitorNotification :: State -> ProcessMonitorNotification -> Process (ProcessAction State)
handleInfoProcessMonitorNotification st n@(ProcessMonitorNotification _ref pid _reason) = do
-- logm $ "HroqStatsGatherer.handleInfoProcessMonitorNotification called with: " ++ show n
let qd = stQdict st
... | 1,178 | handleInfoProcessMonitorNotification st n@(ProcessMonitorNotification _ref pid _reason) = do
-- logm $ "HroqStatsGatherer.handleInfoProcessMonitorNotification called with: " ++ show n
let qd = stQdict st
cd = stCdict st
pd = stPdict st
case Map.lookup pid pd of
Just (StatsConsumer c) -> contin... | 1,069 | false | true | 0 | 14 | 312 | 198 | 98 | 100 | null | null |
facebookincubator/duckling | Duckling/Rules/UK.hs | bsd-3-clause | langRules (Seal TimeGrain) = TimeGrain.rules | 44 | langRules (Seal TimeGrain) = TimeGrain.rules | 44 | langRules (Seal TimeGrain) = TimeGrain.rules | 44 | false | false | 0 | 7 | 4 | 17 | 8 | 9 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Writers/HTML.hs | gpl-2.0 | blockToHtml opts (Header level attr@(_,classes,_) lst) = do
contents <- inlineListToHtml opts lst
secnum <- liftM stSecNum get
let contents' = if writerNumberSections opts && not (null secnum)
&& "unnumbered" `notElem` classes
then (H.span ! A.class_ "header-section-numbe... | 792 | blockToHtml opts (Header level attr@(_,classes,_) lst) = do
contents <- inlineListToHtml opts lst
secnum <- liftM stSecNum get
let contents' = if writerNumberSections opts && not (null secnum)
&& "unnumbered" `notElem` classes
then (H.span ! A.class_ "header-section-numbe... | 792 | blockToHtml opts (Header level attr@(_,classes,_) lst) = do
contents <- inlineListToHtml opts lst
secnum <- liftM stSecNum get
let contents' = if writerNumberSections opts && not (null secnum)
&& "unnumbered" `notElem` classes
then (H.span ! A.class_ "header-section-numbe... | 792 | false | false | 0 | 18 | 301 | 254 | 122 | 132 | null | null |
pparkkin/eta | compiler/ETA/BasicTypes/OccName.hs | bsd-3-clause | mkVarOccFS :: FastString -> OccName
mkVarOccFS fs = mkOccNameFS varName fs | 74 | mkVarOccFS :: FastString -> OccName
mkVarOccFS fs = mkOccNameFS varName fs | 74 | mkVarOccFS fs = mkOccNameFS varName fs | 38 | false | true | 0 | 5 | 10 | 23 | 11 | 12 | null | null |
joshcough/Scrabble | test/Scrabble/SearchTests.hs | mit | searchANIMALS =
["AA","AAL","AALS","AAS","AI","AIA","AIAS","AIL","AILS","AIM","AIMS",
"AIN","AINS","AIS","AL","ALA","ALAN","ALANS","ALAS","ALIAS","ALISMA",
"ALMA","ALMAIN","ALMAINS","ALMAS","ALMS","ALS","AM","AMA","AMAIN",
"AMAS","AMI","AMIA","AMIAS","AMIN","AMINS","AMIS","AMLA","AMLAS",
"AMNIA","AN","ANA... | 1,221 | searchANIMALS =
["AA","AAL","AALS","AAS","AI","AIA","AIAS","AIL","AILS","AIM","AIMS",
"AIN","AINS","AIS","AL","ALA","ALAN","ALANS","ALAS","ALIAS","ALISMA",
"ALMA","ALMAIN","ALMAINS","ALMAS","ALMS","ALS","AM","AMA","AMAIN",
"AMAS","AMI","AMIA","AMIAS","AMIN","AMINS","AMIS","AMLA","AMLAS",
"AMNIA","AN","ANA... | 1,221 | searchANIMALS =
["AA","AAL","AALS","AAS","AI","AIA","AIAS","AIL","AILS","AIM","AIMS",
"AIN","AINS","AIS","AL","ALA","ALAN","ALANS","ALAS","ALIAS","ALISMA",
"ALMA","ALMAIN","ALMAINS","ALMAS","ALMS","ALS","AM","AMA","AMAIN",
"AMAS","AMI","AMIA","AMIAS","AMIN","AMINS","AMIS","AMLA","AMLAS",
"AMNIA","AN","ANA... | 1,221 | false | false | 0 | 5 | 68 | 489 | 325 | 164 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | Chapter_18_my_note.hs | mit | findKey_ :: (Eq k) => k -> [(k, v)] -> Maybe v
findKey_ key = foldl (\t (ck, cv) -> if ck == key then Just cv else t) Nothing | 128 | findKey_ :: (Eq k) => k -> [(k, v)] -> Maybe v
findKey_ key = foldl (\t (ck, cv) -> if ck == key then Just cv else t) Nothing | 128 | findKey_ key = foldl (\t (ck, cv) -> if ck == key then Just cv else t) Nothing | 81 | false | true | 0 | 10 | 32 | 83 | 44 | 39 | null | null |
hiratara/TypedPerl | src/TypedPerl/PerlAST.hs | bsd-3-clause | foldAST m (PerlSeq ast1 ast2) = seq m (foldAST m ast1) (foldAST m ast2) | 71 | foldAST m (PerlSeq ast1 ast2) = seq m (foldAST m ast1) (foldAST m ast2) | 71 | foldAST m (PerlSeq ast1 ast2) = seq m (foldAST m ast1) (foldAST m ast2) | 71 | false | false | 0 | 7 | 13 | 43 | 20 | 23 | null | null |
polygonhell/textEditor | src/TTYRender.hs | bsd-3-clause | hideCursor :: String
hideCursor = "\ESC[?25l" | 45 | hideCursor :: String
hideCursor = "\ESC[?25l" | 45 | hideCursor = "\ESC[?25l" | 24 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
miguelpagano/equ | Equ/PreExpr/Internal.hs | gpl-3.0 | getCalledVars (UnOp _ e) = getCalledVars e | 42 | getCalledVars (UnOp _ e) = getCalledVars e | 42 | getCalledVars (UnOp _ e) = getCalledVars e | 42 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.