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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sdiehl/ghc | testsuite/tests/deSugar/should_compile/T2409.hs | bsd-3-clause | f :: Int -> Int
f _ | () `seq` False = undefined
| otherwise = error "XXX" | 80 | f :: Int -> Int
f _ | () `seq` False = undefined
| otherwise = error "XXX" | 79 | f _ | () `seq` False = undefined
| otherwise = error "XXX" | 63 | false | true | 0 | 9 | 23 | 48 | 22 | 26 | null | null |
andorp/bead | src/Bead/Config.hs | bsd-3-clause | initTaskAssertions = do
eqPartitions initTasks
[ Partition "Empty config list" [] (Right []) ""
, Partition "Create admin option" ["admin"] (Right [CreateAdmin]) ""
]
assertSatisfy "Two options" isLeft (initTasks ["admin","b"]) ""
where
isLeft (Left _) = True
isLeft _ = False
... | 326 | initTaskAssertions = do
eqPartitions initTasks
[ Partition "Empty config list" [] (Right []) ""
, Partition "Create admin option" ["admin"] (Right [CreateAdmin]) ""
]
assertSatisfy "Two options" isLeft (initTasks ["admin","b"]) ""
where
isLeft (Left _) = True
isLeft _ = False
... | 326 | initTaskAssertions = do
eqPartitions initTasks
[ Partition "Empty config list" [] (Right []) ""
, Partition "Create admin option" ["admin"] (Right [CreateAdmin]) ""
]
assertSatisfy "Two options" isLeft (initTasks ["admin","b"]) ""
where
isLeft (Left _) = True
isLeft _ = False
... | 326 | false | false | 1 | 12 | 84 | 110 | 55 | 55 | null | null |
karamellpelle/MEnv | source/GUI/Widget/Output.hs | bsd-2-clause | useTex :: GUIData -> GUIState -> GLuint -> IO ()
useTex gd gs tex = do
glUniform1i (guiShadeUniUseTex $ guistateGUIShade gs) $ fI gl_TRUE
glActiveTexture gl_TEXTURE0
glBindTexture gl_TEXTURE_2D tex | 209 | useTex :: GUIData -> GUIState -> GLuint -> IO ()
useTex gd gs tex = do
glUniform1i (guiShadeUniUseTex $ guistateGUIShade gs) $ fI gl_TRUE
glActiveTexture gl_TEXTURE0
glBindTexture gl_TEXTURE_2D tex | 209 | useTex gd gs tex = do
glUniform1i (guiShadeUniUseTex $ guistateGUIShade gs) $ fI gl_TRUE
glActiveTexture gl_TEXTURE0
glBindTexture gl_TEXTURE_2D tex | 160 | false | true | 0 | 11 | 40 | 72 | 32 | 40 | null | null |
ingemaradahl/bilder | src/Compiler/Simple/ToGLSL.hs | lgpl-3.0 | expToGLSL (S.EFalse) = G.EFalse | 31 | expToGLSL (S.EFalse) = G.EFalse | 31 | expToGLSL (S.EFalse) = G.EFalse | 31 | false | false | 0 | 6 | 3 | 17 | 8 | 9 | null | null |
techno-tanoC/csl | Main.hs | mit | cArray :: Parser CSL
cArray = do
char '['
vals <- csl `sepBy` char ','
char ']'
return $ CSLArray vals | 118 | cArray :: Parser CSL
cArray = do
char '['
vals <- csl `sepBy` char ','
char ']'
return $ CSLArray vals | 118 | cArray = do
char '['
vals <- csl `sepBy` char ','
char ']'
return $ CSLArray vals | 97 | false | true | 0 | 9 | 36 | 52 | 23 | 29 | null | null |
abailly/hsgames | acquire/test/GameTest.hs | apache-2.0 | prop_reverse :: [Int] -> Bool
prop_reverse xs = xs == (reverse (reverse xs)) | 76 | prop_reverse :: [Int] -> Bool
prop_reverse xs = xs == (reverse (reverse xs)) | 76 | prop_reverse xs = xs == (reverse (reverse xs)) | 46 | false | true | 0 | 9 | 12 | 37 | 19 | 18 | null | null |
FPBrno/dht-dks | src/Data/DHT/DKS/Internal/Operation.hs | bsd-3-clause | handleLeave :: DksM ()
handleLeave = handle leaveFailure $ do
DksState
{ _lock = locked
, _predecessor = possiblyPred
, _successor = possiblySucc
} <- dksState
self <- getSelf
if
| locked -> retryLeave
-- Singleton (only node in DHT overlay) can leave on its ow... | 2,022 | handleLeave :: DksM ()
handleLeave = handle leaveFailure $ do
DksState
{ _lock = locked
, _predecessor = possiblyPred
, _successor = possiblySucc
} <- dksState
self <- getSelf
if
| locked -> retryLeave
-- Singleton (only node in DHT overlay) can leave on its ow... | 2,022 | handleLeave = handle leaveFailure $ do
DksState
{ _lock = locked
, _predecessor = possiblyPred
, _successor = possiblySucc
} <- dksState
self <- getSelf
if
| locked -> retryLeave
-- Singleton (only node in DHT overlay) can leave on its own. Note that
--... | 1,999 | false | true | 0 | 16 | 637 | 290 | 151 | 139 | null | null |
yesodweb/yesod | yesod-core/src/Yesod/Core/Dispatch.hs | mit | warp :: YesodDispatch site => Int -> site -> IO ()
warp port site = do
logger <- makeLogger site
toWaiAppLogger logger site >>= Network.Wai.Handler.Warp.runSettings (
Network.Wai.Handler.Warp.setPort port $
Network.Wai.Handler.Warp.setServerName serverValue $
Network.Wai.Handler.Warp.set... | 773 | warp :: YesodDispatch site => Int -> site -> IO ()
warp port site = do
logger <- makeLogger site
toWaiAppLogger logger site >>= Network.Wai.Handler.Warp.runSettings (
Network.Wai.Handler.Warp.setPort port $
Network.Wai.Handler.Warp.setServerName serverValue $
Network.Wai.Handler.Warp.set... | 773 | warp port site = do
logger <- makeLogger site
toWaiAppLogger logger site >>= Network.Wai.Handler.Warp.runSettings (
Network.Wai.Handler.Warp.setPort port $
Network.Wai.Handler.Warp.setServerName serverValue $
Network.Wai.Handler.Warp.setOnException (\_ e ->
when (shouldLo... | 722 | false | true | 1 | 18 | 259 | 187 | 95 | 92 | null | null |
mcschroeder/ghc | compiler/stranal/WorkWrap.hs | bsd-3-clause | wwExpr _ _ e@(Lit {}) = return e | 38 | wwExpr _ _ e@(Lit {}) = return e | 38 | wwExpr _ _ e@(Lit {}) = return e | 38 | false | false | 0 | 8 | 13 | 26 | 13 | 13 | null | null |
urbanslug/ghc | compiler/ghci/ByteCodeItbls.hs | bsd-3-clause | mkJumpToAddr :: DynFlags -> EntryFunPtr -> ItblCodes
mkJumpToAddr dflags a = case platformArch (targetPlatform dflags) of
ArchSPARC ->
-- After some consideration, we'll try this, where
-- 0x55555555 stands in for the address to jump to.
-- According to includes/rts/MachRegs.h, %g3 is very
... | 3,732 | mkJumpToAddr :: DynFlags -> EntryFunPtr -> ItblCodes
mkJumpToAddr dflags a = case platformArch (targetPlatform dflags) of
ArchSPARC ->
-- After some consideration, we'll try this, where
-- 0x55555555 stands in for the address to jump to.
-- According to includes/rts/MachRegs.h, %g3 is very
... | 3,732 | mkJumpToAddr dflags a = case platformArch (targetPlatform dflags) of
ArchSPARC ->
-- After some consideration, we'll try this, where
-- 0x55555555 stands in for the address to jump to.
-- According to includes/rts/MachRegs.h, %g3 is very
-- likely indeed to be baggable.
--
... | 3,679 | false | true | 0 | 16 | 1,585 | 644 | 357 | 287 | null | null |
siddhanathan/yi | yi-frontend-pango/src/Yi/Frontend/Pango/Layouts.hs | gpl-2.0 | layoutDisplayOnDividerMove :: LayoutDisplay
-> (DividerRef -> DividerPosition -> IO ())
-> IO ()
layoutDisplayOnDividerMove ld cb = modifyIORef (dividerCallbacks ld) (cb:) | 225 | layoutDisplayOnDividerMove :: LayoutDisplay
-> (DividerRef -> DividerPosition -> IO ())
-> IO ()
layoutDisplayOnDividerMove ld cb = modifyIORef (dividerCallbacks ld) (cb:) | 225 | layoutDisplayOnDividerMove ld cb = modifyIORef (dividerCallbacks ld) (cb:) | 74 | false | true | 0 | 11 | 74 | 60 | 30 | 30 | null | null |
DougBurke/swish | tests/RDFRulesetTest.hs | lgpl-2.1 | -- Common prefix declarations for graph expressions
mkPrefix :: Namespace -> B.Builder
mkPrefix = namespaceToBuilder | 117 | mkPrefix :: Namespace -> B.Builder
mkPrefix = namespaceToBuilder | 64 | mkPrefix = namespaceToBuilder | 29 | true | true | 0 | 8 | 15 | 25 | 11 | 14 | null | null |
thasenpusch/scheme | main.hs | isc | main :: IO ()
main = do
args <- getArgs
case args of
[] -> schemeBaseLib >>= \a -> evalStateT repl [a]
(path:_) -> do
contents <- readFile path
case evalStateT Parser.lex contents of
Left y -> putStrLn y
Right y -> case evalStateT parseProg... | 428 | main :: IO ()
main = do
args <- getArgs
case args of
[] -> schemeBaseLib >>= \a -> evalStateT repl [a]
(path:_) -> do
contents <- readFile path
case evalStateT Parser.lex contents of
Left y -> putStrLn y
Right y -> case evalStateT parseProg... | 428 | main = do
args <- getArgs
case args of
[] -> schemeBaseLib >>= \a -> evalStateT repl [a]
(path:_) -> do
contents <- readFile path
case evalStateT Parser.lex contents of
Left y -> putStrLn y
Right y -> case evalStateT parseProgram y of
... | 414 | false | true | 0 | 20 | 179 | 158 | 73 | 85 | null | null |
tjakway/ghcjvm | compiler/hsSyn/HsDecls.hs | bsd-3-clause | tyFamInstDeclLName :: TyFamInstDecl name -> Located name
tyFamInstDeclLName (TyFamInstDecl { tfid_eqn =
(L _ (TyFamEqn { tfe_tycon = ln })) })
= ln | 170 | tyFamInstDeclLName :: TyFamInstDecl name -> Located name
tyFamInstDeclLName (TyFamInstDecl { tfid_eqn =
(L _ (TyFamEqn { tfe_tycon = ln })) })
= ln | 170 | tyFamInstDeclLName (TyFamInstDecl { tfid_eqn =
(L _ (TyFamEqn { tfe_tycon = ln })) })
= ln | 113 | false | true | 0 | 15 | 45 | 56 | 29 | 27 | null | null |
DATx02-16-14/ChineseCheckers | src/ChineseGraphics.hs | bsd-3-clause | drawSquare :: Double -> Double -> Square -> Picture ()
drawSquare space size (Square (Piece color) _ (x,y)) = do
setFillColor color
fill $ circle (size*fromIntegral x + space*fromIntegral (x+5),size* fromIntegral y+space* fromIntegral (y+5)) size | 254 | drawSquare :: Double -> Double -> Square -> Picture ()
drawSquare space size (Square (Piece color) _ (x,y)) = do
setFillColor color
fill $ circle (size*fromIntegral x + space*fromIntegral (x+5),size* fromIntegral y+space* fromIntegral (y+5)) size | 254 | drawSquare space size (Square (Piece color) _ (x,y)) = do
setFillColor color
fill $ circle (size*fromIntegral x + space*fromIntegral (x+5),size* fromIntegral y+space* fromIntegral (y+5)) size | 199 | false | true | 0 | 14 | 42 | 136 | 65 | 71 | null | null |
brow/noise | tests/Text/Noise/Compiler/Builtin/Test.hs | mit | test_empty_path = assertOutputElement
D.path { D.commands = [] }
[s|shape.path|] | 84 | test_empty_path = assertOutputElement
D.path { D.commands = [] }
[s|shape.path|] | 84 | test_empty_path = assertOutputElement
D.path { D.commands = [] }
[s|shape.path|] | 84 | false | false | 0 | 7 | 13 | 30 | 17 | 13 | null | null |
ruben2020/small-haskell-proj | sudoku_solver/sudsolv.hs | mit | countPossib pzl = (length (tail (head pzl))) + (countPossib (tail pzl)) | 71 | countPossib pzl = (length (tail (head pzl))) + (countPossib (tail pzl)) | 71 | countPossib pzl = (length (tail (head pzl))) + (countPossib (tail pzl)) | 71 | false | false | 1 | 11 | 10 | 47 | 21 | 26 | null | null |
jfischoff/opengl-eval | src/OpenGL/Evaluator/HaskellOpenGLFunctionsTH.hs | bsd-3-clause | make_r_command = make_g_command "R" | 35 | make_r_command = make_g_command "R" | 35 | make_r_command = make_g_command "R" | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
expipiplus1/vulkan | generate-new/vk/VK/Bracket.hs | bsd-3-clause | withDescriptorSets :: Bracket
withDescriptorSets = Bracket
{ bInnerTypes = [Vector NotNullable (Normal (TypeName "VkDescriptorSet"))]
, bWrapperName = "vkWithDescriptorSets"
, bCreate = "vkAllocateDescriptorSets"
, bDestroy = "vkFreeDescriptorSets"
, bCreateArguments =
... | 822 | withDescriptorSets :: Bracket
withDescriptorSets = Bracket
{ bInnerTypes = [Vector NotNullable (Normal (TypeName "VkDescriptorSet"))]
, bWrapperName = "vkWithDescriptorSets"
, bCreate = "vkAllocateDescriptorSets"
, bDestroy = "vkFreeDescriptorSets"
, bCreateArguments =
... | 822 | withDescriptorSets = Bracket
{ bInnerTypes = [Vector NotNullable (Normal (TypeName "VkDescriptorSet"))]
, bWrapperName = "vkWithDescriptorSets"
, bCreate = "vkAllocateDescriptorSets"
, bDestroy = "vkFreeDescriptorSets"
, bCreateArguments =
[ Provided "device" (N... | 792 | false | true | 0 | 13 | 241 | 169 | 93 | 76 | null | null |
julienschmaltz/madl | src/Madl/Network.hs | mit | -- End of error function
-------------------------
-- Transfer Order
-------------------------
-- | Get the transfer order for a network
transferOrder :: forall a b . MayBeQueue a => Network a b -> [ComponentID]
transferOrder = (map fst) . topsort' . removeQueueInputPorts . componentGraph . numberComponents where
... | 425 | transferOrder :: forall a b . MayBeQueue a => Network a b -> [ComponentID]
transferOrder = (map fst) . topsort' . removeQueueInputPorts . componentGraph . numberComponents where
numberComponents = mapOnComponentsWithID (\i x -> (i, x))
-- | Remove the incoming channels from queues | 286 | transferOrder = (map fst) . topsort' . removeQueueInputPorts . componentGraph . numberComponents where
numberComponents = mapOnComponentsWithID (\i x -> (i, x))
-- | Remove the incoming channels from queues | 211 | true | true | 2 | 10 | 68 | 101 | 52 | 49 | null | null |
nadavshemer/buildsome | src/Lib/PriorityQueue.hs | gpl-2.0 | dequeue :: PriorityQueue a -> Maybe (PriorityQueue a, (Priority, a))
dequeue (PriorityQueue priorities) =
f <$> Map.maxViewWithKey priorities
where
f ((priority, fifo), prioritiesWithoutMax) =
case Fifo.dequeue fifo of
Nothing -> error "Empty fifo inside map!"
Just (fifo', x) ->
(Prior... | 508 | dequeue :: PriorityQueue a -> Maybe (PriorityQueue a, (Priority, a))
dequeue (PriorityQueue priorities) =
f <$> Map.maxViewWithKey priorities
where
f ((priority, fifo), prioritiesWithoutMax) =
case Fifo.dequeue fifo of
Nothing -> error "Empty fifo inside map!"
Just (fifo', x) ->
(Prior... | 508 | dequeue (PriorityQueue priorities) =
f <$> Map.maxViewWithKey priorities
where
f ((priority, fifo), prioritiesWithoutMax) =
case Fifo.dequeue fifo of
Nothing -> error "Empty fifo inside map!"
Just (fifo', x) ->
(PriorityQueue priorities', (priority, x))
where
prioriti... | 439 | false | true | 2 | 14 | 132 | 167 | 82 | 85 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE :: Int
wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE = 0x00002000 | 101 | wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE :: Int
wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE = 0x00002000 | 101 | wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE = 0x00002000 | 53 | false | true | 0 | 4 | 11 | 11 | 6 | 5 | null | null |
urbanslug/ghc | compiler/prelude/THNames.hs | bsd-3-clause | -- data Type = ...
forallTName, varTName, conTName, tupleTName, unboxedTupleTName, arrowTName,
listTName, appTName, sigTName, equalityTName, litTName,
promotedTName, promotedTupleTName,
promotedNilTName, promotedConsTName :: Name
forallTName = libFun (fsLit "forallT") forallTIdKey | 308 | forallTName, varTName, conTName, tupleTName, unboxedTupleTName, arrowTName,
listTName, appTName, sigTName, equalityTName, litTName,
promotedTName, promotedTupleTName,
promotedNilTName, promotedConsTName :: Name
forallTName = libFun (fsLit "forallT") forallTIdKey | 289 | forallTName = libFun (fsLit "forallT") forallTIdKey | 66 | true | true | 7 | 7 | 54 | 67 | 40 | 27 | null | null |
haskellbr/missingh | missingh-all/src/System/Time/Utils.hs | mit | clockTimeToEpoch :: Num a => ClockTime -> a
clockTimeToEpoch (TOD sec _) = fromInteger sec | 90 | clockTimeToEpoch :: Num a => ClockTime -> a
clockTimeToEpoch (TOD sec _) = fromInteger sec | 90 | clockTimeToEpoch (TOD sec _) = fromInteger sec | 46 | false | true | 0 | 7 | 14 | 36 | 17 | 19 | null | null |
int-index/singletons | src/Data/Singletons/Util.hs | bsd-3-clause | -- apply a type to a list of types
foldType :: DType -> [DType] -> DType
foldType = foldl DAppT | 95 | foldType :: DType -> [DType] -> DType
foldType = foldl DAppT | 60 | foldType = foldl DAppT | 22 | true | true | 0 | 8 | 19 | 33 | 15 | 18 | null | null |
garetxe/cabal | Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | commaSep :: [String] -> String
commaSep = intercalate ", " | 58 | commaSep :: [String] -> String
commaSep = intercalate ", " | 58 | commaSep = intercalate ", " | 27 | false | true | 0 | 6 | 9 | 21 | 11 | 10 | null | null |
ocharles/virtual-dom | src/VirtualDom/HTML.hs | bsd-3-clause | a_ :: (Term arg result) => arg -> result
a_ = term "a" | 54 | a_ :: (Term arg result) => arg -> result
a_ = term "a" | 54 | a_ = term "a" | 13 | false | true | 0 | 8 | 12 | 36 | 16 | 20 | null | null |
Philonous/pontarius-xmpp | source/Network/Xmpp/Stream.hs | bsd-3-clause | closeStreams' :: StateT StreamState IO ()
closeStreams' = do
lift $ debugM "Pontarius.Xmpp" "Closing stream"
send <- gets (streamSend . streamHandle)
cc <- gets (streamClose . streamHandle)
lift $ debugM "Pontarius.Xmpp" "Sending closing tag"
void . liftIO $ send "</stream:stream>"
lift $ debugM... | 1,310 | closeStreams' :: StateT StreamState IO ()
closeStreams' = do
lift $ debugM "Pontarius.Xmpp" "Closing stream"
send <- gets (streamSend . streamHandle)
cc <- gets (streamClose . streamHandle)
lift $ debugM "Pontarius.Xmpp" "Sending closing tag"
void . liftIO $ send "</stream:stream>"
lift $ debugM... | 1,310 | closeStreams' = do
lift $ debugM "Pontarius.Xmpp" "Closing stream"
send <- gets (streamSend . streamHandle)
cc <- gets (streamClose . streamHandle)
lift $ debugM "Pontarius.Xmpp" "Sending closing tag"
void . liftIO $ send "</stream:stream>"
lift $ debugM "Pontarius.Xmpp" "Waiting for stream to c... | 1,268 | false | true | 0 | 15 | 327 | 198 | 99 | 99 | null | null |
bixuanzju/fcore | lib/archive/BaseTransCFJavaNew.hs | bsd-2-clause | javaType' this typ =
case typ of
(JClass c) -> return $ classTy c
(Pi _ s) -> do
closureClass <- liftM2 (++) (getPrefix this) (return "Closure")
return (classTy closureClass)
(TupleType tuple) ->
case tuple of
[t] -> javaType this t
_ -> return $ classTy $ getTupleClass... | 357 | javaType' this typ =
case typ of
(JClass c) -> return $ classTy c
(Pi _ s) -> do
closureClass <- liftM2 (++) (getPrefix this) (return "Closure")
return (classTy closureClass)
(TupleType tuple) ->
case tuple of
[t] -> javaType this t
_ -> return $ classTy $ getTupleClass... | 357 | javaType' this typ =
case typ of
(JClass c) -> return $ classTy c
(Pi _ s) -> do
closureClass <- liftM2 (++) (getPrefix this) (return "Closure")
return (classTy closureClass)
(TupleType tuple) ->
case tuple of
[t] -> javaType this t
_ -> return $ classTy $ getTupleClass... | 357 | false | false | 0 | 13 | 106 | 145 | 69 | 76 | null | null |
ajnsit/react-flux | src/React/Flux/DOM.hs | bsd-3-clause | h6_ :: Term eventHandler arg result => arg -> result; h6_ = term "h6" | 69 | h6_ :: Term eventHandler arg result => arg -> result
h6_ = term "h6" | 68 | h6_ = term "h6" | 15 | false | true | 0 | 6 | 13 | 30 | 15 | 15 | null | null |
lambdageek/insomnia | src/Insomnia/Typecheck/TypeDefn.hs | bsd-3-clause | kofDataDefn :: DataDefn -> TC Kind
kofDataDefn bnd =
U.lunbind bnd $ \(tvks, _) -> return $ kArrs (map snd tvks) KType | 120 | kofDataDefn :: DataDefn -> TC Kind
kofDataDefn bnd =
U.lunbind bnd $ \(tvks, _) -> return $ kArrs (map snd tvks) KType | 120 | kofDataDefn bnd =
U.lunbind bnd $ \(tvks, _) -> return $ kArrs (map snd tvks) KType | 85 | false | true | 0 | 10 | 23 | 58 | 29 | 29 | null | null |
stuartnelson3/molecule-weight | haskell/src/Peptide.hs | mit | aminoAcidWeight "h" = 137.06 | 31 | aminoAcidWeight "h" = 137.06 | 31 | aminoAcidWeight "h" = 137.06 | 31 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
mxswd/rss-buffer | server.hs | bsd-3-clause | mkContent :: Content -> String
mkContent (Elem e@(Element (QName "img" _ _) at cxs _)) = "" | 140 | mkContent :: Content -> String
mkContent (Elem e@(Element (QName "img" _ _) at cxs _)) = "" | 140 | mkContent (Elem e@(Element (QName "img" _ _) at cxs _)) = "" | 109 | false | true | 2 | 13 | 28 | 82 | 38 | 44 | null | null |
spechub/Hets | CspCASLProver/Consts.hs | gpl-2.0 | -- | Type for CspCASLProver's datatype of process names
procNameType :: Typ
procNameType = Type {typeId = procNameS,
typeSort = [],
typeArgs = []} | 188 | procNameType :: Typ
procNameType = Type {typeId = procNameS,
typeSort = [],
typeArgs = []} | 132 | procNameType = Type {typeId = procNameS,
typeSort = [],
typeArgs = []} | 112 | true | true | 0 | 7 | 65 | 36 | 22 | 14 | null | null |
rueshyna/gogol | gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Types/List.hs | mpl-2.0 | -- | Sets a filter expression for filtering listed resources, in the form
-- filter={expression}. Your {expression} must be in the format: field_name
-- comparison_string literal_string. The field_name is the name of the
-- field you want to compare. Only atomic field types are supported
-- (string, number, boolean). T... | 1,494 | tlFilter :: Lens' TypesList (Maybe Text)
tlFilter = lens _tlFilter (\ s a -> s{_tlFilter = a}) | 94 | tlFilter = lens _tlFilter (\ s a -> s{_tlFilter = a}) | 53 | true | true | 0 | 9 | 239 | 65 | 44 | 21 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetUsageExportBucket.hs | mpl-2.0 | -- | Project ID for this request.
psuebProject :: Lens' ProjectsSetUsageExportBucket Text
psuebProject
= lens _psuebProject (\ s a -> s{_psuebProject = a}) | 157 | psuebProject :: Lens' ProjectsSetUsageExportBucket Text
psuebProject
= lens _psuebProject (\ s a -> s{_psuebProject = a}) | 123 | psuebProject
= lens _psuebProject (\ s a -> s{_psuebProject = a}) | 67 | true | true | 1 | 9 | 24 | 44 | 22 | 22 | null | null |
NicolasDP/maild | Data/MailStorage.hs | bsd-3-clause | -- | check if a domain is in the list of managed domains
isSupportedDomain :: MailStorage -> Domain -> IO Bool
isSupportedDomain ms d =
let domains = domainsDir ms
domain = domains </> d
in doesDirectoryExist domain | 232 | isSupportedDomain :: MailStorage -> Domain -> IO Bool
isSupportedDomain ms d =
let domains = domainsDir ms
domain = domains </> d
in doesDirectoryExist domain | 175 | isSupportedDomain ms d =
let domains = domainsDir ms
domain = domains </> d
in doesDirectoryExist domain | 121 | true | true | 0 | 9 | 54 | 54 | 26 | 28 | null | null |
sopvop/cabal | Cabal/Distribution/Simple/Program.hs | bsd-3-clause | -- | Runs the given configured program.
runProgram :: Verbosity -- ^Verbosity
-> ConfiguredProgram -- ^The program to run
-> [ProgArg] -- ^Any /extra/ arguments to add
-> IO ()
runProgram verbosity prog args =
runProgramInvocation verbosity (programInvocation prog a... | 324 | runProgram :: Verbosity -- ^Verbosity
-> ConfiguredProgram -- ^The program to run
-> [ProgArg] -- ^Any /extra/ arguments to add
-> IO ()
runProgram verbosity prog args =
runProgramInvocation verbosity (programInvocation prog args) | 284 | runProgram verbosity prog args =
runProgramInvocation verbosity (programInvocation prog args) | 95 | true | true | 0 | 10 | 93 | 60 | 30 | 30 | null | null |
atsukotakahashi/wi | src/library/Yi/Mode/JavaScript.hs | gpl-2.0 | javaScriptMode :: Mode (Tree TT)
javaScriptMode = javaScriptAbstract
{ modeIndent = jsSimpleIndent
, modeHL = ExtHL $ mkHighlighter (scanner parse . jsLexer)
, modeGetStrokes = getStrokes
} | 197 | javaScriptMode :: Mode (Tree TT)
javaScriptMode = javaScriptAbstract
{ modeIndent = jsSimpleIndent
, modeHL = ExtHL $ mkHighlighter (scanner parse . jsLexer)
, modeGetStrokes = getStrokes
} | 197 | javaScriptMode = javaScriptAbstract
{ modeIndent = jsSimpleIndent
, modeHL = ExtHL $ mkHighlighter (scanner parse . jsLexer)
, modeGetStrokes = getStrokes
} | 164 | false | true | 0 | 12 | 34 | 61 | 32 | 29 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/OpCodes.hs | bsd-2-clause | opSummaryVal OpInstanceMove { opInstanceName = s } = Just s | 59 | opSummaryVal OpInstanceMove { opInstanceName = s } = Just s | 59 | opSummaryVal OpInstanceMove { opInstanceName = s } = Just s | 59 | false | false | 0 | 8 | 9 | 21 | 10 | 11 | null | null |
thalerjonathan/phd | coding/prototyping/haskell/HerosAndCowards/src/HACAgent.hs | gpl-3.0 | subPos :: AgentPosition -> AgentPosition -> AgentPosition
subPos (x1, y1) (x2, y2) = (x1-x2, y1-y2) | 99 | subPos :: AgentPosition -> AgentPosition -> AgentPosition
subPos (x1, y1) (x2, y2) = (x1-x2, y1-y2) | 99 | subPos (x1, y1) (x2, y2) = (x1-x2, y1-y2) | 41 | false | true | 0 | 9 | 14 | 56 | 29 | 27 | null | null |
ariep/psqueues | src/Data/HashPSQ/Internal.hs | bsd-3-clause | minView
:: (Hashable k, Ord k, Ord p)
=> HashPSQ k p v -> Maybe (k, p, v, HashPSQ k p v)
minView (HashPSQ ipsq ) =
case IntPSQ.alterMin f ipsq of
(Nothing , _ ) -> Nothing
(Just (k, p, x), ipsq') -> Just (k, p, x, HashPSQ ipsq')
where
f Nothing = (Nothing, Noth... | 769 | minView
:: (Hashable k, Ord k, Ord p)
=> HashPSQ k p v -> Maybe (k, p, v, HashPSQ k p v)
minView (HashPSQ ipsq ) =
case IntPSQ.alterMin f ipsq of
(Nothing , _ ) -> Nothing
(Just (k, p, x), ipsq') -> Just (k, p, x, HashPSQ ipsq')
where
f Nothing = (Nothing, Noth... | 769 | minView (HashPSQ ipsq ) =
case IntPSQ.alterMin f ipsq of
(Nothing , _ ) -> Nothing
(Just (k, p, x), ipsq') -> Just (k, p, x, HashPSQ ipsq')
where
f Nothing = (Nothing, Nothing)
f (Just (h, p, B k x os)) = case OrdPSQ.minView os of
Nothing ->
... | 672 | false | true | 0 | 11 | 227 | 284 | 155 | 129 | null | null |
shuhei/wv | src/Word2Vec.hs | bsd-3-clause | wordVector :: HM.HashMap String Int -> Matrix Double -> String -> Vector Double
wordVector w2i i2h = (i2h M.!) . (w2i HM.!) | 123 | wordVector :: HM.HashMap String Int -> Matrix Double -> String -> Vector Double
wordVector w2i i2h = (i2h M.!) . (w2i HM.!) | 123 | wordVector w2i i2h = (i2h M.!) . (w2i HM.!) | 43 | false | true | 0 | 8 | 21 | 57 | 29 | 28 | null | null |
ekmett/ghc | utils/genapply/GenApply.hs | bsd-3-clause | mkTagStmt tag = text ("R1 = R1 + "++ show tag) | 46 | mkTagStmt tag = text ("R1 = R1 + "++ show tag) | 46 | mkTagStmt tag = text ("R1 = R1 + "++ show tag) | 46 | false | false | 0 | 8 | 10 | 22 | 10 | 12 | null | null |
tweag/network-transport-zeromq | benchmarks/subparts/JustPingTwoSocketPairs.hs | bsd-3-clause | passive :: Maybe AddrInfo
passive = Just (defaultHints { addrFlags = [AI_PASSIVE] }) | 84 | passive :: Maybe AddrInfo
passive = Just (defaultHints { addrFlags = [AI_PASSIVE] }) | 84 | passive = Just (defaultHints { addrFlags = [AI_PASSIVE] }) | 58 | false | true | 0 | 9 | 12 | 31 | 17 | 14 | null | null |
markuspf/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | pureTerm _ = True | 17 | pureTerm _ = True | 17 | pureTerm _ = True | 17 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
dmalikov/lambdabot | Plugin/Babel.hs | mit | supportedLangs :: [([Char], [Char])]
supportedLangs =
[("german", "de")
,("greek", "el")
,("english", "en")
,("spanish", "es")
,("french", "fr")
,("italian", "it")
,("dutch", "nl")
,("portuguese", "pt")
-- ("japanese", "ja")
-- ("korean", "ko")
-- ("russian", "ru")
-- ("chinese-s... | 366 | supportedLangs :: [([Char], [Char])]
supportedLangs =
[("german", "de")
,("greek", "el")
,("english", "en")
,("spanish", "es")
,("french", "fr")
,("italian", "it")
,("dutch", "nl")
,("portuguese", "pt")
-- ("japanese", "ja")
-- ("korean", "ko")
-- ("russian", "ru")
-- ("chinese-s... | 366 | supportedLangs =
[("german", "de")
,("greek", "el")
,("english", "en")
,("spanish", "es")
,("french", "fr")
,("italian", "it")
,("dutch", "nl")
,("portuguese", "pt")
-- ("japanese", "ja")
-- ("korean", "ko")
-- ("russian", "ru")
-- ("chinese-simp", "zh")
-- ("chinese-trad", "zt... | 329 | false | true | 0 | 7 | 84 | 103 | 69 | 34 | null | null |
nkartashov/htestu | app/TestGen.hs | mit | runSmallCrushStd :: IO [TestResult]
runSmallCrushStd = runCrush c_smallCrush newStdGen | 86 | runSmallCrushStd :: IO [TestResult]
runSmallCrushStd = runCrush c_smallCrush newStdGen | 86 | runSmallCrushStd = runCrush c_smallCrush newStdGen | 50 | false | true | 0 | 7 | 8 | 28 | 12 | 16 | null | null |
xu-hao/QueryArrow | QueryArrow-db-filesystem/src/QueryArrow/FileSystem/Interpreter.hs | bsd-3-clause | localInterpreter2 (L2MoveFile (a) (b)) = do
(host, root) <- ask
let absp = toAP root a
let abspb = toAP root b
liftIO $ renameFile absp abspb | 153 | localInterpreter2 (L2MoveFile (a) (b)) = do
(host, root) <- ask
let absp = toAP root a
let abspb = toAP root b
liftIO $ renameFile absp abspb | 153 | localInterpreter2 (L2MoveFile (a) (b)) = do
(host, root) <- ask
let absp = toAP root a
let abspb = toAP root b
liftIO $ renameFile absp abspb | 153 | false | false | 0 | 10 | 38 | 76 | 36 | 40 | null | null |
mrmonday/Idris-dev | src/IRTS/Lang.hs | bsd-3-clause | lambdaLift n x = [(n, x)] | 25 | lambdaLift n x = [(n, x)] | 25 | lambdaLift n x = [(n, x)] | 25 | false | false | 0 | 6 | 5 | 20 | 11 | 9 | null | null |
akc/gfscript | HOPS/GF.hs | bsd-3-clause | evalName :: KnownNat n => Name -> Env n -> [Series n] -> Series n
evalName t env ss =
case lookupTransform t of
Nothing -> case ss of
[s] -> fromMaybe nil (lookupVar t env) `o` s
_ -> nil
Just (Transform k f) -> if length ss == k then f ss else nil | 294 | evalName :: KnownNat n => Name -> Env n -> [Series n] -> Series n
evalName t env ss =
case lookupTransform t of
Nothing -> case ss of
[s] -> fromMaybe nil (lookupVar t env) `o` s
_ -> nil
Just (Transform k f) -> if length ss == k then f ss else nil | 294 | evalName t env ss =
case lookupTransform t of
Nothing -> case ss of
[s] -> fromMaybe nil (lookupVar t env) `o` s
_ -> nil
Just (Transform k f) -> if length ss == k then f ss else nil | 228 | false | true | 0 | 14 | 101 | 135 | 66 | 69 | null | null |
joehillen/aura | src/Aura/Utils/Numbers.hs | gpl-3.0 | revision :: Parser Int
revision = char '-' *> pure asInt <*> many1 digit | 72 | revision :: Parser Int
revision = char '-' *> pure asInt <*> many1 digit | 72 | revision = char '-' *> pure asInt <*> many1 digit | 49 | false | true | 0 | 7 | 13 | 31 | 14 | 17 | null | null |
a143753/AOJ | 0062.hs | apache-2.0 | ans (x:[]) = x | 14 | ans (x:[]) = x | 14 | ans (x:[]) = x | 14 | false | false | 0 | 8 | 3 | 18 | 9 | 9 | null | null |
konn/pandoc-japanese-docx | src/Text/Pandoc/Readers/Docx/Parse.hs | gpl-2.0 | getBlockQuote _ _ = Nothing | 27 | getBlockQuote _ _ = Nothing | 27 | getBlockQuote _ _ = Nothing | 27 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
yohad/OWTeamQueue | app/Main.hs | bsd-3-clause | teamForm :: Html -> MForm Handler (FormResult [Role], Widget)
teamForm = renderTable teamAForm | 94 | teamForm :: Html -> MForm Handler (FormResult [Role], Widget)
teamForm = renderTable teamAForm | 94 | teamForm = renderTable teamAForm | 32 | false | true | 0 | 9 | 12 | 35 | 18 | 17 | null | null |
ttoe/diffeq-hs | src/CortezWeitz.Continuous.hs | bsd-3-clause | da x y a b = (1/e) * aa a * (diff s a * (1 - x/ k a) + diff (`g` b) a * (y / (1 + h*x))) | 88 | da x y a b = (1/e) * aa a * (diff s a * (1 - x/ k a) + diff (`g` b) a * (y / (1 + h*x))) | 88 | da x y a b = (1/e) * aa a * (diff s a * (1 - x/ k a) + diff (`g` b) a * (y / (1 + h*x))) | 88 | false | false | 0 | 12 | 30 | 98 | 50 | 48 | null | null |
mhuesch/scheme_compiler | src/L5ToL4/Compile.hs | bsd-3-clause | renamePass env (L5.If tst thn els) = do
[tst_r,thn_r,els_r] <- mapM (renamePass env) [tst,thn,els]
return $ L5.If tst_r thn_r els_r | 139 | renamePass env (L5.If tst thn els) = do
[tst_r,thn_r,els_r] <- mapM (renamePass env) [tst,thn,els]
return $ L5.If tst_r thn_r els_r | 139 | renamePass env (L5.If tst thn els) = do
[tst_r,thn_r,els_r] <- mapM (renamePass env) [tst,thn,els]
return $ L5.If tst_r thn_r els_r | 139 | false | false | 0 | 10 | 27 | 75 | 38 | 37 | null | null |
blajzer/dib | src/Dib/Scanners/CDepScanner.hs | mit | spiderLauncher :: forall (m :: * -> *).(MonadIO m, MonadState ParseState m) => FilePath -> m ()
spiderLauncher file = do
contents <- liftIO $ readFile file
let deps = gatherDependencies contents
mapM_ spider deps
return () | 230 | spiderLauncher :: forall (m :: * -> *).(MonadIO m, MonadState ParseState m) => FilePath -> m ()
spiderLauncher file = do
contents <- liftIO $ readFile file
let deps = gatherDependencies contents
mapM_ spider deps
return () | 230 | spiderLauncher file = do
contents <- liftIO $ readFile file
let deps = gatherDependencies contents
mapM_ spider deps
return () | 134 | false | true | 0 | 10 | 44 | 97 | 46 | 51 | null | null |
aaronvargo/htut | src/Tut/Ghci.hs | bsd-3-clause | nullCallback
:: Monad m
=> b -> b1 -> m ()
nullCallback = const . const $ return () | 87 | nullCallback
:: Monad m
=> b -> b1 -> m ()
nullCallback = const . const $ return () | 87 | nullCallback = const . const $ return () | 40 | false | true | 0 | 9 | 22 | 47 | 22 | 25 | null | null |
TomMD/ghc | compiler/main/HscTypes.hs | bsd-3-clause | numToTrustInfo 4 = setSafeMode Sf_Safe | 38 | numToTrustInfo 4 = setSafeMode Sf_Safe | 38 | numToTrustInfo 4 = setSafeMode Sf_Safe | 38 | false | false | 1 | 5 | 4 | 15 | 5 | 10 | null | null |
markflorisson/hpack | testrepo/bytestring-0.10.2.0/Data/ByteString/Builder/Prim/ASCII.hs | bsd-3-clause | int64Dec :: BoundedPrim Int64
int64Dec = boundedEncoding 20 $ c_long_long_int_dec . fromIntegral | 96 | int64Dec :: BoundedPrim Int64
int64Dec = boundedEncoding 20 $ c_long_long_int_dec . fromIntegral | 96 | int64Dec = boundedEncoding 20 $ c_long_long_int_dec . fromIntegral | 66 | false | true | 0 | 7 | 11 | 25 | 12 | 13 | null | null |
ndmitchell/hlint | src/Config/Type.hs | bsd-3-clause | getRestrictType "extensions" = Just RestrictExtension | 53 | getRestrictType "extensions" = Just RestrictExtension | 53 | getRestrictType "extensions" = Just RestrictExtension | 53 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
iand675/hs-zfs | src/ZFS.hs | bsd-3-clause | destroy :: ZFSHandle -> Defer -> IO Z.ZFSError
destroy = zfs_destroy | 68 | destroy :: ZFSHandle -> Defer -> IO Z.ZFSError
destroy = zfs_destroy | 68 | destroy = zfs_destroy | 21 | false | true | 0 | 8 | 10 | 24 | 12 | 12 | null | null |
Lateks/gol | src/GameState.hs | mit | pause :: GameState -> GameState
pause s = s { mode = Paused } | 61 | pause :: GameState -> GameState
pause s = s { mode = Paused } | 61 | pause s = s { mode = Paused } | 29 | false | true | 0 | 7 | 13 | 35 | 16 | 19 | null | null |
xenog/haskoin | src/Network/Haskoin/Transaction/Builder.hs | unlicense | signTx :: Tx -- ^ Transaction to sign
-> [SigInput] -- ^ SigInput signing parameters
-> [PrvKey] -- ^ List of private keys to use for signing
-> Either String Tx -- ^ Signed transaction
signTx otx sigis allKeys
| null ti = Left "signTx: Transaction has no inputs"
... | 615 | signTx :: Tx -- ^ Transaction to sign
-> [SigInput] -- ^ SigInput signing parameters
-> [PrvKey] -- ^ List of private keys to use for signing
-> Either String Tx
signTx otx sigis allKeys
| null ti = Left "signTx: Transaction has no inputs"
| otherwise = foldM g... | 591 | signTx otx sigis allKeys
| null ti = Left "signTx: Transaction has no inputs"
| otherwise = foldM go otx $ findSigInput sigis ti
where
ti = txIn otx
go tx (sigi@(SigInput so _ _ _ rdmM), i) = do
keys <- sigKeys so rdmM allKeys
foldM (\t k -> signInput t i sigi k) tx keys
-- | Sign a... | 380 | true | true | 1 | 11 | 188 | 167 | 83 | 84 | null | null |
haskell-distributed/distributed-process-tests | src/Control/Distributed/Process/Tests/CH.hs | bsd-3-clause | testExitLocal :: TestTransport -> Assertion
testExitLocal TestTransport{..} = do
localNode <- newLocalNode testTransport initRemoteTable
supervisedDone <- newEmptyMVar
supervisorDone <- newEmptyMVar
-- XXX: we guarantee that exception handler will be set up
-- regardless if forkProcess preserve masking state ... | 1,012 | testExitLocal :: TestTransport -> Assertion
testExitLocal TestTransport{..} = do
localNode <- newLocalNode testTransport initRemoteTable
supervisedDone <- newEmptyMVar
supervisorDone <- newEmptyMVar
-- XXX: we guarantee that exception handler will be set up
-- regardless if forkProcess preserve masking state ... | 1,012 | testExitLocal TestTransport{..} = do
localNode <- newLocalNode testTransport initRemoteTable
supervisedDone <- newEmptyMVar
supervisorDone <- newEmptyMVar
-- XXX: we guarantee that exception handler will be set up
-- regardless if forkProcess preserve masking state or not.
handlerSetUp <- newEmptyMVar
pi... | 968 | false | true | 0 | 17 | 213 | 241 | 110 | 131 | null | null |
ksaveljev/hake-2 | src/Game/GameSpawn.hs | bsd-3-clause | spTargetGoal :: EntThink
spTargetGoal =
GenericEntThink "SP_target_goal" $ \edictRef -> do
GameTarget.spTargetGoal edictRef
return True | 145 | spTargetGoal :: EntThink
spTargetGoal =
GenericEntThink "SP_target_goal" $ \edictRef -> do
GameTarget.spTargetGoal edictRef
return True | 145 | spTargetGoal =
GenericEntThink "SP_target_goal" $ \edictRef -> do
GameTarget.spTargetGoal edictRef
return True | 120 | false | true | 0 | 10 | 24 | 37 | 17 | 20 | null | null |
hanshoglund/sox2 | src/Sound/Sox2.hs | bsd-3-clause | -- flanger [delay depth regen width speed shape phase interp]
flanger :: Audio -> Sox Audio
flanger = error "No flanger" | 120 | flanger :: Audio -> Sox Audio
flanger = error "No flanger" | 58 | flanger = error "No flanger" | 28 | true | true | 0 | 6 | 20 | 22 | 11 | 11 | null | null |
agentm/project-m36 | src/bin/TutorialD/Printer.hs | unlicense | pretty' :: RelationalExpr -> Doc n
pretty' = prettyRelationalExpr | 65 | pretty' :: RelationalExpr -> Doc n
pretty' = prettyRelationalExpr | 65 | pretty' = prettyRelationalExpr | 30 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
rahulmutt/ghcvm | compiler/Eta/TypeCheck/TcType.hs | bsd-3-clause | pprUserTypeCtxt ThBrackCtxt = ptext (sLit "a Template Haskell quotation [t|...|]") | 88 | pprUserTypeCtxt ThBrackCtxt = ptext (sLit "a Template Haskell quotation [t|...|]") | 88 | pprUserTypeCtxt ThBrackCtxt = ptext (sLit "a Template Haskell quotation [t|...|]") | 88 | false | false | 0 | 7 | 15 | 18 | 8 | 10 | null | null |
nitrix/lasers | src/Main.hs | mit | debug :: String -> IO ()
debug = hPutStrLn stderr | 49 | debug :: String -> IO ()
debug = hPutStrLn stderr | 49 | debug = hPutStrLn stderr | 24 | false | true | 0 | 7 | 9 | 23 | 11 | 12 | null | null |
cartazio/omega | src/Parser/ParseToken.hs | bsd-3-clause | omma = symbol ","
| 28 | comma = symbol "," | 28 | comma = symbol "," | 28 | false | false | 0 | 5 | 14 | 9 | 4 | 5 | null | null |
goalieca/haskelling | 043.hs | gpl-3.0 | main = print $ sum $ map undigits $ filter funny_number pandigitals | 67 | main = print $ sum $ map undigits $ filter funny_number pandigitals | 67 | main = print $ sum $ map undigits $ filter funny_number pandigitals | 67 | false | false | 1 | 7 | 11 | 29 | 12 | 17 | null | null |
slpopejoy/fadno-xml | src/Fadno/MusicXml/MusicXml20.hs | bsd-2-clause | -- | Smart constructor for 'DirectionTypeOctaveShift'
mkDirectionTypeOctaveShift :: OctaveShift -> ChxDirectionType
mkDirectionTypeOctaveShift a = DirectionTypeOctaveShift a | 173 | mkDirectionTypeOctaveShift :: OctaveShift -> ChxDirectionType
mkDirectionTypeOctaveShift a = DirectionTypeOctaveShift a | 119 | mkDirectionTypeOctaveShift a = DirectionTypeOctaveShift a | 57 | true | true | 0 | 7 | 15 | 27 | 12 | 15 | null | null |
christiaanb/Idris-dev | src/IRTS/Lang.hs | bsd-3-clause | -- Return variables in list which are used in the expression
usedArg env n | n `elem` env = [n]
| otherwise = [] | 127 | usedArg env n | n `elem` env = [n]
| otherwise = [] | 65 | usedArg env n | n `elem` env = [n]
| otherwise = [] | 65 | true | false | 0 | 8 | 38 | 38 | 19 | 19 | null | null |
honza/dotfiles | xmonad/xmonad.hs | gpl-2.0 | -- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
--
myTerminal = "st" | 128 | myTerminal = "st" | 22 | myTerminal = "st" | 22 | true | false | 0 | 4 | 26 | 9 | 6 | 3 | null | null |
egaburov/funstuff | Haskell/lenses/lens2.hs | apache-2.0 | over :: Lens' s a -> (a -> a) -> s -> s
over ln f = runIdentity . ln (Identity . f) | 83 | over :: Lens' s a -> (a -> a) -> s -> s
over ln f = runIdentity . ln (Identity . f) | 83 | over ln f = runIdentity . ln (Identity . f) | 43 | false | true | 0 | 8 | 22 | 54 | 27 | 27 | null | null |
mrkkrp/mida | src/Mida/Interaction/Commands.hs | gpl-3.0 | -- | Load single source file.
loadOne :: (HasEnv m, MonadIO m, MonadState MidaSt m, MonadThrow m)
=> FilePath -> m ()
loadOne given = do
file <- output given ""
let fpath = fromAbsFile file
b <- doesFileExist file
if b
then do
contents <- liftIO (T.readFile fpath)
case parseMida fpath cont... | 753 | loadOne :: (HasEnv m, MonadIO m, MonadState MidaSt m, MonadThrow m)
=> FilePath -> m ()
loadOne given = do
file <- output given ""
let fpath = fromAbsFile file
b <- doesFileExist file
if b
then do
contents <- liftIO (T.readFile fpath)
case parseMida fpath contents of
Right x -> do
... | 722 | loadOne given = do
file <- output given ""
let fpath = fromAbsFile file
b <- doesFileExist file
if b
then do
contents <- liftIO (T.readFile fpath)
case parseMida fpath contents of
Right x -> do
mapM_ f x
setFileName file
liftIO $ fprint
("\"" ... | 632 | true | true | 0 | 19 | 245 | 262 | 123 | 139 | null | null |
andrewMacmurray/haskell-book-solutions | src/ch18/Exercises2.hs | mit | l2 :: Monad m => (a -> b -> c) -> m a -> m b -> m c
l2 = liftM2 | 63 | l2 :: Monad m => (a -> b -> c) -> m a -> m b -> m c
l2 = liftM2 | 63 | l2 = liftM2 | 11 | false | true | 0 | 9 | 21 | 50 | 24 | 26 | null | null |
ptol/oczor | src/Oczor/Converter/Converter.hs | mit | isTypeUnionOrMaker (TypePoly _ (TypeUnion list)) = True | 55 | isTypeUnionOrMaker (TypePoly _ (TypeUnion list)) = True | 55 | isTypeUnionOrMaker (TypePoly _ (TypeUnion list)) = True | 55 | false | false | 0 | 9 | 6 | 23 | 11 | 12 | null | null |
Shimuuar/protobuf | protobuf-grammar/Data/Protobuf/CodeGen.hs | bsd-3-clause | recordField :: (Hask.Type -> BangType) -> HsField -> ([Name], BangType)
recordField bang (HsField tp name _ _) =
([Ident name], outerType tp)
where
outerType (HsReq t ) = bang $ qtycon "Val" `TyApp` TyVar (Ident "r") `TyApp` innerType t
outerType (HsMaybe t ) = bang $ qtycon "Maybe" `TyApp` innerType ... | 1,510 | recordField :: (Hask.Type -> BangType) -> HsField -> ([Name], BangType)
recordField bang (HsField tp name _ _) =
([Ident name], outerType tp)
where
outerType (HsReq t ) = bang $ qtycon "Val" `TyApp` TyVar (Ident "r") `TyApp` innerType t
outerType (HsMaybe t ) = bang $ qtycon "Maybe" `TyApp` innerType ... | 1,510 | recordField bang (HsField tp name _ _) =
([Ident name], outerType tp)
where
outerType (HsReq t ) = bang $ qtycon "Val" `TyApp` TyVar (Ident "r") `TyApp` innerType t
outerType (HsMaybe t ) = bang $ qtycon "Maybe" `TyApp` innerType t
outerType (HsSeq t _) = bang $ qtycon "Seq" `TyApp` innerType ... | 1,438 | false | true | 8 | 13 | 363 | 544 | 259 | 285 | null | null |
cirquit/Personal-Repository | Haskell/RWH/FileSystem/ListTransformations.hs | mit | dropLastUntil :: String -> Char -> String -> String
dropLastUntil word sep l = concat $ reverse (dropWord word subList)
where subList = reverse $ crtSubListsBy sep l
dropWord _ [] = []
dropWord word xx@(x:xs)
... | 444 | dropLastUntil :: String -> Char -> String -> String
dropLastUntil word sep l = concat $ reverse (dropWord word subList)
where subList = reverse $ crtSubListsBy sep l
dropWord _ [] = []
dropWord word xx@(x:xs)
... | 444 | dropLastUntil word sep l = concat $ reverse (dropWord word subList)
where subList = reverse $ crtSubListsBy sep l
dropWord _ [] = []
dropWord word xx@(x:xs)
| word == x = x... | 392 | false | true | 0 | 10 | 235 | 124 | 59 | 65 | null | null |
amccausl/Swish | Swish/HaskellUtils/ListHelpers.hs | lgpl-2.1 | {-
-- |Return list of integers from lo to hi.
intRange :: Int -> Int -> [Int]
intRange lo hi = take (hi-lo+1) (iterate (+1) 1)
-}
{-
-- Tests
testcomb0 = combinations 0 "abcd" -- []
testcomb1 = combinations 1 "abcd" -- ["a","b","c","d"]
testcomb2 = combinations 2 "abcd" -- ["ab","ac","ad","bc","bd","cd"]
te... | 886 | permutations :: [a] -> [[a]]
permutations [] = [[]] | 58 | permutations [] = [[]] | 29 | true | true | 0 | 9 | 150 | 47 | 27 | 20 | null | null |
ibawt/hdns | src/Lib.hs | gpl-3.0 | writeMessage :: Message -> StateT (LabelMap, Int) PutM ()
writeMessage msg = do
putWord16 $ txId msg
putWord16 $ flags msg
putWord16 $ fromIntegral $ length (questions msg)
putWord16 $ fromIntegral $ length (answers msg)
putWord16 0
putWord16 0
mapM_
(\q -> do
writeLabels $ name q
putWor... | 789 | writeMessage :: Message -> StateT (LabelMap, Int) PutM ()
writeMessage msg = do
putWord16 $ txId msg
putWord16 $ flags msg
putWord16 $ fromIntegral $ length (questions msg)
putWord16 $ fromIntegral $ length (answers msg)
putWord16 0
putWord16 0
mapM_
(\q -> do
writeLabels $ name q
putWor... | 789 | writeMessage msg = do
putWord16 $ txId msg
putWord16 $ flags msg
putWord16 $ fromIntegral $ length (questions msg)
putWord16 $ fromIntegral $ length (answers msg)
putWord16 0
putWord16 0
mapM_
(\q -> do
writeLabels $ name q
putWord16 $ qtype q
putWord16 $ qclass q) $
questions... | 731 | false | true | 0 | 19 | 287 | 316 | 138 | 178 | null | null |
SRechenberger/grammata | src/Grammata/Interpreter/Compilation.hs | gpl-3.0 | compileImperativeExpression (Const val) = iVal <$> compileBasicValue val | 72 | compileImperativeExpression (Const val) = iVal <$> compileBasicValue val | 72 | compileImperativeExpression (Const val) = iVal <$> compileBasicValue val | 72 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp dflags WordLeOp = Just (mo_wordULe dflags) | 60 | translateOp dflags WordLeOp = Just (mo_wordULe dflags) | 60 | translateOp dflags WordLeOp = Just (mo_wordULe dflags) | 60 | false | false | 1 | 7 | 12 | 24 | 9 | 15 | null | null |
LukeHoersten/io-streams | src/System/IO/Streams/Internal.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Creates an 'InputStream' from a value-producing action.
--
-- (@makeInputStream m@) calls the action @m@ each time you request a value
-- from the 'InputStream'. The given action is extended with the default
-- pushback mechanism (see "... | 1,065 | makeInputStream :: IO (Maybe a) -> IO (InputStream a)
makeInputStream m = do
doneRef <- newIORef False
pbRef <- newIORef []
return $! InputStream (grab doneRef pbRef) (pb pbRef)
where
grab doneRef pbRef = do
l <- readIORef pbRef
case l of
[] -> do done <- readIORef done... | 706 | makeInputStream m = do
doneRef <- newIORef False
pbRef <- newIORef []
return $! InputStream (grab doneRef pbRef) (pb pbRef)
where
grab doneRef pbRef = do
l <- readIORef pbRef
case l of
[] -> do done <- readIORef doneRef
if done
... | 652 | true | true | 1 | 20 | 356 | 251 | 119 | 132 | null | null |
maurer/15-411-Haskell-Base-Code | src/Text/Parsec/Error.hs | bsd-3-clause | messageString (Expect s) = s | 33 | messageString (Expect s) = s | 33 | messageString (Expect s) = s | 33 | false | false | 0 | 7 | 9 | 15 | 7 | 8 | null | null |
nevrenato/Hets_Fork | Comorphisms/CommonLogic2CASL.hs | gpl-2.0 | mapSentence :: ClSign.Sign -> ClBasic.TEXT_META -> Result CBasic.CASLFORMULA
mapSentence sig form = Result [] $ Just $ trFormMeta sig (eliminateModules form) | 157 | mapSentence :: ClSign.Sign -> ClBasic.TEXT_META -> Result CBasic.CASLFORMULA
mapSentence sig form = Result [] $ Just $ trFormMeta sig (eliminateModules form) | 157 | mapSentence sig form = Result [] $ Just $ trFormMeta sig (eliminateModules form) | 80 | false | true | 0 | 8 | 20 | 57 | 27 | 30 | null | null |
spacekitteh/smcghc | compiler/main/DynFlags.hs | bsd-3-clause | enableGlasgowExts :: DynP ()
enableGlasgowExts = do setGeneralFlag Opt_PrintExplicitForalls
mapM_ setExtensionFlag glasgowExtsFlags | 154 | enableGlasgowExts :: DynP ()
enableGlasgowExts = do setGeneralFlag Opt_PrintExplicitForalls
mapM_ setExtensionFlag glasgowExtsFlags | 154 | enableGlasgowExts = do setGeneralFlag Opt_PrintExplicitForalls
mapM_ setExtensionFlag glasgowExtsFlags | 125 | false | true | 0 | 7 | 34 | 30 | 13 | 17 | null | null |
jgoerzen/hpodder | DownloadQueue.hs | gpl-2.0 | blocksignals =
do let sigset = addSignal sigCHLD emptySignalSet
oldset <- getSignalMask
blockSignals sigset
return oldset | 147 | blocksignals =
do let sigset = addSignal sigCHLD emptySignalSet
oldset <- getSignalMask
blockSignals sigset
return oldset | 147 | blocksignals =
do let sigset = addSignal sigCHLD emptySignalSet
oldset <- getSignalMask
blockSignals sigset
return oldset | 147 | false | false | 1 | 11 | 41 | 43 | 16 | 27 | null | null |
vTurbine/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | dataConOrigArgTys :: DataCon -> [Type]
dataConOrigArgTys dc = dcOrigArgTys dc | 77 | dataConOrigArgTys :: DataCon -> [Type]
dataConOrigArgTys dc = dcOrigArgTys dc | 77 | dataConOrigArgTys dc = dcOrigArgTys dc | 38 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLB_EXTENDED :: Int
wxLB_EXTENDED = 128 | 40 | wxLB_EXTENDED :: Int
wxLB_EXTENDED = 128 | 40 | wxLB_EXTENDED = 128 | 19 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
DanielWaterworth/Idris-dev | src/IRTS/CodegenJava.hs | bsd-3-clause | mkDecl (_, SFun name params stackSize body) = do
(Ident methodName) <- mangle name
methodParams <- mapM mkFormalParam params
paramNames <- mapM mangle params
pushParams paramNames
methodBody <- mkExp addReturn body
popScope
return $
simpleMethod [Public, Static] (Just objectType) methodName methodPara... | 347 | mkDecl (_, SFun name params stackSize body) = do
(Ident methodName) <- mangle name
methodParams <- mapM mkFormalParam params
paramNames <- mapM mangle params
pushParams paramNames
methodBody <- mkExp addReturn body
popScope
return $
simpleMethod [Public, Static] (Just objectType) methodName methodPara... | 347 | mkDecl (_, SFun name params stackSize body) = do
(Ident methodName) <- mangle name
methodParams <- mapM mkFormalParam params
paramNames <- mapM mangle params
pushParams paramNames
methodBody <- mkExp addReturn body
popScope
return $
simpleMethod [Public, Static] (Just objectType) methodName methodPara... | 347 | false | false | 0 | 10 | 66 | 121 | 55 | 66 | null | null |
lessandro/gridc | src/GridC/Codegen.hs | mit | locals :: Lens [Variable]
locals f s = fmap (\val -> s { _locals = val }) $ f $ _locals s | 89 | locals :: Lens [Variable]
locals f s = fmap (\val -> s { _locals = val }) $ f $ _locals s | 89 | locals f s = fmap (\val -> s { _locals = val }) $ f $ _locals s | 63 | false | true | 1 | 11 | 21 | 56 | 27 | 29 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/Node.hs | bsd-3-clause | mapExpM f (CmmCall tgt mb_id r o i s) = (\x -> CmmCall x mb_id r o i s) `fmap` f tgt | 84 | mapExpM f (CmmCall tgt mb_id r o i s) = (\x -> CmmCall x mb_id r o i s) `fmap` f tgt | 84 | mapExpM f (CmmCall tgt mb_id r o i s) = (\x -> CmmCall x mb_id r o i s) `fmap` f tgt | 84 | false | false | 0 | 8 | 21 | 57 | 29 | 28 | null | null |
kelecorix/api-hasoffers | src/HasOffers/API/Brand/Offer.hs | bsd-3-clause | addGroup params =
Call "Offer"
"addGroup"
"POST"
[ Param "id" True $ getParam params 0
, Param "group_id" True $ getParam params 1
] | 178 | addGroup params =
Call "Offer"
"addGroup"
"POST"
[ Param "id" True $ getParam params 0
, Param "group_id" True $ getParam params 1
] | 178 | addGroup params =
Call "Offer"
"addGroup"
"POST"
[ Param "id" True $ getParam params 0
, Param "group_id" True $ getParam params 1
] | 178 | false | false | 0 | 8 | 69 | 52 | 24 | 28 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x2F861' = "\x216EA" | 35 | decomposeChar '\x2F861' = "\x216EA" | 35 | decomposeChar '\x2F861' = "\x216EA" | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
erochest/orchestrate | src/Database/Orchestrate/Types.hs | apache-2.0 | handler' f (Left e) = f e | 26 | handler' f (Left e) = f e | 26 | handler' f (Left e) = f e | 26 | false | false | 0 | 7 | 7 | 20 | 9 | 11 | null | null |
shlevy/ghc | compiler/types/Type.hs | bsd-3-clause | -- The free vars of 'rhs' should all be bound by 'tenv', so it's
-- ok to use 'substTy' here.
-- See also Note [The substitution invariant] in TyCoRep.
-- Its important to use mkAppTys, rather than (foldl AppTy),
-- because the function part might well return ... | 416 | tcView _ = Nothing | 18 | tcView _ = Nothing | 18 | true | false | 0 | 5 | 133 | 15 | 10 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.