code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE OverloadedStrings #-}
module Data.Tournament (
Tournament(..),
TournamentRank(..),
TournamentType(..),
ScoringMethod(..)
) where
import Data.Dates (DateTime(..), parseDate)
import Data.Text (Text, pack, unpack, append)
import Data.Aeson (ToJSON(..), FromJSON(..), Value(..), object, (.=), (... | Sventimir/turniejowo | src/Data/Tournament.hs | apache-2.0 | 4,151 | 0 | 21 | 1,383 | 1,235 | 654 | 581 | 92 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE LambdaCase #-}
-- | Parsing the Skladnica constituency treebank.
module NLP.Skl... | kawu/skladnica-parser | src/NLP/Skladnica.hs | bsd-2-clause | 10,921 | 0 | 15 | 2,843 | 2,268 | 1,298 | 970 | 181 | 2 |
-- | Display a model in 2D after PCA analysis.
--
-- Principal component analysis extracts from a matrix the "most significant dimensions",
-- that is the dimensions which have the higher correlations with other dimensions. Or at
-- least this is what I understood...
-- We extract the two main principal components from... | RayRacine/hs-word2vec | Display.hs | bsd-3-clause | 2,499 | 0 | 15 | 596 | 527 | 295 | 232 | 35 | 1 |
module Args
( Command(..)
, Options(..)
, argsParser
) where
import Options.Applicative
data Command
= Xml
| XmlListFiles
| Admin
| Cache
| Cms
| Config
| Customer
| Db
| Design
| Dev
| Extension
| Index
| Sys
| Help
deriving Show
--data Verbosity = Normal | Verbose
data Options... | dxtr/hagento | src/Args.hs | bsd-3-clause | 1,666 | 0 | 12 | 445 | 499 | 264 | 235 | 52 | 1 |
{-#LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Text.Aztex.Processing where
import qualified Data.Map as Map
import Control.Monad.RWS
import Control.Applicative
import Text.Aztex.Helpers
import Text.Aztex.Types
-- Could use another data type?
expand :: Aztex -> RWS AztexStyle AztexError AztexState Azt... | nelk/aztex-compiler | src/Text/Aztex/Processing.hs | bsd-3-clause | 2,452 | 0 | 19 | 598 | 717 | 350 | 367 | 48 | 2 |
-- | Положение в исходном коде и в промежуточном представлении
module VSim.Data.Loc where
import Data.Maybe
import VSim.Data.Line (Line(..))
-- | Положение в сорце (и в промежуточном формате)
data Loc
= Loc
{ locSrcLine :: !(Maybe Line)
, locLine :: !Int
, locStartChar :: !Int
, loc... | ierton/vsim | src/VSim/Data/Loc.hs | bsd-3-clause | 850 | 0 | 11 | 207 | 230 | 126 | 104 | 31 | 1 |
{-# LANGUAGE CPP #-}
import Control.Monad
import Data.IORef
import Distribution.Simple
import Distribution.Simple.InstallDirs as I
import Distribution.Simple.LocalBuildInfo as L
import qualified Distribution.Simple.Setup as S
import qualified Distribution.Simple.Program as P
import Distribution.PackageDescription
impo... | byorgey/Idris-dev | Setup.hs | bsd-3-clause | 7,210 | 0 | 19 | 2,325 | 1,671 | 853 | 818 | 138 | 3 |
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, FlexibleInstances#-}
module Course.DataTypes where
import Data.Monoid hiding ((<>))
{- This is the haskell code for purely functional data types -}
-- Queues
-- the queue has two part to record the used part `runF` and unused part `runR`, Queue [1,2,3] [6,5,4] ... | niexshao/AlgorithmEx | src/Course/DataTypes.hs | bsd-3-clause | 1,473 | 0 | 9 | 359 | 297 | 167 | 130 | 15 | 1 |
module Language.Java.Paragon.NameResolution.ExpansionRecord
(
-- * The @Expansion@ mapping
ExpansionRecord(..)
-- * Functionality
, emptyExpansionRecord
, expandAll
) where
import Language.Java.Paragon.Syntax
import Language.Java.Paragon.NameResolution.Expansion
-- | A record for collecting vario... | bvdelft/paragon | src/Language/Java/Paragon/NameResolution/ExpansionRecord.hs | bsd-3-clause | 1,086 | 0 | 11 | 210 | 238 | 142 | 96 | 24 | 1 |
module Sodium (translate) where
import Sodium.Chloride.Vectorize (vectorize)
import Sodium.Chloride.Flatten (flatten)
import Sodium.Chloride.JoinMultiIf (joinMultiIf)
import Sodium.Chloride.IOMagic (uncurse)
import Sodium.Chloride.Inline (inline)
import Sodium.Chloride.FoldMatch (foldMatch)
import Sodium.Chlori... | kirbyfan64/sodium | src/Sodium.hs | bsd-3-clause | 870 | 0 | 11 | 120 | 255 | 152 | 103 | 21 | 1 |
{-# LANGUAGE
EmptyDataDecls
, FlexibleContexts
, FlexibleInstances
, FunctionalDependencies
, MultiParamTypeClasses
, TypeFamilies
, TypeSynonymInstances
, UndecidableInstances #-}
module Control.Monad.Code.Class.Typed
( module Data.ClassFile.Desc.Typed
, MonadCode (..)
, l... | sonyandy/tnt | Control/Monad/Code/Class/Typed.hs | bsd-3-clause | 7,896 | 0 | 12 | 2,891 | 2,867 | 1,541 | 1,326 | -1 | -1 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Floskell.Styles ( Style(..), styles ) where
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.Text ( Text )
import Floskell.Config
-- | A printer style.
data Style =
Styl... | ennocramer/floskell | src/Floskell/Styles.hs | bsd-3-clause | 18,473 | 0 | 11 | 8,519 | 3,110 | 1,803 | 1,307 | 329 | 1 |
{-#LANGUAGE RecordWildCards #-}
{-# LANGUAGE LambdaCase #-}
module FileServer where
import Network hiding (accept, sClose)
import Network.Socket hiding (send, recv, sendTo, recvFrom, Broadcast)
import Network.Socket.ByteString
import Data.ByteString.Char8 (pack, unpack)
import System.Environment
import System.IO
imp... | Garygunn94/DFS | .stack-work/intero/intero26690As0.hs | bsd-3-clause | 5,436 | 98 | 15 | 1,242 | 1,255 | 666 | 589 | 99 | 4 |
{-
(c) The University of Glasgow 2006-2008
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
-}
{-# LANGUAGE CPP, NondecreasingIndentation #-}
-- | Module for constructing @ModIface@ values (interface files),
-- writing them to disk and comparing two versions to see if
-- recompilation is required.
module MkI... | christiaanb/ghc | compiler/iface/MkIface.hs | bsd-3-clause | 88,206 | 130 | 25 | 28,061 | 15,223 | 8,127 | 7,096 | -1 | -1 |
-- |
-- Module : System.Random.MRG32K3A.Simple
-- Copyright : (c) 2015 Mathias Koerner
-- License : BSD3
--
-- Maintainer : mkoerner@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- Portable pseudo-random number generator with small state and
-- skip-ahead that is used on CPUs and GPUs. Th... | mkoerner/MRG32K3A | System/Random/MRG32K3A/Simple.hs | bsd-3-clause | 3,821 | 0 | 12 | 810 | 982 | 577 | 405 | 63 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Translation where
import Common
import Control.Applicative ((<|>))
import Control.Monad (unless)
import Control.Monad.Trans.Maybe
import qualified Data.Text
import ... | lihuanglx/disjoint-intersection | src/Translation.hs | bsd-3-clause | 5,824 | 0 | 19 | 1,758 | 2,945 | 1,464 | 1,481 | 162 | 21 |
{-# language CPP #-}
-- | = Name
--
-- VK_KHR_bind_memory2 - device extension
--
-- == VK_KHR_bind_memory2
--
-- [__Name String__]
-- @VK_KHR_bind_memory2@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 158
--
-- [__Revision__]
-- 1
--
-- [__Extension and Versi... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_KHR_bind_memory2.hs | bsd-3-clause | 6,119 | 0 | 8 | 1,213 | 410 | 299 | 111 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
module Game.GameUtil ( spawn
, initEdict
, clearEdict
, freeEdict
, range
, useTargets
, freeEdictA
, monsterU... | ksaveljev/hake-2 | src/Game/GameUtil.hs | bsd-3-clause | 32,215 | 179 | 31 | 11,885 | 7,474 | 3,789 | 3,685 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
The Desugarer: turning HsSyn into Core.
-}
{-# LANGUAGE CPP #-}
module Desugar ( deSugar, deSugarExpr ) where
import DynFlags
import HscTypes
import HsSyn
import TcRnTypes
import TcRnMonad ( finalSafeMode, fixSafeInstan... | urbanslug/ghc | compiler/deSugar/Desugar.hs | bsd-3-clause | 20,043 | 27 | 28 | 7,148 | 3,258 | 1,748 | 1,510 | 279 | 8 |
-- |
-- Module: CGroup
-- Copyright: (c) 2014 Tomislav Viljetić
-- License: BSD3
-- Maintainer: Tomislav Viljetić <tomislav@viljetic.de>
--
-- Basic cgroup virtual filesystem operations.
--
module CGroup
( module CGroup.Types
, createCGroup
, classifyTask
, listTasks
) where
import CGr... | 4z3/cgserver | src/CGroup.hs | bsd-3-clause | 1,244 | 0 | 10 | 224 | 288 | 167 | 121 | 29 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
#ifdef TRUSTWORTHY
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.Text.Strict.Lens
-- Copyright : (C) 2012-2014 Edward Kmett
-- License : BSD-style (see the file ... | hvr/lens | src/Data/Text/Strict/Lens.hs | bsd-3-clause | 2,555 | 0 | 8 | 438 | 260 | 178 | 82 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
module Network.Libtorrent.Vectors where
import qualified Language.C.Inline as C
import qual... | eryx67/haskell-libtorrent | src/Network/Libtorrent/Vectors.hs | bsd-3-clause | 749 | 0 | 8 | 128 | 125 | 71 | 54 | 18 | 0 |
-- | Hw02
module Hw02 where
import Log
parseMessage :: String -> LogMessage
parseMessage s = makeMessage (words s)
where
makeMessage ("I":timestamp:ss) = LogMessage Info (toI timestamp) (unwords ss)
makeMessage ("W":timestamp:ss) = LogMessage Warning (toI timestamp) (unwords ss)
makeMessage ("E":sever... | codingiam/sandbox-hs | src/Hw02.hs | bsd-3-clause | 1,456 | 0 | 12 | 442 | 592 | 302 | 290 | 32 | 4 |
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-}
-- An example of embedding a custom monad into
-- Scotty's transformer stack, using ReaderT to provide access
-- to a TVar containing global state.
--
-- Note: this example is somewhat simple, as our top level
-- is IO itself. The types of 'scottyT' and 'sc... | hansonkd/UHF | UHF/TeeVee/Application.hs | bsd-3-clause | 1,138 | 0 | 14 | 243 | 170 | 97 | 73 | 17 | 1 |
-- | Report page controller.
module HL.C.Report where
import HL.C
import HL.V.Report
import HL.M.Report
-- | Report controller.
getReportR :: Int -> FilePath -> C Html
getReportR year page =
do content <- io (getReportPage year page)
blaze (reportV year page content)
-- | Default page to go to for the given ... | chrisdone/hl | src/HL/C/Report.hs | bsd-3-clause | 421 | 0 | 10 | 79 | 118 | 62 | 56 | 11 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.NV.MultisampleFilterHint
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : por... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/NV/MultisampleFilterHint.hs | bsd-3-clause | 692 | 0 | 4 | 78 | 37 | 31 | 6 | 3 | 0 |
----------------------------------------------------------------
-- Модуль приложения
-- Скрипты графического интерфейса (HScript)
-- Действия
----------------------------------------------------------------
module WebUI.Scripts.HScript
( module ConMonRWS
, HSL (..)
, TypeHLang (..)
, HLanguage... | iqsf/HFitUI | src/WebUI/Scripts/HScript.hs | bsd-3-clause | 3,439 | 0 | 9 | 1,062 | 502 | 296 | 206 | 55 | 1 |
module Biolab.Interfaces.MySql (
DbReadable(..),
ExpDesc(..),
PlateDesc(..),
DbMeasurement(..),
WellDesc(..),
SelectCriteria(..),
SampleQuery (..),
readTable,
dbConnectInfo,
mesFromDB,
loadExpDataDB,
fromNullString,
loadMes,
)
where
import Database.HDBC.MySQL
impo... | uriba/biolab-interfaces | Biolab/Interfaces/MySql.hs | bsd-3-clause | 8,489 | 0 | 14 | 2,073 | 2,722 | 1,466 | 1,256 | 157 | 1 |
{-- snippet all --}
module Main where
import qualified PodMainGUI
main = PodMainGUI.main "podresources.glade"
{-- /snippet all --}
| binesiyu/ifl | examples/ch23/PodLocalMain.hs | mit | 133 | 0 | 6 | 20 | 20 | 13 | 7 | 3 | 1 |
{-- snippet import --}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
import Control.Concurrent.STM
import Control.Monad
data Item = Scroll
| Wand
| Banjo
deriving (Eq, Ord, Show)
newtype Gold = Gold Int
deriving (Eq, Ord, Show, Num)
newtype HitPoint = HitPoint Int
deriving (Eq,... | binesiyu/ifl | examples/ch28/GameInventory.hs | mit | 5,777 | 9 | 14 | 1,359 | 1,817 | 907 | 910 | 126 | 2 |
--
--
--
-----------------
-- Exercise 4.31.
-----------------
--
--
--
module E'4'31 where
import Prelude hiding ( gcd )
gcd :: Integer -> Integer -> Integer
gcd a b
-- Euclid's algorithm:
| b == 0 = a
| otherwise = gcd b (a `mod` b)
| pascal-knodel/haskell-craft | _/links/E'4'31.hs | mit | 265 | 0 | 8 | 77 | 79 | 47 | 32 | 6 | 1 |
module Llvm.Asm.Syntax
(module Llvm.Asm.Syntax.Parser.Module
,module Llvm.Asm.Syntax.Printer.LlvmPrint
) where
import Llvm.Asm.Syntax.Parser.Module
import Llvm.Asm.Syntax.Printer.LlvmPrint | mlite/hLLVM | src/Llvm/Asm/Syntax.hs | bsd-3-clause | 210 | 0 | 5 | 33 | 43 | 32 | 11 | 5 | 0 |
module HEP.Util (module M, module P) where
import HEP.Util.Matrix as M
import HEP.Util.Polynomial as P
| cbpark/hep-kinematics | src/HEP/Util.hs | bsd-3-clause | 108 | 0 | 4 | 20 | 32 | 23 | 9 | 3 | 0 |
{-# LANGUAGE TypeOperators, TypeFamilies, TupleSections #-}
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -Wall #-}
----------------------------------------------------------------------
-- |
-- Module : LambdaCCC.StateTrie
-- Copyright : (c) 2014 Tabula, Inc.
--
-- Maintainer :... | capn-freako/lambda-ccc | src/LambdaCCC/StateTrie.hs | bsd-3-clause | 4,006 | 0 | 12 | 812 | 1,004 | 555 | 449 | 69 | 1 |
module Skell.Frontend.MsgPack where
-- Con este metodo se puede crear una tercera aplicacion que solo realize pequeñas funcionalidades
--
import Control.Monad (forever)
import Control.Monad.State.Strict (evalStateT)
import Data.MessagePack
import Data.Binary
import ... | damianfral/Skell | src/Skell/UI/MsgPack.hs | bsd-3-clause | 4,117 | 0 | 15 | 1,238 | 929 | 494 | 435 | 69 | 2 |
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} -- uniplate patterns
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Syntax.OnlineTree
-- License : GPL-2
-- Maintainer : yi-devel@googlegr... | TOSPIO/yi | src/library/Yi/Syntax/OnlineTree.hs | gpl-2.0 | 1,488 | 0 | 13 | 352 | 475 | 269 | 206 | 30 | 3 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="it-IT">
<title>Online Menu | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref... | msrader/zap-extensions | src/org/zaproxy/zap/extension/onlineMenu/resources/help_it_IT/helpset_it_IT.hs | apache-2.0 | 974 | 92 | 29 | 160 | 402 | 213 | 189 | -1 | -1 |
module Network.Wai.Middleware.AcceptOverride
( acceptOverride
) where
import Network.Wai
import Control.Monad (join)
import Data.ByteString (ByteString)
acceptOverride :: Middleware
acceptOverride app req =
app req'
where
req' =
case join $ lookup "_accept" $ queryString req of
N... | erikd/wai | wai-extra/Network/Wai/Middleware/AcceptOverride.hs | mit | 634 | 0 | 13 | 196 | 203 | 111 | 92 | 19 | 2 |
main :: IO ()
main = do
print $ r "1E100000"
print $ r "1E100000000"
print $ r "1E100000000000"
print $ r "1E100000000000000"
print $ r "1E100000000000000000"
print $ r "1E100000000000000000000"
r :: String -> Double
r = read
| seereason/ghcjs | test/pkg/base/t7034.hs | mit | 239 | 0 | 8 | 52 | 101 | 42 | 59 | 10 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings #-}
import Control.Concurrent (forkIO,threadDelay)
import Control.Concurrent.STM
import Control.Exception (finally)
import Control.Monad.Error
import Control.Applicative
import Text.Printf (printf)
data LogJob = LogMsg String | LogDone
data Result = Res Stri... | marcmo/linkchecker | haskell/attic/simple.hs | mit | 3,046 | 9 | 23 | 1,014 | 955 | 454 | 501 | 82 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
module Demo (main) where
import Control.Concurrent (threadDelay)
import Control.Applicative
import Control.Monad
import Foreign.C.Types
import Linear
import Linear.Affine ( Point(P) )
import Data.Word
import Data.StateVar
imp... | PseudoPower/AFSM | draft/demo.hs | mit | 2,033 | 0 | 29 | 627 | 660 | 331 | 329 | -1 | -1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SpeechSynthesisUtterance
(js_newSpeechSynthesisUtterance, newSpeechSynthesisUtterance,
js_setText, setText, js_getText, getText, js_setLang, setLang,
js_getLang, getLang, js_setVoice, setVoi... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SpeechSynthesisUtterance.hs | mit | 8,520 | 90 | 10 | 1,140 | 1,572 | 868 | 704 | 108 | 1 |
-- | A few simple linear algebra functions, basically just algorithms
-- needed for this project, and so not terribly general. The emphasis is
-- on taming division.
{-# LANGUAGE ParallelListComp #-}
module Math.Linear (
Matrix, mkMatrix, det, polyDet, subres, charPoly, orthoBasis, solve
) where
import Pr... | galenhuntington/etr | Math/Linear.hs | mit | 4,079 | 1 | 23 | 1,010 | 1,900 | 1,037 | 863 | 56 | 4 |
module GHCJS.DOM.CSSKeyframesRule (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/CSSKeyframesRule.hs | mit | 46 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
{- |
The HList library
(C) 2004, Oleg Kiselyov, Ralf Laemmel, Keean Schupke
Generic implementations of type equality and disequality
-}
module Data.HList.TypeEqBoolGeneric where
import Data.HList.FakePrelude
instance Ty... | bjornbm/HList-classic | Data/HList/TypeEqBoolGeneric.hs | mit | 406 | 0 | 7 | 84 | 51 | 27 | 24 | 6 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
module Yage.Core.GLFW.Base where
import Yage.Prelude
import Control.Monad.Exception
import Yage.Core.Application.Exception
import qualified Graphics.UI.GLFW as GLFW
import Yage.Core.Applic... | MaxDaten/yage-core | src/Yage/Core/GLFW/Base.hs | mit | 1,135 | 0 | 11 | 223 | 256 | 144 | 112 | 24 | 1 |
module Problem3 ( getElemAtIndex ) where
getElemAtIndex :: [a] -> Int -> a
getElemAtIndex list index = last (take index list) | chanind/haskell-99-problems | Problem3.hs | mit | 126 | 0 | 7 | 21 | 46 | 25 | 21 | 3 | 1 |
-- Copyright 2015 Mitchell Kember. Subject to the MIT License.
-- Project Euler: Problem 23
-- Non-abundant sums
module Problem23 where
import Common (memoize, properDivisors)
limit :: Int
limit = 28123
isAbundant :: Int -> Bool
isAbundant = memoize (1, limit) go where go n = sum (properDivisors n) > n
isAbundantS... | mk12/euler | haskell/Problem23.hs | mit | 524 | 0 | 10 | 107 | 174 | 96 | 78 | 12 | 1 |
{-# LANGUAGE CPP #-}
import Control.Monad.State.Lazy (execStateT)
import Data.List (intersperse)
import Lens.Micro.Platform ((.=))
import Data.Maybe (fromMaybe)
import Data.Monoid ((<>))
import Options.Applicative
import Yi hiding (option)
import Yi.Config.Simple.Types
... | noughtmare/yi | yi/Main.hs | gpl-2.0 | 3,351 | 0 | 22 | 811 | 925 | 499 | 426 | 73 | 3 |
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-}
module PGIP.GraphQL.Result.StringReference where
import Data.Data
newtype StringReference = StringReference { id :: String
} deriving (Show, Typeable, Data)
| spechub/Hets | PGIP/GraphQL/Result/StringReference.hs | gpl-2.0 | 257 | 0 | 6 | 69 | 42 | 27 | 15 | 5 | 0 |
solveRPN :: String -> Float
solveRPN = head . foldl foldingFunction [] . words
where
foldingFunction (x:y:ys) "*" = (y * x):ys
foldingFunction (x:y:ys) "+" = (y + x):ys
foldingFunction (x:y:ys) "-" = (y - x):ys
foldingFunction (x:y:ys) "/" = (y / x):ys
foldingFunction (x:y:y... | lamontu/learning_haskell | reverse_polish_notation.hs | gpl-3.0 | 503 | 0 | 10 | 145 | 249 | 129 | 120 | 10 | 8 |
import System.Random
randoms' :: (RandomGen g, Random a) => g -> [a]
randoms' gen = let (value, newGen) = random gen in value:randoms' newGen
finiteRandoms :: (RandomGen g, Random a, Num n, Eq n) => n -> g -> ([a], g)
finiteRandoms 0 gen = ([], gen)
finiteRandoms n gen = let (value, newGen) = random gen
... | medik/lang-hack | Haskell/LearnYouAHaskell/c09/random.hs | gpl-3.0 | 455 | 0 | 11 | 132 | 201 | 106 | 95 | 8 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | source/Game/Grid/Helpers.hs | gpl-3.0 | 4,302 | 0 | 14 | 1,098 | 1,028 | 552 | 476 | 86 | 8 |
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-name-shadowing #-}
module QFeldspar.QDSL
(Qt,FO,Type,Num,Eq,Ord,C,String,Rep,
Word32,Float,
(*),(+),(-),(==),(<),div,(/),mod,i2f,round,
sqrt,sin,cos,atan2,cis,ilog2,
Bool(..),
-- ifThenElse
Complex(..),
realPart,imagPart,
-- abstraction and ... | shayan-najd/QFeldspar | QFeldspar/QDSL.hs | gpl-3.0 | 9,465 | 56 | 59 | 2,674 | 4,194 | 2,303 | 1,891 | -1 | -1 |
module Handler.PlaybackGrant where
import Import
import Model.ConsumedGrant (consumePlaybackGrant)
getPlaybackGrantR :: Text -> PlaybackGrantId -> Handler Value
getPlaybackGrantR ruid pgid = do
now <- liftIO getCurrentTime
mr <- getMessageRender
grant' <- fromMaybeM
(sendResponse... | rumuki/rumuki-server | src/Handler/PlaybackGrant.hs | gpl-3.0 | 719 | 0 | 16 | 191 | 165 | 81 | 84 | 16 | 1 |
-- instance Monoid Ordering where
-- mempty = EQ
-- LT `mappend` _ = LT
-- EQ `mappend` y = y
-- GT `mappend` _ = GT
lengthCompare :: String -> String -> Ordering
lengthCompare x y = (length x `compare` length y) `mappend`
(vowels x `compare` vowels y) `mappend`
... | lamontu/learning_haskell | monoid_ordering.hs | gpl-3.0 | 388 | 0 | 9 | 122 | 100 | 59 | 41 | 5 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Main where
import Diagrams.Prelude
import Diagrams.Backend.Drawille
import Diagrams.Backend.Rasterific
-- Taken from diagrams manual
theSq = square 1 # lwN 0.01
example =
hcat' (with & sep .~ 0.2)
(map (\s -> theSq # scale s) [0.5, 0.8, 1, 1.5, 2])
# scale 20... | zudov/diagrams-drawille | examples/Example.hs | gpl-3.0 | 395 | 0 | 12 | 69 | 130 | 72 | 58 | 11 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE IncoherentInstances #-}
{-# LANGUAGE DeriveGeneric #-}
module Test.QuickFuzz.Gen.Code.Js where
import Data.Default
import Test.QuickCheck
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Trans.State
import Data.List
... | elopez/QuickFuzz | src/Test/QuickFuzz/Gen/Code/Js.hs | gpl-3.0 | 895 | 0 | 9 | 123 | 183 | 120 | 63 | 28 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Get.hs | mpl-2.0 | 4,851 | 0 | 17 | 1,050 | 468 | 279 | 189 | 85 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/GetDeploymentGroup.hs | mpl-2.0 | 4,335 | 0 | 9 | 872 | 503 | 305 | 198 | 65 | 1 |
func = do
abc <- foo
--abc
return ()
| lspitzner/brittany | data/Test264.hs | agpl-3.0 | 39 | 0 | 7 | 11 | 22 | 10 | 12 | -1 | -1 |
-- Example of an drawing graphics onto a canvas.
import Graphics.UI.Gtk
import Graphics.Rendering.Cairo
import Graphics.UI.Gtk.Gdk.EventM
main = do
initGUI
dia <- dialogNew
dialogAddButton dia stockOk ResponseOk
contain <- dialogGetUpper dia
canvas <- drawingAreaNew
canvas `on` sizeRequest $ return (Requis... | thiagoarrais/gtk2hs | demo/cairo/Drawing.hs | lgpl-2.1 | 1,376 | 0 | 16 | 326 | 493 | 225 | 268 | -1 | -1 |
{-# LANGUAGE GADTs #-}
module HN.Optimizer.Utils where
import Compiler.Hoopl
import qualified Data.Map as M
import Data.Maybe
import HN.Optimizer.ClassyLattice
import HN.Optimizer.Node
rewriteExitF :: (DefinitionNode -> f -> Maybe DefinitionNode) -> Node e x -> f -> Maybe (Graph Node e x)
rewriteExitF _ (Entry _) _ ... | ingvar-lynn/HNC | HN/Optimizer/Utils.hs | lgpl-3.0 | 2,644 | 1 | 13 | 505 | 1,206 | 603 | 603 | 48 | 3 |
module SPrintIncAccum where
import Control.Monad.Trans.State
import Data.Monoid
sPrintIncAccum :: (Num a, Show a) => StateT a IO String
sPrintIncAccum =
StateT $
\a -> putStrLn ("Hi: " <> show a) >> return (show a, a + 1)
| thewoolleyman/haskellbook | 26/14/maor/SPrintIncAccum.hs | unlicense | 234 | 0 | 11 | 49 | 90 | 49 | 41 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
-- Copyright 2014 (c) Diego Souza <dsouza@c0d3.xxx>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http:/... | locaweb/leela | src/warpdrive/src/Leela/Network/WarpServer.hs | apache-2.0 | 13,327 | 0 | 24 | 4,072 | 4,804 | 2,414 | 2,390 | 276 | 13 |
{- | module: Network.Riak.CRDT
copyright: (c) 2016 Sentenai
author: Antonio Nikishaev <me@lelf.lu>
license: Apache
CRDT operations
* Haskell-side
* Haskell values: 'Counter', 'Set' etc
* ADT for operations: 'CounterOp', 'SetOp' etc
* 'modify' to locally modify a value (matchi... | k-bx/riak-haskell-client | src/Network/Riak/CRDT.hs | apache-2.0 | 4,959 | 0 | 13 | 1,205 | 1,359 | 711 | 648 | 97 | 3 |
module BloomFilter where
import Data.Array.ST (STUArray, runSTUArray)
import Data.Array.Unboxed (UArray)
import Data.Word
import Control.Monad (liftM)
import Control.Monad.ST (ST, runST)
import qualified Data.Array.Base as ST
import Data.Array.MArray (getBounds, newArray, readArray, writeArray)
import Prelude hiding... | songpp/my-haskell-playground | src/BloomFilter.hs | apache-2.0 | 1,703 | 0 | 11 | 416 | 743 | 396 | 347 | 43 | 2 |
module Propellor.CmdLine (
defaultMain,
processCmdLine,
) where
import System.Environment (getArgs)
import Data.List
import System.Exit
import System.PosixCompat
import Network.Socket
import Propellor.Base
import Propellor.Gpg
import Propellor.Git
import Propellor.Git.VerifiedBranch
import Propellor.Bootstrap
impor... | ArchiveTeam/glowing-computing-machine | src/Propellor/CmdLine.hs | bsd-2-clause | 7,824 | 44 | 14 | 1,562 | 2,599 | 1,310 | 1,289 | 187 | 25 |
module Spire.Canonical.Embedder where
import Control.Applicative
import Data.Monoid (mempty)
import Unbound.LocallyNameless hiding ( Spine )
import Spire.Canonical.Types
import Spire.Expression.Types
import qualified Spire.Canonical.Builtins as B
----------------------------------------------------------------------
... | spire/spire | src/Spire/Canonical/Embedder.hs | bsd-3-clause | 5,829 | 0 | 13 | 1,819 | 2,410 | 1,175 | 1,235 | 167 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Numeral.FR.Corpus
( corpus
) where
import Data.String
im... | facebookincubator/duckling | Duckling/Numeral/FR/Corpus.hs | bsd-3-clause | 3,344 | 0 | 11 | 1,488 | 634 | 359 | 275 | 95 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.SGIX.VertexPreclip
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabili... | haskell-opengl/OpenGLRaw | src/Graphics/GL/SGIX/VertexPreclip.hs | bsd-3-clause | 696 | 0 | 5 | 95 | 52 | 39 | 13 | 8 | 0 |
{- Binary-experiment test -}
{-# LANGUAGE PackageImports ,FlexibleInstances ,MultiParamTypeClasses#-}
module PkgBE(BEPkg(..)) where
import Data.Word
import Control.Exception
import Data.Monoid
import Control.Applicative
import qualified "binary-experiment" Data.Binary.Serialize as BE (serialize,deserializeOrFail)
im... | tittoassini/flat | benchmarks/PkgBE.hs | bsd-3-clause | 3,840 | 0 | 14 | 1,077 | 1,156 | 586 | 570 | 87 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.OpenRTB where
import Control.Applicative
import Data.Aeson
import Data.Text as T
import Data.Word
import Data.Int
data BidRequestTopLevel = BRTL {
_bidID :: (T.Text) -- alwayas <= 40 chars long
,_bidAuctionType ::( Maybe Word8 )
,_bidTimeOutMax :: (Mayb... | cartazio/hopenRTB | src/Data/OpenRTB.hs | bsd-3-clause | 1,421 | 0 | 15 | 570 | 313 | 172 | 141 | 33 | 0 |
module Tonque.Util where
import Codec.Text.IConv (Fuzzy (..), convertFuzzy)
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BSL
import Data.Convertible (safeConvert)
import Data.Monoid ((<>))
import Data... | daimatz/Tonque | src/Tonque/Util.hs | bsd-3-clause | 1,492 | 0 | 14 | 436 | 426 | 236 | 190 | 33 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Monad (filterM, when)
import Data.Char (isAscii, isPrint)
import Data.FileEmbed (embedStringFile)
import Da... | hot-leaf-juice/gotta-go-fast | src/Main.hs | bsd-3-clause | 5,750 | 0 | 19 | 1,866 | 1,732 | 895 | 837 | 150 | 4 |
module Data.Iteratee
( module Data.Iteratee.Base
, module Data.Iteratee.ByteString
, module Data.Iteratee.Exception
, module Data.Iteratee.IO
) where
------------------------------------------------------------------------
-- Imports
------------------------------------------------------------------------
i... | tanimoto/iteratee-bytestring | src/Data/Iteratee.hs | bsd-3-clause | 431 | 0 | 5 | 39 | 63 | 44 | 19 | 9 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.LinkWorkspaces
-- Description : Bindings to add and delete links between workspaces.
-- Copyright : (c) Jan-David Quesel <quesel@gmail.org>
-- License : BSD3-style (see LICENSE)
--
-- Maintainer ... | xmonad/xmonad-contrib | XMonad/Actions/LinkWorkspaces.hs | bsd-3-clause | 7,876 | 0 | 17 | 1,859 | 1,660 | 866 | 794 | 93 | 3 |
{-# LANGUAGE ScopedTypeVariables, PatternGuards #-}
{-# OPTIONS -fno-warn-orphans #-}
-- | A simple ''cron'' loop. Used for running commands according to a given schedule.
module HCron
( module HCron.Schedule
, cronLoop )
where
import HCron.Schedule
import Control.Concurrent
import Data.Time
-- | Given a schedule o... | tbk303/hcron | HCron.hs | bsd-3-clause | 1,219 | 8 | 18 | 243 | 211 | 109 | 102 | 27 | 2 |
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ConstraintKinds #-}
--
-- Copyright (c) 2009-2011, ERICSSO... | emwap/feldspar-language | tests/Feldspar/Range/Test.hs | bsd-3-clause | 22,775 | 0 | 17 | 5,394 | 7,358 | 3,874 | 3,484 | 375 | 1 |
module Problem57 where
main :: IO ()
-- sqrt(2) = [1;2,2,2,...]
-- p(0) = 1, q(0)=1;
-- We know that p(n) = a(n)*p(n-1)+p(n-2) and q(n) = a(n)*q(n-1)+q(n-2)
-- [Theorem 12.9 Rosen Elementary Number Theory 5th edition]
-- here a(n)=2 for n>=1
-- (p(n), q(n)) = (1,1), (3,2), (7,5), (17,12), ..
main =
print . length ... | adityagupta1089/Project-Euler-Haskell | src/problems/Problem57.hs | bsd-3-clause | 699 | 0 | 13 | 209 | 212 | 119 | 93 | 11 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GADTs #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.IndexUtils
-- Copyright : (c) Duncan Coutts 2008
-- License : BSD-like
--
-- Maintai... | sopvop/cabal | cabal-install/Distribution/Client/IndexUtils.hs | bsd-3-clause | 27,093 | 0 | 22 | 6,605 | 5,655 | 2,959 | 2,696 | 436 | 11 |
{-# LANGUAGE OverloadedStrings #-}
module ReadXLSX2
where
import Codec.Xlsx
import Control.Lens ((^?))
import Data.Aeson (Value, encode)
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as L
import qualified ... | stla/jsonxlsx | src/ReadXLSX2.hs | bsd-3-clause | 4,560 | 0 | 20 | 1,271 | 1,164 | 590 | 574 | 71 | 3 |
{-# LANGUAGE RecordWildCards, OverloadedStrings #-}
module Network.Wai.Application.Monitoring
( monitorGC
, monitorGCResponse
, encodeGCStats
) where
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Resource (ResourceT)
import qualified Data.HashMap.Strict as M
import qualified GHC.Stats as St... | yihuang/gc-monitoring-wai | Network/Wai/Application/Monitoring.hs | bsd-3-clause | 2,309 | 0 | 13 | 592 | 516 | 302 | 214 | 47 | 1 |
{-# LANGUAGE DeriveGeneric #-}
-- | Basic operations on 2D points represented as linear offsets.
module Game.LambdaHack.Common.Point
( Point(..), PointI
, chessDist, euclidDistSq, adjacent, bresenhamsLineAlgorithm, fromTo
, originPoint, insideP
, speedupHackXSize
#ifdef EXPOSE_INTERNAL
-- * Internal operati... | LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Common/Point.hs | bsd-3-clause | 7,557 | 0 | 16 | 1,659 | 1,550 | 867 | 683 | -1 | -1 |
-- p_adicanalysis.hs
module Math.P_adicAnalysis where
import Math.MathsPrimitives (FunctionRep (..), partialProducts, ($+), ($.) )
import Math.QQ
import Math.UPoly
import Math.CombinatoricsCounting
import Math.NonArchimedean
import Math.PowerSeries
import Math.UmbralCalculus
-- Sources:
-- Robert, A Cou... | nfjinjing/bench-euler | src/Math/P_adicAnalysis.hs | bsd-3-clause | 3,691 | 4 | 17 | 749 | 906 | 483 | 423 | 37 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module: Aws.Sns.Commands.GetSubscriptionAttributes
-- Copyright: Copyright © 2014 AlephCloud Systems, I... | alephcloud/hs-aws-sns | src/Aws/Sns/Commands/GetSubscriptionAttributes.hs | mit | 4,565 | 0 | 21 | 782 | 673 | 388 | 285 | 69 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE Rank2Types #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Database.Persist.Sql.Orphan.Persis... | jcristovao/persistent | persistent/Database/Persist/Sql/Orphan/PersistStore.hs | mit | 11,931 | 75 | 26 | 4,360 | 3,135 | 1,602 | 1,533 | 249 | 2 |
module Semantics.Value
( Value(..), Eval
, Level(..), level
, ICon(..), ID, Sort(..)
, POrd(..), DOrd(..), lessOrEqual
) where
import Syntax.Term
data Value t
= Lam
| Pi Sort Sort
| DCon ID Int Int (Eval t)
| PCon
| ICon ICon
| CCon
| FunCall ID (Eval t)
| Universe ... | bitemyapp/hoq | src/Semantics/Value.hs | gpl-2.0 | 4,782 | 0 | 14 | 1,541 | 2,333 | 1,169 | 1,164 | 144 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/DetachElasticLoadBalancer.hs | mpl-2.0 | 4,267 | 0 | 9 | 857 | 424 | 259 | 165 | 57 | 1 |
----------------------------------------------------------------------------
--
-- Pretty-printing of common Cmm types
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
--
-- This is where we walk over Cmm emitting an external representation,... | mcmaniac/ghc | compiler/cmm/PprCmmDecl.hs | bsd-3-clause | 6,755 | 4 | 16 | 1,421 | 1,353 | 706 | 647 | 86 | 7 |
{-# LANGUAGE UnboxedTuples #-}
-- See Note [Float coercions (unlifted)] in Simplify
-- This one gave a CoreLint error when compiled optimised
--
-- See also #1718, of which this is a simplified version
module ShouldCompile where
bar :: Bool -> Int
bar x = case (case x of { True -> (# 2,3 #); False -> error "urk" }) ... | sdiehl/ghc | testsuite/tests/simplCore/should_compile/simpl018.hs | bsd-3-clause | 356 | 0 | 10 | 85 | 75 | 44 | 31 | 5 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-elasticache/gen/Network/AWS/ElastiCache/RevokeCacheSecurityGroupIngress.hs | mpl-2.0 | 5,735 | 0 | 9 | 1,073 | 559 | 341 | 218 | 75 | 1 |
module Dwarf.Types
( -- * Dwarf information
DwarfInfo(..)
, pprDwarfInfo
, pprAbbrevDecls
-- * Dwarf address range table
, DwarfARange(..)
, pprDwarfARange
-- * Dwarf frame
, DwarfFrame(..), DwarfFrameProc(..), DwarfFrameBlock(..)
, pprDwarfFrame
-- * Utilities
, pprByte
, pprHalf
, ... | anton-dessiatov/ghc | compiler/nativeGen/Dwarf/Types.hs | bsd-3-clause | 19,485 | 0 | 21 | 5,060 | 4,301 | 2,255 | 2,046 | 344 | 8 |
module ListCompIn2 where
main
= sum [x + 4 | (x, y, z) <- zipthree [1, 3 ..]
['h' .. 'o']
[False ..],
x > 0]
zipthree :: [a] -> [b] -> [c] -> [(a, b, c)]
zipthree
= \ xs ys zs ->
case (xs, ys, zs) of
([], _, _) -> []
(_, [], _) -> []
(_, _, []) -> []
((a : as), (b... | SAdams601/HaRe | old/testing/removeDef/ListCompIn2_AstOut.hs | bsd-3-clause | 380 | 10 | 11 | 145 | 259 | 151 | 108 | 15 | 4 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.Builtin
-- Copyright : Isaac Jones 2006, Duncan Coutts 2007-2009
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- The module defines all the known built-in 'Pr... | mydaum/cabal | Cabal/Distribution/Simple/Program/Builtin.hs | bsd-3-clause | 11,157 | 0 | 17 | 2,736 | 2,078 | 1,187 | 891 | 222 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-- |Generate a Storable instance for ROS msg types.
module Instances.Storable (genStorableInstance) where
import Control.Monad ((>=>))
import Data.ByteString.Char8 (ByteString, pack)
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Types
import Analysis
... | bitemyapp/roshask | src/executable/Instances/Storable.hs | bsd-3-clause | 2,917 | 0 | 14 | 1,198 | 616 | 337 | 279 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
... | snoyberg/ghc | libraries/base/GHC/Generics.hs | bsd-3-clause | 47,373 | 0 | 12 | 10,608 | 6,506 | 3,953 | 2,553 | -1 | -1 |
module WhereIn2 where
--A definition can be demoted to the local 'where' binding of a friend declaration,
--if it is only used by this friend declaration.
--Demoting a definition narrows down the scope of the definition.
--In this example, demote the top level 'sq' to 'sumSquares'
--This example also aims to test the... | kmate/HaRe | old/testing/demote/WhereIn2_TokOut.hs | bsd-3-clause | 495 | 0 | 7 | 117 | 92 | 49 | 43 | 8 | 1 |
{-# LANGUAGE TypeFamilies #-}
module Instance1 where
import Definition
type instance F Int = Int
| vladfi1/hs-misc | conflict/Instance1.hs | mit | 100 | 0 | 4 | 18 | 18 | 12 | 6 | 4 | 0 |
/*Owner & Copyrights: Vance King Saxbe. A.*//* Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe... | VanceKingSaxbeA/GoldSaxMachineStore | GoldSaxMachineModule13/src/Chapter13/Users.hs | mit | 1,478 | 37 | 16 | 206 | 341 | 170 | 171 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.