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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
positiondev/larceny
|
example/Fn.hs
|
isc
|
teamHandler :: Ctxt -> Int -> IO (Maybe Response)
teamHandler ctxt teamId =
let mTeam = findTeam teamId
renderTeam team = larcenyRenderWith ctxt (teamSubs team) ["team"] in
maybe (return Nothing) renderTeam mTeam
| 222 |
teamHandler :: Ctxt -> Int -> IO (Maybe Response)
teamHandler ctxt teamId =
let mTeam = findTeam teamId
renderTeam team = larcenyRenderWith ctxt (teamSubs team) ["team"] in
maybe (return Nothing) renderTeam mTeam
| 222 |
teamHandler ctxt teamId =
let mTeam = findTeam teamId
renderTeam team = larcenyRenderWith ctxt (teamSubs team) ["team"] in
maybe (return Nothing) renderTeam mTeam
| 172 | false | true | 0 | 11 | 41 | 84 | 40 | 44 | null | null |
gnn/Hets
|
HolLight/HolLight2DG.hs
|
gpl-2.0
|
_insNodeDG :: Sign -> [Named Sentence] -> String
-> (DGraph, Map.Map String
(String, Data.Graph.Inductive.Graph.Node, DGNodeLab))
-> (DGraph, Map.Map String
(String, Data.Graph.Inductive.Graph.Node, DGNodeLab))
_insNodeDG sig sens n (dg, m) =
let gt = G_theory HolLight Nothing (makeExtSign HolLight sig) startSigId
(toThSens sens) startThId
n' = snd (System.FilePath.splitFileName n)
labelK = newInfoNodeLab
(makeName (simpleIdToIRI $ mkSimpleId n'))
(newNodeInfo DGEmpty)
gt
k = getNewNodeDG dg
m' = Map.insert n (n, k, labelK) m
insN = [InsertNode (k, labelK)]
newDG = changesDGH dg insN
labCh = [SetNodeLab labelK (k, labelK
{ globalTheory = computeLabelTheory Map.empty newDG
(k, labelK) })]
newDG1 = changesDGH newDG labCh in (newDG1, m')
| 886 |
_insNodeDG :: Sign -> [Named Sentence] -> String
-> (DGraph, Map.Map String
(String, Data.Graph.Inductive.Graph.Node, DGNodeLab))
-> (DGraph, Map.Map String
(String, Data.Graph.Inductive.Graph.Node, DGNodeLab))
_insNodeDG sig sens n (dg, m) =
let gt = G_theory HolLight Nothing (makeExtSign HolLight sig) startSigId
(toThSens sens) startThId
n' = snd (System.FilePath.splitFileName n)
labelK = newInfoNodeLab
(makeName (simpleIdToIRI $ mkSimpleId n'))
(newNodeInfo DGEmpty)
gt
k = getNewNodeDG dg
m' = Map.insert n (n, k, labelK) m
insN = [InsertNode (k, labelK)]
newDG = changesDGH dg insN
labCh = [SetNodeLab labelK (k, labelK
{ globalTheory = computeLabelTheory Map.empty newDG
(k, labelK) })]
newDG1 = changesDGH newDG labCh in (newDG1, m')
| 886 |
_insNodeDG sig sens n (dg, m) =
let gt = G_theory HolLight Nothing (makeExtSign HolLight sig) startSigId
(toThSens sens) startThId
n' = snd (System.FilePath.splitFileName n)
labelK = newInfoNodeLab
(makeName (simpleIdToIRI $ mkSimpleId n'))
(newNodeInfo DGEmpty)
gt
k = getNewNodeDG dg
m' = Map.insert n (n, k, labelK) m
insN = [InsertNode (k, labelK)]
newDG = changesDGH dg insN
labCh = [SetNodeLab labelK (k, labelK
{ globalTheory = computeLabelTheory Map.empty newDG
(k, labelK) })]
newDG1 = changesDGH newDG labCh in (newDG1, m')
| 617 | false | true | 0 | 15 | 244 | 307 | 168 | 139 | null | null |
sinelaw/language-ecmascript
|
src/Language/ECMAScript3/Syntax.hs
|
bsd-3-clause
|
isReservedWord :: String -> Bool
isReservedWord = (`elem` reservedWords)
where reservedWords = keyword ++ futureReservedWord ++ nullKw ++ boolLit
keyword = ["break", "case", "catch", "continue", "default", "delete"
,"do", "else", "finally", "for", "function", "if", "in"
,"instanceof", "new", "return", "switch", "this", "throw"
,"try", "typeof", "var", "void", "while", "with"]
futureReservedWord = ["abstract", "boolean", "byte", "char", "class"
,"const", "debugger", "enum", "export", "extends"
,"final", "float", "goto", "implements", "int"
,"interface", "long", "native", "package", "private"
,"protected", "short", "static", "super"
,"synchronized", "throws", "transient", "volatile"]
nullKw = ["null"]
boolLit = ["true", "false"]
-- | Checks if a character is valid at the start of an identifier
| 1,036 |
isReservedWord :: String -> Bool
isReservedWord = (`elem` reservedWords)
where reservedWords = keyword ++ futureReservedWord ++ nullKw ++ boolLit
keyword = ["break", "case", "catch", "continue", "default", "delete"
,"do", "else", "finally", "for", "function", "if", "in"
,"instanceof", "new", "return", "switch", "this", "throw"
,"try", "typeof", "var", "void", "while", "with"]
futureReservedWord = ["abstract", "boolean", "byte", "char", "class"
,"const", "debugger", "enum", "export", "extends"
,"final", "float", "goto", "implements", "int"
,"interface", "long", "native", "package", "private"
,"protected", "short", "static", "super"
,"synchronized", "throws", "transient", "volatile"]
nullKw = ["null"]
boolLit = ["true", "false"]
-- | Checks if a character is valid at the start of an identifier
| 1,036 |
isReservedWord = (`elem` reservedWords)
where reservedWords = keyword ++ futureReservedWord ++ nullKw ++ boolLit
keyword = ["break", "case", "catch", "continue", "default", "delete"
,"do", "else", "finally", "for", "function", "if", "in"
,"instanceof", "new", "return", "switch", "this", "throw"
,"try", "typeof", "var", "void", "while", "with"]
futureReservedWord = ["abstract", "boolean", "byte", "char", "class"
,"const", "debugger", "enum", "export", "extends"
,"final", "float", "goto", "implements", "int"
,"interface", "long", "native", "package", "private"
,"protected", "short", "static", "super"
,"synchronized", "throws", "transient", "volatile"]
nullKw = ["null"]
boolLit = ["true", "false"]
-- | Checks if a character is valid at the start of an identifier
| 1,003 | false | true | 0 | 7 | 330 | 230 | 148 | 82 | null | null |
alexander-at-github/eta
|
libraries/base/GHC/List.hs
|
bsd-3-clause
|
init [x] = []
| 29 |
init [x] = []
| 29 |
init [x] = []
| 29 | false | false | 0 | 6 | 19 | 14 | 7 | 7 | null | null |
lukemaurer/sequent-core
|
src/Language/SequentCore/Pretty.hs
|
bsd-3-clause
|
ppr_binds_top :: OutputableBndr b => [Bind b] -> SDoc
ppr_binds_top binds = ppr_binds_with empty empty empty binds
| 114 |
ppr_binds_top :: OutputableBndr b => [Bind b] -> SDoc
ppr_binds_top binds = ppr_binds_with empty empty empty binds
| 114 |
ppr_binds_top binds = ppr_binds_with empty empty empty binds
| 60 | false | true | 0 | 9 | 16 | 45 | 20 | 25 | null | null |
Danten/lejf
|
src/Types/TC.hs
|
bsd-3-clause
|
local :: Endo Env -> Endo (TC a)
local f (TC m) = TC $ m . f
| 60 |
local :: Endo Env -> Endo (TC a)
local f (TC m) = TC $ m . f
| 60 |
local f (TC m) = TC $ m . f
| 27 | false | true | 3 | 9 | 17 | 53 | 23 | 30 | null | null |
brendanhay/gogol
|
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'CustomerReturnReason' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'crrReasonCode'
--
-- * 'crrDescription'
customerReturnReason
:: CustomerReturnReason
customerReturnReason =
CustomerReturnReason' {_crrReasonCode = Nothing, _crrDescription = Nothing}
| 370 |
customerReturnReason
:: CustomerReturnReason
customerReturnReason =
CustomerReturnReason' {_crrReasonCode = Nothing, _crrDescription = Nothing}
| 149 |
customerReturnReason =
CustomerReturnReason' {_crrReasonCode = Nothing, _crrDescription = Nothing}
| 100 | true | true | 1 | 7 | 55 | 36 | 22 | 14 | null | null |
fmapfmapfmap/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
|
mpl-2.0
|
-- | The name of the key pair.
lsKeyName :: Lens' LaunchSpecification (Maybe Text)
lsKeyName = lens _lsKeyName (\ s a -> s{_lsKeyName = a})
| 139 |
lsKeyName :: Lens' LaunchSpecification (Maybe Text)
lsKeyName = lens _lsKeyName (\ s a -> s{_lsKeyName = a})
| 108 |
lsKeyName = lens _lsKeyName (\ s a -> s{_lsKeyName = a})
| 56 | true | true | 0 | 9 | 24 | 46 | 25 | 21 | null | null |
tolysz/prepare-ghcjs
|
spec-lts8/cabal/Cabal/Distribution/Package.hs
|
bsd-3-clause
|
packageVersion :: Package pkg => pkg -> Version
packageVersion = pkgVersion . packageId
| 88 |
packageVersion :: Package pkg => pkg -> Version
packageVersion = pkgVersion . packageId
| 88 |
packageVersion = pkgVersion . packageId
| 40 | false | true | 0 | 6 | 13 | 26 | 13 | 13 | null | null |
dicomgrid/dicom-haskell-library
|
src/Data/DICOM/FileMetaInformation.hs
|
gpl-3.0
|
fileMetaInformation :: FileMetaInformation -> Object
fileMetaInformation FileMetaInformation{..} = object
[ filemetainformationversion "\0\1"
, mediastoredsopclassuid $ fromString fmiSOPClassUID
, mediastoredsopinstanceuid $ fromString fmiSOPInstanceUID
, transfersyntaxuid $ fromString fmiTransferSyntaxUID
, implementationclassuid $ fromString fmiSOPImplementationClassUID
]
| 411 |
fileMetaInformation :: FileMetaInformation -> Object
fileMetaInformation FileMetaInformation{..} = object
[ filemetainformationversion "\0\1"
, mediastoredsopclassuid $ fromString fmiSOPClassUID
, mediastoredsopinstanceuid $ fromString fmiSOPInstanceUID
, transfersyntaxuid $ fromString fmiTransferSyntaxUID
, implementationclassuid $ fromString fmiSOPImplementationClassUID
]
| 411 |
fileMetaInformation FileMetaInformation{..} = object
[ filemetainformationversion "\0\1"
, mediastoredsopclassuid $ fromString fmiSOPClassUID
, mediastoredsopinstanceuid $ fromString fmiSOPInstanceUID
, transfersyntaxuid $ fromString fmiTransferSyntaxUID
, implementationclassuid $ fromString fmiSOPImplementationClassUID
]
| 358 | false | true | 0 | 7 | 67 | 73 | 36 | 37 | null | null |
harrisi/on-being-better
|
list-expansion/Haskell/Learning/Parametricity.hs
|
cc0-1.0
|
f4 :: [a] -> [a]
f4 x = x
| 25 |
f4 :: [a] -> [a]
f4 x = x
| 25 |
f4 x = x
| 8 | false | true | 0 | 6 | 8 | 28 | 14 | 14 | null | null |
rueshyna/gogol
|
gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs
|
mpl-2.0
|
-- | URL of the form.
fFormURL :: Lens' Form (Maybe Text)
fFormURL = lens _fFormURL (\ s a -> s{_fFormURL = a})
| 111 |
fFormURL :: Lens' Form (Maybe Text)
fFormURL = lens _fFormURL (\ s a -> s{_fFormURL = a})
| 89 |
fFormURL = lens _fFormURL (\ s a -> s{_fFormURL = a})
| 53 | true | true | 2 | 9 | 22 | 55 | 25 | 30 | null | null |
joozek78/stack
|
src/Stack/Setup.hs
|
bsd-3-clause
|
downloadAndInstallGHC :: (MonadIO m, MonadMask m, MonadLogger m, MonadReader env m, HasConfig env, HasHttpManager env, MonadBaseControl IO m)
=> EnvOverride
-> SetupInfo
-> CompilerVersion
-> VersionCheck
-> m PackageIdentifier
downloadAndInstallGHC menv si wanted versionCheck = do
osKey <- getOSKey menv
pairs <-
case Map.lookup osKey $ siGHCs si of
Nothing -> throwM $ UnknownOSKey osKey
Just pairs -> return pairs
let mpair =
listToMaybe $
sortBy (flip (comparing fst)) $
filter (\(v, _) -> isWantedCompiler versionCheck wanted (GhcVersion v)) (Map.toList pairs)
(selectedVersion, downloadInfo) <-
case mpair of
Just pair -> return pair
Nothing -> throwM $ UnknownGHCVersion osKey wanted (Map.keysSet pairs)
platform <- asks $ configPlatform . getConfig
let installer =
case platform of
Platform _ os | isWindows os -> installGHCWindows
_ -> installGHCPosix
downloadAndInstallTool si downloadInfo $(mkPackageName "ghc") selectedVersion installer
| 1,176 |
downloadAndInstallGHC :: (MonadIO m, MonadMask m, MonadLogger m, MonadReader env m, HasConfig env, HasHttpManager env, MonadBaseControl IO m)
=> EnvOverride
-> SetupInfo
-> CompilerVersion
-> VersionCheck
-> m PackageIdentifier
downloadAndInstallGHC menv si wanted versionCheck = do
osKey <- getOSKey menv
pairs <-
case Map.lookup osKey $ siGHCs si of
Nothing -> throwM $ UnknownOSKey osKey
Just pairs -> return pairs
let mpair =
listToMaybe $
sortBy (flip (comparing fst)) $
filter (\(v, _) -> isWantedCompiler versionCheck wanted (GhcVersion v)) (Map.toList pairs)
(selectedVersion, downloadInfo) <-
case mpair of
Just pair -> return pair
Nothing -> throwM $ UnknownGHCVersion osKey wanted (Map.keysSet pairs)
platform <- asks $ configPlatform . getConfig
let installer =
case platform of
Platform _ os | isWindows os -> installGHCWindows
_ -> installGHCPosix
downloadAndInstallTool si downloadInfo $(mkPackageName "ghc") selectedVersion installer
| 1,176 |
downloadAndInstallGHC menv si wanted versionCheck = do
osKey <- getOSKey menv
pairs <-
case Map.lookup osKey $ siGHCs si of
Nothing -> throwM $ UnknownOSKey osKey
Just pairs -> return pairs
let mpair =
listToMaybe $
sortBy (flip (comparing fst)) $
filter (\(v, _) -> isWantedCompiler versionCheck wanted (GhcVersion v)) (Map.toList pairs)
(selectedVersion, downloadInfo) <-
case mpair of
Just pair -> return pair
Nothing -> throwM $ UnknownGHCVersion osKey wanted (Map.keysSet pairs)
platform <- asks $ configPlatform . getConfig
let installer =
case platform of
Platform _ os | isWindows os -> installGHCWindows
_ -> installGHCPosix
downloadAndInstallTool si downloadInfo $(mkPackageName "ghc") selectedVersion installer
| 893 | false | true | 0 | 16 | 358 | 347 | 164 | 183 | null | null |
nvasilakis/pandoc
|
src/Text/Pandoc/Writers/Docx.hs
|
gpl-2.0
|
inlineToOpenXML opts (Superscript lst) =
withTextProp (mknode "w:vertAlign" [("w:val","superscript")] ())
$ inlinesToOpenXML opts lst
| 137 |
inlineToOpenXML opts (Superscript lst) =
withTextProp (mknode "w:vertAlign" [("w:val","superscript")] ())
$ inlinesToOpenXML opts lst
| 137 |
inlineToOpenXML opts (Superscript lst) =
withTextProp (mknode "w:vertAlign" [("w:val","superscript")] ())
$ inlinesToOpenXML opts lst
| 137 | false | false | 2 | 9 | 17 | 51 | 25 | 26 | null | null |
droundy/franchise
|
Distribution/Franchise/Util.hs
|
bsd-3-clause
|
isDirectory :: String -> C Bool
isDirectory f = do assertNotCreatingScript "isDirectory"
f' <- processFilePath f
io $ doesDirectoryExist f'
| 177 |
isDirectory :: String -> C Bool
isDirectory f = do assertNotCreatingScript "isDirectory"
f' <- processFilePath f
io $ doesDirectoryExist f'
| 177 |
isDirectory f = do assertNotCreatingScript "isDirectory"
f' <- processFilePath f
io $ doesDirectoryExist f'
| 145 | false | true | 0 | 9 | 57 | 52 | 21 | 31 | null | null |
TorosFanny/kaleidoscope
|
src/chapter6/Codegen.hs
|
mit
|
getvar :: String -> Codegen Operand
getvar var = do
syms <- gets symtab
case lookup var syms of
Just x -> return x
Nothing -> error $ "Local variable not in scope: " ++ show var
-------------------------------------------------------------------------------
-- References
| 286 |
getvar :: String -> Codegen Operand
getvar var = do
syms <- gets symtab
case lookup var syms of
Just x -> return x
Nothing -> error $ "Local variable not in scope: " ++ show var
-------------------------------------------------------------------------------
-- References
| 286 |
getvar var = do
syms <- gets symtab
case lookup var syms of
Just x -> return x
Nothing -> error $ "Local variable not in scope: " ++ show var
-------------------------------------------------------------------------------
-- References
| 250 | false | true | 0 | 11 | 54 | 74 | 34 | 40 | null | null |
trygvis/hledger
|
hledger/Hledger/Cli/Options.hs
|
gpl-3.0
|
usage_options_cli = usageInfo "hledger options:" options_cli
| 60 |
usage_options_cli = usageInfo "hledger options:" options_cli
| 60 |
usage_options_cli = usageInfo "hledger options:" options_cli
| 60 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
loadimpact/http2-test
|
hs-src/Rede/SpdyProtocol/Framing/AnyFrame.hs
|
bsd-3-clause
|
writeControlFrame (WindowUpdateFrame_ACF a) = put a
| 51 |
writeControlFrame (WindowUpdateFrame_ACF a) = put a
| 51 |
writeControlFrame (WindowUpdateFrame_ACF a) = put a
| 51 | false | false | 0 | 6 | 5 | 19 | 8 | 11 | null | null |
kindohm/Tidal
|
Sound/Tidal/Pattern.hs
|
gpl-3.0
|
zoom :: Arc -> Pattern a -> Pattern a
zoom a@(s,e) p = splitQueries $ withResultArc (mapCycle ((/d) . (subtract s))) $ withQueryArc (mapCycle ((+s) . (*d))) p
where d = e-s
| 177 |
zoom :: Arc -> Pattern a -> Pattern a
zoom a@(s,e) p = splitQueries $ withResultArc (mapCycle ((/d) . (subtract s))) $ withQueryArc (mapCycle ((+s) . (*d))) p
where d = e-s
| 177 |
zoom a@(s,e) p = splitQueries $ withResultArc (mapCycle ((/d) . (subtract s))) $ withQueryArc (mapCycle ((+s) . (*d))) p
where d = e-s
| 139 | false | true | 0 | 13 | 36 | 110 | 59 | 51 | null | null |
creichert/wai
|
warp/Network/Wai/Handler/Warp/FileInfoCache.hs
|
mit
|
override :: Cache -> IO (Cache -> Cache)
override _ = return $ const M.empty
| 76 |
override :: Cache -> IO (Cache -> Cache)
override _ = return $ const M.empty
| 76 |
override _ = return $ const M.empty
| 35 | false | true | 0 | 8 | 14 | 37 | 18 | 19 | null | null |
ndmitchell/shake
|
src/Development/Shake/Internal/FilePattern.hs
|
bsd-3-clause
|
optimise (Star:Skip:xs) = optimise $ Skip1:xs
| 45 |
optimise (Star:Skip:xs) = optimise $ Skip1:xs
| 45 |
optimise (Star:Skip:xs) = optimise $ Skip1:xs
| 45 | false | false | 0 | 8 | 5 | 28 | 14 | 14 | null | null |
akc/gfscript
|
HOPS/GF.hs
|
bsd-3-clause
|
--------------------------------------------------------------------------------
-- Expand phase
--------------------------------------------------------------------------------
polyList :: Int -> Int -> [[Int]]
polyList _ 0 = [[]]
| 232 |
polyList :: Int -> Int -> [[Int]]
polyList _ 0 = [[]]
| 53 |
polyList _ 0 = [[]]
| 19 | true | true | 0 | 8 | 17 | 38 | 22 | 16 | null | null |
wereHamster/libinfluxdb
|
src/Database/InfluxDB/Writer.hs
|
mit
|
createHandle :: Config -> IO (Either () Handle)
createHandle c = do
manager <- newManager tlsManagerSettings
newHandle c manager
| 136 |
createHandle :: Config -> IO (Either () Handle)
createHandle c = do
manager <- newManager tlsManagerSettings
newHandle c manager
| 136 |
createHandle c = do
manager <- newManager tlsManagerSettings
newHandle c manager
| 88 | false | true | 0 | 10 | 26 | 54 | 23 | 31 | null | null |
Peaker/GLFW-b
|
Graphics/UI/GLFW.hs
|
bsd-2-clause
|
-- | Returns the position, in screen coodinates, relative to the upper left.
-- If the 'CursorInputMode' is "disabled", then results are unbounded by the window size.
-- See <http://www.glfw.org/docs/3.1/group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc glfwGetCursorPos>
getCursorPos :: Window -> IO (Double, Double)
getCursorPos win =
allocaArray 2 $ \p -> do
let p'x = p
p'y = p `advancePtr` 1
c'glfwGetCursorPos (toC win) p'x p'y
x <- fromC `fmap` peek p'x
y <- fromC `fmap` peek p'y
return (x, y)
-- | Assigns the given callback to use for all keyboard presses and repeats.
-- See <http://www.glfw.org/docs/3.1/group__input.html#ga7e496507126f35ea72f01b2e6ef6d155 glfwSetKeyCallback>
| 748 |
getCursorPos :: Window -> IO (Double, Double)
getCursorPos win =
allocaArray 2 $ \p -> do
let p'x = p
p'y = p `advancePtr` 1
c'glfwGetCursorPos (toC win) p'x p'y
x <- fromC `fmap` peek p'x
y <- fromC `fmap` peek p'y
return (x, y)
-- | Assigns the given callback to use for all keyboard presses and repeats.
-- See <http://www.glfw.org/docs/3.1/group__input.html#ga7e496507126f35ea72f01b2e6ef6d155 glfwSetKeyCallback>
| 473 |
getCursorPos win =
allocaArray 2 $ \p -> do
let p'x = p
p'y = p `advancePtr` 1
c'glfwGetCursorPos (toC win) p'x p'y
x <- fromC `fmap` peek p'x
y <- fromC `fmap` peek p'y
return (x, y)
-- | Assigns the given callback to use for all keyboard presses and repeats.
-- See <http://www.glfw.org/docs/3.1/group__input.html#ga7e496507126f35ea72f01b2e6ef6d155 glfwSetKeyCallback>
| 427 | true | true | 0 | 12 | 150 | 124 | 65 | 59 | null | null |
ctford/Idris-Elba-dev
|
src/IRTS/CodegenC.hs
|
bsd-3-clause
|
doOp v (LSExt (ITFixed from) ITNative) [x]
= v ++ "MKINT((i_int)((" ++ signedTy from ++ ")" ++ creg x ++ "->info.bits" ++ show (nativeTyWidth from) ++ "))"
| 159 |
doOp v (LSExt (ITFixed from) ITNative) [x]
= v ++ "MKINT((i_int)((" ++ signedTy from ++ ")" ++ creg x ++ "->info.bits" ++ show (nativeTyWidth from) ++ "))"
| 159 |
doOp v (LSExt (ITFixed from) ITNative) [x]
= v ++ "MKINT((i_int)((" ++ signedTy from ++ ")" ++ creg x ++ "->info.bits" ++ show (nativeTyWidth from) ++ "))"
| 159 | false | false | 0 | 11 | 30 | 73 | 35 | 38 | null | null |
HIPERFIT/futhark
|
src/Futhark/CodeGen/ImpGen/Multicore/SegRed.hs
|
isc
|
slugNeutral :: SegBinOpSlug -> [SubExp]
slugNeutral = segBinOpNeutral . slugOp
| 78 |
slugNeutral :: SegBinOpSlug -> [SubExp]
slugNeutral = segBinOpNeutral . slugOp
| 78 |
slugNeutral = segBinOpNeutral . slugOp
| 38 | false | true | 1 | 8 | 9 | 30 | 13 | 17 | null | null |
parapluu/encore
|
src/ir/AST/Util.hs
|
bsd-3-clause
|
putChildren _ e@Break{} = error "'putChildren l Break' expects l to have 0 elements"
| 84 |
putChildren _ e@Break{} = error "'putChildren l Break' expects l to have 0 elements"
| 84 |
putChildren _ e@Break{} = error "'putChildren l Break' expects l to have 0 elements"
| 84 | false | false | 0 | 7 | 13 | 24 | 11 | 13 | null | null |
brendanhay/gogol
|
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'FhirStoreLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fslAddtional'
fhirStoreLabels
:: HashMap Text Text -- ^ 'fslAddtional'
-> FhirStoreLabels
fhirStoreLabels pFslAddtional_ =
FhirStoreLabels' {_fslAddtional = _Coerce # pFslAddtional_}
| 368 |
fhirStoreLabels
:: HashMap Text Text -- ^ 'fslAddtional'
-> FhirStoreLabels
fhirStoreLabels pFslAddtional_ =
FhirStoreLabels' {_fslAddtional = _Coerce # pFslAddtional_}
| 178 |
fhirStoreLabels pFslAddtional_ =
FhirStoreLabels' {_fslAddtional = _Coerce # pFslAddtional_}
| 94 | true | true | 0 | 8 | 62 | 50 | 26 | 24 | null | null |
mtesseract/wosa
|
src/Nebelfiller.hs
|
bsd-3-clause
|
callbackQuit :: (WosaAction -> IO ()) -> IO ()
callbackQuit stm = do
mainQuit
wrapCallback (stm ActionQuit)
-- This is the callback called when one of the save buttons is called.
| 183 |
callbackQuit :: (WosaAction -> IO ()) -> IO ()
callbackQuit stm = do
mainQuit
wrapCallback (stm ActionQuit)
-- This is the callback called when one of the save buttons is called.
| 183 |
callbackQuit stm = do
mainQuit
wrapCallback (stm ActionQuit)
-- This is the callback called when one of the save buttons is called.
| 136 | false | true | 0 | 9 | 35 | 51 | 24 | 27 | null | null |
kathawala/symdiff
|
cublas/Foreign/CUDA/Cublas/Error.hs
|
gpl-3.0
|
describe AllocFailed = "resource allocation failed"
| 55 |
describe AllocFailed = "resource allocation failed"
| 55 |
describe AllocFailed = "resource allocation failed"
| 55 | false | false | 0 | 5 | 9 | 9 | 4 | 5 | null | null |
green-haskell/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
-- (>>=)
thenMClassOpKey = mkPreludeMiscIdUnique 172
| 66 |
thenMClassOpKey = mkPreludeMiscIdUnique 172
| 57 |
thenMClassOpKey = mkPreludeMiscIdUnique 172
| 57 | true | false | 0 | 5 | 19 | 10 | 5 | 5 | null | null |
andrewjanke/mytardis-dicom
|
src/Main.hs
|
bsd-2-clause
|
pShowExprOptions :: Parser Command
pShowExprOptions = CmdShowExperiments <$> ShowExperimentsOptions <$> switch (long "show-file-sets" <> help "Show experiments.")
| 162 |
pShowExprOptions :: Parser Command
pShowExprOptions = CmdShowExperiments <$> ShowExperimentsOptions <$> switch (long "show-file-sets" <> help "Show experiments.")
| 162 |
pShowExprOptions = CmdShowExperiments <$> ShowExperimentsOptions <$> switch (long "show-file-sets" <> help "Show experiments.")
| 127 | false | true | 0 | 9 | 16 | 38 | 18 | 20 | null | null |
copton/hgdbmi
|
src/Gdbmi/Commands.hs
|
bsd-3-clause
|
stack_list_arguments :: PrintValues -> Maybe (Int, Int) -> Command -- {{{3
stack_list_arguments printValues frames = cmd "stack-list-arguments" $ opt printValues : maybTupleOpt frames
| 183 |
stack_list_arguments :: PrintValues -> Maybe (Int, Int) -> Command
stack_list_arguments printValues frames = cmd "stack-list-arguments" $ opt printValues : maybTupleOpt frames
| 175 |
stack_list_arguments printValues frames = cmd "stack-list-arguments" $ opt printValues : maybTupleOpt frames
| 108 | true | true | 0 | 8 | 22 | 51 | 25 | 26 | null | null |
spechub/Hets
|
Propositional/Parse_AS_Basic.hs
|
gpl-2.0
|
implKey :: AParser st Token
implKey = asKey implS
| 49 |
implKey :: AParser st Token
implKey = asKey implS
| 49 |
implKey = asKey implS
| 21 | false | true | 0 | 5 | 8 | 19 | 9 | 10 | null | null |
hithroc/hsvkbot
|
src/Card.hs
|
bsd-3-clause
|
processTag :: MonadCardsDB m => CardTag -> (Locale, Card) -> m (Locale, Card)
processTag (Loc l) (_,c) = return (l,c)
| 117 |
processTag :: MonadCardsDB m => CardTag -> (Locale, Card) -> m (Locale, Card)
processTag (Loc l) (_,c) = return (l,c)
| 117 |
processTag (Loc l) (_,c) = return (l,c)
| 39 | false | true | 0 | 9 | 19 | 67 | 36 | 31 | null | null |
johnjcamilleri/maltese-functional-morphology
|
malti/Helpers.hs
|
lgpl-3.0
|
-- require doubling when prefixed with 't', eg DDUM, ĠĠORR, SSIB, TTIR, ŻŻID {GM pg68,2b} {OM pg90}
_DoublingConsN :: [String] = [ "l" , "m" , "r" ]
| 148 |
_DoublingConsN :: [String] = [ "l" , "m" , "r" ]
| 48 |
_DoublingConsN :: [String] = [ "l" , "m" , "r" ]
| 48 | true | false | 1 | 6 | 27 | 26 | 14 | 12 | null | null |
Helkafen/haddock
|
haddock-api/src/Haddock/Convert.hs
|
bsd-2-clause
|
synifyType _ (AppTy t1 t2) = let
s1 = synifyType WithinType t1
s2 = synifyType WithinType t2
in noLoc $ HsAppTy s1 s2
| 123 |
synifyType _ (AppTy t1 t2) = let
s1 = synifyType WithinType t1
s2 = synifyType WithinType t2
in noLoc $ HsAppTy s1 s2
| 123 |
synifyType _ (AppTy t1 t2) = let
s1 = synifyType WithinType t1
s2 = synifyType WithinType t2
in noLoc $ HsAppTy s1 s2
| 123 | false | false | 0 | 9 | 28 | 54 | 25 | 29 | null | null |
pbl64k/gpif-datakinds
|
src/Control/IxFunctor/Examples/Examples.hs
|
bsd-2-clause
|
- |Factorial as a hylomorphism on lists.
anacataFactorial :: Integer -> Integer
anacataFactorial = cataList (1 `maybe` uncurry (*)) . anaList coalg
where
coalg 0 = Nothing
coalg n = Just (n, pred n)
-- |Same, but with explicit appeal to hylo.
| 264 |
anacataFactorial :: Integer -> Integer
anacataFactorial = cataList (1 `maybe` uncurry (*)) . anaList coalg
where
coalg 0 = Nothing
coalg n = Just (n, pred n)
-- |Same, but with explicit appeal to hylo.
| 222 |
anacataFactorial = cataList (1 `maybe` uncurry (*)) . anaList coalg
where
coalg 0 = Nothing
coalg n = Just (n, pred n)
-- |Same, but with explicit appeal to hylo.
| 183 | true | true | 1 | 10 | 63 | 90 | 46 | 44 | null | null |
kairuku/stack
|
src/System/Process/Read.hs
|
bsd-3-clause
|
-- | Turn a relative path into an absolute path.
--
-- Note: this function duplicates the functionality of makeAbsolute
-- in recent versions of "System.Directory", and can be removed once
-- we no longer need to support older versions of GHC.
makeAbsolute :: FilePath -> IO FilePath
makeAbsolute = fmap FP.normalise . absolutize
where absolutize path
| FP.isRelative path = fmap (FP.</> path) getCurrentDirectory
| otherwise = return path
-- | Find the complete path for the executable
| 524 |
makeAbsolute :: FilePath -> IO FilePath
makeAbsolute = fmap FP.normalise . absolutize
where absolutize path
| FP.isRelative path = fmap (FP.</> path) getCurrentDirectory
| otherwise = return path
-- | Find the complete path for the executable
| 274 |
makeAbsolute = fmap FP.normalise . absolutize
where absolutize path
| FP.isRelative path = fmap (FP.</> path) getCurrentDirectory
| otherwise = return path
-- | Find the complete path for the executable
| 234 | true | true | 0 | 9 | 116 | 77 | 39 | 38 | null | null |
soupi/hablog
|
src/Web/Hablog/Config.hs
|
mit
|
-- | The default is the dark theme
defaultTheme :: (String, Theme)
defaultTheme = ("dark", darkTheme)
| 101 |
defaultTheme :: (String, Theme)
defaultTheme = ("dark", darkTheme)
| 66 |
defaultTheme = ("dark", darkTheme)
| 34 | true | true | 0 | 5 | 15 | 24 | 15 | 9 | null | null |
distrap/ivory-tower-canopen
|
src/CANOpen/Tower/Utils.hs
|
bsd-3-clause
|
objDictRouter :: ObjDict -> ObjDict -> Tower e ObjDict
objDictRouter internal application = do
(objdict_init', objdict_init_local) <- channel
(objdict_get_in', objdict_get_in_local) <- channel
(objdict_get_out_local, objdict_get_out') <- channel
(objdict_set_in', objdict_set_in_local) <- channel
(objdict_set_out_local, objdict_set_out') <- channel
monitor "objdictRouter" $ do
handler objdict_init_local "init" $ do
int <- emitter (objdict_init internal) 1
app <- emitter (objdict_init application) 1
callback $ const $ do
emitV int true
emitV app true
-- proxy get(s)
handler objdict_get_in_local "get_in" $ do
int <- emitter (objdict_get_in internal) 1
app <- emitter (objdict_get_in application) 1
callback $ \mux -> do
address <- mux ~>* addr
ifte_ (address >=? 0x6000) (emit app mux) (emit int mux)
handler (objdict_get_out internal) "get_out_internal" $ do
merged_get_out <- emitter objdict_get_out_local 1
callback $ emit merged_get_out
handler (objdict_get_out application) "get_out_app" $ do
merged_get_out <- emitter objdict_get_out_local 1
callback $ emit merged_get_out
-- proxy set(s)
handler objdict_set_in_local "set_in" $ do
int <- emitter (objdict_set_in internal) 1
app <- emitter (objdict_set_in application) 1
callback $ \mp -> do
address <- mp ~> mp_mux ~>* addr
ifte_ (address >=? 0x6000) (emit app mp) (emit int mp)
handler (objdict_set_out internal) "get_out_internal" $ do
merged_set_out <- emitter objdict_set_out_local 1
callback $ emit merged_set_out
handler (objdict_set_out application) "get_out_app" $ do
merged_set_out <- emitter objdict_set_out_local 1
callback $ emit merged_set_out
return $ ObjDict {
objdict_init = objdict_init'
, objdict_get_in = objdict_get_in'
, objdict_get_out = objdict_get_out'
, objdict_set_in = objdict_set_in'
, objdict_set_out = objdict_set_out'
}
| 2,046 |
objDictRouter :: ObjDict -> ObjDict -> Tower e ObjDict
objDictRouter internal application = do
(objdict_init', objdict_init_local) <- channel
(objdict_get_in', objdict_get_in_local) <- channel
(objdict_get_out_local, objdict_get_out') <- channel
(objdict_set_in', objdict_set_in_local) <- channel
(objdict_set_out_local, objdict_set_out') <- channel
monitor "objdictRouter" $ do
handler objdict_init_local "init" $ do
int <- emitter (objdict_init internal) 1
app <- emitter (objdict_init application) 1
callback $ const $ do
emitV int true
emitV app true
-- proxy get(s)
handler objdict_get_in_local "get_in" $ do
int <- emitter (objdict_get_in internal) 1
app <- emitter (objdict_get_in application) 1
callback $ \mux -> do
address <- mux ~>* addr
ifte_ (address >=? 0x6000) (emit app mux) (emit int mux)
handler (objdict_get_out internal) "get_out_internal" $ do
merged_get_out <- emitter objdict_get_out_local 1
callback $ emit merged_get_out
handler (objdict_get_out application) "get_out_app" $ do
merged_get_out <- emitter objdict_get_out_local 1
callback $ emit merged_get_out
-- proxy set(s)
handler objdict_set_in_local "set_in" $ do
int <- emitter (objdict_set_in internal) 1
app <- emitter (objdict_set_in application) 1
callback $ \mp -> do
address <- mp ~> mp_mux ~>* addr
ifte_ (address >=? 0x6000) (emit app mp) (emit int mp)
handler (objdict_set_out internal) "get_out_internal" $ do
merged_set_out <- emitter objdict_set_out_local 1
callback $ emit merged_set_out
handler (objdict_set_out application) "get_out_app" $ do
merged_set_out <- emitter objdict_set_out_local 1
callback $ emit merged_set_out
return $ ObjDict {
objdict_init = objdict_init'
, objdict_get_in = objdict_get_in'
, objdict_get_out = objdict_get_out'
, objdict_set_in = objdict_set_in'
, objdict_set_out = objdict_set_out'
}
| 2,046 |
objDictRouter internal application = do
(objdict_init', objdict_init_local) <- channel
(objdict_get_in', objdict_get_in_local) <- channel
(objdict_get_out_local, objdict_get_out') <- channel
(objdict_set_in', objdict_set_in_local) <- channel
(objdict_set_out_local, objdict_set_out') <- channel
monitor "objdictRouter" $ do
handler objdict_init_local "init" $ do
int <- emitter (objdict_init internal) 1
app <- emitter (objdict_init application) 1
callback $ const $ do
emitV int true
emitV app true
-- proxy get(s)
handler objdict_get_in_local "get_in" $ do
int <- emitter (objdict_get_in internal) 1
app <- emitter (objdict_get_in application) 1
callback $ \mux -> do
address <- mux ~>* addr
ifte_ (address >=? 0x6000) (emit app mux) (emit int mux)
handler (objdict_get_out internal) "get_out_internal" $ do
merged_get_out <- emitter objdict_get_out_local 1
callback $ emit merged_get_out
handler (objdict_get_out application) "get_out_app" $ do
merged_get_out <- emitter objdict_get_out_local 1
callback $ emit merged_get_out
-- proxy set(s)
handler objdict_set_in_local "set_in" $ do
int <- emitter (objdict_set_in internal) 1
app <- emitter (objdict_set_in application) 1
callback $ \mp -> do
address <- mp ~> mp_mux ~>* addr
ifte_ (address >=? 0x6000) (emit app mp) (emit int mp)
handler (objdict_set_out internal) "get_out_internal" $ do
merged_set_out <- emitter objdict_set_out_local 1
callback $ emit merged_set_out
handler (objdict_set_out application) "get_out_app" $ do
merged_set_out <- emitter objdict_set_out_local 1
callback $ emit merged_set_out
return $ ObjDict {
objdict_init = objdict_init'
, objdict_get_in = objdict_get_in'
, objdict_get_out = objdict_get_out'
, objdict_set_in = objdict_set_in'
, objdict_set_out = objdict_set_out'
}
| 1,991 | false | true | 0 | 19 | 465 | 597 | 278 | 319 | null | null |
pparkkin/eta
|
compiler/ETA/Main/DynFlags.hs
|
bsd-3-clause
|
defaultDynFlags :: Settings -> DynFlags
defaultDynFlags mySettings =
-- See Note [Updating flag description in the User's Guide]
DynFlags {
ghcMode = CompManager,
ghcLink = LinkBinary,
hscTarget = defaultHscTarget (sTargetPlatform mySettings),
sigOf = NotSigOf,
verbosity = 0,
optLevel = 0,
simplPhases = 2,
maxSimplIterations = 4,
ruleCheck = Nothing,
maxRelevantBinds = Just 6,
simplTickFactor = 100,
specConstrThreshold = Just 2000,
specConstrCount = Just 3,
specConstrRecursive = 3,
liberateCaseThreshold = Just 2000,
floatLamArgs = Just 0, -- Default: float only if no fvs
historySize = 20,
strictnessBefore = [],
parMakeCount = Just 1,
enableTimeStats = False,
ghcHeapSize = Nothing,
cmdlineHcIncludes = [],
importPaths = ["."],
mainModIs = mAIN,
mainFunIs = Nothing,
ctxtStkDepth = mAX_CONTEXT_REDUCTION_DEPTH,
tyFunStkDepth = mAX_TYPE_FUNCTION_REDUCTION_DEPTH,
thisInstalledUnitId = toInstalledUnitId mainUnitId,
thisUnitIdInsts_ = Nothing,
thisComponentId_ = Nothing,
objectDir = Nothing,
dylibInstallName = Nothing,
hiDir = Nothing,
stubDir = Nothing,
dumpDir = Nothing,
objectSuf = phaseInputExt StopLn,
hcSuf = phaseInputExt HCc,
hiSuf = "hi",
canGenerateDynamicToo = panic "defaultDynFlags: No canGenerateDynamicToo",
dynObjectSuf = "dyn_" ++ phaseInputExt StopLn,
dynHiSuf = "dyn_hi",
dllSplitFile = Nothing,
dllSplit = Nothing,
pluginModNames = [],
pluginModNameOpts = [],
hooks = emptyHooks,
outputFile = Nothing,
dynOutputFile = Nothing,
outputHi = Nothing,
dynLibLoader = SystemDependent,
dumpPrefix = Nothing,
dumpPrefixForce = Nothing,
ldInputs = [],
classPaths = [],
jarInputs = [],
includePaths = [],
libraryPaths = [],
frameworkPaths = [],
cmdlineFrameworks = [],
rtsOpts = Nothing,
rtsOptsEnabled = RtsOptsSafeOnly,
hpcDir = ".hpc",
packageDBFlags = [],
packageFlags = [],
pluginPackageFlags = [],
ignorePackageFlags = [],
trustFlags = [],
packageEnv = Nothing,
pkgDatabase = Nothing,
-- This gets filled in with GHC.setSessionDynFlags
pkgState = emptyPackageState,
ways = defaultWays mySettings,
buildTag = mkBuildTag (defaultWays mySettings),
rtsBuildTag = mkBuildTag (defaultWays mySettings),
splitInfo = Nothing,
settings = mySettings,
-- ghc -M values
depMakefile = "Makefile",
depIncludePkgDeps = False,
depExcludeMods = [],
depSuffixes = [],
-- end of ghc -M values
nextTempSuffix = panic "defaultDynFlags: No nextTempSuffix",
filesToClean = panic "defaultDynFlags: No filesToClean",
dirsToClean = panic "defaultDynFlags: No dirsToClean",
filesToNotIntermediateClean = panic "defaultDynFlags: No filesToNotIntermediateClean",
generatedDumps = panic "defaultDynFlags: No generatedDumps",
haddockOptions = Nothing,
dumpFlags = IntSet.empty,
generalFlags = IntSet.fromList (map fromEnum (defaultFlags mySettings)),
warningFlags = IntSet.fromList (map fromEnum standardWarnings),
ghciScripts = [],
language = Nothing,
safeHaskell = Sf_None,
safeInfer = True,
safeInferred = True,
thOnLoc = noSrcSpan,
newDerivOnLoc = noSrcSpan,
overlapInstLoc = noSrcSpan,
incoherentOnLoc = noSrcSpan,
pkgTrustOnLoc = noSrcSpan,
warnSafeOnLoc = noSrcSpan,
warnUnsafeOnLoc = noSrcSpan,
trustworthyOnLoc = noSrcSpan,
extensions = [],
extensionFlags = flattenExtensionFlags Nothing [],
-- The ufCreationThreshold threshold must be reasonably high to
-- take account of possible discounts.
-- E.g. 450 is not enough in 'fulsom' for Interval.sqr to inline
-- into Csg.calc (The unfolding for sqr never makes it into the
-- interface file.)
ufCreationThreshold = 750,
ufUseThreshold = 60,
ufFunAppDiscount = 60,
-- Be fairly keen to inline a fuction if that means
-- we'll be able to pick the right method from a dictionary
ufDictDiscount = 30,
ufKeenessFactor = 1.5,
ufDearOp = 40,
maxWorkerArgs = 10,
ghciHistSize = 50, -- keep a log of length 50 by default
log_action = defaultLogAction,
flushOut = defaultFlushOut,
flushErr = defaultFlushErr,
pprUserLength = 5,
pprCols = 100,
useUnicode = False,
traceLevel = 1,
profAuto = NoProfAuto,
llvmVersion = panic "defaultDynFlags: No llvmVersion",
interactivePrint = Nothing,
nextWrapperNum = panic "defaultDynFlags: No nextWrapperNum",
sseVersion = Nothing,
avx = False,
avx2 = False,
avx512cd = False,
avx512er = False,
avx512f = False,
avx512pf = False,
rtldInfo = panic "defaultDynFlags: no rtldInfo",
rtccInfo = panic "defaultDynFlags: no rtccInfo",
maxInlineAllocSize = 128,
maxInlineMemcpyInsns = 32,
maxInlineMemsetInsns = 32,
metrics = panic "defaultDynFlags: No metrics"
}
| 6,532 |
defaultDynFlags :: Settings -> DynFlags
defaultDynFlags mySettings =
-- See Note [Updating flag description in the User's Guide]
DynFlags {
ghcMode = CompManager,
ghcLink = LinkBinary,
hscTarget = defaultHscTarget (sTargetPlatform mySettings),
sigOf = NotSigOf,
verbosity = 0,
optLevel = 0,
simplPhases = 2,
maxSimplIterations = 4,
ruleCheck = Nothing,
maxRelevantBinds = Just 6,
simplTickFactor = 100,
specConstrThreshold = Just 2000,
specConstrCount = Just 3,
specConstrRecursive = 3,
liberateCaseThreshold = Just 2000,
floatLamArgs = Just 0, -- Default: float only if no fvs
historySize = 20,
strictnessBefore = [],
parMakeCount = Just 1,
enableTimeStats = False,
ghcHeapSize = Nothing,
cmdlineHcIncludes = [],
importPaths = ["."],
mainModIs = mAIN,
mainFunIs = Nothing,
ctxtStkDepth = mAX_CONTEXT_REDUCTION_DEPTH,
tyFunStkDepth = mAX_TYPE_FUNCTION_REDUCTION_DEPTH,
thisInstalledUnitId = toInstalledUnitId mainUnitId,
thisUnitIdInsts_ = Nothing,
thisComponentId_ = Nothing,
objectDir = Nothing,
dylibInstallName = Nothing,
hiDir = Nothing,
stubDir = Nothing,
dumpDir = Nothing,
objectSuf = phaseInputExt StopLn,
hcSuf = phaseInputExt HCc,
hiSuf = "hi",
canGenerateDynamicToo = panic "defaultDynFlags: No canGenerateDynamicToo",
dynObjectSuf = "dyn_" ++ phaseInputExt StopLn,
dynHiSuf = "dyn_hi",
dllSplitFile = Nothing,
dllSplit = Nothing,
pluginModNames = [],
pluginModNameOpts = [],
hooks = emptyHooks,
outputFile = Nothing,
dynOutputFile = Nothing,
outputHi = Nothing,
dynLibLoader = SystemDependent,
dumpPrefix = Nothing,
dumpPrefixForce = Nothing,
ldInputs = [],
classPaths = [],
jarInputs = [],
includePaths = [],
libraryPaths = [],
frameworkPaths = [],
cmdlineFrameworks = [],
rtsOpts = Nothing,
rtsOptsEnabled = RtsOptsSafeOnly,
hpcDir = ".hpc",
packageDBFlags = [],
packageFlags = [],
pluginPackageFlags = [],
ignorePackageFlags = [],
trustFlags = [],
packageEnv = Nothing,
pkgDatabase = Nothing,
-- This gets filled in with GHC.setSessionDynFlags
pkgState = emptyPackageState,
ways = defaultWays mySettings,
buildTag = mkBuildTag (defaultWays mySettings),
rtsBuildTag = mkBuildTag (defaultWays mySettings),
splitInfo = Nothing,
settings = mySettings,
-- ghc -M values
depMakefile = "Makefile",
depIncludePkgDeps = False,
depExcludeMods = [],
depSuffixes = [],
-- end of ghc -M values
nextTempSuffix = panic "defaultDynFlags: No nextTempSuffix",
filesToClean = panic "defaultDynFlags: No filesToClean",
dirsToClean = panic "defaultDynFlags: No dirsToClean",
filesToNotIntermediateClean = panic "defaultDynFlags: No filesToNotIntermediateClean",
generatedDumps = panic "defaultDynFlags: No generatedDumps",
haddockOptions = Nothing,
dumpFlags = IntSet.empty,
generalFlags = IntSet.fromList (map fromEnum (defaultFlags mySettings)),
warningFlags = IntSet.fromList (map fromEnum standardWarnings),
ghciScripts = [],
language = Nothing,
safeHaskell = Sf_None,
safeInfer = True,
safeInferred = True,
thOnLoc = noSrcSpan,
newDerivOnLoc = noSrcSpan,
overlapInstLoc = noSrcSpan,
incoherentOnLoc = noSrcSpan,
pkgTrustOnLoc = noSrcSpan,
warnSafeOnLoc = noSrcSpan,
warnUnsafeOnLoc = noSrcSpan,
trustworthyOnLoc = noSrcSpan,
extensions = [],
extensionFlags = flattenExtensionFlags Nothing [],
-- The ufCreationThreshold threshold must be reasonably high to
-- take account of possible discounts.
-- E.g. 450 is not enough in 'fulsom' for Interval.sqr to inline
-- into Csg.calc (The unfolding for sqr never makes it into the
-- interface file.)
ufCreationThreshold = 750,
ufUseThreshold = 60,
ufFunAppDiscount = 60,
-- Be fairly keen to inline a fuction if that means
-- we'll be able to pick the right method from a dictionary
ufDictDiscount = 30,
ufKeenessFactor = 1.5,
ufDearOp = 40,
maxWorkerArgs = 10,
ghciHistSize = 50, -- keep a log of length 50 by default
log_action = defaultLogAction,
flushOut = defaultFlushOut,
flushErr = defaultFlushErr,
pprUserLength = 5,
pprCols = 100,
useUnicode = False,
traceLevel = 1,
profAuto = NoProfAuto,
llvmVersion = panic "defaultDynFlags: No llvmVersion",
interactivePrint = Nothing,
nextWrapperNum = panic "defaultDynFlags: No nextWrapperNum",
sseVersion = Nothing,
avx = False,
avx2 = False,
avx512cd = False,
avx512er = False,
avx512f = False,
avx512pf = False,
rtldInfo = panic "defaultDynFlags: no rtldInfo",
rtccInfo = panic "defaultDynFlags: no rtccInfo",
maxInlineAllocSize = 128,
maxInlineMemcpyInsns = 32,
maxInlineMemsetInsns = 32,
metrics = panic "defaultDynFlags: No metrics"
}
| 6,532 |
defaultDynFlags mySettings =
-- See Note [Updating flag description in the User's Guide]
DynFlags {
ghcMode = CompManager,
ghcLink = LinkBinary,
hscTarget = defaultHscTarget (sTargetPlatform mySettings),
sigOf = NotSigOf,
verbosity = 0,
optLevel = 0,
simplPhases = 2,
maxSimplIterations = 4,
ruleCheck = Nothing,
maxRelevantBinds = Just 6,
simplTickFactor = 100,
specConstrThreshold = Just 2000,
specConstrCount = Just 3,
specConstrRecursive = 3,
liberateCaseThreshold = Just 2000,
floatLamArgs = Just 0, -- Default: float only if no fvs
historySize = 20,
strictnessBefore = [],
parMakeCount = Just 1,
enableTimeStats = False,
ghcHeapSize = Nothing,
cmdlineHcIncludes = [],
importPaths = ["."],
mainModIs = mAIN,
mainFunIs = Nothing,
ctxtStkDepth = mAX_CONTEXT_REDUCTION_DEPTH,
tyFunStkDepth = mAX_TYPE_FUNCTION_REDUCTION_DEPTH,
thisInstalledUnitId = toInstalledUnitId mainUnitId,
thisUnitIdInsts_ = Nothing,
thisComponentId_ = Nothing,
objectDir = Nothing,
dylibInstallName = Nothing,
hiDir = Nothing,
stubDir = Nothing,
dumpDir = Nothing,
objectSuf = phaseInputExt StopLn,
hcSuf = phaseInputExt HCc,
hiSuf = "hi",
canGenerateDynamicToo = panic "defaultDynFlags: No canGenerateDynamicToo",
dynObjectSuf = "dyn_" ++ phaseInputExt StopLn,
dynHiSuf = "dyn_hi",
dllSplitFile = Nothing,
dllSplit = Nothing,
pluginModNames = [],
pluginModNameOpts = [],
hooks = emptyHooks,
outputFile = Nothing,
dynOutputFile = Nothing,
outputHi = Nothing,
dynLibLoader = SystemDependent,
dumpPrefix = Nothing,
dumpPrefixForce = Nothing,
ldInputs = [],
classPaths = [],
jarInputs = [],
includePaths = [],
libraryPaths = [],
frameworkPaths = [],
cmdlineFrameworks = [],
rtsOpts = Nothing,
rtsOptsEnabled = RtsOptsSafeOnly,
hpcDir = ".hpc",
packageDBFlags = [],
packageFlags = [],
pluginPackageFlags = [],
ignorePackageFlags = [],
trustFlags = [],
packageEnv = Nothing,
pkgDatabase = Nothing,
-- This gets filled in with GHC.setSessionDynFlags
pkgState = emptyPackageState,
ways = defaultWays mySettings,
buildTag = mkBuildTag (defaultWays mySettings),
rtsBuildTag = mkBuildTag (defaultWays mySettings),
splitInfo = Nothing,
settings = mySettings,
-- ghc -M values
depMakefile = "Makefile",
depIncludePkgDeps = False,
depExcludeMods = [],
depSuffixes = [],
-- end of ghc -M values
nextTempSuffix = panic "defaultDynFlags: No nextTempSuffix",
filesToClean = panic "defaultDynFlags: No filesToClean",
dirsToClean = panic "defaultDynFlags: No dirsToClean",
filesToNotIntermediateClean = panic "defaultDynFlags: No filesToNotIntermediateClean",
generatedDumps = panic "defaultDynFlags: No generatedDumps",
haddockOptions = Nothing,
dumpFlags = IntSet.empty,
generalFlags = IntSet.fromList (map fromEnum (defaultFlags mySettings)),
warningFlags = IntSet.fromList (map fromEnum standardWarnings),
ghciScripts = [],
language = Nothing,
safeHaskell = Sf_None,
safeInfer = True,
safeInferred = True,
thOnLoc = noSrcSpan,
newDerivOnLoc = noSrcSpan,
overlapInstLoc = noSrcSpan,
incoherentOnLoc = noSrcSpan,
pkgTrustOnLoc = noSrcSpan,
warnSafeOnLoc = noSrcSpan,
warnUnsafeOnLoc = noSrcSpan,
trustworthyOnLoc = noSrcSpan,
extensions = [],
extensionFlags = flattenExtensionFlags Nothing [],
-- The ufCreationThreshold threshold must be reasonably high to
-- take account of possible discounts.
-- E.g. 450 is not enough in 'fulsom' for Interval.sqr to inline
-- into Csg.calc (The unfolding for sqr never makes it into the
-- interface file.)
ufCreationThreshold = 750,
ufUseThreshold = 60,
ufFunAppDiscount = 60,
-- Be fairly keen to inline a fuction if that means
-- we'll be able to pick the right method from a dictionary
ufDictDiscount = 30,
ufKeenessFactor = 1.5,
ufDearOp = 40,
maxWorkerArgs = 10,
ghciHistSize = 50, -- keep a log of length 50 by default
log_action = defaultLogAction,
flushOut = defaultFlushOut,
flushErr = defaultFlushErr,
pprUserLength = 5,
pprCols = 100,
useUnicode = False,
traceLevel = 1,
profAuto = NoProfAuto,
llvmVersion = panic "defaultDynFlags: No llvmVersion",
interactivePrint = Nothing,
nextWrapperNum = panic "defaultDynFlags: No nextWrapperNum",
sseVersion = Nothing,
avx = False,
avx2 = False,
avx512cd = False,
avx512er = False,
avx512f = False,
avx512pf = False,
rtldInfo = panic "defaultDynFlags: no rtldInfo",
rtccInfo = panic "defaultDynFlags: no rtccInfo",
maxInlineAllocSize = 128,
maxInlineMemcpyInsns = 32,
maxInlineMemsetInsns = 32,
metrics = panic "defaultDynFlags: No metrics"
}
| 6,492 | false | true | 0 | 11 | 2,683 | 1,024 | 640 | 384 | null | null |
snoyberg/ghc
|
libraries/base/GHC/IO/Handle.hs
|
bsd-3-clause
|
-- ---------------------------------------------------------------------------
-- hSeek
{- Note:
- when seeking using `SeekFromEnd', positive offsets (>=0) means
seeking at or past EOF.
- we possibly deviate from the report on the issue of seeking within
the buffer and whether to flush it or not. The report isn't exactly
clear here.
-}
-- | Computation 'hSeek' @hdl mode i@ sets the position of handle
-- @hdl@ depending on @mode@.
-- The offset @i@ is given in terms of 8-bit bytes.
--
-- If @hdl@ is block- or line-buffered, then seeking to a position which is not
-- in the current buffer will first cause any items in the output buffer to be
-- written to the device, and then cause the input buffer to be discarded.
-- Some handles may not be seekable (see 'hIsSeekable'), or only support a
-- subset of the possible positioning operations (for instance, it may only
-- be possible to seek to the end of a tape, or to a positive offset from
-- the beginning or current position).
-- It is not possible to set a negative I\/O position, or for
-- a physical file, an I\/O position beyond the current end-of-file.
--
-- This operation may fail with:
--
-- * 'isIllegalOperationError' if the Handle is not seekable, or does
-- not support the requested seek mode.
--
-- * 'isPermissionError' if a system resource limit would be exceeded.
hSeek :: Handle -> SeekMode -> Integer -> IO ()
hSeek handle mode offset =
wantSeekableHandle "hSeek" handle $ \ handle_@Handle__{..} -> do
debugIO ("hSeek " ++ show (mode,offset))
buf <- readIORef haCharBuffer
if isWriteBuffer buf
then do flushWriteBuffer handle_
IODevice.seek haDevice mode offset
else do
let r = bufL buf; w = bufR buf
if mode == RelativeSeek && isNothing haDecoder &&
offset >= 0 && offset < fromIntegral (w - r)
then writeIORef haCharBuffer buf{ bufL = r + fromIntegral offset }
else do
flushCharReadBuffer handle_
flushByteReadBuffer handle_
IODevice.seek haDevice mode offset
-- | Computation 'hTell' @hdl@ returns the current position of the
-- handle @hdl@, as the number of bytes from the beginning of
-- the file. The value returned may be subsequently passed to
-- 'hSeek' to reposition the handle to the current position.
--
-- This operation may fail with:
--
-- * 'isIllegalOperationError' if the Handle is not seekable.
--
| 2,416 |
hSeek :: Handle -> SeekMode -> Integer -> IO ()
hSeek handle mode offset =
wantSeekableHandle "hSeek" handle $ \ handle_@Handle__{..} -> do
debugIO ("hSeek " ++ show (mode,offset))
buf <- readIORef haCharBuffer
if isWriteBuffer buf
then do flushWriteBuffer handle_
IODevice.seek haDevice mode offset
else do
let r = bufL buf; w = bufR buf
if mode == RelativeSeek && isNothing haDecoder &&
offset >= 0 && offset < fromIntegral (w - r)
then writeIORef haCharBuffer buf{ bufL = r + fromIntegral offset }
else do
flushCharReadBuffer handle_
flushByteReadBuffer handle_
IODevice.seek haDevice mode offset
-- | Computation 'hTell' @hdl@ returns the current position of the
-- handle @hdl@, as the number of bytes from the beginning of
-- the file. The value returned may be subsequently passed to
-- 'hSeek' to reposition the handle to the current position.
--
-- This operation may fail with:
--
-- * 'isIllegalOperationError' if the Handle is not seekable.
--
| 1,053 |
hSeek handle mode offset =
wantSeekableHandle "hSeek" handle $ \ handle_@Handle__{..} -> do
debugIO ("hSeek " ++ show (mode,offset))
buf <- readIORef haCharBuffer
if isWriteBuffer buf
then do flushWriteBuffer handle_
IODevice.seek haDevice mode offset
else do
let r = bufL buf; w = bufR buf
if mode == RelativeSeek && isNothing haDecoder &&
offset >= 0 && offset < fromIntegral (w - r)
then writeIORef haCharBuffer buf{ bufL = r + fromIntegral offset }
else do
flushCharReadBuffer handle_
flushByteReadBuffer handle_
IODevice.seek haDevice mode offset
-- | Computation 'hTell' @hdl@ returns the current position of the
-- handle @hdl@, as the number of bytes from the beginning of
-- the file. The value returned may be subsequently passed to
-- 'hSeek' to reposition the handle to the current position.
--
-- This operation may fail with:
--
-- * 'isIllegalOperationError' if the Handle is not seekable.
--
| 1,005 | true | true | 0 | 18 | 508 | 267 | 143 | 124 | null | null |
DNNX/trurl
|
src/Trurl.hs
|
bsd-3-clause
|
mkJsonContext :: Monad m => String -> MuContext m
mkJsonContext =
maybe mkEmptyContext jsonValueContext . decode . BLC8.pack
| 126 |
mkJsonContext :: Monad m => String -> MuContext m
mkJsonContext =
maybe mkEmptyContext jsonValueContext . decode . BLC8.pack
| 126 |
mkJsonContext =
maybe mkEmptyContext jsonValueContext . decode . BLC8.pack
| 76 | false | true | 0 | 7 | 19 | 40 | 19 | 21 | null | null |
rubenpieters/gre-project
|
shared/src/Card.hs
|
bsd-3-clause
|
addAP a = singleton $ AddAP a
| 29 |
addAP a = singleton $ AddAP a
| 29 |
addAP a = singleton $ AddAP a
| 29 | false | false | 0 | 6 | 6 | 16 | 7 | 9 | null | null |
phischu/fragnix
|
tests/packages/scotty/Network.Socket.ByteString.hs
|
bsd-3-clause
|
sendTo :: Socket -- ^ Socket
-> ByteString -- ^ Data to send
-> SockAddr -- ^ Recipient address
-> IO Int -- ^ Number of bytes sent
sendTo sock xs addr =
unsafeUseAsCStringLen xs $ \(str, len) -> sendBufTo sock str len addr
| 262 |
sendTo :: Socket -- ^ Socket
-> ByteString -- ^ Data to send
-> SockAddr -- ^ Recipient address
-> IO Int
sendTo sock xs addr =
unsafeUseAsCStringLen xs $ \(str, len) -> sendBufTo sock str len addr
| 231 |
sendTo sock xs addr =
unsafeUseAsCStringLen xs $ \(str, len) -> sendBufTo sock str len addr
| 95 | true | true | 0 | 8 | 82 | 64 | 34 | 30 | null | null |
bacchanalia/KitchenSink
|
KitchenSink/Qualified.hs
|
gpl-3.0
|
-- |'VFM.enumFromStepN'
vfm_enumFromStepN = VFM.enumFromStepN
| 61 |
vfm_enumFromStepN = VFM.enumFromStepN
| 37 |
vfm_enumFromStepN = VFM.enumFromStepN
| 37 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
amar47shah/bank-ocr
|
src/Parser.hs
|
mit
|
check :: Number -> Bool
check = (== 0)
. (`mod` 11)
. toInteger
. sum
. zipWith (*) [9,8..1]
. map digitToInt
. chars
. digits
| 168 |
check :: Number -> Bool
check = (== 0)
. (`mod` 11)
. toInteger
. sum
. zipWith (*) [9,8..1]
. map digitToInt
. chars
. digits
| 168 |
check = (== 0)
. (`mod` 11)
. toInteger
. sum
. zipWith (*) [9,8..1]
. map digitToInt
. chars
. digits
| 144 | false | true | 0 | 12 | 68 | 71 | 40 | 31 | null | null |
haskell-opengl/OpenGLRaw
|
src/Graphics/GL/Functions/F20.hs
|
bsd-3-clause
|
ptr_glProgramLocalParameter4fvARB :: FunPtr (GLenum -> GLuint -> Ptr GLfloat -> IO ())
ptr_glProgramLocalParameter4fvARB = unsafePerformIO $ getCommand "glProgramLocalParameter4fvARB"
| 183 |
ptr_glProgramLocalParameter4fvARB :: FunPtr (GLenum -> GLuint -> Ptr GLfloat -> IO ())
ptr_glProgramLocalParameter4fvARB = unsafePerformIO $ getCommand "glProgramLocalParameter4fvARB"
| 183 |
ptr_glProgramLocalParameter4fvARB = unsafePerformIO $ getCommand "glProgramLocalParameter4fvARB"
| 96 | false | true | 0 | 11 | 17 | 44 | 21 | 23 | null | null |
herngyi/hmol
|
NucleicAcids.hs
|
gpl-3.0
|
purine_N = rotate3D (Vector 0 0 1) (-7*pi/30) penta_flat_N_sp3
| 66 |
purine_N = rotate3D (Vector 0 0 1) (-7*pi/30) penta_flat_N_sp3
| 66 |
purine_N = rotate3D (Vector 0 0 1) (-7*pi/30) penta_flat_N_sp3
| 66 | false | false | 0 | 9 | 12 | 36 | 18 | 18 | null | null |
mfine/ghc
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
-- | Check whether to use unicode syntax for output
useUnicodeSyntax :: DynFlags -> Bool
useUnicodeSyntax = gopt Opt_PrintUnicodeSyntax
| 135 |
useUnicodeSyntax :: DynFlags -> Bool
useUnicodeSyntax = gopt Opt_PrintUnicodeSyntax
| 83 |
useUnicodeSyntax = gopt Opt_PrintUnicodeSyntax
| 46 | true | true | 0 | 5 | 18 | 19 | 10 | 9 | null | null |
ethanpailes/bbc
|
src/Parse.hs
|
bsd-3-clause
|
lexeme :: Parser a -> Parser a
lexeme = L.lexeme sc
| 51 |
lexeme :: Parser a -> Parser a
lexeme = L.lexeme sc
| 51 |
lexeme = L.lexeme sc
| 20 | false | true | 0 | 6 | 10 | 26 | 12 | 14 | null | null |
tonyday567/sfold
|
sfold/src/SFold/Util.hs
|
mit
|
orMaybe :: (a -> b) -> (a -> a -> b) -> Maybe a -> Maybe a -> Maybe b
orMaybe unif binf x x' =
case x of
Nothing ->
case x' of
Nothing -> Nothing
Just v' -> Just $ unif v'
Just v ->
case x' of
Nothing -> Just $ unif v
Just v' -> Just (binf v v')
| 299 |
orMaybe :: (a -> b) -> (a -> a -> b) -> Maybe a -> Maybe a -> Maybe b
orMaybe unif binf x x' =
case x of
Nothing ->
case x' of
Nothing -> Nothing
Just v' -> Just $ unif v'
Just v ->
case x' of
Nothing -> Just $ unif v
Just v' -> Just (binf v v')
| 299 |
orMaybe unif binf x x' =
case x of
Nothing ->
case x' of
Nothing -> Nothing
Just v' -> Just $ unif v'
Just v ->
case x' of
Nothing -> Just $ unif v
Just v' -> Just (binf v v')
| 229 | false | true | 0 | 13 | 116 | 145 | 69 | 76 | null | null |
badp/ganeti
|
src/Ganeti/Confd/Server.hs
|
gpl-2.0
|
buildResponse cdata req@(ConfdRequest { confdRqType = ReqNodeInstances }) = do
let cfg = fst cdata
node_name <- case confdRqQuery req of
PlainQuery str -> return str
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
node <-
case getNode cfg node_name of
Ok n -> return n
Bad e -> fail $ "Node not found in the configuration: " ++ show e
let node_uuid = nodeUuid node
instances = getNodeInstances cfg node_uuid
return (ReplyStatusOk, J.showJSON instances)
-- | Creates a ConfdReply from a given answer.
| 577 |
buildResponse cdata req@(ConfdRequest { confdRqType = ReqNodeInstances }) = do
let cfg = fst cdata
node_name <- case confdRqQuery req of
PlainQuery str -> return str
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
node <-
case getNode cfg node_name of
Ok n -> return n
Bad e -> fail $ "Node not found in the configuration: " ++ show e
let node_uuid = nodeUuid node
instances = getNodeInstances cfg node_uuid
return (ReplyStatusOk, J.showJSON instances)
-- | Creates a ConfdReply from a given answer.
| 577 |
buildResponse cdata req@(ConfdRequest { confdRqType = ReqNodeInstances }) = do
let cfg = fst cdata
node_name <- case confdRqQuery req of
PlainQuery str -> return str
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
node <-
case getNode cfg node_name of
Ok n -> return n
Bad e -> fail $ "Node not found in the configuration: " ++ show e
let node_uuid = nodeUuid node
instances = getNodeInstances cfg node_uuid
return (ReplyStatusOk, J.showJSON instances)
-- | Creates a ConfdReply from a given answer.
| 577 | false | false | 0 | 14 | 152 | 175 | 81 | 94 | null | null |
DavidAlphaFox/ghc
|
libraries/terminfo/System/Console/Terminfo/Base.hs
|
bsd-3-clause
|
tiGetOutput :: String -> Capability ([Int] -> LinesAffected -> TermOutput)
tiGetOutput cap = do
str <- tiGetStr cap
f <- tParm str
return $ \ps la -> fromStr la $ f ps
| 179 |
tiGetOutput :: String -> Capability ([Int] -> LinesAffected -> TermOutput)
tiGetOutput cap = do
str <- tiGetStr cap
f <- tParm str
return $ \ps la -> fromStr la $ f ps
| 179 |
tiGetOutput cap = do
str <- tiGetStr cap
f <- tParm str
return $ \ps la -> fromStr la $ f ps
| 104 | false | true | 0 | 10 | 43 | 79 | 37 | 42 | null | null |
clarissalittler/pi-calculus
|
PureLam.hs
|
mit
|
absParse = paren $ do
symbol "\\"
n <- name
dot
l <- parseLam
return $ Abs n l
| 88 |
absParse = paren $ do
symbol "\\"
n <- name
dot
l <- parseLam
return $ Abs n l
| 88 |
absParse = paren $ do
symbol "\\"
n <- name
dot
l <- parseLam
return $ Abs n l
| 88 | false | false | 1 | 10 | 28 | 49 | 19 | 30 | null | null |
shayan-najd/QHaskell
|
QHaskell/MyPrelude.hs
|
gpl-3.0
|
tpl :: a -> b -> (a , b)
tpl = ((,))
| 36 |
tpl :: a -> b -> (a , b)
tpl = ((,))
| 36 |
tpl = ((,))
| 11 | false | true | 0 | 9 | 11 | 38 | 19 | 19 | null | null |
duplode/stack
|
src/Stack/Types/Version.hs
|
bsd-3-clause
|
versionRangeText :: Cabal.VersionRange -> Text
versionRangeText = T.pack . render . disp
| 88 |
versionRangeText :: Cabal.VersionRange -> Text
versionRangeText = T.pack . render . disp
| 88 |
versionRangeText = T.pack . render . disp
| 41 | false | true | 0 | 7 | 11 | 27 | 14 | 13 | null | null |
music-suite/music-score
|
src/Music/Score/Internal/Util.hs
|
bsd-3-clause
|
-- Replace all contigous ranges of equal values with [Just x, Nothing, Nothing ...]
-- > category: List
-- > depends: base
retainUpdates :: Eq a => [a] -> [Maybe a]
retainUpdates = snd . Data.List.mapAccumL g Nothing where
g Nothing x = (Just x, Just x)
g (Just p) x = (Just x, if p == x then Nothing else Just x)
-- Generic version of 'replicate'.
-- > category: List
-- > depends: base
| 398 |
retainUpdates :: Eq a => [a] -> [Maybe a]
retainUpdates = snd . Data.List.mapAccumL g Nothing where
g Nothing x = (Just x, Just x)
g (Just p) x = (Just x, if p == x then Nothing else Just x)
-- Generic version of 'replicate'.
-- > category: List
-- > depends: base
| 275 |
retainUpdates = snd . Data.List.mapAccumL g Nothing where
g Nothing x = (Just x, Just x)
g (Just p) x = (Just x, if p == x then Nothing else Just x)
-- Generic version of 'replicate'.
-- > category: List
-- > depends: base
| 233 | true | true | 0 | 8 | 86 | 112 | 61 | 51 | null | null |
google/codeworld
|
codeworld-base/src/Extras/Colors.hs
|
apache-2.0
|
byName ("powderblue") = colorNamed' ("#b0e0e6")
| 47 |
byName ("powderblue") = colorNamed' ("#b0e0e6")
| 47 |
byName ("powderblue") = colorNamed' ("#b0e0e6")
| 47 | false | false | 0 | 6 | 4 | 18 | 9 | 9 | null | null |
hpdeifel/dbus-browser
|
src/Main.hs
|
bsd-3-clause
|
showMethod :: Method -> [(Text, Attr)]
showMethod m = (T.append mname ": ", defAttr) : formatMethType True m
where mname = T.pack $ formatMemberName $ methodName m
| 165 |
showMethod :: Method -> [(Text, Attr)]
showMethod m = (T.append mname ": ", defAttr) : formatMethType True m
where mname = T.pack $ formatMemberName $ methodName m
| 165 |
showMethod m = (T.append mname ": ", defAttr) : formatMethType True m
where mname = T.pack $ formatMemberName $ methodName m
| 126 | false | true | 0 | 8 | 28 | 70 | 36 | 34 | null | null |
forked-upstream-packages-for-ghcjs/ghc
|
testsuite/tests/ghc-api/annotations-literals/LiteralsTest.hs
|
bsd-3-clause
|
d :: Double
d = 0.00
| 20 |
d :: Double
d = 0.00
| 20 |
d = 0.00
| 8 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
khibino/haskell-hdbc-tool.201303
|
src/Database/HDBC/RecordJoin.hs
|
bsd-3-clause
|
createRecordToSql :: (a -> [SqlValue]) -> RecordToSql (Record a)
createRecordToSql packF = createRecordToSql' (packF . unRecord)
| 128 |
createRecordToSql :: (a -> [SqlValue]) -> RecordToSql (Record a)
createRecordToSql packF = createRecordToSql' (packF . unRecord)
| 128 |
createRecordToSql packF = createRecordToSql' (packF . unRecord)
| 63 | false | true | 0 | 8 | 15 | 47 | 24 | 23 | null | null |
nevrenato/HetsAlloy
|
Common/Lexer.hs
|
gpl-2.0
|
decEscape :: CharParser st String
decEscape = many1 digit `checkWith` valueCheck 10
| 83 |
decEscape :: CharParser st String
decEscape = many1 digit `checkWith` valueCheck 10
| 83 |
decEscape = many1 digit `checkWith` valueCheck 10
| 49 | false | true | 0 | 6 | 11 | 36 | 16 | 20 | null | null |
spinda/liquidhaskell
|
src/Language/Haskell/Liquid/Desugar710/DsUtils.hs
|
bsd-3-clause
|
-- Functions on MatchResults
matchCanFail :: MatchResult -> Bool
matchCanFail (MatchResult CanFail _) = True
| 110 |
matchCanFail :: MatchResult -> Bool
matchCanFail (MatchResult CanFail _) = True
| 80 |
matchCanFail (MatchResult CanFail _) = True
| 44 | true | true | 0 | 7 | 16 | 27 | 14 | 13 | null | null |
ulricha/algebra-dag
|
src/Database/Algebra/Rewrite/Match.hs
|
bsd-3-clause
|
exposeEnv :: Match o p e (Dag.AlgebraDag o, NodeMap p, e)
exposeEnv = M $ do
env <- ask
return (dag env, propMap env, extras env)
| 133 |
exposeEnv :: Match o p e (Dag.AlgebraDag o, NodeMap p, e)
exposeEnv = M $ do
env <- ask
return (dag env, propMap env, extras env)
| 133 |
exposeEnv = M $ do
env <- ask
return (dag env, propMap env, extras env)
| 75 | false | true | 0 | 10 | 29 | 72 | 35 | 37 | null | null |
clauderichard/Euclaude
|
Main.hs
|
mit
|
mouseMotion :: IORef Polyhandle -> GL.MotionCallback
mouseMotion phandle position = do
phandle GL.$~! polyhandleMove (posFromGL position)
display phandle
| 164 |
mouseMotion :: IORef Polyhandle -> GL.MotionCallback
mouseMotion phandle position = do
phandle GL.$~! polyhandleMove (posFromGL position)
display phandle
| 163 |
mouseMotion phandle position = do
phandle GL.$~! polyhandleMove (posFromGL position)
display phandle
| 110 | false | true | 0 | 11 | 28 | 54 | 23 | 31 | null | null |
nfrisby/yoko
|
Examples/LambdaLift/LambdaLift.hs
|
bsd-2-clause
|
ex5' = lambdaLift [TyUnit] ex5
| 30 |
ex5' = lambdaLift [TyUnit] ex5
| 30 |
ex5' = lambdaLift [TyUnit] ex5
| 30 | false | false | 1 | 5 | 4 | 19 | 7 | 12 | null | null |
olsner/ghc
|
compiler/cmm/CmmUtils.hs
|
bsd-3-clause
|
cmmToWord :: DynFlags -> CmmExpr -> CmmExpr
cmmToWord dflags e
| w == word = e
| otherwise = CmmMachOp (MO_UU_Conv w word) [e]
where
w = cmmExprWidth dflags e
word = wordWidth dflags
---------------------------------------------------
--
-- CmmExpr predicates
--
---------------------------------------------------
| 336 |
cmmToWord :: DynFlags -> CmmExpr -> CmmExpr
cmmToWord dflags e
| w == word = e
| otherwise = CmmMachOp (MO_UU_Conv w word) [e]
where
w = cmmExprWidth dflags e
word = wordWidth dflags
---------------------------------------------------
--
-- CmmExpr predicates
--
---------------------------------------------------
| 336 |
cmmToWord dflags e
| w == word = e
| otherwise = CmmMachOp (MO_UU_Conv w word) [e]
where
w = cmmExprWidth dflags e
word = wordWidth dflags
---------------------------------------------------
--
-- CmmExpr predicates
--
---------------------------------------------------
| 292 | false | true | 2 | 8 | 62 | 86 | 43 | 43 | null | null |
jimpeak/recorder
|
app/Main.hs
|
bsd-3-clause
|
groupResultByTable :: [Result] -> [[Result]]
groupResultByTable = groupBy ( (==) `on` tableName)
| 96 |
groupResultByTable :: [Result] -> [[Result]]
groupResultByTable = groupBy ( (==) `on` tableName)
| 96 |
groupResultByTable = groupBy ( (==) `on` tableName)
| 51 | false | true | 0 | 9 | 11 | 44 | 24 | 20 | null | null |
merc1031/haskell-sonos-http-api
|
src/Sonos/Serve.hs
|
bsd-3-clause
|
joinR :: WS.Path '[Room, Room]
joinR = "join" WS.<//> WS.var WS.<//> WS.var
| 75 |
joinR :: WS.Path '[Room, Room]
joinR = "join" WS.<//> WS.var WS.<//> WS.var
| 75 |
joinR = "join" WS.<//> WS.var WS.<//> WS.var
| 44 | false | true | 0 | 7 | 11 | 40 | 21 | 19 | null | null |
rvion/lamdu
|
test/InferAssert.hs
|
gpl-3.0
|
runCanonizer :: Canonizer a -> a
runCanonizer = flip evalState (emptyVarState, emptyVarState)
| 93 |
runCanonizer :: Canonizer a -> a
runCanonizer = flip evalState (emptyVarState, emptyVarState)
| 93 |
runCanonizer = flip evalState (emptyVarState, emptyVarState)
| 60 | false | true | 0 | 6 | 11 | 29 | 15 | 14 | null | null |
koterpillar/labyrinth
|
testsuite/TestLabyrinth/ShowMove.hs
|
mit
|
simpleAction = oneof [ Go <$> arbitrary
, Shoot <$> arbitrary
, Grenade <$> arbitrary
, return Surrender
]
| 190 |
simpleAction = oneof [ Go <$> arbitrary
, Shoot <$> arbitrary
, Grenade <$> arbitrary
, return Surrender
]
| 190 |
simpleAction = oneof [ Go <$> arbitrary
, Shoot <$> arbitrary
, Grenade <$> arbitrary
, return Surrender
]
| 190 | false | false | 1 | 7 | 102 | 40 | 19 | 21 | null | null |
lynnard/cocos2d-hs
|
src/Graphics/UI/Cocos2d/Layer.hs
|
bsd-3-clause
|
layerGradient_getEndOpacity :: (LayerGradientValue arg'1) => arg'1 -> HoppyP.IO HoppyDW.Word8
layerGradient_getEndOpacity arg'1 =
withLayerGradientPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(layerGradient_getEndOpacity' arg'1')
| 245 |
layerGradient_getEndOpacity :: (LayerGradientValue arg'1) => arg'1 -> HoppyP.IO HoppyDW.Word8
layerGradient_getEndOpacity arg'1 =
withLayerGradientPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(layerGradient_getEndOpacity' arg'1')
| 245 |
layerGradient_getEndOpacity arg'1 =
withLayerGradientPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(layerGradient_getEndOpacity' arg'1')
| 151 | false | true | 0 | 8 | 25 | 63 | 31 | 32 | null | null |
ckaestne/CIDE
|
other/CaseStudies/Arith/orig_armin/lazy-static/Arith.hs
|
gpl-3.0
|
tvBinOp Add (TVString s) (TVDouble y) = Result (TVString (s++show y))
| 69 |
tvBinOp Add (TVString s) (TVDouble y) = Result (TVString (s++show y))
| 69 |
tvBinOp Add (TVString s) (TVDouble y) = Result (TVString (s++show y))
| 69 | false | false | 0 | 10 | 10 | 46 | 21 | 25 | null | null |
tibbe/ghc
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
emitPrimOp dflags [res] GetCCSOfOp [arg]
= emitAssign (CmmLocal res) val
where
val
| gopt Opt_SccProfilingOn dflags = costCentreFrom dflags (cmmUntag dflags arg)
| otherwise = CmmLit (zeroCLit dflags)
| 239 |
emitPrimOp dflags [res] GetCCSOfOp [arg]
= emitAssign (CmmLocal res) val
where
val
| gopt Opt_SccProfilingOn dflags = costCentreFrom dflags (cmmUntag dflags arg)
| otherwise = CmmLit (zeroCLit dflags)
| 239 |
emitPrimOp dflags [res] GetCCSOfOp [arg]
= emitAssign (CmmLocal res) val
where
val
| gopt Opt_SccProfilingOn dflags = costCentreFrom dflags (cmmUntag dflags arg)
| otherwise = CmmLit (zeroCLit dflags)
| 239 | false | false | 2 | 7 | 66 | 79 | 38 | 41 | null | null |
bitemyapp/wreq
|
Network/Wreq/Lens.hs
|
bsd-3-clause
|
-- | A lens onto request authentication.
--
-- Example (note the use of TLS):
--
-- @
--let opts = 'Network.Wreq.defaults' 'Control.Lens.&' 'Lens.auth' 'Control.Lens.?~' 'Network.Wreq.basicAuth' \"user\" \"pass\"
--'Network.Wreq.getWith' opts \"https:\/\/httpbin.org\/basic-auth\/user\/pass\"
-- @
auth :: Lens' Options (Maybe Auth)
auth = TH.auth
| 347 |
auth :: Lens' Options (Maybe Auth)
auth = TH.auth
| 49 |
auth = TH.auth
| 14 | true | true | 0 | 7 | 41 | 32 | 20 | 12 | null | null |
ti1024/hacq
|
examples/adder.hs
|
bsd-3-clause
|
adder :: MonadQuantum w m => Seq w -> Seq (Bit w) -> w -> Bit w -> m ()
adder x y = adderList (Foldable.toList x) (Foldable.toList y)
| 133 |
adder :: MonadQuantum w m => Seq w -> Seq (Bit w) -> w -> Bit w -> m ()
adder x y = adderList (Foldable.toList x) (Foldable.toList y)
| 133 |
adder x y = adderList (Foldable.toList x) (Foldable.toList y)
| 61 | false | true | 0 | 12 | 28 | 88 | 39 | 49 | null | null |
heathweiss/Tricad
|
src/Examples/ShoeLift/KeenHeel.hs
|
gpl-2.0
|
keyTriangles = [FacesBottomFrontTop | x <- [1,2..36]]
|+++^|
keyCubes
| 71 |
keyTriangles = [FacesBottomFrontTop | x <- [1,2..36]]
|+++^|
keyCubes
| 71 |
keyTriangles = [FacesBottomFrontTop | x <- [1,2..36]]
|+++^|
keyCubes
| 71 | false | false | 1 | 8 | 10 | 33 | 17 | 16 | null | null |
themoritz/cabal
|
cabal-install/Distribution/Client/Setup.hs
|
bsd-3-clause
|
listCommand :: CommandUI ListFlags
listCommand = CommandUI {
commandName = "list",
commandSynopsis = "List packages matching a search string.",
commandDescription = Just $ \_ -> wrapText $
"List all packages, or all packages matching one of the search"
++ " strings.\n"
++ "\n"
++ "If there is a sandbox in the current directory and "
++ "config:ignore-sandbox is False, use the sandbox package database. "
++ "Otherwise, use the package database specified with --package-db. "
++ "If not specified, use the user package database.\n",
commandNotes = Just $ \pname ->
"Examples:\n"
++ " " ++ pname ++ " list pandoc\n"
++ " Will find pandoc, pandoc-citeproc, pandoc-lens, ...\n",
commandUsage = usageAlternatives "list" [ "[FLAGS]"
, "[FLAGS] STRINGS"],
commandDefaultFlags = defaultListFlags,
commandOptions = \_ -> [
optionVerbosity listVerbosity (\v flags -> flags { listVerbosity = v })
, option [] ["installed"]
"Only print installed packages"
listInstalled (\v flags -> flags { listInstalled = v })
trueArg
, option [] ["simple-output"]
"Print in a easy-to-parse format"
listSimpleOutput (\v flags -> flags { listSimpleOutput = v })
trueArg
, option "" ["package-db"]
( "Append the given package database to the list of package"
++ " databases used (to satisfy dependencies and register into)."
++ " May be a specific file, 'global' or 'user'. The initial list"
++ " is ['global'], ['global', 'user'], or ['global', $sandbox],"
++ " depending on context. Use 'clear' to reset the list to empty."
++ " See the user guide for details.")
listPackageDBs (\v flags -> flags { listPackageDBs = v })
(reqArg' "DB" readPackageDbList showPackageDbList)
]
}
| 2,038 |
listCommand :: CommandUI ListFlags
listCommand = CommandUI {
commandName = "list",
commandSynopsis = "List packages matching a search string.",
commandDescription = Just $ \_ -> wrapText $
"List all packages, or all packages matching one of the search"
++ " strings.\n"
++ "\n"
++ "If there is a sandbox in the current directory and "
++ "config:ignore-sandbox is False, use the sandbox package database. "
++ "Otherwise, use the package database specified with --package-db. "
++ "If not specified, use the user package database.\n",
commandNotes = Just $ \pname ->
"Examples:\n"
++ " " ++ pname ++ " list pandoc\n"
++ " Will find pandoc, pandoc-citeproc, pandoc-lens, ...\n",
commandUsage = usageAlternatives "list" [ "[FLAGS]"
, "[FLAGS] STRINGS"],
commandDefaultFlags = defaultListFlags,
commandOptions = \_ -> [
optionVerbosity listVerbosity (\v flags -> flags { listVerbosity = v })
, option [] ["installed"]
"Only print installed packages"
listInstalled (\v flags -> flags { listInstalled = v })
trueArg
, option [] ["simple-output"]
"Print in a easy-to-parse format"
listSimpleOutput (\v flags -> flags { listSimpleOutput = v })
trueArg
, option "" ["package-db"]
( "Append the given package database to the list of package"
++ " databases used (to satisfy dependencies and register into)."
++ " May be a specific file, 'global' or 'user'. The initial list"
++ " is ['global'], ['global', 'user'], or ['global', $sandbox],"
++ " depending on context. Use 'clear' to reset the list to empty."
++ " See the user guide for details.")
listPackageDBs (\v flags -> flags { listPackageDBs = v })
(reqArg' "DB" readPackageDbList showPackageDbList)
]
}
| 2,038 |
listCommand = CommandUI {
commandName = "list",
commandSynopsis = "List packages matching a search string.",
commandDescription = Just $ \_ -> wrapText $
"List all packages, or all packages matching one of the search"
++ " strings.\n"
++ "\n"
++ "If there is a sandbox in the current directory and "
++ "config:ignore-sandbox is False, use the sandbox package database. "
++ "Otherwise, use the package database specified with --package-db. "
++ "If not specified, use the user package database.\n",
commandNotes = Just $ \pname ->
"Examples:\n"
++ " " ++ pname ++ " list pandoc\n"
++ " Will find pandoc, pandoc-citeproc, pandoc-lens, ...\n",
commandUsage = usageAlternatives "list" [ "[FLAGS]"
, "[FLAGS] STRINGS"],
commandDefaultFlags = defaultListFlags,
commandOptions = \_ -> [
optionVerbosity listVerbosity (\v flags -> flags { listVerbosity = v })
, option [] ["installed"]
"Only print installed packages"
listInstalled (\v flags -> flags { listInstalled = v })
trueArg
, option [] ["simple-output"]
"Print in a easy-to-parse format"
listSimpleOutput (\v flags -> flags { listSimpleOutput = v })
trueArg
, option "" ["package-db"]
( "Append the given package database to the list of package"
++ " databases used (to satisfy dependencies and register into)."
++ " May be a specific file, 'global' or 'user'. The initial list"
++ " is ['global'], ['global', 'user'], or ['global', $sandbox],"
++ " depending on context. Use 'clear' to reset the list to empty."
++ " See the user guide for details.")
listPackageDBs (\v flags -> flags { listPackageDBs = v })
(reqArg' "DB" readPackageDbList showPackageDbList)
]
}
| 2,002 | false | true | 0 | 15 | 645 | 310 | 174 | 136 | null | null |
hengchu/CoreLang
|
CoreLang/Language.hs
|
mit
|
isAtomicExpr (ENum _) = True
| 28 |
isAtomicExpr (ENum _) = True
| 28 |
isAtomicExpr (ENum _) = True
| 28 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
quchen/stg
|
src/Stg/Machine/Evaluate/ValidTransitions.hs
|
bsd-3-clause
|
rule10_primitiveLiteralApp _ = Nothing
| 38 |
rule10_primitiveLiteralApp _ = Nothing
| 38 |
rule10_primitiveLiteralApp _ = Nothing
| 38 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
maciej-bendkowski/boltzmann-brain
|
Data/Boltzmann/Compiler/Haskell/Helpers.hs
|
bsd-3-clause
|
caseAlt' :: Rhs () -> Alt ()
caseAlt' rhs = Alt () (PWildCard ()) rhs Nothing
| 77 |
caseAlt' :: Rhs () -> Alt ()
caseAlt' rhs = Alt () (PWildCard ()) rhs Nothing
| 77 |
caseAlt' rhs = Alt () (PWildCard ()) rhs Nothing
| 48 | false | true | 0 | 8 | 15 | 51 | 23 | 28 | null | null |
keera-studios/hsQt
|
Qtc/Gui/QGraphicsView.hs
|
bsd-2-clause
|
qupdateSceneRect :: QGraphicsView a -> ((QRectF t1)) -> IO ()
qupdateSceneRect x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QGraphicsView_updateSceneRect cobj_x0 cobj_x1
| 210 |
qupdateSceneRect :: QGraphicsView a -> ((QRectF t1)) -> IO ()
qupdateSceneRect x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QGraphicsView_updateSceneRect cobj_x0 cobj_x1
| 210 |
qupdateSceneRect x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QGraphicsView_updateSceneRect cobj_x0 cobj_x1
| 148 | false | true | 0 | 9 | 36 | 73 | 36 | 37 | null | null |
agrafix/legoDSL
|
NXT/StdLib/Sensor.hs
|
bsd-3-clause
|
sensor :: V (V Sensor -> V Int)
sensor = defExt "Sensor"
| 56 |
sensor :: V (V Sensor -> V Int)
sensor = defExt "Sensor"
| 56 |
sensor = defExt "Sensor"
| 24 | false | true | 0 | 8 | 11 | 30 | 14 | 16 | null | null |
notogawa/VideoCore4
|
src/VideoCore4/QPU/Instruction/SmallImmediate.hs
|
bsd-3-clause
|
small_immed_1 :: SmallImmediate
small_immed_1 = SmallImmediate 1
| 64 |
small_immed_1 :: SmallImmediate
small_immed_1 = SmallImmediate 1
| 64 |
small_immed_1 = SmallImmediate 1
| 32 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
maximilianhuber/softwareProjekt
|
src/GalFld/Algorithmen/Rabin.hs
|
bsd-3-clause
|
-- | Schnelles Modulo für Monome, d.h. berechnet
-- x^(q^d) mod f
modMonom :: (Show a, Num a, Eq a, Fractional a) =>
Int -> Int -> Polynom a -> Polynom a
modMonom q d = modMonom' n
where n = toInteger q ^ toInteger d
modMonom' n f
| n < toInteger df
= pTupUnsave [(fromInteger n,1)]
| even n = g `modByP` f
| otherwise = multMonomP 1 g `modByP` f
where df = uDegP f
m = n `quot` 2
g = h*h
h = modMonom' m f
| 591 |
modMonom :: (Show a, Num a, Eq a, Fractional a) =>
Int -> Int -> Polynom a -> Polynom a
modMonom q d = modMonom' n
where n = toInteger q ^ toInteger d
modMonom' n f
| n < toInteger df
= pTupUnsave [(fromInteger n,1)]
| even n = g `modByP` f
| otherwise = multMonomP 1 g `modByP` f
where df = uDegP f
m = n `quot` 2
g = h*h
h = modMonom' m f
| 523 |
modMonom q d = modMonom' n
where n = toInteger q ^ toInteger d
modMonom' n f
| n < toInteger df
= pTupUnsave [(fromInteger n,1)]
| even n = g `modByP` f
| otherwise = multMonomP 1 g `modByP` f
where df = uDegP f
m = n `quot` 2
g = h*h
h = modMonom' m f
| 386 | true | true | 5 | 11 | 275 | 196 | 100 | 96 | null | null |
frantisekfarka/ghc-dsi
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
translateOp _ (VecAddOp WordVec n w) = Just (MO_V_Add n w)
| 61 |
translateOp _ (VecAddOp WordVec n w) = Just (MO_V_Add n w)
| 61 |
translateOp _ (VecAddOp WordVec n w) = Just (MO_V_Add n w)
| 61 | false | false | 1 | 7 | 13 | 34 | 15 | 19 | null | null |
jgoerzen/dtmconv
|
HaXml-1.12/src/Text/XML/HaXml/Html/Pretty.hs
|
gpl-2.0
|
tokenizedtype IDREFS = text "IDREFS"
| 46 |
tokenizedtype IDREFS = text "IDREFS"
| 46 |
tokenizedtype IDREFS = text "IDREFS"
| 46 | false | false | 0 | 5 | 14 | 12 | 5 | 7 | null | null |
mumuki/mulang
|
src/Language/Mulang/Analyzer/EdlQueryCompiler.hs
|
gpl-3.0
|
compilePredicate p (E.LikeAnyOf ns) = p $ likeAnyOf ns
| 55 |
compilePredicate p (E.LikeAnyOf ns) = p $ likeAnyOf ns
| 55 |
compilePredicate p (E.LikeAnyOf ns) = p $ likeAnyOf ns
| 55 | false | false | 0 | 8 | 9 | 26 | 12 | 14 | null | null |
nomicflux/threals
|
src/Threal/Impartial.hs
|
gpl-2.0
|
nextTurnInTree (TNode []) = TNode []
| 36 |
nextTurnInTree (TNode []) = TNode []
| 36 |
nextTurnInTree (TNode []) = TNode []
| 36 | false | false | 0 | 8 | 5 | 22 | 10 | 12 | null | null |
NoxHarmonium/lithium-lang
|
src/Emit.hs
|
mit
|
cgen (S.Float n) = return $ cons $ C.Float (F.Double n)
| 55 |
cgen (S.Float n) = return $ cons $ C.Float (F.Double n)
| 55 |
cgen (S.Float n) = return $ cons $ C.Float (F.Double n)
| 55 | false | false | 0 | 9 | 10 | 38 | 18 | 20 | null | null |
ancientlanguage/haskell-analysis
|
grammar/src/Grammar/Common/Decompose.hs
|
mit
|
decomposeChar '\x1E4D' = "\x006F\x0303\x0301"
| 45 |
decomposeChar '\x1E4D' = "\x006F\x0303\x0301"
| 45 |
decomposeChar '\x1E4D' = "\x006F\x0303\x0301"
| 45 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
corngood/cabal
|
cabal-install/Distribution/Client/Setup.hs
|
bsd-3-clause
|
defaultSandboxLocation :: FilePath
defaultSandboxLocation = ".cabal-sandbox"
| 76 |
defaultSandboxLocation :: FilePath
defaultSandboxLocation = ".cabal-sandbox"
| 76 |
defaultSandboxLocation = ".cabal-sandbox"
| 41 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
fmapfmapfmap/amazonka
|
amazonka-storagegateway/gen/Network/AWS/StorageGateway/Types/Product.hs
|
mpl-2.0
|
-- | Undocumented member.
sscsivVolumeSizeInBytes :: Lens' StorediSCSIVolume (Maybe Integer)
sscsivVolumeSizeInBytes = lens _sscsivVolumeSizeInBytes (\ s a -> s{_sscsivVolumeSizeInBytes = a})
| 191 |
sscsivVolumeSizeInBytes :: Lens' StorediSCSIVolume (Maybe Integer)
sscsivVolumeSizeInBytes = lens _sscsivVolumeSizeInBytes (\ s a -> s{_sscsivVolumeSizeInBytes = a})
| 165 |
sscsivVolumeSizeInBytes = lens _sscsivVolumeSizeInBytes (\ s a -> s{_sscsivVolumeSizeInBytes = a})
| 98 | true | true | 0 | 9 | 20 | 46 | 25 | 21 | null | null |
nevrenato/Hets_Fork
|
CASL_DL/ATC_CASL_DL.hs
|
gpl-2.0
|
{-! for CASL_DL.AS_CASL_DL.CardType derive : Typeable !-}
{-! for CASL_DL.AS_CASL_DL.DL_FORMULA derive : Typeable !-}
{-! for CASL_DL.Sign.CASL_DLSign derive : Typeable !-}
{-! for CASL_DL.Sign.PropertyType derive : Typeable !-}
{-! for CASL_DL.Sign.AnnoAppl derive : Typeable !-}
{-! for CASL_DL.Sign.AnnoLiteral derive : Typeable !-}
{-! for CASL_DL.Sublogics.CASL_DL_SL derive : Typeable !-}
{-! for CASL_DL.AS_CASL_DL.CardType derive : ShATermConvertible !-}
{-! for CASL_DL.AS_CASL_DL.DL_FORMULA derive : ShATermConvertible !-}
{-! for CASL_DL.Sign.CASL_DLSign derive : ShATermConvertible !-}
{-! for CASL_DL.Sign.PropertyType derive : ShATermConvertible !-}
{-! for CASL_DL.Sign.AnnoAppl derive : ShATermConvertible !-}
{-! for CASL_DL.Sign.AnnoLiteral derive : ShATermConvertible !-}
{-! for CASL_DL.Sublogics.CASL_DL_SL derive : ShATermConvertible !-}
-- Generated by DrIFT, look but don't touch!
_tcCardTypeTc :: TyCon
_tcCardTypeTc = mkTyCon "CASL_DL.AS_CASL_DL.CardType"
| 984 |
_tcCardTypeTc :: TyCon
_tcCardTypeTc = mkTyCon "CASL_DL.AS_CASL_DL.CardType"
| 76 |
_tcCardTypeTc = mkTyCon "CASL_DL.AS_CASL_DL.CardType"
| 53 | true | true | 0 | 6 | 115 | 35 | 23 | 12 | null | null |
graninas/The-Amoeba-World
|
src/Amoeba/GameLogic/Language/Translation/Triggers.hs
|
gpl-3.0
|
onProp name (ObjectProperty n _) = n == name
| 50 |
onProp name (ObjectProperty n _) = n == name
| 50 |
onProp name (ObjectProperty n _) = n == name
| 50 | false | false | 0 | 7 | 14 | 23 | 11 | 12 | null | null |
mikusp/hwykop
|
WykopEntries.hs
|
mit
|
voteCommEntry :: Keys -> Int -> Int -> Userkey -> IO (Maybe Value)
voteCommEntry = voteCommEntry' "vote"
| 104 |
voteCommEntry :: Keys -> Int -> Int -> Userkey -> IO (Maybe Value)
voteCommEntry = voteCommEntry' "vote"
| 104 |
voteCommEntry = voteCommEntry' "vote"
| 37 | false | true | 0 | 11 | 16 | 39 | 19 | 20 | null | null |
AaronFriel/hyhac
|
sandbox/src/Sandbox/Hyhac.hs
|
bsd-3-clause
|
hyhacDeferred :: Client -> IO (IO (Either ReturnCode String))
hyhacDeferred = wrapDeferred $ do
logPrint 5 "hyhacDeferred" "Entered hyhacDeferred"
-- Simulate allocating some resources for the call
void $ allocateResource $ loggedResource "a" logger
void $ allocateResource $ loggedResource "b" logger
void $ allocateResource $ loggedResource "c" logger
-- allocate an IORef (simulated pointer) to some data that will be set by the
-- foreign function call
(_,ref) <- allocateResource $ loggedIORefResource "deferredGarbage" logger
-- define the foreign function call and callback functions
let call ptr = clientDeferredCall ptr ref
let callback = do
logPrint 6 "hyhacDeferred - Callback" $ "Reading IORef"
void $ allocateResource $ loggedResource "someStruct" logger
liftIO $ readIORef ref
return (call, callback)
where
logger = logPrint 7 "hyhacDeferred - Resource"
| 940 |
hyhacDeferred :: Client -> IO (IO (Either ReturnCode String))
hyhacDeferred = wrapDeferred $ do
logPrint 5 "hyhacDeferred" "Entered hyhacDeferred"
-- Simulate allocating some resources for the call
void $ allocateResource $ loggedResource "a" logger
void $ allocateResource $ loggedResource "b" logger
void $ allocateResource $ loggedResource "c" logger
-- allocate an IORef (simulated pointer) to some data that will be set by the
-- foreign function call
(_,ref) <- allocateResource $ loggedIORefResource "deferredGarbage" logger
-- define the foreign function call and callback functions
let call ptr = clientDeferredCall ptr ref
let callback = do
logPrint 6 "hyhacDeferred - Callback" $ "Reading IORef"
void $ allocateResource $ loggedResource "someStruct" logger
liftIO $ readIORef ref
return (call, callback)
where
logger = logPrint 7 "hyhacDeferred - Resource"
| 939 |
hyhacDeferred = wrapDeferred $ do
logPrint 5 "hyhacDeferred" "Entered hyhacDeferred"
-- Simulate allocating some resources for the call
void $ allocateResource $ loggedResource "a" logger
void $ allocateResource $ loggedResource "b" logger
void $ allocateResource $ loggedResource "c" logger
-- allocate an IORef (simulated pointer) to some data that will be set by the
-- foreign function call
(_,ref) <- allocateResource $ loggedIORefResource "deferredGarbage" logger
-- define the foreign function call and callback functions
let call ptr = clientDeferredCall ptr ref
let callback = do
logPrint 6 "hyhacDeferred - Callback" $ "Reading IORef"
void $ allocateResource $ loggedResource "someStruct" logger
liftIO $ readIORef ref
return (call, callback)
where
logger = logPrint 7 "hyhacDeferred - Resource"
| 877 | false | true | 0 | 14 | 196 | 209 | 97 | 112 | null | null |
brendanhay/keiretsu
|
src/Keiretsu/Types.hs
|
mpl-2.0
|
getEnvFiles :: [Proc] -> [FilePath]
getEnvFiles = nub . map ((</> ".env") . depPath . procDep)
| 94 |
getEnvFiles :: [Proc] -> [FilePath]
getEnvFiles = nub . map ((</> ".env") . depPath . procDep)
| 94 |
getEnvFiles = nub . map ((</> ".env") . depPath . procDep)
| 58 | false | true | 0 | 10 | 15 | 49 | 25 | 24 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.