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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kaizhang/bioinformatics-toolkit | bioinformatics-toolkit/tests/Tests/Bed.hs | mit | splitOverlappedTest :: Assertion
splitOverlappedTest = expect @=? result
where
input :: [BED3]
input = map (\(a,b) -> asBed "chr1" a b)
[ (0, 100)
, (10, 20)
, (50, 150)
, (120, 160)
, (155, 200)
, (155, 220)
, (0, 10)
, (0, 10)
]
expect = map (\((a,b), x) -> (asBed "chr1" a b, x))
[ ((0, 10), 3)
, ((10, 20), 2)
, ((20, 50), 1)
, ((50, 100), 2)
, ((100, 120), 1)
, ((120, 150), 2)
, ((150, 155), 1)
, ((155, 160), 3)
, ((160, 200), 2)
, ((200, 220), 1)
]
--result = sortBy (compareBed `on` fst) $ splitOverlapped length input
result = sortBy (compareBed `on` fst) $ countOverlapped input | 771 | splitOverlappedTest :: Assertion
splitOverlappedTest = expect @=? result
where
input :: [BED3]
input = map (\(a,b) -> asBed "chr1" a b)
[ (0, 100)
, (10, 20)
, (50, 150)
, (120, 160)
, (155, 200)
, (155, 220)
, (0, 10)
, (0, 10)
]
expect = map (\((a,b), x) -> (asBed "chr1" a b, x))
[ ((0, 10), 3)
, ((10, 20), 2)
, ((20, 50), 1)
, ((50, 100), 2)
, ((100, 120), 1)
, ((120, 150), 2)
, ((150, 155), 1)
, ((155, 160), 3)
, ((160, 200), 2)
, ((200, 220), 1)
]
--result = sortBy (compareBed `on` fst) $ splitOverlapped length input
result = sortBy (compareBed `on` fst) $ countOverlapped input | 771 | splitOverlappedTest = expect @=? result
where
input :: [BED3]
input = map (\(a,b) -> asBed "chr1" a b)
[ (0, 100)
, (10, 20)
, (50, 150)
, (120, 160)
, (155, 200)
, (155, 220)
, (0, 10)
, (0, 10)
]
expect = map (\((a,b), x) -> (asBed "chr1" a b, x))
[ ((0, 10), 3)
, ((10, 20), 2)
, ((20, 50), 1)
, ((50, 100), 2)
, ((100, 120), 1)
, ((120, 150), 2)
, ((150, 155), 1)
, ((155, 160), 3)
, ((160, 200), 2)
, ((200, 220), 1)
]
--result = sortBy (compareBed `on` fst) $ splitOverlapped length input
result = sortBy (compareBed `on` fst) $ countOverlapped input | 738 | false | true | 0 | 9 | 298 | 347 | 218 | 129 | null | null |
korrix/Warcaby | Main.hs | bsd-3-clause | main :: IO ()
main = do
_ <- initGUI
gameState <- newIORef initialGameState
win <- createMainWindow gameState
widgetShowAll win
mainGUI | 145 | main :: IO ()
main = do
_ <- initGUI
gameState <- newIORef initialGameState
win <- createMainWindow gameState
widgetShowAll win
mainGUI | 145 | main = do
_ <- initGUI
gameState <- newIORef initialGameState
win <- createMainWindow gameState
widgetShowAll win
mainGUI | 131 | false | true | 0 | 8 | 30 | 52 | 22 | 30 | null | null |
Tarrasch/Hong | Fal.hs | bsd-3-clause | pressed, released :: Char -> Event ()
pressed c = filterEvent (==c) key ->> () | 87 | pressed, released :: Char -> Event ()
pressed c = filterEvent (==c) key ->> () | 87 | pressed c = filterEvent (==c) key ->> () | 49 | false | true | 0 | 7 | 23 | 40 | 21 | 19 | null | null |
RichardBarrell/snippets | ToTheMoon.hs | isc | move_bits_set :: Moves -> Int
move_bits_set (M d h v) = fromEnum d + (sum . map fromEnum) (h ++ v) | 98 | move_bits_set :: Moves -> Int
move_bits_set (M d h v) = fromEnum d + (sum . map fromEnum) (h ++ v) | 98 | move_bits_set (M d h v) = fromEnum d + (sum . map fromEnum) (h ++ v) | 68 | false | true | 0 | 9 | 20 | 55 | 27 | 28 | null | null |
d3tucker/physfs | src/System/Directory/PhysFS.hs | lgpl-3.0 | removeFile :: FilePath -> IO ()
removeFile fp =
do res <- doesFileExist fp
case res of
False -> ioError $ mkIOError doesNotExistErrorType "removeFile" Nothing (Just fp)
True -> do checkError "PHYSFS_delete" $ withCString fp physfsDelete | 267 | removeFile :: FilePath -> IO ()
removeFile fp =
do res <- doesFileExist fp
case res of
False -> ioError $ mkIOError doesNotExistErrorType "removeFile" Nothing (Just fp)
True -> do checkError "PHYSFS_delete" $ withCString fp physfsDelete | 267 | removeFile fp =
do res <- doesFileExist fp
case res of
False -> ioError $ mkIOError doesNotExistErrorType "removeFile" Nothing (Just fp)
True -> do checkError "PHYSFS_delete" $ withCString fp physfsDelete | 235 | false | true | 0 | 15 | 66 | 92 | 40 | 52 | null | null |
PierreR/Haskell-Turtle-Library | src/Turtle/Pattern.hs | bsd-3-clause | {-| Match the entire string if it begins with the given pattern
This returns the entire string, not just the matched prefix
>>> match (begins "A" ) "ABC"
["ABC"]
>>> match (begins ("A" *> pure "1")) "ABC"
["1BC"]
-}
begins :: Pattern Text -> Pattern Text
begins pattern = pattern <> chars | 307 | begins :: Pattern Text -> Pattern Text
begins pattern = pattern <> chars | 72 | begins pattern = pattern <> chars | 33 | true | true | 2 | 7 | 70 | 35 | 15 | 20 | null | null |
dimara/ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pIpConflictsCheck :: Field
pIpConflictsCheck =
withDoc "Whether to check for conflicting IP addresses" $
defaultTrue "conflicts_check" | 138 | pIpConflictsCheck :: Field
pIpConflictsCheck =
withDoc "Whether to check for conflicting IP addresses" $
defaultTrue "conflicts_check" | 138 | pIpConflictsCheck =
withDoc "Whether to check for conflicting IP addresses" $
defaultTrue "conflicts_check" | 111 | false | true | 0 | 6 | 19 | 21 | 10 | 11 | null | null |
lancelotsix/hs-tls | core/Network/TLS/Handshake/Signature.hs | bsd-3-clause | getHashAndASN1 :: MonadIO m => (HashAlgorithm, SignatureAlgorithm) -> m Hash
getHashAndASN1 hashSig = case hashSig of
(HashSHA1, SignatureRSA) -> return SHA1
(HashSHA224, SignatureRSA) -> return SHA224
(HashSHA256, SignatureRSA) -> return SHA256
(HashSHA384, SignatureRSA) -> return SHA384
(HashSHA512, SignatureRSA) -> return SHA512
_ -> throwCore $ Error_Misc "unsupported hash/sig algorithm" | 445 | getHashAndASN1 :: MonadIO m => (HashAlgorithm, SignatureAlgorithm) -> m Hash
getHashAndASN1 hashSig = case hashSig of
(HashSHA1, SignatureRSA) -> return SHA1
(HashSHA224, SignatureRSA) -> return SHA224
(HashSHA256, SignatureRSA) -> return SHA256
(HashSHA384, SignatureRSA) -> return SHA384
(HashSHA512, SignatureRSA) -> return SHA512
_ -> throwCore $ Error_Misc "unsupported hash/sig algorithm" | 445 | getHashAndASN1 hashSig = case hashSig of
(HashSHA1, SignatureRSA) -> return SHA1
(HashSHA224, SignatureRSA) -> return SHA224
(HashSHA256, SignatureRSA) -> return SHA256
(HashSHA384, SignatureRSA) -> return SHA384
(HashSHA512, SignatureRSA) -> return SHA512
_ -> throwCore $ Error_Misc "unsupported hash/sig algorithm" | 368 | false | true | 0 | 9 | 99 | 130 | 66 | 64 | null | null |
aochagavia/CompilerConstruction | funflow/src/FunFlow/TypeSystem.hs | apache-2.0 | (-.-) :: TypeSubstitution -> TypeSubstitution -> TypeSubstitution
(-.-) last@(TypeSubstitution (m1, c1)) (TypeSubstitution (m2, c2)) =
TypeSubstitution ( Map.union m1 (Map.map (last -$-) m2)
, Map.union c1 (Map.map (last -$$-) c2)) | 256 | (-.-) :: TypeSubstitution -> TypeSubstitution -> TypeSubstitution
(-.-) last@(TypeSubstitution (m1, c1)) (TypeSubstitution (m2, c2)) =
TypeSubstitution ( Map.union m1 (Map.map (last -$-) m2)
, Map.union c1 (Map.map (last -$$-) c2)) | 256 | (-.-) last@(TypeSubstitution (m1, c1)) (TypeSubstitution (m2, c2)) =
TypeSubstitution ( Map.union m1 (Map.map (last -$-) m2)
, Map.union c1 (Map.map (last -$$-) c2)) | 190 | false | true | 9 | 9 | 54 | 109 | 60 | 49 | null | null |
grnet/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- | RSA key bit length
--
-- For RSA keys more bits are better, but they also make operations
-- more expensive. NIST SP 800-131 recommends a minimum of 2048 bits
-- from the year 2010 on.
rsaKeyBits :: Int
rsaKeyBits = 2048 | 225 | rsaKeyBits :: Int
rsaKeyBits = 2048 | 35 | rsaKeyBits = 2048 | 17 | true | true | 0 | 6 | 43 | 23 | 12 | 11 | null | null |
banacorn/tredis | src/Database/Edis/Command/Key.hs | mit | objectIdletime :: ByteString -> Edis xs xs (Either Reply Integer)
objectIdletime key = Edis $ Redis.objectIdletime key | 118 | objectIdletime :: ByteString -> Edis xs xs (Either Reply Integer)
objectIdletime key = Edis $ Redis.objectIdletime key | 118 | objectIdletime key = Edis $ Redis.objectIdletime key | 52 | false | true | 0 | 8 | 16 | 42 | 20 | 22 | null | null |
spaceships/circuit-synthesis | src/Circuit.hs | mit | outputRefs :: Gate gate => Circuit gate -> [Ref]
outputRefs c = V.toList (c^.circ_outputs) | 90 | outputRefs :: Gate gate => Circuit gate -> [Ref]
outputRefs c = V.toList (c^.circ_outputs) | 90 | outputRefs c = V.toList (c^.circ_outputs) | 41 | false | true | 0 | 9 | 13 | 49 | 22 | 27 | null | null |
justinethier/husk-scheme | hs-src/Language/Scheme/Numerical.hs | mit | numMul :: [LispVal] -> ThrowsError LispVal
numMul [] = return $ Number 1 | 72 | numMul :: [LispVal] -> ThrowsError LispVal
numMul [] = return $ Number 1 | 72 | numMul [] = return $ Number 1 | 29 | false | true | 0 | 6 | 12 | 33 | 16 | 17 | null | null |
awagner83/powermap | src/Network/Wikipedia.hs | bsd-3-clause | -- | Advertised User-agent
userAgent :: ByteString
userAgent = "powermap:mapgen (https://github.com/awagner83/powermap)" | 120 | userAgent :: ByteString
userAgent = "powermap:mapgen (https://github.com/awagner83/powermap)" | 93 | userAgent = "powermap:mapgen (https://github.com/awagner83/powermap)" | 69 | true | true | 0 | 4 | 10 | 12 | 7 | 5 | null | null |
gcampax/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | eqString_RDR, unpackCString_RDR, unpackCStringFoldr_RDR,
unpackCStringUtf8_RDR :: RdrName
eqString_RDR = nameRdrName eqStringName | 144 | eqString_RDR, unpackCString_RDR, unpackCStringFoldr_RDR,
unpackCStringUtf8_RDR :: RdrName
eqString_RDR = nameRdrName eqStringName | 144 | eqString_RDR = nameRdrName eqStringName | 50 | false | true | 0 | 5 | 24 | 20 | 13 | 7 | null | null |
purebred-mua/purebred | test/TestUserAcceptance.hs | agpl-3.0 | findMail ::
( HasTmuxSession testEnv
, MonadReader testEnv m
, MonadState Capture m
, MonadIO m
)
=> (String -> m ())
-> String -- ^ query
-> m Capture
findMail step query = do
step ("search for mail with query: " <> query)
sendKeys ":" (Regex ("Query: " <> buildAnsiRegex [] ["37"] [] <> "tag:inbox"))
sendKeys "C-u" (Regex ("Query: " <> buildAnsiRegex [] ["37"] [] <> "\\s+"))
step "enter free text search"
sendLine query (Substring "Item 1 of 1") | 490 | findMail ::
( HasTmuxSession testEnv
, MonadReader testEnv m
, MonadState Capture m
, MonadIO m
)
=> (String -> m ())
-> String -- ^ query
-> m Capture
findMail step query = do
step ("search for mail with query: " <> query)
sendKeys ":" (Regex ("Query: " <> buildAnsiRegex [] ["37"] [] <> "tag:inbox"))
sendKeys "C-u" (Regex ("Query: " <> buildAnsiRegex [] ["37"] [] <> "\\s+"))
step "enter free text search"
sendLine query (Substring "Item 1 of 1") | 490 | findMail step query = do
step ("search for mail with query: " <> query)
sendKeys ":" (Regex ("Query: " <> buildAnsiRegex [] ["37"] [] <> "tag:inbox"))
sendKeys "C-u" (Regex ("Query: " <> buildAnsiRegex [] ["37"] [] <> "\\s+"))
step "enter free text search"
sendLine query (Substring "Item 1 of 1") | 307 | false | true | 0 | 14 | 120 | 183 | 88 | 95 | null | null |
spechub/Hets | Syntax/ToXml.hs | gpl-2.0 | -- range attribute without file name
rgAttrs :: Range -> [Attr]
rgAttrs = rangeAttrsF $ show . prettyRange . map (\ p -> p { sourceName = "" }) | 143 | rgAttrs :: Range -> [Attr]
rgAttrs = rangeAttrsF $ show . prettyRange . map (\ p -> p { sourceName = "" }) | 106 | rgAttrs = rangeAttrsF $ show . prettyRange . map (\ p -> p { sourceName = "" }) | 79 | true | true | 0 | 10 | 28 | 50 | 28 | 22 | null | null |
olorin/amazonka | amazonka-route53/gen/Network/AWS/Route53/Types.hs | mpl-2.0 | -- | The resource you are trying to access is unsupported on this Route 53
-- endpoint. Please consider using a newer endpoint or a tool that does so.
_IncompatibleVersion :: AsError a => Getting (First ServiceError) a ServiceError
_IncompatibleVersion =
_ServiceError . hasStatus 400 . hasCode "IncompatibleVersion" | 320 | _IncompatibleVersion :: AsError a => Getting (First ServiceError) a ServiceError
_IncompatibleVersion =
_ServiceError . hasStatus 400 . hasCode "IncompatibleVersion" | 169 | _IncompatibleVersion =
_ServiceError . hasStatus 400 . hasCode "IncompatibleVersion" | 88 | true | true | 0 | 8 | 51 | 47 | 23 | 24 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * LXC
-- If you are trying to change the value of these default constants, you also
-- need to edit the default value declaration in man/gnt-instance.rst.
lxcDevicesDefault :: String
lxcDevicesDefault =
"c 1:3 rw" -- /dev/null
++ ",c 1:5 rw" -- /dev/zero
++ ",c 1:7 rw" -- /dev/full
++ ",c 1:8 rw" -- /dev/random
++ ",c 1:9 rw" -- /dev/urandom
++ ",c 1:10 rw" -- /dev/aio
++ ",c 5:0 rw" -- /dev/tty
++ ",c 5:1 rw" -- /dev/console
++ ",c 5:2 rw" -- /dev/ptmx
++ ",c 136:* rw" | 527 | lxcDevicesDefault :: String
lxcDevicesDefault =
"c 1:3 rw" -- /dev/null
++ ",c 1:5 rw" -- /dev/zero
++ ",c 1:7 rw" -- /dev/full
++ ",c 1:8 rw" -- /dev/random
++ ",c 1:9 rw" -- /dev/urandom
++ ",c 1:10 rw" -- /dev/aio
++ ",c 5:0 rw" -- /dev/tty
++ ",c 5:1 rw" -- /dev/console
++ ",c 5:2 rw" -- /dev/ptmx
++ ",c 136:* rw" | 369 | lxcDevicesDefault =
"c 1:3 rw" -- /dev/null
++ ",c 1:5 rw" -- /dev/zero
++ ",c 1:7 rw" -- /dev/full
++ ",c 1:8 rw" -- /dev/random
++ ",c 1:9 rw" -- /dev/urandom
++ ",c 1:10 rw" -- /dev/aio
++ ",c 5:0 rw" -- /dev/tty
++ ",c 5:1 rw" -- /dev/console
++ ",c 5:2 rw" -- /dev/ptmx
++ ",c 136:* rw" | 341 | true | true | 18 | 5 | 139 | 69 | 36 | 33 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/InstallPlan.hs | bsd-3-clause | showPlanPackageTag (Failed _ _) = "Failed" | 47 | showPlanPackageTag (Failed _ _) = "Failed" | 47 | showPlanPackageTag (Failed _ _) = "Failed" | 47 | false | false | 0 | 7 | 10 | 17 | 8 | 9 | null | null |
elitak/hs-datahand | stm32f10x/hs_src/Data/Accessor.hs | gpl-3.0 | -- |Construct an 'Accessor' from a @get@ and a @set@ method.
--
accessor ::
(r -> a) {- ^ get method -}
-> (a -> r -> r) {- ^ set method -}
-> Accessor r a
accessor = flip Accessor.fromSetGet | 210 | accessor ::
(r -> a) {- ^ get method -}
-> (a -> r -> r) {- ^ set method -}
-> Accessor r a
accessor = flip Accessor.fromSetGet | 146 | accessor = flip Accessor.fromSetGet | 35 | true | true | 0 | 10 | 59 | 57 | 29 | 28 | null | null |
ulricha/dsh | src/Database/DSH/SL/Render/Dot.hs | bsd-3-clause | renderColor DCSeaGreen = text "seagreen" | 44 | renderColor DCSeaGreen = text "seagreen" | 44 | renderColor DCSeaGreen = text "seagreen" | 44 | false | false | 0 | 5 | 8 | 13 | 5 | 8 | null | null |
sdiehl/ghc | compiler/main/DynFlags.hs | bsd-3-clause | unsafeFlagsForInfer = unsafeFlags | 33 | unsafeFlagsForInfer = unsafeFlags | 33 | unsafeFlagsForInfer = unsafeFlags | 33 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ComputationWithBoundedResources/slogic | src/SLogic/Smt/Solver.hs | bsd-3-clause | yices :: (MonadIO m, Storing v, Var v) => SmtSolver m v
yices = yices' [] | 73 | yices :: (MonadIO m, Storing v, Var v) => SmtSolver m v
yices = yices' [] | 73 | yices = yices' [] | 17 | false | true | 0 | 6 | 15 | 42 | 21 | 21 | null | null |
lwchkg/sunlight-x | test/code-snippets/haskell.hs | apache-2.0 | aboveNest (TextBeside s sl p) g k q = k1 `seq` textBeside_ s sl rest
where
k1 = k - sl
rest = case p of
Empty -> nilAboveNest g k1 q
other -> aboveNest p g k1 q | 371 | aboveNest (TextBeside s sl p) g k q = k1 `seq` textBeside_ s sl rest
where
k1 = k - sl
rest = case p of
Empty -> nilAboveNest g k1 q
other -> aboveNest p g k1 q | 371 | aboveNest (TextBeside s sl p) g k q = k1 `seq` textBeside_ s sl rest
where
k1 = k - sl
rest = case p of
Empty -> nilAboveNest g k1 q
other -> aboveNest p g k1 q | 371 | false | false | 0 | 10 | 249 | 86 | 43 | 43 | null | null |
facebook/fbthrift | thrift/lib/hs/Thrift/Protocol/SimpleJSON.hs | apache-2.0 | buildJSONValue (TI16 i) = int16Dec i | 36 | buildJSONValue (TI16 i) = int16Dec i | 36 | buildJSONValue (TI16 i) = int16Dec i | 36 | false | false | 0 | 6 | 5 | 19 | 8 | 11 | null | null |
brendanhay/gogol | gogol-vision/gen/Network/Google/Resource/Vision/Images/AsyncBatchAnnotate.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
iabaUploadType :: Lens' ImagesAsyncBatchAnnotate (Maybe Text)
iabaUploadType
= lens _iabaUploadType
(\ s a -> s{_iabaUploadType = a}) | 212 | iabaUploadType :: Lens' ImagesAsyncBatchAnnotate (Maybe Text)
iabaUploadType
= lens _iabaUploadType
(\ s a -> s{_iabaUploadType = a}) | 141 | iabaUploadType
= lens _iabaUploadType
(\ s a -> s{_iabaUploadType = a}) | 79 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
zinfra/khan | khan/src/Khan/Model/EC2/AvailabilityZone.hs | mpl-2.0 | getSuffixes :: [Char] -> AWS [Char]
getSuffixes [] = map (azSuffix . azitZoneName) <$> findAll | 94 | getSuffixes :: [Char] -> AWS [Char]
getSuffixes [] = map (azSuffix . azitZoneName) <$> findAll | 94 | getSuffixes [] = map (azSuffix . azitZoneName) <$> findAll | 58 | false | true | 0 | 8 | 14 | 43 | 22 | 21 | null | null |
mzini/termlib | Termlib/Rule.hs | gpl-3.0 | isLeftGround :: Rule -> Bool
isLeftGround = T.isGround . lhs | 60 | isLeftGround :: Rule -> Bool
isLeftGround = T.isGround . lhs | 60 | isLeftGround = T.isGround . lhs | 31 | false | true | 0 | 6 | 9 | 21 | 11 | 10 | null | null |
bos/statistics | Statistics/Distribution/Poisson/Internal.hs | bsd-2-clause | -- | Returns an upper bound according to theorem 2 of "Sharp Bounds on
-- the Entropy of the Poisson Law"
alyThm2Upper :: Double -> [Double] -> Double
alyThm2Upper lambda coefficients =
1.4189385332046727 + 0.5 * log lambda +
zipCoefficients lambda coefficients | 265 | alyThm2Upper :: Double -> [Double] -> Double
alyThm2Upper lambda coefficients =
1.4189385332046727 + 0.5 * log lambda +
zipCoefficients lambda coefficients | 159 | alyThm2Upper lambda coefficients =
1.4189385332046727 + 0.5 * log lambda +
zipCoefficients lambda coefficients | 114 | true | true | 0 | 7 | 45 | 49 | 25 | 24 | null | null |
baig/review-md | Parser.hs | bsd-3-clause | addition :: Parsec String () Review
addition = try
$ Addition
<$> (sourceLine <$> getPosition)
<*> (sourceColumn <$> getPosition)
<*> (isDelimiter "{++" *> (delimiters "{++" "++}" $ till "++}")) | 232 | addition :: Parsec String () Review
addition = try
$ Addition
<$> (sourceLine <$> getPosition)
<*> (sourceColumn <$> getPosition)
<*> (isDelimiter "{++" *> (delimiters "{++" "++}" $ till "++}")) | 232 | addition = try
$ Addition
<$> (sourceLine <$> getPosition)
<*> (sourceColumn <$> getPosition)
<*> (isDelimiter "{++" *> (delimiters "{++" "++}" $ till "++}")) | 196 | false | true | 8 | 10 | 66 | 83 | 42 | 41 | null | null |
mikusp/accelerate-cuda | Data/Array/Accelerate/CUDA/Analysis/Launch.hs | bsd-3-clause | sharedMem _ Map{} _ = 0 | 44 | sharedMem _ Map{} _ = 0 | 44 | sharedMem _ Map{} _ = 0 | 44 | false | false | 0 | 6 | 26 | 17 | 8 | 9 | null | null |
reinvdwoerd/lisp | src/Parse.hs | mit | expr :: ReadTable -> Parser LispVal
expr readtable =
e
where e = p <|> symbol <|> number <|> string' <|> list
p = readTableParser readtable
{- Lists -}
list = do
char '('
contents <- sepBy e spaces
char ')'
return $ List contents
{- Strings -}
literalString =
String <$> many1 (noneOf ('\"' : readtableKeys))
where readtableKeys = concatMap extractPrefix $ filter isPrefix $ map fst readtable
isPrefix (Prefix _) = True
isPrefix _ = False
extractPrefix (Prefix s) = s
string' = do
char '"'
xs <- many (p <|> literalString)
char '"'
return $ List (Symbol "string-append" : xs)
{- Symbols -}
symbolChar = oneOf "!#$%&|*+-/:<=>?@^_."
symbolStr = do
first <- letter <|> symbolChar
rest <- many (letter <|> digit <|> symbolChar)
return $ first:rest
symbol = do
sym <- symbolStr
return $ case sym of
"true" -> Bool True
"false" -> Bool False
"nil" -> Nil
_ -> Symbol sym
{- Numbers -}
number =
(Number . read) <$> many1 digit
{- Parsing -} | 1,318 | expr :: ReadTable -> Parser LispVal
expr readtable =
e
where e = p <|> symbol <|> number <|> string' <|> list
p = readTableParser readtable
{- Lists -}
list = do
char '('
contents <- sepBy e spaces
char ')'
return $ List contents
{- Strings -}
literalString =
String <$> many1 (noneOf ('\"' : readtableKeys))
where readtableKeys = concatMap extractPrefix $ filter isPrefix $ map fst readtable
isPrefix (Prefix _) = True
isPrefix _ = False
extractPrefix (Prefix s) = s
string' = do
char '"'
xs <- many (p <|> literalString)
char '"'
return $ List (Symbol "string-append" : xs)
{- Symbols -}
symbolChar = oneOf "!#$%&|*+-/:<=>?@^_."
symbolStr = do
first <- letter <|> symbolChar
rest <- many (letter <|> digit <|> symbolChar)
return $ first:rest
symbol = do
sym <- symbolStr
return $ case sym of
"true" -> Bool True
"false" -> Bool False
"nil" -> Nil
_ -> Symbol sym
{- Numbers -}
number =
(Number . read) <$> many1 digit
{- Parsing -} | 1,318 | expr readtable =
e
where e = p <|> symbol <|> number <|> string' <|> list
p = readTableParser readtable
{- Lists -}
list = do
char '('
contents <- sepBy e spaces
char ')'
return $ List contents
{- Strings -}
literalString =
String <$> many1 (noneOf ('\"' : readtableKeys))
where readtableKeys = concatMap extractPrefix $ filter isPrefix $ map fst readtable
isPrefix (Prefix _) = True
isPrefix _ = False
extractPrefix (Prefix s) = s
string' = do
char '"'
xs <- many (p <|> literalString)
char '"'
return $ List (Symbol "string-append" : xs)
{- Symbols -}
symbolChar = oneOf "!#$%&|*+-/:<=>?@^_."
symbolStr = do
first <- letter <|> symbolChar
rest <- many (letter <|> digit <|> symbolChar)
return $ first:rest
symbol = do
sym <- symbolStr
return $ case sym of
"true" -> Bool True
"false" -> Bool False
"nil" -> Nil
_ -> Symbol sym
{- Numbers -}
number =
(Number . read) <$> many1 digit
{- Parsing -} | 1,282 | false | true | 8 | 13 | 553 | 378 | 177 | 201 | null | null |
AlexanderPankiv/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | mkFloatExpr :: Float -> CoreExpr
mkFloatExpr f = mkConApp floatDataCon [mkFloatLitFloat f] | 90 | mkFloatExpr :: Float -> CoreExpr
mkFloatExpr f = mkConApp floatDataCon [mkFloatLitFloat f] | 90 | mkFloatExpr f = mkConApp floatDataCon [mkFloatLitFloat f] | 57 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
CloudI/CloudI | src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Lazy.hs | mit | takeWhile :: (Word8 -> Bool) -> ByteString -> ByteString
takeWhile f cs0 = takeWhile' cs0
where takeWhile' Empty = Empty
takeWhile' (Chunk c cs) =
case findIndexOrEnd (not . f) c of
0 -> Empty
n | n < S.length c -> Chunk (S.take n c) Empty
| otherwise -> Chunk c (takeWhile' cs)
-- | 'dropWhile' @p xs@ returns the suffix remaining after 'takeWhile' @p xs@. | 445 | takeWhile :: (Word8 -> Bool) -> ByteString -> ByteString
takeWhile f cs0 = takeWhile' cs0
where takeWhile' Empty = Empty
takeWhile' (Chunk c cs) =
case findIndexOrEnd (not . f) c of
0 -> Empty
n | n < S.length c -> Chunk (S.take n c) Empty
| otherwise -> Chunk c (takeWhile' cs)
-- | 'dropWhile' @p xs@ returns the suffix remaining after 'takeWhile' @p xs@. | 445 | takeWhile f cs0 = takeWhile' cs0
where takeWhile' Empty = Empty
takeWhile' (Chunk c cs) =
case findIndexOrEnd (not . f) c of
0 -> Empty
n | n < S.length c -> Chunk (S.take n c) Empty
| otherwise -> Chunk c (takeWhile' cs)
-- | 'dropWhile' @p xs@ returns the suffix remaining after 'takeWhile' @p xs@. | 388 | false | true | 1 | 14 | 154 | 140 | 67 | 73 | null | null |
spechub/Hets | QVTR/Print.hs | gpl-2.0 | printCol :: Pretty a => [a] -> Doc
printCol a = space <+> space <+> foldr (($+$) . pretty) empty a | 98 | printCol :: Pretty a => [a] -> Doc
printCol a = space <+> space <+> foldr (($+$) . pretty) empty a | 98 | printCol a = space <+> space <+> foldr (($+$) . pretty) empty a | 63 | false | true | 0 | 8 | 20 | 52 | 27 | 25 | null | null |
mydaum/cabal | cabal-install/Distribution/Solver/Types/ComponentDeps.hs | bsd-3-clause | -- | Select dependencies satisfying a given predicate.
select :: Monoid a => (Component -> Bool) -> ComponentDeps a -> a
select p = foldMap snd . filter (p . fst) . toList | 171 | select :: Monoid a => (Component -> Bool) -> ComponentDeps a -> a
select p = foldMap snd . filter (p . fst) . toList | 116 | select p = foldMap snd . filter (p . fst) . toList | 50 | true | true | 0 | 9 | 32 | 61 | 30 | 31 | null | null |
rodrigogribeiro/mptc | src/Language/Haskell/Exts/Pretty.hs | bsd-3-clause | -- Combinators
(<>),(<+>),($$),($+$) :: Doc -> Doc -> Doc
aM <> bM = do{a<-aM;b<-bM;return (a P.<> b)} | 103 | (<>),(<+>),($$),($+$) :: Doc -> Doc -> Doc
aM <> bM = do{a<-aM;b<-bM;return (a P.<> b)} | 87 | aM <> bM = do{a<-aM;b<-bM;return (a P.<> b)} | 44 | true | true | 6 | 10 | 17 | 90 | 45 | 45 | null | null |
urbanslug/ghc | libraries/base/tests/IO/newline001.hs | bsd-3-clause | toCRLF ('\n':cs) = '\r':'\n': toCRLF cs | 39 | toCRLF ('\n':cs) = '\r':'\n': toCRLF cs | 39 | toCRLF ('\n':cs) = '\r':'\n': toCRLF cs | 39 | false | false | 0 | 7 | 5 | 23 | 11 | 12 | null | null |
expipiplus1/vulkan | src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs | bsd-3-clause | -- | vkImportSemaphoreZirconHandleFUCHSIA - Import a semaphore from a Zircon
-- event handle
--
-- = Description
--
-- Importing a semaphore payload from a Zircon event handle transfers
-- ownership of the handle from the application to the Vulkan
-- implementation. The application /must/ not perform any operations on the
-- handle after a successful import.
--
-- Applications /can/ import the same semaphore payload into multiple
-- instances of Vulkan, into the same instance from which it was exported,
-- and multiple times into a given Vulkan instance.
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
-- - 'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
-- - 'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
-- - 'Vulkan.Core10.Enums.Result.ERROR_INVALID_EXTERNAL_HANDLE'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_FUCHSIA_external_semaphore VK_FUCHSIA_external_semaphore>,
-- 'Vulkan.Core10.Handles.Device', 'ImportSemaphoreZirconHandleInfoFUCHSIA'
importSemaphoreZirconHandleFUCHSIA :: forall io
. (MonadIO io)
=> -- | @device@ is the logical device that created the semaphore.
--
-- #VUID-vkImportSemaphoreZirconHandleFUCHSIA-device-parameter# @device@
-- /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
Device
-> -- | @pImportSemaphoreZirconHandleInfo@ is a pointer to a
-- 'ImportSemaphoreZirconHandleInfoFUCHSIA' structure specifying the
-- semaphore and import parameters.
--
-- #VUID-vkImportSemaphoreZirconHandleFUCHSIA-pImportSemaphoreZirconHandleInfo-parameter#
-- @pImportSemaphoreZirconHandleInfo@ /must/ be a valid pointer to a valid
-- 'ImportSemaphoreZirconHandleInfoFUCHSIA' structure
ImportSemaphoreZirconHandleInfoFUCHSIA
-> io ()
importSemaphoreZirconHandleFUCHSIA device importSemaphoreZirconHandleInfo = liftIO . evalContT $ do
let vkImportSemaphoreZirconHandleFUCHSIAPtr = pVkImportSemaphoreZirconHandleFUCHSIA (case device of Device{deviceCmds} -> deviceCmds)
lift $ unless (vkImportSemaphoreZirconHandleFUCHSIAPtr /= nullFunPtr) $
throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkImportSemaphoreZirconHandleFUCHSIA is null" Nothing Nothing
let vkImportSemaphoreZirconHandleFUCHSIA' = mkVkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIAPtr
pImportSemaphoreZirconHandleInfo <- ContT $ withCStruct (importSemaphoreZirconHandleInfo)
r <- lift $ traceAroundEvent "vkImportSemaphoreZirconHandleFUCHSIA" (vkImportSemaphoreZirconHandleFUCHSIA' (deviceHandle (device)) pImportSemaphoreZirconHandleInfo)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
-- | VkImportSemaphoreZirconHandleInfoFUCHSIA - Structure specifying Zircon
-- event handle to import to a semaphore
--
-- = Description
--
-- The handle types supported by @handleType@ are:
--
-- +-------------------------------------------------------------------------------------------------------------------+------------------+---------------------+
-- | Handle Type | Transference | Permanence |
-- | | | Supported |
-- +===================================================================================================================+==================+=====================+
-- | 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA' | Reference | Temporary,Permanent |
-- +-------------------------------------------------------------------------------------------------------------------+------------------+---------------------+
--
-- Handle Types Supported by 'ImportSemaphoreZirconHandleInfoFUCHSIA'
--
-- == Valid Usage
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-04765#
-- @handleType@ /must/ be a value included in the
-- <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#synchronization-semaphore-handletypes-fuchsia Handle Types Supported by >
-- table
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04766#
-- @zirconHandle@ /must/ obey any requirements listed for @handleType@
-- in
-- <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#external-semaphore-handle-types-compatibility external semaphore handle types compatibility>
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04767#
-- @zirconHandle@ /must/ have @ZX_RIGHTS_BASIC@ and @ZX_RIGHTS_SIGNAL@
-- rights
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphoreType-04768#
-- The
-- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::@semaphoreType@
-- field /must/ not be
-- 'Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_TIMELINE'
--
-- == Valid Usage (Implicit)
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-sType-sType# @sType@
-- /must/ be
-- 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA'
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-pNext-pNext# @pNext@
-- /must/ be @NULL@
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphore-parameter#
-- @semaphore@ /must/ be a valid 'Vulkan.Core10.Handles.Semaphore'
-- handle
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-flags-parameter#
-- @flags@ /must/ be a valid combination of
-- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits'
-- values
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-parameter#
-- @handleType@ /must/ be a valid
-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits'
-- value
--
-- == Host Synchronization
--
-- - Host access to @semaphore@ /must/ be externally synchronized
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_FUCHSIA_external_semaphore VK_FUCHSIA_external_semaphore>,
-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits',
-- 'Vulkan.Core10.Handles.Semaphore',
-- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'importSemaphoreZirconHandleFUCHSIA' | 7,274 | importSemaphoreZirconHandleFUCHSIA :: forall io
. (MonadIO io)
=> -- | @device@ is the logical device that created the semaphore.
--
-- #VUID-vkImportSemaphoreZirconHandleFUCHSIA-device-parameter# @device@
-- /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
Device
-> -- | @pImportSemaphoreZirconHandleInfo@ is a pointer to a
-- 'ImportSemaphoreZirconHandleInfoFUCHSIA' structure specifying the
-- semaphore and import parameters.
--
-- #VUID-vkImportSemaphoreZirconHandleFUCHSIA-pImportSemaphoreZirconHandleInfo-parameter#
-- @pImportSemaphoreZirconHandleInfo@ /must/ be a valid pointer to a valid
-- 'ImportSemaphoreZirconHandleInfoFUCHSIA' structure
ImportSemaphoreZirconHandleInfoFUCHSIA
-> io ()
importSemaphoreZirconHandleFUCHSIA device importSemaphoreZirconHandleInfo = liftIO . evalContT $ do
let vkImportSemaphoreZirconHandleFUCHSIAPtr = pVkImportSemaphoreZirconHandleFUCHSIA (case device of Device{deviceCmds} -> deviceCmds)
lift $ unless (vkImportSemaphoreZirconHandleFUCHSIAPtr /= nullFunPtr) $
throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkImportSemaphoreZirconHandleFUCHSIA is null" Nothing Nothing
let vkImportSemaphoreZirconHandleFUCHSIA' = mkVkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIAPtr
pImportSemaphoreZirconHandleInfo <- ContT $ withCStruct (importSemaphoreZirconHandleInfo)
r <- lift $ traceAroundEvent "vkImportSemaphoreZirconHandleFUCHSIA" (vkImportSemaphoreZirconHandleFUCHSIA' (deviceHandle (device)) pImportSemaphoreZirconHandleInfo)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
-- | VkImportSemaphoreZirconHandleInfoFUCHSIA - Structure specifying Zircon
-- event handle to import to a semaphore
--
-- = Description
--
-- The handle types supported by @handleType@ are:
--
-- +-------------------------------------------------------------------------------------------------------------------+------------------+---------------------+
-- | Handle Type | Transference | Permanence |
-- | | | Supported |
-- +===================================================================================================================+==================+=====================+
-- | 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA' | Reference | Temporary,Permanent |
-- +-------------------------------------------------------------------------------------------------------------------+------------------+---------------------+
--
-- Handle Types Supported by 'ImportSemaphoreZirconHandleInfoFUCHSIA'
--
-- == Valid Usage
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-04765#
-- @handleType@ /must/ be a value included in the
-- <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#synchronization-semaphore-handletypes-fuchsia Handle Types Supported by >
-- table
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04766#
-- @zirconHandle@ /must/ obey any requirements listed for @handleType@
-- in
-- <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#external-semaphore-handle-types-compatibility external semaphore handle types compatibility>
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04767#
-- @zirconHandle@ /must/ have @ZX_RIGHTS_BASIC@ and @ZX_RIGHTS_SIGNAL@
-- rights
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphoreType-04768#
-- The
-- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::@semaphoreType@
-- field /must/ not be
-- 'Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_TIMELINE'
--
-- == Valid Usage (Implicit)
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-sType-sType# @sType@
-- /must/ be
-- 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA'
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-pNext-pNext# @pNext@
-- /must/ be @NULL@
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphore-parameter#
-- @semaphore@ /must/ be a valid 'Vulkan.Core10.Handles.Semaphore'
-- handle
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-flags-parameter#
-- @flags@ /must/ be a valid combination of
-- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits'
-- values
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-parameter#
-- @handleType@ /must/ be a valid
-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits'
-- value
--
-- == Host Synchronization
--
-- - Host access to @semaphore@ /must/ be externally synchronized
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_FUCHSIA_external_semaphore VK_FUCHSIA_external_semaphore>,
-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits',
-- 'Vulkan.Core10.Handles.Semaphore',
-- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'importSemaphoreZirconHandleFUCHSIA' | 6,017 | importSemaphoreZirconHandleFUCHSIA device importSemaphoreZirconHandleInfo = liftIO . evalContT $ do
let vkImportSemaphoreZirconHandleFUCHSIAPtr = pVkImportSemaphoreZirconHandleFUCHSIA (case device of Device{deviceCmds} -> deviceCmds)
lift $ unless (vkImportSemaphoreZirconHandleFUCHSIAPtr /= nullFunPtr) $
throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkImportSemaphoreZirconHandleFUCHSIA is null" Nothing Nothing
let vkImportSemaphoreZirconHandleFUCHSIA' = mkVkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIAPtr
pImportSemaphoreZirconHandleInfo <- ContT $ withCStruct (importSemaphoreZirconHandleInfo)
r <- lift $ traceAroundEvent "vkImportSemaphoreZirconHandleFUCHSIA" (vkImportSemaphoreZirconHandleFUCHSIA' (deviceHandle (device)) pImportSemaphoreZirconHandleInfo)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
-- | VkImportSemaphoreZirconHandleInfoFUCHSIA - Structure specifying Zircon
-- event handle to import to a semaphore
--
-- = Description
--
-- The handle types supported by @handleType@ are:
--
-- +-------------------------------------------------------------------------------------------------------------------+------------------+---------------------+
-- | Handle Type | Transference | Permanence |
-- | | | Supported |
-- +===================================================================================================================+==================+=====================+
-- | 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA' | Reference | Temporary,Permanent |
-- +-------------------------------------------------------------------------------------------------------------------+------------------+---------------------+
--
-- Handle Types Supported by 'ImportSemaphoreZirconHandleInfoFUCHSIA'
--
-- == Valid Usage
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-04765#
-- @handleType@ /must/ be a value included in the
-- <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#synchronization-semaphore-handletypes-fuchsia Handle Types Supported by >
-- table
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04766#
-- @zirconHandle@ /must/ obey any requirements listed for @handleType@
-- in
-- <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#external-semaphore-handle-types-compatibility external semaphore handle types compatibility>
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04767#
-- @zirconHandle@ /must/ have @ZX_RIGHTS_BASIC@ and @ZX_RIGHTS_SIGNAL@
-- rights
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphoreType-04768#
-- The
-- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::@semaphoreType@
-- field /must/ not be
-- 'Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_TIMELINE'
--
-- == Valid Usage (Implicit)
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-sType-sType# @sType@
-- /must/ be
-- 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA'
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-pNext-pNext# @pNext@
-- /must/ be @NULL@
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphore-parameter#
-- @semaphore@ /must/ be a valid 'Vulkan.Core10.Handles.Semaphore'
-- handle
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-flags-parameter#
-- @flags@ /must/ be a valid combination of
-- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits'
-- values
--
-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-parameter#
-- @handleType@ /must/ be a valid
-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits'
-- value
--
-- == Host Synchronization
--
-- - Host access to @semaphore@ /must/ be externally synchronized
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_FUCHSIA_external_semaphore VK_FUCHSIA_external_semaphore>,
-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits',
-- 'Vulkan.Core10.Handles.Semaphore',
-- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'importSemaphoreZirconHandleFUCHSIA' | 4,750 | true | true | 0 | 17 | 1,482 | 327 | 217 | 110 | null | null |
dbp/misc | misc.hs | isc | primeFactors :: Integer -> [Integer]
primeFactors n = (pfs $ tail $ factors n)
where pfs [] = []
pfs (x:xs) = x:(pfs $ filter (\y -> (y `mod` x) /= 0) xs) | 164 | primeFactors :: Integer -> [Integer]
primeFactors n = (pfs $ tail $ factors n)
where pfs [] = []
pfs (x:xs) = x:(pfs $ filter (\y -> (y `mod` x) /= 0) xs) | 164 | primeFactors n = (pfs $ tail $ factors n)
where pfs [] = []
pfs (x:xs) = x:(pfs $ filter (\y -> (y `mod` x) /= 0) xs) | 127 | false | true | 1 | 13 | 42 | 102 | 54 | 48 | null | null |
raymoo/applepai | src/Mahjong/Scoring/Yaku.hs | gpl-3.0 | chooses n xs
| n < 0 = []
| otherwise = do
(one, rest) <- splices xs
otherPart <- chooses (n - 1) rest
return $ one : otherPart
-- | Inefficient, but sufficient for small inputs | 201 | chooses n xs
| n < 0 = []
| otherwise = do
(one, rest) <- splices xs
otherPart <- chooses (n - 1) rest
return $ one : otherPart
-- | Inefficient, but sufficient for small inputs | 201 | chooses n xs
| n < 0 = []
| otherwise = do
(one, rest) <- splices xs
otherPart <- chooses (n - 1) rest
return $ one : otherPart
-- | Inefficient, but sufficient for small inputs | 201 | false | false | 1 | 10 | 61 | 82 | 38 | 44 | null | null |
acowley/ghc | compiler/main/DynFlags.hs | bsd-3-clause | opt_windres :: DynFlags -> [String]
opt_windres dflags = sOpt_windres (settings dflags) | 97 | opt_windres :: DynFlags -> [String]
opt_windres dflags = sOpt_windres (settings dflags) | 97 | opt_windres dflags = sOpt_windres (settings dflags) | 51 | false | true | 0 | 7 | 20 | 30 | 15 | 15 | null | null |
scottgw/eiffel-typecheck | Language/Eiffel/TypeCheck/BasicTypes.hs | bsd-3-clause | conforms _t VoidType = return Nothing | 37 | conforms _t VoidType = return Nothing | 37 | conforms _t VoidType = return Nothing | 37 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x01A1' = "\x006F\x031B" | 39 | decomposeChar '\x01A1' = "\x006F\x031B" | 39 | decomposeChar '\x01A1' = "\x006F\x031B" | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jyrimatti/alava | src-lib/SimpleParser.hs | mit | getPos (Sigma _ (Just b) _) = getPos b | 38 | getPos (Sigma _ (Just b) _) = getPos b | 38 | getPos (Sigma _ (Just b) _) = getPos b | 38 | false | false | 0 | 9 | 8 | 28 | 13 | 15 | null | null |
heathweiss/Tricad | src/CornerPoints/CornerPoints.hs | gpl-2.0 | (F2 f2t) +++ (FrontTopLine f2 f3) =
FrontTopLine f2t f2 | 58 | (F2 f2t) +++ (FrontTopLine f2 f3) =
FrontTopLine f2t f2 | 58 | (F2 f2t) +++ (FrontTopLine f2 f3) =
FrontTopLine f2t f2 | 58 | false | false | 0 | 7 | 12 | 31 | 14 | 17 | null | null |
thalerjonathan/phd | public/ArtIterating/code/haskell/PureAgentsAct/src/SpacialGameEnv/RunSGEnv.hs | gpl-3.0 | greenC :: (Double, Double, Double)
greenC = (0.0, 0.4, 0.0) | 59 | greenC :: (Double, Double, Double)
greenC = (0.0, 0.4, 0.0) | 59 | greenC = (0.0, 0.4, 0.0) | 24 | false | true | 0 | 7 | 9 | 36 | 19 | 17 | null | null |
mdsteele/fallback | src/Fallback/View/Camera.hs | gpl-3.0 | paintWeaponRange :: (AreaState a) => IPoint -> a -> CharacterNumber
-> AttackRange -> Paint ()
paintWeaponRange cameraTopleft ars charNum attackRange =
paintRegion $ getRegion (rangeSqDist attackRange) where
getRegion sqdist = Set.filter ((sqdist >=) . pSqDist originPos) $
arsVisibleForCharacter charNum ars
originPos = arsCharacterPosition charNum ars
paintRegion = paintTargetingRegion (Tint 255 0 0 64) cameraTopleft | 474 | paintWeaponRange :: (AreaState a) => IPoint -> a -> CharacterNumber
-> AttackRange -> Paint ()
paintWeaponRange cameraTopleft ars charNum attackRange =
paintRegion $ getRegion (rangeSqDist attackRange) where
getRegion sqdist = Set.filter ((sqdist >=) . pSqDist originPos) $
arsVisibleForCharacter charNum ars
originPos = arsCharacterPosition charNum ars
paintRegion = paintTargetingRegion (Tint 255 0 0 64) cameraTopleft | 474 | paintWeaponRange cameraTopleft ars charNum attackRange =
paintRegion $ getRegion (rangeSqDist attackRange) where
getRegion sqdist = Set.filter ((sqdist >=) . pSqDist originPos) $
arsVisibleForCharacter charNum ars
originPos = arsCharacterPosition charNum ars
paintRegion = paintTargetingRegion (Tint 255 0 0 64) cameraTopleft | 362 | false | true | 0 | 11 | 107 | 133 | 66 | 67 | null | null |
Solonarv/OctoTactics | OctoTactics/Data/Direction.hs | mit | move South (x, y) = (x , y + 1) | 38 | move South (x, y) = (x , y + 1) | 38 | move South (x, y) = (x , y + 1) | 38 | false | false | 0 | 6 | 16 | 29 | 15 | 14 | null | null |
benkolera/xml-conduit-decode | src/Text/XML/Decode/Parsers.hs | mit | parseXmlTime :: ParseTime a => Text -> String -> Text -> Either Text a
parseXmlTime desc format =
parseMaybe desc (parseTimeM True defaultTimeLocale format . unpack) | 167 | parseXmlTime :: ParseTime a => Text -> String -> Text -> Either Text a
parseXmlTime desc format =
parseMaybe desc (parseTimeM True defaultTimeLocale format . unpack) | 167 | parseXmlTime desc format =
parseMaybe desc (parseTimeM True defaultTimeLocale format . unpack) | 96 | false | true | 0 | 10 | 27 | 65 | 29 | 36 | null | null |
jstolarek/ghc | libraries/base/Data/OldList.hs | bsd-3-clause | mapAccumLF f = \x r -> oneShot (\s ->
let (s', y) = f s x
(s'', ys) = r s'
in (s'', y:ys)) | 171 | mapAccumLF f = \x r -> oneShot (\s ->
let (s', y) = f s x
(s'', ys) = r s'
in (s'', y:ys)) | 171 | mapAccumLF f = \x r -> oneShot (\s ->
let (s', y) = f s x
(s'', ys) = r s'
in (s'', y:ys)) | 171 | false | false | 0 | 13 | 104 | 75 | 39 | 36 | null | null |
k16shikano/wikipepub | Wpub/ReadMediaWiki.hs | mit | item = itemize item' subblist | 29 | item = itemize item' subblist | 29 | item = itemize item' subblist | 29 | false | false | 1 | 5 | 4 | 15 | 5 | 10 | null | null |
markmq/Noobing | src/Noobing/Experimenting/Test.hs | bsd-3-clause | sortTest :: (Ord a) => [a] -> [a]
sortTest l = sort $ l | 55 | sortTest :: (Ord a) => [a] -> [a]
sortTest l = sort $ l | 55 | sortTest l = sort $ l | 21 | false | true | 0 | 7 | 13 | 37 | 20 | 17 | null | null |
siddhanathan/ghc | compiler/prelude/THNames.hs | bsd-3-clause | intPrimLIdKey = mkPreludeMiscIdUnique 223 | 45 | intPrimLIdKey = mkPreludeMiscIdUnique 223 | 45 | intPrimLIdKey = mkPreludeMiscIdUnique 223 | 45 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/BatchDelete.hs | mpl-2.0 | -- | V1 error format.
babdXgafv :: Lens' BeaconsAttachmentsBatchDelete (Maybe Xgafv)
babdXgafv
= lens _babdXgafv (\ s a -> s{_babdXgafv = a}) | 143 | babdXgafv :: Lens' BeaconsAttachmentsBatchDelete (Maybe Xgafv)
babdXgafv
= lens _babdXgafv (\ s a -> s{_babdXgafv = a}) | 121 | babdXgafv
= lens _babdXgafv (\ s a -> s{_babdXgafv = a}) | 58 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
WraithM/peertrader-backend | src/System/IO/Streams/Serialize.hs | bsd-3-clause | decodeFromStream :: Serialize a => InputStream ByteString -> IO (InputStream a)
decodeFromStream = Streams.map (fromEither . decode)
where
fromEither (Left s) = error s
fromEither (Right x) = x | 203 | decodeFromStream :: Serialize a => InputStream ByteString -> IO (InputStream a)
decodeFromStream = Streams.map (fromEither . decode)
where
fromEither (Left s) = error s
fromEither (Right x) = x | 203 | decodeFromStream = Streams.map (fromEither . decode)
where
fromEither (Left s) = error s
fromEither (Right x) = x | 123 | false | true | 1 | 9 | 38 | 79 | 38 | 41 | null | null |
samscott89/tamarin-prover | lib/theory/src/Theory/Proof.hs | gpl-3.0 | -- | @boundProofDepth bound prf@ bounds the depth of the proof @prf@ using
-- 'Sorry' steps to replace the cut sub-proofs.
boundProofDepth :: Int -> Proof a -> Proof a
boundProofDepth bound =
go bound
where
go n (LNode ps@(ProofStep _ info) cs)
| 0 < n = LNode ps $ M.map (go (pred n)) cs
| otherwise = sorry (Just $ "bound " ++ show bound ++ " hit") info
-- | @boundProofDepth bound prf@ bounds the depth of the proof @prf@ using
-- 'Sorry' steps to replace the cut sub-proofs. | 525 | boundProofDepth :: Int -> Proof a -> Proof a
boundProofDepth bound =
go bound
where
go n (LNode ps@(ProofStep _ info) cs)
| 0 < n = LNode ps $ M.map (go (pred n)) cs
| otherwise = sorry (Just $ "bound " ++ show bound ++ " hit") info
-- | @boundProofDepth bound prf@ bounds the depth of the proof @prf@ using
-- 'Sorry' steps to replace the cut sub-proofs. | 402 | boundProofDepth bound =
go bound
where
go n (LNode ps@(ProofStep _ info) cs)
| 0 < n = LNode ps $ M.map (go (pred n)) cs
| otherwise = sorry (Just $ "bound " ++ show bound ++ " hit") info
-- | @boundProofDepth bound prf@ bounds the depth of the proof @prf@ using
-- 'Sorry' steps to replace the cut sub-proofs. | 357 | true | true | 0 | 11 | 138 | 142 | 67 | 75 | null | null |
andorp/bead | src/Bead/Persistence/SQL/FileSystem.hs | bsd-3-clause | userDir = "user" | 16 | userDir = "user" | 16 | userDir = "user" | 16 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
paradoja/prog68 | css/screen.hs | agpl-3.0 | pageMenu :: Css
pageMenu = do
ul ? do
background lightsteelblue
padding nil nil nil nil
margin nil nil nil nil
li ? do
listStyleType none | 164 | pageMenu :: Css
pageMenu = do
ul ? do
background lightsteelblue
padding nil nil nil nil
margin nil nil nil nil
li ? do
listStyleType none | 164 | pageMenu = do
ul ? do
background lightsteelblue
padding nil nil nil nil
margin nil nil nil nil
li ? do
listStyleType none | 148 | false | true | 0 | 13 | 52 | 61 | 26 | 35 | null | null |
MortimerMcMire315/grasph | src/Grasph/Algorithm/MWST.hs | gpl-3.0 | dist'' :: [Edge v w d] -> v -> v -> (v, Infinitable w)
dist'' [] _ _ = PositiveInfinity | 87 | dist'' :: [Edge v w d] -> v -> v -> (v, Infinitable w)
dist'' [] _ _ = PositiveInfinity | 87 | dist'' [] _ _ = PositiveInfinity | 32 | false | true | 0 | 9 | 19 | 51 | 26 | 25 | null | null |
PaulGustafson/stringnet | TambaraYamagami.hs | mit | alphaSO M (AE _) (AE _) = idMorphism $ toObject M | 49 | alphaSO M (AE _) (AE _) = idMorphism $ toObject M | 49 | alphaSO M (AE _) (AE _) = idMorphism $ toObject M | 49 | false | false | 0 | 7 | 10 | 32 | 15 | 17 | null | null |
cliffano/swaggy-jenkins | clients/haskell-http-client/generated/lib/SwaggyJenkins/ModelLens.hs | mit | -- | 'inputStepImplLinks' Lens
inputStepImplLinksL :: Lens_' InputStepImpl (Maybe InputStepImpllinks)
inputStepImplLinksL f InputStepImpl{..} = (\inputStepImplLinks -> InputStepImpl { inputStepImplLinks, ..} ) <$> f inputStepImplLinks | 234 | inputStepImplLinksL :: Lens_' InputStepImpl (Maybe InputStepImpllinks)
inputStepImplLinksL f InputStepImpl{..} = (\inputStepImplLinks -> InputStepImpl { inputStepImplLinks, ..} ) <$> f inputStepImplLinks | 203 | inputStepImplLinksL f InputStepImpl{..} = (\inputStepImplLinks -> InputStepImpl { inputStepImplLinks, ..} ) <$> f inputStepImplLinks | 132 | true | true | 1 | 8 | 23 | 62 | 30 | 32 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/test/Test/AWS/Gen/EC2.hs | mpl-2.0 | testAssociateRouteTable :: AssociateRouteTable -> TestTree
testAssociateRouteTable = req
"AssociateRouteTable"
"fixture/AssociateRouteTable.yaml" | 153 | testAssociateRouteTable :: AssociateRouteTable -> TestTree
testAssociateRouteTable = req
"AssociateRouteTable"
"fixture/AssociateRouteTable.yaml" | 153 | testAssociateRouteTable = req
"AssociateRouteTable"
"fixture/AssociateRouteTable.yaml" | 94 | false | true | 0 | 5 | 17 | 20 | 10 | 10 | null | null |
jabaraster/network-qiita | src/Network/Qiita.hs | bsd-3-clause | getTagItemsFirstPage :: TagName -> IO (ListData Item, RateLimit)
getTagItemsFirstPage = (flip getTagItemsFirstPage') defaultPerPage | 132 | getTagItemsFirstPage :: TagName -> IO (ListData Item, RateLimit)
getTagItemsFirstPage = (flip getTagItemsFirstPage') defaultPerPage | 132 | getTagItemsFirstPage = (flip getTagItemsFirstPage') defaultPerPage | 67 | false | true | 0 | 8 | 13 | 36 | 18 | 18 | null | null |
aloiscochard/sarsi | src/Rosetta.hs | apache-2.0 | projectToolBuildArgs :: ProjectTag -> [String]
projectToolBuildArgs NIX = ["."] | 79 | projectToolBuildArgs :: ProjectTag -> [String]
projectToolBuildArgs NIX = ["."] | 79 | projectToolBuildArgs NIX = ["."] | 32 | false | true | 0 | 6 | 8 | 28 | 14 | 14 | null | null |
MgaMPKAy/language-sh | Language/Sh/Pretty.hs | bsd-3-clause | indented :: Pretty p => Int -> p -> PrettyP String
indented i p = do s <- get
put $ s { indent = indent s + i }
a <- prettyC p
modify $ \s' -> s' { indent = indent s }
return a | 248 | indented :: Pretty p => Int -> p -> PrettyP String
indented i p = do s <- get
put $ s { indent = indent s + i }
a <- prettyC p
modify $ \s' -> s' { indent = indent s }
return a | 248 | indented i p = do s <- get
put $ s { indent = indent s + i }
a <- prettyC p
modify $ \s' -> s' { indent = indent s }
return a | 197 | false | true | 0 | 12 | 118 | 107 | 49 | 58 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/EC2NetworkInterfaceAttachment.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface-attachment.html#cfn-ec2-network-interface-attachment-networkinterfaceid
ecniaNetworkInterfaceId :: Lens' EC2NetworkInterfaceAttachment (Val Text)
ecniaNetworkInterfaceId = lens _eC2NetworkInterfaceAttachmentNetworkInterfaceId (\s a -> s { _eC2NetworkInterfaceAttachmentNetworkInterfaceId = a }) | 396 | ecniaNetworkInterfaceId :: Lens' EC2NetworkInterfaceAttachment (Val Text)
ecniaNetworkInterfaceId = lens _eC2NetworkInterfaceAttachmentNetworkInterfaceId (\s a -> s { _eC2NetworkInterfaceAttachmentNetworkInterfaceId = a }) | 222 | ecniaNetworkInterfaceId = lens _eC2NetworkInterfaceAttachmentNetworkInterfaceId (\s a -> s { _eC2NetworkInterfaceAttachmentNetworkInterfaceId = a }) | 148 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
rafalnowak/RaytracaH | src/RaytracaH/Ray.hs | apache-2.0 | pixelToNdcCoords :: Screen -> Int -> Int-> Vector2D
pixelToNdcCoords (Screen screenW screenH) x y =
Vec2F ((fromIntegral x + 0.5)/fromIntegral screenW) ((fromIntegral y + 0.5)/fromIntegral screenH) | 201 | pixelToNdcCoords :: Screen -> Int -> Int-> Vector2D
pixelToNdcCoords (Screen screenW screenH) x y =
Vec2F ((fromIntegral x + 0.5)/fromIntegral screenW) ((fromIntegral y + 0.5)/fromIntegral screenH) | 201 | pixelToNdcCoords (Screen screenW screenH) x y =
Vec2F ((fromIntegral x + 0.5)/fromIntegral screenW) ((fromIntegral y + 0.5)/fromIntegral screenH) | 149 | false | true | 0 | 10 | 29 | 83 | 41 | 42 | null | null |
purescript/trypurescript | server/Main.hs | bsd-3-clause | tryParseType :: Text -> Maybe P.SourceType
tryParseType = hush . fmap (CST.convertType "<file>") . runParser CST.parseTypeP
where
hush = either (const Nothing) Just
runParser :: CST.Parser a -> Text -> Either String a
runParser p =
bimap (CST.prettyPrintError . NE.head) snd
. CST.runTokenParser (p <* CSTM.token CST.TokEof)
. CST.lexTopLevel | 379 | tryParseType :: Text -> Maybe P.SourceType
tryParseType = hush . fmap (CST.convertType "<file>") . runParser CST.parseTypeP
where
hush = either (const Nothing) Just
runParser :: CST.Parser a -> Text -> Either String a
runParser p =
bimap (CST.prettyPrintError . NE.head) snd
. CST.runTokenParser (p <* CSTM.token CST.TokEof)
. CST.lexTopLevel | 379 | tryParseType = hush . fmap (CST.convertType "<file>") . runParser CST.parseTypeP
where
hush = either (const Nothing) Just
runParser :: CST.Parser a -> Text -> Either String a
runParser p =
bimap (CST.prettyPrintError . NE.head) snd
. CST.runTokenParser (p <* CSTM.token CST.TokEof)
. CST.lexTopLevel | 336 | false | true | 4 | 9 | 85 | 157 | 69 | 88 | null | null |
brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/Hl7V2Stores/Messages/Patch.hs | mpl-2.0 | -- | Resource name of the Message, of the form
-- \`projects\/{project_id}\/datasets\/{dataset_id}\/hl7V2Stores\/{hl7_v2_store_id}\/messages\/{message_id}\`.
-- Assigned by the server.
pldshvsmpName :: Lens' ProjectsLocationsDataSetsHl7V2StoresMessagesPatch Text
pldshvsmpName
= lens _pldshvsmpName
(\ s a -> s{_pldshvsmpName = a}) | 339 | pldshvsmpName :: Lens' ProjectsLocationsDataSetsHl7V2StoresMessagesPatch Text
pldshvsmpName
= lens _pldshvsmpName
(\ s a -> s{_pldshvsmpName = a}) | 154 | pldshvsmpName
= lens _pldshvsmpName
(\ s a -> s{_pldshvsmpName = a}) | 76 | true | true | 0 | 8 | 40 | 45 | 24 | 21 | null | null |
SKA-ScienceDataProcessor/RC | MS3/Sketches/GCF_new/GCF.hs | apache-2.0 | getLayers :: GCFDev -> CUDA.DevicePtr CxDoubleDevPtr
getLayers (GCF _ n _ l isfull) = if isfull then CUDA.advanceDevPtr l ((n `div` 2) * 8 * 8) else l | 150 | getLayers :: GCFDev -> CUDA.DevicePtr CxDoubleDevPtr
getLayers (GCF _ n _ l isfull) = if isfull then CUDA.advanceDevPtr l ((n `div` 2) * 8 * 8) else l | 150 | getLayers (GCF _ n _ l isfull) = if isfull then CUDA.advanceDevPtr l ((n `div` 2) * 8 * 8) else l | 97 | false | true | 0 | 11 | 27 | 77 | 39 | 38 | null | null |
liuyang1/sicp-ans | ch2/04.hs | apache-2.0 | main = do
print $ mycar v
print $ mycdr v
where v = mycons 1 2 | 78 | main = do
print $ mycar v
print $ mycdr v
where v = mycons 1 2 | 78 | main = do
print $ mycar v
print $ mycdr v
where v = mycons 1 2 | 78 | false | false | 2 | 8 | 32 | 45 | 17 | 28 | null | null |
laszlopandy/elm-package | src/Get/Init.hs | bsd-3-clause | readDeps :: IO D.Description
readDeps = do
projectName <- askFor "Project name:"
userName <- askFor "Github user name:"
version <- askForVersion (Just "0.1.0") "Initial version? [default: 0.1.0]"
summary <- askForLimited "Summary" 80 "Summary:"
description <- askFor "Description:"
license <- askForWithDefault "BSD3" "License? [default: BSD3]"
repo <- askFor "Repository address?"
elmVersion <- askForVersion Nothing "Elm version?"
return $ D.Description (N.Name userName projectName) version summary description license repo [] [] elmVersion [] [] | 567 | readDeps :: IO D.Description
readDeps = do
projectName <- askFor "Project name:"
userName <- askFor "Github user name:"
version <- askForVersion (Just "0.1.0") "Initial version? [default: 0.1.0]"
summary <- askForLimited "Summary" 80 "Summary:"
description <- askFor "Description:"
license <- askForWithDefault "BSD3" "License? [default: BSD3]"
repo <- askFor "Repository address?"
elmVersion <- askForVersion Nothing "Elm version?"
return $ D.Description (N.Name userName projectName) version summary description license repo [] [] elmVersion [] [] | 567 | readDeps = do
projectName <- askFor "Project name:"
userName <- askFor "Github user name:"
version <- askForVersion (Just "0.1.0") "Initial version? [default: 0.1.0]"
summary <- askForLimited "Summary" 80 "Summary:"
description <- askFor "Description:"
license <- askForWithDefault "BSD3" "License? [default: BSD3]"
repo <- askFor "Repository address?"
elmVersion <- askForVersion Nothing "Elm version?"
return $ D.Description (N.Name userName projectName) version summary description license repo [] [] elmVersion [] [] | 538 | false | true | 0 | 12 | 88 | 168 | 73 | 95 | null | null |
JoshuaGross/haskell-learning-log | Code/Haskellbook/Applicatives/src/Main.hs | mit | main :: IO ()
main = do
quickBatch (monoid Twoo)
quickBatch (applicative (undefined :: [(String, String, Int)]))
quickBatch (monoid (ZipList [Sum 1 :: Sum Int]))
quickBatch (monoid (Cons 'a' Nil))
quickBatch (applicative (undefined :: [(List Int, List Int, Int)])) | 274 | main :: IO ()
main = do
quickBatch (monoid Twoo)
quickBatch (applicative (undefined :: [(String, String, Int)]))
quickBatch (monoid (ZipList [Sum 1 :: Sum Int]))
quickBatch (monoid (Cons 'a' Nil))
quickBatch (applicative (undefined :: [(List Int, List Int, Int)])) | 274 | main = do
quickBatch (monoid Twoo)
quickBatch (applicative (undefined :: [(String, String, Int)]))
quickBatch (monoid (ZipList [Sum 1 :: Sum Int]))
quickBatch (monoid (Cons 'a' Nil))
quickBatch (applicative (undefined :: [(List Int, List Int, Int)])) | 260 | false | true | 0 | 13 | 48 | 144 | 72 | 72 | null | null |
GaloisInc/saw-script | saw-core/src/Verifier/SAW/Rewriter.hs | bsd-3-clause | -- | Do a single reduction step (beta, record or tuple selector) at top
-- level, if possible.
reduceSharedTerm :: SharedContext -> Term -> Maybe (IO Term)
reduceSharedTerm sc (asBetaRedex -> Just (_, _, body, arg)) = Just (instantiateVar sc 0 arg body) | 253 | reduceSharedTerm :: SharedContext -> Term -> Maybe (IO Term)
reduceSharedTerm sc (asBetaRedex -> Just (_, _, body, arg)) = Just (instantiateVar sc 0 arg body) | 158 | reduceSharedTerm sc (asBetaRedex -> Just (_, _, body, arg)) = Just (instantiateVar sc 0 arg body) | 97 | true | true | 0 | 9 | 42 | 72 | 38 | 34 | null | null |
alexander-at-github/eta | compiler/ETA/Utils/Util.hs | bsd-3-clause | consIORef :: IORef [a] -> a -> IO ()
consIORef var x = do
atomicModifyIORef var (\xs -> (x:xs,())) | 100 | consIORef :: IORef [a] -> a -> IO ()
consIORef var x = do
atomicModifyIORef var (\xs -> (x:xs,())) | 100 | consIORef var x = do
atomicModifyIORef var (\xs -> (x:xs,())) | 63 | false | true | 0 | 12 | 20 | 68 | 33 | 35 | null | null |
daniel-ziegler/provability | src/Modal/Parser.hs | bsd-3-clause | setParser :: Ord x => Parser x -> Parser (Set x)
setParser p = Set.fromList <$> braces (sepEndBy p comma) | 105 | setParser :: Ord x => Parser x -> Parser (Set x)
setParser p = Set.fromList <$> braces (sepEndBy p comma) | 105 | setParser p = Set.fromList <$> braces (sepEndBy p comma) | 56 | false | true | 0 | 9 | 19 | 54 | 25 | 29 | null | null |
astro/haskell-torrent | src/Data/ByteString/Builder.hs | bsd-2-clause | putWord64be :: Word64 -> Builder
putWord64be w = writeN 8 $ \p -> do
poke p (fromIntegral (shiftR w 56) :: Word8)
poke (p `plusPtr` 1) (fromIntegral (shiftR w 48) :: Word8)
poke (p `plusPtr` 2) (fromIntegral (shiftR w 40) :: Word8)
poke (p `plusPtr` 3) (fromIntegral (shiftR w 32) :: Word8)
poke (p `plusPtr` 4) (fromIntegral (shiftR w 24) :: Word8)
poke (p `plusPtr` 5) (fromIntegral (shiftR w 16) :: Word8)
poke (p `plusPtr` 6) (fromIntegral (shiftR w 8) :: Word8)
poke (p `plusPtr` 7) (fromIntegral w :: Word8)
-- | Write a Word64 in little endian format | 617 | putWord64be :: Word64 -> Builder
putWord64be w = writeN 8 $ \p -> do
poke p (fromIntegral (shiftR w 56) :: Word8)
poke (p `plusPtr` 1) (fromIntegral (shiftR w 48) :: Word8)
poke (p `plusPtr` 2) (fromIntegral (shiftR w 40) :: Word8)
poke (p `plusPtr` 3) (fromIntegral (shiftR w 32) :: Word8)
poke (p `plusPtr` 4) (fromIntegral (shiftR w 24) :: Word8)
poke (p `plusPtr` 5) (fromIntegral (shiftR w 16) :: Word8)
poke (p `plusPtr` 6) (fromIntegral (shiftR w 8) :: Word8)
poke (p `plusPtr` 7) (fromIntegral w :: Word8)
-- | Write a Word64 in little endian format | 617 | putWord64be w = writeN 8 $ \p -> do
poke p (fromIntegral (shiftR w 56) :: Word8)
poke (p `plusPtr` 1) (fromIntegral (shiftR w 48) :: Word8)
poke (p `plusPtr` 2) (fromIntegral (shiftR w 40) :: Word8)
poke (p `plusPtr` 3) (fromIntegral (shiftR w 32) :: Word8)
poke (p `plusPtr` 4) (fromIntegral (shiftR w 24) :: Word8)
poke (p `plusPtr` 5) (fromIntegral (shiftR w 16) :: Word8)
poke (p `plusPtr` 6) (fromIntegral (shiftR w 8) :: Word8)
poke (p `plusPtr` 7) (fromIntegral w :: Word8)
-- | Write a Word64 in little endian format | 584 | false | true | 0 | 13 | 158 | 286 | 150 | 136 | null | null |
GaloisInc/halvm-ghc | libraries/template-haskell/Language/Haskell/TH/Lib.hs | bsd-3-clause | inferR = InferR | 26 | inferR = InferR | 26 | inferR = InferR | 26 | false | false | 0 | 4 | 13 | 6 | 3 | 3 | null | null |
lueck/htcf | src/HTCF/PosParser/XmlParsec.hs | gpl-3.0 | parseXmlFromString :: XParser s XmlTrees -> XPState s -> String -> String -> XmlTrees
parseXmlFromString parser s0 loc
= either ((:[]) . mkError' c_err . (++ "\n") . show) id
. runParser parser s0 loc | 215 | parseXmlFromString :: XParser s XmlTrees -> XPState s -> String -> String -> XmlTrees
parseXmlFromString parser s0 loc
= either ((:[]) . mkError' c_err . (++ "\n") . show) id
. runParser parser s0 loc | 215 | parseXmlFromString parser s0 loc
= either ((:[]) . mkError' c_err . (++ "\n") . show) id
. runParser parser s0 loc | 124 | false | true | 0 | 12 | 49 | 86 | 43 | 43 | null | null |
AlexanderPankiv/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res ReadByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 125 | emitPrimOp dflags res ReadByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 125 | emitPrimOp dflags res ReadByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 125 | false | false | 0 | 9 | 22 | 36 | 17 | 19 | null | null |
nevrenato/HetsAlloy | OWL2/Parse.hs | gpl-2.0 | literal :: CharParser st Literal
literal = do
f <- skips $ try floatingPointLit
<|> fmap decToFloat decimalLit
return $ NumberLit f
<|> stringLiteral | 168 | literal :: CharParser st Literal
literal = do
f <- skips $ try floatingPointLit
<|> fmap decToFloat decimalLit
return $ NumberLit f
<|> stringLiteral | 168 | literal = do
f <- skips $ try floatingPointLit
<|> fmap decToFloat decimalLit
return $ NumberLit f
<|> stringLiteral | 135 | false | true | 4 | 10 | 42 | 60 | 26 | 34 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-printers/Language/Drasil/TeX/Print.hs | bsd-2-clause | pOps Sin = texSym "sin" | 28 | pOps Sin = texSym "sin" | 28 | pOps Sin = texSym "sin" | 28 | false | false | 1 | 5 | 9 | 15 | 5 | 10 | null | null |
asvyazin/my-books.purs | server/my-books/CouchAuthProxy/Main.hs | mpl-2.0 | onedriveTokenHeaderName :: HeaderName
onedriveTokenHeaderName = "X-Onedrive-Token" | 82 | onedriveTokenHeaderName :: HeaderName
onedriveTokenHeaderName = "X-Onedrive-Token" | 82 | onedriveTokenHeaderName = "X-Onedrive-Token" | 44 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
asilvestre/haskell-neo4j-rest-client | tests/IntegrationTests.hs | mit | case_GetUnexistingNodeById :: Assertion
case_GetUnexistingNodeById = withAuthConnection host port creds $ do
newN <- getNode ("unexistingnode" :: S.ByteString)
neo4jEqual Nothing newN
-- | Test delete node by id | 228 | case_GetUnexistingNodeById :: Assertion
case_GetUnexistingNodeById = withAuthConnection host port creds $ do
newN <- getNode ("unexistingnode" :: S.ByteString)
neo4jEqual Nothing newN
-- | Test delete node by id | 228 | case_GetUnexistingNodeById = withAuthConnection host port creds $ do
newN <- getNode ("unexistingnode" :: S.ByteString)
neo4jEqual Nothing newN
-- | Test delete node by id | 188 | false | true | 0 | 11 | 43 | 49 | 24 | 25 | null | null |
saxsoares/PARADIGMAS | HASKELL/ex_aula.hs | gpl-2.0 | duplica::[Int]->[Int]
duplica [] = [] | 37 | duplica::[Int]->[Int]
duplica [] = [] | 37 | duplica [] = [] | 15 | false | true | 0 | 6 | 4 | 33 | 16 | 17 | null | null |
Sword-Smith/hfasto | src/AMD64RegAlloc.hs | mit | livenessIn :: [] (S.Set AMD64.Reg) ->
[] ([] Int) ->
[] (S.Set AMD64.Reg) ->
[] (S.Set AMD64.Reg) ->
[] (S.Set AMD64.Reg)
livenessIn livenessInPrev scs gls kls =
let
livenessNext = livenessInH 0 livenessInPrev [] scs gls kls
in
if livenessInPrev == livenessNext
then reverse livenessInPrev
else livenessIn livenessNext scs gls kls | 406 | livenessIn :: [] (S.Set AMD64.Reg) ->
[] ([] Int) ->
[] (S.Set AMD64.Reg) ->
[] (S.Set AMD64.Reg) ->
[] (S.Set AMD64.Reg)
livenessIn livenessInPrev scs gls kls =
let
livenessNext = livenessInH 0 livenessInPrev [] scs gls kls
in
if livenessInPrev == livenessNext
then reverse livenessInPrev
else livenessIn livenessNext scs gls kls | 406 | livenessIn livenessInPrev scs gls kls =
let
livenessNext = livenessInH 0 livenessInPrev [] scs gls kls
in
if livenessInPrev == livenessNext
then reverse livenessInPrev
else livenessIn livenessNext scs gls kls | 228 | false | true | 0 | 12 | 126 | 159 | 76 | 83 | null | null |
timtylin/scholdoc | src/Text/Pandoc/Writers/Docx.hs | gpl-2.0 | rStyle :: String -> Element
rStyle sty = mknode "w:rStyle" [("w:val",sty)] () | 77 | rStyle :: String -> Element
rStyle sty = mknode "w:rStyle" [("w:val",sty)] () | 77 | rStyle sty = mknode "w:rStyle" [("w:val",sty)] () | 49 | false | true | 0 | 7 | 11 | 36 | 19 | 17 | null | null |
hsyl20/HViperVM | lib/ViperVM/Parsing/Lisp.hs | lgpl-3.0 | atomValue :: LispVal -> String
atomValue (Atom s) = s | 53 | atomValue :: LispVal -> String
atomValue (Atom s) = s | 53 | atomValue (Atom s) = s | 22 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
andrewthad/keter | Keter/App.hs | mit | ensureAlive :: RunningWebApp -> IO ()
ensureAlive RunningWebApp {..} = do
didAnswer <- testApp rwaPort
if didAnswer
then return ()
else error "ensureAlive failed"
where
testApp :: Port -> IO Bool
testApp port = do
res <- timeout (90 * 1000 * 1000) testApp'
return $ fromMaybe False res
where
testApp' = do
threadDelay $ 2 * 1000 * 1000
eres <- try $ Network.connectTo "127.0.0.1" $ Network.PortNumber $ fromIntegral port
case eres of
Left (_ :: IOException) -> testApp'
Right handle -> do
hClose handle
return True | 686 | ensureAlive :: RunningWebApp -> IO ()
ensureAlive RunningWebApp {..} = do
didAnswer <- testApp rwaPort
if didAnswer
then return ()
else error "ensureAlive failed"
where
testApp :: Port -> IO Bool
testApp port = do
res <- timeout (90 * 1000 * 1000) testApp'
return $ fromMaybe False res
where
testApp' = do
threadDelay $ 2 * 1000 * 1000
eres <- try $ Network.connectTo "127.0.0.1" $ Network.PortNumber $ fromIntegral port
case eres of
Left (_ :: IOException) -> testApp'
Right handle -> do
hClose handle
return True | 686 | ensureAlive RunningWebApp {..} = do
didAnswer <- testApp rwaPort
if didAnswer
then return ()
else error "ensureAlive failed"
where
testApp :: Port -> IO Bool
testApp port = do
res <- timeout (90 * 1000 * 1000) testApp'
return $ fromMaybe False res
where
testApp' = do
threadDelay $ 2 * 1000 * 1000
eres <- try $ Network.connectTo "127.0.0.1" $ Network.PortNumber $ fromIntegral port
case eres of
Left (_ :: IOException) -> testApp'
Right handle -> do
hClose handle
return True | 648 | false | true | 0 | 14 | 259 | 211 | 97 | 114 | null | null |
RoboNickBot/linked-list-web-demo | src/Demo/Links.hs | bsd-2-clause | -- if last InSt is Nothing, no change
matchIndex :: M.Map Int Cell -> M.Map Int Cell -> Int -> [Int] -> [Int]
matchIndex c b i is = let f m = (fmap snd (M.lookup i m))
in if (f c) == (f b)
then is
else i:is | 286 | matchIndex :: M.Map Int Cell -> M.Map Int Cell -> Int -> [Int] -> [Int]
matchIndex c b i is = let f m = (fmap snd (M.lookup i m))
in if (f c) == (f b)
then is
else i:is | 247 | matchIndex c b i is = let f m = (fmap snd (M.lookup i m))
in if (f c) == (f b)
then is
else i:is | 175 | true | true | 0 | 13 | 128 | 117 | 59 | 58 | null | null |
dillonhuff/CLP | src/CLTerm.hs | lgpl-3.0 | unf :: TypeSubstitution -> [TypeConstraint] -> Error TypeSubstitution
unf sub [] = Succeeded sub | 96 | unf :: TypeSubstitution -> [TypeConstraint] -> Error TypeSubstitution
unf sub [] = Succeeded sub | 96 | unf sub [] = Succeeded sub | 26 | false | true | 0 | 7 | 13 | 40 | 18 | 22 | null | null |
brendanhay/ede | src/Text/EDE.hs | mpl-2.0 | includeMap :: Monad m
=> HashMap Id Template -- ^ A 'HashMap' of named 'Template's.
-> Resolver m -- ^ Resolver for 'parseWith'.
includeMap ts _ k _
| Just v <- Map.lookup k ts = success v
| otherwise = failure ("unable to resolve " <> pretty (Text.unpack k)) | 298 | includeMap :: Monad m
=> HashMap Id Template -- ^ A 'HashMap' of named 'Template's.
-> Resolver m
includeMap ts _ k _
| Just v <- Map.lookup k ts = success v
| otherwise = failure ("unable to resolve " <> pretty (Text.unpack k)) | 258 | includeMap ts _ k _
| Just v <- Map.lookup k ts = success v
| otherwise = failure ("unable to resolve " <> pretty (Text.unpack k)) | 138 | true | true | 1 | 11 | 88 | 92 | 43 | 49 | null | null |
grnet/snf-ganeti | src/Ganeti/Types.hs | bsd-2-clause | addParamsToStorageUnit _ (SURaw StorageGluster key) = SUGluster key | 67 | addParamsToStorageUnit _ (SURaw StorageGluster key) = SUGluster key | 67 | addParamsToStorageUnit _ (SURaw StorageGluster key) = SUGluster key | 67 | false | false | 1 | 6 | 7 | 24 | 10 | 14 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Query/Filter.hs | bsd-2-clause | evaluateFilter c mb a (LEFilter getter val) =
wrapGetter c mb a getter $ ignoreMode (binOpFilter (<=) val) | 108 | evaluateFilter c mb a (LEFilter getter val) =
wrapGetter c mb a getter $ ignoreMode (binOpFilter (<=) val) | 108 | evaluateFilter c mb a (LEFilter getter val) =
wrapGetter c mb a getter $ ignoreMode (binOpFilter (<=) val) | 108 | false | false | 0 | 8 | 19 | 49 | 24 | 25 | null | null |
xmonad/xmonad-contrib | XMonad/Util/Dzen.hs | bsd-3-clause | -- | Put the top of the dzen bar at a particular pixel.
x :: Int -> DzenConfig
x n = addArgs ["-x", show n] | 107 | x :: Int -> DzenConfig
x n = addArgs ["-x", show n] | 51 | x n = addArgs ["-x", show n] | 28 | true | true | 0 | 7 | 24 | 34 | 17 | 17 | null | null |
mightymoose/liquidhaskell | benchmarks/hmatrix-0.15.0.1/examples/monadic.hs | bsd-3-clause | test1 :: Vector Int -> IO (Vector Int)
test1 = mapVectorM $ \x -> do
putStr $ (show x) ++ " "
return (x + 1)
-- we can have an arbitrary monad AND do IO | 161 | test1 :: Vector Int -> IO (Vector Int)
test1 = mapVectorM $ \x -> do
putStr $ (show x) ++ " "
return (x + 1)
-- we can have an arbitrary monad AND do IO | 161 | test1 = mapVectorM $ \x -> do
putStr $ (show x) ++ " "
return (x + 1)
-- we can have an arbitrary monad AND do IO | 122 | false | true | 0 | 12 | 44 | 67 | 33 | 34 | null | null |
oldmanmike/hs-minecraft-protocol | src/Data/Minecraft/Snapshot191/Version.hs | bsd-3-clause | minecraftVersion :: String
minecraftVersion = "1.9.1-pre2" | 58 | minecraftVersion :: String
minecraftVersion = "1.9.1-pre2" | 58 | minecraftVersion = "1.9.1-pre2" | 31 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2013-11-coursera-fp-odersky-but-in-haskell/FP07Solver.hs | unlicense | neighborsWithHistory :: Game -> Block -> [Move] -> [(Block, [Move])]
neighborsWithHistory game b0 history =
map (\(b,m) -> (b, m:history)) $ legalNeighbors game b0 | 169 | neighborsWithHistory :: Game -> Block -> [Move] -> [(Block, [Move])]
neighborsWithHistory game b0 history =
map (\(b,m) -> (b, m:history)) $ legalNeighbors game b0 | 169 | neighborsWithHistory game b0 history =
map (\(b,m) -> (b, m:history)) $ legalNeighbors game b0 | 100 | false | true | 2 | 12 | 29 | 87 | 46 | 41 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.