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
oldmanmike/ghc
compiler/stgSyn/CoreToStg.hs
bsd-3-clause
-- When removing a binder, remember to add its type variables -- c.f. CoreFVs.delBinderFV elementOfFVInfo :: Id -> FreeVarsInfo -> Bool elementOfFVInfo id fvs = isJust (lookupVarEnv fvs id)
198
elementOfFVInfo :: Id -> FreeVarsInfo -> Bool elementOfFVInfo id fvs = isJust (lookupVarEnv fvs id)
99
elementOfFVInfo id fvs = isJust (lookupVarEnv fvs id)
53
true
true
0
8
37
42
20
22
null
null
tpsinnem/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
bcBin :: (Char -> Char -> Bool) -> [Const] -> Maybe Const bcBin op [Ch x, Ch y] = let i = (if op x y then 1 else 0) in Just $ I i
153
bcBin :: (Char -> Char -> Bool) -> [Const] -> Maybe Const bcBin op [Ch x, Ch y] = let i = (if op x y then 1 else 0) in Just $ I i
153
bcBin op [Ch x, Ch y] = let i = (if op x y then 1 else 0) in Just $ I i
95
false
true
0
11
58
92
45
47
null
null
gcampax/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprStmtContext MDoExpr = ptext (sLit "'mdo' block")
59
pprStmtContext MDoExpr = ptext (sLit "'mdo' block")
59
pprStmtContext MDoExpr = ptext (sLit "'mdo' block")
59
false
false
0
7
14
18
8
10
null
null
dragosboca/xmobar
src/Plugins/Monitors/Batt.hs
bsd-3-clause
readBattery sc files = do a <- grab $ fFull files b <- grab $ fNow files d <- grab $ fCurrent files let sc' = if isCurrent files then sc / 10 else sc return $ Battery (3600 * a / sc') -- wattseconds (3600 * b / sc') -- wattseconds (d / sc') -- watts where grab f = handle onError $ withFile f ReadMode (fmap read . hGetLine) onError = const (return (-1)) :: SomeException -> IO Float
477
readBattery sc files = do a <- grab $ fFull files b <- grab $ fNow files d <- grab $ fCurrent files let sc' = if isCurrent files then sc / 10 else sc return $ Battery (3600 * a / sc') -- wattseconds (3600 * b / sc') -- wattseconds (d / sc') -- watts where grab f = handle onError $ withFile f ReadMode (fmap read . hGetLine) onError = const (return (-1)) :: SomeException -> IO Float
477
readBattery sc files = do a <- grab $ fFull files b <- grab $ fNow files d <- grab $ fCurrent files let sc' = if isCurrent files then sc / 10 else sc return $ Battery (3600 * a / sc') -- wattseconds (3600 * b / sc') -- wattseconds (d / sc') -- watts where grab f = handle onError $ withFile f ReadMode (fmap read . hGetLine) onError = const (return (-1)) :: SomeException -> IO Float
477
false
false
6
11
174
200
92
108
null
null
bmsherman/magma-gpu
Foreign/CUDA/Magma/TH.hs
bsd-3-clause
inT (ArrC t) = inT' (typeDat t) where inT' (TD ct hst c2hs (hs2c,purity)) = TI (pointerify ct) (convertT [t| [ $(hst) ] |] exp) (Just (destroyT [| F.free |])) where exp = case purity of Pure -> [| F.newArray . map $(hs2c) |] ; Monadic -> undefined
269
inT (ArrC t) = inT' (typeDat t) where inT' (TD ct hst c2hs (hs2c,purity)) = TI (pointerify ct) (convertT [t| [ $(hst) ] |] exp) (Just (destroyT [| F.free |])) where exp = case purity of Pure -> [| F.newArray . map $(hs2c) |] ; Monadic -> undefined
269
inT (ArrC t) = inT' (typeDat t) where inT' (TD ct hst c2hs (hs2c,purity)) = TI (pointerify ct) (convertT [t| [ $(hst) ] |] exp) (Just (destroyT [| F.free |])) where exp = case purity of Pure -> [| F.newArray . map $(hs2c) |] ; Monadic -> undefined
269
false
false
1
8
69
129
65
64
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/SWHS/IMods.hs
bsd-2-clause
eBalanceOnWtrDerivDesc1 :: Sentence -> Sentence-> Sentence -> ConceptInstance -> Sentence eBalanceOnWtrDerivDesc1 htEnd oa ea htA = foldlSentCol [ S "To find the", phrase rOfChng `sOf` E (sy tempW) `sC` S "we look at the", phrase energy, S "balance on" +:+. phrase water, S "The", phrase vol, S "being considered" `isThe` (phrase vol `sOf` phrase water), S "in the", phrase tank, E (sy wVol) `sC` S "which has", phrase mass +:+. (E (sy wMass) `sAnd` phrase heatCapSpec `sC` E (sy htCapW)), atStart heatTrans, S "occurs in the", phrase water, S "from the", phrase coil, S "as", E $ sy htFluxC, sParen (makeRef2S htFluxWaterFromCoil) +:+ htEnd `sC` EmptyS +:+. oa, ea, S "No", phrase heatTrans, S "occurs to", S "outside" `ofThe` phrase tank `sC` S "since it has been assumed to be perfectly insulated" +:+. sParen (makeRef2S assumpPIT), S "Since the", phrase assumption, S "is made that no internal heat is generated" +:+. (sParen (makeRef2S htA) `sC` E (sy volHtGen $= 0)), S "Therefore" `sC` S "the", phrase equation, S "for", makeRef2S rocTempSimp, S "can be written as"]
1,097
eBalanceOnWtrDerivDesc1 :: Sentence -> Sentence-> Sentence -> ConceptInstance -> Sentence eBalanceOnWtrDerivDesc1 htEnd oa ea htA = foldlSentCol [ S "To find the", phrase rOfChng `sOf` E (sy tempW) `sC` S "we look at the", phrase energy, S "balance on" +:+. phrase water, S "The", phrase vol, S "being considered" `isThe` (phrase vol `sOf` phrase water), S "in the", phrase tank, E (sy wVol) `sC` S "which has", phrase mass +:+. (E (sy wMass) `sAnd` phrase heatCapSpec `sC` E (sy htCapW)), atStart heatTrans, S "occurs in the", phrase water, S "from the", phrase coil, S "as", E $ sy htFluxC, sParen (makeRef2S htFluxWaterFromCoil) +:+ htEnd `sC` EmptyS +:+. oa, ea, S "No", phrase heatTrans, S "occurs to", S "outside" `ofThe` phrase tank `sC` S "since it has been assumed to be perfectly insulated" +:+. sParen (makeRef2S assumpPIT), S "Since the", phrase assumption, S "is made that no internal heat is generated" +:+. (sParen (makeRef2S htA) `sC` E (sy volHtGen $= 0)), S "Therefore" `sC` S "the", phrase equation, S "for", makeRef2S rocTempSimp, S "can be written as"]
1,097
eBalanceOnWtrDerivDesc1 htEnd oa ea htA = foldlSentCol [ S "To find the", phrase rOfChng `sOf` E (sy tempW) `sC` S "we look at the", phrase energy, S "balance on" +:+. phrase water, S "The", phrase vol, S "being considered" `isThe` (phrase vol `sOf` phrase water), S "in the", phrase tank, E (sy wVol) `sC` S "which has", phrase mass +:+. (E (sy wMass) `sAnd` phrase heatCapSpec `sC` E (sy htCapW)), atStart heatTrans, S "occurs in the", phrase water, S "from the", phrase coil, S "as", E $ sy htFluxC, sParen (makeRef2S htFluxWaterFromCoil) +:+ htEnd `sC` EmptyS +:+. oa, ea, S "No", phrase heatTrans, S "occurs to", S "outside" `ofThe` phrase tank `sC` S "since it has been assumed to be perfectly insulated" +:+. sParen (makeRef2S assumpPIT), S "Since the", phrase assumption, S "is made that no internal heat is generated" +:+. (sParen (makeRef2S htA) `sC` E (sy volHtGen $= 0)), S "Therefore" `sC` S "the", phrase equation, S "for", makeRef2S rocTempSimp, S "can be written as"]
1,007
false
true
0
13
199
434
223
211
null
null
holzensp/ghc
libraries/base/Data/List.hs
bsd-3-clause
-- | The 'elemIndices' function extends 'elemIndex', by returning the -- indices of all elements equal to the query element, in ascending order. elemIndices :: Eq a => a -> [a] -> [Int] elemIndices x = findIndices (x==)
225
elemIndices :: Eq a => a -> [a] -> [Int] elemIndices x = findIndices (x==)
80
elemIndices x = findIndices (x==)
35
true
true
0
10
43
49
25
24
null
null
andreasabel/helf
src/DynArray.hs
mit
fromFreqList :: [(Int,a)] -> DynArray a fromFreqList l = let n = length l in if n <= 0 then empty else fromFreqList' n l
122
fromFreqList :: [(Int,a)] -> DynArray a fromFreqList l = let n = length l in if n <= 0 then empty else fromFreqList' n l
122
fromFreqList l = let n = length l in if n <= 0 then empty else fromFreqList' n l
82
false
true
0
9
26
61
31
30
null
null
opqdonut/riot
Ginsu/GenUtil.hs
gpl-2.0
oldl1M :: Monad m => (a -> a -> m a) -> [a] -> m a foldl1M f (x:xs) = foldlM f x xs
85
foldl1M :: Monad m => (a -> a -> m a) -> [a] -> m a foldl1M f (x:xs) = foldlM f x xs
85
foldl1M f (x:xs) = foldlM f x xs
32
false
true
0
10
25
69
33
36
null
null
sixears/getopt
src/Console/Getopt/ArgArity.hs
mit
liftAA ArgMaybe = ConE 'ArgMaybe
37
liftAA ArgMaybe = ConE 'ArgMaybe
37
liftAA ArgMaybe = ConE 'ArgMaybe
37
false
false
0
5
9
13
6
7
null
null
dmbarbour/Sirea
src/Sirea/Clock.hs
bsd-3-clause
-- frequency to clockspeck freqToCS :: Rational -> ClockSpec freqToCS r = if (0 == r) then ClockSpec 0 0 else ClockSpec (recip r) 0
131
freqToCS :: Rational -> ClockSpec freqToCS r = if (0 == r) then ClockSpec 0 0 else ClockSpec (recip r) 0
104
freqToCS r = if (0 == r) then ClockSpec 0 0 else ClockSpec (recip r) 0
70
true
true
0
8
24
50
26
24
null
null
neothemachine/monadiccp
examples/AllInterval.hs
bsd-3-clause
model :: ExampleModel ModelInt -- type signature model n = -- function 'model' takes argument n exists $ \x -> do -- request a (collection) variable x size x @= n -- whose size must be n d <- diffList x -- d becomes the diffList of x x `allin` (cte 0,n-1) -- all x elements are in [0..n-1] d `allin` (cte 1,n-1) -- all d elements are in [1..n-1] allDiff x -- all x elements are different allDiff d -- all d elements are different x @!! 0 @< x @!! 1 -- some symmetry breaking d @!! 0 @> d ! (n-2) -- some symmetry breaking return x -- return the list itself
776
model :: ExampleModel ModelInt model n = -- function 'model' takes argument n exists $ \x -> do -- request a (collection) variable x size x @= n -- whose size must be n d <- diffList x -- d becomes the diffList of x x `allin` (cte 0,n-1) -- all x elements are in [0..n-1] d `allin` (cte 1,n-1) -- all d elements are in [1..n-1] allDiff x -- all x elements are different allDiff d -- all d elements are different x @!! 0 @< x @!! 1 -- some symmetry breaking d @!! 0 @> d ! (n-2) -- some symmetry breaking return x -- return the list itself
754
model n = -- function 'model' takes argument n exists $ \x -> do -- request a (collection) variable x size x @= n -- whose size must be n d <- diffList x -- d becomes the diffList of x x `allin` (cte 0,n-1) -- all x elements are in [0..n-1] d `allin` (cte 1,n-1) -- all d elements are in [1..n-1] allDiff x -- all x elements are different allDiff d -- all d elements are different x @!! 0 @< x @!! 1 -- some symmetry breaking d @!! 0 @> d ! (n-2) -- some symmetry breaking return x -- return the list itself
723
true
true
3
11
334
161
81
80
null
null
FranklinChen/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
lookupBinder :: Eq n => n -> EnvTT n -> Maybe (Binder (TT n)) lookupBinder n = lookup n . envBinders
100
lookupBinder :: Eq n => n -> EnvTT n -> Maybe (Binder (TT n)) lookupBinder n = lookup n . envBinders
100
lookupBinder n = lookup n . envBinders
38
false
true
0
13
20
59
26
33
null
null
NorfairKing/super-user-spark
src/SuperUserSpark/OptParse.hs
mit
parseDeploy :: ParserInfo Dispatch parseDeploy = info parser modifier where parser = DispatchDeploy <$> parseDeployArgs modifier = fullDesc <> progDesc "Deploy a spark card."
184
parseDeploy :: ParserInfo Dispatch parseDeploy = info parser modifier where parser = DispatchDeploy <$> parseDeployArgs modifier = fullDesc <> progDesc "Deploy a spark card."
184
parseDeploy = info parser modifier where parser = DispatchDeploy <$> parseDeployArgs modifier = fullDesc <> progDesc "Deploy a spark card."
149
false
true
6
6
33
58
22
36
null
null
acowley/roshask
src/Ros/Internal/DepFinder.hs
bsd-3-clause
-- Find the path to a package based on the given search paths. findPackagePath :: [FilePath] -> Package -> Maybe FilePath findPackagePath search pkg = find ((== pkg) . last . splitPath) search
192
findPackagePath :: [FilePath] -> Package -> Maybe FilePath findPackagePath search pkg = find ((== pkg) . last . splitPath) search
129
findPackagePath search pkg = find ((== pkg) . last . splitPath) search
70
true
true
0
9
32
51
27
24
null
null
wxwxwwxxx/ghc
compiler/basicTypes/SrcLoc.hs
bsd-3-clause
combineLocs :: Located a -> Located b -> SrcSpan combineLocs a b = combineSrcSpans (getLoc a) (getLoc b)
104
combineLocs :: Located a -> Located b -> SrcSpan combineLocs a b = combineSrcSpans (getLoc a) (getLoc b)
104
combineLocs a b = combineSrcSpans (getLoc a) (getLoc b)
55
false
true
0
7
17
47
22
25
null
null
CIFASIS/QuickFuzz
src/Test/QuickFuzz/Derive/Mutation.hs
gpl-3.0
muttC c vars = doE $ map (\ (b,x) -> bindS (varP x) (freqE b x)) vars ++ [ noBindS $ appE (varE 'return) $ foldl (\r (_,x) -> appE r (varE x)) (conE c) vars]
186
muttC c vars = doE $ map (\ (b,x) -> bindS (varP x) (freqE b x)) vars ++ [ noBindS $ appE (varE 'return) $ foldl (\r (_,x) -> appE r (varE x)) (conE c) vars]
186
muttC c vars = doE $ map (\ (b,x) -> bindS (varP x) (freqE b x)) vars ++ [ noBindS $ appE (varE 'return) $ foldl (\r (_,x) -> appE r (varE x)) (conE c) vars]
186
false
false
5
13
64
126
61
65
null
null
lukexi/ghc-7.8-arm64
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp _ res ReadByteArrayOp_Double args = doIndexByteArrayOp Nothing f64 res args
103
emitPrimOp _ res ReadByteArrayOp_Double args = doIndexByteArrayOp Nothing f64 res args
103
emitPrimOp _ res ReadByteArrayOp_Double args = doIndexByteArrayOp Nothing f64 res args
103
false
false
1
5
27
28
11
17
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
3934 = 3933
11
3934 = 3933
11
3934 = 3933
11
false
false
1
5
2
10
3
7
null
null
GaloisInc/verification-game
web-prover/src/SolutionMap.hs
bsd-3-clause
-- | Update the HEAD to point to the given solution. setHead :: Writeable (Shared s) => SiteState s -> FunName -> TaskGroup -> Text -> IO () setHead siteState fun tg nm = do let cont = L.fromStrict (Text.encodeUtf8 (nm `Text.append` "\n")) let headFile = taskGroupSolutionHEADFile fun tg storageWriteFile (siteSharedStorage siteState) headFile cont {- | Save an axiomatic solution and return its name. Assumes that the pre- and post-condition expressions have parameters from 'names' (see module "Prove"). -}
524
setHead :: Writeable (Shared s) => SiteState s -> FunName -> TaskGroup -> Text -> IO () setHead siteState fun tg nm = do let cont = L.fromStrict (Text.encodeUtf8 (nm `Text.append` "\n")) let headFile = taskGroupSolutionHEADFile fun tg storageWriteFile (siteSharedStorage siteState) headFile cont {- | Save an axiomatic solution and return its name. Assumes that the pre- and post-condition expressions have parameters from 'names' (see module "Prove"). -}
471
setHead siteState fun tg nm = do let cont = L.fromStrict (Text.encodeUtf8 (nm `Text.append` "\n")) let headFile = taskGroupSolutionHEADFile fun tg storageWriteFile (siteSharedStorage siteState) headFile cont {- | Save an axiomatic solution and return its name. Assumes that the pre- and post-condition expressions have parameters from 'names' (see module "Prove"). -}
381
true
true
0
15
94
127
60
67
null
null
RaminHAL9001/Dao
src/Language/Interpreter/Dao/DefaultBIFs.hs
agpl-3.0
_daoget :: (DaoDecode dict, DaoDecode key, Show key) -- TODO remove Show => (key -> dict -> Maybe DaoExpr) -> DaoMacro DaoExpr _daoget lookup = do let getatom = DaoAtom "get" let badkey = DaoString "incorrect key type for lookup target" let info = [("reason", badkey), ("function", getatom)] (listLen, keys) <- mplus (((,) Nothing) . pure <$> argDecode info) (do keysList <- argDecode info liftM ((,) $ Just $ length keysList) $ forM (toList $ unwrapList keysList) $ \ key -> case daoDecode key of Right key -> return key Left err -> matchQuit $ let info = errorAppendInfo in info "reason" badkey . info "function" getatom . info "bad-key" key $ err ) dict <- argEvalDeepDecode info deflt <- argEvalDeepDecode [] <|> return DaoVoid flip returnIfEnd [("function", getatom)] $ case listLen of Just len -> maybe DaoNull DaoList $ sizedMaybeList len (maybe deflt id . flip lookup dict <$> keys) deflt Nothing -> case keys of [] -> deflt key : _ -> maybe deflt id $ lookup key dict -- | Perform a lookup on a dictionary or list, returning 'DaoVoid' or an optional @default-value@ if -- the key does not exist. This is a 'DaoNonStrict' function which does not evaluate the key if it -- is an 'Language.Interpreter.Dao.Kernel.Atom'. -- -- > (get key dictionary default-value) -- > (get index list default-value) -- -- The dictionary and default values are evaluated before performing the lookup, but the key is not -- evaluated unless it is a form. This allows you to specify an atom without it being looked up in -- the local variable stack. -- -- First parameter format: dictionary and a single key, with an optional default value to be -- returned if the key is undefined. Returns the value associated with the key in the dictionary or -- list. -- -- Examples: -- -- 1. Get's the value associated with the key @aaa@. -- -- > (get aaa {:aaa 1}) ---> returns 1 -- -- 2. The key @bbb@ does not exist, so it returns the given default value zero @0@: -- -- > (get bbb {:aaa 1} 0) ---> returns 0 -- -- 3. Get the first element in the list, returns the 'Language.Interpreter.Dao.Kernel.Atom' @a@: -- -- > (get 0 [a b c d]) -- -- 4. Get an undefined index: -- -- > (get (+ 3 1) [a b c d] (atom nothing)) ---> returns ('Language.Interpreter.Dao.Kernel.DaoAtom' "nothing") -- -- 5. Get an integer index, where the integer is assigned to a variable name, returns -- @'Language.Intgerpreter.Dao.Kernel.DaoString' "one"@: -- -- > (do let key = 1; get (@ key) ["zero" "one" "two" "three"];) --
2,642
_daoget :: (DaoDecode dict, DaoDecode key, Show key) -- TODO remove Show => (key -> dict -> Maybe DaoExpr) -> DaoMacro DaoExpr _daoget lookup = do let getatom = DaoAtom "get" let badkey = DaoString "incorrect key type for lookup target" let info = [("reason", badkey), ("function", getatom)] (listLen, keys) <- mplus (((,) Nothing) . pure <$> argDecode info) (do keysList <- argDecode info liftM ((,) $ Just $ length keysList) $ forM (toList $ unwrapList keysList) $ \ key -> case daoDecode key of Right key -> return key Left err -> matchQuit $ let info = errorAppendInfo in info "reason" badkey . info "function" getatom . info "bad-key" key $ err ) dict <- argEvalDeepDecode info deflt <- argEvalDeepDecode [] <|> return DaoVoid flip returnIfEnd [("function", getatom)] $ case listLen of Just len -> maybe DaoNull DaoList $ sizedMaybeList len (maybe deflt id . flip lookup dict <$> keys) deflt Nothing -> case keys of [] -> deflt key : _ -> maybe deflt id $ lookup key dict -- | Perform a lookup on a dictionary or list, returning 'DaoVoid' or an optional @default-value@ if -- the key does not exist. This is a 'DaoNonStrict' function which does not evaluate the key if it -- is an 'Language.Interpreter.Dao.Kernel.Atom'. -- -- > (get key dictionary default-value) -- > (get index list default-value) -- -- The dictionary and default values are evaluated before performing the lookup, but the key is not -- evaluated unless it is a form. This allows you to specify an atom without it being looked up in -- the local variable stack. -- -- First parameter format: dictionary and a single key, with an optional default value to be -- returned if the key is undefined. Returns the value associated with the key in the dictionary or -- list. -- -- Examples: -- -- 1. Get's the value associated with the key @aaa@. -- -- > (get aaa {:aaa 1}) ---> returns 1 -- -- 2. The key @bbb@ does not exist, so it returns the given default value zero @0@: -- -- > (get bbb {:aaa 1} 0) ---> returns 0 -- -- 3. Get the first element in the list, returns the 'Language.Interpreter.Dao.Kernel.Atom' @a@: -- -- > (get 0 [a b c d]) -- -- 4. Get an undefined index: -- -- > (get (+ 3 1) [a b c d] (atom nothing)) ---> returns ('Language.Interpreter.Dao.Kernel.DaoAtom' "nothing") -- -- 5. Get an integer index, where the integer is assigned to a variable name, returns -- @'Language.Intgerpreter.Dao.Kernel.DaoString' "one"@: -- -- > (do let key = 1; get (@ key) ["zero" "one" "two" "three"];) --
2,642
_daoget lookup = do let getatom = DaoAtom "get" let badkey = DaoString "incorrect key type for lookup target" let info = [("reason", badkey), ("function", getatom)] (listLen, keys) <- mplus (((,) Nothing) . pure <$> argDecode info) (do keysList <- argDecode info liftM ((,) $ Just $ length keysList) $ forM (toList $ unwrapList keysList) $ \ key -> case daoDecode key of Right key -> return key Left err -> matchQuit $ let info = errorAppendInfo in info "reason" badkey . info "function" getatom . info "bad-key" key $ err ) dict <- argEvalDeepDecode info deflt <- argEvalDeepDecode [] <|> return DaoVoid flip returnIfEnd [("function", getatom)] $ case listLen of Just len -> maybe DaoNull DaoList $ sizedMaybeList len (maybe deflt id . flip lookup dict <$> keys) deflt Nothing -> case keys of [] -> deflt key : _ -> maybe deflt id $ lookup key dict -- | Perform a lookup on a dictionary or list, returning 'DaoVoid' or an optional @default-value@ if -- the key does not exist. This is a 'DaoNonStrict' function which does not evaluate the key if it -- is an 'Language.Interpreter.Dao.Kernel.Atom'. -- -- > (get key dictionary default-value) -- > (get index list default-value) -- -- The dictionary and default values are evaluated before performing the lookup, but the key is not -- evaluated unless it is a form. This allows you to specify an atom without it being looked up in -- the local variable stack. -- -- First parameter format: dictionary and a single key, with an optional default value to be -- returned if the key is undefined. Returns the value associated with the key in the dictionary or -- list. -- -- Examples: -- -- 1. Get's the value associated with the key @aaa@. -- -- > (get aaa {:aaa 1}) ---> returns 1 -- -- 2. The key @bbb@ does not exist, so it returns the given default value zero @0@: -- -- > (get bbb {:aaa 1} 0) ---> returns 0 -- -- 3. Get the first element in the list, returns the 'Language.Interpreter.Dao.Kernel.Atom' @a@: -- -- > (get 0 [a b c d]) -- -- 4. Get an undefined index: -- -- > (get (+ 3 1) [a b c d] (atom nothing)) ---> returns ('Language.Interpreter.Dao.Kernel.DaoAtom' "nothing") -- -- 5. Get an integer index, where the integer is assigned to a variable name, returns -- @'Language.Intgerpreter.Dao.Kernel.DaoString' "one"@: -- -- > (do let key = 1; get (@ key) ["zero" "one" "two" "three"];) --
2,509
false
true
0
24
606
466
242
224
null
null
elieux/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind lookupEvBind bs = lookupDVarEnv (ev_bind_varenv bs)
102
lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind lookupEvBind bs = lookupDVarEnv (ev_bind_varenv bs)
102
lookupEvBind bs = lookupDVarEnv (ev_bind_varenv bs)
51
false
true
0
7
13
34
16
18
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpOutOfLine CasArrayOp = True
33
primOpOutOfLine CasArrayOp = True
33
primOpOutOfLine CasArrayOp = True
33
false
false
0
4
3
10
4
6
null
null
nightscape/platform
shared/src/Unison/Var.hs
mit
freshNamed :: Var v => Set v -> Text -> v freshNamed used n = freshIn used (named n)
84
freshNamed :: Var v => Set v -> Text -> v freshNamed used n = freshIn used (named n)
84
freshNamed used n = freshIn used (named n)
42
false
true
0
9
18
50
22
28
null
null
anchor/haskell-opensrs
lib/Data/OpenSRS/ToXML.hs
bsd-3-clause
-- | Pack a maybe string value into an itemNode mayPair :: String -> Maybe String -> Node mayPair k v = itemNode k $ fromMaybe "" v
131
mayPair :: String -> Maybe String -> Node mayPair k v = itemNode k $ fromMaybe "" v
83
mayPair k v = itemNode k $ fromMaybe "" v
41
true
true
0
7
27
40
19
21
null
null
nlander/bazaari
src/Bazaari/Http.hs
bsd-3-clause
renderGregorian :: (Integer, Int, Int) -> ByteString renderGregorian (year, month, day) = rendY year <> "-" <> rendInt month <> "-" <> rendInt day where rendY = LB.toStrict . toLazyByteString . integerDec
246
renderGregorian :: (Integer, Int, Int) -> ByteString renderGregorian (year, month, day) = rendY year <> "-" <> rendInt month <> "-" <> rendInt day where rendY = LB.toStrict . toLazyByteString . integerDec
246
renderGregorian (year, month, day) = rendY year <> "-" <> rendInt month <> "-" <> rendInt day where rendY = LB.toStrict . toLazyByteString . integerDec
186
false
true
0
8
73
81
41
40
null
null
nickbart1980/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
circ 'c' = "ĉ"
14
circ 'c' = "ĉ"
14
circ 'c' = "ĉ"
14
false
false
0
5
3
9
4
5
null
null
soupi/pureli
src/Language/Pureli/Module.hs
bsd-3-clause
envIfNoDups :: Monad m => Name -> Env -> MT.ExceptT Error m Env envIfNoDups mName env = do let dups = duplicates $ map fst (M.toList env) if not (null dups) then MT.throwE $ Error Nothing $ "Duplicate definitions in module: " ++ withYellow mName ++ withRed "\n*** " ++ show (map withBlue dups) else return env
317
envIfNoDups :: Monad m => Name -> Env -> MT.ExceptT Error m Env envIfNoDups mName env = do let dups = duplicates $ map fst (M.toList env) if not (null dups) then MT.throwE $ Error Nothing $ "Duplicate definitions in module: " ++ withYellow mName ++ withRed "\n*** " ++ show (map withBlue dups) else return env
317
envIfNoDups mName env = do let dups = duplicates $ map fst (M.toList env) if not (null dups) then MT.throwE $ Error Nothing $ "Duplicate definitions in module: " ++ withYellow mName ++ withRed "\n*** " ++ show (map withBlue dups) else return env
253
false
true
0
14
64
131
61
70
null
null
OpenXT/manager
xenmgr/XenMgr/Expose/HostObject.hs
gpl-2.0
_ListDiskDevices :: Rpc [Map String String] _ListDiskDevices = do devs <- liftIO getHostStorageDevices return . map fromStorageDev $ devs where fromStorageDev d = M.fromList [ ("udi", storageUDI d) , ("block-device", storageBlockDevPath d) ]
298
_ListDiskDevices :: Rpc [Map String String] _ListDiskDevices = do devs <- liftIO getHostStorageDevices return . map fromStorageDev $ devs where fromStorageDev d = M.fromList [ ("udi", storageUDI d) , ("block-device", storageBlockDevPath d) ]
298
_ListDiskDevices = do devs <- liftIO getHostStorageDevices return . map fromStorageDev $ devs where fromStorageDev d = M.fromList [ ("udi", storageUDI d) , ("block-device", storageBlockDevPath d) ]
254
false
true
0
9
89
86
42
44
null
null
arnabgho/RLearnHaskell
examples/CatMouse.hs
mit
coordToInteger :: Pair -> Integer coordToInteger (x, y) = (x - 1) * boardDim + y - 1
84
coordToInteger :: Pair -> Integer coordToInteger (x, y) = (x - 1) * boardDim + y - 1
84
coordToInteger (x, y) = (x - 1) * boardDim + y - 1
50
false
true
0
9
17
49
24
25
null
null
m4lvin/robbed
src/Data/ROBDD/Types.hs
bsd-3-clause
varBddCmp v (BDD _ b _ _ _) = v `compare` b
43
varBddCmp v (BDD _ b _ _ _) = v `compare` b
43
varBddCmp v (BDD _ b _ _ _) = v `compare` b
43
false
false
0
6
11
33
16
17
null
null
haskellbr/missingh
missingh-all/src/Data/BinPacking.hs
mit
packLargeFirst :: BinPacker packLargeFirst bins sizes = packLargeFirst' bins (sortBy fstSort sizes) where fstSort a b = compare (fst a) (fst b)
147
packLargeFirst :: BinPacker packLargeFirst bins sizes = packLargeFirst' bins (sortBy fstSort sizes) where fstSort a b = compare (fst a) (fst b)
147
packLargeFirst bins sizes = packLargeFirst' bins (sortBy fstSort sizes) where fstSort a b = compare (fst a) (fst b)
119
false
true
1
7
25
68
29
39
null
null
dpac-vlsi/Sigil-Trace-Visualizer
haskell/stgraph/app/Main.hs
bsd-2-clause
one = zero + 1
14
one = zero + 1
14
one = zero + 1
14
false
false
0
5
4
10
5
5
null
null
linusyang/barrelfish
tools/flounder/LMP.hs
mit
lmp_init_function_proto :: String -> C.Unit lmp_init_function_proto n = C.GVarDecl C.Extern C.NonConst (C.Function C.NoScope C.Void params) name Nothing where name = lmp_init_fn_name n params = [C.Param (C.Ptr $ C.Struct (lmp_bind_type n)) "b", C.Param (C.Ptr $ C.Struct "waitset") "waitset"]
340
lmp_init_function_proto :: String -> C.Unit lmp_init_function_proto n = C.GVarDecl C.Extern C.NonConst (C.Function C.NoScope C.Void params) name Nothing where name = lmp_init_fn_name n params = [C.Param (C.Ptr $ C.Struct (lmp_bind_type n)) "b", C.Param (C.Ptr $ C.Struct "waitset") "waitset"]
340
lmp_init_function_proto n = C.GVarDecl C.Extern C.NonConst (C.Function C.NoScope C.Void params) name Nothing where name = lmp_init_fn_name n params = [C.Param (C.Ptr $ C.Struct (lmp_bind_type n)) "b", C.Param (C.Ptr $ C.Struct "waitset") "waitset"]
296
false
true
1
12
84
124
61
63
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/StringQueries.hs
bsd-3-clause
shadingLanguageVersion :: GettableStateVar String shadingLanguageVersion = makeGettableStateVar (getString gl_SHADING_LANGUAGE_VERSION)
135
shadingLanguageVersion :: GettableStateVar String shadingLanguageVersion = makeGettableStateVar (getString gl_SHADING_LANGUAGE_VERSION)
135
shadingLanguageVersion = makeGettableStateVar (getString gl_SHADING_LANGUAGE_VERSION)
85
false
true
0
7
8
23
11
12
null
null
gbataille/pandoc
src/Text/Pandoc/Writers/EPUB.hs
gpl-2.0
metaValueToString (MetaBool b) = show b
39
metaValueToString (MetaBool b) = show b
39
metaValueToString (MetaBool b) = show b
39
false
false
0
7
5
18
8
10
null
null
DaMSL/K3
src/Language/K3/Runtime/Engine.hs
apache-2.0
externalEndpointId :: Identifier -> Bool externalEndpointId = not . isPrefixOf internalEndpointPrefix
101
externalEndpointId :: Identifier -> Bool externalEndpointId = not . isPrefixOf internalEndpointPrefix
101
externalEndpointId = not . isPrefixOf internalEndpointPrefix
60
false
true
0
6
10
22
11
11
null
null
AlexanderPankiv/ghc
compiler/main/DynFlags.hs
bsd-3-clause
xFlags :: [FlagSpec ExtensionFlag] xFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] -- Please keep the list of flags below sorted alphabetically flagSpec "AllowAmbiguousTypes" Opt_AllowAmbiguousTypes, flagSpec "AlternativeLayoutRule" Opt_AlternativeLayoutRule, flagSpec "AlternativeLayoutRuleTransitional" Opt_AlternativeLayoutRuleTransitional, flagSpec "Arrows" Opt_Arrows, flagSpec "AutoDeriveTypeable" Opt_AutoDeriveTypeable, flagSpec "BangPatterns" Opt_BangPatterns, flagSpec "BinaryLiterals" Opt_BinaryLiterals, flagSpec "CApiFFI" Opt_CApiFFI, flagSpec "CPP" Opt_Cpp, flagSpec "ConstrainedClassMethods" Opt_ConstrainedClassMethods, flagSpec "ConstraintKinds" Opt_ConstraintKinds, flagSpec "DataKinds" Opt_DataKinds, flagSpec' "DatatypeContexts" Opt_DatatypeContexts (\ turn_on -> when turn_on $ deprecate $ "It was widely considered a misfeature, " ++ "and has been removed from the Haskell language."), flagSpec "DefaultSignatures" Opt_DefaultSignatures, flagSpec "DeriveAnyClass" Opt_DeriveAnyClass, flagSpec "DeriveDataTypeable" Opt_DeriveDataTypeable, flagSpec "DeriveFoldable" Opt_DeriveFoldable, flagSpec "DeriveFunctor" Opt_DeriveFunctor, flagSpec "DeriveGeneric" Opt_DeriveGeneric, flagSpec "DeriveLift" Opt_DeriveLift, flagSpec "DeriveTraversable" Opt_DeriveTraversable, flagSpec "DisambiguateRecordFields" Opt_DisambiguateRecordFields, flagSpec "DoAndIfThenElse" Opt_DoAndIfThenElse, flagSpec' "DoRec" Opt_RecursiveDo (deprecatedForExtension "RecursiveDo"), flagSpec "DuplicateRecordFields" Opt_DuplicateRecordFields, flagSpec "EmptyCase" Opt_EmptyCase, flagSpec "EmptyDataDecls" Opt_EmptyDataDecls, flagSpec "ExistentialQuantification" Opt_ExistentialQuantification, flagSpec "ExplicitForAll" Opt_ExplicitForAll, flagSpec "ExplicitNamespaces" Opt_ExplicitNamespaces, flagSpec "ExtendedDefaultRules" Opt_ExtendedDefaultRules, flagSpec "FlexibleContexts" Opt_FlexibleContexts, flagSpec "FlexibleInstances" Opt_FlexibleInstances, flagSpec "ForeignFunctionInterface" Opt_ForeignFunctionInterface, flagSpec "FunctionalDependencies" Opt_FunctionalDependencies, flagSpec "GADTSyntax" Opt_GADTSyntax, flagSpec "GADTs" Opt_GADTs, flagSpec "GHCForeignImportPrim" Opt_GHCForeignImportPrim, flagSpec' "GeneralizedNewtypeDeriving" Opt_GeneralizedNewtypeDeriving setGenDeriving, flagSpec "ImplicitParams" Opt_ImplicitParams, flagSpec "ImplicitPrelude" Opt_ImplicitPrelude, flagSpec "ImpredicativeTypes" Opt_ImpredicativeTypes, flagSpec' "IncoherentInstances" Opt_IncoherentInstances setIncoherentInsts, flagSpec "InstanceSigs" Opt_InstanceSigs, flagSpec "ApplicativeDo" Opt_ApplicativeDo, flagSpec "InterruptibleFFI" Opt_InterruptibleFFI, flagSpec "JavaScriptFFI" Opt_JavaScriptFFI, flagSpec "KindSignatures" Opt_KindSignatures, flagSpec "LambdaCase" Opt_LambdaCase, flagSpec "LiberalTypeSynonyms" Opt_LiberalTypeSynonyms, flagSpec "MagicHash" Opt_MagicHash, flagSpec "MonadComprehensions" Opt_MonadComprehensions, flagSpec "MonoLocalBinds" Opt_MonoLocalBinds, flagSpec' "MonoPatBinds" Opt_MonoPatBinds (\ turn_on -> when turn_on $ deprecate "Experimental feature now removed; has no effect"), flagSpec "MonomorphismRestriction" Opt_MonomorphismRestriction, flagSpec "MultiParamTypeClasses" Opt_MultiParamTypeClasses, flagSpec "MultiWayIf" Opt_MultiWayIf, flagSpec "NPlusKPatterns" Opt_NPlusKPatterns, flagSpec "NamedFieldPuns" Opt_RecordPuns, flagSpec "NamedWildCards" Opt_NamedWildCards, flagSpec "NegativeLiterals" Opt_NegativeLiterals, flagSpec "NondecreasingIndentation" Opt_NondecreasingIndentation, flagSpec' "NullaryTypeClasses" Opt_NullaryTypeClasses (deprecatedForExtension "MultiParamTypeClasses"), flagSpec "NumDecimals" Opt_NumDecimals, flagSpec' "OverlappingInstances" Opt_OverlappingInstances setOverlappingInsts, flagSpec "OverloadedLists" Opt_OverloadedLists, flagSpec "OverloadedStrings" Opt_OverloadedStrings, flagSpec "PackageImports" Opt_PackageImports, flagSpec "ParallelArrays" Opt_ParallelArrays, flagSpec "ParallelListComp" Opt_ParallelListComp, flagSpec "PartialTypeSignatures" Opt_PartialTypeSignatures, flagSpec "PatternGuards" Opt_PatternGuards, flagSpec' "PatternSignatures" Opt_ScopedTypeVariables (deprecatedForExtension "ScopedTypeVariables"), flagSpec "PatternSynonyms" Opt_PatternSynonyms, flagSpec "PolyKinds" Opt_PolyKinds, flagSpec "PolymorphicComponents" Opt_RankNTypes, flagSpec "PostfixOperators" Opt_PostfixOperators, flagSpec "QuasiQuotes" Opt_QuasiQuotes, flagSpec "Rank2Types" Opt_RankNTypes, flagSpec "RankNTypes" Opt_RankNTypes, flagSpec "RebindableSyntax" Opt_RebindableSyntax, flagSpec' "RecordPuns" Opt_RecordPuns (deprecatedForExtension "NamedFieldPuns"), flagSpec "RecordWildCards" Opt_RecordWildCards, flagSpec "RecursiveDo" Opt_RecursiveDo, flagSpec "RelaxedLayout" Opt_RelaxedLayout, flagSpec' "RelaxedPolyRec" Opt_RelaxedPolyRec (\ turn_on -> unless turn_on $ deprecate "You can't turn off RelaxedPolyRec any more"), flagSpec "RoleAnnotations" Opt_RoleAnnotations, flagSpec "ScopedTypeVariables" Opt_ScopedTypeVariables, flagSpec "StandaloneDeriving" Opt_StandaloneDeriving, flagSpec "StaticPointers" Opt_StaticPointers, flagSpec "StrictData" Opt_StrictData, flagSpec' "TemplateHaskell" Opt_TemplateHaskell setTemplateHaskellLoc, flagSpec "TraditionalRecordSyntax" Opt_TraditionalRecordSyntax, flagSpec "TransformListComp" Opt_TransformListComp, flagSpec "TupleSections" Opt_TupleSections, flagSpec "TypeFamilies" Opt_TypeFamilies, flagSpec "TypeOperators" Opt_TypeOperators, flagSpec "TypeSynonymInstances" Opt_TypeSynonymInstances, flagSpec "UnboxedTuples" Opt_UnboxedTuples, flagSpec "UndecidableInstances" Opt_UndecidableInstances, flagSpec "UnicodeSyntax" Opt_UnicodeSyntax, flagSpec "UnliftedFFITypes" Opt_UnliftedFFITypes, flagSpec "ViewPatterns" Opt_ViewPatterns ]
8,008
xFlags :: [FlagSpec ExtensionFlag] xFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] -- Please keep the list of flags below sorted alphabetically flagSpec "AllowAmbiguousTypes" Opt_AllowAmbiguousTypes, flagSpec "AlternativeLayoutRule" Opt_AlternativeLayoutRule, flagSpec "AlternativeLayoutRuleTransitional" Opt_AlternativeLayoutRuleTransitional, flagSpec "Arrows" Opt_Arrows, flagSpec "AutoDeriveTypeable" Opt_AutoDeriveTypeable, flagSpec "BangPatterns" Opt_BangPatterns, flagSpec "BinaryLiterals" Opt_BinaryLiterals, flagSpec "CApiFFI" Opt_CApiFFI, flagSpec "CPP" Opt_Cpp, flagSpec "ConstrainedClassMethods" Opt_ConstrainedClassMethods, flagSpec "ConstraintKinds" Opt_ConstraintKinds, flagSpec "DataKinds" Opt_DataKinds, flagSpec' "DatatypeContexts" Opt_DatatypeContexts (\ turn_on -> when turn_on $ deprecate $ "It was widely considered a misfeature, " ++ "and has been removed from the Haskell language."), flagSpec "DefaultSignatures" Opt_DefaultSignatures, flagSpec "DeriveAnyClass" Opt_DeriveAnyClass, flagSpec "DeriveDataTypeable" Opt_DeriveDataTypeable, flagSpec "DeriveFoldable" Opt_DeriveFoldable, flagSpec "DeriveFunctor" Opt_DeriveFunctor, flagSpec "DeriveGeneric" Opt_DeriveGeneric, flagSpec "DeriveLift" Opt_DeriveLift, flagSpec "DeriveTraversable" Opt_DeriveTraversable, flagSpec "DisambiguateRecordFields" Opt_DisambiguateRecordFields, flagSpec "DoAndIfThenElse" Opt_DoAndIfThenElse, flagSpec' "DoRec" Opt_RecursiveDo (deprecatedForExtension "RecursiveDo"), flagSpec "DuplicateRecordFields" Opt_DuplicateRecordFields, flagSpec "EmptyCase" Opt_EmptyCase, flagSpec "EmptyDataDecls" Opt_EmptyDataDecls, flagSpec "ExistentialQuantification" Opt_ExistentialQuantification, flagSpec "ExplicitForAll" Opt_ExplicitForAll, flagSpec "ExplicitNamespaces" Opt_ExplicitNamespaces, flagSpec "ExtendedDefaultRules" Opt_ExtendedDefaultRules, flagSpec "FlexibleContexts" Opt_FlexibleContexts, flagSpec "FlexibleInstances" Opt_FlexibleInstances, flagSpec "ForeignFunctionInterface" Opt_ForeignFunctionInterface, flagSpec "FunctionalDependencies" Opt_FunctionalDependencies, flagSpec "GADTSyntax" Opt_GADTSyntax, flagSpec "GADTs" Opt_GADTs, flagSpec "GHCForeignImportPrim" Opt_GHCForeignImportPrim, flagSpec' "GeneralizedNewtypeDeriving" Opt_GeneralizedNewtypeDeriving setGenDeriving, flagSpec "ImplicitParams" Opt_ImplicitParams, flagSpec "ImplicitPrelude" Opt_ImplicitPrelude, flagSpec "ImpredicativeTypes" Opt_ImpredicativeTypes, flagSpec' "IncoherentInstances" Opt_IncoherentInstances setIncoherentInsts, flagSpec "InstanceSigs" Opt_InstanceSigs, flagSpec "ApplicativeDo" Opt_ApplicativeDo, flagSpec "InterruptibleFFI" Opt_InterruptibleFFI, flagSpec "JavaScriptFFI" Opt_JavaScriptFFI, flagSpec "KindSignatures" Opt_KindSignatures, flagSpec "LambdaCase" Opt_LambdaCase, flagSpec "LiberalTypeSynonyms" Opt_LiberalTypeSynonyms, flagSpec "MagicHash" Opt_MagicHash, flagSpec "MonadComprehensions" Opt_MonadComprehensions, flagSpec "MonoLocalBinds" Opt_MonoLocalBinds, flagSpec' "MonoPatBinds" Opt_MonoPatBinds (\ turn_on -> when turn_on $ deprecate "Experimental feature now removed; has no effect"), flagSpec "MonomorphismRestriction" Opt_MonomorphismRestriction, flagSpec "MultiParamTypeClasses" Opt_MultiParamTypeClasses, flagSpec "MultiWayIf" Opt_MultiWayIf, flagSpec "NPlusKPatterns" Opt_NPlusKPatterns, flagSpec "NamedFieldPuns" Opt_RecordPuns, flagSpec "NamedWildCards" Opt_NamedWildCards, flagSpec "NegativeLiterals" Opt_NegativeLiterals, flagSpec "NondecreasingIndentation" Opt_NondecreasingIndentation, flagSpec' "NullaryTypeClasses" Opt_NullaryTypeClasses (deprecatedForExtension "MultiParamTypeClasses"), flagSpec "NumDecimals" Opt_NumDecimals, flagSpec' "OverlappingInstances" Opt_OverlappingInstances setOverlappingInsts, flagSpec "OverloadedLists" Opt_OverloadedLists, flagSpec "OverloadedStrings" Opt_OverloadedStrings, flagSpec "PackageImports" Opt_PackageImports, flagSpec "ParallelArrays" Opt_ParallelArrays, flagSpec "ParallelListComp" Opt_ParallelListComp, flagSpec "PartialTypeSignatures" Opt_PartialTypeSignatures, flagSpec "PatternGuards" Opt_PatternGuards, flagSpec' "PatternSignatures" Opt_ScopedTypeVariables (deprecatedForExtension "ScopedTypeVariables"), flagSpec "PatternSynonyms" Opt_PatternSynonyms, flagSpec "PolyKinds" Opt_PolyKinds, flagSpec "PolymorphicComponents" Opt_RankNTypes, flagSpec "PostfixOperators" Opt_PostfixOperators, flagSpec "QuasiQuotes" Opt_QuasiQuotes, flagSpec "Rank2Types" Opt_RankNTypes, flagSpec "RankNTypes" Opt_RankNTypes, flagSpec "RebindableSyntax" Opt_RebindableSyntax, flagSpec' "RecordPuns" Opt_RecordPuns (deprecatedForExtension "NamedFieldPuns"), flagSpec "RecordWildCards" Opt_RecordWildCards, flagSpec "RecursiveDo" Opt_RecursiveDo, flagSpec "RelaxedLayout" Opt_RelaxedLayout, flagSpec' "RelaxedPolyRec" Opt_RelaxedPolyRec (\ turn_on -> unless turn_on $ deprecate "You can't turn off RelaxedPolyRec any more"), flagSpec "RoleAnnotations" Opt_RoleAnnotations, flagSpec "ScopedTypeVariables" Opt_ScopedTypeVariables, flagSpec "StandaloneDeriving" Opt_StandaloneDeriving, flagSpec "StaticPointers" Opt_StaticPointers, flagSpec "StrictData" Opt_StrictData, flagSpec' "TemplateHaskell" Opt_TemplateHaskell setTemplateHaskellLoc, flagSpec "TraditionalRecordSyntax" Opt_TraditionalRecordSyntax, flagSpec "TransformListComp" Opt_TransformListComp, flagSpec "TupleSections" Opt_TupleSections, flagSpec "TypeFamilies" Opt_TypeFamilies, flagSpec "TypeOperators" Opt_TypeOperators, flagSpec "TypeSynonymInstances" Opt_TypeSynonymInstances, flagSpec "UnboxedTuples" Opt_UnboxedTuples, flagSpec "UndecidableInstances" Opt_UndecidableInstances, flagSpec "UnicodeSyntax" Opt_UnicodeSyntax, flagSpec "UnliftedFFITypes" Opt_UnliftedFFITypes, flagSpec "ViewPatterns" Opt_ViewPatterns ]
8,008
xFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] -- Please keep the list of flags below sorted alphabetically flagSpec "AllowAmbiguousTypes" Opt_AllowAmbiguousTypes, flagSpec "AlternativeLayoutRule" Opt_AlternativeLayoutRule, flagSpec "AlternativeLayoutRuleTransitional" Opt_AlternativeLayoutRuleTransitional, flagSpec "Arrows" Opt_Arrows, flagSpec "AutoDeriveTypeable" Opt_AutoDeriveTypeable, flagSpec "BangPatterns" Opt_BangPatterns, flagSpec "BinaryLiterals" Opt_BinaryLiterals, flagSpec "CApiFFI" Opt_CApiFFI, flagSpec "CPP" Opt_Cpp, flagSpec "ConstrainedClassMethods" Opt_ConstrainedClassMethods, flagSpec "ConstraintKinds" Opt_ConstraintKinds, flagSpec "DataKinds" Opt_DataKinds, flagSpec' "DatatypeContexts" Opt_DatatypeContexts (\ turn_on -> when turn_on $ deprecate $ "It was widely considered a misfeature, " ++ "and has been removed from the Haskell language."), flagSpec "DefaultSignatures" Opt_DefaultSignatures, flagSpec "DeriveAnyClass" Opt_DeriveAnyClass, flagSpec "DeriveDataTypeable" Opt_DeriveDataTypeable, flagSpec "DeriveFoldable" Opt_DeriveFoldable, flagSpec "DeriveFunctor" Opt_DeriveFunctor, flagSpec "DeriveGeneric" Opt_DeriveGeneric, flagSpec "DeriveLift" Opt_DeriveLift, flagSpec "DeriveTraversable" Opt_DeriveTraversable, flagSpec "DisambiguateRecordFields" Opt_DisambiguateRecordFields, flagSpec "DoAndIfThenElse" Opt_DoAndIfThenElse, flagSpec' "DoRec" Opt_RecursiveDo (deprecatedForExtension "RecursiveDo"), flagSpec "DuplicateRecordFields" Opt_DuplicateRecordFields, flagSpec "EmptyCase" Opt_EmptyCase, flagSpec "EmptyDataDecls" Opt_EmptyDataDecls, flagSpec "ExistentialQuantification" Opt_ExistentialQuantification, flagSpec "ExplicitForAll" Opt_ExplicitForAll, flagSpec "ExplicitNamespaces" Opt_ExplicitNamespaces, flagSpec "ExtendedDefaultRules" Opt_ExtendedDefaultRules, flagSpec "FlexibleContexts" Opt_FlexibleContexts, flagSpec "FlexibleInstances" Opt_FlexibleInstances, flagSpec "ForeignFunctionInterface" Opt_ForeignFunctionInterface, flagSpec "FunctionalDependencies" Opt_FunctionalDependencies, flagSpec "GADTSyntax" Opt_GADTSyntax, flagSpec "GADTs" Opt_GADTs, flagSpec "GHCForeignImportPrim" Opt_GHCForeignImportPrim, flagSpec' "GeneralizedNewtypeDeriving" Opt_GeneralizedNewtypeDeriving setGenDeriving, flagSpec "ImplicitParams" Opt_ImplicitParams, flagSpec "ImplicitPrelude" Opt_ImplicitPrelude, flagSpec "ImpredicativeTypes" Opt_ImpredicativeTypes, flagSpec' "IncoherentInstances" Opt_IncoherentInstances setIncoherentInsts, flagSpec "InstanceSigs" Opt_InstanceSigs, flagSpec "ApplicativeDo" Opt_ApplicativeDo, flagSpec "InterruptibleFFI" Opt_InterruptibleFFI, flagSpec "JavaScriptFFI" Opt_JavaScriptFFI, flagSpec "KindSignatures" Opt_KindSignatures, flagSpec "LambdaCase" Opt_LambdaCase, flagSpec "LiberalTypeSynonyms" Opt_LiberalTypeSynonyms, flagSpec "MagicHash" Opt_MagicHash, flagSpec "MonadComprehensions" Opt_MonadComprehensions, flagSpec "MonoLocalBinds" Opt_MonoLocalBinds, flagSpec' "MonoPatBinds" Opt_MonoPatBinds (\ turn_on -> when turn_on $ deprecate "Experimental feature now removed; has no effect"), flagSpec "MonomorphismRestriction" Opt_MonomorphismRestriction, flagSpec "MultiParamTypeClasses" Opt_MultiParamTypeClasses, flagSpec "MultiWayIf" Opt_MultiWayIf, flagSpec "NPlusKPatterns" Opt_NPlusKPatterns, flagSpec "NamedFieldPuns" Opt_RecordPuns, flagSpec "NamedWildCards" Opt_NamedWildCards, flagSpec "NegativeLiterals" Opt_NegativeLiterals, flagSpec "NondecreasingIndentation" Opt_NondecreasingIndentation, flagSpec' "NullaryTypeClasses" Opt_NullaryTypeClasses (deprecatedForExtension "MultiParamTypeClasses"), flagSpec "NumDecimals" Opt_NumDecimals, flagSpec' "OverlappingInstances" Opt_OverlappingInstances setOverlappingInsts, flagSpec "OverloadedLists" Opt_OverloadedLists, flagSpec "OverloadedStrings" Opt_OverloadedStrings, flagSpec "PackageImports" Opt_PackageImports, flagSpec "ParallelArrays" Opt_ParallelArrays, flagSpec "ParallelListComp" Opt_ParallelListComp, flagSpec "PartialTypeSignatures" Opt_PartialTypeSignatures, flagSpec "PatternGuards" Opt_PatternGuards, flagSpec' "PatternSignatures" Opt_ScopedTypeVariables (deprecatedForExtension "ScopedTypeVariables"), flagSpec "PatternSynonyms" Opt_PatternSynonyms, flagSpec "PolyKinds" Opt_PolyKinds, flagSpec "PolymorphicComponents" Opt_RankNTypes, flagSpec "PostfixOperators" Opt_PostfixOperators, flagSpec "QuasiQuotes" Opt_QuasiQuotes, flagSpec "Rank2Types" Opt_RankNTypes, flagSpec "RankNTypes" Opt_RankNTypes, flagSpec "RebindableSyntax" Opt_RebindableSyntax, flagSpec' "RecordPuns" Opt_RecordPuns (deprecatedForExtension "NamedFieldPuns"), flagSpec "RecordWildCards" Opt_RecordWildCards, flagSpec "RecursiveDo" Opt_RecursiveDo, flagSpec "RelaxedLayout" Opt_RelaxedLayout, flagSpec' "RelaxedPolyRec" Opt_RelaxedPolyRec (\ turn_on -> unless turn_on $ deprecate "You can't turn off RelaxedPolyRec any more"), flagSpec "RoleAnnotations" Opt_RoleAnnotations, flagSpec "ScopedTypeVariables" Opt_ScopedTypeVariables, flagSpec "StandaloneDeriving" Opt_StandaloneDeriving, flagSpec "StaticPointers" Opt_StaticPointers, flagSpec "StrictData" Opt_StrictData, flagSpec' "TemplateHaskell" Opt_TemplateHaskell setTemplateHaskellLoc, flagSpec "TraditionalRecordSyntax" Opt_TraditionalRecordSyntax, flagSpec "TransformListComp" Opt_TransformListComp, flagSpec "TupleSections" Opt_TupleSections, flagSpec "TypeFamilies" Opt_TypeFamilies, flagSpec "TypeOperators" Opt_TypeOperators, flagSpec "TypeSynonymInstances" Opt_TypeSynonymInstances, flagSpec "UnboxedTuples" Opt_UnboxedTuples, flagSpec "UndecidableInstances" Opt_UndecidableInstances, flagSpec "UnicodeSyntax" Opt_UnicodeSyntax, flagSpec "UnliftedFFITypes" Opt_UnliftedFFITypes, flagSpec "ViewPatterns" Opt_ViewPatterns ]
7,973
false
true
0
13
2,622
956
478
478
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
confdReqqIplist :: String confdReqqIplist = ConstantUtils.confdReqqIplist
73
confdReqqIplist :: String confdReqqIplist = ConstantUtils.confdReqqIplist
73
confdReqqIplist = ConstantUtils.confdReqqIplist
47
false
true
0
6
5
20
8
12
null
null
RedMoonStudios/cryptd-lib
Cryptd/Lib/TLS.hs
gpl-3.0
-- | Do the TLS handshake, call the handler and cleanup. doFinalize :: Handle -> TunnelHandle -> HandlerCmd -> IO (Maybe String) doFinalize tcpHandle tlsHandle handler = TLS.handshake tlsHandle >> handle tcpHandle tlsHandle where handle tcp tls = do EX.finally (handler tls) (TLS.bye tls >> hClose tcp) return Nothing -- | Do a TCP connect using the values specified by 'LoopCmd'.
426
doFinalize :: Handle -> TunnelHandle -> HandlerCmd -> IO (Maybe String) doFinalize tcpHandle tlsHandle handler = TLS.handshake tlsHandle >> handle tcpHandle tlsHandle where handle tcp tls = do EX.finally (handler tls) (TLS.bye tls >> hClose tcp) return Nothing -- | Do a TCP connect using the values specified by 'LoopCmd'.
369
doFinalize tcpHandle tlsHandle handler = TLS.handshake tlsHandle >> handle tcpHandle tlsHandle where handle tcp tls = do EX.finally (handler tls) (TLS.bye tls >> hClose tcp) return Nothing -- | Do a TCP connect using the values specified by 'LoopCmd'.
297
true
true
0
11
106
104
49
55
null
null
luke-clifton/memorable-bits
src/Data/Memorable/Theme/Words.hs
bsd-2-clause
flw8 :: Proxy FLW8 flw8 = leftSide flw9
39
flw8 :: Proxy FLW8 flw8 = leftSide flw9
39
flw8 = leftSide flw9
20
false
true
0
5
7
17
8
9
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSQL_FETCH_NEXT :: Int wxSQL_FETCH_NEXT = 1
44
wxSQL_FETCH_NEXT :: Int wxSQL_FETCH_NEXT = 1
44
wxSQL_FETCH_NEXT = 1
20
false
true
0
4
5
11
6
5
null
null
AlexanderPankiv/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp dflags OrIOp = Just (mo_wordOr dflags)
59
translateOp dflags OrIOp = Just (mo_wordOr dflags)
59
translateOp dflags OrIOp = Just (mo_wordOr dflags)
59
false
false
0
7
15
20
9
11
null
null
nomeata/sat-britney
ZArray.hs
gpl-2.0
sort :: Array -> Array sort v@(Array a) = if len <= 1 then v else fromList (Data.List.sort (toList v)) where len = PA.sizeofByteArray a `div` I# (sizeOf# (undefined :: Int32))
177
sort :: Array -> Array sort v@(Array a) = if len <= 1 then v else fromList (Data.List.sort (toList v)) where len = PA.sizeofByteArray a `div` I# (sizeOf# (undefined :: Int32))
177
sort v@(Array a) = if len <= 1 then v else fromList (Data.List.sort (toList v)) where len = PA.sizeofByteArray a `div` I# (sizeOf# (undefined :: Int32))
154
false
true
0
10
32
91
48
43
null
null
grnet/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pDelayOnMaster :: Field pDelayOnMaster = withDoc "on_master field for 'OpTestDelay'" . renameField "DelayOnMaster" $ defaultTrue "on_master"
146
pDelayOnMaster :: Field pDelayOnMaster = withDoc "on_master field for 'OpTestDelay'" . renameField "DelayOnMaster" $ defaultTrue "on_master"
146
pDelayOnMaster = withDoc "on_master field for 'OpTestDelay'" . renameField "DelayOnMaster" $ defaultTrue "on_master"
122
false
true
0
7
21
28
13
15
null
null
xmonad/xmonad-contrib
tests/Selective.hs
bsd-3-clause
-- selection has the form [0..l] ++ [m..n] -- relies on the Arbitrary instance for Stack Int generating stacks like [0..k] prop_select_two_consec :: Selection l -> Stack Int -> Bool prop_select_two_consec sel (stk :: Stack Int) = let wins = integrate $ select sel stk in (length . filter not . zipWith ((==) . (+1)) wins $ tail wins) <= 1
347
prop_select_two_consec :: Selection l -> Stack Int -> Bool prop_select_two_consec sel (stk :: Stack Int) = let wins = integrate $ select sel stk in (length . filter not . zipWith ((==) . (+1)) wins $ tail wins) <= 1
224
prop_select_two_consec sel (stk :: Stack Int) = let wins = integrate $ select sel stk in (length . filter not . zipWith ((==) . (+1)) wins $ tail wins) <= 1
165
true
true
0
14
69
105
53
52
null
null
karljs/blunderbot
src/BlunderLib.hs
bsd-3-clause
randomMove :: IORef Board -> IO () randomMove brdref = do brd <- readIORef brdref -- log $ "now finding move for: " ++ show (turn brd) let ms = everyMove brd if null ms then sendCheckmate else randomlyChoose brdref ms -- Getting a new generator each time is ridiculously slow
292
randomMove :: IORef Board -> IO () randomMove brdref = do brd <- readIORef brdref -- log $ "now finding move for: " ++ show (turn brd) let ms = everyMove brd if null ms then sendCheckmate else randomlyChoose brdref ms -- Getting a new generator each time is ridiculously slow
292
randomMove brdref = do brd <- readIORef brdref -- log $ "now finding move for: " ++ show (turn brd) let ms = everyMove brd if null ms then sendCheckmate else randomlyChoose brdref ms -- Getting a new generator each time is ridiculously slow
257
false
true
0
10
67
69
32
37
null
null
tjakway/ghcjvm
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprLit i (FloatPrimL x) = parensIf (i > noPrec && x < 0) (float (fromRational x) <> char '#')
130
pprLit i (FloatPrimL x) = parensIf (i > noPrec && x < 0) (float (fromRational x) <> char '#')
130
pprLit i (FloatPrimL x) = parensIf (i > noPrec && x < 0) (float (fromRational x) <> char '#')
130
false
false
0
10
55
56
27
29
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Storable.hs
bsd-3-clause
readPtrOffPtr (Ptr a) (I# i) = IO $ \s -> case readAddrOffAddr# a i s of (# s2, x #) -> (# s2, Ptr x #)
110
readPtrOffPtr (Ptr a) (I# i) = IO $ \s -> case readAddrOffAddr# a i s of (# s2, x #) -> (# s2, Ptr x #)
110
readPtrOffPtr (Ptr a) (I# i) = IO $ \s -> case readAddrOffAddr# a i s of (# s2, x #) -> (# s2, Ptr x #)
110
false
false
0
11
32
62
31
31
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Backends/Xhtml/Names.hs
gpl-3.0
ppIPName :: HsIPName -> Html ppIPName = toHtml . ('?':) . unpackFS . hsIPNameFS
79
ppIPName :: HsIPName -> Html ppIPName = toHtml . ('?':) . unpackFS . hsIPNameFS
79
ppIPName = toHtml . ('?':) . unpackFS . hsIPNameFS
50
false
true
2
7
13
39
18
21
null
null
alfpark/bond
compiler/src/Language/Bond/Parser.hs
mit
-- containers parser complexType :: Parser Type complexType = keyword "list" *> angles (BT_List <$> type_) <|> keyword "blob" *> pure BT_Blob <|> keyword "vector" *> angles (BT_Vector <$> type_) <|> keyword "nullable" *> angles (BT_Nullable <$> type_) <|> keyword "set" *> angles (BT_Set <$> keyType) <|> keyword "map" *> angles (BT_Map <$> keyType <* comma <*> type_) <|> keyword "bonded" *> angles (BT_Bonded <$> userStruct) where keyType = try (basicType <|> checkUserType validKeyType) <?> "scalar, string or enum" userStruct = try (checkUserType validBondedType) <?> "user defined struct" checkUserType valid = do t <- userType if valid t then return t else unexpected "type" validKeyType t = case t of BT_TypeParam _ -> True _ -> isScalar t || isString t validBondedType t = case t of BT_TypeParam _ -> True _ -> isStruct t -- parser for user defined type (struct, enum, alias or type parameter)
1,005
complexType :: Parser Type complexType = keyword "list" *> angles (BT_List <$> type_) <|> keyword "blob" *> pure BT_Blob <|> keyword "vector" *> angles (BT_Vector <$> type_) <|> keyword "nullable" *> angles (BT_Nullable <$> type_) <|> keyword "set" *> angles (BT_Set <$> keyType) <|> keyword "map" *> angles (BT_Map <$> keyType <* comma <*> type_) <|> keyword "bonded" *> angles (BT_Bonded <$> userStruct) where keyType = try (basicType <|> checkUserType validKeyType) <?> "scalar, string or enum" userStruct = try (checkUserType validBondedType) <?> "user defined struct" checkUserType valid = do t <- userType if valid t then return t else unexpected "type" validKeyType t = case t of BT_TypeParam _ -> True _ -> isScalar t || isString t validBondedType t = case t of BT_TypeParam _ -> True _ -> isStruct t -- parser for user defined type (struct, enum, alias or type parameter)
984
complexType = keyword "list" *> angles (BT_List <$> type_) <|> keyword "blob" *> pure BT_Blob <|> keyword "vector" *> angles (BT_Vector <$> type_) <|> keyword "nullable" *> angles (BT_Nullable <$> type_) <|> keyword "set" *> angles (BT_Set <$> keyType) <|> keyword "map" *> angles (BT_Map <$> keyType <* comma <*> type_) <|> keyword "bonded" *> angles (BT_Bonded <$> userStruct) where keyType = try (basicType <|> checkUserType validKeyType) <?> "scalar, string or enum" userStruct = try (checkUserType validBondedType) <?> "user defined struct" checkUserType valid = do t <- userType if valid t then return t else unexpected "type" validKeyType t = case t of BT_TypeParam _ -> True _ -> isScalar t || isString t validBondedType t = case t of BT_TypeParam _ -> True _ -> isStruct t -- parser for user defined type (struct, enum, alias or type parameter)
957
true
true
24
10
250
315
155
160
null
null
phylake/avm3
vm/store.hs
mit
xform_opCode {- 0x11 -} i u d s m t (Abc.IfTrue s24) = [IfTrue s24]
67
xform_opCode {- 0x11 -} i u d s m t (Abc.IfTrue s24) = [IfTrue s24]
67
xform_opCode {- 0x11 -} i u d s m t (Abc.IfTrue s24) = [IfTrue s24]
67
false
false
0
8
14
36
18
18
null
null
hmb-ba/protocol
test/SpecFixtures.hs
mit
getMessageFixture :: Payload -> Message getMessageFixture p = Message { mgCrc = 0 , mgPayload = p }
121
getMessageFixture :: Payload -> Message getMessageFixture p = Message { mgCrc = 0 , mgPayload = p }
121
getMessageFixture p = Message { mgCrc = 0 , mgPayload = p }
81
false
true
0
7
39
36
19
17
null
null
fmthoma/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
magicDictKey :: Unique magicDictKey = mkPreludeMiscIdUnique 156
80
magicDictKey :: Unique magicDictKey = mkPreludeMiscIdUnique 156
80
magicDictKey = mkPreludeMiscIdUnique 156
57
false
true
1
5
23
17
7
10
null
null
seckcoder/lang-learn
haskell/lambda-calculus/src/Main.hs
unlicense
eval0 env (Lambda s exp) = FunVal env s exp
43
eval0 env (Lambda s exp) = FunVal env s exp
43
eval0 env (Lambda s exp) = FunVal env s exp
43
false
false
0
6
9
28
12
16
null
null
travitch/foreign-inference
src/Foreign/Inference/Analysis/Output.hs
bsd-3-clause
isAnyOut _ = False
18
isAnyOut _ = False
18
isAnyOut _ = False
18
false
false
0
5
3
9
4
5
null
null
fehu/itesm-ga
src/Parcial2/Examples/Data.hs
mit
edgesN = [ (3,0) --> (4,0) , (4,0) --> (8,0), (4,0) --> (4,1) , (4,1) --> (6,1), (6,1) --> (7,1) , (7,1) --> (8,0) ]
128
edgesN = [ (3,0) --> (4,0) , (4,0) --> (8,0), (4,0) --> (4,1) , (4,1) --> (6,1), (6,1) --> (7,1) , (7,1) --> (8,0) ]
128
edgesN = [ (3,0) --> (4,0) , (4,0) --> (8,0), (4,0) --> (4,1) , (4,1) --> (6,1), (6,1) --> (7,1) , (7,1) --> (8,0) ]
128
false
false
1
8
36
124
75
49
null
null
josefs/autosar
ARSim/arsim/AUTOSAR/ARSim.hs
bsd-3-clause
hear conn (DELTA d) (Run b t act n m s f) = Update $ Run b (t-d) act n m s f
92
hear conn (DELTA d) (Run b t act n m s f) = Update $ Run b (t-d) act n m s f
92
hear conn (DELTA d) (Run b t act n m s f) = Update $ Run b (t-d) act n m s f
92
false
false
1
8
38
67
31
36
null
null
shockkolate/etch
src/Etch/Analysis/Semantics.hs
apache-2.0
functionAnalysis :: MonadAnalysis m => Syntax.Function -> m (Typed Function) functionAnalysis (Syntax.Function (Syntax.ParamList params) expr) = do args <- traverse paramAnalysis params e <- exprAnalysis expr let paramTys = typedTy <$> args pure $ Function (ParamList args) e `As` FunctionType paramTys (typedTy e)
330
functionAnalysis :: MonadAnalysis m => Syntax.Function -> m (Typed Function) functionAnalysis (Syntax.Function (Syntax.ParamList params) expr) = do args <- traverse paramAnalysis params e <- exprAnalysis expr let paramTys = typedTy <$> args pure $ Function (ParamList args) e `As` FunctionType paramTys (typedTy e)
330
functionAnalysis (Syntax.Function (Syntax.ParamList params) expr) = do args <- traverse paramAnalysis params e <- exprAnalysis expr let paramTys = typedTy <$> args pure $ Function (ParamList args) e `As` FunctionType paramTys (typedTy e)
253
false
true
0
11
58
128
59
69
null
null
ThermalSpan/haskell-euler
src/BinarySearchTree.hs
bsd-3-clause
mergeL (x:xs) (y:ys) = case compare x y of LT -> x : mergeL xs (y:ys) EQ -> x : mergeL xs ys GT -> y : mergeL ys (x:xs) -- | The `search` method returns whether a given element is in a BST
298
mergeL (x:xs) (y:ys) = case compare x y of LT -> x : mergeL xs (y:ys) EQ -> x : mergeL xs ys GT -> y : mergeL ys (x:xs) -- | The `search` method returns whether a given element is in a BST
298
mergeL (x:xs) (y:ys) = case compare x y of LT -> x : mergeL xs (y:ys) EQ -> x : mergeL xs ys GT -> y : mergeL ys (x:xs) -- | The `search` method returns whether a given element is in a BST
298
false
false
0
11
153
96
47
49
null
null
kolmodin/binary-bits
BitsQC.hs
bsd-3-clause
prop_putget_applicative_with_bitreq :: (BinaryBit a, Num a, Bits a, Ord a) => W [(a,a,a)] -> Property prop_putget_applicative_with_bitreq (W ts) = property $ let p = mapM_ (\(a,b,c) -> do putBits (bitreq a) a putBits (bitreq b) b putBits (bitreq c) c) ts g = mapM (\(a,b,c) -> (,,) <$> getBits a <*> getBits b <*> getBits c) bitlist lbs = runPut (runBitPut p) ts' = runGet (runBitGet g) lbs in ts == ts' where bitlist = map (\(a,b,c) -> (bitreq a, bitreq b, bitreq c)) ts -- | Write bits using this library, and read them back using the binary -- library.
648
prop_putget_applicative_with_bitreq :: (BinaryBit a, Num a, Bits a, Ord a) => W [(a,a,a)] -> Property prop_putget_applicative_with_bitreq (W ts) = property $ let p = mapM_ (\(a,b,c) -> do putBits (bitreq a) a putBits (bitreq b) b putBits (bitreq c) c) ts g = mapM (\(a,b,c) -> (,,) <$> getBits a <*> getBits b <*> getBits c) bitlist lbs = runPut (runBitPut p) ts' = runGet (runBitGet g) lbs in ts == ts' where bitlist = map (\(a,b,c) -> (bitreq a, bitreq b, bitreq c)) ts -- | Write bits using this library, and read them back using the binary -- library.
648
prop_putget_applicative_with_bitreq (W ts) = property $ let p = mapM_ (\(a,b,c) -> do putBits (bitreq a) a putBits (bitreq b) b putBits (bitreq c) c) ts g = mapM (\(a,b,c) -> (,,) <$> getBits a <*> getBits b <*> getBits c) bitlist lbs = runPut (runBitPut p) ts' = runGet (runBitGet g) lbs in ts == ts' where bitlist = map (\(a,b,c) -> (bitreq a, bitreq b, bitreq c)) ts -- | Write bits using this library, and read them back using the binary -- library.
546
false
true
0
17
193
281
146
135
null
null
bj4rtmar/sdl2
src/SDL/Raw/Haptic.hs
bsd-3-clause
hapticRunEffect :: MonadIO m => Haptic -> CInt -> Word32 -> m CInt hapticRunEffect v1 v2 v3 = liftIO $ hapticRunEffect' v1 v2 v3
128
hapticRunEffect :: MonadIO m => Haptic -> CInt -> Word32 -> m CInt hapticRunEffect v1 v2 v3 = liftIO $ hapticRunEffect' v1 v2 v3
128
hapticRunEffect v1 v2 v3 = liftIO $ hapticRunEffect' v1 v2 v3
61
false
true
0
9
23
51
24
27
null
null
mortberg/AlgTop
Algebra/SNF_SparseF2.hs
bsd-3-clause
fromDim (Plus x y) = fromDim x + fromDim y
42
fromDim (Plus x y) = fromDim x + fromDim y
42
fromDim (Plus x y) = fromDim x + fromDim y
42
false
false
0
7
9
27
12
15
null
null
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
src/Logic.hs
bsd-3-clause
psimplify' (Or atom False') = atom
34
psimplify' (Or atom False') = atom
34
psimplify' (Or atom False') = atom
34
false
false
0
7
5
17
8
9
null
null
jamessanders/hsysadmin
src/chronos/chronos.hs
bsd-2-clause
split :: Char -> String -> [String] split delim s | [] == rest = [token] | otherwise = token : split delim (tail rest) where (token,rest) = span (/=delim) s -- | capitalize a string
194
split :: Char -> String -> [String] split delim s | [] == rest = [token] | otherwise = token : split delim (tail rest) where (token,rest) = span (/=delim) s -- | capitalize a string
194
split delim s | [] == rest = [token] | otherwise = token : split delim (tail rest) where (token,rest) = span (/=delim) s -- | capitalize a string
158
false
true
0
9
48
90
46
44
null
null
adept/hledger
hledger-lib/Hledger/Read/JournalReader.hs
gpl-3.0
tmpostingrulep :: Maybe Year -> JournalParser m TMPostingRule tmpostingrulep = fmap (uncurry TMPostingRule) . postingphelper True
129
tmpostingrulep :: Maybe Year -> JournalParser m TMPostingRule tmpostingrulep = fmap (uncurry TMPostingRule) . postingphelper True
129
tmpostingrulep = fmap (uncurry TMPostingRule) . postingphelper True
67
false
true
0
8
15
39
18
21
null
null
phischu/fragnix
tests/packages/scotty/System.FilePath.Posix.hs
bsd-3-clause
-- breakEnd (< 2) [1,2,3,4,1,2,3,4] == ([1,2,3,4,1],[2,3,4]) breakEnd :: (a -> Bool) -> [a] -> ([a], [a]) breakEnd p = spanEnd (not . p)
136
breakEnd :: (a -> Bool) -> [a] -> ([a], [a]) breakEnd p = spanEnd (not . p)
75
breakEnd p = spanEnd (not . p)
30
true
true
0
8
23
55
31
24
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/shows_2.hs
mit
primCmpInt (Pos x) (Neg y) = GT
31
primCmpInt (Pos x) (Neg y) = GT
31
primCmpInt (Pos x) (Neg y) = GT
31
false
false
0
7
6
23
11
12
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/Utility/Tuple.hs
bsd-3-clause
at33 (_,_,x) = x
26
at33 (_,_,x) = x
26
at33 (_,_,x) = x
26
false
false
0
6
13
18
10
8
null
null
reiddraper/cauterize
src/Cauterize/Dynamic/Pack.hs
bsd-3-clause
dynamicPackArray :: TyMap -> T.Text -> [CautDetails] -> Put dynamicPackArray m n elems = let t = checkedTypeLookup m n isArray "array" a = S.unArray t el = fromIntegral $ length elems al = C.arrayLen a etype = C.arrayRef a in if al /= el then throw $ IncorrectArrayLength al el else mapM_ (dynamicPackDetails m etype) elems
365
dynamicPackArray :: TyMap -> T.Text -> [CautDetails] -> Put dynamicPackArray m n elems = let t = checkedTypeLookup m n isArray "array" a = S.unArray t el = fromIntegral $ length elems al = C.arrayLen a etype = C.arrayRef a in if al /= el then throw $ IncorrectArrayLength al el else mapM_ (dynamicPackDetails m etype) elems
365
dynamicPackArray m n elems = let t = checkedTypeLookup m n isArray "array" a = S.unArray t el = fromIntegral $ length elems al = C.arrayLen a etype = C.arrayRef a in if al /= el then throw $ IncorrectArrayLength al el else mapM_ (dynamicPackDetails m etype) elems
305
false
true
0
10
98
137
66
71
null
null
olsner/ghc
compiler/main/HscTypes.hs
bsd-3-clause
-- | Get the 'DataCon' from a 'TyThing' if it is a data constructor thing. Panics otherwise tyThingDataCon :: TyThing -> DataCon tyThingDataCon (AConLike (RealDataCon dc)) = dc
176
tyThingDataCon :: TyThing -> DataCon tyThingDataCon (AConLike (RealDataCon dc)) = dc
84
tyThingDataCon (AConLike (RealDataCon dc)) = dc
47
true
true
0
8
27
35
17
18
null
null
robx/puzzle-draw
src/Data/Compose.hs
mit
handle f CoralLITSO = f R.coralLitso D.coralLitso
49
handle f CoralLITSO = f R.coralLitso D.coralLitso
49
handle f CoralLITSO = f R.coralLitso D.coralLitso
49
false
false
0
6
6
21
9
12
null
null
FranklinChen/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
pEraseType (App s f a) = App s (pEraseType f) (pEraseType a)
60
pEraseType (App s f a) = App s (pEraseType f) (pEraseType a)
60
pEraseType (App s f a) = App s (pEraseType f) (pEraseType a)
60
false
false
0
7
11
39
18
21
null
null
acowley/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
-- Show needed for Lexer.x {- Note [InlinePragma] ~~~~~~~~~~~~~~~~~~~ This data type mirrors what you can write in an INLINE or NOINLINE pragma in the source program. If you write nothing at all, you get defaultInlinePragma: inl_inline = False inl_act = AlwaysActive inl_rule = FunLike It's not possible to get that combination by *writing* something, so if an Id has defaultInlinePragma it means the user didn't specify anything. If inl_inline = True, then the Id should have an InlineRule unfolding. Note [CONLIKE pragma] ~~~~~~~~~~~~~~~~~~~~~ The ConLike constructor of a RuleMatchInfo is aimed at the following. Consider first {-# RULE "r/cons" forall a as. r (a:as) = f (a+1) #-} g b bs = let x = b:bs in ..x...x...(r x)... Now, the rule applies to the (r x) term, because GHC "looks through" the definition of 'x' to see that it is (b:bs). Now consider {-# RULE "r/f" forall v. r (f v) = f (v+1) #-} g v = let x = f v in ..x...x...(r x)... Normally the (r x) would *not* match the rule, because GHC would be scared about duplicating the redex (f v), so it does not "look through" the bindings. However the CONLIKE modifier says to treat 'f' like a constructor in this situation, and "look through" the unfolding for x. So (r x) fires, yielding (f (v+1)). This is all controlled with a user-visible pragma: {-# NOINLINE CONLIKE [1] f #-} The main effects of CONLIKE are: - The occurrence analyser (OccAnal) and simplifier (Simplify) treat CONLIKE thing like constructors, by ANF-ing them - New function coreUtils.exprIsExpandable is like exprIsCheap, but additionally spots applications of CONLIKE functions - A CoreUnfolding has a field that caches exprIsExpandable - The rule matcher consults this field. See Note [Expanding variables] in Rules.hs. -} isConLike :: RuleMatchInfo -> Bool isConLike ConLike = True
1,903
isConLike :: RuleMatchInfo -> Bool isConLike ConLike = True
59
isConLike ConLike = True
24
true
true
0
5
390
20
11
9
null
null
AKST/jsgen
src/Language/JSGen/IRUtil.hs
mit
jnot = JSUnaOpt Not
19
jnot = JSUnaOpt Not
19
jnot = JSUnaOpt Not
19
false
false
0
5
3
9
4
5
null
null
xnning/fcore
lib/Inliner.hs
bsd-2-clause
inliner (App e1 e2) = App (inliner e1) (inliner e2)
51
inliner (App e1 e2) = App (inliner e1) (inliner e2)
51
inliner (App e1 e2) = App (inliner e1) (inliner e2)
51
false
false
0
7
9
34
16
18
null
null
bergey/gooey
bouncing-canvas/src/Main.hs
bsd-3-clause
intersect :: State -> Edge -> (Edge, TimeDelta) intersect s e = (e, t) where t = case e of East -> (1 - x) / vx West -> -x / vx North -> (1 - y) / vy South -> -y / vy (V2 x y) = pos s (V2 vx vy) = velocity s
229
intersect :: State -> Edge -> (Edge, TimeDelta) intersect s e = (e, t) where t = case e of East -> (1 - x) / vx West -> -x / vx North -> (1 - y) / vy South -> -y / vy (V2 x y) = pos s (V2 vx vy) = velocity s
229
intersect s e = (e, t) where t = case e of East -> (1 - x) / vx West -> -x / vx North -> (1 - y) / vy South -> -y / vy (V2 x y) = pos s (V2 vx vy) = velocity s
181
false
true
0
12
77
139
72
67
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
plusParent p1 p2@(FldParent _ _) = hasParent p2 p1
50
plusParent p1 p2@(FldParent _ _) = hasParent p2 p1
50
plusParent p1 p2@(FldParent _ _) = hasParent p2 p1
50
false
false
0
8
8
27
13
14
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/Reset.hs
mpl-2.0
-- | The name of the zone for this request. irZone :: Lens' InstancesReset Text irZone = lens _irZone (\ s a -> s{_irZone = a})
127
irZone :: Lens' InstancesReset Text irZone = lens _irZone (\ s a -> s{_irZone = a})
83
irZone = lens _irZone (\ s a -> s{_irZone = a})
47
true
true
0
9
25
40
22
18
null
null
batterseapower/temporary
System/IO/Temp.hs
bsd-3-clause
writeSystemTempFile :: String -- ^ File name template. -> String -- ^ Data to store in the file. -> IO FilePath -- ^ Path to the (written and closed) file. writeSystemTempFile template content = getTemporaryDirectory >>= \tmpDir -> writeTempFile tmpDir template content
323
writeSystemTempFile :: String -- ^ File name template. -> String -- ^ Data to store in the file. -> IO FilePath writeSystemTempFile template content = getTemporaryDirectory >>= \tmpDir -> writeTempFile tmpDir template content
279
writeSystemTempFile template content = getTemporaryDirectory >>= \tmpDir -> writeTempFile tmpDir template content
117
true
true
2
8
95
52
26
26
null
null
snoyberg/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
-- Map from evidence variables to evidence terms -- We use @DVarEnv@ here to get deterministic ordering when we -- turn it into a Bag. -- If we don't do that, when we generate let bindings for -- dictionaries in dsTcEvBinds they will be generated in random -- order. -- -- For example: -- -- let $dEq = GHC.Classes.$fEqInt in -- let $$dNum = GHC.Num.$fNumInt in ... -- -- vs -- -- let $dNum = GHC.Num.$fNumInt in -- let $dEq = GHC.Classes.$fEqInt in ... -- -- See Note [Deterministic UniqFM] in UniqDFM for explanation why -- @UniqFM@ can lead to nondeterministic order. emptyEvBindMap :: EvBindMap emptyEvBindMap = EvBindMap { ev_bind_varenv = emptyDVarEnv }
876
emptyEvBindMap :: EvBindMap emptyEvBindMap = EvBindMap { ev_bind_varenv = emptyDVarEnv }
88
emptyEvBindMap = EvBindMap { ev_bind_varenv = emptyDVarEnv }
60
true
true
0
6
329
38
30
8
null
null
stu-smith/rendering-in-haskell
src/experiment07/Core.hs
mit
toRayPosition :: Double -> RayPosition toRayPosition = RayPosition
70
toRayPosition :: Double -> RayPosition toRayPosition = RayPosition
70
toRayPosition = RayPosition
31
false
true
0
5
11
15
8
7
null
null
YoshikuniJujo/funpaala
samples/12_syntaxes/synonym1.hs
bsd-3-clause
dist0 :: Point -> Double dist0 (x, y) = sqrt $ x ^ 2 + y ^ 2
60
dist0 :: Point -> Double dist0 (x, y) = sqrt $ x ^ 2 + y ^ 2
60
dist0 (x, y) = sqrt $ x ^ 2 + y ^ 2
35
false
true
0
8
17
40
21
19
null
null
alios/iho-s57
Main.hs
bsd-3-clause
groomRecord :: Monad m => Conduit S57Record m Text groomRecord = do v <- await case v of Just r -> do yield $ T.pack $ groom r ++ "\n" groomRecord Nothing -> return ()
190
groomRecord :: Monad m => Conduit S57Record m Text groomRecord = do v <- await case v of Just r -> do yield $ T.pack $ groom r ++ "\n" groomRecord Nothing -> return ()
190
groomRecord = do v <- await case v of Just r -> do yield $ T.pack $ groom r ++ "\n" groomRecord Nothing -> return ()
139
false
true
0
16
57
83
37
46
null
null
fatho/ninja
src/Graphics/Ninja/GL2D/Sprite.hs
mit
-- | Size of the SpriteVertex data. spriteVertexSize :: Int spriteVertexSize = sizeOf (undefined :: SpriteVertex)
113
spriteVertexSize :: Int spriteVertexSize = sizeOf (undefined :: SpriteVertex)
77
spriteVertexSize = sizeOf (undefined :: SpriteVertex)
53
true
true
0
6
15
21
12
9
null
null
jozefg/folds-common
test/L'.hs
mit
propNub :: TestTree propNub = testProperty "Nub Works" $ \l -> C.run l C.nub == nub (l :: [Int])
106
propNub :: TestTree propNub = testProperty "Nub Works" $ \l -> C.run l C.nub == nub (l :: [Int])
106
propNub = testProperty "Nub Works" $ \l -> C.run l C.nub == nub (l :: [Int])
86
false
true
0
10
28
48
25
23
null
null
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Phrase/Run.hs
gpl-2.0
insertD = mungeDictation >>> insert
35
insertD = mungeDictation >>> insert
35
insertD = mungeDictation >>> insert
35
false
false
0
5
4
10
5
5
null
null
d0kt0r0/estuary
client/src/Estuary/Help/Saborts.hs
gpl-3.0
exampleText "v" = ":> v"
24
exampleText "v" = ":> v"
24
exampleText "v" = ":> v"
24
false
false
0
5
4
9
4
5
null
null
lpeterse/koka
src/Common/NamePrim.hs
apache-2.0
nameTpST = preludeName "st"
37
nameTpST = preludeName "st"
37
nameTpST = preludeName "st"
37
false
false
0
5
13
9
4
5
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Returnpolicy/Delete.hs
mpl-2.0
-- | OAuth access token. retAccessToken :: Lens' ReturnpolicyDelete (Maybe Text) retAccessToken = lens _retAccessToken (\ s a -> s{_retAccessToken = a})
160
retAccessToken :: Lens' ReturnpolicyDelete (Maybe Text) retAccessToken = lens _retAccessToken (\ s a -> s{_retAccessToken = a})
135
retAccessToken = lens _retAccessToken (\ s a -> s{_retAccessToken = a})
79
true
true
0
8
29
49
25
24
null
null
izmailoff/haskell-h99
src/H99/Q1to10.hs
mit
myButLast (x:xs) = myButLast xs
31
myButLast (x:xs) = myButLast xs
31
myButLast (x:xs) = myButLast xs
31
false
false
0
7
4
19
9
10
null
null
gridaphobe/ghc
utils/genapply/Main.hs
bsd-3-clause
argSize V = 0
15
argSize V = 0
15
argSize V = 0
15
false
false
0
5
5
9
4
5
null
null
graninas/Haskell-Algorithms
Tests/ArrowsAndFrees/ArrEff.hs
gpl-3.0
runArrEff :: Monad m => ArrEff m b c -> [b] -> m [c] runArrEff = runArrEffList []
81
runArrEff :: Monad m => ArrEff m b c -> [b] -> m [c] runArrEff = runArrEffList []
81
runArrEff = runArrEffList []
28
false
true
0
10
17
52
24
28
null
null
zakharvoit/haskell-homework
Base.hs
gpl-3.0
sinDouble = P.sin
18
sinDouble = P.sin
18
sinDouble = P.sin
18
false
false
1
6
3
12
4
8
null
null
muhbaasu/pfennig-server
src/Pfennig/NetworkHelper.hs
mit
textHTML :: MediaType textHTML = "text" // "html"
49
textHTML :: MediaType textHTML = "text" // "html"
49
textHTML = "text" // "html"
27
false
true
0
5
7
15
8
7
null
null
mikeizbicki/homoiconic
src/Homoiconic/Homogeneous/Example.hs
bsd-3-clause
logexpAST4 :: View Floating alg => AST alg a -> AST alg a logexpAST4 (AST_log (AST_exp a)) = a
94
logexpAST4 :: View Floating alg => AST alg a -> AST alg a logexpAST4 (AST_log (AST_exp a)) = a
94
logexpAST4 (AST_log (AST_exp a)) = a
36
false
true
0
8
18
53
24
29
null
null
np/hlatex
Language/LaTeX/Printer.hs
bsd-3-clause
brackets = between "[" "]"
26
brackets = between "[" "]"
26
brackets = between "[" "]"
26
false
false
1
5
4
15
5
10
null
null
sdiehl/ghc
compiler/GHC/HsToCore/PmCheck.hs
bsd-3-clause
checkGrdTree :: GrdTree -> Deltas -> DsM CheckResult checkGrdTree guards deltas = do tracePm "checkGrdTree {" $ vcat [ ppr guards , ppr deltas ] res <- checkGrdTree' guards deltas tracePm "}:" (ppr res) -- braces are easier to match by tooling return res -- ---------------------------------------------------------------------------- -- * Propagation of term constraints inwards when checking nested matches {- Note [Type and Term Equality Propagation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When checking a match it would be great to have all type and term information available so we can get more precise results. For this reason we have functions `addDictsDs' and `addTmVarCsDs' in DsMonad that store in the environment type and term constraints (respectively) as we go deeper. The type constraints we propagate inwards are collected by `collectEvVarsPats' in GHC.Hs.Pat. This handles bug #4139 ( see example https://gitlab.haskell.org/ghc/ghc/snippets/672 ) where this is needed. For term equalities we do less, we just generate equalities for HsCase. For example we accurately give 2 redundancy warnings for the marked cases: f :: [a] -> Bool f x = case x of [] -> case x of -- brings (x ~ []) in scope [] -> True (_:_) -> False -- can't happen (_:_) -> case x of -- brings (x ~ (_:_)) in scope (_:_) -> True [] -> False -- can't happen Functions `addScrutTmCs' and `addPatTmCs' are responsible for generating these constraints. -}
1,574
checkGrdTree :: GrdTree -> Deltas -> DsM CheckResult checkGrdTree guards deltas = do tracePm "checkGrdTree {" $ vcat [ ppr guards , ppr deltas ] res <- checkGrdTree' guards deltas tracePm "}:" (ppr res) -- braces are easier to match by tooling return res -- ---------------------------------------------------------------------------- -- * Propagation of term constraints inwards when checking nested matches {- Note [Type and Term Equality Propagation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When checking a match it would be great to have all type and term information available so we can get more precise results. For this reason we have functions `addDictsDs' and `addTmVarCsDs' in DsMonad that store in the environment type and term constraints (respectively) as we go deeper. The type constraints we propagate inwards are collected by `collectEvVarsPats' in GHC.Hs.Pat. This handles bug #4139 ( see example https://gitlab.haskell.org/ghc/ghc/snippets/672 ) where this is needed. For term equalities we do less, we just generate equalities for HsCase. For example we accurately give 2 redundancy warnings for the marked cases: f :: [a] -> Bool f x = case x of [] -> case x of -- brings (x ~ []) in scope [] -> True (_:_) -> False -- can't happen (_:_) -> case x of -- brings (x ~ (_:_)) in scope (_:_) -> True [] -> False -- can't happen Functions `addScrutTmCs' and `addPatTmCs' are responsible for generating these constraints. -}
1,574
checkGrdTree guards deltas = do tracePm "checkGrdTree {" $ vcat [ ppr guards , ppr deltas ] res <- checkGrdTree' guards deltas tracePm "}:" (ppr res) -- braces are easier to match by tooling return res -- ---------------------------------------------------------------------------- -- * Propagation of term constraints inwards when checking nested matches {- Note [Type and Term Equality Propagation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When checking a match it would be great to have all type and term information available so we can get more precise results. For this reason we have functions `addDictsDs' and `addTmVarCsDs' in DsMonad that store in the environment type and term constraints (respectively) as we go deeper. The type constraints we propagate inwards are collected by `collectEvVarsPats' in GHC.Hs.Pat. This handles bug #4139 ( see example https://gitlab.haskell.org/ghc/ghc/snippets/672 ) where this is needed. For term equalities we do less, we just generate equalities for HsCase. For example we accurately give 2 redundancy warnings for the marked cases: f :: [a] -> Bool f x = case x of [] -> case x of -- brings (x ~ []) in scope [] -> True (_:_) -> False -- can't happen (_:_) -> case x of -- brings (x ~ (_:_)) in scope (_:_) -> True [] -> False -- can't happen Functions `addScrutTmCs' and `addPatTmCs' are responsible for generating these constraints. -}
1,521
false
true
0
10
356
88
41
47
null
null
spacekitteh/smcghc
compiler/cmm/PprC.hs
bsd-3-clause
-- Print in C hex format: 0x13fa pprHexVal :: Integer -> Width -> SDoc pprHexVal 0 _ = ptext (sLit "0x0")
105
pprHexVal :: Integer -> Width -> SDoc pprHexVal 0 _ = ptext (sLit "0x0")
72
pprHexVal 0 _ = ptext (sLit "0x0")
34
true
true
0
7
20
34
17
17
null
null
green-haskell/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
isDataOcc _ = False
38
isDataOcc _ = False
38
isDataOcc _ = False
38
false
false
0
5
22
9
4
5
null
null