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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MnO2/hopencc | src/Language/OpenCc/Internal/C2HS.hs | bsd-3-clause | cFloatConv :: (RealFloat a, RealFloat b) => a -> b
cFloatConv = realToFrac | 74 | cFloatConv :: (RealFloat a, RealFloat b) => a -> b
cFloatConv = realToFrac | 74 | cFloatConv = realToFrac | 23 | false | true | 0 | 8 | 12 | 37 | 17 | 20 | null | null |
kfish/manpages | Man/Render.hs | bsd-3-clause | englishList [a] = a | 19 | englishList [a] = a | 19 | englishList [a] = a | 19 | false | false | 0 | 6 | 3 | 12 | 6 | 6 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1VolumeGcePersistentDisk' Lens
v1VolumeGcePersistentDiskL :: Lens_' V1Volume (Maybe V1GCEPersistentDiskVolumeSource)
v1VolumeGcePersistentDiskL f V1Volume{..} = (\v1VolumeGcePersistentDisk -> V1Volume { v1VolumeGcePersistentDisk, ..} ) <$> f v1VolumeGcePersistentDisk | 274 | v1VolumeGcePersistentDiskL :: Lens_' V1Volume (Maybe V1GCEPersistentDiskVolumeSource)
v1VolumeGcePersistentDiskL f V1Volume{..} = (\v1VolumeGcePersistentDisk -> V1Volume { v1VolumeGcePersistentDisk, ..} ) <$> f v1VolumeGcePersistentDisk | 236 | v1VolumeGcePersistentDiskL f V1Volume{..} = (\v1VolumeGcePersistentDisk -> V1Volume { v1VolumeGcePersistentDisk, ..} ) <$> f v1VolumeGcePersistentDisk | 150 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
bgamari/pandoc | tests/Tests/Readers/Docx.hs | gpl-2.0 | testCompareWithOptsIO :: ReaderOptions -> String -> FilePath -> FilePath -> IO Test
testCompareWithOptsIO opts name docxFile nativeFile = do
(dp, np) <- compareOutput opts docxFile nativeFile
return $ test id name (dp, np) | 226 | testCompareWithOptsIO :: ReaderOptions -> String -> FilePath -> FilePath -> IO Test
testCompareWithOptsIO opts name docxFile nativeFile = do
(dp, np) <- compareOutput opts docxFile nativeFile
return $ test id name (dp, np) | 226 | testCompareWithOptsIO opts name docxFile nativeFile = do
(dp, np) <- compareOutput opts docxFile nativeFile
return $ test id name (dp, np) | 142 | false | true | 0 | 9 | 36 | 79 | 39 | 40 | null | null |
gentoo-haskell/haskell-updater | Distribution/Gentoo/GHC.hs | gpl-3.0 | getRegisteredTwice :: Verbosity -> IO [CabalPV]
getRegisteredTwice v = do
registered_confs <- listConfFiles GHCConfs >>= foldConf v
let registered_twice = Map.filter (\fs -> length fs > 1) registered_confs
return $ Map.keys registered_twice
-- ---------------------------------------------------------------... | 334 | getRegisteredTwice :: Verbosity -> IO [CabalPV]
getRegisteredTwice v = do
registered_confs <- listConfFiles GHCConfs >>= foldConf v
let registered_twice = Map.filter (\fs -> length fs > 1) registered_confs
return $ Map.keys registered_twice
-- ---------------------------------------------------------------... | 334 | getRegisteredTwice v = do
registered_confs <- listConfFiles GHCConfs >>= foldConf v
let registered_twice = Map.filter (\fs -> length fs > 1) registered_confs
return $ Map.keys registered_twice
-- ----------------------------------------------------------------------------- | 286 | false | true | 0 | 15 | 46 | 90 | 41 | 49 | null | null |
sdiehl/ghc | compiler/main/DriverPhases.hs | bsd-3-clause | phaseInputExt MergeForeign = "o" | 39 | phaseInputExt MergeForeign = "o" | 39 | phaseInputExt MergeForeign = "o" | 39 | false | false | 0 | 4 | 10 | 10 | 4 | 6 | null | null |
sol/aeson | tests/DataFamilies/Encoders.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- SomeType encoders/decoders
--------------------------------------------------------------------------------
thSomeTypeToJSON2ElemArray :: SomeType c () Int -> Value
thSomeTypeToJSON2ElemArray = $(mkToJSON opts2ElemArray 'Nullary) | 314 | thSomeTypeToJSON2ElemArray :: SomeType c () Int -> Value
thSomeTypeToJSON2ElemArray = $(mkToJSON opts2ElemArray 'Nullary) | 121 | thSomeTypeToJSON2ElemArray = $(mkToJSON opts2ElemArray 'Nullary) | 64 | true | true | 0 | 7 | 18 | 37 | 20 | 17 | null | null |
gridaphobe/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | wrapOpBackquotes :: String -> String
wrapOpBackquotes s | isSym s = s
| otherwise = '`' : s ++ "`" | 119 | wrapOpBackquotes :: String -> String
wrapOpBackquotes s | isSym s = s
| otherwise = '`' : s ++ "`" | 119 | wrapOpBackquotes s | isSym s = s
| otherwise = '`' : s ++ "`" | 82 | false | true | 0 | 8 | 40 | 44 | 20 | 24 | null | null |
Trundle/idris-go | src/IRTS/CodegenGo.hs | mit | fDescToGoType (FApp c [ FStr name ])
| c == sUN "Go_Interface" = GoInterface name | 83 | fDescToGoType (FApp c [ FStr name ])
| c == sUN "Go_Interface" = GoInterface name | 83 | fDescToGoType (FApp c [ FStr name ])
| c == sUN "Go_Interface" = GoInterface name | 83 | false | false | 0 | 9 | 16 | 39 | 17 | 22 | null | null |
michalt/cvector | Data/CVector.hs | bsd-3-clause | --
-- Monadic mapping
--
mapM :: Monad m => (a -> m b) -> CVector a -> m (CVector b)
mapM = G.mapM | 99 | mapM :: Monad m => (a -> m b) -> CVector a -> m (CVector b)
mapM = G.mapM | 73 | mapM = G.mapM | 13 | true | true | 0 | 11 | 24 | 59 | 28 | 31 | null | null |
cshung/MiscLab | Haskell99/q03.test.hs | mit | test5 = TestCase (assertEqualEither "elementAtTest [1,2] 1 should be 1. " (Left 1) (elementAtTest [1,2] 1 )) | 139 | test5 = TestCase (assertEqualEither "elementAtTest [1,2] 1 should be 1. " (Left 1) (elementAtTest [1,2] 1 )) | 139 | test5 = TestCase (assertEqualEither "elementAtTest [1,2] 1 should be 1. " (Left 1) (elementAtTest [1,2] 1 )) | 139 | false | false | 1 | 10 | 47 | 42 | 20 | 22 | null | null |
jrclogic/SMCDEL | src/SMCDEL/Internal/TexDisplay.hs | gpl-2.0 | runAndWait :: String -> IO ()
runAndWait command = do
(_inp,_out,err,pid) <- runInteractiveCommand command
_ <- waitForProcess pid
hGetContents err >>= (\x -> unless (null x) (putStrLn x))
return () | 206 | runAndWait :: String -> IO ()
runAndWait command = do
(_inp,_out,err,pid) <- runInteractiveCommand command
_ <- waitForProcess pid
hGetContents err >>= (\x -> unless (null x) (putStrLn x))
return () | 206 | runAndWait command = do
(_inp,_out,err,pid) <- runInteractiveCommand command
_ <- waitForProcess pid
hGetContents err >>= (\x -> unless (null x) (putStrLn x))
return () | 176 | false | true | 0 | 12 | 37 | 98 | 47 | 51 | null | null |
brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/AdExchangeBuyer2/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'DeliveryControl' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dcCreativeBlockingLevel'
--
-- * 'dcFrequencyCaps'
--
-- * 'dcDeliveryRateType'
deliveryControl
:: DeliveryControl
deliveryControl =
Deliv... | 447 | deliveryControl
:: DeliveryControl
deliveryControl =
DeliveryControl'
{ _dcCreativeBlockingLevel = Nothing
, _dcFrequencyCaps = Nothing
, _dcDeliveryRateType = Nothing
} | 191 | deliveryControl =
DeliveryControl'
{ _dcCreativeBlockingLevel = Nothing
, _dcFrequencyCaps = Nothing
, _dcDeliveryRateType = Nothing
} | 152 | true | true | 0 | 7 | 82 | 50 | 30 | 20 | null | null |
cfr/burningbar | src/Util.hs | unlicense | (≫) ∷ Monad m ⇒ m α → m β → m β
(≫) = (>>) | 42 | (≫) ∷ Monad m ⇒ m α → m β → m β
(≫) = (>>) | 42 | (≫) = (>>) | 10 | false | true | 0 | 9 | 15 | 47 | 23 | 24 | null | null |
NicolasDP/maild | Network/SMTP/Server.hs | bsd-3-clause | commandHandleDATA :: ServerConnection -> SMTPConfig -> CCStateS ()
commandHandleDATA con config = do
mdc <- gets (\s -> domainClient s)
mfromEmail <- gets (\s -> mailFrom $ smtpMail s)
rcptEmails <- gets (\s -> not.null $ mailTo $ smtpMail s)
case (mdc, mfromEmail, rcptEmails) of
(N... | 1,759 | commandHandleDATA :: ServerConnection -> SMTPConfig -> CCStateS ()
commandHandleDATA con config = do
mdc <- gets (\s -> domainClient s)
mfromEmail <- gets (\s -> mailFrom $ smtpMail s)
rcptEmails <- gets (\s -> not.null $ mailTo $ smtpMail s)
case (mdc, mfromEmail, rcptEmails) of
(N... | 1,759 | commandHandleDATA con config = do
mdc <- gets (\s -> domainClient s)
mfromEmail <- gets (\s -> mailFrom $ smtpMail s)
rcptEmails <- gets (\s -> not.null $ mailTo $ smtpMail s)
case (mdc, mfromEmail, rcptEmails) of
(Nothing, _ , _ ) -> liftIO $ respond con 503 "use command ... | 1,692 | false | true | 0 | 21 | 613 | 513 | 250 | 263 | null | null |
madmann91/Ape | src/Ape/Eval.hs | lgpl-3.0 | divValues i (U16 _ a) (U16 _ b) = U16 i $ zipWith div a b | 57 | divValues i (U16 _ a) (U16 _ b) = U16 i $ zipWith div a b | 57 | divValues i (U16 _ a) (U16 _ b) = U16 i $ zipWith div a b | 57 | false | false | 1 | 6 | 15 | 46 | 20 | 26 | null | null |
ledyba/hs-java | JVM/Common.hs | lgpl-3.0 | poolSize :: Pool stage -> Int
poolSize = M.size | 47 | poolSize :: Pool stage -> Int
poolSize = M.size | 47 | poolSize = M.size | 17 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
vladimir-ipatov/ganeti | test/hs/Test/Ganeti/Storage/Drbd/Parser.hs | gpl-2.0 | -- | Test a DRBD 8.3 file.
case_drbd83 :: Assertion
case_drbd83 = testParser (drbdStatusParser []) "proc_drbd83.txt" $
DRBDStatus
( VersionInfo (Just "8.3.1") (Just "88") (Just "86-89")
Nothing
(Just "fd40f4a8f9104941537d1afc8521e584a6d3003c")
(Just "phil@fat-tyre, 2009-03-27 12:19:49")
)
... | 2,267 | case_drbd83 :: Assertion
case_drbd83 = testParser (drbdStatusParser []) "proc_drbd83.txt" $
DRBDStatus
( VersionInfo (Just "8.3.1") (Just "88") (Just "86-89")
Nothing
(Just "fd40f4a8f9104941537d1afc8521e584a6d3003c")
(Just "phil@fat-tyre, 2009-03-27 12:19:49")
)
[ DeviceInfo 0 Connected ... | 2,240 | case_drbd83 = testParser (drbdStatusParser []) "proc_drbd83.txt" $
DRBDStatus
( VersionInfo (Just "8.3.1") (Just "88") (Just "86-89")
Nothing
(Just "fd40f4a8f9104941537d1afc8521e584a6d3003c")
(Just "phil@fat-tyre, 2009-03-27 12:19:49")
)
[ DeviceInfo 0 Connected (LocalRemote Primary Seco... | 2,215 | true | true | 0 | 10 | 746 | 717 | 358 | 359 | null | null |
sgillespie/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | ctLocEnv :: CtLoc -> TcLclEnv
ctLocEnv = ctl_env | 48 | ctLocEnv :: CtLoc -> TcLclEnv
ctLocEnv = ctl_env | 48 | ctLocEnv = ctl_env | 18 | false | true | 0 | 7 | 7 | 22 | 9 | 13 | null | null |
olsner/m3 | TypeCheck.hs | bsd-3-clause | modifyBindings f = modify (\s -> s { bindings = f (bindings s) }) | 65 | modifyBindings f = modify (\s -> s { bindings = f (bindings s) }) | 65 | modifyBindings f = modify (\s -> s { bindings = f (bindings s) }) | 65 | false | false | 0 | 12 | 13 | 37 | 19 | 18 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/ExtensionPredicates.hs | bsd-3-clause | -- | Is the <https://www.opengl.org/registry/specs/NVX/gpu_memory_info.txt NVX_gpu_memory_info> extension supported?
-- Note that in the presence of multiple contexts with different capabilities,
-- this might be wrong. Use 'glGetNVXGPUMemoryInfo' in those cases instead.
gl_NVX_gpu_memory_info :: Bool
gl_NVX_gpu_memory... | 370 | gl_NVX_gpu_memory_info :: Bool
gl_NVX_gpu_memory_info = member "GL_NVX_gpu_memory_info" extensions | 98 | gl_NVX_gpu_memory_info = member "GL_NVX_gpu_memory_info" extensions | 67 | true | true | 0 | 5 | 38 | 19 | 11 | 8 | null | null |
luisnavarrodelangel/InnerEar | src/InnerEarServer.hs | gpl-3.0 | webSocketsApp :: MVar Server -> WS.ServerApp -- = PendingConnection -> IO ()
webSocketsApp s ws = do
putStrLn "received new connection"
ws' <- WS.acceptRequest ws
ss <- takeMVar s
let (i,ss') = addConnection ws' ss
putMVar s ss'
WS.forkPingThread ws' 30
processLoop ws' s i | 295 | webSocketsApp :: MVar Server -> WS.ServerApp
webSocketsApp s ws = do
putStrLn "received new connection"
ws' <- WS.acceptRequest ws
ss <- takeMVar s
let (i,ss') = addConnection ws' ss
putMVar s ss'
WS.forkPingThread ws' 30
processLoop ws' s i | 262 | webSocketsApp s ws = do
putStrLn "received new connection"
ws' <- WS.acceptRequest ws
ss <- takeMVar s
let (i,ss') = addConnection ws' ss
putMVar s ss'
WS.forkPingThread ws' 30
processLoop ws' s i | 217 | true | true | 0 | 11 | 66 | 109 | 46 | 63 | null | null |
alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/ClientNamenodeProtocolProtos/ClientNamenodeProtocol.hs | mit | removeCachePool :: RemoveCachePool
removeCachePool = P'.Method | 62 | removeCachePool :: RemoveCachePool
removeCachePool = P'.Method | 62 | removeCachePool = P'.Method | 27 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F31.hs | bsd-3-clause | ptr_glVertexAttribL2d :: FunPtr (GLuint -> GLdouble -> GLdouble -> IO ())
ptr_glVertexAttribL2d = unsafePerformIO $ getCommand "glVertexAttribL2d" | 146 | ptr_glVertexAttribL2d :: FunPtr (GLuint -> GLdouble -> GLdouble -> IO ())
ptr_glVertexAttribL2d = unsafePerformIO $ getCommand "glVertexAttribL2d" | 146 | ptr_glVertexAttribL2d = unsafePerformIO $ getCommand "glVertexAttribL2d" | 72 | false | true | 0 | 11 | 16 | 41 | 20 | 21 | null | null |
HIPERFIT/futhark | src/Futhark/CodeGen/Backends/CCUDA.hs | isc | allocateCUDABuffer :: GC.Allocate OpenCL ()
allocateCUDABuffer mem size tag "device" =
GC.stm [C.cstm|CUDA_SUCCEED_OR_RETURN(cuda_alloc(&ctx->cuda, (size_t)$exp:size, $exp:tag, &$exp:mem));|] | 193 | allocateCUDABuffer :: GC.Allocate OpenCL ()
allocateCUDABuffer mem size tag "device" =
GC.stm [C.cstm|CUDA_SUCCEED_OR_RETURN(cuda_alloc(&ctx->cuda, (size_t)$exp:size, $exp:tag, &$exp:mem));|] | 193 | allocateCUDABuffer mem size tag "device" =
GC.stm [C.cstm|CUDA_SUCCEED_OR_RETURN(cuda_alloc(&ctx->cuda, (size_t)$exp:size, $exp:tag, &$exp:mem));|] | 149 | false | true | 0 | 6 | 17 | 40 | 21 | 19 | null | null |
MasseR/Views | View.hs | bsd-3-clause | prepare (Internal JavaScript code) =
H.script (H.toHtml code) ! A.type_ "application/javascript" | 98 | prepare (Internal JavaScript code) =
H.script (H.toHtml code) ! A.type_ "application/javascript" | 98 | prepare (Internal JavaScript code) =
H.script (H.toHtml code) ! A.type_ "application/javascript" | 98 | false | false | 0 | 9 | 12 | 39 | 18 | 21 | null | null |
louispan/glazier | src/Glazier/Command.hs | bsd-3-clause | -- | Adds a 'MonadCont' constraint. It is redundant but rules out
-- using 'Concur' at the bottom of the transformer stack,
-- which prevents the use of `concurringly`.
-- 'sequentially' is used for operations that MUST run sequentially, not concurrently.
-- Eg. when the overhead of using 'Concur' IO is not worth it, o... | 675 | sequentially :: MonadCont m => m a -> m a
sequentially = id | 59 | sequentially = id | 17 | true | true | 0 | 7 | 117 | 38 | 23 | 15 | null | null |
zoep/jebus | src/Parser.hs | mit | expr = buildExpressionParser table app
where op x f = Infix (reservedOp x >> return f)
table = [[op "**" (Bop Pow) AssocRight],
[op "*" (Bop Mult) AssocLeft],
[op "+" (Bop Plus) AssocLeft,
op "-" (Bop Minus) AssocLeft],
[op "&&" (Boolop And)... | 613 | expr = buildExpressionParser table app
where op x f = Infix (reservedOp x >> return f)
table = [[op "**" (Bop Pow) AssocRight],
[op "*" (Bop Mult) AssocLeft],
[op "+" (Bop Plus) AssocLeft,
op "-" (Bop Minus) AssocLeft],
[op "&&" (Boolop And)... | 613 | expr = buildExpressionParser table app
where op x f = Infix (reservedOp x >> return f)
table = [[op "**" (Bop Pow) AssocRight],
[op "*" (Bop Mult) AssocLeft],
[op "+" (Bop Plus) AssocLeft,
op "-" (Bop Minus) AssocLeft],
[op "&&" (Boolop And)... | 613 | false | false | 1 | 10 | 257 | 239 | 121 | 118 | null | null |
expipiplus1/vulkan | src/Vulkan/Extensions/VK_EXT_debug_marker.hs | bsd-3-clause | -- | vkCmdDebugMarkerBeginEXT - Open a command buffer marker region
--
-- == Valid Usage (Implicit)
--
-- - #VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-parameter#
-- @commandBuffer@ /must/ be a valid
-- 'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- - #VUID-vkCmdDebugMarkerBeginEXT-pMarkerInfo-paramete... | 4,779 | cmdDebugMarkerBeginEXT :: forall io
. (MonadIO io)
=> -- | @commandBuffer@ is the command buffer into which the command is
-- recorded.
CommandBuffer
-> -- | @pMarkerInfo@ is a pointer to a 'DebugMa... | 1,185 | cmdDebugMarkerBeginEXT commandBuffer markerInfo = liftIO . evalContT $ do
let vkCmdDebugMarkerBeginEXTPtr = pVkCmdDebugMarkerBeginEXT (case commandBuffer of CommandBuffer{deviceCmds} -> deviceCmds)
lift $ unless (vkCmdDebugMarkerBeginEXTPtr /= nullFunPtr) $
throwIO $ IOError Nothing InvalidArgument "" "The func... | 668 | true | true | 0 | 17 | 1,223 | 238 | 137 | 101 | null | null |
vdweegen/UvA-Software_Testing | Lab6/Bauke/Lecture6.hs | gpl-3.0 | rsaPrivate :: Integer -> Integer -> (Integer,Integer)
rsaPrivate p q = let
e = select p q
t = phi p q
d = invM e t
in
(d,p*q) | 140 | rsaPrivate :: Integer -> Integer -> (Integer,Integer)
rsaPrivate p q = let
e = select p q
t = phi p q
d = invM e t
in
(d,p*q) | 140 | rsaPrivate p q = let
e = select p q
t = phi p q
d = invM e t
in
(d,p*q) | 85 | false | true | 0 | 9 | 43 | 76 | 39 | 37 | null | null |
dgvncsz0f/sssfs | src/SSSFS/Filesystem/Types.hs | gpl-3.0 | encodePair :: (T.Text, T.Text) -> (B.ByteString, B.ByteString)
encodePair (a,b) = (encode a, encode b) | 102 | encodePair :: (T.Text, T.Text) -> (B.ByteString, B.ByteString)
encodePair (a,b) = (encode a, encode b) | 102 | encodePair (a,b) = (encode a, encode b) | 39 | false | true | 0 | 9 | 13 | 62 | 32 | 30 | null | null |
ssaavedra/liquidhaskell | tests/todo/gadtEval.hs | bsd-3-clause | equal _ _ = liquidError "don't worry, its impossible" | 62 | equal _ _ = liquidError "don't worry, its impossible" | 62 | equal _ _ = liquidError "don't worry, its impossible" | 62 | false | false | 1 | 5 | 17 | 14 | 6 | 8 | null | null |
laszlopandy/elm-compiler | src/Generate/JavaScript/Helpers.hs | bsd-3-clause | instanceof :: String -> Expression () -> Expression ()
instanceof tipe x =
InfixExpr () OpLAnd (typeof "object" x) (InfixExpr () OpInstanceof x (ref tipe)) | 159 | instanceof :: String -> Expression () -> Expression ()
instanceof tipe x =
InfixExpr () OpLAnd (typeof "object" x) (InfixExpr () OpInstanceof x (ref tipe)) | 159 | instanceof tipe x =
InfixExpr () OpLAnd (typeof "object" x) (InfixExpr () OpInstanceof x (ref tipe)) | 104 | false | true | 0 | 9 | 28 | 73 | 35 | 38 | null | null |
hferreiro/replay | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | getAmode' _ expr = do
(reg,code) <- getSomeReg expr
return (Amode (AddrBaseIndex (EABaseReg reg) EAIndexNone (ImmInt 0)) code) | 130 | getAmode' _ expr = do
(reg,code) <- getSomeReg expr
return (Amode (AddrBaseIndex (EABaseReg reg) EAIndexNone (ImmInt 0)) code) | 130 | getAmode' _ expr = do
(reg,code) <- getSomeReg expr
return (Amode (AddrBaseIndex (EABaseReg reg) EAIndexNone (ImmInt 0)) code) | 130 | false | false | 1 | 14 | 21 | 64 | 30 | 34 | null | null |
lorcanmcdonald/mars | src/Mars/Parser.hs | bsd-3-clause | value :: forall u. ParsecT String u Identity AesonTypes.Value
value =
( do
v <- wspaceSeparated
either
(const mzero)
return
(parseOnly AesonParser.value (ByteString.pack v))
)
<?> "simple JSON Value" | 243 | value :: forall u. ParsecT String u Identity AesonTypes.Value
value =
( do
v <- wspaceSeparated
either
(const mzero)
return
(parseOnly AesonParser.value (ByteString.pack v))
)
<?> "simple JSON Value" | 243 | value =
( do
v <- wspaceSeparated
either
(const mzero)
return
(parseOnly AesonParser.value (ByteString.pack v))
)
<?> "simple JSON Value" | 181 | false | true | 2 | 13 | 72 | 77 | 37 | 40 | null | null |
ml9951/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | Is the Safe Haskell safe inference mode active
safeInferOn :: DynFlags -> Bool
safeInferOn = safeInfer | 107 | safeInferOn :: DynFlags -> Bool
safeInferOn = safeInfer | 55 | safeInferOn = safeInfer | 23 | true | true | 0 | 5 | 17 | 16 | 9 | 7 | null | null |
kojiromike/Idris-dev | src/Idris/Elab/Value.hs | bsd-3-clause | elabVal :: ElabInfo -> ElabMode -> PTerm -> Idris (Term, Type)
elabVal info aspat tm_in
= do (tm, ty, _) <- elabValBind info aspat False tm_in
return (tm, ty) | 169 | elabVal :: ElabInfo -> ElabMode -> PTerm -> Idris (Term, Type)
elabVal info aspat tm_in
= do (tm, ty, _) <- elabValBind info aspat False tm_in
return (tm, ty) | 169 | elabVal info aspat tm_in
= do (tm, ty, _) <- elabValBind info aspat False tm_in
return (tm, ty) | 106 | false | true | 0 | 9 | 39 | 76 | 39 | 37 | null | null |
kmate/HaRe | old/testing/asPatterns/E2AST.hs | bsd-3-clause | buildtree ((x : xs)) = snd (insert x (buildtree xs)) | 52 | buildtree ((x : xs)) = snd (insert x (buildtree xs)) | 52 | buildtree ((x : xs)) = snd (insert x (buildtree xs)) | 52 | false | false | 0 | 9 | 9 | 36 | 18 | 18 | null | null |
ducis/computer-network-labs | a4/A4com.hs | mit | task1_tcpftp::[[String]]->Int
task1_tcpftp = sumtr 10 . smplfilt [(0,"r"),(4,"2"),(6,"3"),(16,"1"),(8,"tcp")] | 110 | task1_tcpftp::[[String]]->Int
task1_tcpftp = sumtr 10 . smplfilt [(0,"r"),(4,"2"),(6,"3"),(16,"1"),(8,"tcp")] | 109 | task1_tcpftp = sumtr 10 . smplfilt [(0,"r"),(4,"2"),(6,"3"),(16,"1"),(8,"tcp")] | 79 | false | true | 0 | 8 | 8 | 76 | 46 | 30 | null | null |
meiersi-11ce/stack | src/Stack/Init.hs | bsd-3-clause | getImplicitGlobalProjectDir
:: (MonadIO m, MonadLogger m)
=> Config -> m (Path Abs Dir)
getImplicitGlobalProjectDir config =
--TEST no warning printed
liftM fst $ tryDeprecatedPath
Nothing
dirExists
(implicitGlobalProjectDir stackRoot)
(implicitGlobalProjectDirDeprecated ... | 473 | getImplicitGlobalProjectDir
:: (MonadIO m, MonadLogger m)
=> Config -> m (Path Abs Dir)
getImplicitGlobalProjectDir config =
--TEST no warning printed
liftM fst $ tryDeprecatedPath
Nothing
dirExists
(implicitGlobalProjectDir stackRoot)
(implicitGlobalProjectDirDeprecated ... | 473 | getImplicitGlobalProjectDir config =
--TEST no warning printed
liftM fst $ tryDeprecatedPath
Nothing
dirExists
(implicitGlobalProjectDir stackRoot)
(implicitGlobalProjectDirDeprecated stackRoot)
where
stackRoot = configStackRoot config
-- | If deprecated path exists, use i... | 377 | false | true | 3 | 10 | 107 | 97 | 44 | 53 | null | null |
kawu/data-named | src/Data/Named/Graph.hs | bsd-2-clause | prune :: Ord w => NeForest n w -> NeForest n w
prune = unSpanForest . run . chop . sortForest . spanForest | 106 | prune :: Ord w => NeForest n w -> NeForest n w
prune = unSpanForest . run . chop . sortForest . spanForest | 106 | prune = unSpanForest . run . chop . sortForest . spanForest | 59 | false | true | 1 | 8 | 22 | 55 | 24 | 31 | null | null |
tpsinnem/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | termSmallerThan x (Constant c) = True | 37 | termSmallerThan x (Constant c) = True | 37 | termSmallerThan x (Constant c) = True | 37 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
fmthoma/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | -- | Returns true for values or value-like expressions. These are lambdas,
-- constructors / CONLIKE functions (as determined by the function argument)
-- or PAPs.
--
exprIsHNFlike :: (Var -> Bool) -> (Unfolding -> Bool) -> CoreExpr -> Bool
exprIsHNFlike is_con is_con_unf = is_hnf_like
where
is_hnf_like (Var v) -... | 3,019 | exprIsHNFlike :: (Var -> Bool) -> (Unfolding -> Bool) -> CoreExpr -> Bool
exprIsHNFlike is_con is_con_unf = is_hnf_like
where
is_hnf_like (Var v) -- NB: There are no value args at this point
= is_con v -- Catches nullary constructors,
-- so that [] and () are values, for ... | 2,852 | exprIsHNFlike is_con is_con_unf = is_hnf_like
where
is_hnf_like (Var v) -- NB: There are no value args at this point
= is_con v -- Catches nullary constructors,
-- so that [] and () are values, for example
|| idArity v > 0 -- Catches (e.g.) primops that don't have ... | 2,778 | true | true | 8 | 10 | 1,011 | 493 | 240 | 253 | null | null |
charleso/haskell-in-haste | src/Chat/Data.hs | bsd-3-clause | noMessage :: IO (Maybe String)
noMessage = return Nothing | 57 | noMessage :: IO (Maybe String)
noMessage = return Nothing | 57 | noMessage = return Nothing | 26 | false | true | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
mariefarrell/Hets | Temporal/ModalCaslToCtl.hs | gpl-2.0 | convert (Casl.E (Casl.W' phi psi)) = convert (Casl.E (Casl.Pnot phi `Casl.U'`
Casl.Pand phi psi)) | 105 | convert (Casl.E (Casl.W' phi psi)) = convert (Casl.E (Casl.Pnot phi `Casl.U'`
Casl.Pand phi psi)) | 105 | convert (Casl.E (Casl.W' phi psi)) = convert (Casl.E (Casl.Pnot phi `Casl.U'`
Casl.Pand phi psi)) | 105 | false | false | 0 | 11 | 21 | 61 | 30 | 31 | null | null |
dinkelk/job-server | JobServer.hs | mit | exampleLongJob :: String -> IO (Int)
exampleLongJob n = do putStrLn $ ".... Running job: " ++ n
threadDelay 10000000
putStrLn $ ".... Finishing job: " ++ n
return 2 | 230 | exampleLongJob :: String -> IO (Int)
exampleLongJob n = do putStrLn $ ".... Running job: " ++ n
threadDelay 10000000
putStrLn $ ".... Finishing job: " ++ n
return 2 | 230 | exampleLongJob n = do putStrLn $ ".... Running job: " ++ n
threadDelay 10000000
putStrLn $ ".... Finishing job: " ++ n
return 2 | 193 | false | true | 0 | 9 | 95 | 63 | 27 | 36 | null | null |
contivero/hasmin | src/Hasmin/Parser/Value.hs | bsd-3-clause | -- | Given a propery name, it returns a specific parser of values for that
-- property. Fails if no specific parser is found.
valuesFor :: Text -> Parser Values
valuesFor propName = maybe mzero (<* skipComments) parser
where parser = Map.lookup (T.toLower propName) propertyValueParsersMap
-- A map relating dimension... | 528 | valuesFor :: Text -> Parser Values
valuesFor propName = maybe mzero (<* skipComments) parser
where parser = Map.lookup (T.toLower propName) propertyValueParsersMap
-- A map relating dimension units and the percentage symbol,
-- to functions that construct that value. Meant to unify all the numerical
-- parsing in a ... | 402 | valuesFor propName = maybe mzero (<* skipComments) parser
where parser = Map.lookup (T.toLower propName) propertyValueParsersMap
-- A map relating dimension units and the percentage symbol,
-- to functions that construct that value. Meant to unify all the numerical
-- parsing in a single parse for generality without... | 367 | true | true | 0 | 8 | 85 | 61 | 33 | 28 | null | null |
mrd/camfort | src/Camfort/Specification/Stencils.hs | apache-2.0 | --------------------------------------------------
-- Stencil specification inference --
--------------------------------------------------
-- Top-level of specification inference
infer :: InferMode -> Char -> Filename
-> F.ProgramFile Annotation
-> (String, F.ProgramFile Annotation)
infer mod... | 1,057 | infer :: InferMode -> Char -> Filename
-> F.ProgramFile Annotation
-> (String, F.ProgramFile Annotation)
infer mode marker filename pf =
-- Append filename to any outputs
if null output
then ("", fmap FA.prevAnnotation pf'')
else ("\n" ++ filename ++ "\n" ++ output, fmap FA.prevAnnotat... | 863 | infer mode marker filename pf =
-- Append filename to any outputs
if null output
then ("", fmap FA.prevAnnotation pf'')
else ("\n" ++ filename ++ "\n" ++ output, fmap FA.prevAnnotation pf'')
where
output = intercalate "\n"
. filter (not . white)
. map formatSpec... | 746 | true | true | 0 | 12 | 256 | 223 | 120 | 103 | null | null |
nvasilakis/pandoc | src/Text/Pandoc/Readers/HTML.hs | gpl-2.0 | isSpace '\r' = True | 19 | isSpace '\r' = True | 19 | isSpace '\r' = True | 19 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
TomMD/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | isAtomicHsExpr (HsLit {}) = True | 39 | isAtomicHsExpr (HsLit {}) = True | 39 | isAtomicHsExpr (HsLit {}) = True | 39 | false | false | 0 | 6 | 11 | 17 | 8 | 9 | null | null |
kejace/ethereum-client-haskell | src/Blockchain/VM/Opcodes.hs | bsd-3-clause | op2OpCode (MalformedOpcode byte) = [byte] | 41 | op2OpCode (MalformedOpcode byte) = [byte] | 41 | op2OpCode (MalformedOpcode byte) = [byte] | 41 | false | false | 0 | 7 | 4 | 18 | 9 | 9 | null | null |
haskell-distributed/distributed-process-task | tests/TestTaskQueues.hs | bsd-3-clause | tests :: NT.Transport -> IO [Test]
tests transport = do
localNode <- newLocalNode transport myRemoteTable
return [
testGroup "Task Execution And Prioritisation" [
testCase "Each execution blocks the submitter"
(delayedAssertion
"expected the server to return the task outcome"
... | 884 | tests :: NT.Transport -> IO [Test]
tests transport = do
localNode <- newLocalNode transport myRemoteTable
return [
testGroup "Task Execution And Prioritisation" [
testCase "Each execution blocks the submitter"
(delayedAssertion
"expected the server to return the task outcome"
... | 884 | tests transport = do
localNode <- newLocalNode transport myRemoteTable
return [
testGroup "Task Execution And Prioritisation" [
testCase "Each execution blocks the submitter"
(delayedAssertion
"expected the server to return the task outcome"
localNode (AsyncDone (Right "foo... | 848 | false | true | 0 | 18 | 245 | 154 | 76 | 78 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/Tuba.hs | bsd-3-clause | note6 :: Note
note6 = Note
(Pitch 97.999 31 "g2")
7
(Range
(NoteRange
(NoteRangeAmplitude 8231.91 84 1.0e-2)
(NoteRangeHarmonicFreq 1 97.99))
(NoteRange
(NoteRangeAmplitude 97.99 1 2457.0)
(NoteRangeHarmonicFreq 102 9995.89)))
[Harmonic 1 (... | 3,335 | note6 :: Note
note6 = Note
(Pitch 97.999 31 "g2")
7
(Range
(NoteRange
(NoteRangeAmplitude 8231.91 84 1.0e-2)
(NoteRangeHarmonicFreq 1 97.99))
(NoteRange
(NoteRangeAmplitude 97.99 1 2457.0)
(NoteRangeHarmonicFreq 102 9995.89)))
[Harmonic 1 (... | 3,335 | note6 = Note
(Pitch 97.999 31 "g2")
7
(Range
(NoteRange
(NoteRangeAmplitude 8231.91 84 1.0e-2)
(NoteRangeHarmonicFreq 1 97.99))
(NoteRange
(NoteRangeAmplitude 97.99 1 2457.0)
(NoteRangeHarmonicFreq 102 9995.89)))
[Harmonic 1 (-1.397) 2457.0... | 3,321 | false | true | 0 | 10 | 919 | 1,374 | 709 | 665 | null | null |
mitchellwrosen/language-lua2 | src/Language/Lua/Lexer.hs | bsd-3-clause | luaIntLit :: RE Char String
luaIntLit = hexLit <|> some digit
where
hexLit :: RE Char String
hexLit = (\a b c -> a:b:c)
<$> sym '0'
<*> oneOf "xX"
<*> some hexDigit | 181 | luaIntLit :: RE Char String
luaIntLit = hexLit <|> some digit
where
hexLit :: RE Char String
hexLit = (\a b c -> a:b:c)
<$> sym '0'
<*> oneOf "xX"
<*> some hexDigit | 181 | luaIntLit = hexLit <|> some digit
where
hexLit :: RE Char String
hexLit = (\a b c -> a:b:c)
<$> sym '0'
<*> oneOf "xX"
<*> some hexDigit | 153 | false | true | 11 | 8 | 49 | 103 | 48 | 55 | null | null |
ekmett/containers | tests/map-properties.hs | bsd-3-clause | test_unionsWith :: Assertion
test_unionsWith = unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
@?= fromList [(3, "bB3"), (5, "aAA3"), (7, "C")] | 218 | test_unionsWith :: Assertion
test_unionsWith = unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
@?= fromList [(3, "bB3"), (5, "aAA3"), (7, "C")] | 218 | test_unionsWith = unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
@?= fromList [(3, "bB3"), (5, "aAA3"), (7, "C")] | 189 | false | true | 2 | 10 | 34 | 144 | 85 | 59 | null | null |
Javran/Project-Euler | src/ProjectEuler/Problem113.hs | mit | {-
Original implementation:
f _ 0 = 0
f 1 _ = 1
f l d = f (l-1) d + f l (d-1)
g :: Int -> Int -> Int
g 1 0 = 0
g 1 _ = 1
g l d = g (l-1) d + if d == 9 then 0 else g l (d+1)
-}
{-
The implementation above can be further optimized into:
f, g :: Int -> Int -> Int
f l d = fst (combined !! (l-1... | 944 | combined :: [([Int], [Int])]
combined = iterate (evolve *** evolve) (seed, reverse seed)
where
seed = take 10 (0 : repeat 1)
evolve :: [Int] -> [Int]
evolve = tail . scanl' (+) 0
| 193 | combined = iterate (evolve *** evolve) (seed, reverse seed)
where
seed = take 10 (0 : repeat 1)
evolve :: [Int] -> [Int]
evolve = tail . scanl' (+) 0
| 164 | true | true | 0 | 8 | 265 | 104 | 59 | 45 | null | null |
lamdu/lamdu | src/Lamdu/Data/Export/JSON.hs | gpl-3.0 | importDef :: Definition (Val UUID) (Meta.PresentationMode, T.Tag, V.Var) -> T ViewM ()
importDef (Definition defBody defScheme (presentationMode, tag, globalId)) =
do
Property.setP (Anchors.assocPresentationMode globalId) presentationMode
Property.setP (Anchors.assocTag globalId) tag
bodyVal... | 520 | importDef :: Definition (Val UUID) (Meta.PresentationMode, T.Tag, V.Var) -> T ViewM ()
importDef (Definition defBody defScheme (presentationMode, tag, globalId)) =
do
Property.setP (Anchors.assocPresentationMode globalId) presentationMode
Property.setP (Anchors.assocTag globalId) tag
bodyVal... | 520 | importDef (Definition defBody defScheme (presentationMode, tag, globalId)) =
do
Property.setP (Anchors.assocPresentationMode globalId) presentationMode
Property.setP (Anchors.assocTag globalId) tag
bodyValI <- Lens.traverse writeValAtUUID defBody
Definition bodyValI defScheme () & Tr... | 433 | false | true | 0 | 10 | 104 | 165 | 80 | 85 | null | null |
narumij/matrix-as-xyz | src/Data/Ratio/ParseFloat.hs | bsd-3-clause | decimalPart :: Integral a => String -> Ratio a
decimalPart "" = 0 | 65 | decimalPart :: Integral a => String -> Ratio a
decimalPart "" = 0 | 65 | decimalPart "" = 0 | 18 | false | true | 0 | 8 | 12 | 33 | 14 | 19 | null | null |
brendanhay/network-metrics | src/Network/Metric/Sink/Ganglia.hs | mpl-2.0 | put :: Encodable a
=> Maybe Host
-> Group
-> Bucket
-> a
-> Slope
-> [BL.ByteString]
put host group bucket value slope = map run [putMetaData, putValue]
where
run f = runPut $ f metric
metric = defaultMetric
{ name = bucket
, group = group
, host = fromM... | 463 | put :: Encodable a
=> Maybe Host
-> Group
-> Bucket
-> a
-> Slope
-> [BL.ByteString]
put host group bucket value slope = map run [putMetaData, putValue]
where
run f = runPut $ f metric
metric = defaultMetric
{ name = bucket
, group = group
, host = fromM... | 463 | put host group bucket value slope = map run [putMetaData, putValue]
where
run f = runPut $ f metric
metric = defaultMetric
{ name = bucket
, group = group
, host = fromMaybe "" host
, value = encode value
, type' = determineType value
, slope = slope
... | 354 | false | true | 3 | 14 | 175 | 153 | 77 | 76 | null | null |
tnrangwi/grill | src/Console/CommandLine.hs | mit | -- Command line parsing
-- | Helper function to put property name / value into tuple
option :: String -- ^ Property name
-> String -- ^ Property value
-> (String, String)
option = (,) | 204 | option :: String -- ^ Property name
-> String -- ^ Property value
-> (String, String)
option = (,) | 118 | option = (,) | 12 | true | true | 0 | 7 | 55 | 32 | 20 | 12 | null | null |
brendanhay/gogol | gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/GetIAMPolicy.hs | mpl-2.0 | -- | V1 error format.
pjgipXgafv :: Lens' ProjectsJobsGetIAMPolicy (Maybe Xgafv)
pjgipXgafv
= lens _pjgipXgafv (\ s a -> s{_pjgipXgafv = a}) | 142 | pjgipXgafv :: Lens' ProjectsJobsGetIAMPolicy (Maybe Xgafv)
pjgipXgafv
= lens _pjgipXgafv (\ s a -> s{_pjgipXgafv = a}) | 120 | pjgipXgafv
= lens _pjgipXgafv (\ s a -> s{_pjgipXgafv = a}) | 61 | true | true | 1 | 9 | 23 | 50 | 25 | 25 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1CephFSVolumeSourceSecretFile' Lens
v1CephFSVolumeSourceSecretFileL :: Lens_' V1CephFSVolumeSource (Maybe Text)
v1CephFSVolumeSourceSecretFileL f V1CephFSVolumeSource{..} = (\v1CephFSVolumeSourceSecretFile -> V1CephFSVolumeSource { v1CephFSVolumeSourceSecretFile, ..} ) <$> f v1CephFSVolumeSourceSecretFile | 313 | v1CephFSVolumeSourceSecretFileL :: Lens_' V1CephFSVolumeSource (Maybe Text)
v1CephFSVolumeSourceSecretFileL f V1CephFSVolumeSource{..} = (\v1CephFSVolumeSourceSecretFile -> V1CephFSVolumeSource { v1CephFSVolumeSourceSecretFile, ..} ) <$> f v1CephFSVolumeSourceSecretFile | 270 | v1CephFSVolumeSourceSecretFileL f V1CephFSVolumeSource{..} = (\v1CephFSVolumeSourceSecretFile -> V1CephFSVolumeSource { v1CephFSVolumeSourceSecretFile, ..} ) <$> f v1CephFSVolumeSourceSecretFile | 194 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
conal/shady-graphics | src/Shady/Lighting.hs | agpl-3.0 | basicRV, basicNH :: BasicSh
basicRV = basic (reflection <.> lift eyeDir) | 72 | basicRV, basicNH :: BasicSh
basicRV = basic (reflection <.> lift eyeDir) | 72 | basicRV = basic (reflection <.> lift eyeDir) | 44 | false | true | 2 | 8 | 10 | 37 | 15 | 22 | null | null |
shlevy/hnix-store | hnix-store-remote/src/System/Nix/Store/Remote/Protocol.hs | mit | opNum CollectGarbage = 20 | 38 | opNum CollectGarbage = 20 | 38 | opNum CollectGarbage = 20 | 38 | false | false | 0 | 5 | 16 | 9 | 4 | 5 | null | null |
hansbugge/cubicaltt | TypeChecker.hs | mit | checkFam x = throwError $ "checkFam: " ++ show x | 48 | checkFam x = throwError $ "checkFam: " ++ show x | 48 | checkFam x = throwError $ "checkFam: " ++ show x | 48 | false | false | 0 | 6 | 9 | 20 | 9 | 11 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFDatatypeXsdIntegerTest.hs | lgpl-2.1 | sum02bwd =
[ [ "_:a a xsd_integer:Sum . "
, "_:a rdf:_1 \"52\"^^xsd:integer . "
, "_:a rdf:_2 \"31\"^^xsd:integer . "
]
, [ "_:a a xsd_integer:Sum . "
, "_:a rdf:_2 \"31\"^^xsd:integer . "
, "_:a rdf:_3 \"21\"^^xsd:integer . "
]
] | 287 | sum02bwd =
[ [ "_:a a xsd_integer:Sum . "
, "_:a rdf:_1 \"52\"^^xsd:integer . "
, "_:a rdf:_2 \"31\"^^xsd:integer . "
]
, [ "_:a a xsd_integer:Sum . "
, "_:a rdf:_2 \"31\"^^xsd:integer . "
, "_:a rdf:_3 \"21\"^^xsd:integer . "
]
] | 287 | sum02bwd =
[ [ "_:a a xsd_integer:Sum . "
, "_:a rdf:_1 \"52\"^^xsd:integer . "
, "_:a rdf:_2 \"31\"^^xsd:integer . "
]
, [ "_:a a xsd_integer:Sum . "
, "_:a rdf:_2 \"31\"^^xsd:integer . "
, "_:a rdf:_3 \"21\"^^xsd:integer . "
]
] | 287 | false | false | 0 | 6 | 99 | 30 | 19 | 11 | null | null |
MichaelXavier/vigilance | src/Utils/Vigilance/Types.hs | bsd-2-clause | defaultAcidPath :: FilePath
defaultAcidPath = vigilanceDir <> "/state/AppState" | 79 | defaultAcidPath :: FilePath
defaultAcidPath = vigilanceDir <> "/state/AppState" | 79 | defaultAcidPath = vigilanceDir <> "/state/AppState" | 51 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
spechub/Hets | ExtModal/Ship.hs | gpl-2.0 | lastIsPrim :: Proc -> Bool
lastIsPrim pr = case pr of
While _ p -> lastIsPrim p
IfElse _ _ p -> lastIsPrim p
Forall _ p -> lastIsPrim p
Switch l -> null l || lastIsPrim (snd $ last l)
_ -> isPrim pr | 208 | lastIsPrim :: Proc -> Bool
lastIsPrim pr = case pr of
While _ p -> lastIsPrim p
IfElse _ _ p -> lastIsPrim p
Forall _ p -> lastIsPrim p
Switch l -> null l || lastIsPrim (snd $ last l)
_ -> isPrim pr | 208 | lastIsPrim pr = case pr of
While _ p -> lastIsPrim p
IfElse _ _ p -> lastIsPrim p
Forall _ p -> lastIsPrim p
Switch l -> null l || lastIsPrim (snd $ last l)
_ -> isPrim pr | 181 | false | true | 7 | 7 | 54 | 90 | 45 | 45 | null | null |
DavidAlphaFox/ghc | libraries/containers/Data/Sequence.hs | bsd-3-clause | rigidify Empty = error "rigidify: empty tree" | 45 | rigidify Empty = error "rigidify: empty tree" | 45 | rigidify Empty = error "rigidify: empty tree" | 45 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
vTurbine/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | uFloatDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UFloat") | 63 | uFloatDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UFloat") | 63 | uFloatDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UFloat") | 63 | false | false | 0 | 7 | 6 | 17 | 8 | 9 | null | null |
bgwines/avalon-meta-comparison | Metas.hs | bsd-3-clause | -- 10
getMissionSize 10 1 = 4 | 29 | getMissionSize 10 1 = 4 | 23 | getMissionSize 10 1 = 4 | 23 | true | false | 0 | 5 | 6 | 12 | 6 | 6 | null | null |
mainland/nikola | src/Data/Vector/CUDA/Storable.hs | bsd-3-clause | fold1M' = G.fold1M' | 19 | fold1M' = G.fold1M' | 19 | fold1M' = G.fold1M' | 19 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
beni55/hermit | src/HERMIT/Dictionary/Navigation.hs | bsd-2-clause | underConsideration TypeExpr (ExprCore (Type _)) = True | 65 | underConsideration TypeExpr (ExprCore (Type _)) = True | 65 | underConsideration TypeExpr (ExprCore (Type _)) = True | 65 | false | false | 0 | 9 | 17 | 23 | 11 | 12 | null | null |
typelead/epm | epm/Distribution/Client/Utils.hs | bsd-3-clause | inDir (Just d) m = do
old <- getCurrentDirectory
setCurrentDirectory d
m `Exception.finally` setCurrentDirectory old | 122 | inDir (Just d) m = do
old <- getCurrentDirectory
setCurrentDirectory d
m `Exception.finally` setCurrentDirectory old | 122 | inDir (Just d) m = do
old <- getCurrentDirectory
setCurrentDirectory d
m `Exception.finally` setCurrentDirectory old | 122 | false | false | 0 | 8 | 20 | 44 | 20 | 24 | null | null |
pacak/sqroll | src/Database/Sqroll/Flexible.hs | bsd-3-clause | selectPeek LteExp{} s n = peekResult s n | 40 | selectPeek LteExp{} s n = peekResult s n | 40 | selectPeek LteExp{} s n = peekResult s n | 40 | false | false | 0 | 6 | 7 | 22 | 10 | 12 | null | null |
plow-technologies/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | keyToText :: BackendKey DB.MongoContext -> Text
keyToText = T.pack . show . unMongoKey | 86 | keyToText :: BackendKey DB.MongoContext -> Text
keyToText = T.pack . show . unMongoKey | 86 | keyToText = T.pack . show . unMongoKey | 38 | false | true | 2 | 8 | 12 | 39 | 16 | 23 | null | null |
BartAdv/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | zext :: IntTy -> IntTy -> [Const] -> Maybe Const
zext from ITBig val = intToInt from ITBig val | 94 | zext :: IntTy -> IntTy -> [Const] -> Maybe Const
zext from ITBig val = intToInt from ITBig val | 94 | zext from ITBig val = intToInt from ITBig val | 45 | false | true | 0 | 9 | 18 | 49 | 22 | 27 | null | null |
geekingfrog/advent-of-code | src/Y2017/Day07.hs | bsd-3-clause | progLine = do
name <- progName
space
cost <- read <$> between (char '(') (char ')') (many digitChar)
c <- children
pure (Prog name cost, c) | 159 | progLine = do
name <- progName
space
cost <- read <$> between (char '(') (char ')') (many digitChar)
c <- children
pure (Prog name cost, c) | 159 | progLine = do
name <- progName
space
cost <- read <$> between (char '(') (char ')') (many digitChar)
c <- children
pure (Prog name cost, c) | 159 | false | false | 0 | 11 | 45 | 76 | 35 | 41 | null | null |
Pitometsu/bake | src/Development/Bake/Core/Message.hs | bsd-3-clause | messageFromInput (Input msg args body) = Left $ "Invalid API call, got " ++ show msg | 84 | messageFromInput (Input msg args body) = Left $ "Invalid API call, got " ++ show msg | 84 | messageFromInput (Input msg args body) = Left $ "Invalid API call, got " ++ show msg | 84 | false | false | 0 | 7 | 15 | 30 | 14 | 16 | null | null |
TomMD/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | setIdUnfolding :: Id -> Unfolding -> Id
setIdUnfolding id unfolding = modifyIdInfo (`setUnfoldingInfo` unfolding) id | 116 | setIdUnfolding :: Id -> Unfolding -> Id
setIdUnfolding id unfolding = modifyIdInfo (`setUnfoldingInfo` unfolding) id | 116 | setIdUnfolding id unfolding = modifyIdInfo (`setUnfoldingInfo` unfolding) id | 76 | false | true | 0 | 8 | 14 | 40 | 20 | 20 | null | null |
Mokosha/HsTetrisAttack | TetrisAttack/Cursor.hs | mit | commandToCursor :: Cursor -> CursorCommand -> Cursor
commandToCursor ((x, y), p) CursorCommand'MoveLeft = clampCursor ((x - 1, y), p) | 133 | commandToCursor :: Cursor -> CursorCommand -> Cursor
commandToCursor ((x, y), p) CursorCommand'MoveLeft = clampCursor ((x - 1, y), p) | 133 | commandToCursor ((x, y), p) CursorCommand'MoveLeft = clampCursor ((x - 1, y), p) | 80 | false | true | 0 | 8 | 18 | 55 | 31 | 24 | null | null |
adnelson/nix-binary-cache | src/Nix/Cache/Client.hs | mit | getNarInfo :: StorePath -> NixClient (Maybe NarInfo)
getNarInfo path = inSemaphore $ do
ncDebug $ "Requesting narinfo for " <> tshow path
clientRequestEither (fetchNarInfo $ NarInfoReq (spPrefix path)) >>= \case
Right info -> do
forM_ (NarInfo.sig info) $ \sig -> do
cache <- ncoReferenceCache <$> ... | 704 | getNarInfo :: StorePath -> NixClient (Maybe NarInfo)
getNarInfo path = inSemaphore $ do
ncDebug $ "Requesting narinfo for " <> tshow path
clientRequestEither (fetchNarInfo $ NarInfoReq (spPrefix path)) >>= \case
Right info -> do
forM_ (NarInfo.sig info) $ \sig -> do
cache <- ncoReferenceCache <$> ... | 704 | getNarInfo path = inSemaphore $ do
ncDebug $ "Requesting narinfo for " <> tshow path
clientRequestEither (fetchNarInfo $ NarInfoReq (spPrefix path)) >>= \case
Right info -> do
forM_ (NarInfo.sig info) $ \sig -> do
cache <- ncoReferenceCache <$> ask
liftIO $ recordSignature cache path sig
... | 651 | false | true | 0 | 19 | 162 | 183 | 85 | 98 | null | null |
arybczak/happstack-server | attic/Examples/AllIn.hs | bsd-3-clause | cleanSessions age = proxyUpdate $ do
t <- getTime
let minTime = t-age
modSession $ M.filterWithKey (\k _ -> k>t)
return ()
-- The type sig is required for reasons I don't understand | 319 | cleanSessions age = proxyUpdate $ do
t <- getTime
let minTime = t-age
modSession $ M.filterWithKey (\k _ -> k>t)
return ()
-- The type sig is required for reasons I don't understand | 319 | cleanSessions age = proxyUpdate $ do
t <- getTime
let minTime = t-age
modSession $ M.filterWithKey (\k _ -> k>t)
return ()
-- The type sig is required for reasons I don't understand | 319 | false | false | 0 | 12 | 170 | 68 | 32 | 36 | null | null |
pap/postgrest | src/PostgREST/Error.hs | mit | httpStatus :: PgError -> HT.Status
httpStatus (H.TxError (P.ErroneousResult codeBS _ _ _)) =
let code = cs codeBS in
case code of
'0':'8':_ -> HT.status503 -- pg connection err
'0':'9':_ -> HT.status500 -- triggered action exception
'0':'L':_ -> HT.status403 -- invalid grantor
'0':'P':_ -> HT.status... | 1,325 | httpStatus :: PgError -> HT.Status
httpStatus (H.TxError (P.ErroneousResult codeBS _ _ _)) =
let code = cs codeBS in
case code of
'0':'8':_ -> HT.status503 -- pg connection err
'0':'9':_ -> HT.status500 -- triggered action exception
'0':'L':_ -> HT.status403 -- invalid grantor
'0':'P':_ -> HT.status... | 1,325 | httpStatus (H.TxError (P.ErroneousResult codeBS _ _ _)) =
let code = cs codeBS in
case code of
'0':'8':_ -> HT.status503 -- pg connection err
'0':'9':_ -> HT.status500 -- triggered action exception
'0':'L':_ -> HT.status403 -- invalid grantor
'0':'P':_ -> HT.status403 -- invalid role specification
... | 1,290 | false | true | 43 | 10 | 266 | 370 | 199 | 171 | null | null |
HIPERFIT/futhark | src/Futhark/IR/Prop/Types.hs | isc | diet (Acc _ _ _ Nonunique) = Observe | 36 | diet (Acc _ _ _ Nonunique) = Observe | 36 | diet (Acc _ _ _ Nonunique) = Observe | 36 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
google/codeworld | codeworld-base/src/Extras/Colors.hs | apache-2.0 | byName ("darkolivegreen") = colorNamed' ("#556b2f") | 51 | byName ("darkolivegreen") = colorNamed' ("#556b2f") | 51 | byName ("darkolivegreen") = colorNamed' ("#556b2f") | 51 | false | false | 0 | 6 | 4 | 18 | 9 | 9 | null | null |
jcsaenzcarrasco/MPhil-thesis | frwFS.hs | mit | limitsG :: GraphFRW -> (Vertex,Vertex)
limitsG g = (l,u)
where ((l,_),(u,_)) = bounds g | 91 | limitsG :: GraphFRW -> (Vertex,Vertex)
limitsG g = (l,u)
where ((l,_),(u,_)) = bounds g | 90 | limitsG g = (l,u)
where ((l,_),(u,_)) = bounds g | 51 | false | true | 0 | 8 | 17 | 65 | 35 | 30 | null | null |
elieux/ghc | compiler/main/DynFlags.hs | bsd-3-clause | parseModuleName :: ReadP ModuleName
parseModuleName = fmap mkModuleName
$ munch1 (\c -> isAlphaNum c || c `elem` "_.") | 134 | parseModuleName :: ReadP ModuleName
parseModuleName = fmap mkModuleName
$ munch1 (\c -> isAlphaNum c || c `elem` "_.") | 134 | parseModuleName = fmap mkModuleName
$ munch1 (\c -> isAlphaNum c || c `elem` "_.") | 98 | false | true | 3 | 10 | 33 | 49 | 23 | 26 | null | null |
bjin/monad-lrs | Math/LinearRecursive/Internal/Matrix.hs | bsd-3-clause | inverseMatrixDiag1 (Matrix ma) = matrix (gauss ma')
where
n = length ma
ma' = [ri ++ [if i == j then 1 else 0 | j <- [0..n-1]] | (i, ri) <- zip [0..] ma] | 163 | inverseMatrixDiag1 (Matrix ma) = matrix (gauss ma')
where
n = length ma
ma' = [ri ++ [if i == j then 1 else 0 | j <- [0..n-1]] | (i, ri) <- zip [0..] ma] | 163 | inverseMatrixDiag1 (Matrix ma) = matrix (gauss ma')
where
n = length ma
ma' = [ri ++ [if i == j then 1 else 0 | j <- [0..n-1]] | (i, ri) <- zip [0..] ma] | 163 | false | false | 1 | 12 | 44 | 102 | 53 | 49 | null | null |
ihc/futhark | src/Futhark/CodeGen/SetDefaultSpace.hs | isc | setBodySpace space (Assert e msg loc) =
Assert (setExpSpace space e) msg loc | 78 | setBodySpace space (Assert e msg loc) =
Assert (setExpSpace space e) msg loc | 78 | setBodySpace space (Assert e msg loc) =
Assert (setExpSpace space e) msg loc | 78 | false | false | 0 | 7 | 14 | 36 | 17 | 19 | null | null |
kawamuray/ganeti | src/Ganeti/OpParams.hs | gpl-2.0 | pHypervisor :: Field
pHypervisor =
withDoc "Selected hypervisor for an instance" .
optionalField $
simpleField "hypervisor" [t| Hypervisor |] | 147 | pHypervisor :: Field
pHypervisor =
withDoc "Selected hypervisor for an instance" .
optionalField $
simpleField "hypervisor" [t| Hypervisor |] | 147 | pHypervisor =
withDoc "Selected hypervisor for an instance" .
optionalField $
simpleField "hypervisor" [t| Hypervisor |] | 126 | false | true | 0 | 7 | 24 | 31 | 17 | 14 | null | null |
ddssff/lens | src/System/IO/Error/Lens.hs | bsd-3-clause | -- * IOErrorType Prisms
--
_AlreadyExists :: Prism' IOErrorType ()
_AlreadyExists = only AlreadyExists | 103 | _AlreadyExists :: Prism' IOErrorType ()
_AlreadyExists = only AlreadyExists | 75 | _AlreadyExists = only AlreadyExists | 35 | true | true | 0 | 6 | 14 | 23 | 12 | 11 | null | null |
lowasser/TrieMap | Data/TrieMap/Utils.hs | bsd-3-clause | mapInput :: (Unpackable a, Unpackable b) => (a -> b) -> (b :~> c) -> (a :~> c)
mapInput f func = unpack $ \ a -> func $~ f a | 124 | mapInput :: (Unpackable a, Unpackable b) => (a -> b) -> (b :~> c) -> (a :~> c)
mapInput f func = unpack $ \ a -> func $~ f a | 124 | mapInput f func = unpack $ \ a -> func $~ f a | 45 | false | true | 2 | 11 | 30 | 82 | 41 | 41 | null | null |
Javran/tuppence | src/Kantour/MapTool/Main.hs | mit | mkPointMap :: [V2 Int] -> [MyLine] -> M.Map (V2 Int) String
mkPointMap beginNodes xs = M.union beginNodeNames endNodeNames
where
beginNodeNames = M.fromList (zip beginNodes (formatName <$> [1 :: Int ..]))
where
formatName x = "<" ++ show x ++ ">"
-- collect all possible names and pick the minim... | 759 | mkPointMap :: [V2 Int] -> [MyLine] -> M.Map (V2 Int) String
mkPointMap beginNodes xs = M.union beginNodeNames endNodeNames
where
beginNodeNames = M.fromList (zip beginNodes (formatName <$> [1 :: Int ..]))
where
formatName x = "<" ++ show x ++ ">"
-- collect all possible names and pick the minim... | 759 | mkPointMap beginNodes xs = M.union beginNodeNames endNodeNames
where
beginNodeNames = M.fromList (zip beginNodes (formatName <$> [1 :: Int ..]))
where
formatName x = "<" ++ show x ++ ">"
-- collect all possible names and pick the minimal one
endNodeNames =
M.map
getMin
... | 699 | false | true | 4 | 11 | 233 | 318 | 155 | 163 | null | null |
elbrujohalcon/hfiar | src/HFiaR/Server.hs | bsd-3-clause | runIn :: ServerHandle -- ^ The handle of the server that will run the action
-> HFiaRT IO a -- ^ The action to be run
-> IO a
runIn server action = runHere $ do
me <- self
sendTo (handle server) $ action >>= sendTo me
... | 415 | runIn :: ServerHandle -- ^ The handle of the server that will run the action
-> HFiaRT IO a -- ^ The action to be run
-> IO a
runIn server action = runHere $ do
me <- self
sendTo (handle server) $ action >>= sendTo me
... | 415 | runIn server action = runHere $ do
me <- self
sendTo (handle server) $ action >>= sendTo me
recv
-- | Stops the server. Usage:
-- @
-- stop serverhandle
-- @ | 271 | false | true | 0 | 12 | 192 | 80 | 38 | 42 | null | null |
ellis/OnTopOfThings | old-20150308/src/OnTopOfThings/Commands/Export.hs | gpl-3.0 | modeInfo_export :: ModeInfo
modeInfo_export = (mode_export, ModeRunIO optsRun_export) | 85 | modeInfo_export :: ModeInfo
modeInfo_export = (mode_export, ModeRunIO optsRun_export) | 85 | modeInfo_export = (mode_export, ModeRunIO optsRun_export) | 57 | false | true | 0 | 6 | 7 | 20 | 11 | 9 | null | null |
ghc-android/ghc | compiler/hsSyn/HsTypes.hs | bsd-3-clause | -- Put the parens in where the user did
-- But we still use the precedence stuff to add parens because
-- toHsType doesn't put in any HsParTys, so we may still need them
ppr_mono_ty ctxt_prec (HsDocTy ty doc)
= maybeParen ctxt_prec TyOpPrec $
ppr_mono_lty TyOpPrec ty <+> ppr (unLoc doc) | 301 | ppr_mono_ty ctxt_prec (HsDocTy ty doc)
= maybeParen ctxt_prec TyOpPrec $
ppr_mono_lty TyOpPrec ty <+> ppr (unLoc doc) | 123 | ppr_mono_ty ctxt_prec (HsDocTy ty doc)
= maybeParen ctxt_prec TyOpPrec $
ppr_mono_lty TyOpPrec ty <+> ppr (unLoc doc) | 123 | true | false | 0 | 8 | 64 | 49 | 24 | 25 | null | null |
matklad/mu | src/Main.hs | mit | space :: Parser String
space = many1 (charp isSpace) | 52 | space :: Parser String
space = many1 (charp isSpace) | 52 | space = many1 (charp isSpace) | 29 | false | true | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
a143753/AOJ | 2252.hs | apache-2.0 | ans s =
let l = length $ p $ map (\a -> elem a r) s
in
l - 1 | 77 | ans s =
let l = length $ p $ map (\a -> elem a r) s
in
l - 1 | 77 | ans s =
let l = length $ p $ map (\a -> elem a r) s
in
l - 1 | 77 | false | false | 0 | 13 | 37 | 50 | 24 | 26 | null | null |
gcross/LogicGrowsOnTrees | LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Examples/Queens/Advanced.hs | bsd-2-clause | {-| Converts coordinates of type 'Int' to type 'Word'. -}
convertSolutionToWord :: [(Int,Int)] → [(Word,Word)]
convertSolutionToWord = map (fromIntegral *** fromIntegral) | 170 | convertSolutionToWord :: [(Int,Int)] → [(Word,Word)]
convertSolutionToWord = map (fromIntegral *** fromIntegral) | 112 | convertSolutionToWord = map (fromIntegral *** fromIntegral) | 59 | true | true | 0 | 7 | 20 | 44 | 26 | 18 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.