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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AnttiLukats/orp | software/tools/tidl/src/Tidl/Generate/C.hs | apache-2.0 | functionProtos (TLStruct{ struct_name = sname, struct_fields = fields })
= do sayln' $ structInitProto sname ++ ";"
sayln' $ structCleanupProto sname ++ ";"
sayln' $ structSerializeProto sname ++ ";"
sayln' $ structDeserializeProto sname ++ ";"
mapM_ (\f -> sayln' $ arrayResizeProto sname f ++ ... | 352 | functionProtos (TLStruct{ struct_name = sname, struct_fields = fields })
= do sayln' $ structInitProto sname ++ ";"
sayln' $ structCleanupProto sname ++ ";"
sayln' $ structSerializeProto sname ++ ";"
sayln' $ structDeserializeProto sname ++ ";"
mapM_ (\f -> sayln' $ arrayResizeProto sname f ++ ... | 352 | functionProtos (TLStruct{ struct_name = sname, struct_fields = fields })
= do sayln' $ structInitProto sname ++ ";"
sayln' $ structCleanupProto sname ++ ";"
sayln' $ structSerializeProto sname ++ ";"
sayln' $ structDeserializeProto sname ++ ";"
mapM_ (\f -> sayln' $ arrayResizeProto sname f ++ ... | 352 | false | false | 0 | 12 | 72 | 120 | 57 | 63 | null | null |
Palmik/data-store | src/Data/Store.hs | bsd-3-clause | -- | Function for creating dimensions with the relation
-- \"many-<anything>\".
dimM :: Ord t => [t] -> I.KeyDimension I.M t
dimM = I.KeyDimensionM | 147 | dimM :: Ord t => [t] -> I.KeyDimension I.M t
dimM = I.KeyDimensionM | 67 | dimM = I.KeyDimensionM | 22 | true | true | 0 | 9 | 23 | 44 | 21 | 23 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F16.hs | bsd-3-clause | ptr_glMapObjectBufferATI :: FunPtr (GLuint -> IO (Ptr a))
ptr_glMapObjectBufferATI = unsafePerformIO $ getCommand "glMapObjectBufferATI" | 136 | ptr_glMapObjectBufferATI :: FunPtr (GLuint -> IO (Ptr a))
ptr_glMapObjectBufferATI = unsafePerformIO $ getCommand "glMapObjectBufferATI" | 136 | ptr_glMapObjectBufferATI = unsafePerformIO $ getCommand "glMapObjectBufferATI" | 78 | false | true | 0 | 10 | 13 | 37 | 18 | 19 | null | null |
tjakway/ghcjvm | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | _ `regClashesWithOp` _ = False | 43 | _ `regClashesWithOp` _ = False | 43 | _ `regClashesWithOp` _ = False | 43 | false | false | 0 | 5 | 17 | 14 | 7 | 7 | null | null |
sebcrozet/falling | Physics/Falling/Collision/Collision.hs | bsd-3-clause | revertCollisionDescr :: (Vector v, UnitVector v n) => CollisionDescr v n -> CollisionDescr v n
revertCollisionDescr (CollisionDescr v lv1 lv2 n d) = CollisionDescr v lv2 lv1 (toNormalUnsafe $ neg $ fromNormal n) d | 213 | revertCollisionDescr :: (Vector v, UnitVector v n) => CollisionDescr v n -> CollisionDescr v n
revertCollisionDescr (CollisionDescr v lv1 lv2 n d) = CollisionDescr v lv2 lv1 (toNormalUnsafe $ neg $ fromNormal n) d | 213 | revertCollisionDescr (CollisionDescr v lv1 lv2 n d) = CollisionDescr v lv2 lv1 (toNormalUnsafe $ neg $ fromNormal n) d | 118 | false | true | 0 | 8 | 33 | 84 | 41 | 43 | null | null |
ejlilley/AbstractMusic | Tuning.hs | gpl-3.0 | sycamore = pureoctave (5 *^ _A1, rat $ 6/5) | 46 | sycamore = pureoctave (5 *^ _A1, rat $ 6/5) | 46 | sycamore = pureoctave (5 *^ _A1, rat $ 6/5) | 46 | false | false | 0 | 8 | 11 | 27 | 14 | 13 | null | null |
mankyKitty/SimplyEasy | src/first/SimplyTyped.hs | mit | const' = Lam (Lam (Inf (Var 1))) | 32 | const' = Lam (Lam (Inf (Var 1))) | 32 | const' = Lam (Lam (Inf (Var 1))) | 32 | false | false | 1 | 10 | 6 | 30 | 13 | 17 | null | null |
barrucadu/nagi | lib/Imageboard/Moderation.hs | mit | stickyThread False = setThreadField capStickyThread ("unstickied "<>) ThreadStickied False | 90 | stickyThread False = setThreadField capStickyThread ("unstickied "<>) ThreadStickied False | 90 | stickyThread False = setThreadField capStickyThread ("unstickied "<>) ThreadStickied False | 90 | false | false | 1 | 6 | 8 | 26 | 11 | 15 | null | null |
athanclark/rose-trees | src/Data/Tree/Knuth/Forest.hs | bsd-3-clause | -- ** Construction
singleton :: a -> KnuthForest a
singleton x = Fork x Nil Nil | 80 | singleton :: a -> KnuthForest a
singleton x = Fork x Nil Nil | 60 | singleton x = Fork x Nil Nil | 28 | true | true | 0 | 6 | 16 | 29 | 14 | 15 | null | null |
daherb/Haskell-Muste | ajax-backend/Database.hs | artistic-2.0 | main =
do
putStrLn "Starting"
con <- open "muste.db"
-- initDB con
(grammars,precs) <- initPrecomputed con
writeFile "/dev/null" (show precs)
putStrLn "Finished, shutting down"
close con | 216 | main =
do
putStrLn "Starting"
con <- open "muste.db"
-- initDB con
(grammars,precs) <- initPrecomputed con
writeFile "/dev/null" (show precs)
putStrLn "Finished, shutting down"
close con | 216 | main =
do
putStrLn "Starting"
con <- open "muste.db"
-- initDB con
(grammars,precs) <- initPrecomputed con
writeFile "/dev/null" (show precs)
putStrLn "Finished, shutting down"
close con | 216 | false | false | 0 | 9 | 55 | 65 | 28 | 37 | null | null |
nsmryan/Misc | src/UtilsRandom.hs | bsd-3-clause | indR :: (Monad m) => Int -> RVarT m IndR
indR is = S.replicateM is stdUniformT | 78 | indR :: (Monad m) => Int -> RVarT m IndR
indR is = S.replicateM is stdUniformT | 78 | indR is = S.replicateM is stdUniformT | 37 | false | true | 0 | 7 | 15 | 39 | 19 | 20 | null | null |
brendanhay/gogol | gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/QuickAdd.hs | mpl-2.0 | -- | Deprecated. Please use sendUpdates instead. Whether to send
-- notifications about the creation of the event. Note that some emails
-- might still be sent even if you set the value to false. The default is
-- false.
eqaSendNotifications :: Lens' EventsQuickAdd (Maybe Bool)
eqaSendNotifications
= lens _eqaSendNot... | 376 | eqaSendNotifications :: Lens' EventsQuickAdd (Maybe Bool)
eqaSendNotifications
= lens _eqaSendNotifications
(\ s a -> s{_eqaSendNotifications = a}) | 155 | eqaSendNotifications
= lens _eqaSendNotifications
(\ s a -> s{_eqaSendNotifications = a}) | 97 | true | true | 1 | 9 | 64 | 54 | 28 | 26 | null | null |
green-haskell/ghc | compiler/stranal/DmdAnal.hs | bsd-3-clause | unpackTrivial (Cast e _) = unpackTrivial e | 55 | unpackTrivial (Cast e _) = unpackTrivial e | 55 | unpackTrivial (Cast e _) = unpackTrivial e | 55 | false | false | 0 | 6 | 19 | 21 | 9 | 12 | null | null |
diminishedprime/.org | reading-list/haskell_programming_from_first_principles/15_14.hs | mit | main' = do
print $ runMem (f' <> mempty) 0
print $ runMem (mempty <> f') 0
print $ (runMem mempty 0 :: (String, Int))
print $ runMem (f' <> mempty) 0 == runMem f' 0
print $ runMem (mempty <> f') 0 == runMem f' 0
-- A correct Monoid for Mem should, given the above code, get the following output:
-- Prelu... | 390 | main' = do
print $ runMem (f' <> mempty) 0
print $ runMem (mempty <> f') 0
print $ (runMem mempty 0 :: (String, Int))
print $ runMem (f' <> mempty) 0 == runMem f' 0
print $ runMem (mempty <> f') 0 == runMem f' 0
-- A correct Monoid for Mem should, given the above code, get the following output:
-- Prelu... | 390 | main' = do
print $ runMem (f' <> mempty) 0
print $ runMem (mempty <> f') 0
print $ (runMem mempty 0 :: (String, Int))
print $ runMem (f' <> mempty) 0 == runMem f' 0
print $ runMem (mempty <> f') 0 == runMem f' 0
-- A correct Monoid for Mem should, given the above code, get the following output:
-- Prelu... | 390 | false | false | 0 | 11 | 104 | 130 | 66 | 64 | null | null |
nyson/haste-compiler | src/Haste/Linker.hs | bsd-3-clause | getModuleOf :: [FilePath] -> Name -> DepM Module
getModuleOf libpaths v@(Name n _) =
case moduleOf v of
Just "GHC.Prim" -> return foreignModule
Just "" -> return foreignModule
Nothing -> return foreignModule
Just ":Main" -> do
(p, m) <- mainModule `fmap` get
getModuleOf ... | 658 | getModuleOf :: [FilePath] -> Name -> DepM Module
getModuleOf libpaths v@(Name n _) =
case moduleOf v of
Just "GHC.Prim" -> return foreignModule
Just "" -> return foreignModule
Nothing -> return foreignModule
Just ":Main" -> do
(p, m) <- mainModule `fmap` get
getModuleOf ... | 658 | getModuleOf libpaths v@(Name n _) =
case moduleOf v of
Just "GHC.Prim" -> return foreignModule
Just "" -> return foreignModule
Nothing -> return foreignModule
Just ":Main" -> do
(p, m) <- mainModule `fmap` get
getModuleOf libpaths (Name n (Just (p, m)))
Just m ... | 609 | false | true | 9 | 10 | 200 | 176 | 92 | 84 | null | null |
ConsensusResearch/ForgingSimulation | simulation.hs | gpl-2.0 | generateTransactionsForNodes :: SimulationData -> [Node] -> Network -> [Node]
generateTransactionsForNodes sd nonEmpty network = foldl (\ns n ->
let gen = nodeGen sd n in
let r::Int = fst $ randomR (0, 10) gen in case r of
1 -> let updNode::Node = generateTransactionsForNode sd n network... | 388 | generateTransactionsForNodes :: SimulationData -> [Node] -> Network -> [Node]
generateTransactionsForNodes sd nonEmpty network = foldl (\ns n ->
let gen = nodeGen sd n in
let r::Int = fst $ randomR (0, 10) gen in case r of
1 -> let updNode::Node = generateTransactionsForNode sd n network... | 388 | generateTransactionsForNodes sd nonEmpty network = foldl (\ns n ->
let gen = nodeGen sd n in
let r::Int = fst $ randomR (0, 10) gen in case r of
1 -> let updNode::Node = generateTransactionsForNode sd n network in ns ++ [updNode]
_ -> ns ++ [n]
) [] nonEmpty | 310 | false | true | 0 | 19 | 110 | 157 | 77 | 80 | null | null |
swian/minesweeper | src/App/Ui.hs | bsd-3-clause | theMap :: AttrMap
theMap = attrMap V.defAttr
[ (selectedAttr, V.black `on` V.yellow)
] | 94 | theMap :: AttrMap
theMap = attrMap V.defAttr
[ (selectedAttr, V.black `on` V.yellow)
] | 94 | theMap = attrMap V.defAttr
[ (selectedAttr, V.black `on` V.yellow)
] | 76 | false | true | 0 | 8 | 20 | 38 | 21 | 17 | null | null |
kmate/HaRe | old/testing/simplifyExpr/PatternIn1AST.hs | bsd-3-clause | f_1 x
= let g = 42
in case g of
42 -> return 0
_ -> return 1 | 104 | f_1 x
= let g = 42
in case g of
42 -> return 0
_ -> return 1 | 104 | f_1 x
= let g = 42
in case g of
42 -> return 0
_ -> return 1 | 104 | false | false | 1 | 10 | 62 | 45 | 19 | 26 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/llvmGen/LlvmCodeGen/Data.hs | bsd-3-clause | isSecConstant ReadOnlyData = True | 44 | isSecConstant ReadOnlyData = True | 44 | isSecConstant ReadOnlyData = True | 44 | false | false | 0 | 4 | 14 | 10 | 4 | 6 | null | null |
agentm/project-m36 | src/bin/TutorialD/Interpreter/Base.hs | unlicense | parens :: Parser a -> Parser a
parens = between (symbol "(") (symbol ")") | 73 | parens :: Parser a -> Parser a
parens = between (symbol "(") (symbol ")") | 73 | parens = between (symbol "(") (symbol ")") | 42 | false | true | 0 | 7 | 13 | 38 | 18 | 20 | null | null |
jstolarek/ghc | libraries/base/GHC/Conc/Sync.hs | bsd-3-clause | bindSTM :: STM a -> (a -> STM b) -> STM b
bindSTM (STM m) k = STM ( \s ->
case m s of
(# new_s, a #) -> unSTM (k a) new_s
) | 131 | bindSTM :: STM a -> (a -> STM b) -> STM b
bindSTM (STM m) k = STM ( \s ->
case m s of
(# new_s, a #) -> unSTM (k a) new_s
) | 131 | bindSTM (STM m) k = STM ( \s ->
case m s of
(# new_s, a #) -> unSTM (k a) new_s
) | 89 | false | true | 0 | 13 | 42 | 91 | 43 | 48 | null | null |
haskell-compat/base-orphans | test/System/Posix/Types/OrphansSpec.hs | mit | pred2NonNegIntHDev :: (CDev -> Int -> CDev)
-> (HDev -> Int -> HDev)
-> HDev -> NonNegative Int -> Bool
pred2NonNegIntHDev f g hDev (NonNegative x) = pred2Int eqCDevHDev f g hDev x | 218 | pred2NonNegIntHDev :: (CDev -> Int -> CDev)
-> (HDev -> Int -> HDev)
-> HDev -> NonNegative Int -> Bool
pred2NonNegIntHDev f g hDev (NonNegative x) = pred2Int eqCDevHDev f g hDev x | 218 | pred2NonNegIntHDev f g hDev (NonNegative x) = pred2Int eqCDevHDev f g hDev x | 76 | false | true | 0 | 12 | 70 | 83 | 40 | 43 | null | null |
nbloomf/carl | src/Carl/Algebra/Ring.hs | gpl-3.0 | rMaxim :: (ORingoid t) => [t] -> Either AlgErr t
rMaxim [] = Left (RingoidEmptyListErr "maximum") | 101 | rMaxim :: (ORingoid t) => [t] -> Either AlgErr t
rMaxim [] = Left (RingoidEmptyListErr "maximum") | 101 | rMaxim [] = Left (RingoidEmptyListErr "maximum") | 52 | false | true | 0 | 7 | 19 | 46 | 23 | 23 | null | null |
holzensp/ghc | compiler/cmm/PprC.hs | bsd-3-clause | pprBlockId :: BlockId -> SDoc
pprBlockId b = char '_' <> ppr (getUnique b) | 74 | pprBlockId :: BlockId -> SDoc
pprBlockId b = char '_' <> ppr (getUnique b) | 74 | pprBlockId b = char '_' <> ppr (getUnique b) | 44 | false | true | 0 | 8 | 13 | 34 | 16 | 18 | null | null |
lukexi/stack | src/Stack/Constants.hs | bsd-3-clause | -- -- | Hoogle database file.
-- hoogleDatabaseFile :: Path Abs Dir -> Path Abs File
-- hoogleDatabaseFile docLoc =
-- docLoc </>
-- $(mkRelFile "default.hoo")
-- -- | Extension for hoogle databases.
-- hoogleDbExtension :: String
-- hoogleDbExtension = "hoo"
-- -- | Extension of haddock files
-- haddockExtension... | 503 | userDocsDir :: Config -> Path Abs Dir
userDocsDir config = configStackRoot config </> $(mkRelDir "doc/") | 104 | userDocsDir config = configStackRoot config </> $(mkRelDir "doc/") | 66 | true | true | 2 | 7 | 82 | 54 | 30 | 24 | null | null |
davdar/quals | src/Lang/Lam/Parser.hs | bsd-3-clause | whitespaceFilter :: Token -> Bool
whitespaceFilter = (==) White . tokenType | 75 | whitespaceFilter :: Token -> Bool
whitespaceFilter = (==) White . tokenType | 75 | whitespaceFilter = (==) White . tokenType | 41 | false | true | 1 | 7 | 10 | 32 | 14 | 18 | null | null |
nuttycom/haskoin | Network/Haskoin/Util.hs | unlicense | -- | Decode a base16 (HEX) string from a bytestring. This function can fail
-- if the string contains invalid HEX characters
hexToBS :: String -> Maybe BS.ByteString
hexToBS xs = BS.pack <$> mapM hexWord (chunksOf 2 xs)
where
hexWord x = do
guard $ length x == 2
let hs = readHex x
guard $ ... | 468 | hexToBS :: String -> Maybe BS.ByteString
hexToBS xs = BS.pack <$> mapM hexWord (chunksOf 2 xs)
where
hexWord x = do
guard $ length x == 2
let hs = readHex x
guard $ not $ null hs
let [(w, s)] = hs
guard $ null s
return w
-- Data.Binary helpers
-- | Strict version ... | 343 | hexToBS xs = BS.pack <$> mapM hexWord (chunksOf 2 xs)
where
hexWord x = do
guard $ length x == 2
let hs = readHex x
guard $ not $ null hs
let [(w, s)] = hs
guard $ null s
return w
-- Data.Binary helpers
-- | Strict version of @Data.Binary.encode@ | 302 | true | true | 0 | 11 | 135 | 131 | 62 | 69 | null | null |
pgj/bead | src/Bead/Domain/Entities.hs | bsd-3-clause | statusMessage
normal
err
sm
= case sm of
SmNormal x -> normal x
SmError x -> err x
#ifdef TEST | 111 | statusMessage
normal
err
sm
= case sm of
SmNormal x -> normal x
SmError x -> err x
#ifdef TEST | 111 | statusMessage
normal
err
sm
= case sm of
SmNormal x -> normal x
SmError x -> err x
#ifdef TEST | 111 | false | false | 1 | 8 | 36 | 47 | 19 | 28 | null | null |
iblumenfeld/cryptol | src/Cryptol/Parser/ParserUtils.hs | bsd-3-clause | parseString :: Config -> ParseM a -> String -> Either ParseError a
parseString cfg p cs = parse cfg p (T.pack cs) | 113 | parseString :: Config -> ParseM a -> String -> Either ParseError a
parseString cfg p cs = parse cfg p (T.pack cs) | 113 | parseString cfg p cs = parse cfg p (T.pack cs) | 46 | false | true | 0 | 9 | 21 | 60 | 26 | 34 | null | null |
mpickering/hackage-server | Distribution/Server/Packages/Types.hs | bsd-3-clause | -- a small utility
descendUploadTimes :: [(a, UploadInfo)] -> [(a, UploadInfo)]
descendUploadTimes = sortBy (flip $ comparing (fst . snd)) | 138 | descendUploadTimes :: [(a, UploadInfo)] -> [(a, UploadInfo)]
descendUploadTimes = sortBy (flip $ comparing (fst . snd)) | 119 | descendUploadTimes = sortBy (flip $ comparing (fst . snd)) | 58 | true | true | 0 | 10 | 19 | 60 | 32 | 28 | null | null |
bgwines/project-euler | src/solved/problem2.hs | bsd-3-clause | {-
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
-}
... | 383 | fibs :: [Integer]
fibs = 0 : 1 : (zipWith (+) fibs (tail fibs)) | 63 | fibs = 0 : 1 : (zipWith (+) fibs (tail fibs)) | 45 | true | true | 0 | 9 | 78 | 41 | 23 | 18 | null | null |
jparyani/capnproto-boostpython | compiler/src/Semantics.hs | bsd-2-clause | descQualifiedName _ DescBuiltinInlineList = "InlineList" | 56 | descQualifiedName _ DescBuiltinInlineList = "InlineList" | 56 | descQualifiedName _ DescBuiltinInlineList = "InlineList" | 56 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
zhangjiji/real-world-haskell | ch10/TreeMap.hs | mit | treeLengths (Node l r) = Node (treeLengths l) (treeLengths r) | 61 | treeLengths (Node l r) = Node (treeLengths l) (treeLengths r) | 61 | treeLengths (Node l r) = Node (treeLengths l) (treeLengths r) | 61 | false | false | 0 | 7 | 9 | 34 | 16 | 18 | null | null |
ktvoelker/vorple | src/Web/Vorple/Log.hs | gpl-3.0 | note :: Name -> String -> ExpQ
note level xs = let cs = parseControls xs in do
cs' <- mapM n cs
let vs = map snd $ lefts cs'
-- TODO can we use foldr here, and perhaps avoid reversing vs?
let body = foldl f [| return () |] cs'
let
{ body' =
[| do
{ maxLevel <- asksOpt optLogLevel
; if maxLev... | 882 | note :: Name -> String -> ExpQ
note level xs = let cs = parseControls xs in do
cs' <- mapM n cs
let vs = map snd $ lefts cs'
-- TODO can we use foldr here, and perhaps avoid reversing vs?
let body = foldl f [| return () |] cs'
let
{ body' =
[| do
{ maxLevel <- asksOpt optLogLevel
; if maxLev... | 882 | note level xs = let cs = parseControls xs in do
cs' <- mapM n cs
let vs = map snd $ lefts cs'
-- TODO can we use foldr here, and perhaps avoid reversing vs?
let body = foldl f [| return () |] cs'
let
{ body' =
[| do
{ maxLevel <- asksOpt optLogLevel
; if maxLevel >= $(conE level) then $body ... | 851 | false | true | 0 | 13 | 275 | 260 | 133 | 127 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Query/Server.hs | bsd-2-clause | listener :: ConfigReader -> S.Socket -> IO ()
listener creader socket = do
client <- acceptClient socket
_ <- forkIO $ clientLoop client creader
return ()
-- | Type alias for prepMain results | 198 | listener :: ConfigReader -> S.Socket -> IO ()
listener creader socket = do
client <- acceptClient socket
_ <- forkIO $ clientLoop client creader
return ()
-- | Type alias for prepMain results | 198 | listener creader socket = do
client <- acceptClient socket
_ <- forkIO $ clientLoop client creader
return ()
-- | Type alias for prepMain results | 152 | false | true | 0 | 9 | 39 | 66 | 30 | 36 | null | null |
fpco/hlint | data/Default.hs | bsd-3-clause | error = hWaitForInput a 0 ==> hReady a | 38 | error = hWaitForInput a 0 ==> hReady a | 38 | error = hWaitForInput a 0 ==> hReady a | 38 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
rueshyna/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Grouplicenses/Get.hs | mpl-2.0 | -- | Creates a value of 'GrouplicensesGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ggEnterpriseId'
--
-- * 'ggGroupLicenseId'
grouplicensesGet
:: Text -- ^ 'ggEnterpriseId'
-> Text -- ^ 'ggGroupLicenseId'
-> Groupl... | 499 | grouplicensesGet
:: Text -- ^ 'ggEnterpriseId'
-> Text -- ^ 'ggGroupLicenseId'
-> GrouplicensesGet
grouplicensesGet pGgEnterpriseId_ pGgGroupLicenseId_ =
GrouplicensesGet'
{ _ggEnterpriseId = pGgEnterpriseId_
, _ggGroupLicenseId = pGgGroupLicenseId_
} | 279 | grouplicensesGet pGgEnterpriseId_ pGgGroupLicenseId_ =
GrouplicensesGet'
{ _ggEnterpriseId = pGgEnterpriseId_
, _ggGroupLicenseId = pGgGroupLicenseId_
} | 168 | true | true | 0 | 8 | 92 | 56 | 32 | 24 | null | null |
srijs/haskell-attoparsec-trans | src/Control/Monad/Trans/Parser.hs | mit | liftP :: Monad m => (i -> IResult i r) -> ParserT i m r
liftP p = ParserT $ return . toM . p | 92 | liftP :: Monad m => (i -> IResult i r) -> ParserT i m r
liftP p = ParserT $ return . toM . p | 92 | liftP p = ParserT $ return . toM . p | 36 | false | true | 0 | 9 | 24 | 56 | 27 | 29 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Disks/SetIAMPolicy.hs | mpl-2.0 | -- | Multipart request metadata.
dsipPayload :: Lens' DisksSetIAMPolicy ZoneSetPolicyRequest
dsipPayload
= lens _dsipPayload (\ s a -> s{_dsipPayload = a}) | 157 | dsipPayload :: Lens' DisksSetIAMPolicy ZoneSetPolicyRequest
dsipPayload
= lens _dsipPayload (\ s a -> s{_dsipPayload = a}) | 124 | dsipPayload
= lens _dsipPayload (\ s a -> s{_dsipPayload = a}) | 64 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
AndreasPK/stack | src/Stack/Package.hs | bsd-3-clause | generatePkgDescOpts
:: (HasEnvConfig env, MonadThrow m, MonadReader env m, MonadIO m)
=> SourceMap
-> InstalledMap
-> [PackageName] -- ^ Packages to omit from the "-package" / "-package-id" flags
-> [PackageName] -- ^ Packages to add to the "-package" flags
-> Path Abs File
-> PackageDescrip... | 2,630 | generatePkgDescOpts
:: (HasEnvConfig env, MonadThrow m, MonadReader env m, MonadIO m)
=> SourceMap
-> InstalledMap
-> [PackageName] -- ^ Packages to omit from the "-package" / "-package-id" flags
-> [PackageName] -- ^ Packages to add to the "-package" flags
-> Path Abs File
-> PackageDescrip... | 2,630 | generatePkgDescOpts sourceMap installedMap omitPkgs addPkgs cabalfp pkg componentPaths = do
config <- view configL
distDir <- distDirFromDir cabalDir
let cabalMacros = autogenDir distDir </> $(mkRelFile "cabal_macros.h")
exists <- doesFileExist cabalMacros
let mcabalMacros =
if exists
... | 2,216 | false | true | 0 | 22 | 1,209 | 535 | 273 | 262 | null | null |
natepisarski/Tables | Tables1.hs | bsd-3-clause | --read table
--delete :: String -> String -> IO ()
deleteT file tbl
| ':' `elem` tbl = deleteItem file (both tbl) -- delete table1:item
| otherwise = deleteTable file tbl | 175 | deleteT file tbl
| ':' `elem` tbl = deleteItem file (both tbl) -- delete table1:item
| otherwise = deleteTable file tbl | 123 | deleteT file tbl
| ':' `elem` tbl = deleteItem file (both tbl) -- delete table1:item
| otherwise = deleteTable file tbl | 123 | true | false | 1 | 8 | 35 | 49 | 25 | 24 | null | null |
gcampax/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | mkTcAxInstCo :: Role -> CoAxiom br -> Int -> [TcType] -> TcCoercion
mkTcAxInstCo role ax index tys
| ASSERT2( not (role == Nominal && ax_role == Representational) , ppr (ax, tys) )
arity == n_tys = tcDowngradeRole role ax_role $
TcAxiomInstCo ax_br index rtys
| otherwise = ASSERT( arit... | 820 | mkTcAxInstCo :: Role -> CoAxiom br -> Int -> [TcType] -> TcCoercion
mkTcAxInstCo role ax index tys
| ASSERT2( not (role == Nominal && ax_role == Representational) , ppr (ax, tys) )
arity == n_tys = tcDowngradeRole role ax_role $
TcAxiomInstCo ax_br index rtys
| otherwise = ASSERT( arit... | 820 | mkTcAxInstCo role ax index tys
| ASSERT2( not (role == Nominal && ax_role == Representational) , ppr (ax, tys) )
arity == n_tys = tcDowngradeRole role ax_role $
TcAxiomInstCo ax_br index rtys
| otherwise = ASSERT( arity < n_tys )
tcDowngradeRole role ax_role $
... | 752 | false | true | 1 | 15 | 266 | 245 | 121 | 124 | null | null |
ghcjs/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ TryTakeMVarOp [r,v] [m] = PrimInline $ appT [r,v] "h$tryTakeMVar" [m] | 81 | genPrim _ _ TryTakeMVarOp [r,v] [m] = PrimInline $ appT [r,v] "h$tryTakeMVar" [m] | 81 | genPrim _ _ TryTakeMVarOp [r,v] [m] = PrimInline $ appT [r,v] "h$tryTakeMVar" [m] | 81 | false | false | 0 | 7 | 12 | 46 | 25 | 21 | null | null |
erochest/cabal-new | CabalNew/Git.hs | apache-2.0 | git_ ParentGit c args = git_' c args | 41 | git_ ParentGit c args = git_' c args | 41 | git_ ParentGit c args = git_' c args | 41 | false | false | 0 | 5 | 12 | 18 | 8 | 10 | null | null |
jozefg/c_of_scheme | src/OptimizeCPS.hs | mit | substitute :: Var -> SExp p -> SExp p -> SExp p
substitute var exp = para folder
where folder (LamF vars body) = Lam vars $ if var `elem` vars then map fst body else map snd body
folder (VarF v) = if v == var then exp else Var v
folder (IfF (_,i)(_,t)(_,e)) = If i t e
fold... | 563 | substitute :: Var -> SExp p -> SExp p -> SExp p
substitute var exp = para folder
where folder (LamF vars body) = Lam vars $ if var `elem` vars then map fst body else map snd body
folder (VarF v) = if v == var then exp else Var v
folder (IfF (_,i)(_,t)(_,e)) = If i t e
fold... | 563 | substitute var exp = para folder
where folder (LamF vars body) = Lam vars $ if var `elem` vars then map fst body else map snd body
folder (VarF v) = if v == var then exp else Var v
folder (IfF (_,i)(_,t)(_,e)) = If i t e
folder (AppF f args) = App (snd f) (map snd... | 515 | false | true | 6 | 12 | 217 | 253 | 129 | 124 | null | null |
ciderpunx/57-exercises-for-programmers | src/P47InSpace.hs | gpl-3.0 | main :: IO ()
main = do
i <- getInSpace
case i of
Just is -> putStrLn $ format is
Nothing -> error "API problem" | 136 | main :: IO ()
main = do
i <- getInSpace
case i of
Just is -> putStrLn $ format is
Nothing -> error "API problem" | 136 | main = do
i <- getInSpace
case i of
Just is -> putStrLn $ format is
Nothing -> error "API problem" | 122 | false | true | 0 | 11 | 48 | 55 | 25 | 30 | null | null |
hanshoglund/hsconf | test/ReaderI.hs | bsd-3-clause | case_secParserAllowedChars4 = let
expected = Right $ SectionL "foo123"
actual = p2E secParser "sec" "[foo123]\n"
in expected @=? actual | 155 | case_secParserAllowedChars4 = let
expected = Right $ SectionL "foo123"
actual = p2E secParser "sec" "[foo123]\n"
in expected @=? actual | 155 | case_secParserAllowedChars4 = let
expected = Right $ SectionL "foo123"
actual = p2E secParser "sec" "[foo123]\n"
in expected @=? actual | 155 | false | false | 0 | 10 | 38 | 40 | 19 | 21 | null | null |
ulricha/dsh | src/Database/DSH/Common/RewriteM.hs | bsd-3-clause | failM :: String -> RewriteM s w a
failM msg = RewriteM (\n -> (n, Left msg)) | 76 | failM :: String -> RewriteM s w a
failM msg = RewriteM (\n -> (n, Left msg)) | 76 | failM msg = RewriteM (\n -> (n, Left msg)) | 42 | false | true | 0 | 9 | 16 | 48 | 24 | 24 | null | null |
tjakway/ghcjvm | compiler/cmm/SMRep.hs | bsd-3-clause | pprTypeInfo (Fun arity args)
= text "Fun" <+>
braces (sep [ text "arity:" <+> ppr arity
, ptext (sLit ("fun_type:")) <+> ppr args ]) | 154 | pprTypeInfo (Fun arity args)
= text "Fun" <+>
braces (sep [ text "arity:" <+> ppr arity
, ptext (sLit ("fun_type:")) <+> ppr args ]) | 154 | pprTypeInfo (Fun arity args)
= text "Fun" <+>
braces (sep [ text "arity:" <+> ppr arity
, ptext (sLit ("fun_type:")) <+> ppr args ]) | 154 | false | false | 2 | 13 | 45 | 71 | 32 | 39 | null | null |
byorgey/Idris-dev | src/Util/DynamicLinker.hs | bsd-3-clause | hostDynamicLibExt = "so" | 24 | hostDynamicLibExt = "so" | 24 | hostDynamicLibExt = "so" | 24 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/parsec/Text/ParserCombinators/Parsec/Perm.hs | bsd-3-clause | {---------------------------------------------------------------
Building a permutation parser
---------------------------------------------------------------}
(<||>) :: PermParser tok st (a -> b) -> GenParser tok st a -> PermParser tok st b
(<||>) perm p = add perm p | 274 | (<||>) :: PermParser tok st (a -> b) -> GenParser tok st a -> PermParser tok st b
(<||>) perm p = add perm p | 112 | (<||>) perm p = add perm p | 30 | true | true | 0 | 9 | 36 | 67 | 33 | 34 | null | null |
Submitty/AnalysisTools | src/Lichen/Util.hs | bsd-3-clause | removeDir :: FilePath -> IO ()
removeDir dir = doesDirectoryExist dir >>= flip when (removeDirectoryRecursive dir) | 114 | removeDir :: FilePath -> IO ()
removeDir dir = doesDirectoryExist dir >>= flip when (removeDirectoryRecursive dir) | 114 | removeDir dir = doesDirectoryExist dir >>= flip when (removeDirectoryRecursive dir) | 83 | false | true | 0 | 8 | 15 | 41 | 19 | 22 | null | null |
ezyang/ghc | libraries/base/Text/Printf.hs | bsd-3-clause | getSpecs l z s a cs0@(_ : _) us =
let FormatParse ms c cs =
case us of
(ufmt, _) : _ -> ufmt cs0
[] -> errorMissingArgument
in
(FieldFormat {
fmtWidth = Nothing,
fmtPrecision = Nothing,
fmtAdjust = adjustment Nothing Nothing l z,
fmtSign = s,
fmtAlte... | 385 | getSpecs l z s a cs0@(_ : _) us =
let FormatParse ms c cs =
case us of
(ufmt, _) : _ -> ufmt cs0
[] -> errorMissingArgument
in
(FieldFormat {
fmtWidth = Nothing,
fmtPrecision = Nothing,
fmtAdjust = adjustment Nothing Nothing l z,
fmtSign = s,
fmtAlte... | 385 | getSpecs l z s a cs0@(_ : _) us =
let FormatParse ms c cs =
case us of
(ufmt, _) : _ -> ufmt cs0
[] -> errorMissingArgument
in
(FieldFormat {
fmtWidth = Nothing,
fmtPrecision = Nothing,
fmtAdjust = adjustment Nothing Nothing l z,
fmtSign = s,
fmtAlte... | 385 | false | false | 0 | 13 | 142 | 141 | 78 | 63 | null | null |
clauderichard/Euclaude | Geo.hs | mit | --triangleSideEquilateralTriangleCorners :: Bool -> Triangle -> [Point]
--triangleSideEquilateralTriangleCorners outer t@(Triangle a b c) =
-- if normal
-- then [ completeEquilateralTriangle b c
-- , completeEquilateralTriangle c a
-- , completeEquilateralTriangle a b]
-- else [ completeEquila... | 1,121 | linesIntersect :: Line -> Line -> Point
linesIntersect (Line (Point x1 y1) (Point x2 y2)) (Line (Point x3 y3) (Point x4 y4)) =
Point x y
where a = y1-y2
b = x2-x1
c = y3-y4
d = x4-x3
det = a*d - b*c
v1 = y1*x2-x1*y2
v2 = y3*x4-x3*y4
x = (d*v1-b*v2)/det
... | 342 | linesIntersect (Line (Point x1 y1) (Point x2 y2)) (Line (Point x3 y3) (Point x4 y4)) =
Point x y
where a = y1-y2
b = x2-x1
c = y3-y4
d = x4-x3
det = a*d - b*c
v1 = y1*x2-x1*y2
v2 = y3*x4-x3*y4
x = (d*v1-b*v2)/det
y = (a*v2-c*v1)/det | 302 | true | true | 8 | 20 | 320 | 249 | 130 | 119 | null | null |
frosch03/Nutri | src/Data/Nutrition/Food.hs | cc0-1.0 | foodGenerator :: String -> (Protein, Carb, Fat) -> (Weight -> Food)
foodGenerator s (p, c, f) w
= Food
s
(newMacros (p, c, f))
(round $ kcalOfProt * p / 100.0 * inGramm w
+ kcalOfCarb * c / 100.0 * inGramm w
+ kcalOfFat * f / 100.0 * inGramm w)
w | 313 | foodGenerator :: String -> (Protein, Carb, Fat) -> (Weight -> Food)
foodGenerator s (p, c, f) w
= Food
s
(newMacros (p, c, f))
(round $ kcalOfProt * p / 100.0 * inGramm w
+ kcalOfCarb * c / 100.0 * inGramm w
+ kcalOfFat * f / 100.0 * inGramm w)
w | 313 | foodGenerator s (p, c, f) w
= Food
s
(newMacros (p, c, f))
(round $ kcalOfProt * p / 100.0 * inGramm w
+ kcalOfCarb * c / 100.0 * inGramm w
+ kcalOfFat * f / 100.0 * inGramm w)
w | 245 | false | true | 0 | 18 | 119 | 135 | 71 | 64 | null | null |
HIPERFIT/futhark | src/Futhark/IR/SegOp.hs | isc | kernelResultSubExp (ConcatReturns _ _ _ _ v) = Var v | 52 | kernelResultSubExp (ConcatReturns _ _ _ _ v) = Var v | 52 | kernelResultSubExp (ConcatReturns _ _ _ _ v) = Var v | 52 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
Changaco/haskell-plugins | src/System/Plugins/Utils.hs | lgpl-2.1 | decode_tuple :: Char -> EncodedString -> String
decode_tuple d cs
= go (digitToInt d) cs
where
go n (c : rest) | isDigit c = go (10*n + digitToInt c) rest
go 0 ['T'] = "()"
go n ['T'] = '(' : replicate (n-1) ',' ++ ")"
go 1 ['H'] = "(# #)"
go n ['H'] = '(' : '... | 704 | decode_tuple :: Char -> EncodedString -> String
decode_tuple d cs
= go (digitToInt d) cs
where
go n (c : rest) | isDigit c = go (10*n + digitToInt c) rest
go 0 ['T'] = "()"
go n ['T'] = '(' : replicate (n-1) ',' ++ ")"
go 1 ['H'] = "(# #)"
go n ['H'] = '(' : '... | 704 | decode_tuple d cs
= go (digitToInt d) cs
where
go n (c : rest) | isDigit c = go (10*n + digitToInt c) rest
go 0 ['T'] = "()"
go n ['T'] = '(' : replicate (n-1) ',' ++ ")"
go 1 ['H'] = "(# #)"
go n ['H'] = '(' : '#' : replicate (n-1) ',' ++ "#)"
go _ other ... | 656 | false | true | 0 | 9 | 182 | 207 | 106 | 101 | null | null |
fgaray/erd | src/Parse.hs | unlicense | rel :: Parser (Maybe AST)
rel = do
let ops = "?1*+"
e1 <- ident
op1 <- oneOf ops
string "--"
op2 <- oneOf ops
e2 <- ident
opts <- options
let getCard op =
case cardByName op of
Just t -> return t
Nothing -> unexpected (printf "Cardinality '%s' does not exist." op)
t1 <- ge... | 482 | rel :: Parser (Maybe AST)
rel = do
let ops = "?1*+"
e1 <- ident
op1 <- oneOf ops
string "--"
op2 <- oneOf ops
e2 <- ident
opts <- options
let getCard op =
case cardByName op of
Just t -> return t
Nothing -> unexpected (printf "Cardinality '%s' does not exist." op)
t1 <- ge... | 482 | rel = do
let ops = "?1*+"
e1 <- ident
op1 <- oneOf ops
string "--"
op2 <- oneOf ops
e2 <- ident
opts <- options
let getCard op =
case cardByName op of
Just t -> return t
Nothing -> unexpected (printf "Cardinality '%s' does not exist." op)
t1 <- getCard op1
t2 <- getCard ... | 456 | false | true | 1 | 16 | 167 | 194 | 89 | 105 | null | null |
adept/hledger | hledger/Hledger/Cli/Commands.hs | gpl-3.0 | -- | Extract the command names from commandsList: the first word
-- of lines beginning with a space or + sign.
commandsFromCommandsList :: [String] -> [String]
commandsFromCommandsList s =
[w | c:l <- s, c `elem` [' ','+'], let w:_ = words l] | 244 | commandsFromCommandsList :: [String] -> [String]
commandsFromCommandsList s =
[w | c:l <- s, c `elem` [' ','+'], let w:_ = words l] | 133 | commandsFromCommandsList s =
[w | c:l <- s, c `elem` [' ','+'], let w:_ = words l] | 84 | true | true | 0 | 10 | 44 | 75 | 41 | 34 | null | null |
meteficha/yesod | yesod-bin/main.hs | mit | optParser' :: ParserInfo Options
optParser' = info (helper <*> optParser) ( fullDesc <> header "Yesod Web Framework command line utility" ) | 139 | optParser' :: ParserInfo Options
optParser' = info (helper <*> optParser) ( fullDesc <> header "Yesod Web Framework command line utility" ) | 139 | optParser' = info (helper <*> optParser) ( fullDesc <> header "Yesod Web Framework command line utility" ) | 106 | false | true | 0 | 8 | 20 | 36 | 18 | 18 | null | null |
rfranek/duckling | Duckling/Ordinal/KO/Rules.hs | bsd-3-clause | ruleOrdinals :: Rule
ruleOrdinals = Rule
{ name = "ordinals (첫번째)"
, pattern =
[ dimension Numeral
, regex "\xbc88\xc9f8|\xc9f8(\xbc88)?"
]
, prod = \tokens -> case tokens of
(Token Numeral (NumeralData {TNumeral.value = v}):_) ->
Just . ordinal $ floor v
_ -> Nothing
} | 310 | ruleOrdinals :: Rule
ruleOrdinals = Rule
{ name = "ordinals (첫번째)"
, pattern =
[ dimension Numeral
, regex "\xbc88\xc9f8|\xc9f8(\xbc88)?"
]
, prod = \tokens -> case tokens of
(Token Numeral (NumeralData {TNumeral.value = v}):_) ->
Just . ordinal $ floor v
_ -> Nothing
} | 310 | ruleOrdinals = Rule
{ name = "ordinals (첫번째)"
, pattern =
[ dimension Numeral
, regex "\xbc88\xc9f8|\xc9f8(\xbc88)?"
]
, prod = \tokens -> case tokens of
(Token Numeral (NumeralData {TNumeral.value = v}):_) ->
Just . ordinal $ floor v
_ -> Nothing
} | 289 | false | true | 0 | 18 | 85 | 111 | 57 | 54 | null | null |
kim/amazonka | amazonka-emr/gen/Network/AWS/EMR/Types.hs | mpl-2.0 | -- | The IAM role that was specified when the job flow was launched. The EC2
-- instances of the job flow assume this role.
eiaIamInstanceProfile :: Lens' Ec2InstanceAttributes (Maybe Text)
eiaIamInstanceProfile =
lens _eiaIamInstanceProfile (\s a -> s { _eiaIamInstanceProfile = a }) | 288 | eiaIamInstanceProfile :: Lens' Ec2InstanceAttributes (Maybe Text)
eiaIamInstanceProfile =
lens _eiaIamInstanceProfile (\s a -> s { _eiaIamInstanceProfile = a }) | 164 | eiaIamInstanceProfile =
lens _eiaIamInstanceProfile (\s a -> s { _eiaIamInstanceProfile = a }) | 98 | true | true | 0 | 9 | 47 | 47 | 26 | 21 | null | null |
glhrmfrts/lusk | Lusk/Eval.hs | mit | modifyST :: LuskState -> SymbolTable -> LuskState
modifyST s st = s { symbolTable = st } | 88 | modifyST :: LuskState -> SymbolTable -> LuskState
modifyST s st = s { symbolTable = st } | 88 | modifyST s st = s { symbolTable = st } | 38 | false | true | 0 | 8 | 16 | 41 | 19 | 22 | null | null |
rockdragon/julia-programming | code/haskell/TestFS.hs | mit | fsUp :: FSZipper -> FSZipper
fsUp (item, FSCrumb name ls rs:bs) = (Folder name (ls ++ [item] ++ rs), bs) | 104 | fsUp :: FSZipper -> FSZipper
fsUp (item, FSCrumb name ls rs:bs) = (Folder name (ls ++ [item] ++ rs), bs) | 104 | fsUp (item, FSCrumb name ls rs:bs) = (Folder name (ls ++ [item] ++ rs), bs) | 75 | false | true | 0 | 11 | 19 | 66 | 33 | 33 | null | null |
Numberartificial/workflow | haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter15.hs | mit | madlibbin' :: Exclamation -> Adverb -> Noun -> Adjective -> String
madlibbin' e adv noun adj = e <> "! he said " <> adv <>
" as he jumped into his car " <> noun <> " and drove off with this " <>
adj <> " wife." | 214 | madlibbin' :: Exclamation -> Adverb -> Noun -> Adjective -> String
madlibbin' e adv noun adj = e <> "! he said " <> adv <>
" as he jumped into his car " <> noun <> " and drove off with this " <>
adj <> " wife." | 214 | madlibbin' e adv noun adj = e <> "! he said " <> adv <>
" as he jumped into his car " <> noun <> " and drove off with this " <>
adj <> " wife." | 147 | false | true | 4 | 10 | 52 | 72 | 33 | 39 | null | null |
romanb/amazonka | amazonka-cloudwatch/gen/Network/AWS/CloudWatch/Types.hs | mpl-2.0 | -- | The dimension name to be matched.
dfName :: Lens' DimensionFilter Text
dfName = lens _dfName (\s a -> s { _dfName = a }) | 125 | dfName :: Lens' DimensionFilter Text
dfName = lens _dfName (\s a -> s { _dfName = a }) | 86 | dfName = lens _dfName (\s a -> s { _dfName = a }) | 49 | true | true | 1 | 9 | 25 | 45 | 22 | 23 | null | null |
phunehehe/deepseq-bounded | src/Control/DeepSeq/Bounded/Compile.hs | bsd-3-clause | pat :: String -> (Either String Pattern, String)
--cpat _ | trace "J-1: " $ False = undefined
cpat [] = (Left "unexpected end of input", [])
| 144 | cpat :: String -> (Either String Pattern, String)
cpat [] = (Left "unexpected end of input", []) | 96 | cpat [] = (Left "unexpected end of input", []) | 46 | true | true | 0 | 7 | 30 | 43 | 23 | 20 | null | null |
shayan-najd/HsParser | OutputableInstances.hs | gpl-3.0 | boxityTupleSort :: Boxity -> TupleSort
boxityTupleSort Boxed = BoxedTuple | 75 | boxityTupleSort :: Boxity -> TupleSort
boxityTupleSort Boxed = BoxedTuple | 75 | boxityTupleSort Boxed = BoxedTuple | 36 | false | true | 0 | 7 | 10 | 24 | 10 | 14 | null | null |
oldmanmike/ghc | compiler/cmm/CmmType.hs | bsd-3-clause | cmmEqType_ignoring_ptrhood :: CmmType -> CmmType -> Bool
-- This equality is temporary; used in CmmLint
-- but the RTS files are not yet well-typed wrt pointers
cmmEqType_ignoring_ptrhood (CmmType c1 w1) (CmmType c2 w2)
= c1 `weak_eq` c2 && w1==w2
where
weak_eq :: CmmCat -> CmmCat -> Bool
FloatCat ... | 842 | cmmEqType_ignoring_ptrhood :: CmmType -> CmmType -> Bool
cmmEqType_ignoring_ptrhood (CmmType c1 w1) (CmmType c2 w2)
= c1 `weak_eq` c2 && w1==w2
where
weak_eq :: CmmCat -> CmmCat -> Bool
FloatCat `weak_eq` FloatCat = True
FloatCat `weak_eq` _other = False
_othe... | 734 | cmmEqType_ignoring_ptrhood (CmmType c1 w1) (CmmType c2 w2)
= c1 `weak_eq` c2 && w1==w2
where
weak_eq :: CmmCat -> CmmCat -> Bool
FloatCat `weak_eq` FloatCat = True
FloatCat `weak_eq` _other = False
_other `weak_eq` FloatCat = False
(VecC... | 677 | true | true | 3 | 8 | 313 | 228 | 118 | 110 | null | null |
ninedotnine/bugfree-computing-machine | src/ObjParser.hs | gpl-3.0 | addReloc :: Integer -> Info -> Info
addReloc x (Info s o lc txt r e pubs exts) = Info s o lc txt (r++[x]) e pubs exts | 117 | addReloc :: Integer -> Info -> Info
addReloc x (Info s o lc txt r e pubs exts) = Info s o lc txt (r++[x]) e pubs exts | 117 | addReloc x (Info s o lc txt r e pubs exts) = Info s o lc txt (r++[x]) e pubs exts | 81 | false | true | 0 | 10 | 27 | 76 | 37 | 39 | null | null |
robin-liu-1983/emacs-robin.d | emacs.d/elpa/flycheck-haskell-20160118.851/get-cabal-configuration.hs | mit | getSourceDirectories :: [BuildInfo] -> FilePath -> [String]
getSourceDirectories buildInfo cabalDir =
map (cabalDir </>) (concatMap hsSourceDirs buildInfo) | 159 | getSourceDirectories :: [BuildInfo] -> FilePath -> [String]
getSourceDirectories buildInfo cabalDir =
map (cabalDir </>) (concatMap hsSourceDirs buildInfo) | 159 | getSourceDirectories buildInfo cabalDir =
map (cabalDir </>) (concatMap hsSourceDirs buildInfo) | 99 | false | true | 0 | 7 | 20 | 48 | 25 | 23 | null | null |
bringert/haskell-tar | tests/Properties.hs | bsd-3-clause | prop_splitFileName_id n p = test_splitFileName (\x y -> x++y == p) n p | 70 | prop_splitFileName_id n p = test_splitFileName (\x y -> x++y == p) n p | 70 | prop_splitFileName_id n p = test_splitFileName (\x y -> x++y == p) n p | 70 | false | false | 0 | 9 | 12 | 36 | 18 | 18 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | maxShields ProtossAssimilator = 450 | 35 | maxShields ProtossAssimilator = 450 | 35 | maxShields ProtossAssimilator = 450 | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mcschroeder/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | vecRepDataConTyCon :: TyCon
vecRepDataConTyCon = promoteDataCon vecRepDataCon | 77 | vecRepDataConTyCon :: TyCon
vecRepDataConTyCon = promoteDataCon vecRepDataCon | 77 | vecRepDataConTyCon = promoteDataCon vecRepDataCon | 49 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | readPrec_RDR = varQual_RDR gHC_READ (fsLit "readPrec") | 65 | readPrec_RDR = varQual_RDR gHC_READ (fsLit "readPrec") | 65 | readPrec_RDR = varQual_RDR gHC_READ (fsLit "readPrec") | 65 | false | false | 0 | 7 | 16 | 17 | 8 | 9 | null | null |
UoYCS-plasma/LazySmallCheck2012 | suite/Functionality.hs | bsd-3-clause | insert x (y:ys) | x <= y = x : y : ys
| otherwise = y : insert x ys | 86 | insert x (y:ys) | x <= y = x : y : ys
| otherwise = y : insert x ys | 86 | insert x (y:ys) | x <= y = x : y : ys
| otherwise = y : insert x ys | 86 | false | false | 0 | 8 | 39 | 54 | 25 | 29 | null | null |
Jannis/haskell-dsp-experiments | compressor.hs | gpl-3.0 | -- |Returns the compression ratio of a compressor.
ratio :: Compressor -> Double
ratio (Compressor _ r _) = r | 109 | ratio :: Compressor -> Double
ratio (Compressor _ r _) = r | 58 | ratio (Compressor _ r _) = r | 28 | true | true | 0 | 9 | 19 | 35 | 16 | 19 | null | null |
abbradar/comps | src/Rules.hs | bsd-3-clause | removeEmpty _ a Empty = a | 25 | removeEmpty _ a Empty = a | 25 | removeEmpty _ a Empty = a | 25 | false | false | 1 | 5 | 5 | 16 | 6 | 10 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLBodyElement.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLBodyElement.onwebkitmouseforcechanged Mozilla HTMLBodyElement.onwebkitmouseforcechanged documentation>
webKitMouseForcechanged ::
EventName HTMLBodyElement onwebkitmouseforcechanged
webKitMouseForcechanged
= unsafeEventName (toJSStr... | 350 | webKitMouseForcechanged ::
EventName HTMLBodyElement onwebkitmouseforcechanged
webKitMouseForcechanged
= unsafeEventName (toJSString "webkitmouseforcechanged") | 187 | webKitMouseForcechanged
= unsafeEventName (toJSString "webkitmouseforcechanged") | 82 | true | true | 0 | 7 | 44 | 28 | 13 | 15 | null | null |
amar47shah/socket-server | app/Main.hs | bsd-3-clause | sendMessage :: Client -> Message -> STM ()
sendMessage = writeTChan . clientDM | 78 | sendMessage :: Client -> Message -> STM ()
sendMessage = writeTChan . clientDM | 78 | sendMessage = writeTChan . clientDM | 35 | false | true | 1 | 9 | 12 | 35 | 15 | 20 | null | null |
ant1441/haskell-statsd | src/Statsd/Datastore.hs | bsd-3-clause | storeCounter m = over counters $ Map.insertWith addCounter (name m) m | 73 | storeCounter m = over counters $ Map.insertWith addCounter (name m) m | 73 | storeCounter m = over counters $ Map.insertWith addCounter (name m) m | 73 | false | false | 3 | 7 | 14 | 35 | 14 | 21 | null | null |
uduki/hsQt | Qtc/Enums/Core/QChar.hs | bsd-2-clause | ieSpecialCharacter :: Int -> SpecialCharacter
ieSpecialCharacter x = QEnum (CSpecialCharacter x) | 96 | ieSpecialCharacter :: Int -> SpecialCharacter
ieSpecialCharacter x = QEnum (CSpecialCharacter x) | 96 | ieSpecialCharacter x = QEnum (CSpecialCharacter x) | 50 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Roff.hs | gpl-2.0 | parseRules ("Roff","LiteralSL") =
(currentContext >>= \x -> guard (x == ("Roff","LiteralSL")) >> pDefault >>= withAttribute NormalTok) | 136 | parseRules ("Roff","LiteralSL") =
(currentContext >>= \x -> guard (x == ("Roff","LiteralSL")) >> pDefault >>= withAttribute NormalTok) | 136 | parseRules ("Roff","LiteralSL") =
(currentContext >>= \x -> guard (x == ("Roff","LiteralSL")) >> pDefault >>= withAttribute NormalTok) | 136 | false | false | 0 | 13 | 17 | 54 | 29 | 25 | null | null |
batterseapower/chsc | Renaming.hs | bsd-3-clause | renameBinder :: IdSupply -> Renaming -> In Name -> (IdSupply, Renaming, Out Name)
renameBinder ids rn n = (ids', insertRenaming n n' rn, n')
where (ids', n') = freshName ids (name_string n) | 191 | renameBinder :: IdSupply -> Renaming -> In Name -> (IdSupply, Renaming, Out Name)
renameBinder ids rn n = (ids', insertRenaming n n' rn, n')
where (ids', n') = freshName ids (name_string n) | 191 | renameBinder ids rn n = (ids', insertRenaming n n' rn, n')
where (ids', n') = freshName ids (name_string n) | 109 | false | true | 0 | 9 | 33 | 87 | 45 | 42 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/Script/Sound.hs | mit | toLowerCase :: Sound -> Sound
toLowerCase = fmap (& letterCase .~ Lowercase) | 76 | toLowerCase :: Sound -> Sound
toLowerCase = fmap (& letterCase .~ Lowercase) | 76 | toLowerCase = fmap (& letterCase .~ Lowercase) | 46 | false | true | 0 | 7 | 11 | 26 | 14 | 12 | null | null |
jwoudenberg/elm-editor-tools | src/ElmTools/ResolveModule.hs | bsd-3-clause | elmJSONPath :: Path Rel File
elmJSONPath = $(mkRelFile "elm-package.json") | 74 | elmJSONPath :: Path Rel File
elmJSONPath = $(mkRelFile "elm-package.json") | 74 | elmJSONPath = $(mkRelFile "elm-package.json") | 45 | false | true | 0 | 8 | 8 | 29 | 12 | 17 | null | null |
neothemachine/monadiccp | src/Control/CP/FD/SearchSpec/Data.hs | bsd-3-clause | mmapSearch (LimitSolCount n a) vf af bf = do
ad <- mmapSearch a vf af bf
return (LimitSolCount n ad) | 104 | mmapSearch (LimitSolCount n a) vf af bf = do
ad <- mmapSearch a vf af bf
return (LimitSolCount n ad) | 104 | mmapSearch (LimitSolCount n a) vf af bf = do
ad <- mmapSearch a vf af bf
return (LimitSolCount n ad) | 104 | false | false | 0 | 9 | 23 | 53 | 24 | 29 | null | null |
Lykos/Sara | src/lib/Sara/Z3/Ast.hs | gpl-3.0 | substituteVars m (NaryOp op bs) = NaryOp op $ map (substituteVars m) bs | 73 | substituteVars m (NaryOp op bs) = NaryOp op $ map (substituteVars m) bs | 73 | substituteVars m (NaryOp op bs) = NaryOp op $ map (substituteVars m) bs | 73 | false | false | 0 | 8 | 14 | 37 | 17 | 20 | null | null |
bgamari/datalogger-web | DeviceList.hs | bsd-3-clause | withDeviceMap :: MonadIO m => (M.Map DeviceId Device -> DeviceListT m a) -> DeviceListT m a
withDeviceMap m = getDeviceMap >>= m | 128 | withDeviceMap :: MonadIO m => (M.Map DeviceId Device -> DeviceListT m a) -> DeviceListT m a
withDeviceMap m = getDeviceMap >>= m | 128 | withDeviceMap m = getDeviceMap >>= m | 36 | false | true | 0 | 10 | 21 | 53 | 25 | 28 | null | null |
crooney/cinder | src/Cinder/DOM.hs | bsd-3-clause | byId :: Text -> Fay Node
byId = ffi "document['getElementById'](%1)" | 68 | byId :: Text -> Fay Node
byId = ffi "document['getElementById'](%1)" | 68 | byId = ffi "document['getElementById'](%1)" | 43 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2014-07-utrecht/src/Assignment1.hs | unlicense | parsedData :: Table
parsedData = parseTable rawData | 51 | parsedData :: Table
parsedData = parseTable rawData | 51 | parsedData = parseTable rawData | 31 | false | true | 0 | 6 | 6 | 21 | 8 | 13 | null | null |
sgraf812/feed-gipeda | src/FeedGipeda/Gipeda.hs | bsd-3-clause | determineBenchmarkScript :: Repo -> IO String
determineBenchmarkScript repo = do
settingsFile <- Repo.settingsFile repo
exists <- doesFileExist settingsFile
maybeSettings <- if exists then Yaml.decodeFile settingsFile else return Nothing
return $ fromMaybe "cloben" $ do
(Yaml.Object settings) <- maybeSettin... | 659 | determineBenchmarkScript :: Repo -> IO String
determineBenchmarkScript repo = do
settingsFile <- Repo.settingsFile repo
exists <- doesFileExist settingsFile
maybeSettings <- if exists then Yaml.decodeFile settingsFile else return Nothing
return $ fromMaybe "cloben" $ do
(Yaml.Object settings) <- maybeSettin... | 659 | determineBenchmarkScript repo = do
settingsFile <- Repo.settingsFile repo
exists <- doesFileExist settingsFile
maybeSettings <- if exists then Yaml.decodeFile settingsFile else return Nothing
return $ fromMaybe "cloben" $ do
(Yaml.Object settings) <- maybeSettings
Yaml.parseMaybe (\_ -> settings .: "ben... | 613 | false | true | 0 | 13 | 112 | 120 | 56 | 64 | null | null |
sharkspeed/dororis | languages/haskell/LYHGG/9-input-and-output/3-command-line-arguments.hs | bsd-2-clause | dispatch :: [(String, [String] -> IO())]
dispatch = [ ("add", add)
, ("view", view)
, ("remove", remove)
] | 139 | dispatch :: [(String, [String] -> IO())]
dispatch = [ ("add", add)
, ("view", view)
, ("remove", remove)
] | 139 | dispatch = [ ("add", add)
, ("view", view)
, ("remove", remove)
] | 98 | false | true | 0 | 9 | 50 | 59 | 36 | 23 | null | null |
azure-satellite/scheme-parser | src/Parser.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Parsers
--
-- The Parser type is a monad. The hidden (extra) information in Parser is the
-- info about the position in the input stream, backtracking data structures,
-- etc...
--
-- Parsec parsers consume the input when they succeed. ... | 3,327 | symbol :: Parser Char
symbol = oneOf "!$%&|*+-/:<=>?@^_~" | 57 | symbol = oneOf "!$%&|*+-/:<=>?@^_~" | 35 | true | true | 0 | 6 | 699 | 97 | 83 | 14 | null | null |
beni55/texmath | tests/test-texmath.hs | gpl-2.0 | ensureFinalNewline :: String -> String
ensureFinalNewline "" = "" | 65 | ensureFinalNewline :: String -> String
ensureFinalNewline "" = "" | 65 | ensureFinalNewline "" = "" | 26 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
iambernie/tryhaskell | useful.hs | mit | f :: Float -> Float
f = \x -> x^2 | 33 | f :: Float -> Float
f = \x -> x^2 | 33 | f = \x -> x^2 | 13 | false | true | 0 | 7 | 9 | 31 | 14 | 17 | null | null |
Fermat/higher-rank | src/Matching.hs | bsd-3-clause | genImitation :: Int -> Exp -> Int -> Int -> (Exp, Int)
genImitation n head arity arity' =
let l = take arity' [n..]
lb = take arity [1..]
n' = n + arity'
hash = getName head
fvars = map (\ x -> "h" ++ show x ++ hash ++ "#") l
bvars = map (\ x -> "m" ++ show x ++ "#") lb
bvars' = m... | 568 | genImitation :: Int -> Exp -> Int -> Int -> (Exp, Int)
genImitation n head arity arity' =
let l = take arity' [n..]
lb = take arity [1..]
n' = n + arity'
hash = getName head
fvars = map (\ x -> "h" ++ show x ++ hash ++ "#") l
bvars = map (\ x -> "m" ++ show x ++ "#") lb
bvars' = m... | 568 | genImitation n head arity arity' =
let l = take arity' [n..]
lb = take arity [1..]
n' = n + arity'
hash = getName head
fvars = map (\ x -> "h" ++ show x ++ hash ++ "#") l
bvars = map (\ x -> "m" ++ show x ++ "#") lb
bvars' = map (\ x -> Var x dummyPos) bvars
args = map (\ c ... | 513 | false | true | 0 | 16 | 184 | 295 | 154 | 141 | null | null |
hguenther/nbis | TypeDesc.hs | agpl-3.0 | typeWidth pw structs (StructType (Right tps)) = sum (fmap (typeWidth pw structs) tps) | 85 | typeWidth pw structs (StructType (Right tps)) = sum (fmap (typeWidth pw structs) tps) | 85 | typeWidth pw structs (StructType (Right tps)) = sum (fmap (typeWidth pw structs) tps) | 85 | false | false | 0 | 9 | 12 | 44 | 21 | 23 | null | null |
arianvp/binary-serialise-cbor | demos/Aeson.hs | bsd-3-clause | cborToJson :: FilePath -> IO ()
cborToJson file = do
-- Ensure the extension is sane
when (takeExtension file /= ".cbor") $ do
fail "Input file expected to have .cbor extension; exiting"
bs <- LB.readFile file
case (CBOR.Read.deserialiseFromBytes decodeValue bs) of
Left err -> fail $ "deserialization e... | 478 | cborToJson :: FilePath -> IO ()
cborToJson file = do
-- Ensure the extension is sane
when (takeExtension file /= ".cbor") $ do
fail "Input file expected to have .cbor extension; exiting"
bs <- LB.readFile file
case (CBOR.Read.deserialiseFromBytes decodeValue bs) of
Left err -> fail $ "deserialization e... | 478 | cborToJson file = do
-- Ensure the extension is sane
when (takeExtension file /= ".cbor") $ do
fail "Input file expected to have .cbor extension; exiting"
bs <- LB.readFile file
case (CBOR.Read.deserialiseFromBytes decodeValue bs) of
Left err -> fail $ "deserialization error: " ++ err
Right v -> d... | 446 | false | true | 0 | 18 | 102 | 144 | 65 | 79 | null | null |
antarestrader/sapphire | Var.hs | gpl-3.0 | simple :: String -> Var
simple n = Var {name=n,varscope=[]} | 59 | simple :: String -> Var
simple n = Var {name=n,varscope=[]} | 59 | simple n = Var {name=n,varscope=[]} | 35 | false | true | 0 | 7 | 9 | 34 | 19 | 15 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.