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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sdiehl/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | -- | Extract the type for any given labelled field of the 'DataCon'
dataConFieldType :: DataCon -> FieldLabelString -> Type
dataConFieldType con label = case dataConFieldType_maybe con label of
Just (_, ty) -> ty
Nothing -> pprPanic "dataConFieldType" (ppr con <+> ppr label)
-- | Extract the label and... | 430 | dataConFieldType :: DataCon -> FieldLabelString -> Type
dataConFieldType con label = case dataConFieldType_maybe con label of
Just (_, ty) -> ty
Nothing -> pprPanic "dataConFieldType" (ppr con <+> ppr label)
-- | Extract the label and type for any given labelled field of the
-- 'DataCon', or return 'N... | 362 | dataConFieldType con label = case dataConFieldType_maybe con label of
Just (_, ty) -> ty
Nothing -> pprPanic "dataConFieldType" (ppr con <+> ppr label)
-- | Extract the label and type for any given labelled field of the
-- 'DataCon', or return 'Nothing' if the field does not belong to it | 306 | true | true | 0 | 11 | 87 | 75 | 38 | 37 | null | null |
mettekou/ghc | compiler/typecheck/TcBackpack.hs | bsd-3-clause | checkImplements :: Module -> IndefModule -> TcRn TcGblEnv
checkImplements impl_mod (IndefModule uid mod_name) = do
let insts = indefUnitIdInsts uid
-- STEP 1: Load the implementing interface, and make a RdrEnv
-- for its exports
impl_iface <- initIfaceTcRn $
loadSysInterface (text "checkImpleme... | 2,809 | checkImplements :: Module -> IndefModule -> TcRn TcGblEnv
checkImplements impl_mod (IndefModule uid mod_name) = do
let insts = indefUnitIdInsts uid
-- STEP 1: Load the implementing interface, and make a RdrEnv
-- for its exports
impl_iface <- initIfaceTcRn $
loadSysInterface (text "checkImpleme... | 2,809 | checkImplements impl_mod (IndefModule uid mod_name) = do
let insts = indefUnitIdInsts uid
-- STEP 1: Load the implementing interface, and make a RdrEnv
-- for its exports
impl_iface <- initIfaceTcRn $
loadSysInterface (text "checkImplements 1") impl_mod
let impl_gr = mkGlobalRdrEnv
... | 2,751 | false | true | 0 | 18 | 699 | 487 | 238 | 249 | null | null |
sdiehl/ghc | testsuite/tests/pmcheck/should_compile/T11195.hs | bsd-3-clause | opt_co2 :: LiftingContext -> SymFlag -> Role -> Coercion -> NormalCo
opt_co2 = undefined | 88 | opt_co2 :: LiftingContext -> SymFlag -> Role -> Coercion -> NormalCo
opt_co2 = undefined | 88 | opt_co2 = undefined | 19 | false | true | 0 | 8 | 13 | 27 | 14 | 13 | null | null |
nevrenato/Hets_Fork | CASL/Overload.hs | gpl-2.0 | minimalSupers1 :: Bool -> Sign f e -> SORT -> SORT -> [SORT]
minimalSupers1 b s s1 = keepMinimals1 b s id . commonSupersorts b s s1 | 131 | minimalSupers1 :: Bool -> Sign f e -> SORT -> SORT -> [SORT]
minimalSupers1 b s s1 = keepMinimals1 b s id . commonSupersorts b s s1 | 131 | minimalSupers1 b s s1 = keepMinimals1 b s id . commonSupersorts b s s1 | 70 | false | true | 0 | 11 | 26 | 65 | 30 | 35 | null | null |
japaric/eulermark | problems/0/2/7/027.hs | mit | main :: IO()
main
= print
. uncurry (*)
. fst
. foldl' origami ((0,0), 0)
$ [(a,b) | a <- [-limit..limit], b <- [-limit..limit]]
where limit = 999
origami ((a,b),n) (a',b')
| any ((<2) . polyval (a',b')) [0..n] = ((a,b),n)
| any (not . isPrime . polyval (a',b')) [0..n] = ... | 385 | main :: IO()
main
= print
. uncurry (*)
. fst
. foldl' origami ((0,0), 0)
$ [(a,b) | a <- [-limit..limit], b <- [-limit..limit]]
where limit = 999
origami ((a,b),n) (a',b')
| any ((<2) . polyval (a',b')) [0..n] = ((a,b),n)
| any (not . isPrime . polyval (a',b')) [0..n] = ... | 385 | main
= print
. uncurry (*)
. fst
. foldl' origami ((0,0), 0)
$ [(a,b) | a <- [-limit..limit], b <- [-limit..limit]]
where limit = 999
origami ((a,b),n) (a',b')
| any ((<2) . polyval (a',b')) [0..n] = ((a,b),n)
| any (not . isPrime . polyval (a',b')) [0..n] = ((a,b),n)
... | 372 | false | true | 11 | 9 | 116 | 259 | 144 | 115 | null | null |
gcampax/ghc | compiler/main/GhcMake.hs | bsd-3-clause | depanal :: GhcMonad m =>
[ModuleName] -- ^ excluded modules
-> Bool -- ^ allow duplicate roots
-> m ModuleGraph
depanal excluded_mods allow_dup_roots = do
hsc_env <- getSession
let
dflags = hsc_dflags hsc_env
targets = hsc_targets hsc_env
old_graph = ... | 819 | depanal :: GhcMonad m =>
[ModuleName] -- ^ excluded modules
-> Bool -- ^ allow duplicate roots
-> m ModuleGraph
depanal excluded_mods allow_dup_roots = do
hsc_env <- getSession
let
dflags = hsc_dflags hsc_env
targets = hsc_targets hsc_env
old_graph = ... | 819 | depanal excluded_mods allow_dup_roots = do
hsc_env <- getSession
let
dflags = hsc_dflags hsc_env
targets = hsc_targets hsc_env
old_graph = hsc_mod_graph hsc_env
liftIO $ showPass dflags "Chasing dependencies"
liftIO $ debugTraceMsg dflags 2 (hcat [
text "Chasing modules... | 670 | false | true | 0 | 16 | 212 | 191 | 91 | 100 | null | null |
siddhanathan/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Search.hs | gpl-2.0 | continueVimSearch :: (SearchExp, Direction) -> BufferM ()
continueVimSearch (searchExp, dir) = do
mp <- savingPointB $ do
moveB Character dir -- start immed. after cursor
rs <- regexB dir searchExp
moveB Document (reverseDir dir) -- wrap around
ls <- regexB dir searchExp
ret... | 615 | continueVimSearch :: (SearchExp, Direction) -> BufferM ()
continueVimSearch (searchExp, dir) = do
mp <- savingPointB $ do
moveB Character dir -- start immed. after cursor
rs <- regexB dir searchExp
moveB Document (reverseDir dir) -- wrap around
ls <- regexB dir searchExp
ret... | 615 | continueVimSearch (searchExp, dir) = do
mp <- savingPointB $ do
moveB Character dir -- start immed. after cursor
rs <- regexB dir searchExp
moveB Document (reverseDir dir) -- wrap around
ls <- regexB dir searchExp
return $ listToMaybe $ rs ++ ls
-- regionFirst doesn't wo... | 557 | false | true | 0 | 13 | 149 | 138 | 68 | 70 | null | null |
randen/cabal | Cabal/Distribution/ParseUtils.hs | bsd-3-clause | utf8Warnings :: LineNo -> String -> String -> [PWarning]
utf8Warnings line fieldname s =
take 1 [ UTFWarning n fieldname
| (n,l) <- zip [line..] (lines s)
, '\xfffd' `elem` l ] | 196 | utf8Warnings :: LineNo -> String -> String -> [PWarning]
utf8Warnings line fieldname s =
take 1 [ UTFWarning n fieldname
| (n,l) <- zip [line..] (lines s)
, '\xfffd' `elem` l ] | 196 | utf8Warnings line fieldname s =
take 1 [ UTFWarning n fieldname
| (n,l) <- zip [line..] (lines s)
, '\xfffd' `elem` l ] | 139 | false | true | 0 | 11 | 51 | 84 | 44 | 40 | null | null |
guoguo12/haskell-ptable | ptable.hs | apache-2.0 | pnum "Th" = 7 | 13 | pnum "Th" = 7 | 13 | pnum "Th" = 7 | 13 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
adnelson/nix-binary-cache | src/Nix/Cache/Client.hs | mit | fetchPaths :: [StorePath] -> NixClient ()
fetchPaths spaths = do
state <- ncoState <$> ask
modifyMVar_ (ncsFetchedPaths state) $ \fetched -> do
-- Get a set of store paths the repo already has.
inRepo <- pure mempty -- fst <$> queryStorePaths spaths
-- Create no-op actions for all of these.
noopActi... | 929 | fetchPaths :: [StorePath] -> NixClient ()
fetchPaths spaths = do
state <- ncoState <$> ask
modifyMVar_ (ncsFetchedPaths state) $ \fetched -> do
-- Get a set of store paths the repo already has.
inRepo <- pure mempty -- fst <$> queryStorePaths spaths
-- Create no-op actions for all of these.
noopActi... | 929 | fetchPaths spaths = do
state <- ncoState <$> ask
modifyMVar_ (ncsFetchedPaths state) $ \fetched -> do
-- Get a set of store paths the repo already has.
inRepo <- pure mempty -- fst <$> queryStorePaths spaths
-- Create no-op actions for all of these.
noopActions <- map H.fromList $ forM (HS.toList in... | 887 | false | true | 0 | 22 | 208 | 206 | 100 | 106 | null | null |
AlexanderPankiv/ghc | libraries/base/Data/Typeable/Internal.hs | bsd-3-clause | -- Notice that we call mkTyConApp to construct the fingerprint from tc and
-- the arg fingerprints. Simply combining the current fingerprint with
-- the new one won't give the same answer, but of course we want to
-- ensure that a TypeRep of the same shape has the same fingerprint!
-- See Trac #5962
-----... | 496 | typeRepTyCon :: TypeRep -> TyCon
typeRepTyCon (TypeRep _ tc _ _) = tc | 69 | typeRepTyCon (TypeRep _ tc _ _) = tc | 36 | true | true | 0 | 7 | 95 | 37 | 22 | 15 | null | null |
DiegoNolan/Asciify | Asciify.hs | mit | charToNovem '?' = Novemant Lgt Drk Lgt Bnk Drk Lgt Bnk Bnk Drk | 64 | charToNovem '?' = Novemant Lgt Drk Lgt Bnk Drk Lgt Bnk Bnk Drk | 64 | charToNovem '?' = Novemant Lgt Drk Lgt Bnk Drk Lgt Bnk Bnk Drk | 64 | false | false | 0 | 5 | 14 | 29 | 13 | 16 | null | null |
JustinUnger/haskell-book | ch24/ch24-learn.hs | mit | ps :: [Parser Char]
ps = [char '1', char '2', char '3'] | 55 | ps :: [Parser Char]
ps = [char '1', char '2', char '3'] | 55 | ps = [char '1', char '2', char '3'] | 35 | false | true | 0 | 8 | 11 | 42 | 19 | 23 | null | null |
input-output-hk/pos-haskell-prototype | explorer/src/Pos/Explorer/DB.hs | mit | blockEpochMaxPagePrefix :: Epoch -> ByteString
blockEpochMaxPagePrefix epoch = "e/epochPages/" <> serialize' epoch | 114 | blockEpochMaxPagePrefix :: Epoch -> ByteString
blockEpochMaxPagePrefix epoch = "e/epochPages/" <> serialize' epoch | 114 | blockEpochMaxPagePrefix epoch = "e/epochPages/" <> serialize' epoch | 67 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
carliros/Simple-San-Simon-Functional-Web-Browser | src/Parser/Propiedades.hs | bsd-3-clause | -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-- Funciones
-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-- Muestra los nombres y values (tupla de 5) de la lista de Propiedades de CSS
mostrarPropiedades :: Map.Map String Property -> [(String, String, String, String, String)]
mostrarPropiedades props = Map.... | 372 | mostrarPropiedades :: Map.Map String Property -> [(String, String, String, String, String)]
mostrarPropiedades props = Map.fold (\x xs -> (showPropertyValues x) : xs) [] props | 175 | mostrarPropiedades props = Map.fold (\x xs -> (showPropertyValues x) : xs) [] props | 83 | true | true | 0 | 10 | 46 | 78 | 44 | 34 | null | null |
CloudI/CloudI | src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Lazy.hs | mit | drop i cs0 = drop' i cs0
where drop' 0 cs = cs
drop' _ Empty = Empty
drop' n (Chunk c cs) =
if n < fromIntegral (S.length c)
then Chunk (S.drop (fromIntegral n) c) cs
else drop' (n - fromIntegral (S.length c)) cs
-- | /O(n\/c)/ 'splitAt' @n xs@ is eq... | 361 | drop i cs0 = drop' i cs0
where drop' 0 cs = cs
drop' _ Empty = Empty
drop' n (Chunk c cs) =
if n < fromIntegral (S.length c)
then Chunk (S.drop (fromIntegral n) c) cs
else drop' (n - fromIntegral (S.length c)) cs
-- | /O(n\/c)/ 'splitAt' @n xs@ is eq... | 361 | drop i cs0 = drop' i cs0
where drop' 0 cs = cs
drop' _ Empty = Empty
drop' n (Chunk c cs) =
if n < fromIntegral (S.length c)
then Chunk (S.drop (fromIntegral n) c) cs
else drop' (n - fromIntegral (S.length c)) cs
-- | /O(n\/c)/ 'splitAt' @n xs@ is eq... | 361 | false | false | 2 | 13 | 129 | 125 | 61 | 64 | null | null |
hpacheco/jasminv | src/Language/Jasmin/Parser/Parser.hs | gpl-3.0 | pinstrs :: MonadIO m => ParserT m [Pinstr Position]
pinstrs = liftM concat $ many' (apA statementAnnotations (map (\(StatementAnnotation l x) -> Pinstr l $ Anninstr x)) <||> liftM (:[]) pinstr) | 193 | pinstrs :: MonadIO m => ParserT m [Pinstr Position]
pinstrs = liftM concat $ many' (apA statementAnnotations (map (\(StatementAnnotation l x) -> Pinstr l $ Anninstr x)) <||> liftM (:[]) pinstr) | 193 | pinstrs = liftM concat $ many' (apA statementAnnotations (map (\(StatementAnnotation l x) -> Pinstr l $ Anninstr x)) <||> liftM (:[]) pinstr) | 141 | false | true | 0 | 15 | 30 | 94 | 46 | 48 | null | null |
technogeeky/centered | src/Pearl/GaDtTLHT/Section04.hs | gpl-3.0 | -- ^
-- Property ('p09') can be proved by induction on the size of zs.
--
-- For
-- @ zs = ∅ @
-- the property trivially holds. The nonempty case is shown below:
--
-- @
-- ('p09proof')
--
-- ( ws ++ sort xs, ys ) ∈ iterF ( ws, zs )
--
-- ≡ { zs /= ∅ , let z = min zs }
--
-- ( ws ++ sort xs, ys... | 771 | p09pick :: pick
p09pick = undefined | 35 | p09pick = undefined | 19 | true | true | 0 | 6 | 280 | 44 | 33 | 11 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | [Optional] Indicates if BigQuery should accept rows that are missing
-- trailing optional columns. If true, BigQuery treats missing trailing
-- columns as null values. If false, records with missing trailing columns
-- are treated as bad records, and if there are too many bad records, an
-- invalid error is return... | 509 | coAllowJaggedRows :: Lens' CSVOptions (Maybe Bool)
coAllowJaggedRows
= lens _coAllowJaggedRows
(\ s a -> s{_coAllowJaggedRows = a}) | 139 | coAllowJaggedRows
= lens _coAllowJaggedRows
(\ s a -> s{_coAllowJaggedRows = a}) | 88 | true | true | 0 | 9 | 87 | 52 | 29 | 23 | null | null |
AshleyYakeley/countable | src/Data/Expression.hs | bsd-3-clause | runValueExpression (OpenExpression a0 ebr) = fmap (\abbr ab -> abbr ab (ab a0)) (runValueExpression ebr) | 104 | runValueExpression (OpenExpression a0 ebr) = fmap (\abbr ab -> abbr ab (ab a0)) (runValueExpression ebr) | 104 | runValueExpression (OpenExpression a0 ebr) = fmap (\abbr ab -> abbr ab (ab a0)) (runValueExpression ebr) | 104 | false | false | 0 | 10 | 14 | 50 | 24 | 26 | null | null |
adaszko/concurrent-ordered-set | bench/Main.hs | bsd-3-clause | destructiveDelete :: StdGen -> [[Int]] -> IO [Int]
destructiveDelete seed elements = do
oset <- fromList seed height $ concat elements
mvars <- mapM (myForkIO . mapM_ (flip delete oset)) elements
mapM_ takeMVar mvars
toList oset >>= return | 247 | destructiveDelete :: StdGen -> [[Int]] -> IO [Int]
destructiveDelete seed elements = do
oset <- fromList seed height $ concat elements
mvars <- mapM (myForkIO . mapM_ (flip delete oset)) elements
mapM_ takeMVar mvars
toList oset >>= return | 247 | destructiveDelete seed elements = do
oset <- fromList seed height $ concat elements
mvars <- mapM (myForkIO . mapM_ (flip delete oset)) elements
mapM_ takeMVar mvars
toList oset >>= return | 196 | false | true | 0 | 13 | 45 | 108 | 49 | 59 | null | null |
alexander-at-github/eta | compiler/ETA/DeSugar/Coverage.hs | bsd-3-clause | addTickHsLocalBinds (HsIPBinds binds) =
liftM HsIPBinds
(addTickHsIPBinds binds) | 105 | addTickHsLocalBinds (HsIPBinds binds) =
liftM HsIPBinds
(addTickHsIPBinds binds) | 105 | addTickHsLocalBinds (HsIPBinds binds) =
liftM HsIPBinds
(addTickHsIPBinds binds) | 105 | false | false | 0 | 6 | 32 | 28 | 12 | 16 | null | null |
mzero/plush | src/Plush/Run/Execute.hs | apache-2.0 | execPipe cs = StStatus <$> pipeline [statusExitCode <$> execCommand c | c <- cs] | 80 | execPipe cs = StStatus <$> pipeline [statusExitCode <$> execCommand c | c <- cs] | 80 | execPipe cs = StStatus <$> pipeline [statusExitCode <$> execCommand c | c <- cs] | 80 | false | false | 1 | 9 | 13 | 37 | 16 | 21 | null | null |
Philonous/hs-otr | source/Otr.hs | mit | makeDHSharedSecret :: Integer -> Integer -> Integer -> Integer
makeDHSharedSecret private public p = powerMod public private p | 126 | makeDHSharedSecret :: Integer -> Integer -> Integer -> Integer
makeDHSharedSecret private public p = powerMod public private p | 126 | makeDHSharedSecret private public p = powerMod public private p | 63 | false | true | 0 | 7 | 17 | 37 | 18 | 19 | null | null |
CulpaBS/wbBach | src/futhark.hs | bsd-3-clause | untypedActionName (PolyAction a _ _) = actionName a | 51 | untypedActionName (PolyAction a _ _) = actionName a | 51 | untypedActionName (PolyAction a _ _) = actionName a | 51 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
brendanhay/gogol | gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'InAppProductPrices' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iAppAddtional'
inAppProductPrices
:: HashMap Text Price -- ^ 'iAppAddtional'
-> InAppProductPrices
inAppProductPrices pIAppAddtional_... | 389 | inAppProductPrices
:: HashMap Text Price -- ^ 'iAppAddtional'
-> InAppProductPrices
inAppProductPrices pIAppAddtional_ =
InAppProductPrices' {_iAppAddtional = _Coerce # pIAppAddtional_} | 195 | inAppProductPrices pIAppAddtional_ =
InAppProductPrices' {_iAppAddtional = _Coerce # pIAppAddtional_} | 103 | true | true | 0 | 8 | 62 | 47 | 25 | 22 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp _ [] WriteArrayArrayOp_ArrayArray [obj,ix,v] = doWritePtrArrayOp obj ix v | 97 | emitPrimOp _ [] WriteArrayArrayOp_ArrayArray [obj,ix,v] = doWritePtrArrayOp obj ix v | 97 | emitPrimOp _ [] WriteArrayArrayOp_ArrayArray [obj,ix,v] = doWritePtrArrayOp obj ix v | 97 | false | false | 0 | 6 | 22 | 33 | 17 | 16 | null | null |
bos/wreq | Network/Wreq/Session.hs | bsd-3-clause | -- | 'Session'-specific version of 'Network.Wreq.putWith'.
putWith :: Putable a => Options -> Session -> String -> a
-> IO (Response L.ByteString)
putWith opts sesh url payload = run string sesh =<< preparePut opts url payload | 234 | putWith :: Putable a => Options -> Session -> String -> a
-> IO (Response L.ByteString)
putWith opts sesh url payload = run string sesh =<< preparePut opts url payload | 175 | putWith opts sesh url payload = run string sesh =<< preparePut opts url payload | 79 | true | true | 0 | 13 | 43 | 71 | 34 | 37 | null | null |
vTurbine/ghc | compiler/utils/FastString.hs | bsd-3-clause | mkFastStringByteList :: [Word8] -> FastString
mkFastStringByteList str =
inlinePerformIO $ do
let l = Prelude.length str
buf <- mallocForeignPtrBytes l
withForeignPtr buf $ \ptr -> do
pokeArray (castPtr ptr) str
mkFastStringForeignPtr ptr buf l
-- | Creates a Z-encoded 'FastString' from a 'St... | 325 | mkFastStringByteList :: [Word8] -> FastString
mkFastStringByteList str =
inlinePerformIO $ do
let l = Prelude.length str
buf <- mallocForeignPtrBytes l
withForeignPtr buf $ \ptr -> do
pokeArray (castPtr ptr) str
mkFastStringForeignPtr ptr buf l
-- | Creates a Z-encoded 'FastString' from a 'St... | 325 | mkFastStringByteList str =
inlinePerformIO $ do
let l = Prelude.length str
buf <- mallocForeignPtrBytes l
withForeignPtr buf $ \ptr -> do
pokeArray (castPtr ptr) str
mkFastStringForeignPtr ptr buf l
-- | Creates a Z-encoded 'FastString' from a 'String' | 279 | false | true | 0 | 14 | 69 | 89 | 41 | 48 | null | null |
brendanhay/gogol | gogol-iam/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Disable.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
psadUploadType :: Lens' ProjectsServiceAccountsDisable (Maybe Text)
psadUploadType
= lens _psadUploadType
(\ s a -> s{_psadUploadType = a}) | 218 | psadUploadType :: Lens' ProjectsServiceAccountsDisable (Maybe Text)
psadUploadType
= lens _psadUploadType
(\ s a -> s{_psadUploadType = a}) | 147 | psadUploadType
= lens _psadUploadType
(\ s a -> s{_psadUploadType = a}) | 79 | true | true | 0 | 8 | 34 | 49 | 25 | 24 | null | null |
tamarin-prover/tamarin-prover | lib/term/src/Term/Builtin/Convenience.hs | gpl-3.0 | v4 = lit $ Var $ lv4 | 20 | v4 = lit $ Var $ lv4 | 20 | v4 = lit $ Var $ lv4 | 20 | false | false | 1 | 6 | 6 | 18 | 7 | 11 | null | null |
nimiwio/WriteYouAScheme | app/Main.hs | bsd-3-clause | parseQuoted :: Parser LispVal
parseQuoted = do
(char '\'' <|> char '`')
x <- parseExpr
return $ List [Atom "quote", x]
-- TODO Excercises at end of Section Parsing
-- 1. Add support for backquote
-- 2. Add support for vectors
-- Evaluator | 256 | parseQuoted :: Parser LispVal
parseQuoted = do
(char '\'' <|> char '`')
x <- parseExpr
return $ List [Atom "quote", x]
-- TODO Excercises at end of Section Parsing
-- 1. Add support for backquote
-- 2. Add support for vectors
-- Evaluator | 256 | parseQuoted = do
(char '\'' <|> char '`')
x <- parseExpr
return $ List [Atom "quote", x]
-- TODO Excercises at end of Section Parsing
-- 1. Add support for backquote
-- 2. Add support for vectors
-- Evaluator | 226 | false | true | 0 | 10 | 60 | 60 | 30 | 30 | null | null |
haslab/SecreC | src/Language/SecreC/Parser/Parsec.hs | gpl-3.0 | scDomainDeclaration :: (Monad m,MonadCatch m) => ScParserT m (DomainDeclaration Identifier Position)
scDomainDeclaration = scNotAnn (apA3 (scTok DOMAIN) scDomainId scKindId (\x1 x2 x3 -> Domain (loc x1) x2 x3) <?> "domain declaration") | 235 | scDomainDeclaration :: (Monad m,MonadCatch m) => ScParserT m (DomainDeclaration Identifier Position)
scDomainDeclaration = scNotAnn (apA3 (scTok DOMAIN) scDomainId scKindId (\x1 x2 x3 -> Domain (loc x1) x2 x3) <?> "domain declaration") | 235 | scDomainDeclaration = scNotAnn (apA3 (scTok DOMAIN) scDomainId scKindId (\x1 x2 x3 -> Domain (loc x1) x2 x3) <?> "domain declaration") | 134 | false | true | 0 | 13 | 30 | 89 | 45 | 44 | null | null |
jstolarek/ghc | compiler/cmm/PprC.hs | bsd-3-clause | pprTop (CmmData _section (Statics lbl [CmmString str])) =
hcat [
pprLocalness lbl, ptext (sLit "char "), ppr lbl,
ptext (sLit "[] = "), pprStringInCStyle str, semi
] | 177 | pprTop (CmmData _section (Statics lbl [CmmString str])) =
hcat [
pprLocalness lbl, ptext (sLit "char "), ppr lbl,
ptext (sLit "[] = "), pprStringInCStyle str, semi
] | 177 | pprTop (CmmData _section (Statics lbl [CmmString str])) =
hcat [
pprLocalness lbl, ptext (sLit "char "), ppr lbl,
ptext (sLit "[] = "), pprStringInCStyle str, semi
] | 177 | false | false | 0 | 10 | 38 | 80 | 39 | 41 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/Dataflow.hs | bsd-3-clause | analyzeCmmFwd = analyzeCmm Fwd | 30 | analyzeCmmFwd = analyzeCmm Fwd | 30 | analyzeCmmFwd = analyzeCmm Fwd | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
davidledwards/rpn-haskell | src/Lexer.hs | apache-2.0 | readNumber :: String -> String -> (Token, String)
readNumber [] lex = (verifyNumber lex, []) | 92 | readNumber :: String -> String -> (Token, String)
readNumber [] lex = (verifyNumber lex, []) | 92 | readNumber [] lex = (verifyNumber lex, []) | 42 | false | true | 0 | 7 | 14 | 43 | 23 | 20 | null | null |
brendanhay/gogol | gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs | mpl-2.0 | -- | Maps to HTTP DELETE. Used for deleting a resource.
httprDelete :: Lens' HTTPRule (Maybe Text)
httprDelete
= lens _httprDelete (\ s a -> s{_httprDelete = a}) | 163 | httprDelete :: Lens' HTTPRule (Maybe Text)
httprDelete
= lens _httprDelete (\ s a -> s{_httprDelete = a}) | 107 | httprDelete
= lens _httprDelete (\ s a -> s{_httprDelete = a}) | 64 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo IndexByteArrayOp_Char = mkGenPrimOp (fsLit "indexCharArray#") [] [byteArrayPrimTy, intPrimTy] (charPrimTy) | 118 | primOpInfo IndexByteArrayOp_Char = mkGenPrimOp (fsLit "indexCharArray#") [] [byteArrayPrimTy, intPrimTy] (charPrimTy) | 118 | primOpInfo IndexByteArrayOp_Char = mkGenPrimOp (fsLit "indexCharArray#") [] [byteArrayPrimTy, intPrimTy] (charPrimTy) | 118 | false | false | 0 | 7 | 10 | 36 | 18 | 18 | null | null |
dhess/gpio | src/System/GPIO/Monad.hs | bsd-3-clause | -- | Like 'getPinActiveLevel'.
getOutputPinActiveLevel :: (MonadGpio h m) => OutputPin h -> m PinActiveLevel
getOutputPinActiveLevel p =
getPinActiveLevel (_outputHandle p) | 174 | getOutputPinActiveLevel :: (MonadGpio h m) => OutputPin h -> m PinActiveLevel
getOutputPinActiveLevel p =
getPinActiveLevel (_outputHandle p) | 143 | getOutputPinActiveLevel p =
getPinActiveLevel (_outputHandle p) | 65 | true | true | 0 | 7 | 22 | 45 | 22 | 23 | null | null |
erochest/barth-scrape | src/BarthPar/Scrape/XML.hs | apache-2.0 | isNoteLink :: Element -> Bool
isNoteLink e = e ^. name == "a" && e ^. text == "[note]" | 86 | isNoteLink :: Element -> Bool
isNoteLink e = e ^. name == "a" && e ^. text == "[note]" | 86 | isNoteLink e = e ^. name == "a" && e ^. text == "[note]" | 56 | false | true | 0 | 9 | 18 | 38 | 19 | 19 | null | null |
danr/hipspec | examples/Testing/Sanity.hs | gpl-3.0 | bool_trans :: Bool -> Bool -> Bool -> Prop Bool
bool_trans x y z = x =:= y ==> y =:= z ==> x =:= z | 98 | bool_trans :: Bool -> Bool -> Bool -> Prop Bool
bool_trans x y z = x =:= y ==> y =:= z ==> x =:= z | 98 | bool_trans x y z = x =:= y ==> y =:= z ==> x =:= z | 50 | false | true | 1 | 9 | 25 | 63 | 29 | 34 | null | null |
batterseapower/pegs | Language.hs | bsd-3-clause | emptyTimeEnv :: TimeEnv
emptyTimeEnv = IM.empty | 47 | emptyTimeEnv :: TimeEnv
emptyTimeEnv = IM.empty | 47 | emptyTimeEnv = IM.empty | 23 | false | true | 0 | 6 | 5 | 20 | 8 | 12 | null | null |
li-zhirui/EoplLangs | src/CheckedLang/Evaluator.hs | bsd-3-clause | valueOf (BinOpExpr op expr1 expr2) env = evalBinOpExpr op expr1 expr2 env | 73 | valueOf (BinOpExpr op expr1 expr2) env = evalBinOpExpr op expr1 expr2 env | 73 | valueOf (BinOpExpr op expr1 expr2) env = evalBinOpExpr op expr1 expr2 env | 73 | false | false | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
acowley/ghc | compiler/utils/FastString.hs | bsd-3-clause | unpackLitString :: LitString -> String
unpackLitString (Ptr p) = unpackCString# p | 81 | unpackLitString :: LitString -> String
unpackLitString (Ptr p) = unpackCString# p | 81 | unpackLitString (Ptr p) = unpackCString# p | 42 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
fpinsight/hocilib | src/Database/Ocilib/Bindings.hs | bsd-2-clause | -- | Bind an array of File handles.
-- boolean OCI_BindArrayOfFiles (OCI_Statement *stmt, const otext *name, OCI_File **data, unsigned int type, unsigned int nbelem)
-- | Bind an object (named type) variable.
ociBindObject :: Ptr OCI_Statement -> String -> Ptr OCI_Object -> IO Bool
ociBindObject st n d = withCString n... | 448 | ociBindObject :: Ptr OCI_Statement -> String -> Ptr OCI_Object -> IO Bool
ociBindObject st n d = withCString n (\n' ->
fmap toBool [C.exp| int { OCI_BindObject($(OCI_Statement *st), $(const char * n'), $(OCI_Object *d)) } |]
) | 238 | ociBindObject st n d = withCString n (\n' ->
fmap toBool [C.exp| int { OCI_BindObject($(OCI_Statement *st), $(const char * n'), $(OCI_Object *d)) } |]
) | 164 | true | true | 0 | 9 | 81 | 66 | 35 | 31 | null | null |
facebookincubator/duckling | Duckling/Numeral/PL/Rules.hs | bsd-3-clause | ruleFive :: Rule
ruleFive = Rule
{ name = "five"
, pattern =
[ regex "pi(e|ę)(c|ć)(iu|oma|u)?"
]
, prod = \_ -> integer 5
} | 139 | ruleFive :: Rule
ruleFive = Rule
{ name = "five"
, pattern =
[ regex "pi(e|ę)(c|ć)(iu|oma|u)?"
]
, prod = \_ -> integer 5
} | 139 | ruleFive = Rule
{ name = "five"
, pattern =
[ regex "pi(e|ę)(c|ć)(iu|oma|u)?"
]
, prod = \_ -> integer 5
} | 122 | false | true | 0 | 9 | 40 | 55 | 28 | 27 | null | null |
ssaavedra/liquidhaskell | docs/slides/NEU14/01_AbstractRefinements.hs | bsd-3-clause | {-@ diffs :: DiffList Integer @-}
diffs = 100 `C` 1000 `C` 10 `C` 1 `C` N | 78 | diffs = 100 `C` 1000 `C` 10 `C` 1 `C` N | 44 | diffs = 100 `C` 1000 `C` 10 `C` 1 `C` N | 44 | true | false | 0 | 8 | 21 | 31 | 20 | 11 | null | null |
jaiyalas/creepy-waffle | netwire/intClock.hs | mit | testW :: (HasTime t s,
Monad m,
Monoid e)
=> Wire s e m a String
testW = (pure "Bilp!") >>> for 2 >>> after 3
<|> (pure "zzz") | 158 | testW :: (HasTime t s,
Monad m,
Monoid e)
=> Wire s e m a String
testW = (pure "Bilp!") >>> for 2 >>> after 3
<|> (pure "zzz") | 158 | testW = (pure "Bilp!") >>> for 2 >>> after 3
<|> (pure "zzz") | 67 | false | true | 3 | 8 | 60 | 84 | 40 | 44 | null | null |
suhailshergill/liboleg | Language/TEval/TInfLetP.hs | bsd-3-clause | -- (TV 0 :> TInt,TVE 1 (fromList [(0,TInt)]))
-- need a better presentation of the final result: cf. teval' and teval
test1 = teval env0 term1 | 144 | test1 = teval env0 term1 | 24 | test1 = teval env0 term1 | 24 | true | false | 0 | 5 | 27 | 13 | 7 | 6 | null | null |
siddhanathan/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Generic data constructors
crossDataConKey, inlDataConKey, inrDataConKey, genUnitDataConKey :: Unique
crossDataConKey = mkPreludeDataConUnique 20 | 171 | crossDataConKey, inlDataConKey, inrDataConKey, genUnitDataConKey :: Unique
crossDataConKey = mkPreludeDataConUnique 20 | 142 | crossDataConKey = mkPreludeDataConUnique 20 | 67 | true | true | 0 | 5 | 37 | 21 | 14 | 7 | null | null |
mrakgr/futhark | src/Futhark/Analysis/HORepresentation/SOAC.hs | bsd-3-clause | -- | Add several transformations to the end of the transformation
-- list.
addTransforms :: ArrayTransforms -> Input -> Input
addTransforms ts (Input ots a t) = Input (ots <> ts) a t | 182 | addTransforms :: ArrayTransforms -> Input -> Input
addTransforms ts (Input ots a t) = Input (ots <> ts) a t | 107 | addTransforms ts (Input ots a t) = Input (ots <> ts) a t | 56 | true | true | 0 | 7 | 32 | 50 | 26 | 24 | null | null |
msakai/folkung | Haskell/Paradox/Flatten.hs | mit | flatten :: (Map Term Term) -> Clause -> [Clause]
flatten assignCons ls = simplify (defs ++ flatLs)
where
fls = free ls
vs = [ v
| i <- [1..]
, let v = vr % i
]
tab =
M.fromList
[ (t,v)
| (t,fv) <- S.toList (subterms ls) `zip` vs
, typ t /= bool
, let v = cas... | 1,588 | flatten :: (Map Term Term) -> Clause -> [Clause]
flatten assignCons ls = simplify (defs ++ flatLs)
where
fls = free ls
vs = [ v
| i <- [1..]
, let v = vr % i
]
tab =
M.fromList
[ (t,v)
| (t,fv) <- S.toList (subterms ls) `zip` vs
, typ t /= bool
, let v = cas... | 1,588 | flatten assignCons ls = simplify (defs ++ flatLs)
where
fls = free ls
vs = [ v
| i <- [1..]
, let v = vr % i
]
tab =
M.fromList
[ (t,v)
| (t,fv) <- S.toList (subterms ls) `zip` vs
, typ t /= bool
, let v = case t of
Var v -> v
... | 1,539 | false | true | 0 | 17 | 771 | 490 | 248 | 242 | null | null |
bgamari/pandoc | src/Text/Pandoc/Parsing.hs | gpl-2.0 | ---
-- Parse a grid table: starts with row of '-' on top, then header
-- (which may be grid), then the rows,
-- which may be grid, separated by blank lines, and
-- ending with a footer (dashed line followed by blank line).
gridTableWith :: Stream [Char] m Char
=> ParserT [Char] ParserState m [Block] -... | 615 | gridTableWith :: Stream [Char] m Char
=> ParserT [Char] ParserState m [Block] -- ^ Block list parser
-> Bool -- ^ Headerless table
-> ParserT [Char] ParserState m Block
gridTableWith blocks headless =
tableWith (gridTableHeader headless blocks... | 390 | gridTableWith blocks headless =
tableWith (gridTableHeader headless blocks) (gridTableRow blocks)
(gridTableSep '-') gridTableFooter | 146 | true | true | 0 | 10 | 176 | 108 | 55 | 53 | null | null |
ciderpunx/exercismo | src/AtBash.hs | gpl-3.0 | decode = map (k2a !) . filter isAlphaNum | 42 | decode = map (k2a !) . filter isAlphaNum | 42 | decode = map (k2a !) . filter isAlphaNum | 42 | false | false | 2 | 5 | 9 | 24 | 10 | 14 | null | null |
snoyberg/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | evTermCoercion (EvCast tm co) = mkCoCast (evTermCoercion tm) co | 64 | evTermCoercion (EvCast tm co) = mkCoCast (evTermCoercion tm) co | 64 | evTermCoercion (EvCast tm co) = mkCoCast (evTermCoercion tm) co | 64 | false | false | 0 | 7 | 9 | 28 | 13 | 15 | null | null |
bitemyapp/ghc-mod | Language/Haskell/GhcMod/Gap.hs | bsd-3-clause | pprInfo :: Bool -> (TyThing, GHC.Fixity, [ClsInst], [FamInst]) -> SDoc
pprInfo _ (thing, fixity, insts, famInsts)
= pprTyThingInContextLoc thing
$$ show_fixity fixity
$$ InstEnv.pprInstances insts
$$ pprFamInsts famInsts
where
show_fixity fx
| fx == defaultFixity = Outputable.empty
| othe... | 861 | pprInfo :: Bool -> (TyThing, GHC.Fixity, [ClsInst], [FamInst]) -> SDoc
pprInfo _ (thing, fixity, insts, famInsts)
= pprTyThingInContextLoc thing
$$ show_fixity fixity
$$ InstEnv.pprInstances insts
$$ pprFamInsts famInsts
where
show_fixity fx
| fx == defaultFixity = Outputable.empty
| othe... | 861 | pprInfo _ (thing, fixity, insts, famInsts)
= pprTyThingInContextLoc thing
$$ show_fixity fixity
$$ InstEnv.pprInstances insts
$$ pprFamInsts famInsts
where
show_fixity fx
| fx == defaultFixity = Outputable.empty
| otherwise = ppr fx <+> ppr (getName thing)
#else
pprInfo :: Print... | 790 | false | true | 6 | 9 | 173 | 137 | 69 | 68 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Sed.hs | gpl-2.0 | regex_'28'2f'29 = compileRegex True "(/)" | 41 | regex_'28'2f'29 = compileRegex True "(/)" | 41 | regex_'28'2f'29 = compileRegex True "(/)" | 41 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
weswilliams/learn-haskell | src/tree/tree.hs | mit | treeInsert x (Node a left right)
| x == a = Node x left right
| x < a = Node a (treeInsert x left) right
| x > a = Node a left (treeInsert x right) | 155 | treeInsert x (Node a left right)
| x == a = Node x left right
| x < a = Node a (treeInsert x left) right
| x > a = Node a left (treeInsert x right) | 155 | treeInsert x (Node a left right)
| x == a = Node x left right
| x < a = Node a (treeInsert x left) right
| x > a = Node a left (treeInsert x right) | 155 | false | false | 0 | 8 | 44 | 100 | 44 | 56 | null | null |
antivo/Playground | Haskell/Crossing puzzle/a_star_h2.hs | gpl-2.0 | minimum' [] e _ acc = (e,acc) | 45 | minimum' [] e _ acc = (e,acc) | 45 | minimum' [] e _ acc = (e,acc) | 45 | false | false | 1 | 6 | 22 | 26 | 12 | 14 | null | null |
vincenthz/hs-crypto-pubkey | Tests/PregenKeys.hs | bsd-2-clause | dsaParams = DSA.Params { DSA.params_p = p, DSA.params_g = g, DSA.params_q = q }
where
p = 0x00a8c44d7d0bbce69a39008948604b9c7b11951993a5a1a1fa995968da8bb27ad9101c5184bcde7c14fb79f7562a45791c3d80396cefb328e3e291932a17e22edd
g = 0x0bf9fe6c75d2367b88912b2252d20fdcad06b3f3a234b92863a1e30a96a123afd8e8a4b... | 434 | dsaParams = DSA.Params { DSA.params_p = p, DSA.params_g = g, DSA.params_q = q }
where
p = 0x00a8c44d7d0bbce69a39008948604b9c7b11951993a5a1a1fa995968da8bb27ad9101c5184bcde7c14fb79f7562a45791c3d80396cefb328e3e291932a17e22edd
g = 0x0bf9fe6c75d2367b88912b2252d20fdcad06b3f3a234b92863a1e30a96a123afd8e8a4b... | 434 | dsaParams = DSA.Params { DSA.params_p = p, DSA.params_g = g, DSA.params_q = q }
where
p = 0x00a8c44d7d0bbce69a39008948604b9c7b11951993a5a1a1fa995968da8bb27ad9101c5184bcde7c14fb79f7562a45791c3d80396cefb328e3e291932a17e22edd
g = 0x0bf9fe6c75d2367b88912b2252d20fdcad06b3f3a234b92863a1e30a96a123afd8e8a4b... | 434 | false | false | 4 | 6 | 51 | 68 | 31 | 37 | null | null |
gspindles/mj-score-eval | src/Game/Mahjong/Static/Melds.hs | mit | terminalSequences :: [Meld]
terminalSequences = [c123, c789, b123, b789, k123, k789] | 85 | terminalSequences :: [Meld]
terminalSequences = [c123, c789, b123, b789, k123, k789] | 84 | terminalSequences = [c123, c789, b123, b789, k123, k789] | 56 | false | true | 0 | 5 | 11 | 32 | 20 | 12 | null | null |
janschulz/pandoc | src/Text/Pandoc/Writers/ICML.hs | gpl-2.0 | upperRomanName = "upperRoman" | 32 | upperRomanName = "upperRoman" | 32 | upperRomanName = "upperRoman" | 32 | false | false | 1 | 5 | 5 | 10 | 3 | 7 | null | null |
andreasfrom/realtime_dynamic_int_heap | Main.hs | mit | runTests :: IO Bool
runTests = $quickCheckAll | 45 | runTests :: IO Bool
runTests = $quickCheckAll | 45 | runTests = $quickCheckAll | 25 | false | true | 0 | 6 | 6 | 21 | 8 | 13 | null | null |
AlexeyRaga/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | simpleOp ISraOp = Just $ normalOp ishr | 38 | simpleOp ISraOp = Just $ normalOp ishr | 38 | simpleOp ISraOp = Just $ normalOp ishr | 38 | false | false | 0 | 6 | 6 | 16 | 7 | 9 | null | null |
hvr/text | Data/Text/Lazy.hs | bsd-2-clause | compareText Empty _ = LT | 28 | compareText Empty _ = LT | 28 | compareText Empty _ = LT | 28 | false | false | 0 | 5 | 8 | 11 | 5 | 6 | null | null |
agocorona/MFlow | src/MFlow/Forms.hs | bsd-3-clause | -- | a synonym of noWidget that can be used in a monadic expression in the View monad does not continue
stop :: (FormInput view,
Monad m, Functor m) =>
View view m a
stop= Control.Applicative.empty | 207 | stop :: (FormInput view,
Monad m, Functor m) =>
View view m a
stop= Control.Applicative.empty | 103 | stop= Control.Applicative.empty | 31 | true | true | 0 | 7 | 45 | 49 | 24 | 25 | null | null |
ulricha/dsh-example-queries | Queries/SIGMOD/Layered.hs | bsd-3-clause | -- TPC-H query Q22
q22 :: [Text] -> Q [(Text, Integer, Decimal)]
q22 countries =
sortWith (\(view -> (country, _, _)) -> country)
[ tup3 country (length custs) (sum (map c_acctbalQ custs))
| (view -> (country, custs)) <- groupWithKey countryCodeOf pots
]
where
pots = potentialCustomers [ c | c <- ... | 406 | q22 :: [Text] -> Q [(Text, Integer, Decimal)]
q22 countries =
sortWith (\(view -> (country, _, _)) -> country)
[ tup3 country (length custs) (sum (map c_acctbalQ custs))
| (view -> (country, custs)) <- groupWithKey countryCodeOf pots
]
where
pots = potentialCustomers [ c | c <- customers, c `lives... | 387 | q22 countries =
sortWith (\(view -> (country, _, _)) -> country)
[ tup3 country (length custs) (sum (map c_acctbalQ custs))
| (view -> (country, custs)) <- groupWithKey countryCodeOf pots
]
where
pots = potentialCustomers [ c | c <- customers, c `livesIn` countries ]
-- | TPC-H Q22 with standard ... | 341 | true | true | 1 | 10 | 86 | 163 | 86 | 77 | null | null |
haskell/haddock | haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs | bsd-2-clause | richTokenStyle _ ClassTyDecl{} = ["hs-type"] | 52 | richTokenStyle _ ClassTyDecl{} = ["hs-type"] | 52 | richTokenStyle _ ClassTyDecl{} = ["hs-type"] | 52 | false | false | 0 | 6 | 12 | 18 | 9 | 9 | null | null |
anr/prog-haskell | chapter-04.hs | mit | or1 False True = True | 22 | or1 False True = True | 22 | or1 False True = True | 22 | false | false | 0 | 5 | 5 | 13 | 5 | 8 | null | null |
siddhanathan/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/Quit.hs | gpl-2.0 | action False False True = quitAllE | 35 | action False False True = quitAllE | 35 | action False False True = quitAllE | 35 | false | false | 1 | 5 | 6 | 19 | 6 | 13 | null | null |
agentm/project-m36 | src/lib/ProjectM36/DataTypes/Primitive.hs | unlicense | atomTypeForAtom (RelationalExprAtom _) = RelationalExprAtomType | 63 | atomTypeForAtom (RelationalExprAtom _) = RelationalExprAtomType | 63 | atomTypeForAtom (RelationalExprAtom _) = RelationalExprAtomType | 63 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
mariefarrell/Hets | utils/DtdToHaskell-src/current/Convert.hs | gpl-2.0 | mkData tss fs aux n = [DataDef aux n fs (map (mkConstr n) tss)]
where
mkConstr m ts = (mkConsName m ts, ts)
mkConsName (Name x m) sts = Name x (m ++ intercalate "_" (map flatten sts))
flatten (Maybe st) = {- "Maybe_" ++ -} flatten st
flatten (List st) = {- "List_" ++ -} flatten st
flatten (List1 s... | 733 | mkData tss fs aux n = [DataDef aux n fs (map (mkConstr n) tss)]
where
mkConstr m ts = (mkConsName m ts, ts)
mkConsName (Name x m) sts = Name x (m ++ intercalate "_" (map flatten sts))
flatten (Maybe st) = {- "Maybe_" ++ -} flatten st
flatten (List st) = {- "List_" ++ -} flatten st
flatten (List1 s... | 733 | mkData tss fs aux n = [DataDef aux n fs (map (mkConstr n) tss)]
where
mkConstr m ts = (mkConsName m ts, ts)
mkConsName (Name x m) sts = Name x (m ++ intercalate "_" (map flatten sts))
flatten (Maybe st) = {- "Maybe_" ++ -} flatten st
flatten (List st) = {- "List_" ++ -} flatten st
flatten (List1 s... | 733 | false | false | 6 | 10 | 224 | 294 | 131 | 163 | null | null |
charles-l/comp | build_me_a_scheme/scheme.hs | mit | evalAndPrint :: Env -> String -> IO ()
evalAndPrint env expr = evalString env expr >>= putStrLn | 95 | evalAndPrint :: Env -> String -> IO ()
evalAndPrint env expr = evalString env expr >>= putStrLn | 95 | evalAndPrint env expr = evalString env expr >>= putStrLn | 56 | false | true | 0 | 8 | 16 | 43 | 19 | 24 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/CLabel.hs | bsd-3-clause | mkApEntryLabel upd off = RtsLabel (RtsApEntry upd off) | 73 | mkApEntryLabel upd off = RtsLabel (RtsApEntry upd off) | 73 | mkApEntryLabel upd off = RtsLabel (RtsApEntry upd off) | 73 | false | false | 0 | 7 | 26 | 22 | 10 | 12 | null | null |
sopvop/cabal | Cabal/Distribution/Types/PackageDescription.hs | bsd-3-clause | lookupComponent :: PackageDescription -> ComponentName -> Maybe Component
lookupComponent pkg CLibName = fmap CLib (library pkg) | 128 | lookupComponent :: PackageDescription -> ComponentName -> Maybe Component
lookupComponent pkg CLibName = fmap CLib (library pkg) | 128 | lookupComponent pkg CLibName = fmap CLib (library pkg) | 54 | false | true | 0 | 7 | 15 | 38 | 18 | 20 | null | null |
ssaavedra/liquidhaskell | benchmarks/esop2013-submission/ListSort.hs | bsd-3-clause | append k [] ys = k : ys | 28 | append k [] ys = k : ys | 28 | append k [] ys = k : ys | 28 | false | false | 3 | 5 | 12 | 26 | 9 | 17 | null | null |
digitalmentat/orgmode-parse | test/Document.hs | bsd-3-clause | sampleAText :: Text
sampleAText = Text.concat [sampleParagraph,"* Test1", spaces 20,":Hi there:\n"
,"*\n"
," *\n"
,"* Test2 :Two:Tags:\n"
] | 246 | sampleAText :: Text
sampleAText = Text.concat [sampleParagraph,"* Test1", spaces 20,":Hi there:\n"
,"*\n"
," *\n"
,"* Test2 :Two:Tags:\n"
] | 246 | sampleAText = Text.concat [sampleParagraph,"* Test1", spaces 20,":Hi there:\n"
,"*\n"
," *\n"
,"* Test2 :Two:Tags:\n"
] | 226 | false | true | 0 | 7 | 124 | 46 | 24 | 22 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F23.hs | bsd-3-clause | ptr_glRenderbufferStorageMultisampleCoverageNV :: FunPtr (GLenum -> GLsizei -> GLsizei -> GLenum -> GLsizei -> GLsizei -> IO ())
ptr_glRenderbufferStorageMultisampleCoverageNV = unsafePerformIO $ getCommand "glRenderbufferStorageMultisampleCoverageNV" | 251 | ptr_glRenderbufferStorageMultisampleCoverageNV :: FunPtr (GLenum -> GLsizei -> GLsizei -> GLenum -> GLsizei -> GLsizei -> IO ())
ptr_glRenderbufferStorageMultisampleCoverageNV = unsafePerformIO $ getCommand "glRenderbufferStorageMultisampleCoverageNV" | 251 | ptr_glRenderbufferStorageMultisampleCoverageNV = unsafePerformIO $ getCommand "glRenderbufferStorageMultisampleCoverageNV" | 122 | false | true | 0 | 14 | 22 | 53 | 26 | 27 | null | null |
grnet/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvVncPasswordFile :: String
hvVncPasswordFile = "vnc_password_file" | 67 | hvVncPasswordFile :: String
hvVncPasswordFile = "vnc_password_file" | 67 | hvVncPasswordFile = "vnc_password_file" | 39 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/array/Data/Array/Base.hs | bsd-3-clause | {-| Constructs an immutable array from a pair of bounds and a list of
initial associations.
The bounds are specified as a pair of the lowest and highest bounds in
the array respectively. For example, a one-origin vector of length 10
has bounds (1,10), and a one-origin 10 by 10 matrix has bounds
((1,1),(10,10)).
An a... | 1,987 | array :: (IArray a e, Ix i)
=> (i,i) -- ^ bounds of the array: (lowest,highest)
-> [(i, e)] -- ^ list of associations
-> a i e
array (l,u) ies
= let n = safeRangeSize (l,u)
in unsafeArray (l,u)
[(safeIndex (l,u) n i, e) | (i, e) <- ies] | 304 | array (l,u) ies
= let n = safeRangeSize (l,u)
in unsafeArray (l,u)
[(safeIndex (l,u) n i, e) | (i, e) <- ies] | 140 | true | true | 0 | 11 | 419 | 138 | 77 | 61 | null | null |
whittle/linkedin-api | Data/API/LinkedIn/Profile.hs | mit | fieldName PositionsS = "positions" | 34 | fieldName PositionsS = "positions" | 34 | fieldName PositionsS = "positions" | 34 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
kylcarte/wangtiles | src/Data/TileMaps.hs | bsd-3-clause | -- }}}
-- Pretty Printing {{{
ppTileMaps :: (CoordType c) => TileMaps c -> String
ppTileMaps = unlines . map ppOne . tmsContents
where
ppOne (n,tm) = unlines
[ unpack n ++ ":"
, ppTileMap tm
]
-- }}} | 219 | ppTileMaps :: (CoordType c) => TileMaps c -> String
ppTileMaps = unlines . map ppOne . tmsContents
where
ppOne (n,tm) = unlines
[ unpack n ++ ":"
, ppTileMap tm
]
-- }}} | 187 | ppTileMaps = unlines . map ppOne . tmsContents
where
ppOne (n,tm) = unlines
[ unpack n ++ ":"
, ppTileMap tm
]
-- }}} | 135 | true | true | 0 | 7 | 58 | 77 | 40 | 37 | null | null |
brendanhay/gogol | gogol-cloudsearch/gen/Network/Google/Resource/CloudSearch/Operations/Lro/List.hs | mpl-2.0 | -- | The standard list page size.
ollPageSize :: Lens' OperationsLroList (Maybe Int32)
ollPageSize
= lens _ollPageSize (\ s a -> s{_ollPageSize = a}) .
mapping _Coerce | 175 | ollPageSize :: Lens' OperationsLroList (Maybe Int32)
ollPageSize
= lens _ollPageSize (\ s a -> s{_ollPageSize = a}) .
mapping _Coerce | 141 | ollPageSize
= lens _ollPageSize (\ s a -> s{_ollPageSize = a}) .
mapping _Coerce | 88 | true | true | 1 | 9 | 34 | 59 | 28 | 31 | null | null |
NickolayStorm/usatu-learning | Logical programming/CourseWork/Control/Cards.hs | mit | gradeAdvantage J = 1 | 20 | gradeAdvantage J = 1 | 20 | gradeAdvantage J = 1 | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 10150 = 5688 | 32 | getValueFromProduct 10150 = 5688 | 32 | getValueFromProduct 10150 = 5688 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/BuildTarget.hs | bsd-3-clause | nubMatches (ExactMatch d xs) = ExactMatch d (nub xs) | 58 | nubMatches (ExactMatch d xs) = ExactMatch d (nub xs) | 58 | nubMatches (ExactMatch d xs) = ExactMatch d (nub xs) | 58 | false | false | 0 | 7 | 14 | 30 | 13 | 17 | null | null |
mumuki/mulang | src/Language/Mulang/Parsers/C.hs | gpl-3.0 | muTypeSpecifier (CBoolType _) = Just "bool" | 45 | muTypeSpecifier (CBoolType _) = Just "bool" | 45 | muTypeSpecifier (CBoolType _) = Just "bool" | 45 | false | false | 0 | 7 | 7 | 18 | 8 | 10 | null | null |
duplode/threepenny-gui | src/Graphics/UI/Threepenny/Internal.hs | bsd-3-clause | fromJSObject :: JS.JSObject -> UI Element
fromJSObject el = do
window <- askWindow
liftIO $ do
Foreign.addReachable (JS.root $ jsWindow window) el
fromJSObject0 el window
-- | Add lazy FRP events to a JavaScript object. | 244 | fromJSObject :: JS.JSObject -> UI Element
fromJSObject el = do
window <- askWindow
liftIO $ do
Foreign.addReachable (JS.root $ jsWindow window) el
fromJSObject0 el window
-- | Add lazy FRP events to a JavaScript object. | 244 | fromJSObject el = do
window <- askWindow
liftIO $ do
Foreign.addReachable (JS.root $ jsWindow window) el
fromJSObject0 el window
-- | Add lazy FRP events to a JavaScript object. | 202 | false | true | 0 | 13 | 59 | 68 | 31 | 37 | null | null |
kim/amazonka | amazonka-workspaces/gen/Network/AWS/WorkSpaces/Types.hs | mpl-2.0 | -- | If the WorkSpace could not be created, this contains the error code.
w1ErrorCode :: Lens' Workspace (Maybe Text)
w1ErrorCode = lens _w1ErrorCode (\s a -> s { _w1ErrorCode = a }) | 182 | w1ErrorCode :: Lens' Workspace (Maybe Text)
w1ErrorCode = lens _w1ErrorCode (\s a -> s { _w1ErrorCode = a }) | 108 | w1ErrorCode = lens _w1ErrorCode (\s a -> s { _w1ErrorCode = a }) | 64 | true | true | 1 | 9 | 32 | 51 | 25 | 26 | null | null |
VictorDenisov/jdi | src/Language/Java/Jdwp.hs | gpl-2.0 | sourceFileCommand :: JavaReferenceTypeId -> PacketId -> Packet
sourceFileCommand
typeId@(JavaObjectId rSize _)
packetId =
CommandPacket
(11 + rSize)
packetId 0 2 7
(toStrict $ runPut $ putReferenceTypeId typeId) | 271 | sourceFileCommand :: JavaReferenceTypeId -> PacketId -> Packet
sourceFileCommand
typeId@(JavaObjectId rSize _)
packetId =
CommandPacket
(11 + rSize)
packetId 0 2 7
(toStrict $ runPut $ putReferenceTypeId typeId) | 271 | sourceFileCommand
typeId@(JavaObjectId rSize _)
packetId =
CommandPacket
(11 + rSize)
packetId 0 2 7
(toStrict $ runPut $ putReferenceTypeId typeId) | 208 | false | true | 1 | 8 | 86 | 84 | 36 | 48 | null | null |
trbauer/ebnf | LexicalAnalysis.hs | mit | fmtLiteralChar '`' = "BACKTICK" | 31 | fmtLiteralChar '`' = "BACKTICK" | 31 | fmtLiteralChar '`' = "BACKTICK" | 31 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
mightymoose/liquidhaskell | tests/todo/AbsRefNameClash.hs | bsd-3-clause | erge Empty h2 = h2
| 19 | merge Empty h2 = h2 | 19 | merge Empty h2 = h2 | 19 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
FranklinChen/Hugs | dotnet/lib/Dotnet/System/Xml/XmlReader.hs | bsd-3-clause | localName :: XmlReader a -> IO String
localName = invoke "get_LocalName" () | 75 | localName :: XmlReader a -> IO String
localName = invoke "get_LocalName" () | 75 | localName = invoke "get_LocalName" () | 37 | false | true | 0 | 6 | 11 | 28 | 13 | 15 | null | null |
nevrenato/Hets_Fork | CASL/AS_Basic_CASL.der.hs | gpl-2.0 | is_True_atom :: FORMULA f -> Bool
is_True_atom f = case f of
True_atom _ -> True
_ -> False | 95 | is_True_atom :: FORMULA f -> Bool
is_True_atom f = case f of
True_atom _ -> True
_ -> False | 95 | is_True_atom f = case f of
True_atom _ -> True
_ -> False | 61 | false | true | 3 | 6 | 22 | 38 | 19 | 19 | null | null |
tolysz/prepare-ghcjs | spec-lts8/aeson/Data/Aeson/TH.hs | bsd-3-clause | varTToNameMaybe (SigT t _) = varTToNameMaybe t | 46 | varTToNameMaybe (SigT t _) = varTToNameMaybe t | 46 | varTToNameMaybe (SigT t _) = varTToNameMaybe t | 46 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
jkr/pandoc-citeproc | src/Text/CSL/Input/Bibutils.hs | bsd-3-clause | metaValueToJSON (MetaString t) = toJSON t | 41 | metaValueToJSON (MetaString t) = toJSON t | 41 | metaValueToJSON (MetaString t) = toJSON t | 41 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/Sum.hs | bsd-3-clause | ssum (x:xs) = x + ssum xs | 27 | ssum (x:xs) = x + ssum xs | 27 | ssum (x:xs) = x + ssum xs | 27 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
eunmin/fpis-hs | src/Ch3.hs | bsd-3-clause | sumList :: [Integer] -> [Integer] -> [Integer]
sumList [] [] = [] | 65 | sumList :: [Integer] -> [Integer] -> [Integer]
sumList [] [] = [] | 65 | sumList [] [] = [] | 18 | false | true | 0 | 7 | 11 | 39 | 21 | 18 | null | null |
arnizamani/GslcTagger | gslctagger.hs | gpl-3.0 | getMostFrequent x tagmap' fcount =
let (tag,count) = maximumBy (compare `on` snd) . Map.toList $ tagmap'
-- (tg,fc) = case Map.lookup x fcount of
-- Nothing -> ("nil",0)
-- Just (tg,c) -> (tg,c)
-- tag = if tag'==tg then (fc > count ? tg $ ta... | 382 | getMostFrequent x tagmap' fcount =
let (tag,count) = maximumBy (compare `on` snd) . Map.toList $ tagmap'
-- (tg,fc) = case Map.lookup x fcount of
-- Nothing -> ("nil",0)
-- Just (tg,c) -> (tg,c)
-- tag = if tag'==tg then (fc > count ? tg $ ta... | 382 | getMostFrequent x tagmap' fcount =
let (tag,count) = maximumBy (compare `on` snd) . Map.toList $ tagmap'
-- (tg,fc) = case Map.lookup x fcount of
-- Nothing -> ("nil",0)
-- Just (tg,c) -> (tg,c)
-- tag = if tag'==tg then (fc > count ? tg $ ta... | 382 | false | false | 0 | 13 | 142 | 69 | 38 | 31 | null | null |
parsonsmatt/lambda | test/Lambda/Untyped/ParserSpec.hs | bsd-3-clause | spec :: Spec
spec = do
describe "lit" $ do
let p = parse literal ""
it "can parse a string" $ do
p "\"foobar\"" `shouldBe` pure (Str "foobar")
it "can parse a number" $ do
p "1234" `shouldBe` pure (Int 1234)
it "can parse a negative number" $ do
p ... | 3,099 | spec :: Spec
spec = do
describe "lit" $ do
let p = parse literal ""
it "can parse a string" $ do
p "\"foobar\"" `shouldBe` pure (Str "foobar")
it "can parse a number" $ do
p "1234" `shouldBe` pure (Int 1234)
it "can parse a negative number" $ do
p ... | 3,099 | spec = do
describe "lit" $ do
let p = parse literal ""
it "can parse a string" $ do
p "\"foobar\"" `shouldBe` pure (Str "foobar")
it "can parse a number" $ do
p "1234" `shouldBe` pure (Int 1234)
it "can parse a negative number" $ do
p "-123" `shoul... | 3,086 | false | true | 0 | 23 | 1,133 | 1,099 | 503 | 596 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.