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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stormont/continuous-hs
|
Main.hs
|
mit
|
howUsage :: IO ()
showUsage = do
let header = "Usage: continuous-hs [OPTIONS...]"
putStrLn $ usageInfo header options
exitFailure
| 143
|
showUsage :: IO ()
showUsage = do
let header = "Usage: continuous-hs [OPTIONS...]"
putStrLn $ usageInfo header options
exitFailure
| 142
|
showUsage = do
let header = "Usage: continuous-hs [OPTIONS...]"
putStrLn $ usageInfo header options
exitFailure
| 123
| false
| true
| 0
| 9
| 32
| 40
| 18
| 22
| null | null |
aelve/hslibs
|
src/Guide/Api/Types.hs
|
bsd-3-clause
|
bridgeUid :: Uid a -> Uid b
bridgeUid (Uid t) = Uid t
| 53
|
bridgeUid :: Uid a -> Uid b
bridgeUid (Uid t) = Uid t
| 53
|
bridgeUid (Uid t) = Uid t
| 25
| false
| true
| 0
| 9
| 12
| 37
| 16
| 21
| null | null |
alphalambda/codeworld
|
funblocks-client/src/Blocks/Printer.hs
|
apache-2.0
|
intercalation :: T.Text -> [a] -> (a -> Printer) -> Printer
intercalation sep items func = do
case length items of
1 -> func $ head items
_ -> let --firsts = take (length items - 1) items
--last_ = tail items
(body,feet) = splitAt (length items - 1) items
in do
mapM_ (\i -> func i >> write_ sep) body
mapM_ (\i -> func i) feet
| 397
|
intercalation :: T.Text -> [a] -> (a -> Printer) -> Printer
intercalation sep items func = do
case length items of
1 -> func $ head items
_ -> let --firsts = take (length items - 1) items
--last_ = tail items
(body,feet) = splitAt (length items - 1) items
in do
mapM_ (\i -> func i >> write_ sep) body
mapM_ (\i -> func i) feet
| 397
|
intercalation sep items func = do
case length items of
1 -> func $ head items
_ -> let --firsts = take (length items - 1) items
--last_ = tail items
(body,feet) = splitAt (length items - 1) items
in do
mapM_ (\i -> func i >> write_ sep) body
mapM_ (\i -> func i) feet
| 337
| false
| true
| 0
| 18
| 136
| 151
| 74
| 77
| null | null |
meteogrid/sigym-core
|
src/SIGyM/Store/Generation.hs
|
bsd-3-clause
|
getTime :: Generation UTCTime
getTime = asks currentTime
| 56
|
getTime :: Generation UTCTime
getTime = asks currentTime
| 56
|
getTime = asks currentTime
| 26
| false
| true
| 1
| 5
| 7
| 21
| 8
| 13
| null | null |
iamkingmaker/HLearn
|
examples/old/spam_classification/perceptron.hs
|
bsd-3-clause
|
main = do
args <- getArgs
let trainfile_name = head args
let testfile_name = last args
train_lines <- B.lines `fmap` B.readFile trainfile_name
let instances = map parseText train_lines
let m = train instances :: Perceptron Int DataPoint
test_lines <- B.lines `fmap` B.readFile testfile_name
let tests = map parseText test_lines
let results = map (classifyInstance m) tests
print $ (fromIntegral (accuracy results)) / (fromIntegral (length results))
| 475
|
main = do
args <- getArgs
let trainfile_name = head args
let testfile_name = last args
train_lines <- B.lines `fmap` B.readFile trainfile_name
let instances = map parseText train_lines
let m = train instances :: Perceptron Int DataPoint
test_lines <- B.lines `fmap` B.readFile testfile_name
let tests = map parseText test_lines
let results = map (classifyInstance m) tests
print $ (fromIntegral (accuracy results)) / (fromIntegral (length results))
| 475
|
main = do
args <- getArgs
let trainfile_name = head args
let testfile_name = last args
train_lines <- B.lines `fmap` B.readFile trainfile_name
let instances = map parseText train_lines
let m = train instances :: Perceptron Int DataPoint
test_lines <- B.lines `fmap` B.readFile testfile_name
let tests = map parseText test_lines
let results = map (classifyInstance m) tests
print $ (fromIntegral (accuracy results)) / (fromIntegral (length results))
| 475
| false
| false
| 0
| 12
| 91
| 180
| 83
| 97
| null | null |
ppenzin/up
|
src/Pkg.hs
|
bsd-2-clause
|
{-|Run `portsnap fetch update'
|TODO enable first-time runs (fetch-extract)
|-}
portsnapFetchUpdate :: IO ()
portsnapFetchUpdate = putStrLn ("Fetching with portsnap:")
>> callProcess "portsnap" ["fetch", "update"]
| 235
|
portsnapFetchUpdate :: IO ()
portsnapFetchUpdate = putStrLn ("Fetching with portsnap:")
>> callProcess "portsnap" ["fetch", "update"]
| 151
|
portsnapFetchUpdate = putStrLn ("Fetching with portsnap:")
>> callProcess "portsnap" ["fetch", "update"]
| 122
| true
| true
| 0
| 7
| 46
| 38
| 20
| 18
| null | null |
dysinger/amazonka
|
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
|
mpl-2.0
|
-- | A description of the app.
appDescription :: Lens' App (Maybe Text)
appDescription = lens _appDescription (\s a -> s { _appDescription = a })
| 145
|
appDescription :: Lens' App (Maybe Text)
appDescription = lens _appDescription (\s a -> s { _appDescription = a })
| 114
|
appDescription = lens _appDescription (\s a -> s { _appDescription = a })
| 73
| true
| true
| 0
| 9
| 25
| 46
| 25
| 21
| null | null |
Gurrt/software-testing
|
week-6/Lecture6.hs
|
mit
|
apdoor :: (Integer,Integer) -> Integer -> Integer
trapdoor = rsa_encode
| 75
|
trapdoor :: (Integer,Integer) -> Integer -> Integer
trapdoor = rsa_encode
| 73
|
trapdoor = rsa_encode
| 21
| false
| true
| 0
| 6
| 13
| 25
| 14
| 11
| null | null |
TOSPIO/yi
|
src/library/Yi/Tab.hs
|
gpl-2.0
|
relayout :: Tab -> Tab
relayout t = t { tabLayout = buildLayout (tabWindows t) (tabLayoutManager t) (tabLayout t) }
| 115
|
relayout :: Tab -> Tab
relayout t = t { tabLayout = buildLayout (tabWindows t) (tabLayoutManager t) (tabLayout t) }
| 115
|
relayout t = t { tabLayout = buildLayout (tabWindows t) (tabLayoutManager t) (tabLayout t) }
| 92
| false
| true
| 0
| 9
| 19
| 51
| 26
| 25
| null | null |
snoyberg/photosorter
|
fay/Language/Fay/JQuery.hs
|
bsd-2-clause
|
findSelector :: String -> JQuery -> Fay JQuery
findSelector = ffi "%2['find'](%1)"
| 82
|
findSelector :: String -> JQuery -> Fay JQuery
findSelector = ffi "%2['find'](%1)"
| 82
|
findSelector = ffi "%2['find'](%1)"
| 35
| false
| true
| 0
| 7
| 11
| 25
| 12
| 13
| null | null |
herngyi/hmol
|
Geometry.hs
|
gpl-3.0
|
origin :: Point
origin = Vector 0 0 0
| 38
|
origin :: Point
origin = Vector 0 0 0
| 37
|
origin = Vector 0 0 0
| 21
| false
| true
| 0
| 6
| 9
| 26
| 10
| 16
| null | null |
seL4/capDL-tool
|
CapDL/State.hs
|
bsd-2-clause
|
pdSlots :: SlotsLookup
pdSlots ref m = case maybeObject ref m of
Just (PD slots) -> slots
Just (PT slots) -> slots
_ -> Map.empty
| 141
|
pdSlots :: SlotsLookup
pdSlots ref m = case maybeObject ref m of
Just (PD slots) -> slots
Just (PT slots) -> slots
_ -> Map.empty
| 141
|
pdSlots ref m = case maybeObject ref m of
Just (PD slots) -> slots
Just (PT slots) -> slots
_ -> Map.empty
| 118
| false
| true
| 0
| 10
| 36
| 69
| 31
| 38
| null | null |
rdnetto/powerline-hs
|
src/Util.hs
|
apache-2.0
|
mapLast f xs = xs' ++ [f xn] where
(xs', xn) = splitEnd xs
| 62
|
mapLast f xs = xs' ++ [f xn] where
(xs', xn) = splitEnd xs
| 62
|
mapLast f xs = xs' ++ [f xn] where
(xs', xn) = splitEnd xs
| 62
| false
| false
| 0
| 7
| 17
| 37
| 19
| 18
| null | null |
wilbowma/accelerate
|
Data/Array/Accelerate/Interpreter.hs
|
bsd-3-clause
|
evalPrim (PrimLtEq ty) = evalLtEq ty
| 47
|
evalPrim (PrimLtEq ty) = evalLtEq ty
| 47
|
evalPrim (PrimLtEq ty) = evalLtEq ty
| 47
| false
| false
| 0
| 7
| 16
| 18
| 8
| 10
| null | null |
Teaspot-Studio/Urho3D-Haskell
|
app/sample04/Main.hs
|
mit
|
-- | Read input and moves the camera.
moveCamera :: SharedPtr Application -> Ptr Node -> Float -> CameraData -> IO CameraData
moveCamera app cameraNode t camData = do
(ui :: Ptr UI) <- fromJustTrace "UI" <$> getSubsystem app
-- Do not move if the UI has a focused element (the console)
mFocusElem <- uiFocusElement ui
whenNothing mFocusElem camData $ do
(input :: Ptr Input) <- fromJustTrace "Input" <$> getSubsystem app
-- Movement speed as world units per second
let moveSpeed = 20
-- Mouse sensitivity as degrees per pixel
let mouseSensitivity = 0.1
-- Use this frame's mouse motion to adjust camera node yaw and pitch. Clamp the pitch between -90 and 90 degrees
mouseMove <- inputGetMouseMove input
let yaw = camYaw camData + mouseSensitivity * fromIntegral (mouseMove ^. x)
let pitch = clamp (-90) 90 $ camPitch camData + mouseSensitivity * fromIntegral (mouseMove ^. y)
-- Construct new orientation for the camera scene node from yaw and pitch. Roll is fixed to zero
nodeSetRotation cameraNode $ quaternionFromEuler pitch yaw 0
-- Read WASD keys and move the camera scene node to the corresponding direction if they are pressed
-- Use the Translate() function (default local space) to move relative to the node's orientation.
whenM (inputGetKeyDown input KeyW) $
nodeTranslate cameraNode (vec3Forward `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyS) $
nodeTranslate cameraNode (vec3Back `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyA) $
nodeTranslate cameraNode (vec3Left `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyD) $
nodeTranslate cameraNode (vec3Right `mul` (moveSpeed * t)) TSLocal
return camData {
camYaw = yaw
, camPitch = pitch
}
where
mul (Vector3 a b c) v = Vector3 (a*v) (b*v) (c*v)
-- | Subscribe to application-wide logic update events.
| 1,947
|
moveCamera :: SharedPtr Application -> Ptr Node -> Float -> CameraData -> IO CameraData
moveCamera app cameraNode t camData = do
(ui :: Ptr UI) <- fromJustTrace "UI" <$> getSubsystem app
-- Do not move if the UI has a focused element (the console)
mFocusElem <- uiFocusElement ui
whenNothing mFocusElem camData $ do
(input :: Ptr Input) <- fromJustTrace "Input" <$> getSubsystem app
-- Movement speed as world units per second
let moveSpeed = 20
-- Mouse sensitivity as degrees per pixel
let mouseSensitivity = 0.1
-- Use this frame's mouse motion to adjust camera node yaw and pitch. Clamp the pitch between -90 and 90 degrees
mouseMove <- inputGetMouseMove input
let yaw = camYaw camData + mouseSensitivity * fromIntegral (mouseMove ^. x)
let pitch = clamp (-90) 90 $ camPitch camData + mouseSensitivity * fromIntegral (mouseMove ^. y)
-- Construct new orientation for the camera scene node from yaw and pitch. Roll is fixed to zero
nodeSetRotation cameraNode $ quaternionFromEuler pitch yaw 0
-- Read WASD keys and move the camera scene node to the corresponding direction if they are pressed
-- Use the Translate() function (default local space) to move relative to the node's orientation.
whenM (inputGetKeyDown input KeyW) $
nodeTranslate cameraNode (vec3Forward `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyS) $
nodeTranslate cameraNode (vec3Back `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyA) $
nodeTranslate cameraNode (vec3Left `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyD) $
nodeTranslate cameraNode (vec3Right `mul` (moveSpeed * t)) TSLocal
return camData {
camYaw = yaw
, camPitch = pitch
}
where
mul (Vector3 a b c) v = Vector3 (a*v) (b*v) (c*v)
-- | Subscribe to application-wide logic update events.
| 1,909
|
moveCamera app cameraNode t camData = do
(ui :: Ptr UI) <- fromJustTrace "UI" <$> getSubsystem app
-- Do not move if the UI has a focused element (the console)
mFocusElem <- uiFocusElement ui
whenNothing mFocusElem camData $ do
(input :: Ptr Input) <- fromJustTrace "Input" <$> getSubsystem app
-- Movement speed as world units per second
let moveSpeed = 20
-- Mouse sensitivity as degrees per pixel
let mouseSensitivity = 0.1
-- Use this frame's mouse motion to adjust camera node yaw and pitch. Clamp the pitch between -90 and 90 degrees
mouseMove <- inputGetMouseMove input
let yaw = camYaw camData + mouseSensitivity * fromIntegral (mouseMove ^. x)
let pitch = clamp (-90) 90 $ camPitch camData + mouseSensitivity * fromIntegral (mouseMove ^. y)
-- Construct new orientation for the camera scene node from yaw and pitch. Roll is fixed to zero
nodeSetRotation cameraNode $ quaternionFromEuler pitch yaw 0
-- Read WASD keys and move the camera scene node to the corresponding direction if they are pressed
-- Use the Translate() function (default local space) to move relative to the node's orientation.
whenM (inputGetKeyDown input KeyW) $
nodeTranslate cameraNode (vec3Forward `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyS) $
nodeTranslate cameraNode (vec3Back `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyA) $
nodeTranslate cameraNode (vec3Left `mul` (moveSpeed * t)) TSLocal
whenM (inputGetKeyDown input KeyD) $
nodeTranslate cameraNode (vec3Right `mul` (moveSpeed * t)) TSLocal
return camData {
camYaw = yaw
, camPitch = pitch
}
where
mul (Vector3 a b c) v = Vector3 (a*v) (b*v) (c*v)
-- | Subscribe to application-wide logic update events.
| 1,821
| true
| true
| 1
| 18
| 424
| 492
| 239
| 253
| null | null |
ssaavedra/liquidhaskell
|
tests/pos/Class.hs
|
bsd-3-clause
|
{-@ bob :: xs:MList a -> {v:Nat | v = size xs} @-}
bob :: MList a -> Int
bob = length
| 85
|
bob :: MList a -> Int
bob = length
| 34
|
bob = length
| 12
| true
| true
| 0
| 7
| 21
| 26
| 11
| 15
| null | null |
royopa/pandoc
|
pandoc.hs
|
gpl-2.0
|
-- Determine default writer based on output file extension
defaultWriterName :: FilePath -> String
defaultWriterName "-" = "html"
| 129
|
defaultWriterName :: FilePath -> String
defaultWriterName "-" = "html"
| 70
|
defaultWriterName "-" = "html"
| 30
| true
| true
| 0
| 5
| 17
| 19
| 10
| 9
| null | null |
zenhack/dedup-backup
|
tests/TestUtil.hs
|
gpl-3.0
|
-- | Write the given tree out to the filesystem. Unlike the effects of
-- @doAction@, this doesn't require an existing file tree somewhere else.
-- This makes it possible to use @writeTree@ with a randomly generated
-- value (from quickcheck).
--
-- Note that there is some missing information that is normally pulled from the
-- src directory. We fill it in as follows:
--
-- * The contents of the file are all zeros, with a size matching that
-- specified by the status.
-- * Symlinks always link to a file whose name consists of '#' characters,
-- and is of the right length to match the status's size.
writeTree :: (DDB.FileStatus s) => Bool -> FilePath -> DDB.FileTree s -> IO ()
writeTree shouldChown path (DDB.Directory status contents) = do
createDirectoryIfMissing True path
forM_ (M.toList contents) (\(name, subtree) ->
writeTree shouldChown (path // name) subtree)
DDB.syncMetadata shouldChown path status
| 941
|
writeTree :: (DDB.FileStatus s) => Bool -> FilePath -> DDB.FileTree s -> IO ()
writeTree shouldChown path (DDB.Directory status contents) = do
createDirectoryIfMissing True path
forM_ (M.toList contents) (\(name, subtree) ->
writeTree shouldChown (path // name) subtree)
DDB.syncMetadata shouldChown path status
| 331
|
writeTree shouldChown path (DDB.Directory status contents) = do
createDirectoryIfMissing True path
forM_ (M.toList contents) (\(name, subtree) ->
writeTree shouldChown (path // name) subtree)
DDB.syncMetadata shouldChown path status
| 252
| true
| true
| 0
| 12
| 176
| 137
| 73
| 64
| null | null |
ajnsit/snap-routes
|
src/Routes/Parse.hs
|
mit
|
drop1Slash :: String -> String
drop1Slash ('/':x) = x
| 53
|
drop1Slash :: String -> String
drop1Slash ('/':x) = x
| 53
|
drop1Slash ('/':x) = x
| 22
| false
| true
| 0
| 6
| 8
| 29
| 14
| 15
| null | null |
timthelion/haskarrow
|
dist/build/autogen/Paths_haskarrow.hs
|
gpl-3.0
|
getDataFileName :: FilePath -> IO FilePath
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name)
| 118
|
getDataFileName :: FilePath -> IO FilePath
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name)
| 118
|
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name)
| 75
| false
| true
| 0
| 11
| 22
| 50
| 22
| 28
| null | null |
amplify-education/filestore
|
Data/FileStore/Git.hs
|
bsd-3-clause
|
gitInit :: FilePath -> IO ()
gitInit repo = do
exists <- doesDirectoryExist repo
when exists $ withVerifyDir repo $ throwIO RepositoryExists
createDirectoryIfMissing True repo
(status, err, _) <- runGitCommand repo "init" []
if status == ExitSuccess
then do
-- Add the post-update hook, so that changes made remotely via git
-- will be reflected in the working directory.
postupdatepath <- getDataFileName $ "extra" </> "post-update"
postupdatecontents <- B.readFile postupdatepath
let postupdate = repo </> ".git" </> "hooks" </> "post-update"
B.writeFile postupdate postupdatecontents
perms <- getPermissions postupdate
setPermissions postupdate (perms {executable = True})
-- Set up repo to allow push to current branch
(status', err', _) <- runGitCommand repo "config" ["receive.denyCurrentBranch","ignore"]
if status' == ExitSuccess
then return ()
else throwIO $ UnknownError $ "git config failed:\n" ++ err'
else throwIO $ UnknownError $ "git-init failed:\n" ++ err
-- | Commit changes to a resource. Raise 'Unchanged' exception if there were
-- no changes.
| 1,183
|
gitInit :: FilePath -> IO ()
gitInit repo = do
exists <- doesDirectoryExist repo
when exists $ withVerifyDir repo $ throwIO RepositoryExists
createDirectoryIfMissing True repo
(status, err, _) <- runGitCommand repo "init" []
if status == ExitSuccess
then do
-- Add the post-update hook, so that changes made remotely via git
-- will be reflected in the working directory.
postupdatepath <- getDataFileName $ "extra" </> "post-update"
postupdatecontents <- B.readFile postupdatepath
let postupdate = repo </> ".git" </> "hooks" </> "post-update"
B.writeFile postupdate postupdatecontents
perms <- getPermissions postupdate
setPermissions postupdate (perms {executable = True})
-- Set up repo to allow push to current branch
(status', err', _) <- runGitCommand repo "config" ["receive.denyCurrentBranch","ignore"]
if status' == ExitSuccess
then return ()
else throwIO $ UnknownError $ "git config failed:\n" ++ err'
else throwIO $ UnknownError $ "git-init failed:\n" ++ err
-- | Commit changes to a resource. Raise 'Unchanged' exception if there were
-- no changes.
| 1,183
|
gitInit repo = do
exists <- doesDirectoryExist repo
when exists $ withVerifyDir repo $ throwIO RepositoryExists
createDirectoryIfMissing True repo
(status, err, _) <- runGitCommand repo "init" []
if status == ExitSuccess
then do
-- Add the post-update hook, so that changes made remotely via git
-- will be reflected in the working directory.
postupdatepath <- getDataFileName $ "extra" </> "post-update"
postupdatecontents <- B.readFile postupdatepath
let postupdate = repo </> ".git" </> "hooks" </> "post-update"
B.writeFile postupdate postupdatecontents
perms <- getPermissions postupdate
setPermissions postupdate (perms {executable = True})
-- Set up repo to allow push to current branch
(status', err', _) <- runGitCommand repo "config" ["receive.denyCurrentBranch","ignore"]
if status' == ExitSuccess
then return ()
else throwIO $ UnknownError $ "git config failed:\n" ++ err'
else throwIO $ UnknownError $ "git-init failed:\n" ++ err
-- | Commit changes to a resource. Raise 'Unchanged' exception if there were
-- no changes.
| 1,154
| false
| true
| 0
| 15
| 272
| 271
| 131
| 140
| null | null |
nomeata/cryptonite
|
Crypto/Random/Entropy/Unsafe.hs
|
bsd-3-clause
|
-- | Refill the entropy in a buffer
--
-- call each entropy backend in turn until the buffer has
-- been replenish.
--
-- If the buffer cannot be refill after 3 loopings, this will raise
-- an User Error exception
replenish :: Int -> [EntropyBackend] -> Ptr Word8 -> IO ()
replenish _ [] _ = fail "cryptonite: random: cannot get any source of entropy on this system"
| 381
|
replenish :: Int -> [EntropyBackend] -> Ptr Word8 -> IO ()
replenish _ [] _ = fail "cryptonite: random: cannot get any source of entropy on this system"
| 167
|
replenish _ [] _ = fail "cryptonite: random: cannot get any source of entropy on this system"
| 108
| true
| true
| 0
| 9
| 84
| 53
| 29
| 24
| null | null |
foreverbell/unlimited-plt-toys
|
tapl/simplesub/Type.hs
|
bsd-3-clause
|
-- | Algorithmic typing.
typeOf :: Term -> TermType
typeOf t = go makeEmptyContext t
| 84
|
typeOf :: Term -> TermType
typeOf t = go makeEmptyContext t
| 59
|
typeOf t = go makeEmptyContext t
| 32
| true
| true
| 0
| 5
| 14
| 24
| 12
| 12
| null | null |
svenssonjoel/ObsidianGFX
|
Examples/Simple/HistogramExec.hs
|
bsd-3-clause
|
performLarge =
withCUDA $
do
kern <- capture 256 (histogram 256 256)
useVector (V.fromList [0..65535 :: Word32]) $ \i ->
allocaVector 65536 $ \ (m :: CUDAVector Word32) ->
do
fill m 0
exec $ (1,kern) <:> m <> i
r <- peekCUDAVector m
lift $ putStrLn $ show r
| 328
|
performLarge =
withCUDA $
do
kern <- capture 256 (histogram 256 256)
useVector (V.fromList [0..65535 :: Word32]) $ \i ->
allocaVector 65536 $ \ (m :: CUDAVector Word32) ->
do
fill m 0
exec $ (1,kern) <:> m <> i
r <- peekCUDAVector m
lift $ putStrLn $ show r
| 328
|
performLarge =
withCUDA $
do
kern <- capture 256 (histogram 256 256)
useVector (V.fromList [0..65535 :: Word32]) $ \i ->
allocaVector 65536 $ \ (m :: CUDAVector Word32) ->
do
fill m 0
exec $ (1,kern) <:> m <> i
r <- peekCUDAVector m
lift $ putStrLn $ show r
| 328
| false
| false
| 0
| 17
| 120
| 136
| 65
| 71
| null | null |
mrkm4ntr/functional-poker
|
src/Cards.hs
|
bsd-3-clause
|
showCardNumber 10 = "10"
| 24
|
showCardNumber 10 = "10"
| 24
|
showCardNumber 10 = "10"
| 24
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
pparkkin/eta
|
compiler/ETA/Rename/RnTypes.hs
|
bsd-3-clause
|
badInstTy :: LHsType RdrName -> SDoc
badInstTy ty = ptext (sLit "Malformed instance:") <+> ppr ty
| 97
|
badInstTy :: LHsType RdrName -> SDoc
badInstTy ty = ptext (sLit "Malformed instance:") <+> ppr ty
| 97
|
badInstTy ty = ptext (sLit "Malformed instance:") <+> ppr ty
| 60
| false
| true
| 0
| 7
| 15
| 42
| 18
| 24
| null | null |
apyrgio/ganeti
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
oobStatusUnknown :: String
oobStatusUnknown = Types.oobStatusToRaw OobStatusUnknown
| 83
|
oobStatusUnknown :: String
oobStatusUnknown = Types.oobStatusToRaw OobStatusUnknown
| 83
|
oobStatusUnknown = Types.oobStatusToRaw OobStatusUnknown
| 56
| false
| true
| 0
| 6
| 6
| 16
| 8
| 8
| null | null |
jean-edouard/manager
|
apptool/OVF/Manifest.hs
|
gpl-2.0
|
parseManifest :: String -> Either ParseError Manifest
parseManifest input = parse manifest_p "" input
| 101
|
parseManifest :: String -> Either ParseError Manifest
parseManifest input = parse manifest_p "" input
| 101
|
parseManifest input = parse manifest_p "" input
| 47
| false
| true
| 0
| 7
| 13
| 36
| 15
| 21
| null | null |
kindl/Hypatia
|
src/Lexer.hs
|
mit
|
advance (Position l c) _ =
Position l (c + 1)
| 49
|
advance (Position l c) _ =
Position l (c + 1)
| 49
|
advance (Position l c) _ =
Position l (c + 1)
| 49
| false
| false
| 0
| 7
| 14
| 31
| 15
| 16
| null | null |
spechub/Hets
|
CSL/AnEvenTool.hs
|
gpl-2.0
|
testWithMapleGen :: Int -> PC.DTime -> MapleIO b -> ([Named CMD] -> MapleIO a)
-> String -> String -> IO (MITrans, a)
testWithMapleGen v to = testWithCASGen rf where
rf adg =
runWithMaple adg v to
[ "EnCLFunctions"
{- , "intpakX" -- Problems with the min,max functions,
they are remapped by this package! -}
]
| 404
|
testWithMapleGen :: Int -> PC.DTime -> MapleIO b -> ([Named CMD] -> MapleIO a)
-> String -> String -> IO (MITrans, a)
testWithMapleGen v to = testWithCASGen rf where
rf adg =
runWithMaple adg v to
[ "EnCLFunctions"
{- , "intpakX" -- Problems with the min,max functions,
they are remapped by this package! -}
]
| 404
|
testWithMapleGen v to = testWithCASGen rf where
rf adg =
runWithMaple adg v to
[ "EnCLFunctions"
{- , "intpakX" -- Problems with the min,max functions,
they are remapped by this package! -}
]
| 265
| false
| true
| 0
| 12
| 149
| 96
| 48
| 48
| null | null |
gbwey/persistent
|
persistent-template/Database/Persist/TH.hs
|
mit
|
-- | Use the 'SqlPersist' backend.
sqlSettings :: MkPersistSettings
sqlSettings = mkPersistSettings $ ConT ''SqlBackend
| 119
|
sqlSettings :: MkPersistSettings
sqlSettings = mkPersistSettings $ ConT ''SqlBackend
| 84
|
sqlSettings = mkPersistSettings $ ConT ''SqlBackend
| 51
| true
| true
| 0
| 7
| 14
| 21
| 11
| 10
| null | null |
diku-dk/futhark
|
src/Futhark/Test.hs
|
isc
|
determineTuning :: MonadIO m => Maybe FilePath -> FilePath -> m ([String], String)
determineTuning Nothing _ = pure ([], mempty)
| 128
|
determineTuning :: MonadIO m => Maybe FilePath -> FilePath -> m ([String], String)
determineTuning Nothing _ = pure ([], mempty)
| 128
|
determineTuning Nothing _ = pure ([], mempty)
| 45
| false
| true
| 0
| 10
| 19
| 57
| 29
| 28
| null | null |
rfranek/duckling
|
Duckling/Ranking/Classifiers/ET.hs
|
bsd-3-clause
|
classifiers :: Classifiers
classifiers = HashMap.fromList []
| 60
|
classifiers :: Classifiers
classifiers = HashMap.fromList []
| 60
|
classifiers = HashMap.fromList []
| 33
| false
| true
| 0
| 6
| 6
| 18
| 9
| 9
| null | null |
ostronom/pokerstars-audit
|
src/Parser/HTML.hs
|
bsd-3-clause
|
table :: Producer
table = between tableStart tableEnd
where
tableStart t = isTagOpenName "TABLE" t && fromAttrib "class" t == "ex"
tableEnd t = isTagCloseName "TABLE" t
| 178
|
table :: Producer
table = between tableStart tableEnd
where
tableStart t = isTagOpenName "TABLE" t && fromAttrib "class" t == "ex"
tableEnd t = isTagCloseName "TABLE" t
| 178
|
table = between tableStart tableEnd
where
tableStart t = isTagOpenName "TABLE" t && fromAttrib "class" t == "ex"
tableEnd t = isTagCloseName "TABLE" t
| 160
| false
| true
| 4
| 6
| 36
| 75
| 28
| 47
| null | null |
diagrams/diagrams-contrib
|
src/Diagrams/Color/XKCD.hs
|
bsd-3-clause
|
brightSkyBlue = fromJust $ readHexColor "#02ccfe"
| 57
|
brightSkyBlue = fromJust $ readHexColor "#02ccfe"
| 57
|
brightSkyBlue = fromJust $ readHexColor "#02ccfe"
| 57
| false
| false
| 0
| 6
| 13
| 13
| 6
| 7
| null | null |
rueshyna/gogol
|
gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Product.hs
|
mpl-2.0
|
-- | The first day the recurring transfer is scheduled to run. Required.
sScheduleStartDate :: Lens' Schedule (Maybe Date)
sScheduleStartDate
= lens _sScheduleStartDate
(\ s a -> s{_sScheduleStartDate = a})
| 214
|
sScheduleStartDate :: Lens' Schedule (Maybe Date)
sScheduleStartDate
= lens _sScheduleStartDate
(\ s a -> s{_sScheduleStartDate = a})
| 141
|
sScheduleStartDate
= lens _sScheduleStartDate
(\ s a -> s{_sScheduleStartDate = a})
| 91
| true
| true
| 0
| 8
| 37
| 49
| 25
| 24
| null | null |
green-haskell/ghc
|
compiler/cmm/CLabel.hs
|
bsd-3-clause
|
pprCLbl (CaseLabel u CaseDefault)
= hcat [pprUnique u, ptext (sLit "_dflt")]
| 78
|
pprCLbl (CaseLabel u CaseDefault)
= hcat [pprUnique u, ptext (sLit "_dflt")]
| 78
|
pprCLbl (CaseLabel u CaseDefault)
= hcat [pprUnique u, ptext (sLit "_dflt")]
| 78
| false
| false
| 0
| 9
| 12
| 38
| 18
| 20
| null | null |
rjackson90/cartographer
|
src/Main.hs
|
mit
|
toBoard :: P.Point -> Point
toBoard point = (rescale . fst $ point, rescale . snd $ point)
where rescale x = ((fromIntegral x) * tileSize) - (boardSize / 2.0)
| 162
|
toBoard :: P.Point -> Point
toBoard point = (rescale . fst $ point, rescale . snd $ point)
where rescale x = ((fromIntegral x) * tileSize) - (boardSize / 2.0)
| 162
|
toBoard point = (rescale . fst $ point, rescale . snd $ point)
where rescale x = ((fromIntegral x) * tileSize) - (boardSize / 2.0)
| 134
| false
| true
| 1
| 9
| 33
| 86
| 41
| 45
| null | null |
geekingfrog/project-euler
|
Problem030.hs
|
gpl-3.0
|
-- n * 9^5 < 9..9 (n digits) for n = 6
answer :: Int
answer = sum $ filter (\x -> x == sumOfPower 5 x) [2..999999]
| 115
|
answer :: Int
answer = sum $ filter (\x -> x == sumOfPower 5 x) [2..999999]
| 75
|
answer = sum $ filter (\x -> x == sumOfPower 5 x) [2..999999]
| 61
| true
| true
| 2
| 9
| 28
| 51
| 24
| 27
| null | null |
ekmett/ghc
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
pgm_L :: DynFlags -> String
pgm_L dflags = sPgm_L (settings dflags)
| 83
|
pgm_L :: DynFlags -> String
pgm_L dflags = sPgm_L (settings dflags)
| 83
|
pgm_L dflags = sPgm_L (settings dflags)
| 39
| false
| true
| 0
| 7
| 26
| 33
| 14
| 19
| null | null |
gridaphobe/ghc
|
compiler/deSugar/Coverage.hs
|
bsd-3-clause
|
getState :: TM TickTransState
getState = TM $ \ _ st -> (st, noFVs, st)
| 71
|
getState :: TM TickTransState
getState = TM $ \ _ st -> (st, noFVs, st)
| 71
|
getState = TM $ \ _ st -> (st, noFVs, st)
| 41
| false
| true
| 0
| 7
| 14
| 34
| 19
| 15
| null | null |
sos22/ppres
|
ppres/driver/Debug.hs
|
gpl-2.0
|
nrStringsPerBuffer :: Int
nrStringsPerBuffer = 1000
| 51
|
nrStringsPerBuffer :: Int
nrStringsPerBuffer = 1000
| 51
|
nrStringsPerBuffer = 1000
| 25
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
pbv/codex
|
src/Codex/Tester/Utils.hs
|
mit
|
unsafeExec :: FilePath -- ^ command
-> [String] -- ^ arguments
-> Text -- ^ stdin
-> IO (ExitCode, Text, Text) -- ^ code, stdout, stderr
unsafeExec exec args inp = do
(code, out, err) <-
readProcessWithExitCode exec args (T.unpack inp)
return (code, T.pack out, T.pack err)
--
-- get comand line arguments from metadata field values
-- first list are keys that take arguments;
-- second list are keys that control on/off switches
--
| 535
|
unsafeExec :: FilePath -- ^ command
-> [String] -- ^ arguments
-> Text -- ^ stdin
-> IO (ExitCode, Text, Text)
unsafeExec exec args inp = do
(code, out, err) <-
readProcessWithExitCode exec args (T.unpack inp)
return (code, T.pack out, T.pack err)
--
-- get comand line arguments from metadata field values
-- first list are keys that take arguments;
-- second list are keys that control on/off switches
--
| 509
|
unsafeExec exec args inp = do
(code, out, err) <-
readProcessWithExitCode exec args (T.unpack inp)
return (code, T.pack out, T.pack err)
--
-- get comand line arguments from metadata field values
-- first list are keys that take arguments;
-- second list are keys that control on/off switches
--
| 314
| true
| true
| 0
| 11
| 177
| 110
| 61
| 49
| null | null |
ihc/futhark
|
src/Futhark/Representation/Kernels/Simplify.hs
|
isc
|
-- If a kernel produces something invariant to the kernel, turn it
-- into a replicate.
removeInvariantKernelResults :: (LocalScope (Lore m) m,
MonadBinder m,
Lore m ~ Wise Kernels) =>
TopDownRule m
removeInvariantKernelResults vtable (Let (Pattern [] kpes) attr
(Op (Kernel desc space ts (KernelBody _ kstms kres)))) = do
(ts', kpes', kres') <-
unzip3 <$> filterM checkForInvarianceResult (zip3 ts kpes kres)
-- Check if we did anything at all.
when (kres == kres')
cannotSimplify
addStm $ Let (Pattern [] kpes') attr $ Op $ Kernel desc space ts' $
mkWiseKernelBody () kstms kres'
where isInvariant Constant{} = True
isInvariant (Var v) = isJust $ ST.lookup v vtable
num_threads = spaceNumThreads space
space_dims = map snd $ spaceDimensions space
checkForInvarianceResult (_, pe, ThreadsReturn threads se)
| isInvariant se =
case threads of
AllThreads -> do
letBindNames'_ [patElemName pe] $ BasicOp $
Replicate (Shape [num_threads]) se
return False
ThreadsInSpace -> do
let rep a d = BasicOp . Replicate (Shape [d]) <$> letSubExp "rep" a
letBindNames'_ [patElemName pe] =<<
foldM rep (BasicOp (SubExp se)) (reverse space_dims)
return False
_ -> return True
checkForInvarianceResult _ =
return True
| 1,615
|
removeInvariantKernelResults :: (LocalScope (Lore m) m,
MonadBinder m,
Lore m ~ Wise Kernels) =>
TopDownRule m
removeInvariantKernelResults vtable (Let (Pattern [] kpes) attr
(Op (Kernel desc space ts (KernelBody _ kstms kres)))) = do
(ts', kpes', kres') <-
unzip3 <$> filterM checkForInvarianceResult (zip3 ts kpes kres)
-- Check if we did anything at all.
when (kres == kres')
cannotSimplify
addStm $ Let (Pattern [] kpes') attr $ Op $ Kernel desc space ts' $
mkWiseKernelBody () kstms kres'
where isInvariant Constant{} = True
isInvariant (Var v) = isJust $ ST.lookup v vtable
num_threads = spaceNumThreads space
space_dims = map snd $ spaceDimensions space
checkForInvarianceResult (_, pe, ThreadsReturn threads se)
| isInvariant se =
case threads of
AllThreads -> do
letBindNames'_ [patElemName pe] $ BasicOp $
Replicate (Shape [num_threads]) se
return False
ThreadsInSpace -> do
let rep a d = BasicOp . Replicate (Shape [d]) <$> letSubExp "rep" a
letBindNames'_ [patElemName pe] =<<
foldM rep (BasicOp (SubExp se)) (reverse space_dims)
return False
_ -> return True
checkForInvarianceResult _ =
return True
| 1,526
|
removeInvariantKernelResults vtable (Let (Pattern [] kpes) attr
(Op (Kernel desc space ts (KernelBody _ kstms kres)))) = do
(ts', kpes', kres') <-
unzip3 <$> filterM checkForInvarianceResult (zip3 ts kpes kres)
-- Check if we did anything at all.
when (kres == kres')
cannotSimplify
addStm $ Let (Pattern [] kpes') attr $ Op $ Kernel desc space ts' $
mkWiseKernelBody () kstms kres'
where isInvariant Constant{} = True
isInvariant (Var v) = isJust $ ST.lookup v vtable
num_threads = spaceNumThreads space
space_dims = map snd $ spaceDimensions space
checkForInvarianceResult (_, pe, ThreadsReturn threads se)
| isInvariant se =
case threads of
AllThreads -> do
letBindNames'_ [patElemName pe] $ BasicOp $
Replicate (Shape [num_threads]) se
return False
ThreadsInSpace -> do
let rep a d = BasicOp . Replicate (Shape [d]) <$> letSubExp "rep" a
letBindNames'_ [patElemName pe] =<<
foldM rep (BasicOp (SubExp se)) (reverse space_dims)
return False
_ -> return True
checkForInvarianceResult _ =
return True
| 1,317
| true
| true
| 0
| 19
| 600
| 463
| 221
| 242
| null | null |
google/hs-niche-containers
|
catena/src/Data/Catena.hs
|
apache-2.0
|
-- | Convert a 'Catena' back to a list.
toList :: Catena a -> [a]
toList = F.toList
| 83
|
toList :: Catena a -> [a]
toList = F.toList
| 43
|
toList = F.toList
| 17
| true
| true
| 0
| 6
| 17
| 24
| 13
| 11
| null | null |
equational/JL2012
|
HaskellExamples/src/MMM.hs
|
mit
|
(>>=) = bind
| 12
|
(>>=) = bind
| 12
|
(>>=) = bind
| 12
| false
| false
| 0
| 4
| 2
| 8
| 5
| 3
| null | null |
forked-upstream-packages-for-ghcjs/ghc
|
compiler/types/TyCon.hs
|
bsd-3-clause
|
okParent :: Name -> TyConParent -> Bool
okParent _ NoParentTyCon = True
| 91
|
okParent :: Name -> TyConParent -> Bool
okParent _ NoParentTyCon = True
| 91
|
okParent _ NoParentTyCon = True
| 51
| false
| true
| 0
| 6
| 31
| 24
| 12
| 12
| null | null |
ruicc/chat-server
|
src/Types.hs
|
mit
|
------------------------------------------------------------------------------------------
-- | Server
newServer :: Log.LogChan -> Log.StatChan -> Log.ErrorChan -> IO Server
newServer logCh statCh erCh = runCIO return $ do
let
gs <- newTVarCIO IM.empty
return $ Server gs logCh statCh erCh
| 303
|
newServer :: Log.LogChan -> Log.StatChan -> Log.ErrorChan -> IO Server
newServer logCh statCh erCh = runCIO return $ do
let
gs <- newTVarCIO IM.empty
return $ Server gs logCh statCh erCh
| 199
|
newServer logCh statCh erCh = runCIO return $ do
let
gs <- newTVarCIO IM.empty
return $ Server gs logCh statCh erCh
| 128
| true
| true
| 0
| 11
| 48
| 84
| 38
| 46
| null | null |
olsner/ghc
|
compiler/basicTypes/Module.hs
|
bsd-3-clause
|
-- See Note [ModuleEnv performance and determinism]
moduleEnvElts :: ModuleEnv a -> [a]
moduleEnvElts e = map snd $ moduleEnvToList e
| 134
|
moduleEnvElts :: ModuleEnv a -> [a]
moduleEnvElts e = map snd $ moduleEnvToList e
| 81
|
moduleEnvElts e = map snd $ moduleEnvToList e
| 45
| true
| true
| 0
| 6
| 21
| 35
| 17
| 18
| null | null |
chreekat/snowdrift
|
View/Comment.hs
|
agpl-3.0
|
retractCommentFormWidget = closureFormWidget' "retract" . retractCommentForm
| 77
|
retractCommentFormWidget = closureFormWidget' "retract" . retractCommentForm
| 77
|
retractCommentFormWidget = closureFormWidget' "retract" . retractCommentForm
| 77
| false
| false
| 0
| 6
| 6
| 13
| 6
| 7
| null | null |
christiaanb/ghc
|
compiler/prelude/TysPrim.hs
|
bsd-3-clause
|
superKindTyConName, anyKindTyConName, liftedTypeKindTyConName,
openTypeKindTyConName, unliftedTypeKindTyConName,
constraintKindTyConName
:: Name
superKindTyCon = mkKindTyCon superKindTyConName superKind
| 232
|
superKindTyConName, anyKindTyConName, liftedTypeKindTyConName,
openTypeKindTyConName, unliftedTypeKindTyConName,
constraintKindTyConName
:: Name
superKindTyCon = mkKindTyCon superKindTyConName superKind
| 231
|
superKindTyCon = mkKindTyCon superKindTyConName superKind
| 71
| false
| true
| 3
| 5
| 42
| 33
| 18
| 15
| null | null |
wdanilo/container
|
src/Data/Container/Opts.hs
|
apache-2.0
|
withTransFunc f = transFunc . appFunc f
| 39
|
withTransFunc f = transFunc . appFunc f
| 39
|
withTransFunc f = transFunc . appFunc f
| 39
| false
| false
| 2
| 5
| 6
| 20
| 7
| 13
| null | null |
sboosali/commands-frontend-DragonNaturallySpeaking
|
sources/Commands/Frontends/Dragon13/Serialize.hs
|
bsd-3-clause
|
serializeRHS (DNSOptional r) = "[" <> serializeRHS r <> "]"
| 76
|
serializeRHS (DNSOptional r) = "[" <> serializeRHS r <> "]"
| 76
|
serializeRHS (DNSOptional r) = "[" <> serializeRHS r <> "]"
| 76
| false
| false
| 0
| 7
| 26
| 26
| 12
| 14
| null | null |
seereason/ghcjs
|
src/Compiler/DriverPipeline.hs
|
mit
|
ghcLinkInfoSectionName :: String
ghcLinkInfoSectionName = ".debug-ghc-link-info"
| 80
|
ghcLinkInfoSectionName :: String
ghcLinkInfoSectionName = ".debug-ghc-link-info"
| 80
|
ghcLinkInfoSectionName = ".debug-ghc-link-info"
| 47
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
vTurbine/ghc
|
compiler/basicTypes/Module.hs
|
bsd-3-clause
|
stableModuleCmp :: Module -> Module -> Ordering
stableModuleCmp (Module p1 n1) (Module p2 n2)
= (p1 `stableUnitIdCmp` p2) `thenCmp`
(n1 `stableModuleNameCmp` n2)
| 170
|
stableModuleCmp :: Module -> Module -> Ordering
stableModuleCmp (Module p1 n1) (Module p2 n2)
= (p1 `stableUnitIdCmp` p2) `thenCmp`
(n1 `stableModuleNameCmp` n2)
| 170
|
stableModuleCmp (Module p1 n1) (Module p2 n2)
= (p1 `stableUnitIdCmp` p2) `thenCmp`
(n1 `stableModuleNameCmp` n2)
| 122
| false
| true
| 0
| 10
| 30
| 70
| 37
| 33
| null | null |
davmre/matrizer
|
src/matrizer_cmd/Tests.hs
|
gpl-2.0
|
pythonTestdir = (combine testdir "gen_python")
| 46
|
pythonTestdir = (combine testdir "gen_python")
| 46
|
pythonTestdir = (combine testdir "gen_python")
| 46
| false
| false
| 0
| 6
| 4
| 14
| 7
| 7
| null | null |
jfischoff/Sharpen
|
src/Numeric/MaxEnt/Deconvolution/Internal.hs
|
bsd-3-clause
|
roundTrip :: Double -> [[Double]] -> Either String [[Double]]
roundTrip var image = deconvolve2D 1000 (gsamples var width height) $
(gaussianConvolve2D var image) where
width = length . head $ image
height = length image
| 241
|
roundTrip :: Double -> [[Double]] -> Either String [[Double]]
roundTrip var image = deconvolve2D 1000 (gsamples var width height) $
(gaussianConvolve2D var image) where
width = length . head $ image
height = length image
| 241
|
roundTrip var image = deconvolve2D 1000 (gsamples var width height) $
(gaussianConvolve2D var image) where
width = length . head $ image
height = length image
| 179
| false
| true
| 0
| 9
| 55
| 91
| 47
| 44
| null | null |
dysinger/amazonka
|
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeTapeRecoveryPoints.hs
|
mpl-2.0
|
-- | An opaque string that indicates the position at which the virtual tape
-- recovery points that were listed for description ended.
--
-- Use this marker in your next request to list the next set of virtual tape
-- recovery points in the list. If there are no more recovery points to
-- describe, this field does not appear in the response.
dtrprMarker :: Lens' DescribeTapeRecoveryPointsResponse (Maybe Text)
dtrprMarker = lens _dtrprMarker (\s a -> s { _dtrprMarker = a })
| 477
|
dtrprMarker :: Lens' DescribeTapeRecoveryPointsResponse (Maybe Text)
dtrprMarker = lens _dtrprMarker (\s a -> s { _dtrprMarker = a })
| 133
|
dtrprMarker = lens _dtrprMarker (\s a -> s { _dtrprMarker = a })
| 64
| true
| true
| 0
| 9
| 82
| 51
| 30
| 21
| null | null |
TomMD/ghc
|
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
|
bsd-3-clause
|
split :: Type -> (Type, [Type]) -- Split into function and args
split t = go t []
where go (AppT t1 t2) args = go t1 (t2:args)
go ty args = (ty, args)
| 177
|
split :: Type -> (Type, [Type])
split t = go t []
where go (AppT t1 t2) args = go t1 (t2:args)
go ty args = (ty, args)
| 142
|
split t = go t []
where go (AppT t1 t2) args = go t1 (t2:args)
go ty args = (ty, args)
| 110
| true
| true
| 2
| 9
| 60
| 99
| 45
| 54
| null | null |
pparkkin/eta
|
compiler/ETA/Utils/UniqFM.hs
|
bsd-3-clause
|
seqEltsUFM :: ([elt] -> ()) -> UniqFM elt -> ()
seqEltsUFM seqList = seqList . nonDetEltsUFM
| 92
|
seqEltsUFM :: ([elt] -> ()) -> UniqFM elt -> ()
seqEltsUFM seqList = seqList . nonDetEltsUFM
| 92
|
seqEltsUFM seqList = seqList . nonDetEltsUFM
| 44
| false
| true
| 0
| 9
| 15
| 49
| 23
| 26
| null | null |
slogsdon/haskell-exercises
|
write-a-scheme/parsing/src/Parser/Parser.hs
|
mit
|
parseList :: Parser LispVal
parseList = liftM List $ sepBy parseExpr spaces
| 75
|
parseList :: Parser LispVal
parseList = liftM List $ sepBy parseExpr spaces
| 75
|
parseList = liftM List $ sepBy parseExpr spaces
| 47
| false
| true
| 0
| 6
| 11
| 26
| 12
| 14
| null | null |
haslab/SecreC
|
src/Language/SecreC/Transformation/Simplify.hs
|
gpl-3.0
|
simplifyVariadic :: SimplifyCont loc m a -> SimplifyCont loc m (a,IsVariadic)
simplifyVariadic m (x,isVariadic) = do
(ss,x') <- m x
returnS (ss,(x',isVariadic))
| 168
|
simplifyVariadic :: SimplifyCont loc m a -> SimplifyCont loc m (a,IsVariadic)
simplifyVariadic m (x,isVariadic) = do
(ss,x') <- m x
returnS (ss,(x',isVariadic))
| 168
|
simplifyVariadic m (x,isVariadic) = do
(ss,x') <- m x
returnS (ss,(x',isVariadic))
| 90
| false
| true
| 0
| 9
| 29
| 80
| 42
| 38
| null | null |
iamkingmaker/HLearn
|
src/HLearn/Data/SpaceTree/CoverTree.hs
|
bsd-3-clause
|
-- trainMonoid ::
-- ( ValidCT exprat childC leafC (Elem xs)
-- , Foldable xs
-- ) => xs
-- -> Maybe' (CoverTree_ exprat childC leafC (Elem xs))
trainMonoid ::
( --KnownFrac exprat
-- ) => [ L2 UnboxedVector Float ]
-- -> Maybe' (CoverTree_ (13/10) Array UnboxedArray (L2 UnboxedVector Float))
) => [ Labeled' (L2 UnboxedVector Float) Int ]
-> Maybe' (CoverTree_ (Static (13/10)) Array UnboxedArray (Labeled' (L2 UnboxedVector Float) Int))
trainMonoid xs = {-# SCC trainMonoid #-} foldtree1 $ map (Just' . singletonCT) $ toList xs
| 572
|
trainMonoid ::
( --KnownFrac exprat
-- ) => [ L2 UnboxedVector Float ]
-- -> Maybe' (CoverTree_ (13/10) Array UnboxedArray (L2 UnboxedVector Float))
) => [ Labeled' (L2 UnboxedVector Float) Int ]
-> Maybe' (CoverTree_ (Static (13/10)) Array UnboxedArray (Labeled' (L2 UnboxedVector Float) Int))
trainMonoid xs = {-# SCC trainMonoid #-} foldtree1 $ map (Just' . singletonCT) $ toList xs
| 409
|
trainMonoid xs = {-# SCC trainMonoid #-} foldtree1 $ map (Just' . singletonCT) $ toList xs
| 90
| true
| true
| 0
| 14
| 129
| 113
| 61
| 52
| null | null |
brendanhay/gogol
|
gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs
|
mpl-2.0
|
-- | A server-assigned, globally unique identifier.
riUid :: Lens' RepoId (Maybe Text)
riUid = lens _riUid (\ s a -> s{_riUid = a})
| 131
|
riUid :: Lens' RepoId (Maybe Text)
riUid = lens _riUid (\ s a -> s{_riUid = a})
| 79
|
riUid = lens _riUid (\ s a -> s{_riUid = a})
| 44
| true
| true
| 1
| 9
| 23
| 49
| 25
| 24
| null | null |
matterhorn-chat/matterhorn
|
src/Matterhorn/Command.hs
|
bsd-3-clause
|
matchArgs (LineArg _) t = return t
| 34
|
matchArgs (LineArg _) t = return t
| 34
|
matchArgs (LineArg _) t = return t
| 34
| false
| false
| 0
| 7
| 6
| 20
| 9
| 11
| null | null |
charlesrosenbauer/Bzo-Compiler
|
src/ModelRules.hs
|
gpl-3.0
|
removeBoxes (BzS_Block p expr ) = (BzS_Block p (L.map removeBoxes expr))
| 84
|
removeBoxes (BzS_Block p expr ) = (BzS_Block p (L.map removeBoxes expr))
| 84
|
removeBoxes (BzS_Block p expr ) = (BzS_Block p (L.map removeBoxes expr))
| 84
| false
| false
| 0
| 9
| 22
| 35
| 17
| 18
| null | null |
brendanhay/gogol
|
gogol-websecurityscanner/gen/Network/Google/Resource/WebSecurityScanner/Projects/ScanConfigs/List.hs
|
mpl-2.0
|
-- | V1 error format.
psclXgafv :: Lens' ProjectsScanConfigsList (Maybe Xgafv)
psclXgafv
= lens _psclXgafv (\ s a -> s{_psclXgafv = a})
| 137
|
psclXgafv :: Lens' ProjectsScanConfigsList (Maybe Xgafv)
psclXgafv
= lens _psclXgafv (\ s a -> s{_psclXgafv = a})
| 115
|
psclXgafv
= lens _psclXgafv (\ s a -> s{_psclXgafv = a})
| 58
| true
| true
| 1
| 9
| 23
| 52
| 25
| 27
| null | null |
dec9ue/jhc_copygc
|
src/Ho/Build.hs
|
gpl-2.0
|
compLinkCompUnit (CompCollected _ cu) = cu
| 42
|
compLinkCompUnit (CompCollected _ cu) = cu
| 42
|
compLinkCompUnit (CompCollected _ cu) = cu
| 42
| false
| false
| 0
| 7
| 5
| 17
| 8
| 9
| null | null |
neobrain/github-post-receive
|
examples/example.hs
|
bsd-3-clause
|
main :: IO ()
main = start 5678 $ M.fromList [("/", print)]
| 59
|
main :: IO ()
main = start 5678 $ M.fromList [("/", print)]
| 59
|
main = start 5678 $ M.fromList [("/", print)]
| 45
| false
| true
| 0
| 8
| 11
| 37
| 19
| 18
| null | null |
krisajenkins/snaplet-auth
|
src/Snaplet/Authentication/PasswordReset.hs
|
bsd-3-clause
|
hashRequestedPassword
:: MonadIO m
=> PasswordResetCompletion -> m (Maybe HashedPassword)
hashRequestedPassword = liftIO . hashFor . view newPassword
| 153
|
hashRequestedPassword
:: MonadIO m
=> PasswordResetCompletion -> m (Maybe HashedPassword)
hashRequestedPassword = liftIO . hashFor . view newPassword
| 153
|
hashRequestedPassword = liftIO . hashFor . view newPassword
| 59
| false
| true
| 0
| 9
| 21
| 45
| 21
| 24
| null | null |
pascalpoizat/vecahaskell
|
src/Veca/Operations.hs
|
apache-2.0
|
cToTAAddTimeouts' :: [(VState, VTransition)] -> MS.State TABuildState ()
cToTAAddTimeouts' [] = return ()
| 117
|
cToTAAddTimeouts' :: [(VState, VTransition)] -> MS.State TABuildState ()
cToTAAddTimeouts' [] = return ()
| 117
|
cToTAAddTimeouts' [] = return ()
| 44
| false
| true
| 0
| 7
| 24
| 47
| 23
| 24
| null | null |
HostsTools/Haskell-Console
|
Main.hs
|
gpl-3.0
|
main :: IO ()
main = do
putStrLn strBanner
hostspath <- getHostsPath
ensureRWPermission hostspath
newhosts <- fetchURL strHostsUrl
updated <- updateHosts hostspath newhosts
putStrLn $ if updated then strUpdated else strNoUpdate
| 239
|
main :: IO ()
main = do
putStrLn strBanner
hostspath <- getHostsPath
ensureRWPermission hostspath
newhosts <- fetchURL strHostsUrl
updated <- updateHosts hostspath newhosts
putStrLn $ if updated then strUpdated else strNoUpdate
| 239
|
main = do
putStrLn strBanner
hostspath <- getHostsPath
ensureRWPermission hostspath
newhosts <- fetchURL strHostsUrl
updated <- updateHosts hostspath newhosts
putStrLn $ if updated then strUpdated else strNoUpdate
| 225
| false
| true
| 0
| 8
| 42
| 72
| 32
| 40
| null | null |
brendanhay/gogol
|
gogol-datafusion/gen/Network/Google/Resource/DataFusion/Projects/Locations/Operations/List.hs
|
mpl-2.0
|
-- | The name of the operation\'s parent resource.
plolName :: Lens' ProjectsLocationsOperationsList Text
plolName = lens _plolName (\ s a -> s{_plolName = a})
| 159
|
plolName :: Lens' ProjectsLocationsOperationsList Text
plolName = lens _plolName (\ s a -> s{_plolName = a})
| 108
|
plolName = lens _plolName (\ s a -> s{_plolName = a})
| 53
| true
| true
| 0
| 9
| 24
| 40
| 22
| 18
| null | null |
tjunier/mlgsc
|
src/mlgsc.hs
|
mit
|
parseMaskMode :: Monad m => String -> m MaskMode
parseMaskMode optString
| 't' == initC = return Trim
| 'n' == initC = return None
| 'f' == initC = return MaskFlaky
| otherwise = return None -- TODO: warn about unrecognized opt
where initC = toLower $ head optString
| 286
|
parseMaskMode :: Monad m => String -> m MaskMode
parseMaskMode optString
| 't' == initC = return Trim
| 'n' == initC = return None
| 'f' == initC = return MaskFlaky
| otherwise = return None -- TODO: warn about unrecognized opt
where initC = toLower $ head optString
| 286
|
parseMaskMode optString
| 't' == initC = return Trim
| 'n' == initC = return None
| 'f' == initC = return MaskFlaky
| otherwise = return None -- TODO: warn about unrecognized opt
where initC = toLower $ head optString
| 237
| false
| true
| 1
| 8
| 69
| 114
| 49
| 65
| null | null |
DaMSL/K3
|
src/Language/K3/Core/Utils.hs
|
apache-2.0
|
mapTree f n@(Node _ ch) = mapM (mapTree f) ch >>= flip f n
| 58
|
mapTree f n@(Node _ ch) = mapM (mapTree f) ch >>= flip f n
| 58
|
mapTree f n@(Node _ ch) = mapM (mapTree f) ch >>= flip f n
| 58
| false
| false
| 0
| 8
| 13
| 42
| 20
| 22
| null | null |
thielema/wxhaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
|
lgpl-2.1
|
withObjectRef :: String -> Object a -> (Ptr a -> IO b) -> IO b
withObjectRef msg obj f
= withObjectPtr obj $ \p ->
withValidPtr msg p f
| 142
|
withObjectRef :: String -> Object a -> (Ptr a -> IO b) -> IO b
withObjectRef msg obj f
= withObjectPtr obj $ \p ->
withValidPtr msg p f
| 142
|
withObjectRef msg obj f
= withObjectPtr obj $ \p ->
withValidPtr msg p f
| 79
| false
| true
| 0
| 10
| 35
| 68
| 32
| 36
| null | null |
arianvp/binary-serialise-cbor
|
Data/Binary/Serialise/CBOR/Write.hs
|
bsd-3-clause
|
withHeader :: P.FixedPrim a -> P.BoundedPrim (Word8, a)
withHeader p = P.liftFixedToBounded (P.word8 >*< p)
| 107
|
withHeader :: P.FixedPrim a -> P.BoundedPrim (Word8, a)
withHeader p = P.liftFixedToBounded (P.word8 >*< p)
| 107
|
withHeader p = P.liftFixedToBounded (P.word8 >*< p)
| 51
| false
| true
| 0
| 8
| 14
| 48
| 24
| 24
| null | null |
nbrunt/JSHOP
|
src/Analyser.hs
|
mit
|
-- | Assignment
anAssign :: Assignment -> JSCC()
anAssign (CondExpr condExpr) = anCondExpr condExpr
| 99
|
anAssign :: Assignment -> JSCC()
anAssign (CondExpr condExpr) = anCondExpr condExpr
| 83
|
anAssign (CondExpr condExpr) = anCondExpr condExpr
| 50
| true
| true
| 0
| 7
| 13
| 33
| 16
| 17
| null | null |
goldfirere/units
|
units/Data/Metrology/Linear.hs
|
bsd-3-clause
|
-- | Multiply a scalar quantity by a vector quantity
(|*^|) :: (Functor f, Num a)
=> Qu d1 l a -> Qu d2 l (f a) -> Qu (Normalize (d1 @+ d2)) l (f a)
(Qu a) |*^| (Qu b) = Qu (a *^ b)
| 188
|
(|*^|) :: (Functor f, Num a)
=> Qu d1 l a -> Qu d2 l (f a) -> Qu (Normalize (d1 @+ d2)) l (f a)
(Qu a) |*^| (Qu b) = Qu (a *^ b)
| 135
|
(Qu a) |*^| (Qu b) = Qu (a *^ b)
| 32
| true
| true
| 0
| 12
| 52
| 111
| 56
| 55
| null | null |
green-haskell/ghc
|
compiler/hsSyn/HsBinds.hs
|
bsd-3-clause
|
plusHsValBinds _ _
= panic "HsBinds.plusHsValBinds"
| 53
|
plusHsValBinds _ _
= panic "HsBinds.plusHsValBinds"
| 53
|
plusHsValBinds _ _
= panic "HsBinds.plusHsValBinds"
| 53
| false
| false
| 0
| 5
| 7
| 14
| 6
| 8
| null | null |
allanderek/ipclib
|
Language/Prism/Print.hs
|
gpl-2.0
|
printPrismAction (DNAMcassignment _ _) =
error "Unimplemented prism update"
| 78
|
printPrismAction (DNAMcassignment _ _) =
error "Unimplemented prism update"
| 78
|
printPrismAction (DNAMcassignment _ _) =
error "Unimplemented prism update"
| 78
| false
| false
| 0
| 7
| 11
| 20
| 9
| 11
| null | null |
GaloisInc/ivory
|
ivory-opts/src/Ivory/Opts/CSE.hs
|
bsd-3-clause
|
-- | Find each common sub-expression and extract it to a new variable,
-- making any sharing explicit. However, this function should never move
-- evaluation of an expression earlier than it would have occurred in
-- the source program, which means that sometimes an expression must be
-- re-computed on each of several execution paths.
cseFold :: AST.Proc -> AST.Proc
cseFold def = def
{ AST.procBody = reconstruct $ unsafePerformIO $ reifyGraph $ AST.procBody def }
| 469
|
cseFold :: AST.Proc -> AST.Proc
cseFold def = def
{ AST.procBody = reconstruct $ unsafePerformIO $ reifyGraph $ AST.procBody def }
| 132
|
cseFold def = def
{ AST.procBody = reconstruct $ unsafePerformIO $ reifyGraph $ AST.procBody def }
| 100
| true
| true
| 0
| 10
| 78
| 58
| 31
| 27
| null | null |
arekfu/funpart
|
app/Main.hs
|
bsd-3-clause
|
setup :: SimSetup
setup = SimSetup { theXSec = xSec
, initialSeed = seed
, nShots = shots
, source = aSource
, scores = [TrackLength empty]
}
where xSec = CrossSection $ ConstantXS totXSec absXSec
totXSec = 1.0
absXSec = 0.1
seed = 123456
shots = 1000
aSource = Source $ FactorizedSource Neutron (PointwiseSpaceDistribution (Pos zero)) (IsoMonoDistribution 1)
| 522
|
setup :: SimSetup
setup = SimSetup { theXSec = xSec
, initialSeed = seed
, nShots = shots
, source = aSource
, scores = [TrackLength empty]
}
where xSec = CrossSection $ ConstantXS totXSec absXSec
totXSec = 1.0
absXSec = 0.1
seed = 123456
shots = 1000
aSource = Source $ FactorizedSource Neutron (PointwiseSpaceDistribution (Pos zero)) (IsoMonoDistribution 1)
| 522
|
setup = SimSetup { theXSec = xSec
, initialSeed = seed
, nShots = shots
, source = aSource
, scores = [TrackLength empty]
}
where xSec = CrossSection $ ConstantXS totXSec absXSec
totXSec = 1.0
absXSec = 0.1
seed = 123456
shots = 1000
aSource = Source $ FactorizedSource Neutron (PointwiseSpaceDistribution (Pos zero)) (IsoMonoDistribution 1)
| 504
| false
| true
| 3
| 10
| 221
| 138
| 69
| 69
| null | null |
gcampax/ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
isFloatTy, isDoubleTy, isIntegerTy, isIntTy, isWordTy, isBoolTy,
isUnitTy, isCharTy, isAnyTy :: Type -> Bool
isFloatTy = is_tc floatTyConKey
| 149
|
isFloatTy, isDoubleTy, isIntegerTy, isIntTy, isWordTy, isBoolTy,
isUnitTy, isCharTy, isAnyTy :: Type -> Bool
isFloatTy = is_tc floatTyConKey
| 149
|
isFloatTy = is_tc floatTyConKey
| 36
| false
| true
| 5
| 5
| 25
| 46
| 25
| 21
| null | null |
nevrenato/HyLoRes_Source
|
2.4/src/HyLoRes/ClauseSet/InUse.hs
|
gpl-2.0
|
addI :: Ord k => FullClause f -> InUseIdx f k -> InUseIdx f k
addI cl idx = idx{asMap = addToMap (nomPicker idx cl)
(keyPicker idx)
(asMap idx)}
where addToMap i f = Map.insertWith (\_ -> classifyBy f cl)
i
(Map.singleton (f cl) [cl])
| 388
|
addI :: Ord k => FullClause f -> InUseIdx f k -> InUseIdx f k
addI cl idx = idx{asMap = addToMap (nomPicker idx cl)
(keyPicker idx)
(asMap idx)}
where addToMap i f = Map.insertWith (\_ -> classifyBy f cl)
i
(Map.singleton (f cl) [cl])
| 388
|
addI cl idx = idx{asMap = addToMap (nomPicker idx cl)
(keyPicker idx)
(asMap idx)}
where addToMap i f = Map.insertWith (\_ -> classifyBy f cl)
i
(Map.singleton (f cl) [cl])
| 326
| false
| true
| 0
| 11
| 198
| 132
| 65
| 67
| null | null |
bitemyapp/lets-lens
|
src/Lets/Data.hs
|
bsd-3-clause
|
bool _ t True =
t
| 19
|
bool _ t True =
t
| 19
|
bool _ t True =
t
| 19
| false
| false
| 0
| 5
| 7
| 13
| 6
| 7
| null | null |
smaccm/capDL-tool
|
CapDL/PrintC.hs
|
bsd-2-clause
|
showCap _ SchedControlCap _ _ _ =
"{.type = CDL_SchedControlCap}"
| 69
|
showCap _ SchedControlCap _ _ _ =
"{.type = CDL_SchedControlCap}"
| 69
|
showCap _ SchedControlCap _ _ _ =
"{.type = CDL_SchedControlCap}"
| 69
| false
| false
| 1
| 5
| 13
| 17
| 8
| 9
| null | null |
hkuplg/fcore
|
frontend/typecheck/JvmTypeQuery.hs
|
bsd-2-clause
|
isTrue :: String -> Bool
isTrue s = (map toLower . filter (not . isSpace)) s == "true"
| 86
|
isTrue :: String -> Bool
isTrue s = (map toLower . filter (not . isSpace)) s == "true"
| 86
|
isTrue s = (map toLower . filter (not . isSpace)) s == "true"
| 61
| false
| true
| 0
| 11
| 17
| 45
| 22
| 23
| null | null |
rueshyna/gogol
|
gogol-admin-reports/gen/Network/Google/Reports/Types/Product.hs
|
mpl-2.0
|
-- | Email address of the user.
aaEmail :: Lens' ActivityActor (Maybe Text)
aaEmail = lens _aaEmail (\ s a -> s{_aaEmail = a})
| 126
|
aaEmail :: Lens' ActivityActor (Maybe Text)
aaEmail = lens _aaEmail (\ s a -> s{_aaEmail = a})
| 94
|
aaEmail = lens _aaEmail (\ s a -> s{_aaEmail = a})
| 50
| true
| true
| 1
| 9
| 23
| 49
| 25
| 24
| null | null |
snoyberg/ghc
|
compiler/utils/Outputable.hs
|
bsd-3-clause
|
pprPrimInt i = integer i <> primIntSuffix
| 46
|
pprPrimInt i = integer i <> primIntSuffix
| 46
|
pprPrimInt i = integer i <> primIntSuffix
| 46
| false
| false
| 0
| 6
| 11
| 16
| 7
| 9
| null | null |
alexliew/learn_you_a_haskell
|
4_recursion.hs
|
unlicense
|
take' n (x:xs) = x : take' (n - 1) xs
| 37
|
take' n (x:xs) = x : take' (n - 1) xs
| 37
|
take' n (x:xs) = x : take' (n - 1) xs
| 37
| false
| false
| 0
| 8
| 10
| 34
| 17
| 17
| null | null |
jeffreyrosenbluth/reflex-semantics
|
other-frps/Sodium.hs
|
bsd-3-clause
|
steps (SwitchC c t0) = (at (steps (at (steps c) t0)) t0,
coalesce (flip const) (scan t0 a sts))
where (a, sts) = steps c
scan t0 a0 ((t1, a1):as) =
let (b, stsb) = normalize (chopBack (chopFront (steps a0) t0) t1)
in ((t0, b) : stsb) ++ scan t1 a1 as
scan t0 a0 [] =
let (b, stsb) = normalize (chopFront (steps a0) t0)
in ((t0, b) : stsb)
normalize :: C a -> C a
normalize (_, (t1, a) : as) | t1 == t0 = (a, as)
normalize as = as
chopBack :: C a -> T -> C a
chopBack (i, sts) tEnd = (i, filter (\(t, a) -> t < tEnd) sts)
| 660
|
steps (SwitchC c t0) = (at (steps (at (steps c) t0)) t0,
coalesce (flip const) (scan t0 a sts))
where (a, sts) = steps c
scan t0 a0 ((t1, a1):as) =
let (b, stsb) = normalize (chopBack (chopFront (steps a0) t0) t1)
in ((t0, b) : stsb) ++ scan t1 a1 as
scan t0 a0 [] =
let (b, stsb) = normalize (chopFront (steps a0) t0)
in ((t0, b) : stsb)
normalize :: C a -> C a
normalize (_, (t1, a) : as) | t1 == t0 = (a, as)
normalize as = as
chopBack :: C a -> T -> C a
chopBack (i, sts) tEnd = (i, filter (\(t, a) -> t < tEnd) sts)
| 660
|
steps (SwitchC c t0) = (at (steps (at (steps c) t0)) t0,
coalesce (flip const) (scan t0 a sts))
where (a, sts) = steps c
scan t0 a0 ((t1, a1):as) =
let (b, stsb) = normalize (chopBack (chopFront (steps a0) t0) t1)
in ((t0, b) : stsb) ++ scan t1 a1 as
scan t0 a0 [] =
let (b, stsb) = normalize (chopFront (steps a0) t0)
in ((t0, b) : stsb)
normalize :: C a -> C a
normalize (_, (t1, a) : as) | t1 == t0 = (a, as)
normalize as = as
chopBack :: C a -> T -> C a
chopBack (i, sts) tEnd = (i, filter (\(t, a) -> t < tEnd) sts)
| 660
| false
| false
| 0
| 17
| 257
| 367
| 191
| 176
| null | null |
keitax/lupo
|
src/Lupo/Application.hs
|
lgpl-3.0
|
withEntryDB :: (MonadCatchIO m, MonadState Lupo m) => (E.EDBWrapper -> m a) -> m a
withEntryDB handler = do
pool <- use entryDBPool
C.withConnection pool handler
| 165
|
withEntryDB :: (MonadCatchIO m, MonadState Lupo m) => (E.EDBWrapper -> m a) -> m a
withEntryDB handler = do
pool <- use entryDBPool
C.withConnection pool handler
| 165
|
withEntryDB handler = do
pool <- use entryDBPool
C.withConnection pool handler
| 82
| false
| true
| 0
| 9
| 29
| 70
| 33
| 37
| null | null |
ndmitchell/qed
|
src/Proof/QED/Type.hs
|
bsd-3-clause
|
getUnknown :: Proof (Known, Unknown)
getUnknown = Proof $ do (k,u) <- ask; liftIO $ (k,) <$> readIORef u
| 104
|
getUnknown :: Proof (Known, Unknown)
getUnknown = Proof $ do (k,u) <- ask; liftIO $ (k,) <$> readIORef u
| 104
|
getUnknown = Proof $ do (k,u) <- ask; liftIO $ (k,) <$> readIORef u
| 67
| false
| true
| 0
| 10
| 18
| 56
| 30
| 26
| null | null |
frantisekfarka/ghc-dsi
|
libraries/base/Data/Data.hs
|
bsd-3-clause
|
tuple6Constr :: Constr
tuple6Constr = mkConstr tuple6DataType "(,,,,,)" [] Infix
| 80
|
tuple6Constr :: Constr
tuple6Constr = mkConstr tuple6DataType "(,,,,,)" [] Infix
| 80
|
tuple6Constr = mkConstr tuple6DataType "(,,,,,)" [] Infix
| 57
| false
| true
| 0
| 6
| 9
| 29
| 12
| 17
| null | null |
schell/lamdu
|
Lamdu/GUI/ExpressionGui/Monad.hs
|
gpl-3.0
|
memoT ::
(Cache.Key k, Binary v, Typeable v, MonadA m) =>
Cache.FuncId -> (k -> T m v) -> k -> ExprGuiM m v
memoT funcId f = memo funcId (lift . f)
| 151
|
memoT ::
(Cache.Key k, Binary v, Typeable v, MonadA m) =>
Cache.FuncId -> (k -> T m v) -> k -> ExprGuiM m v
memoT funcId f = memo funcId (lift . f)
| 151
|
memoT funcId f = memo funcId (lift . f)
| 39
| false
| true
| 0
| 10
| 36
| 92
| 45
| 47
| null | null |
mpitid/scheme48
|
src/Scheme48/Interpreter.hs
|
mit
|
eqv [a@(List xs), b@(List ys)] = listEquals (\x y -> eqv [x, y]) a b
| 68
|
eqv [a@(List xs), b@(List ys)] = listEquals (\x y -> eqv [x, y]) a b
| 68
|
eqv [a@(List xs), b@(List ys)] = listEquals (\x y -> eqv [x, y]) a b
| 68
| false
| false
| 0
| 9
| 14
| 59
| 32
| 27
| null | null |
facebookincubator/duckling
|
tests/Duckling/Numeral/GA/Tests.hs
|
bsd-3-clause
|
tests :: TestTree
tests = testGroup "GA Tests"
[ makeCorpusTest [Seal Numeral] corpus
]
| 91
|
tests :: TestTree
tests = testGroup "GA Tests"
[ makeCorpusTest [Seal Numeral] corpus
]
| 91
|
tests = testGroup "GA Tests"
[ makeCorpusTest [Seal Numeral] corpus
]
| 73
| false
| true
| 0
| 8
| 17
| 31
| 15
| 16
| null | null |
ColeComfort/haskell-math
|
Main.hs
|
gpl-3.0
|
--mId' }
{-where
justInv''' = \(x,y) -> case (Nothing != mInv' x && Nothing != mInv'' y) of
True -> Just (((Just x) -> x ) justmInv', ((Just x) -> x ) justmInv'')
False -> Nothing-}
fixPoints:: Eq a => (a -> a) -> [a] -> (a -> a)
fixPoints f dom = \x -> case elem x dom of
True -> x
False -> f x
| 395
|
fixPoints:: Eq a => (a -> a) -> [a] -> (a -> a)
fixPoints f dom = \x -> case elem x dom of
True -> x
False -> f x
| 118
|
fixPoints f dom = \x -> case elem x dom of
True -> x
False -> f x
| 70
| true
| true
| 2
| 9
| 166
| 81
| 41
| 40
| null | null |
christiaanb/ghc
|
compiler/basicTypes/VarSet.hs
|
bsd-3-clause
|
elemVarSet = elementOfUniqSet
| 34
|
elemVarSet = elementOfUniqSet
| 34
|
elemVarSet = elementOfUniqSet
| 34
| false
| false
| 1
| 5
| 7
| 10
| 3
| 7
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.