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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arnizamani/SeqSolver | Amath/Expr/AbsExp.hs | gpl-2.0 | showExp (EVar v) = show v | 25 | showExp (EVar v) = show v | 25 | showExp (EVar v) = show v | 25 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
NightRa/Idris-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | processTactic (MatchProblems all) ps
= do let (ns', probs') = matchProblems all ps [] (map setReady (problems ps))
(ns'', probs'') = matchProblems all ps ns' probs'
pterm' = orderUpdateSolved ns'' (resetProofTerm (pterm ps))
traceWhen (unifylog ps) ("(MatchProblems) Dropping holes... | 792 | processTactic (MatchProblems all) ps
= do let (ns', probs') = matchProblems all ps [] (map setReady (problems ps))
(ns'', probs'') = matchProblems all ps ns' probs'
pterm' = orderUpdateSolved ns'' (resetProofTerm (pterm ps))
traceWhen (unifylog ps) ("(MatchProblems) Dropping holes... | 792 | processTactic (MatchProblems all) ps
= do let (ns', probs') = matchProblems all ps [] (map setReady (problems ps))
(ns'', probs'') = matchProblems all ps ns' probs'
pterm' = orderUpdateSolved ns'' (resetProofTerm (pterm ps))
traceWhen (unifylog ps) ("(MatchProblems) Dropping holes... | 792 | false | false | 0 | 14 | 255 | 280 | 144 | 136 | null | null |
chetant/LibClang | src/Clang/Location.hs | bsd-3-clause | -- | Retrieves an AST cursor at the given source location.
--
-- The cursor can be traversed using the functions in "Clang.Cursor".
getCursor :: ClangBase m => FFI.TranslationUnit s' -> FFI.SourceLocation s''
-> ClangT s m (FFI.Cursor s)
getCursor tu sl = liftIO $ FFI.getCursor mkProxy tu sl | 302 | getCursor :: ClangBase m => FFI.TranslationUnit s' -> FFI.SourceLocation s''
-> ClangT s m (FFI.Cursor s)
getCursor tu sl = liftIO $ FFI.getCursor mkProxy tu sl | 170 | getCursor tu sl = liftIO $ FFI.getCursor mkProxy tu sl | 54 | true | true | 0 | 11 | 58 | 72 | 35 | 37 | null | null |
danr/hipspec | examples/old-examples/ListMonad.hs | gpl-3.0 | f . g = \x -> f (g x) | 21 | f . g = \x -> f (g x) | 21 | f . g = \x -> f (g x) | 21 | false | false | 1 | 8 | 8 | 25 | 12 | 13 | null | null |
pbrisbin/google-drive | test/SpecHelper.hs | mit | -- | Run an API spec and cleanup after
--
-- Create a folder and hand it to the given action. That action should place any
-- working files within the folder. The folder will be removed at the end of the
-- spec run.
--
runApiSpec :: (File -> Api a) -> IO ()
runApiSpec spec = do
token <- getToken
runApi_ token... | 581 | runApiSpec :: (File -> Api a) -> IO ()
runApiSpec spec = do
token <- getToken
runApi_ token $ do
Just root <- getFile "root"
folder <- createFile $
setParent root $ newFolder "google-drive-test" Nothing
spec folder `finally` deleteFile folder
where
f `finally` g = f ... | 361 | runApiSpec spec = do
token <- getToken
runApi_ token $ do
Just root <- getFile "root"
folder <- createFile $
setParent root $ newFolder "google-drive-test" Nothing
spec folder `finally` deleteFile folder
where
f `finally` g = f >> g `catchError` \e -> g >> throwError... | 322 | true | true | 1 | 13 | 153 | 146 | 71 | 75 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110709set1.hs | gpl-3.0 | sets :: [Int]
sets = [1] | 25 | sets :: [Int]
sets = [1] | 25 | sets = [1] | 11 | false | true | 0 | 5 | 6 | 17 | 10 | 7 | null | null |
badi/super-user-spark | test/SeedSpec.hs | mit | pureSeedSpec :: Spec
pureSeedSpec = describe "seed" $ do
it "ensures that sources are absolute if the seed is an absolute path" $ do
once $ forAll (arbitrary `suchThat` cleanBy cleanFilePath `suchThat` isAbsolute) $ \fp ->
forAll arbitrary $ \ds ->
all (\d -> all (isAbsolute) $ d... | 360 | pureSeedSpec :: Spec
pureSeedSpec = describe "seed" $ do
it "ensures that sources are absolute if the seed is an absolute path" $ do
once $ forAll (arbitrary `suchThat` cleanBy cleanFilePath `suchThat` isAbsolute) $ \fp ->
forAll arbitrary $ \ds ->
all (\d -> all (isAbsolute) $ d... | 360 | pureSeedSpec = describe "seed" $ do
it "ensures that sources are absolute if the seed is an absolute path" $ do
once $ forAll (arbitrary `suchThat` cleanBy cleanFilePath `suchThat` isAbsolute) $ \fp ->
forAll arbitrary $ \ds ->
all (\d -> all (isAbsolute) $ deployment_srcs d) $ s... | 339 | false | true | 0 | 21 | 98 | 120 | 57 | 63 | null | null |
brendanhay/gogol | gogol-cloudiot/gen/Network/Google/Resource/CloudIOT/Projects/Locations/Registries/Groups/Devices/States/List.hs | mpl-2.0 | -- | The number of states to list. States are listed in descending order of
-- update time. The maximum number of states retained is 10. If this value
-- is zero, it will return all the states available.
plrgdslNumStates :: Lens' ProjectsLocationsRegistriesGroupsDevicesStatesList (Maybe Int32)
plrgdslNumStates
= lens... | 404 | plrgdslNumStates :: Lens' ProjectsLocationsRegistriesGroupsDevicesStatesList (Maybe Int32)
plrgdslNumStates
= lens _plrgdslNumStates
(\ s a -> s{_plrgdslNumStates = a})
. mapping _Coerce | 200 | plrgdslNumStates
= lens _plrgdslNumStates
(\ s a -> s{_plrgdslNumStates = a})
. mapping _Coerce | 109 | true | true | 2 | 8 | 72 | 61 | 30 | 31 | null | null |
cirquit/Personal-Repository | Haskell/RWH/PGMParser/Parse.hs | mit | w2c :: Word8 -> Char
w2c = chr . fromIntegral | 45 | w2c :: Word8 -> Char
w2c = chr . fromIntegral | 45 | w2c = chr . fromIntegral | 24 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
jtojnar/haste-compiler | libraries/ghc-7.8/array/Data/Array/MArray.hs | bsd-3-clause | unsafeThaw :: (Ix i, IArray a e, MArray b e m) => a i e -> m (b i e)
unsafeThaw = U.unsafeThaw | 94 | unsafeThaw :: (Ix i, IArray a e, MArray b e m) => a i e -> m (b i e)
unsafeThaw = U.unsafeThaw | 94 | unsafeThaw = U.unsafeThaw | 25 | false | true | 0 | 9 | 22 | 60 | 30 | 30 | null | null |
aneksteind/Core | src/Core/Pretty.hs | mit | showNode :: GmState -> Addr -> Node -> Iseq
showNode s a (NNum n) = iNum n | 74 | showNode :: GmState -> Addr -> Node -> Iseq
showNode s a (NNum n) = iNum n | 74 | showNode s a (NNum n) = iNum n | 30 | false | true | 0 | 11 | 16 | 44 | 20 | 24 | null | null |
davnils/formal-fft | src/Math/FormalFFT.hs | bsd-3-clause | invmul :: SInteger -> Complex -> Complex
invmul k (a,b) = let k' = 1/toSReal k in (k' * a, -k' * b) | 100 | invmul :: SInteger -> Complex -> Complex
invmul k (a,b) = let k' = 1/toSReal k in (k' * a, -k' * b) | 100 | invmul k (a,b) = let k' = 1/toSReal k in (k' * a, -k' * b) | 59 | false | true | 0 | 10 | 23 | 64 | 33 | 31 | null | null |
fpco/hs-webdriver | src/Test/WebDriver/Commands.hs | bsd-3-clause | activateIME :: WebDriver wd => Text -> wd ()
activateIME = noReturn . doSessCommand POST "/ime/activate" . single "engine" | 122 | activateIME :: WebDriver wd => Text -> wd ()
activateIME = noReturn . doSessCommand POST "/ime/activate" . single "engine" | 122 | activateIME = noReturn . doSessCommand POST "/ime/activate" . single "engine" | 77 | false | true | 0 | 8 | 18 | 43 | 20 | 23 | null | null |
wenkokke/sf | hs/Hakyll/Web/Agda.hs | mit | agdaVerbosityQuiet :: Verbosity
agdaVerbosityQuiet = Trie.singleton [] 0 | 72 | agdaVerbosityQuiet :: Verbosity
agdaVerbosityQuiet = Trie.singleton [] 0 | 72 | agdaVerbosityQuiet = Trie.singleton [] 0 | 40 | false | true | 0 | 6 | 7 | 20 | 10 | 10 | null | null |
jff/TeLLer | src/CausalityGraph.hs | gpl-3.0 | getRightLolli _ = error $ "[getRightLolli] In the traces given, one of the actions is not a lollipop! Please fix that and try again." | 133 | getRightLolli _ = error $ "[getRightLolli] In the traces given, one of the actions is not a lollipop! Please fix that and try again." | 133 | getRightLolli _ = error $ "[getRightLolli] In the traces given, one of the actions is not a lollipop! Please fix that and try again." | 133 | false | false | 0 | 5 | 23 | 13 | 6 | 7 | null | null |
bitemyapp/haskell-jwt | src/Web/JWT.hs | mit | -- | Extract the claims set from a JSON Web Token
claims :: JWT r -> JWTClaimsSet
claims (Unverified _ c _ _) = c | 113 | claims :: JWT r -> JWTClaimsSet
claims (Unverified _ c _ _) = c | 63 | claims (Unverified _ c _ _) = c | 31 | true | true | 0 | 7 | 24 | 34 | 17 | 17 | null | null |
rodrigogribeiro/mptc | src/Iface/IfaceDriver.hs | bsd-3-clause | writeIface dir (Module _ n _ _ (Just es) _ _) ms
(Iface i syn lbls kc cls ins ass)
= writeInterface dir n i syn lbls kc cls ins ass | 160 | writeIface dir (Module _ n _ _ (Just es) _ _) ms
(Iface i syn lbls kc cls ins ass)
= writeInterface dir n i syn lbls kc cls ins ass | 160 | writeIface dir (Module _ n _ _ (Just es) _ _) ms
(Iface i syn lbls kc cls ins ass)
= writeInterface dir n i syn lbls kc cls ins ass | 160 | false | false | 0 | 9 | 59 | 76 | 37 | 39 | null | null |
dvolk/hoodie | Main.hs | gpl-3.0 | displayPlayerInventory :: Game ()
displayPlayerInventory = do
l <- Z.cursor `fmap` gets levels
let p = fst (getPC (entities l))
iItems = zip [0..] (storedItems (inv p))
w = equWeapon (inv p)
a = equArmor (inv p)
m = equMisc (inv p)
letters = ['a'..]
ch... | 1,082 | displayPlayerInventory :: Game ()
displayPlayerInventory = do
l <- Z.cursor `fmap` gets levels
let p = fst (getPC (entities l))
iItems = zip [0..] (storedItems (inv p))
w = equWeapon (inv p)
a = equArmor (inv p)
m = equMisc (inv p)
letters = ['a'..]
ch... | 1,082 | displayPlayerInventory = do
l <- Z.cursor `fmap` gets levels
let p = fst (getPC (entities l))
iItems = zip [0..] (storedItems (inv p))
w = equWeapon (inv p)
a = equArmor (inv p)
m = equMisc (inv p)
letters = ['a'..]
chargeStr i =
if iType i `n... | 1,048 | false | true | 0 | 23 | 358 | 492 | 240 | 252 | null | null |
cstrahan/nikki | src/Utils.hs | lgpl-3.0 | firstAStrict :: Accessor (Pair a b) a
firstAStrict = accessor (\ (a :!: _) -> a) (\ a (_ :!: b) -> (a :!: b)) | 109 | firstAStrict :: Accessor (Pair a b) a
firstAStrict = accessor (\ (a :!: _) -> a) (\ a (_ :!: b) -> (a :!: b)) | 109 | firstAStrict = accessor (\ (a :!: _) -> a) (\ a (_ :!: b) -> (a :!: b)) | 71 | false | true | 0 | 9 | 24 | 74 | 38 | 36 | null | null |
sboosali/commands-frontend-DragonNaturallySpeaking | sources/Commands/Frontends/Dragon13/Optimize.hs | bsd-3-clause | {- |
all simplifications are "inductive" (I think that's the word), i.e. they structurally reduce the input. Thus, we know 'rewrite' terminates.
-}
simplifyRHS :: (Eq t, Eq n) => DNSRHS t n -> DNSRHS t n
simplifyRHS = rewrite $ \case
-- singleton
DNSSequence (r :| []) -> Just r
DNSAlternatives (r :| []) ->... | 1,526 | simplifyRHS :: (Eq t, Eq n) => DNSRHS t n -> DNSRHS t n
simplifyRHS = rewrite $ \case
-- singleton
DNSSequence (r :| []) -> Just r
DNSAlternatives (r :| []) -> Just r
-- idempotent
DNSMultiple (DNSMultiple r) -> Just$ DNSMultiple r -- TODO valid?
DNSOptional (DNSOptional r) -> Just$ DNSOptional r -- TODO... | 1,376 | simplifyRHS = rewrite $ \case
-- singleton
DNSSequence (r :| []) -> Just r
DNSAlternatives (r :| []) -> Just r
-- idempotent
DNSMultiple (DNSMultiple r) -> Just$ DNSMultiple r -- TODO valid?
DNSOptional (DNSOptional r) -> Just$ DNSOptional r -- TODO valid?
-- additive identity. terminates.
DNSAlternat... | 1,320 | true | true | 10 | 11 | 315 | 305 | 155 | 150 | null | null |
mcschroeder/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | isNaughtyRecordSelector id = case Var.idDetails id of
RecSelId { sel_naughty = n } -> n
_ -> False | 176 | isNaughtyRecordSelector id = case Var.idDetails id of
RecSelId { sel_naughty = n } -> n
_ -> False | 176 | isNaughtyRecordSelector id = case Var.idDetails id of
RecSelId { sel_naughty = n } -> n
_ -> False | 176 | false | false | 0 | 10 | 95 | 39 | 19 | 20 | null | null |
GaloisInc/halvm-ghc | utils/deriveConstants/Main.hs | bsd-3-clause | haskellise "" = "" | 18 | haskellise "" = "" | 18 | haskellise "" = "" | 18 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
romanb/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/InitiateMultipartUpload.hs | mpl-2.0 | -- | The 'AccountId' value is the AWS account ID of the account that owns the vault.
-- You can either specify an AWS account ID or optionally a single apos'-'apos
-- (hyphen), in which case Amazon Glacier uses the AWS account ID associated
-- with the credentials used to sign the request. If you use an account ID, do
... | 488 | imuAccountId :: Lens' InitiateMultipartUpload Text
imuAccountId = lens _imuAccountId (\s a -> s { _imuAccountId = a }) | 118 | imuAccountId = lens _imuAccountId (\s a -> s { _imuAccountId = a }) | 67 | true | true | 0 | 9 | 86 | 44 | 26 | 18 | null | null |
sarahn/ganeti | src/Ganeti/HTools/Instance.hs | gpl-2.0 | -- | Computes all nodes of an instance.
allNodes :: Instance -> [T.Ndx]
allNodes inst = case diskTemplate inst of
T.DTDrbd8 -> [pNode inst, sNode inst]
_ -> [pNode inst]
-- | Checks whether a given disk template uses local storage. | 268 | allNodes :: Instance -> [T.Ndx]
allNodes inst = case diskTemplate inst of
T.DTDrbd8 -> [pNode inst, sNode inst]
_ -> [pNode inst]
-- | Checks whether a given disk template uses local storage. | 228 | allNodes inst = case diskTemplate inst of
T.DTDrbd8 -> [pNode inst, sNode inst]
_ -> [pNode inst]
-- | Checks whether a given disk template uses local storage. | 196 | true | true | 0 | 9 | 77 | 64 | 33 | 31 | null | null |
sopvop/snap-server | src/Snap/Internal/Http/Server/Parser.hs | bsd-3-clause | nStandardHeaders = 6 | 23 | nStandardHeaders = 6 | 23 | nStandardHeaders = 6 | 23 | false | false | 0 | 4 | 5 | 6 | 3 | 3 | null | null |
CulpaBS/wbBach | src/Futhark/Pass/KernelBabysitting.hs | bsd-3-clause | transformBinding expmap (Let pat ()
(Op (ChunkedMapKernel cs w kernel_size o lam arrs))) = do
-- We want to pad and transpose the input arrays.
(w', kernel_size', arrs') <-
rearrangeScanReduceInputs comm cs w kernel_size arrs
lam' <- transformLambda lam
addBinding $ Let pat () $ ... | 493 | transformBinding expmap (Let pat ()
(Op (ChunkedMapKernel cs w kernel_size o lam arrs))) = do
-- We want to pad and transpose the input arrays.
(w', kernel_size', arrs') <-
rearrangeScanReduceInputs comm cs w kernel_size arrs
lam' <- transformLambda lam
addBinding $ Let pat () $ ... | 493 | transformBinding expmap (Let pat ()
(Op (ChunkedMapKernel cs w kernel_size o lam arrs))) = do
-- We want to pad and transpose the input arrays.
(w', kernel_size', arrs') <-
rearrangeScanReduceInputs comm cs w kernel_size arrs
lam' <- transformLambda lam
addBinding $ Let pat () $ ... | 493 | false | false | 1 | 11 | 140 | 154 | 71 | 83 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Graphics/OctreeQuery.hs | mit | octreeQueryGetViewMask :: (Parent OctreeQuery a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to 'OctreeQuery' or ascenstor
-> m Word
octreeQueryGetViewMask p = liftIO $ do
let ptr = parentPointer p
fromIntegral <$> [C.exp| unsigned char { $(OctreeQuery* ptr)->viewMask_ } |]
-- | Set result vector | 308 | octreeQueryGetViewMask :: (Parent OctreeQuery a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to 'OctreeQuery' or ascenstor
-> m Word
octreeQueryGetViewMask p = liftIO $ do
let ptr = parentPointer p
fromIntegral <$> [C.exp| unsigned char { $(OctreeQuery* ptr)->viewMask_ } |]
-- | Set result vector | 308 | octreeQueryGetViewMask p = liftIO $ do
let ptr = parentPointer p
fromIntegral <$> [C.exp| unsigned char { $(OctreeQuery* ptr)->viewMask_ } |]
-- | Set result vector | 169 | false | true | 0 | 11 | 56 | 78 | 40 | 38 | null | null |
abstools/abs-haskell-formal | benchmarks/2_primality_test/progs/3500.hs | bsd-3-clause | main :: IO ()
main = printHeap =<< run 1000000 main_ (head the_end) | 67 | main :: IO ()
main = printHeap =<< run 1000000 main_ (head the_end) | 67 | main = printHeap =<< run 1000000 main_ (head the_end) | 53 | false | true | 0 | 8 | 12 | 38 | 17 | 21 | null | null |
WraithM/prosper | src/Prosper/Internal/JSON.hs | bsd-3-clause | jsonGetHandler
:: FromJSON a
=> User -- ^ The user name and password for the prosper user
-> ByteString -- ^ The name of the API service, relative to the API url
-> (Response -> InputStream ByteString -> IO a)
-> IO a -- ^ JSON response
jsonGetHandler userInfo url handler =
issueRequest userInfo... | 358 | jsonGetHandler
:: FromJSON a
=> User -- ^ The user name and password for the prosper user
-> ByteString -- ^ The name of the API service, relative to the API url
-> (Response -> InputStream ByteString -> IO a)
-> IO a
jsonGetHandler userInfo url handler =
issueRequest userInfo url GET "applicati... | 339 | jsonGetHandler userInfo url handler =
issueRequest userInfo url GET "application/json" handler [] | 101 | true | true | 0 | 12 | 82 | 75 | 37 | 38 | null | null |
leshchevds/ganeti | src/Ganeti/Hs2Py/OpDoc.hs | bsd-2-clause | opInstanceRecreateDisks :: String
opInstanceRecreateDisks =
"Recreate an instance's disks." | 93 | opInstanceRecreateDisks :: String
opInstanceRecreateDisks =
"Recreate an instance's disks." | 93 | opInstanceRecreateDisks =
"Recreate an instance's disks." | 59 | false | true | 0 | 4 | 10 | 11 | 6 | 5 | null | null |
MaxGabriel/YesodScreencast | Application.hs | cc0-1.0 | warpSettings :: App -> Settings
warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
foundation
(appLogger foundation)
... | 477 | warpSettings :: App -> Settings
warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
foundation
(appLogger foundation)
... | 477 | warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
foundation
(appLogger foundation)
$(qLocation >>= liftLoc)... | 445 | false | true | 4 | 11 | 146 | 130 | 60 | 70 | null | null |
kryft/fsil | Fsil.hs | gpl-2.0 | attackSeqDamDist :: [T.Attack] -> Int -> [Dice] -> RInt
attackSeqDamDist [] _ _ = return 0 | 90 | attackSeqDamDist :: [T.Attack] -> Int -> [Dice] -> RInt
attackSeqDamDist [] _ _ = return 0 | 90 | attackSeqDamDist [] _ _ = return 0 | 34 | false | true | 0 | 8 | 15 | 43 | 22 | 21 | null | null |
sebastiaanvisser/diskheap | src/System/Heap/Heap.hs | bsd-3-clause | initialize :: Write.Heap ()
initialize =
do fs <- ask >>= liftIO . hFileSize
if fs == 0
-- Initialize new heap.
then do _ <- Write.write magic -- magic file type identifier
_ <- Write.write nullPtr -- pointer to allocation map
_ <- Write.write nullPtr -- point... | 567 | initialize :: Write.Heap ()
initialize =
do fs <- ask >>= liftIO . hFileSize
if fs == 0
-- Initialize new heap.
then do _ <- Write.write magic -- magic file type identifier
_ <- Write.write nullPtr -- pointer to allocation map
_ <- Write.write nullPtr -- point... | 567 | initialize =
do fs <- ask >>= liftIO . hFileSize
if fs == 0
-- Initialize new heap.
then do _ <- Write.write magic -- magic file type identifier
_ <- Write.write nullPtr -- pointer to allocation map
_ <- Write.write nullPtr -- pointer to data structure root
... | 539 | false | true | 0 | 13 | 207 | 149 | 68 | 81 | null | null |
jaalonso/I1M-Cod-Temas | src/Tema_25/dosCuadradosColoreados2.hs | gpl-2.0 | main :: IO ()
main = display (InWindow "Dibujo" (300,300) (20,20)) white dibujo | 79 | main :: IO ()
main = display (InWindow "Dibujo" (300,300) (20,20)) white dibujo | 79 | main = display (InWindow "Dibujo" (300,300) (20,20)) white dibujo | 65 | false | true | 0 | 8 | 12 | 45 | 24 | 21 | null | null |
c0c0n3/hAppYard | inkscape-util/src/shared/Script.hs | gpl-3.0 | {-
Links an external script, making sure the XLink namespace is properly referenced.
Specifically,
reference "sum/script.js"
results in this being added to the svg children:
<script xxx:href="sum/script.js"></script>
where 'xxx' is the local part of the XLink namespace declaration on the svg tag, ... | 855 | reference ∷ ArrowXml hom ⇒ String → hom XmlTree XmlTree
reference href = linkA $< (svg ⋙ single ensureXLink)
where
ensureXLink = ensureValue (mkName "xmlns:xlink") "http://www.w3.org/1999/xlink"
linkA (qname, doc) = constA doc ⋙
replaceChildren (getChildren <+> linkScript qname... | 388 | reference href = linkA $< (svg ⋙ single ensureXLink)
where
ensureXLink = ensureValue (mkName "xmlns:xlink") "http://www.w3.org/1999/xlink"
linkA (qname, doc) = constA doc ⋙
replaceChildren (getChildren <+> linkScript qname href)
-- embed given code in script tag as child of ... | 332 | true | true | 0 | 9 | 195 | 101 | 50 | 51 | null | null |
tonussi/freezing-dubstep | pratica-10/Listas.hs | mit | primeiros 0 _ = [] | 18 | primeiros 0 _ = [] | 18 | primeiros 0 _ = [] | 18 | false | false | 0 | 5 | 4 | 15 | 6 | 9 | null | null |
Airtnp/Freshman_Simple_Haskell_Lib | Utils/simple-JSON.hs | mit | jAryFromJValue :: (JSON a) => JValue -> Either JError (JAry a)
jAryFromJValue (JArray (JAry a)) = whenRight JAry (mapEithers fromJValue a) | 138 | jAryFromJValue :: (JSON a) => JValue -> Either JError (JAry a)
jAryFromJValue (JArray (JAry a)) = whenRight JAry (mapEithers fromJValue a) | 138 | jAryFromJValue (JArray (JAry a)) = whenRight JAry (mapEithers fromJValue a) | 75 | false | true | 0 | 9 | 20 | 63 | 31 | 32 | null | null |
tpsinnem/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | declared (PClauses _ _ n _) = [] | 32 | declared (PClauses _ _ n _) = [] | 32 | declared (PClauses _ _ n _) = [] | 32 | false | false | 0 | 7 | 7 | 23 | 11 | 12 | null | null |
christiaanb/clash-compiler | clash-systemverilog/src/CLaSH/Backend/SystemVerilog.hs | bsd-2-clause | bit_char Z = char 'Z' | 21 | bit_char Z = char 'Z' | 21 | bit_char Z = char 'Z' | 21 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
vigoo/stack | src/Stack/Build/Source.hs | bsd-3-clause | localFlags :: (Map (Maybe PackageName) (Map FlagName Bool))
-> BuildConfig
-> PackageName
-> Map FlagName Bool
localFlags boptsflags bconfig name = Map.unions
[ Map.findWithDefault Map.empty (Just name) boptsflags
, Map.findWithDefault Map.empty Nothing boptsflags
, Map.find... | 370 | localFlags :: (Map (Maybe PackageName) (Map FlagName Bool))
-> BuildConfig
-> PackageName
-> Map FlagName Bool
localFlags boptsflags bconfig name = Map.unions
[ Map.findWithDefault Map.empty (Just name) boptsflags
, Map.findWithDefault Map.empty Nothing boptsflags
, Map.find... | 370 | localFlags boptsflags bconfig name = Map.unions
[ Map.findWithDefault Map.empty (Just name) boptsflags
, Map.findWithDefault Map.empty Nothing boptsflags
, Map.findWithDefault Map.empty name (bcFlags bconfig)
] | 226 | false | true | 0 | 9 | 88 | 116 | 57 | 59 | null | null |
NCrashed/JuicyPixels-blp | blp2any/Main.hs | bsd-3-clause | -- | How to parse BlpFormat
blpFormatR :: ReadM BlpFormat
blpFormatR = readMPure "blp format" readBlpFormat | 107 | blpFormatR :: ReadM BlpFormat
blpFormatR = readMPure "blp format" readBlpFormat | 79 | blpFormatR = readMPure "blp format" readBlpFormat | 49 | true | true | 1 | 5 | 15 | 23 | 10 | 13 | null | null |
hephaestus-pl/hephaestus | willian/hephaestus-integrated/feature-modeling/src/FeatureModel/Parsers/FMGrammar/Grammar2FeatureModel.hs | mit | childrenOfProduction :: Production -> [Child]
childrenOfProduction (BaseProduction i cs) = cs | 94 | childrenOfProduction :: Production -> [Child]
childrenOfProduction (BaseProduction i cs) = cs | 93 | childrenOfProduction (BaseProduction i cs) = cs | 47 | false | true | 0 | 7 | 11 | 29 | 15 | 14 | null | null |
adityagupta1089/Project-Euler-Haskell | src/problems/Problem48.hs | bsd-3-clause | main :: IO ()
main = print . last10 . sum . map (\x -> last10 $ x ^ x) $ [1 .. 1000]
where last10 = read . (\xs -> drop (length xs - 10) xs) . show | 151 | main :: IO ()
main = print . last10 . sum . map (\x -> last10 $ x ^ x) $ [1 .. 1000]
where last10 = read . (\xs -> drop (length xs - 10) xs) . show | 151 | main = print . last10 . sum . map (\x -> last10 $ x ^ x) $ [1 .. 1000]
where last10 = read . (\xs -> drop (length xs - 10) xs) . show | 137 | false | true | 2 | 12 | 42 | 106 | 51 | 55 | null | null |
ggreif/clash-compiler | clash-verilog/src/CLaSH/Backend/Verilog.hs | bsd-2-clause | inst_ (InstDecl nm lbl pms) = fmap Just $
text nm <+> text lbl <$$> pms' <> semi
where
pms' = tupled $ sequence [dot <> text i <+> parens (expr_ False e) | (i,_,_,e) <- pms] | 183 | inst_ (InstDecl nm lbl pms) = fmap Just $
text nm <+> text lbl <$$> pms' <> semi
where
pms' = tupled $ sequence [dot <> text i <+> parens (expr_ False e) | (i,_,_,e) <- pms] | 183 | inst_ (InstDecl nm lbl pms) = fmap Just $
text nm <+> text lbl <$$> pms' <> semi
where
pms' = tupled $ sequence [dot <> text i <+> parens (expr_ False e) | (i,_,_,e) <- pms] | 183 | false | false | 0 | 11 | 46 | 104 | 51 | 53 | null | null |
horia141/bachelor-thesis | dev/SeqAsm/Configs.hs | mit | extractArgType wordSize "ComponentInput" =
return CComponentInput | 69 | extractArgType wordSize "ComponentInput" =
return CComponentInput | 69 | extractArgType wordSize "ComponentInput" =
return CComponentInput | 69 | false | false | 0 | 5 | 9 | 14 | 6 | 8 | null | null |
Daniel-Diaz/binary-list | Data/BinaryList.hs | bsd-3-clause | -- | /O(1)/. Build a list with a single element.
singleton :: a -> BinList a
singleton = ListEnd | 96 | singleton :: a -> BinList a
singleton = ListEnd | 47 | singleton = ListEnd | 19 | true | true | 0 | 6 | 18 | 19 | 10 | 9 | null | null |
andrewthad/yesod-bootstrap | src/Yesod/Bootstrap.hs | mit | colSizeShortName :: Size -> Text
colSizeShortName s = case s of
ExtraSmall -> "xs"
Small -> "sm"
Medium -> "md"
Large -> "lg" | 137 | colSizeShortName :: Size -> Text
colSizeShortName s = case s of
ExtraSmall -> "xs"
Small -> "sm"
Medium -> "md"
Large -> "lg" | 137 | colSizeShortName s = case s of
ExtraSmall -> "xs"
Small -> "sm"
Medium -> "md"
Large -> "lg" | 104 | false | true | 4 | 5 | 34 | 53 | 23 | 30 | null | null |
ktvoelker/Picker | src/View.hs | gpl-3.0 | clearResults :: (MonadIO m) => View -> m ()
clearResults View{ _vResults = !rs } = liftIO $ schedule $ clearList rs | 115 | clearResults :: (MonadIO m) => View -> m ()
clearResults View{ _vResults = !rs } = liftIO $ schedule $ clearList rs | 115 | clearResults View{ _vResults = !rs } = liftIO $ schedule $ clearList rs | 71 | false | true | 0 | 9 | 21 | 53 | 26 | 27 | null | null |
pxqr/regex-fuzzy | tests/properties.hs | mit | prop_Eq :: String -> String -> Bool
prop_Eq a b = (findEditDist a b == 0) == (a == b) | 85 | prop_Eq :: String -> String -> Bool
prop_Eq a b = (findEditDist a b == 0) == (a == b) | 85 | prop_Eq a b = (findEditDist a b == 0) == (a == b) | 49 | false | true | 0 | 8 | 19 | 47 | 24 | 23 | null | null |
erantapaa/rakhana | Data/Rakhana/XRef.hs | bsd-3-clause | parseTableEntry :: Parser (Integer, Int, Bool)
parseTableEntry
= do skipSpace
offset <- decimal
skipSpace
gen <- decimal
skipSpace
c <- anyChar
case c of
'n' -> return (offset, gen, True)
'f' -> return (offset, gen, False)
... | 465 | parseTableEntry :: Parser (Integer, Int, Bool)
parseTableEntry
= do skipSpace
offset <- decimal
skipSpace
gen <- decimal
skipSpace
c <- anyChar
case c of
'n' -> return (offset, gen, True)
'f' -> return (offset, gen, False)
... | 465 | parseTableEntry
= do skipSpace
offset <- decimal
skipSpace
gen <- decimal
skipSpace
c <- anyChar
case c of
'n' -> return (offset, gen, True)
'f' -> return (offset, gen, False)
_ ->
let msg = "error parsin... | 418 | false | true | 1 | 16 | 213 | 127 | 61 | 66 | null | null |
adamschoenemann/wysas | src/LispData.hs | gpl-3.0 | trapError action = catchError action (return . show) | 52 | trapError action = catchError action (return . show) | 52 | trapError action = catchError action (return . show) | 52 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
kcharter/brc-solver | tests/Variable.hs | bsd-2-clause | variable :: String -> Variable
variable = Variable | 50 | variable :: String -> Variable
variable = Variable | 50 | variable = Variable | 19 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
DarkTilRisen/FlashText | TextParser/Header.hs | gpl-3.0 | parseHeaderTag :: String -> Parser String
parseHeaderTag s = do string s
char colon
manyTill anyChar $ try $ string "\n" | 164 | parseHeaderTag :: String -> Parser String
parseHeaderTag s = do string s
char colon
manyTill anyChar $ try $ string "\n" | 164 | parseHeaderTag s = do string s
char colon
manyTill anyChar $ try $ string "\n" | 122 | false | true | 0 | 9 | 64 | 50 | 21 | 29 | null | null |
diku-dk/futhark | src/Futhark/IR/TypeCheck.hs | isc | lookupFun ::
Checkable rep =>
Name ->
[SubExp] ->
TypeM rep ([RetType rep], [DeclType])
lookupFun fname args = do
stm <- asks $ M.lookup fname . envFtable
case stm of
Nothing -> bad $ UnknownFunctionError fname
Just (ftype, params) -> do
argts <- mapM subExpType args
case applyRetType ft... | 622 | lookupFun ::
Checkable rep =>
Name ->
[SubExp] ->
TypeM rep ([RetType rep], [DeclType])
lookupFun fname args = do
stm <- asks $ M.lookup fname . envFtable
case stm of
Nothing -> bad $ UnknownFunctionError fname
Just (ftype, params) -> do
argts <- mapM subExpType args
case applyRetType ft... | 622 | lookupFun fname args = do
stm <- asks $ M.lookup fname . envFtable
case stm of
Nothing -> bad $ UnknownFunctionError fname
Just (ftype, params) -> do
argts <- mapM subExpType args
case applyRetType ftype params $ zip args argts of
Nothing ->
bad $ ParameterMismatch (Just fname)... | 526 | false | true | 0 | 20 | 164 | 204 | 97 | 107 | null | null |
brendanhay/numbersd | src/Numbers/Whisper.hs | mpl-2.0 | keys :: Whisper -> IO [Key]
keys = M.keys . _db | 47 | keys :: Whisper -> IO [Key]
keys = M.keys . _db | 47 | keys = M.keys . _db | 19 | false | true | 0 | 7 | 10 | 27 | 14 | 13 | null | null |
nevrenato/Hets_Fork | Comorphisms/RelScheme2CASL.hs | gpl-2.0 | axiomsForKeys :: SRel.RSTable -> Result [Named CASLFORMULA]
axiomsForKeys tab = do
let
types = map stringToId $ map show $ map SRel.c_data $ SRel.columns tab
vars_x = map (\(t,n) -> (genToken ("x"++ (show n)), t)) $
number types
vars_y = map (\(t,n) -> (genToken ("y"++ (show n)), t)) $
numb... | 2,302 | axiomsForKeys :: SRel.RSTable -> Result [Named CASLFORMULA]
axiomsForKeys tab = do
let
types = map stringToId $ map show $ map SRel.c_data $ SRel.columns tab
vars_x = map (\(t,n) -> (genToken ("x"++ (show n)), t)) $
number types
vars_y = map (\(t,n) -> (genToken ("y"++ (show n)), t)) $
numb... | 2,302 | axiomsForKeys tab = do
let
types = map stringToId $ map show $ map SRel.c_data $ SRel.columns tab
vars_x = map (\(t,n) -> (genToken ("x"++ (show n)), t)) $
number types
vars_y = map (\(t,n) -> (genToken ("y"++ (show n)), t)) $
number types
vardecls = map (\(v,t) -> Var_decl [v] t nullRang... | 2,242 | false | true | 0 | 25 | 1,080 | 652 | 335 | 317 | null | null |
ianthehenry/basilica | Main.hs | mit | route :: Database
-> Chan (EmailAddress, Code)
-> Chan ResolvedPost
-> (ActionM () -> ScottyM ())
-> ActionM (Either Response Request)
-> ScottyM ()
route db emailChan socketChan path makeReq = path $ do
reqOrRes <- makeReq
let dbRes = either pure execute reqOrRes
res <- liftIO (runR... | 587 | route :: Database
-> Chan (EmailAddress, Code)
-> Chan ResolvedPost
-> (ActionM () -> ScottyM ())
-> ActionM (Either Response Request)
-> ScottyM ()
route db emailChan socketChan path makeReq = path $ do
reqOrRes <- makeReq
let dbRes = either pure execute reqOrRes
res <- liftIO (runR... | 587 | route db emailChan socketChan path makeReq = path $ do
reqOrRes <- makeReq
let dbRes = either pure execute reqOrRes
res <- liftIO (runReaderT dbRes db)
effects <- send res
mapM_ (liftIO . perform) effects
where
perform :: SideEffect -> IO ()
perform (SendEmail emailAddress code) =
writeChan em... | 408 | false | true | 0 | 13 | 147 | 224 | 105 | 119 | null | null |
phadej/range-set-list | src/Data/RangeSet/List.hs | mit | -- | /O(n). Delete a continuos range from a set.
deleteRange :: (Ord a, Enum a) => (a, a) -> RSet a -> RSet a
deleteRange (x, y) set@(RSet xs)
| x > y = set
| otherwise = RSet $ deleteRangeList x y xs | 210 | deleteRange :: (Ord a, Enum a) => (a, a) -> RSet a -> RSet a
deleteRange (x, y) set@(RSet xs)
| x > y = set
| otherwise = RSet $ deleteRangeList x y xs | 161 | deleteRange (x, y) set@(RSet xs)
| x > y = set
| otherwise = RSet $ deleteRangeList x y xs | 100 | true | true | 1 | 8 | 54 | 95 | 49 | 46 | null | null |
rueshyna/gogol | gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Patch.hs | mpl-2.0 | -- | Multipart request metadata.
cpPayload :: Lens' CoursesPatch Course
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a}) | 130 | cpPayload :: Lens' CoursesPatch Course
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a}) | 97 | cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a}) | 58 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
keithodulaigh/Hets | CASL/AS_Basic_CASL.der.hs | gpl-2.0 | mkForall :: [VAR_DECL] -> FORMULA f -> FORMULA f
mkForall vl f = mkForallRange vl f nullRange | 93 | mkForall :: [VAR_DECL] -> FORMULA f -> FORMULA f
mkForall vl f = mkForallRange vl f nullRange | 93 | mkForall vl f = mkForallRange vl f nullRange | 44 | false | true | 0 | 7 | 16 | 40 | 19 | 21 | null | null |
erantapaa/happstack-server | src/Happstack/Server/Internal/Listen.hs | bsd-3-clause | listen :: Conf -> (Request -> IO Response) -> IO ()
listen conf hand = do
let port' = port conf
lsocket <- listenOn port'
setSocketOption lsocket KeepAlive 1
listen' lsocket conf hand
-- | Use a previously bind port and listen | 243 | listen :: Conf -> (Request -> IO Response) -> IO ()
listen conf hand = do
let port' = port conf
lsocket <- listenOn port'
setSocketOption lsocket KeepAlive 1
listen' lsocket conf hand
-- | Use a previously bind port and listen | 243 | listen conf hand = do
let port' = port conf
lsocket <- listenOn port'
setSocketOption lsocket KeepAlive 1
listen' lsocket conf hand
-- | Use a previously bind port and listen | 191 | false | true | 0 | 11 | 58 | 87 | 38 | 49 | null | null |
olsner/ghc | compiler/cmm/PprC.hs | bsd-3-clause | -- if we print via pprAsPtrReg
isPtrReg (CmmGlobal reg) = isFixedPtrGlobalReg reg | 102 | isPtrReg (CmmGlobal reg) = isFixedPtrGlobalReg reg | 71 | isPtrReg (CmmGlobal reg) = isFixedPtrGlobalReg reg | 71 | true | false | 0 | 7 | 32 | 19 | 9 | 10 | null | null |
XeCycle/bamboo-shoot3 | util/bsic/PBS/BSIGenCC.hs | gpl-3.0 | randGen _ = "" | 14 | randGen _ = "" | 14 | randGen _ = "" | 14 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mgreenly/roguelike | src/RogueLike.hs | isc | minWinCol = 0 | 22 | minWinCol = 0 | 22 | minWinCol = 0 | 22 | false | false | 0 | 4 | 11 | 6 | 3 | 3 | null | null |
tjakway/ghcjvm | compiler/simplCore/OccurAnal.hs | bsd-3-clause | occurAnalyseExpr :: CoreExpr -> CoreExpr
-- Do occurrence analysis, and discard occurrence info returned
occurAnalyseExpr = occurAnalyseExpr' True | 154 | occurAnalyseExpr :: CoreExpr -> CoreExpr
occurAnalyseExpr = occurAnalyseExpr' True | 82 | occurAnalyseExpr = occurAnalyseExpr' True | 41 | true | true | 0 | 5 | 25 | 19 | 10 | 9 | null | null |
pharpend/puffytools | ptk/Ptk/Journal/ListEntries.hs | bsd-3-clause | strftimeOption :: Option String
strftimeOption = option "" ["time-format", "strftime"] string "%x %X %Z"
"The format with which to print timestamps. See `man strftime` for more information." | 209 | strftimeOption :: Option String
strftimeOption = option "" ["time-format", "strftime"] string "%x %X %Z"
"The format with which to print timestamps. See `man strftime` for more information." | 209 | strftimeOption = option "" ["time-format", "strftime"] string "%x %X %Z"
"The format with which to print timestamps. See `man strftime` for more information." | 177 | false | true | 0 | 6 | 45 | 31 | 16 | 15 | null | null |
coghex/abridgefaraway | src/GLUtil/Font.hs | bsd-3-clause | findLetter BPFONT '>' = (90, 14) | 33 | findLetter BPFONT '>' = (90, 14) | 33 | findLetter BPFONT '>' = (90, 14) | 33 | false | false | 0 | 5 | 6 | 19 | 9 | 10 | null | null |
psibi/yesod | yesod-bin/Devel.hs | mit | checkPort :: Int -> IO Bool
checkPort p = do
es <- Ex.tryIO $ bindPortTCP p "*4"
case es of
Left _ -> return False
Right s -> do
Network.Socket.close s
return True
-- | Get a random, unused port. | 244 | checkPort :: Int -> IO Bool
checkPort p = do
es <- Ex.tryIO $ bindPortTCP p "*4"
case es of
Left _ -> return False
Right s -> do
Network.Socket.close s
return True
-- | Get a random, unused port. | 244 | checkPort p = do
es <- Ex.tryIO $ bindPortTCP p "*4"
case es of
Left _ -> return False
Right s -> do
Network.Socket.close s
return True
-- | Get a random, unused port. | 216 | false | true | 0 | 15 | 88 | 89 | 38 | 51 | null | null |
goakley/Hackskell | src/Hack/Assembler.hs | gpl-3.0 | -- Assembles an instruction to bits
-- ERROR if the instruction is symbolic (Marker _ or Address Symbol _)
-- EXCEPTION if an address literal is greater than memory capacity
assembleIns :: Instruction -> Either String Word16
assembleIns (Marker _) = error "Attempted to assemble a label" | 287 | assembleIns :: Instruction -> Either String Word16
assembleIns (Marker _) = error "Attempted to assemble a label" | 113 | assembleIns (Marker _) = error "Attempted to assemble a label" | 62 | true | true | 0 | 9 | 46 | 40 | 19 | 21 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2007-Programming_in_Haskell-1st_Edition-Graham_Hutton/ch_12_9.hs | unlicense | replicateT :: Int -> a -> Tree a
replicateT n = takeT n . repeatT | 65 | replicateT :: Int -> a -> Tree a
replicateT n = takeT n . repeatT | 65 | replicateT n = takeT n . repeatT | 32 | false | true | 0 | 7 | 14 | 32 | 15 | 17 | null | null |
barrucadu/nagi | lib/Imageboard/Database.hs | mit | attachmentBoardId :: AttachmentId -> SqlPersistT IO BoardId
attachmentBoardId attachmentid = do
attachmentmay <- get attachmentid
case attachmentmay of
Just attachment -> postBoardId (attachmentPost attachment)
Nothing -> throwM (NoSuchAttachmentException attachmentid)
-- | Look up the 'BoardId' of the pos... | 347 | attachmentBoardId :: AttachmentId -> SqlPersistT IO BoardId
attachmentBoardId attachmentid = do
attachmentmay <- get attachmentid
case attachmentmay of
Just attachment -> postBoardId (attachmentPost attachment)
Nothing -> throwM (NoSuchAttachmentException attachmentid)
-- | Look up the 'BoardId' of the pos... | 347 | attachmentBoardId attachmentid = do
attachmentmay <- get attachmentid
case attachmentmay of
Just attachment -> postBoardId (attachmentPost attachment)
Nothing -> throwM (NoSuchAttachmentException attachmentid)
-- | Look up the 'BoardId' of the post a ban is in reference to. | 287 | false | true | 0 | 12 | 56 | 74 | 34 | 40 | null | null |
amccausl/Swish | Swish/HaskellUtils/QName.hs | lgpl-2.1 | getQNameURI :: QName -> String
getQNameURI (QName ns ln) = ns++ln | 66 | getQNameURI :: QName -> String
getQNameURI (QName ns ln) = ns++ln | 65 | getQNameURI (QName ns ln) = ns++ln | 34 | false | true | 0 | 7 | 11 | 30 | 15 | 15 | null | null |
gcampax/ghc | compiler/utils/Outputable.hs | bsd-3-clause | sdocWithPlatform :: (Platform -> SDoc) -> SDoc
sdocWithPlatform f = sdocWithDynFlags (f . targetPlatform) | 105 | sdocWithPlatform :: (Platform -> SDoc) -> SDoc
sdocWithPlatform f = sdocWithDynFlags (f . targetPlatform) | 105 | sdocWithPlatform f = sdocWithDynFlags (f . targetPlatform) | 58 | false | true | 0 | 7 | 13 | 38 | 19 | 19 | null | null |
mstksg/ghcjs-websockets | src/JavaScript/NoGHCJS.hs | mit | bufferByteString :: Int -> Int -> a
bufferByteString = error "bufferByteString: only available in JavaScript" | 109 | bufferByteString :: Int -> Int -> a
bufferByteString = error "bufferByteString: only available in JavaScript" | 109 | bufferByteString = error "bufferByteString: only available in JavaScript" | 73 | false | true | 0 | 6 | 14 | 22 | 11 | 11 | null | null |
a143753/AOJ | 0228.hs | apache-2.0 | play i =
let n = i!!0
j = take n $ drop 1 i
r = drop (n+1) i
in
(ans [0,0,0,0,0,0,0] j) ++ (play r) | 120 | play i =
let n = i!!0
j = take n $ drop 1 i
r = drop (n+1) i
in
(ans [0,0,0,0,0,0,0] j) ++ (play r) | 120 | play i =
let n = i!!0
j = take n $ drop 1 i
r = drop (n+1) i
in
(ans [0,0,0,0,0,0,0] j) ++ (play r) | 120 | false | false | 0 | 11 | 47 | 97 | 51 | 46 | null | null |
kmate/HaRe | old/refactorer/RefacGenDef.hs | bsd-3-clause | eneraliseInClientMod recursive pnt subExp serverModName newFunPName ((inscps, exps, mod,ts) ,fileName)
= let qual = hsQualifier pnt inscps
pn = pNTtoPN pnt
in if qual==[]
then --This name is not imported
return ((fileName,unmodified), (ts,mod))
els... | 1,255 | generaliseInClientMod recursive pnt subExp serverModName newFunPName ((inscps, exps, mod,ts) ,fileName)
= let qual = hsQualifier pnt inscps
pn = pNTtoPN pnt
in if qual==[]
then --This name is not imported
return ((fileName,unmodified), (ts,mod))
el... | 1,255 | generaliseInClientMod recursive pnt subExp serverModName newFunPName ((inscps, exps, mod,ts) ,fileName)
= let qual = hsQualifier pnt inscps
pn = pNTtoPN pnt
in if qual==[]
then --This name is not imported
return ((fileName,unmodified), (ts,mod))
el... | 1,255 | false | false | 0 | 21 | 568 | 331 | 174 | 157 | null | null |
brendanhay/gogol | gogol-cloudprivatecatalog/gen/Network/Google/Resource/CloudPrivateCatalog/Projects/Versions/Search.hs | mpl-2.0 | -- | A pagination token returned from a previous call to SearchVersions that
-- indicates where this listing should continue from. This field is
-- optional.
pvsPageToken :: Lens' ProjectsVersionsSearch (Maybe Text)
pvsPageToken
= lens _pvsPageToken (\ s a -> s{_pvsPageToken = a}) | 283 | pvsPageToken :: Lens' ProjectsVersionsSearch (Maybe Text)
pvsPageToken
= lens _pvsPageToken (\ s a -> s{_pvsPageToken = a}) | 125 | pvsPageToken
= lens _pvsPageToken (\ s a -> s{_pvsPageToken = a}) | 67 | true | true | 0 | 9 | 44 | 50 | 27 | 23 | null | null |
snapframework/snap-core | src/Snap/Internal/Http/Types.hs | bsd-3-clause | -- ^ output body is sendfile(), optional second argument
-- is a byte range to send
------------------------------------------------------------------------------
rspBodyMap :: (StreamProc -> StreamProc) -> ResponseBody -> ResponseBody
rspBodyMap f b = Stream $ f $ rspBodyToEnum b | 307 | rspBodyMap :: (StreamProc -> StreamProc) -> ResponseBody -> ResponseBody
rspBodyMap f b = Stream $ f $ rspBodyToEnum b | 118 | rspBodyMap f b = Stream $ f $ rspBodyToEnum b | 45 | true | true | 0 | 7 | 61 | 45 | 24 | 21 | null | null |
Alaya-in-Matrix/Anjelica | src/Language/WhiteSpace.hs | mit | arithOpParser :: Parser ArithOp
arithOpParser = wsSpace *> (Add <$ wsSpace <|> Sub <$ wsTab <|> Mul <$ wsLf)
<|> wsTab *> (Div <$ wsSpace <|> Mod <$ wsTab) | 169 | arithOpParser :: Parser ArithOp
arithOpParser = wsSpace *> (Add <$ wsSpace <|> Sub <$ wsTab <|> Mul <$ wsLf)
<|> wsTab *> (Div <$ wsSpace <|> Mod <$ wsTab) | 169 | arithOpParser = wsSpace *> (Add <$ wsSpace <|> Sub <$ wsTab <|> Mul <$ wsLf)
<|> wsTab *> (Div <$ wsSpace <|> Mod <$ wsTab) | 137 | false | true | 7 | 10 | 42 | 77 | 38 | 39 | null | null |
swift-nav/plover | src/Language/Plover/Unify.hs | mit | expandErrors :: UM ()
expandErrors = do errors <- gets uErrors
errors' <- mapM (mapTerm expandTerm expandTerm expandTerm expandTerm) errors
modify $ \state -> state { uErrors = errors' } | 222 | expandErrors :: UM ()
expandErrors = do errors <- gets uErrors
errors' <- mapM (mapTerm expandTerm expandTerm expandTerm expandTerm) errors
modify $ \state -> state { uErrors = errors' } | 222 | expandErrors = do errors <- gets uErrors
errors' <- mapM (mapTerm expandTerm expandTerm expandTerm expandTerm) errors
modify $ \state -> state { uErrors = errors' } | 200 | false | true | 0 | 10 | 65 | 70 | 34 | 36 | null | null |
fpco/cabal | cabal-install/Distribution/Client/PackageIndex.hs | bsd-3-clause | elemByPackageName :: Package pkg => PackageIndex pkg -> PackageName -> Bool
elemByPackageName index = not . null . lookupPackageName index | 138 | elemByPackageName :: Package pkg => PackageIndex pkg -> PackageName -> Bool
elemByPackageName index = not . null . lookupPackageName index | 138 | elemByPackageName index = not . null . lookupPackageName index | 62 | false | true | 0 | 7 | 19 | 43 | 20 | 23 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F16.hs | bsd-3-clause | -- glMakeBufferResidentNV ------------------------------------------------------
glMakeBufferResidentNV
:: MonadIO m
=> GLenum -- ^ @target@.
-> GLenum -- ^ @access@.
-> m ()
glMakeBufferResidentNV v1 v2 = liftIO $ dyn54 ptr_glMakeBufferResidentNV v1 v2 | 262 | glMakeBufferResidentNV
:: MonadIO m
=> GLenum -- ^ @target@.
-> GLenum -- ^ @access@.
-> m ()
glMakeBufferResidentNV v1 v2 = liftIO $ dyn54 ptr_glMakeBufferResidentNV v1 v2 | 180 | glMakeBufferResidentNV v1 v2 = liftIO $ dyn54 ptr_glMakeBufferResidentNV v1 v2 | 78 | true | true | 0 | 10 | 38 | 54 | 26 | 28 | null | null |
acowley/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprString :: String -> Doc
-- Print newlines as newlines with Haskell string escape notation,
-- not as '\n'. For other non-printables use regular escape notation.
pprString s = vcat (map text (showMultiLineString s)) | 218 | pprString :: String -> Doc
pprString s = vcat (map text (showMultiLineString s)) | 80 | pprString s = vcat (map text (showMultiLineString s)) | 53 | true | true | 0 | 9 | 34 | 37 | 19 | 18 | null | null |
phischu/fragnix | tests/packages/scotty/Data.OrdPSQ.Internal.hs | bsd-3-clause | rsingleLeft :: k -> p -> v -> LTree k p v -> k -> LTree k p v -> LTree k p v
rsingleLeft k1 p1 v1 t1 m1 (LLoser _ (E k2 p2 v2) t2 m2 t3) =
rloser k1 p1 v1 (rloser k2 p2 v2 t1 m1 t2) m2 t3 | 191 | rsingleLeft :: k -> p -> v -> LTree k p v -> k -> LTree k p v -> LTree k p v
rsingleLeft k1 p1 v1 t1 m1 (LLoser _ (E k2 p2 v2) t2 m2 t3) =
rloser k1 p1 v1 (rloser k2 p2 v2 t1 m1 t2) m2 t3 | 191 | rsingleLeft k1 p1 v1 t1 m1 (LLoser _ (E k2 p2 v2) t2 m2 t3) =
rloser k1 p1 v1 (rloser k2 p2 v2 t1 m1 t2) m2 t3 | 114 | false | true | 0 | 16 | 56 | 130 | 60 | 70 | null | null |
Saulzar/reflex-dom | src/Reflex/Dom/Xhr.hs | bsd-3-clause | performRequestsAsync :: (Traversable f, MonadWidget t m) => Event t (f XhrRequest) -> m (Event t (f XhrResponse))
performRequestsAsync req = performEventAsync $ ffor req $ \rs cb -> do
resps <- forM rs $ \r -> do
resp <- liftIO newEmptyMVar
_ <- newXMLHttpRequest r $ liftIO . putMVar resp
return resp
_ ... | 379 | performRequestsAsync :: (Traversable f, MonadWidget t m) => Event t (f XhrRequest) -> m (Event t (f XhrResponse))
performRequestsAsync req = performEventAsync $ ffor req $ \rs cb -> do
resps <- forM rs $ \r -> do
resp <- liftIO newEmptyMVar
_ <- newXMLHttpRequest r $ liftIO . putMVar resp
return resp
_ ... | 379 | performRequestsAsync req = performEventAsync $ ffor req $ \rs cb -> do
resps <- forM rs $ \r -> do
resp <- liftIO newEmptyMVar
_ <- newXMLHttpRequest r $ liftIO . putMVar resp
return resp
_ <- liftIO $ forkIO $ cb =<< forM resps takeMVar
return () | 265 | false | true | 0 | 17 | 83 | 169 | 78 | 91 | null | null |
WSCU/JSEuterpea | Euterpea Examples/Basics.hs | gpl-3.0 | p2 = tp2a * rhythm "*.*."(q (violin tp2b))
| 43 | tp2 = tp2a * rhythm "*.*."(q (violin tp2b)) | 43 | tp2 = tp2a * rhythm "*.*."(q (violin tp2b)) | 43 | false | false | 2 | 9 | 8 | 31 | 13 | 18 | null | null |
emwap/feldspar-language | src/Feldspar/Core/Frontend/LoopM.hs | bsd-3-clause | forM :: (Syntax a) => Data Length -> (Data Index -> M a) -> M ()
forM = sugarSymC For | 85 | forM :: (Syntax a) => Data Length -> (Data Index -> M a) -> M ()
forM = sugarSymC For | 85 | forM = sugarSymC For | 20 | false | true | 0 | 10 | 19 | 52 | 25 | 27 | null | null |
haBuu/tfs-website | Helpers.hs | mit | showTime :: TimeZone -> UTCTime -> String
showTime tz time =
let
local = utcToLocalTime tz time
day = showDay $ localDay local
in
day ++ " " ++ formatTime defaultTimeLocale "%H:%M" local | 202 | showTime :: TimeZone -> UTCTime -> String
showTime tz time =
let
local = utcToLocalTime tz time
day = showDay $ localDay local
in
day ++ " " ++ formatTime defaultTimeLocale "%H:%M" local | 202 | showTime tz time =
let
local = utcToLocalTime tz time
day = showDay $ localDay local
in
day ++ " " ++ formatTime defaultTimeLocale "%H:%M" local | 160 | false | true | 0 | 10 | 48 | 67 | 32 | 35 | null | null |
gltronred/issue-recommendation-crawler | src/Service.hs | gpl-3.0 | invalidJson :: SomeException -> ResourceT IO Response
invalidJson ex = return $ responseLBS
status400
[("Content-Type", "application/json")]
$ encode $ object
[ ("message" .= show ex)
] | 213 | invalidJson :: SomeException -> ResourceT IO Response
invalidJson ex = return $ responseLBS
status400
[("Content-Type", "application/json")]
$ encode $ object
[ ("message" .= show ex)
] | 213 | invalidJson ex = return $ responseLBS
status400
[("Content-Type", "application/json")]
$ encode $ object
[ ("message" .= show ex)
] | 159 | false | true | 3 | 7 | 53 | 61 | 32 | 29 | null | null |
jgm/haddock | src/Haddock.hs | bsd-2-clause | getExecDir = try_size 2048 -- plenty, PATH_MAX is 512 under Win32.
where
try_size size = allocaArray (fromIntegral size) $ \buf -> do
ret <- c_GetModuleFileName nullPtr buf size
case ret of
0 -> return Nothing
_ | ret < size -> fmap (Just . dropFileName) $ peekCWString buf
... | 363 | getExecDir = try_size 2048 -- plenty, PATH_MAX is 512 under Win32.
where
try_size size = allocaArray (fromIntegral size) $ \buf -> do
ret <- c_GetModuleFileName nullPtr buf size
case ret of
0 -> return Nothing
_ | ret < size -> fmap (Just . dropFileName) $ peekCWString buf
... | 363 | getExecDir = try_size 2048 -- plenty, PATH_MAX is 512 under Win32.
where
try_size size = allocaArray (fromIntegral size) $ \buf -> do
ret <- c_GetModuleFileName nullPtr buf size
case ret of
0 -> return Nothing
_ | ret < size -> fmap (Just . dropFileName) $ peekCWString buf
... | 363 | false | false | 0 | 16 | 109 | 120 | 56 | 64 | null | null |
knightvv/hascheme | parser.hs | apache-2.0 | symbol :: Parser Char
symbol = oneOf "!$%&|*+-/:<=?>@^_~#" | 58 | symbol :: Parser Char
symbol = oneOf "!$%&|*+-/:<=?>@^_~#" | 58 | symbol = oneOf "!$%&|*+-/:<=?>@^_~#" | 36 | false | true | 1 | 5 | 7 | 20 | 8 | 12 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Monitoring/Server.hs | bsd-2-clause | errorReport :: Snap ()
errorReport = do
modifyResponse $ setResponseStatus 404 "Not found"
writeBS "Unable to produce a report for the requested resource" | 158 | errorReport :: Snap ()
errorReport = do
modifyResponse $ setResponseStatus 404 "Not found"
writeBS "Unable to produce a report for the requested resource" | 158 | errorReport = do
modifyResponse $ setResponseStatus 404 "Not found"
writeBS "Unable to produce a report for the requested resource" | 135 | false | true | 1 | 9 | 26 | 38 | 15 | 23 | null | null |
purcell/adventofcodeteam | app/Six.hs | bsd-3-clause | off :: Map Light Bool -> Light -> Light -> Map Light Bool
off lights bottomLeft topRight = foldl (flip Map.delete) lights targets
where
targets = rectangle bottomLeft topRight | 187 | off :: Map Light Bool -> Light -> Light -> Map Light Bool
off lights bottomLeft topRight = foldl (flip Map.delete) lights targets
where
targets = rectangle bottomLeft topRight | 187 | off lights bottomLeft topRight = foldl (flip Map.delete) lights targets
where
targets = rectangle bottomLeft topRight | 129 | false | true | 0 | 8 | 40 | 67 | 32 | 35 | null | null |
mcschroeder/ghc | compiler/deSugar/DsArrows.hs | bsd-3-clause | dsCmdDo ids local_vars res_ty (stmt:stmts) env_ids = do
let bound_vars = mkVarSet (collectLStmtBinders stmt)
let local_vars' = bound_vars `unionVarSet` local_vars
(core_stmts, _, env_ids') <- trimInput (dsCmdDo ids local_vars' res_ty stmts)
(core_stmt, fv_stmt) <- dsCmdLStmt ids local_vars env_ids' stm... | 735 | dsCmdDo ids local_vars res_ty (stmt:stmts) env_ids = do
let bound_vars = mkVarSet (collectLStmtBinders stmt)
let local_vars' = bound_vars `unionVarSet` local_vars
(core_stmts, _, env_ids') <- trimInput (dsCmdDo ids local_vars' res_ty stmts)
(core_stmt, fv_stmt) <- dsCmdLStmt ids local_vars env_ids' stm... | 735 | dsCmdDo ids local_vars res_ty (stmt:stmts) env_ids = do
let bound_vars = mkVarSet (collectLStmtBinders stmt)
let local_vars' = bound_vars `unionVarSet` local_vars
(core_stmts, _, env_ids') <- trimInput (dsCmdDo ids local_vars' res_ty stmts)
(core_stmt, fv_stmt) <- dsCmdLStmt ids local_vars env_ids' stm... | 735 | false | false | 0 | 12 | 199 | 153 | 75 | 78 | null | null |
danstiner/dupes | test/executable/Spec.hs | mit | main :: IO ()
main = defaultMain $
testGroup "Executable tests" [] | 68 | main :: IO ()
main = defaultMain $
testGroup "Executable tests" [] | 68 | main = defaultMain $
testGroup "Executable tests" [] | 54 | false | true | 0 | 7 | 13 | 27 | 13 | 14 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs | bsd-3-clause | gl_ALPHA :: GLenum
gl_ALPHA = 0x1906 | 36 | gl_ALPHA :: GLenum
gl_ALPHA = 0x1906 | 36 | gl_ALPHA = 0x1906 | 17 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
rfranek/duckling | Duckling/Time/Helpers.hs | bsd-3-clause | longWEBefore :: TimeData -> TimeData
longWEBefore monday = interval' TTime.Open (start, end)
where
start = intersect' (fri, hour False 18)
end = intersect' (tue, hour False 0)
fri = cycleNthAfter False TG.Day (- 3) monday
tue = cycleNthAfter False TG.Day 1 monday | 281 | longWEBefore :: TimeData -> TimeData
longWEBefore monday = interval' TTime.Open (start, end)
where
start = intersect' (fri, hour False 18)
end = intersect' (tue, hour False 0)
fri = cycleNthAfter False TG.Day (- 3) monday
tue = cycleNthAfter False TG.Day 1 monday | 281 | longWEBefore monday = interval' TTime.Open (start, end)
where
start = intersect' (fri, hour False 18)
end = intersect' (tue, hour False 0)
fri = cycleNthAfter False TG.Day (- 3) monday
tue = cycleNthAfter False TG.Day 1 monday | 244 | false | true | 3 | 7 | 59 | 120 | 57 | 63 | null | null |
olorin/amazonka | amazonka-ssm/gen/Network/AWS/SSM/CreateDocument.hs | mpl-2.0 | -- | Creates a value of 'CreateDocument' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cdContent'
--
-- * 'cdName'
createDocument
:: Text -- ^ 'cdContent'
-> Text -- ^ 'cdName'
-> CreateDocument
createDocument pContent_ ... | 406 | createDocument
:: Text -- ^ 'cdContent'
-> Text -- ^ 'cdName'
-> CreateDocument
createDocument pContent_ pName_ =
CreateDocument'
{ _cdContent = pContent_
, _cdName = pName_
} | 203 | createDocument pContent_ pName_ =
CreateDocument'
{ _cdContent = pContent_
, _cdName = pName_
} | 111 | true | true | 0 | 6 | 92 | 47 | 30 | 17 | null | null |
sgillespie/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | hasNoGlobalRegs (CmmReg (CmmLocal _)) = True | 49 | hasNoGlobalRegs (CmmReg (CmmLocal _)) = True | 49 | hasNoGlobalRegs (CmmReg (CmmLocal _)) = True | 49 | false | false | 0 | 9 | 10 | 21 | 10 | 11 | null | null |
gxtaillon/spot | src/lib/Language/SPO/Parser/PrimaryParser.hs | gpl-3.0 | forceReturn _ (StmtReturn _) = return () | 40 | forceReturn _ (StmtReturn _) = return () | 40 | forceReturn _ (StmtReturn _) = return () | 40 | false | false | 1 | 6 | 6 | 25 | 10 | 15 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.