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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-
(*) Remove the K'th element from a list.
Example in Haskell:
*Main> removeAt 2 "abcd"
('b',"acd")
-}
removeAt :: Int -> [a] -> (a, [a])
removeAt n xs
| n > 0 = let first = take (n-1) xs
rest = drop n xs
in (xs !! (n-1), first ++ rest)
| gaoce/haskell_99 | 20.hs | mit | 281 | 0 | 12 | 95 | 101 | 53 | 48 | 5 | 1 |
module Integracion where
import GramaticaAbstracta
import Semantica
import EcuacionesNoLineales
--Funcion que halla la integral definida de una funcion por medio del metodo del Trapecio Sencillo
trapecioSen :: Func -> Func -> Func -> Func
trapecioSen f a b = reduccion (FMult (FDiv h (FConst 2)) (FSum fx0 fxn))
... | dmuneras/LambdaMethods | src/Integracion.hs | gpl-2.0 | 6,443 | 0 | 18 | 2,362 | 2,166 | 1,127 | 1,039 | 81 | 2 |
-- Dragon.hs
-- La curva dragón
-- José A. Alonso Jiménez <jalonso@us.es>
-- Sevilla, 24 de Mayo de 2014
-- ---------------------------------------------------------------------
module Tema_26.Dragon where
import Graphics.Gloss
import System.IO
main :: IO ()
main = do
hSetBuffering stdout NoBuffering
putStr "Dra... | jaalonso/I1M-Cod-Temas | src/Tema_26/Dragon.hs | gpl-2.0 | 1,296 | 0 | 12 | 411 | 372 | 196 | 176 | 31 | 1 |
{-# LANGUAGE TemplateHaskell, GADTs #-}
module Ocram.Intermediate.CriticalVariables
-- exports {{{1
(
critical_variables
) where
-- imports {{{1
import Control.Applicative ((<$>), (<*>))
import Data.Generics (everything, mkQ)
import Data.Maybe (fromMaybe)
import Compiler.Hoopl hiding ((<*>), Label, Body)
import Lang... | copton/ocram | ocram/src/Ocram/Intermediate/CriticalVariables.hs | gpl-2.0 | 8,251 | 0 | 16 | 2,559 | 2,970 | 1,516 | 1,454 | 158 | 17 |
{-# LANGUAGE OverloadedStrings #-}
module Lambdit.Types where
import Control.Applicative ((<$>), (<*>), empty, pure)
import Data.Aeson
import Data.Text (unpack)
import Data.Vector (toList)
data LoginRequest = LoginRequest {
username :: String,
passwd :: String,
apiType :: String
} deriving (Show)
data J... | ejconlon/lambdit | src/Lambdit/Types.hs | gpl-2.0 | 1,440 | 0 | 11 | 364 | 456 | 257 | 199 | 46 | 0 |
module IrcBot ( server
, port
, chan
, nick
, topic
, owners
, privmsg
, write
)
where
import Types
import Data.List
import Network
import System.IO
import System.Time
import System.Exit
impor... | DSMan195276/QB64Bot | IrcBot.hs | gpl-2.0 | 939 | 0 | 10 | 284 | 266 | 150 | 116 | 36 | 1 |
module Main where
-------------------------------------------------------------
data BStree = BNil | Node { value :: Int
, bstl :: BStree
, bstr :: BStree
} deriving (Show, Eq)
--Interp. Binary search tree
empty_tree :: BStree
empty_tree... | nastya13/binary-search-tree | src/Main.hs | gpl-3.0 | 1,986 | 0 | 17 | 752 | 479 | 255 | 224 | 29 | 3 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
... | Ferdinand-vW/sessiontypes | src/Control/SessionTypes/Normalize.hs | gpl-3.0 | 25,170 | 0 | 21 | 7,239 | 9,726 | 5,014 | 4,712 | 375 | 1 |
-- |
-- Module : Graphics.Dynamic.Plot.Internal.Types
-- Copyright : (c) Justus Sagemüller 2015
-- License : GPL v3
--
-- Maintainer : (@) sagemueller $ geo.uni-koeln.de
-- Stability : experimental
-- Portability : requires GHC>6 extensions
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE GADTs... | leftaroundabout/dynamic-plot | Graphics/Dynamic/Plot/Internal/Types.hs | gpl-3.0 | 20,554 | 310 | 46 | 6,586 | 6,589 | 3,527 | 3,062 | 380 | 5 |
{-# LANGUAGE TupleSections, FlexibleContexts, OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
import Data.Generics.Uniplate.Data
import Control.Applicative
import Control.Monad.State
import Control.Arrow
import Language.SQL.SimpleSQL.Syntax
import Language.SQL.SimpleSQL.Parser (parseQueryExpr, ParseError(..))... | axel-angel/haxquery | Main.hs | gpl-3.0 | 6,080 | 21 | 19 | 1,475 | 2,184 | 1,052 | 1,132 | 143 | 3 |
module Zipper
( Zipper
, fromList
, toList
, reset
, cursor
, left
, right
, insert
) where
import Data.Maybe
data Zipper a = Zipper [a] [a]
deriving (Show, Eq)
fromList :: [a] -> Zipper a
fromList = Zipper []
toList :: Zipper a -> [a]
toList (Zipper ls rs) = reve... | Jim-Holmstroem/Maskin | src/Zipper.hs | gpl-3.0 | 776 | 0 | 9 | 210 | 390 | 202 | 188 | 28 | 1 |
module BEncodeI where
import HTorrentPrelude
import Data.Char
import qualified Data.Map as M
import Text.Parsec as Par hiding ((<|>), many)
data BEncode = BString String | BInt Int | BList [BEncodeI] |
BDict (Map String BEncodeI) deriving Show
data BEncodeI = BEncodeI { _bencode :: BEncode,
... | ian-mi/hTorrent | BEncodeI.hs | gpl-3.0 | 2,351 | 0 | 13 | 678 | 846 | 437 | 409 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Hide.hs | mpl-2.0 | 3,497 | 0 | 15 | 809 | 397 | 240 | 157 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/List.hs | mpl-2.0 | 5,998 | 0 | 18 | 1,386 | 884 | 512 | 372 | 129 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Delete.hs | mpl-2.0 | 4,262 | 0 | 16 | 926 | 466 | 278 | 188 | 80 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/ChromeosDevices/Update.hs | mpl-2.0 | 6,848 | 0 | 23 | 1,675 | 960 | 560 | 400 | 143 | 1 |
module Util where
--type Ft = Float -- default floating-point type to use. Could be Double.
type Ft = Double -- default floating-point type to use. Could be Double.
deltatime = 0.1 -- this is a basis for dt is other functions to advance time.
-- Particle: position velocity
data Ptcl = Ptcl {
mass :: Ft
,... | aday00/sim | Util.hs | agpl-3.0 | 417 | 0 | 8 | 97 | 65 | 43 | 22 | 10 | 1 |
{-# LANGUAGE Safe, NoImplicitPrelude, UnicodeSyntax, OverloadedStrings #-}
module Data.Microformats2.Parser (
Mf2ParserSettings (..)
, HtmlContentMode (..)
, parseMf2
, extractProperty
-- * HTML parsing stuff (from html-conduit, xml-lens)
, documentRoot
, parseLBS
, sinkDoc
) where
import Prelude.Compa... | myfreeweb/microformats2-parser | library/Data/Microformats2/Parser.hs | unlicense | 7,539 | 16 | 16 | 1,921 | 2,440 | 1,256 | 1,184 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Stampede.Parse where
import Stampede.Stomp
import Data.ByteString.Char8 (ByteString, pack)
import qualified Data.Attoparsec.ByteString.Char8 as C
import Data.Text (Text)
import Data.Text.Read (decimal)
import qualified Data.Attoparsec.Text as T
import qualified Data.Text.Enco... | lucasdicioccio/stampede | Stampede/Parse.hs | apache-2.0 | 2,687 | 0 | 19 | 471 | 911 | 471 | 440 | 64 | 1 |
{-# LANGUAGE ViewPatterns #-}
module Game.Chess.Position where
import Data.List
import Data.Maybe (catMaybes)
import Data.Ord (comparing)
import qualified Data.Vector as V
import Game.Chess.Board (index, everyPiece, move)
import Game.Chess.Piece (movingVectors', multiMovePiece)
import Game.Chess.Types
import Game.Ches... | relrod/cx | src/Game/Chess/Position.hs | bsd-2-clause | 7,199 | 0 | 15 | 1,578 | 1,491 | 798 | 693 | 102 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Settings.YQL
( YQLSettings(..) ) where
import Control.Applicative (pure)
import Data.Aeson
import Data.JSON.Schema
data YQLSettings =
YQLSettings
deriving (Eq, Read, Show)
instance FromJSON YQLSettings where
parseJSON _ = pure YQLSettings
instance HasSch... | fabianbergmark/APIs | src/Data/Settings/YQL.hs | bsd-2-clause | 395 | 0 | 10 | 67 | 111 | 62 | 49 | 13 | 0 |
-- | Wrapper program for propellor distribution.
--
-- Distributions should install this program into PATH.
-- (Cabal builds it as dist/build/propellor/propellor).
--
-- This is not the propellor main program (that's config.hs).
-- This bootstraps ~/.propellor/config.hs, builds it if
-- it's not already built, and runs... | ArchiveTeam/glowing-computing-machine | src/wrapper.hs | bsd-2-clause | 2,666 | 28 | 14 | 470 | 519 | 273 | 246 | 56 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LAN... | supki/libjenkins | src/Jenkins/Rest/Internal.hs | bsd-2-clause | 9,194 | 0 | 17 | 2,033 | 3,491 | 1,837 | 1,654 | 200 | 6 |
{-|
Module : Database.Taxi.Segment.Constants
Description : Constants
Stability : Experimental
Maintainer : guha.rabishankar@gmail.com
-}
module Database.Taxi.Segment.Constants where
tempDir :: FilePath
tempDir = "tmp"
dataExtension :: String
dataExtension = "dat"
indexExtension :: String
indexExtens... | rabisg/taxi | Database/Taxi/Segment/Constants.hs | bsd-3-clause | 384 | 0 | 4 | 62 | 49 | 31 | 18 | 9 | 1 |
module Library.Page.Search where
import qualified Graphics.UI.Threepenny as UI
import Graphics.UI.Threepenny.Core hiding (row)
import Foundation.Common
import Foundation.Input
import Foundation.Layout
import Library
import Database.SQLite.Simple
import Control.Monad
type Search search extra =
(Element,Elem... | kylcarte/threepenny-extras | src/Library/Page/Search.hs | bsd-3-clause | 2,831 | 0 | 25 | 1,064 | 688 | 350 | 338 | 68 | 6 |
module Types.GeomStaticMesh where
import Data.Array.IArray (Array)
import Data.Text (Text)
import Types.Internal
type Vertices = Array Int Vector
type Faces = [Int]
type Normals = Array Int Normal
type FaceNormals = [Int]
type MapChannels = [(Int, Array Int Colour, [Int])]
type Edge... | leohaskell/parseVRS | src/Types/GeomStaticMesh.hs | bsd-3-clause | 856 | 0 | 8 | 226 | 211 | 133 | 78 | 25 | 0 |
module Data.BiHashMap ( BiHashMap
, fromHashMap
, singleton
, insertWith
, unionWith
, delete
, member
, lookup
, lookupV
... | bgamari/minir | Data/BiHashMap.hs | bsd-3-clause | 3,397 | 0 | 15 | 1,024 | 1,294 | 671 | 623 | 66 | 1 |
module Settings.Builders.Tar (tarBuilderArgs) where
import Base
import Expression
import Predicates (builder)
tarBuilderArgs :: Args
tarBuilderArgs = builder Tar ? do
input <- getInput
mconcat [ arg "-xf"
, ("*.gz" ?== input) ? arg "--gzip"
, ("*.bz2" ?== input) ? arg "--bzip2"
... | quchen/shaking-up-ghc | src/Settings/Builders/Tar.hs | bsd-3-clause | 382 | 0 | 12 | 110 | 115 | 62 | 53 | 12 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.AMD.FramebufferMultisampleAdvanced
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : sta... | haskell-opengl/OpenGLRaw | src/Graphics/GL/AMD/FramebufferMultisampleAdvanced.hs | bsd-3-clause | 1,136 | 0 | 5 | 124 | 85 | 60 | 25 | 15 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcMovectle]{Typechecking a whole module}
-}
{-# LANGUAGE CPP, NondecreasingIndentation #-}
module TcRnDriver (
#ifdef GHCI
tcRnStmt, tcRnExpr, tcRnType,
tcRnImportDecls,
tcRnLookupRdrName,... | bitemyapp/ghc | compiler/typecheck/TcRnDriver.hs | bsd-3-clause | 91,309 | 26 | 29 | 31,185 | 16,065 | 8,399 | 7,666 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TupleSections #-}
module Main where
import Data.Functor.Identity
import Data... | danidiaz/oplss-downloader | src/Main.hs | bsd-3-clause | 9,077 | 0 | 19 | 2,498 | 2,501 | 1,282 | 1,219 | 202 | 4 |
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-}
module Server where
import Network.WebSockets
import qualified Data.Aeson as A
import Data.Aeson.TH
import Control.Monad
import Control.Monad.State
import Control.Concurrent
import qualified Data.ByteString.Lazy.Char8 as Char8
import qualified Data.ByteString.Lazy a... | ojw/taskpals | src/Server.hs | bsd-3-clause | 6,203 | 0 | 16 | 1,077 | 1,961 | 1,010 | 951 | 119 | 3 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import qualified Data.IntMap as IntMap
import Data.Kontiki.MemLog
import qualified Data.Set ... | abailly/kontiki | bin/demo.hs | bsd-3-clause | 742 | 0 | 8 | 213 | 139 | 86 | 53 | 17 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, RecordWildCards #-}
module Stashh.Env(
Env (..),
parseEnv,
filterEnvArgs,
removeEnvArgs,
removeOptArgs,
url,
user,
passwd
) where
import System.Environment
import System.Console.CmdArgs
import System.FilePath ((</>), takeDirectory)
import System.Direc... | yuroyoro/stashh | src/Stashh/Env.hs | bsd-3-clause | 3,855 | 1 | 14 | 780 | 1,145 | 600 | 545 | 108 | 2 |
module Singletons.T33 where
import Data.Singletons.TH
import Prelude.Singletons
$(singletons [d|
foo :: (Bool, Bool) -> ()
foo ~(_, _) = ()
|])
| goldfirere/singletons | singletons-base/tests/compile-and-dump/Singletons/T33.hs | bsd-3-clause | 152 | 0 | 7 | 29 | 31 | 19 | 12 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExistentialQuantification #-}
--------------------------------------------------------------------------
-- |
-- Module: Security.Model.Authorization
-- Copyright: (c) 2015 Martin Grabmueller
-- License: BSD3
--
-- Maintainer: ... | mgrabmueller/security-model | src/Security/Model/Authorization.hs | bsd-3-clause | 2,668 | 0 | 18 | 567 | 575 | 297 | 278 | 52 | 3 |
{-# LANGUAGE TypeSynonymInstances, OverloadedStrings #-}
module ProtoTypesA where
import Data.ByteString.Lazy
import Data.Binary
import VChanUtil
import Codec.Crypto.RSA hiding (sign, verify)
import TPM.Types
import qualified TPM.Types as TPM
import ProtoTypes(Channel)
import Data.Aeson (toJSON, parseJSON, ToJSON,... | armoredsoftware/protocol | tpm/mainline/protoMonad/ProtoTypesA.hs | bsd-3-clause | 7,444 | 0 | 14 | 2,280 | 2,066 | 1,068 | 998 | 177 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Web.Lightning.Utilities
Description : Commonly used utility functions.
Copyright : (c) Connor Moreside, 2016
License : BSD-3
Maintainer : connor@moresi.de
Stability : experimental
Portability : POSIX
Contains commonly used utility functions used throughout... | cmoresid/lightning-haskell | src/Web/Lightning/Utilities.hs | bsd-3-clause | 9,600 | 0 | 14 | 2,781 | 2,038 | 1,127 | 911 | 154 | 3 |
module DeleteNth where
import Data.List
-- | Delete every element after its nth occurence
-- | Link: https://biturl.io/nth
-- | My original solution
deleteNth :: [Int] -> Int -> [Int]
deleteNth xs n =
foldl
(\b a ->
if count a b >= n
then b
else b ++ [a])
[]
xs
where
coun... | Eugleo/Code-Wars | src/number-kata/DeleteNth.hs | bsd-3-clause | 507 | 0 | 11 | 143 | 172 | 94 | 78 | 15 | 2 |
{-# LANGUAGE OverloadedStrings, StandaloneDeriving #-}
module Lucid.PreEscaped where
import Lucid
import Lucid.Base
import qualified Data.Text as T
import qualified Blaze.ByteString.Builder as Blaze
import qualified Blaze.ByteString.Builder.Html.Utf8 as Blaze
import Data.Monoid ((<>))
import qualified Data.ByteString... | diffusionkinetics/open | lucid-extras/lib/Lucid/PreEscaped.hs | mit | 759 | 0 | 13 | 112 | 252 | 141 | 111 | 18 | 1 |
-- | The notion of a string pattern: abc%def can be matched or plugged
-- with a match
module Lib.StringPattern
( StringPattern, fromString, toString
, Match, matchPlaceHolder1, matchPlaceHolder2, match, plug
) where
import Control.DeepSeq (NFData(..))
import Control.DeepSeq.Generics (g... | buildsome/buildsome | src/Lib/StringPattern.hs | gpl-2.0 | 3,006 | 0 | 13 | 753 | 833 | 442 | 391 | 64 | 7 |
module MultipleImportD where
d :: Int
d = 4
e :: Int
e = 5 | roberth/uu-helium | test/make/MultipleImportD.hs | gpl-3.0 | 60 | 0 | 4 | 16 | 24 | 15 | 9 | 5 | 1 |
module LayoutBad4 where
x = let { y = 4
z = 5
} in 6
| roberth/uu-helium | test/parser/LayoutBad4.hs | gpl-3.0 | 80 | 1 | 9 | 43 | 29 | 16 | 13 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-swf/gen/Network/AWS/SWF/RespondActivityTaskCompleted.hs | mpl-2.0 | 6,115 | 0 | 12 | 1,163 | 521 | 327 | 194 | 71 | 1 |
{-# LANGUAGE NoMonomorphismRestriction, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances, UndecidableInstances, RankNTypes #-}
module Control.Monad.Errors
( ErrorsT, runErrorsT, module Control.Monad.Errors.Class ) where
import Control.Applicative
import Control.Arrow (first)
import Control.Monad.... | Toxaris/pts | src-lib/Control/Monad/Errors.hs | bsd-3-clause | 4,046 | 0 | 16 | 1,517 | 1,525 | 787 | 738 | 111 | 1 |
{-# OPTIONS_GHC -Wall #-}
module Reporting.Error.Syntax where
import qualified Data.List as List
import qualified Data.Set as Set
import qualified Text.Parsec.Error as Parsec
import Text.PrettyPrint.ANSI.Leijen (dullyellow, hsep, text)
import qualified Reporting.Error.Helpers as Help
import qualified Reporting.Render... | mgold/Elm | src/Reporting/Error/Syntax.hs | bsd-3-clause | 14,716 | 0 | 19 | 5,018 | 2,105 | 1,104 | 1,001 | 291 | 22 |
module Numeric.Algebra.Complex.Class
( Complicated(..)
) where
import Numeric.Algebra.Distinguished.Class
import Numeric.Covector
import Prelude (return)
class Distinguished r => Complicated r where
i :: r
instance Complicated a => Complicated (Covector r a) where
i = return i
| athanclark/algebra | src/Numeric/Algebra/Complex/Class.hs | bsd-3-clause | 289 | 0 | 7 | 47 | 89 | 50 | 39 | 9 | 0 |
{-# OPTIONS_GHC -Wall #-}
module Canonicalize.Setup (environment) where
import Control.Applicative ((<$>))
import Control.Arrow (second)
import qualified Data.Graph as Graph
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Data.Traversable as Trav
import qualified AST.Declaration... | Axure/elm-compiler | src/Canonicalize/Setup.hs | bsd-3-clause | 12,035 | 0 | 24 | 3,796 | 3,401 | 1,765 | 1,636 | 291 | 9 |
-- GSoC 2013 - Communicating with mobile devices.
{-# LANGUAGE OverloadedStrings , ScopedTypeVariables #-}
-- | This Module define the main function to send Push Notifications through Cloud Connection Server (GCM).
module Network.PushNotify.Ccs.Send
( startCCS
, closeCCS
, sendCCS
, withCCS
, with... | jimpeak/GSoC-Communicating-with-mobile-devices | push-notify-ccs/Network/PushNotify/Ccs/Send.hs | mit | 14,389 | 0 | 23 | 6,288 | 3,219 | 1,647 | 1,572 | 233 | 11 |
{- |
Module : $Header$
Description : Generating DFG Doc out of SPASS theories.
Copyright : (c) Klaus Luettich, Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : provisional
Portability : non-protable(Logic)
Printing a (G_theory CAS... | keithodulaigh/Hets | SoftFOL/CreateDFGDoc.hs | gpl-2.0 | 3,949 | 0 | 18 | 1,393 | 716 | 386 | 330 | 82 | 8 |
module Main where
import Control.Monad
import Data.Binary
import Data.List (sortBy)
import Data.Function (on)
import qualified Data.ByteString.Char8 as S
import qualified Data.ByteString.Lazy as L
import GHC.Packing
import Network.Socket hiding (send, sendTo, recv, recvFrom)
import Network.Socket.ByteString
import Sys... | ajnsit/packman | Test/Workpool.hs | bsd-3-clause | 8,010 | 0 | 17 | 1,950 | 2,208 | 1,112 | 1,096 | 165 | 3 |
{-# OPTIONS_GHC -Wall -fno-warn-name-shadowing #-}
{-# LANGUAGE ScopedTypeVariables, GADTs #-}
module ConstProp (ConstFact, constLattice, initFact, varHasLit, constProp) where
import Control.Monad
import qualified Data.Map as Map
import Compiler.Hoopl
import IR
import OptSupport
type Node = Insn -- for paper
-- Con... | ezyang/hoopl | testing/ConstProp.hs | bsd-3-clause | 2,845 | 0 | 14 | 718 | 830 | 443 | 387 | 49 | 9 |
<?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="pl-PL">
<title>AJAX Spider | ZAP Extensions</title>
<maps>
<homeID>top</homeID>
<mapre... | ccgreen13/zap-extensions | src/org/zaproxy/zap/extension/spiderAjax/resources/help_pl_PL/helpset_pl_PL.hs | apache-2.0 | 975 | 100 | 29 | 160 | 393 | 213 | 180 | -1 | -1 |
-- !!! Sublist for non-class/tycon
module M where
import Prelude(map(..))
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/module/mod89.hs | bsd-3-clause | 75 | 2 | 5 | 11 | 18 | 12 | 6 | -1 | -1 |
module Main where
my_id :: a -> a
my_id x = $( [| x |] )
main = print (my_id "hello")
| ghc-android/ghc | testsuite/tests/th/TH_spliceE1.hs | bsd-3-clause | 88 | 0 | 7 | 23 | 42 | 24 | 18 | -1 | -1 |
module Sun where
import Control.Applicative
import Data.Time.Calendar
import Data.Time.Clock
-- J2000 epoch
j2000 :: UTCTime -> Double
j2000 dt = fromIntegral (toModifiedJulianDay $ utctDay dt) + realToFrac (utctDayTime dt) / 86400 - 51544.5
-- helper
deg2rad x = (x/180) * pi
rad2deg x = (x/pi) * 180
-- now ast... | fizyk20/day-length-hs | src/Sun.hs | mit | 4,521 | 1 | 14 | 1,314 | 1,713 | 858 | 855 | 102 | 3 |
module Main where
-- friends
import qualified BitBoard
import qualified Piece
import qualified Search
import qualified ProofNumberSearch
-- GHC
-- libraries
import Text.Printf (printf)
import Criterion.Main
-- std
import Test.HUnit
import Test.Framework
import Test.Framework.Providers.HUnit
import Data.List
main :: ... | ysnrkdm/Hamlet | src/bench/Main.hs | mit | 1,413 | 0 | 14 | 294 | 208 | 115 | 93 | 22 | 1 |
module CStack where
import Foreign
import Foreign.C.Types
data Stack
foreign import ccall unsafe "realtime_dynamic_int_stack.h stack_alloc"
c_stack_alloc :: IO (Ptr Stack)
foreign import ccall unsafe "realtime_dynamic_int_stack.h stack_free"
c_stack_free :: Ptr Stack -> IO ()
foreign import... | andreasfrom/realtime_dynamic_int_stack | CStack.hs | mit | 1,276 | 0 | 10 | 201 | 290 | 148 | 142 | -1 | -1 |
module Y2016.M06.D20.Exercise where
{--
SO! My daughter is working on solving quadratic equations, so, GUESS WHAT WE'RE
DOING TODAY?
Just guess.
So, the standard form of the quadratic equation is:
ax^2 + bx + c = 0
And is solved with:
x = (-b +/- sqrt (b^2 - 4ac)) / 2a
BECAUSE SCIENCE!
Now we have complex numbe... | geophf/1HaskellADay | exercises/HAD/Y2016/M06/D20/Exercise.hs | mit | 1,038 | 0 | 7 | 182 | 143 | 92 | 51 | 6 | 1 |
import Network.Wai.Handler.Warp (runSettings, defaultSettings, setPort, setTimeout)
import Tsatti (tsattiApplication, pinger)
import Control.Concurrent
import Control.Concurrent.STM
port :: Int
port = 3000
timeout :: Int
timeout = 300 -- 5 minutes
main :: IO ()
main = do
putStrLn $ "Starting server at port " ++ ... | phadej/tsatti | TsattiWarp.hs | mit | 489 | 0 | 9 | 87 | 152 | 80 | 72 | 15 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Servant.Server.Internal.RouteResult where
import Control.Monad
(ap, liftM)
import ... | zoomhub/zoomhub | vendor/servant/servant-server/src/Servant/Server/Internal/RouteResult.hs | mit | 2,579 | 0 | 14 | 735 | 656 | 353 | 303 | 64 | 0 |
-----------------------------------------------------------
-- |
-- module: MXNet.Core.Base
-- copyright: (c) 2016 Tao He
-- license: MIT
-- maintainer: sighingnow@gmail.com
--
-- Interfaces in core module of MXNet.
--
module MXNet.Core.Base
... | sighingnow/mxnet-haskell | mxnet/src/MXNet/Core/Base.hs | mit | 1,255 | 0 | 5 | 405 | 187 | 133 | 54 | 45 | 0 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE MultiWayIf #-}
------------------------------------------------------------------------------
-- |
-- Module : Hajong.Server
-- Copyright : (C) 2014 Samuli Thomasson
-- License : MIT (see the file LICENSE)
-- Maintainer : Samuli Thomasson <samuli.thoma... | SimSaladin/hajong | hajong-server/src/Hajong/Server.hs | mit | 17,829 | 0 | 26 | 4,865 | 5,176 | 2,493 | 2,683 | -1 | -1 |
import Data.List
count :: (Eq a) => a -> ([a] -> Int)
count x = length . filter (==x)
histogram :: (Eq a) => [a] -> [(a, Int)]
histogram l = [(el, count el l) | el <- (nub l)]
cartesian :: [t1] -> [t] -> [(t1, t)]
cartesian xs ys = [(x, y) | x <- xs, y <- ys]
reverse' :: [a] -> [a]
reverse' = foldl (flip (:)) []
... | stoimenoff/functional-programming | exercises/ex13.hs | mit | 698 | 0 | 12 | 167 | 427 | 236 | 191 | 20 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE TemplateHaskell #-}
import Control.Concurrent
import qualified Data.Text as T
import qualified Data.Vector as V
import Path
import System.Directory
import AIChallenger.Bot
import AIChallenger.Match
import AIChallenger.Types
import qualif... | ethercrow/ai-challenger | test-rps/TestMain.hs | mit | 2,307 | 0 | 17 | 643 | 733 | 368 | 365 | 60 | 2 |
module Handler.Home where
import qualified Data.Text as Text
import qualified Data.Text.Read as Text
import qualified Database.Esqueleto as E
--import Database.Esqueleto ((^.))
import qualified Database.Persist.Sql as PSQL
import Import
getHomeR :: Handler Html
getHomeR = lookupGetParam "r" ... | achirkin/mooc-images | src/Handler/Home.hs | mit | 8,000 | 0 | 23 | 2,414 | 2,062 | 1,071 | 991 | -1 | -1 |
module Foundation where
import Prelude
import Yesod
import Yesod.Static
import Yesod.Auth
import Yesod.Auth.BrowserId
import Yesod.Auth.GoogleEmail
import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal)
import Network.HTTP.Conduit (Manager)
import qualified Settings
import Settings.Developmen... | smurphy8/yesod-angular-sqlite | Foundation.hs | mit | 7,046 | 0 | 17 | 1,539 | 978 | 529 | 449 | -1 | -1 |
{-# Language DeriveGeneric #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Unison.Runtime.JournaledTrie where
import Data.ByteString (ByteString)
import Data.Bytes.Serial (Serial(..))
import GHC.Generics
import qualified Unison.BlockStore as BS
import qualified Unison.Runtime.Block as B
import qualified Unison.Runti... | nightscape/platform | node/src/Unison/Runtime/JournaledTrie.hs | mit | 1,401 | 0 | 11 | 291 | 507 | 273 | 234 | 36 | 5 |
module Tach.Acid.Impulse.State.Internal
(
) where
| smurphy8/tach | core-libs/tach-acid-impulse-lib/src/Tach/Acid/Impulse/State/Internal.hs | mit | 58 | 0 | 3 | 13 | 12 | 9 | 3 | 2 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANG... | erikd/yesod | yesod-core/Yesod/Core/Widget.hs | mit | 11,863 | 0 | 18 | 2,625 | 3,537 | 1,835 | 1,702 | 224 | 2 |
-- Copyright (C) 2006-2008 Angelos Charalambidis <a.charalambidis@di.uoa.gr>
--
-- This program 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 2, or (at your option)
-- any later version... | acharal/hopes | src/frontend/Lexer.hs | gpl-2.0 | 4,290 | 0 | 19 | 1,205 | 1,522 | 776 | 746 | 78 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Web.Crane.Response where
import Web.Crane.Types
import Blaze.ByteString.Builder
import Control.Monad.Reader
import qualified Data.CaseInsensitive as CI
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Text.Encoding as TE
import Data.Text (Text)
import Data... | tathougies/crane | src/Web/Crane/Response.hs | gpl-2.0 | 2,045 | 0 | 13 | 368 | 509 | 274 | 235 | 36 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module RunProcess
(
-- types
JobId
, JobResult
, ProcessData(..)
, ProcessEnv(..)
-- functions
, runProcess
, executeWork
) where
import RunAuxiliary
import RunEnvironment
import RunNode
import RunWork
import... | hexenroehrling/hs-scheduler | src/RunProcess.hs | gpl-3.0 | 7,444 | 0 | 17 | 1,802 | 1,813 | 920 | 893 | 152 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Clippy.ES (insertSnippet',
insertYank',
searchSnippet',
... | kRITZCREEK/clippy-api | clippy-server/Main.hs | gpl-3.0 | 1,056 | 0 | 13 | 460 | 219 | 112 | 107 | 25 | 1 |
{-# LANGUAGE
DeriveFunctor
, FlexibleContexts
, FlexibleInstances
, GeneralizedNewtypeDeriving
, MultiParamTypeClasses
, TupleSections
, UndecidableInstances
#-}
module Graphics.QML.Transient.Internal.Types where
import Control.Applicative
import Control.Monad.IO.Class
import Control.Monad.Reader
im... | marcinmrotek/hsqml-transient | src/Graphics/QML/Transient/Internal/Types.hs | gpl-3.0 | 2,201 | 0 | 11 | 446 | 626 | 336 | 290 | 47 | 0 |
{-# LANGUAGE GADTs #-}
module Graph.Builder.Digraph ( module Graph.Digraph
, GraphBuilderT (..)
, GraphBuilder (..)
, buildGraphT
, buildGraphTFrom
, buildGraph
... | rodrigo-machado/ufrgs-grt | src/Graph/Builder/Digraph.hs | gpl-3.0 | 2,929 | 0 | 11 | 1,081 | 995 | 518 | 477 | 60 | 2 |
-- Copyright (C) 2009-2012 John Millikin <john@john-millikin.com>
--
-- This program 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 License, or
-- any later version.
--
-- This progr... | jotrk/haskell-dbus | lib/DBus/Address.hs | gpl-3.0 | 5,872 | 35 | 14 | 1,043 | 1,354 | 712 | 642 | 102 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Numerical.PETSc.Repl
-- Copyright : (c) Marco Zocca 2015
-- License : LGPL3
-- Maintainer : zocca . marco . gmail . com
-- Stability : experimental
--
-- | Read-Eval-Print Loop
--
--------------------------... | ocramz/petsc-hs | src/Numerical/PETSc/Repl.hs | gpl-3.0 | 589 | 0 | 4 | 73 | 33 | 27 | 6 | 3 | 0 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module Fcr.PrettyPrinting where
import Fcr.Syntax
-- import Cegt.Rewrite
import Text.PrettyPrint
import Text.Parsec.Pos
import Data.Char
import Text.Parsec.Error(ParseError,showErrorMessages,errorPos,errorMessages)
-- import Debug.Trace
class Disp d where
disp ... | Fermat/FCR | src/Fcr/PrettyPrinting.hs | gpl-3.0 | 4,152 | 0 | 21 | 1,250 | 1,849 | 922 | 927 | 120 | 2 |
{-# LANGUAGE DeriveFunctor #-}
module V3
( Vector3(..)
, V3
, zipV3
)
where
import Graphics.Rendering.OpenGL.GL.Tensor (Vector3(..))
type V3 = Vector3
zipV3 f (Vector3 a b c) (Vector3 x y z) = Vector3 (f a x) (f b y) (f c z)
-- instance Num a => Num (V3 a) where
-- (+) = zipV3 (+)
-- (-) = zipV3 (-)
... | holmisen/glbrix | src/V3.hs | gpl-3.0 | 431 | 0 | 7 | 115 | 113 | 68 | 45 | 8 | 1 |
-- A Test Program for the Gtk2 Mozilla Widget
--
import Graphics.UI.Gtk
import Graphics.UI.Gtk.MozEmbed
import System (getArgs, getEnv, getProgName)
main :: IO ()
main = do
initGUI
w <- windowNew
onDestroy w mainQuit
mozEmbedSetCompPath mozEmbedDefaultCompPath
moz <- mozEmbedNew
widgetShow moz
contai... | thiagoarrais/gtk2hs | demo/mozembed/TestEmbedMoz.hs | lgpl-2.1 | 1,218 | 0 | 21 | 407 | 385 | 182 | 203 | 38 | 4 |
import Data.List (isPrefixOf)
-- treat an entire file as a string (external to this function)
-- split it up with lines
-- step operates on a single line
-- collect the word following the prefix
dlts :: String -> String -> [String]
dlts prefix = foldr step [] . lines
where step l ds | prefix `isPrefixOf` l = seco... | haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2009-Real_World_Haskell/ch04_dlts.hs | unlicense | 642 | 0 | 10 | 171 | 112 | 59 | 53 | 7 | 1 |
{-
Модуль, отвечающий за формирование архива (списка всех статей).
https://github.com/denisshevchenko/ruhaskell
Все права принадлежат русскоязычному сообществу Haskell-разработчиков, 2015 г.
-}
{-# LANGUAGE OverloadedStrings #-}
module Archive (
createPageWithAllPosts
) where
import Data.Monoid ... | akamch/ruhaskell-old | src/Archive.hs | unlicense | 1,355 | 0 | 20 | 416 | 188 | 95 | 93 | 22 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Lens hiding ((.=))
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as B
import Network.Wreq
import qualified Network.Wreq.Session as S
remoteURL :: String -> String
remoteURL s = "http://localhost:3000" ++ s
jsonReq :: Options
jsonReq = defaults & he... | jml/llclient | Main.hs | apache-2.0 | 769 | 0 | 14 | 177 | 242 | 133 | 109 | 17 | 1 |
module XorTriangle.A334556 (a334556, a334556_list) where
import XorTriangle.XorTriangleHelper (xorTriangle, integerFromBools)
inA334556 :: Integer -> Bool
inA334556 = isRotationallySymmetric . xorTriangle where
isRotationallySymmetric triangle = topRow == left && left == right where
topRow = last triangle
le... | peterokagey/haskellOEIS | src/XorTriangle/A334556.hs | apache-2.0 | 485 | 0 | 10 | 80 | 141 | 77 | 64 | 11 | 1 |
{-# OPTIONS_GHC -F -pgmF htfpp #-}
module PlateTest where
import Test.Framework
import qualified Basic as B
test_ranges = do
assertEqual [(0,10)] (B.ranges [0..10])
assertEqual [(2,4),(7,8),(10,10)] (B.ranges [2,3,4,7,8,10]) | ftomassetti/hplatetectonics | test/PlateTest.hs | apache-2.0 | 235 | 0 | 10 | 37 | 112 | 68 | 44 | 7 | 1 |
-- | Convenient TCP transport acquire and release with common configuration
-- options.
module Pos.Infra.Diffusion.Transport.TCP
( bracketTransportTCP
) where
import Universum hiding (bracket)
import Control.Exception (bracket, throwIO)
import Data.Time.Units (Microsecond)
impor... | input-output-hk/cardano-sl | infra/src/Pos/Infra/Diffusion/Transport/TCP.hs | apache-2.0 | 2,441 | 0 | 18 | 624 | 382 | 217 | 165 | 39 | 1 |
member :: Int -> [Int] -> Bool
member x [] = False
member x xs = x `elem` xs | tonilopezmr/Learning-Haskell | Exercises/2/Exercise_4.hs | apache-2.0 | 76 | 0 | 7 | 18 | 45 | 24 | 21 | 3 | 1 |
{--
Copyright (c) 2014-2020, Clockwork Dev Studio
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions a... | clockworkdevstudio/Idlewild-Lang | Semantics.hs | bsd-2-clause | 144,493 | 0 | 27 | 38,511 | 30,812 | 15,377 | 15,435 | 2,356 | 55 |
{-# LANGUAGE DeriveDataTypeable #-}
module Handler.Thumbnails where
import Data.Conduit
import Network.HTTP.Conduit
import System.Process.QQ
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as LB
import qualified Data.Text as T
import Network.HTTP.Types (statusCode)
import qualified Data.Con... | jannschu/bitlove-ui | Handler/Thumbnails.hs | bsd-2-clause | 4,305 | 0 | 23 | 1,502 | 1,125 | 570 | 555 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude, ExistentialQuantification #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Exception
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base... | spacekitteh/smcghc | libraries/base/Control/Exception.hs | bsd-3-clause | 13,975 | 0 | 10 | 2,911 | 557 | 364 | 193 | 65 | 2 |
module EFA.Graph.Topology (
Topology,
FlowTopology,
LabeledTopology,
flowFromPlain,
plainFromFlow,
plainFromLabeled,
outPosFromDirEdge, inPosFromDirEdge,
dirEdgeFromOutPos, dirEdgeFromInPos,
isActive,
anyActive,
StoreDir(..),
InOut,
) where
import qualified EFA.Flow.Topology.Inde... | energyflowanalysis/efa-2.1 | src/EFA/Graph/Topology.hs | bsd-3-clause | 2,145 | 0 | 14 | 395 | 668 | 361 | 307 | 50 | 2 |
-- #hide
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Texturing.PixelInternalFormat
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven.panne@aedi... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenGL/Graphics/Rendering/OpenGL/GL/Texturing/PixelInternalFormat.hs | bsd-3-clause | 4,970 | 0 | 9 | 1,172 | 1,264 | 649 | 615 | 161 | 48 |
module Data.Text.Table where
import Data.List (transpose)
data Justification = LeftJustify | CenterJustify | RightJustify
padString :: String -> Int -> Justification -> String
padString s fieldWidth j = lft ++ s ++ rght
where
diff = fieldWidth - length s
(lft, rght) = case j of
LeftJustify -... | tdox/table | src/Data/Text/Table.hs | bsd-3-clause | 1,645 | 0 | 13 | 426 | 576 | 305 | 271 | 36 | 4 |
import Distribution.Simple
import Distribution.Verbosity
import Distribution.Simple.Program.Run
main :: IO ()
main = print "wello" >> defaultMainWithHooks (simpleUserHooks {
preConf = \a b -> runSeq >> preConf simpleUserHooks a b
... | edgarklerks/elf-bindings | Setup.hs | bsd-3-clause | 616 | 0 | 12 | 256 | 121 | 61 | 60 | 10 | 1 |
{-# LANGUAGE CPP #-}
-- #define DEBUG
module AERN2.Poly.Power.RootsIntVector
(
initialBernsteinCoefs
, bernsteinCoefs
, signVars
, reflect
, contract
, translate
, transform
, findRoots
, findRootsWithEvaluation
, Terms
)
where
#ifdef DEBUG
import Debug.Trace (trace)
#define maybeTrace trace
#def... | michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/Poly/Power/RootsIntVector.hs | bsd-3-clause | 12,207 | 0 | 26 | 4,056 | 3,104 | 1,671 | 1,433 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude, MagicHash, StandaloneDeriving, BangPatterns #-}
{-# LANGUAGE ConstraintKinds, DataKinds, TypeFamilies, UndecidableInstances, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, PolyKinds, TypeOperators, NoImplicitPrelude, UnliftedFFITypes #-}
{-# OPTI... | pparkkin/eta | libraries/ghc-prim/GHC/Classes.hs | bsd-3-clause | 13,982 | 41 | 11 | 4,395 | 5,707 | 3,124 | 2,583 | -1 | -1 |
module XR.Bracket
( brackets
) where
import Data.List ( (\\) )
import qualified Data.Map as Map
import qualified Data.Text.Extra as T
import Data.Vector ( Vector )
import Polysemy
import Relude ... | expipiplus1/vulkan | generate-new/xr/XR/Bracket.hs | bsd-3-clause | 4,126 | 0 | 21 | 1,512 | 883 | 466 | 417 | -1 | -1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE OverloadedStrings #-}
{-|
'Snap.Extension.ConnectionPool.ConnectionPool' is an implementation of the
'MonadConnectionPool' interface defined in 'Snap.Extension.ConnectionPool'.
As always, to use, add 'ConnectionPoolState' to your application's state,
along with... | duairc/snap-extensions | src/Snap/Extension/ConnectionPool/ConnectionPool.hs | bsd-3-clause | 4,697 | 3 | 15 | 751 | 611 | 322 | 289 | 44 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.AMD.GPUShaderInt64
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabili... | haskell-opengl/OpenGLRaw | src/Graphics/GL/AMD/GPUShaderInt64.hs | bsd-3-clause | 2,324 | 0 | 5 | 308 | 291 | 190 | 101 | 69 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.