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 ImplicitParams, TypeSynonymInstances, FlexibleInstances, ConstrainedClassMethods #-}
-- Similar to tc024, but cross module
module TcRun025_B where
import Data.List( sort )
-- This class has no tyvars in its class op context
-- One uses a newtype, the other a data type
cl... | ezyang/ghc | testsuite/tests/typecheck/should_run/TcRun025_B.hs | bsd-3-clause | 998 | 0 | 9 | 406 | 232 | 131 | 101 | 23 | 0 |
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fwarn-duplicate-exports #-}
module T2436( C(..), T(..), module T2436a, S(..) ) where
import T2436a
class C a where
data T a
instance C Int where
data T Int = TInt Int
data instance S Int = SInt
| snoyberg/ghc | testsuite/tests/rename/should_compile/T2436.hs | bsd-3-clause | 250 | 0 | 7 | 51 | 82 | 49 | 33 | 9 | 0 |
module T10233 where
import T10233a( Constraint, Int )
| urbanslug/ghc | testsuite/tests/module/T10233.hs | bsd-3-clause | 54 | 0 | 5 | 8 | 15 | 10 | 5 | 2 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -ddump-splices #-}
module T3600 where
import T3600a
$(test)
| siddhanathan/ghc | testsuite/tests/th/T3600.hs | bsd-3-clause | 109 | 0 | 6 | 14 | 16 | 10 | 6 | 5 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | Futhark prettyprinter. This module defines 'Pretty' instances
-- for the AST defined in "Language.Futhark.Syntax".
module Language.Futhark.Pretty
( pretty,
pretty... | HIPERFIT/futhark | src/Language/Futhark/Pretty.hs | isc | 20,531 | 0 | 19 | 5,439 | 9,125 | 4,415 | 4,710 | 474 | 27 |
module RK4 where
data State = S { x :: Float, v :: Float } deriving (Show, Eq)
data Deriv = D { dx :: Float, dv :: Float } deriving (Show, Eq)
type Accel = State -> Float
type Integrator = Accel -> Float -> State -> State
euler :: Integrator
euler af dt s0 = s' where
s' = S x' v'
x' = x s0 + dt * v s0
v'... | RichardBarrell/snippets | RK4.hs | isc | 1,221 | 0 | 13 | 392 | 688 | 350 | 338 | 32 | 1 |
module Language.Tiger.AST
( module AST) where
import Language.Tiger.AST.Declaration as AST
| zeling/tiger | src/Language/Tiger/AST.hs | mit | 99 | 0 | 4 | 18 | 22 | 16 | 6 | 3 | 0 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SubtleCrypto
(js_encrypt, encrypt, js_decrypt, decrypt, js_sign, sign,
js_verify, verify, js_digest, digest, js_generateKey, generateKey,
js_importKey, importKey, js_exportKey, exportKey, js... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SubtleCrypto.hs | mit | 9,991 | 132 | 15 | 2,662 | 2,236 | 1,190 | 1,046 | 209 | 1 |
import Control.Monad
filter' _ [] = [-1]
filter' _ (_:xs) = xs
main = do
n <- readLn :: IO Int
replicateM_ n $ do
line <- getLine
arrLine <- getLine
let k = read (words line !! 1) :: Int
let arr = map (\x -> read x :: Int) (words arrLine)
putStrLn $ unwords (map show (filter' k arr))
| ahavrylyuk/hackerrank | haskell/filter-elements.hs | mit | 312 | 0 | 16 | 88 | 167 | 81 | 86 | 11 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, TemplateHaskell #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
module IRC.Types where
import Control.Lens
import CAH.Cards.Types
import Data.Set (Set)
import Data.Map (Map)
import Data.Bimap (Bimap)
im... | EXio4/ircah | src/IRC/Types.hs | mit | 6,577 | 0 | 15 | 2,044 | 1,702 | 953 | 749 | -1 | -1 |
{-# LANGUAGE TemplateHaskell
, TypeFamilies, OverloadedStrings #-}
module Main where
import System.Environment
import Generics.BiGUL.TH
import GHC.Generics
import Data.Aeson
import Data.Text
import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Lazy as B
import SourceModel
import qualified ... | prl-tokyo/MAPE-knowledge-base | Haskell/Main.hs | mit | 6,424 | 0 | 20 | 1,488 | 1,951 | 960 | 991 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Main where
import Data.Int (Int32)
import Database.HDBC.PostgreSQL (Connection)
import Database.HDBC.Session (handleSqlError', withConnectionIO)
import HRR.Commands ... | charlydagos/haskell-sql-edsl-demo | code/hrr/src/Main.hs | mit | 3,975 | 0 | 12 | 1,310 | 951 | 520 | 431 | 61 | 6 |
import Data.Array.IArray
import Data.Char
import Data.Maybe
import Data.List
--------------------------------------------------------------------------------
data Cell = Value Int
| Values (Array Int Bool) Int
deriving Show
isCellSet :: Cell -> Bool
isCellSet (Value _) = True
isCellSet (Values _ _) = ... | dpieroux/euler | 0/0096_array.hs | mit | 5,755 | 0 | 24 | 1,692 | 2,005 | 1,043 | 962 | -1 | -1 |
module SyntaxParser where
import LexicalParser
import Text.Parsec
import Text.Parsec.String
import Data.List
data CompilationUnit = PackageDecl TypeName | ImportDecls [ImportDecl] | TypeDecls [TypeDecl]
deriving (Eq,Ord,Show)
data ImportDecl = ImportDecl TypeName
deriving (Eq,Ord,... | dimsuz/java-ast | src/SyntaxParser.hs | mit | 4,581 | 0 | 16 | 1,157 | 1,321 | 673 | 648 | 108 | 3 |
module FieldMarshal.Marshal where
import qualified FieldMarshal.CSharp as CSharp
import qualified FieldMarshal.Cpp as Cpp
data MarshalType =
MarshalDefault Cpp.Type CSharp.Type
| MarshalAs Cpp.Type CSharp.Type UnmanagedType
| MarshalWrap Cpp.Type CSharp.Type [CppTypeWrapper]
| MarshalPlatform Cpp.Type CSharp... | scott-fleischman/field-marshal | FieldMarshal.Marshal.hs | mit | 793 | 0 | 8 | 118 | 208 | 121 | 87 | 21 | 0 |
module Handler.Frontend where
import Import
-- will redirect to login page if not authenticated
getFrontendR :: [Text] -> Handler Html
getFrontendR _ = do
_ <- requireAuth
defaultLayout $ do
setTitle "happy scheduler"
$(widgetFile "frontend")
| frt/happyscheduler | Handler/Frontend.hs | mit | 269 | 0 | 12 | 61 | 63 | 31 | 32 | 8 | 1 |
module Data.NGH.Formats.FastQ
( fastQConduit
, fastQparse
, fastQread
, fastQwrite
) where
import Data.Word
import qualified Data.ByteString as B
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteS... | luispedro/NGH | Data/NGH/Formats/FastQ.hs | mit | 1,996 | 0 | 18 | 494 | 598 | 333 | 265 | 40 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module PresentDrop
( initialModel
, update
, view
) where
import Control.Distributed.Process
import Control.Lens (... | topliceanu/learn | elm/Cloud-Haskell-Game/server/src/PresentDrop.hs | mit | 5,315 | 0 | 17 | 1,215 | 1,828 | 996 | 832 | 161 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Preprocessor (PreprocessorState, preprocessProg, resolveExpr) where
import Expr
import Program
import Control.Monad.State
import Text.Printf (printf)
import qualified Data.Map.Strict as Map
type Offset = Int
type ConstExprMap = Map.Map String Expr
data Preprocess... | nyaxt/dmix | nkmd/as/Preprocessor.hs | mit | 2,042 | 0 | 11 | 374 | 607 | 316 | 291 | 51 | 2 |
module PlasmaCutter where
import BasicTypes
import LineSintaticScanner
import BoolExprSintaticScanner
extractCode :: [String] -> Environment -> [String]
extractCode [] _ = []
extractCode (x:xs) env = extr ++ (extractCode xs newEnv)
where
extr = [snd $ extractLine (parseLine x) env]
newEnv = fst $ extractLine (pa... | hephaestus-pl/hephaestus | willian/hephaestus-parser-only/PlasmaCutter.hs | mit | 1,212 | 0 | 12 | 230 | 517 | 275 | 242 | 26 | 2 |
module Chapter5
where
import Chapter4 (rjustify)
-- 5.1.3
binom :: Int -> Int -> Int
binom n k
| n < 0 =
0
| k == 0 =
1
| otherwise =
binom (n - 1) k + binom (n - 1) (k - 1)
binomSum :: Int -> Int
binomSum n =
sum [binom n k | k <- [0..n]]
pascal :: Int -> [[Int]]
pascal x =
[map (uncurry b... | futtetennista/IntroductionToFunctionalProgramming | itfp/src/Chapter5.hs | mit | 3,207 | 0 | 13 | 969 | 1,616 | 855 | 761 | 127 | 2 |
module Language.Tiny.Analysis.Grammar where
data Program
= Program [Declaration]
deriving (Eq, Show)
data Declaration
= FunctionDeclaration Annotation String [Parameter] Block
| VariableDeclaration Variable
deriving (Eq, Show)
data Variable
= Variable Annotation String
deriving (Eq, Show)
data Paramet... | dmeysman/tiny-compiler | src/Language/Tiny/Analysis/Grammar.hs | mit | 1,505 | 0 | 7 | 284 | 400 | 228 | 172 | 56 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-tagrequest.html
module Stratosphere.ResourceProperties.EC2EC2FleetTagRequest where
import Strat... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EC2EC2FleetTagRequest.hs | mit | 1,756 | 0 | 12 | 205 | 264 | 151 | 113 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-
Custom prettyprinter for JMacro AST
- uses the jmacro prettyprinter for most of the work
- fixme: need a better way to make a customized prettyprinter, without duplicating 5 cases
-}
module Gen2.Printer where
import Data.Char (isAlpha, isDigit)
i... | ghcjs/ghcjs | src/Gen2/Printer.hs | mit | 6,578 | 0 | 16 | 2,109 | 2,245 | 1,138 | 1,107 | 110 | 1 |
import Data.List
import Data.Function
import Control.Applicative
import Control.Monad
import Control.Arrow
getGrid :: String -> IO [[Float]]
getGrid filename = map (map read . filter ((>0) . length) . filter (',' `notElem`) . groupBy ((==) `on` (== ','))) . lines <$> readFile filename
getMod3 :: Int -> [a] -> [a]
get... | betaveros/probabilistic-poliwraths | mod3.hs | mit | 1,156 | 2 | 15 | 233 | 647 | 351 | 296 | 23 | 1 |
module WordNumber where
import Data.List (intersperse, intercalate)
digitToWord :: Int -> String
digitToWord n
| n == 1 = "one"
| n == 2 = "two"
| n == 3 = "three"
| n == 4 = "four"
| n == 5 = "five"
| n == 6 = "six"
| n == 7 = "seven"
| n == 8 = "eight"
| n == 9 = "nine"
digits :: Int -> [Int]
{- ... | Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/08/08.06.05-numbers-into-words.hs | mit | 781 | 0 | 13 | 239 | 294 | 146 | 148 | 20 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module ExportSpec where
import Data.Char
import Data.Int
import Data.Map
import Data.Monoid
import Data.Proxy
import Data.Text hiding (unlines)
import... | InfernalKnight/elm-export | test/ExportSpec.hs | epl-1.0 | 13,066 | 0 | 19 | 4,554 | 2,363 | 1,266 | 1,097 | 338 | 2 |
module Primes where
import Factor
primes :: [Integer]
primes = sieve [2..]
where sieve (p:xs) = p : sieve [ x | x <- xs, x `rem` p /= 0]
isPrime :: Integer -> Bool
isPrime n = all (\p -> n `rem` p /= 0) [2.. sq n]
where sq = ceiling . sqrt . fromInteger
-- [primes.tex]
primeFactorisation :: Integer ->... | NorfairKing/project-euler | lib/haskell/Primes.hs | gpl-2.0 | 551 | 0 | 12 | 168 | 265 | 143 | 122 | 14 | 2 |
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
module Graph.Nachbar where
-- $Id$
import Graph.Util
import Graph.Iso
import Autolib.Graph.Basic
import Autolib.Graph.Ops
import Autolib.Graph.Kneser ( petersen )
import Inter.Types
import Autolib.Reporter
import Autolib.Util.Teilfolgen
... | Erdwolf/autotool-bonn | src/Graph/Nachbar.hs | gpl-2.0 | 3,611 | 83 | 15 | 999 | 1,105 | 577 | 528 | 87 | 2 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Code.Burrows_Wheeler.Data where
import Autolib.Reader
import Autolib.ToDoc
import Autolib.Size
import Data.Typeable
data Burrows_Wheeler = Burrows_Wheeler deriving ( Eq, Ord, Typeable )
$(derives [makeReader, makeToDoc] [''Burrows_Wheeler])
-- Local va... | Erdwolf/autotool-bonn | src/Code/Burrows_Wheeler/Data.hs | gpl-2.0 | 354 | 0 | 9 | 46 | 76 | 45 | 31 | 8 | 0 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Hoodle.Coroutine.Select.ManipulateImage
-- Copyright : (c) 2013 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
--... | wavewave/hoodle-core | src/Hoodle/Coroutine/Select/ManipulateImage.hs | gpl-3.0 | 7,842 | 0 | 27 | 2,220 | 2,398 | 1,235 | 1,163 | 158 | 6 |
sayMe :: (Integral a) => a -> String
sayMe 1 = "One!"
sayMe 2 = "Two!"
sayMe 3 = "Three!"
sayMe 4 = "Four!"
sayMe 5 = "Five!"
sayMe x = "Not between 1 and 5"
factorial :: (Integral a) => a -> a
factorial 0 = 1
factorial n = n * factorial (n - 1)
head' :: [a] -> a
head' [] = error "Cannot call head on an empty list, s... | yumerov/haskell-study | learnyouahaskell/02-function-syntax/pattern.hs | gpl-3.0 | 2,095 | 0 | 12 | 597 | 781 | 408 | 373 | 54 | 3 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
module Main where
import Data.Aeson
import Data.ByteString.Lazy
import GHC.Generics
main = Data.ByteString.Lazy.putStr $ encode $ hanoi 3
data Rod = A | B | C deriving Show
type Move = String
type Level = Int
data History = Branch Level History Move History | Lea... | rfrankel/Sorting-Visualization | hanoijson.hs | gpl-3.0 | 836 | 0 | 15 | 254 | 326 | 175 | 151 | 22 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Codec.Picture
import Codec.Picture.RGBA8 (fromDynamicImage)
import System.Environment (getArgs)
insertSpaces :: Image PixelRGBA8 -> Int -> Image PixelRGBA8
insertSpaces image spaceHeight = generateImage (imageSpacer image spaceHeight) width height
where
width = imageWid... | mfilmer/figuredoublespace | main.hs | gpl-3.0 | 1,214 | 0 | 17 | 258 | 387 | 193 | 194 | 29 | 2 |
{-
Ðóêîâîäñòâî ôèíàíñîâîé ïèðàìèäû ðåøèëî ïðèñâîèòü ÷èñëîâîé ðåéòèíã êàæäîìó èç ó÷àñòíèêîâ ïèðàìèäû. Åñëè ó÷àñòíèê äî ñèõ ïîð íèêîãî íå ïðèâåë â ïèðàìèäó, òî åãî ðåéòèíã ðàâíÿåòñÿ 1. Åñëè ó ó÷àñòíèêà óæå åñòü ïîä÷èíåííûå ó÷àñòíèêè, òî åãî ðåéòèíã ðàâíÿåòñÿ 1 + ñóììà ðåéòèíãîâ åãî ïðÿìûõ ïîä÷èíåííûõ.
Çàäà÷à: íàéòè ñ... | graninas/Haskell-Algorithms | Tests/FinanceTree.hs | gpl-3.0 | 1,595 | 10 | 10 | 319 | 145 | 78 | 67 | 11 | 1 |
(mu . bimap mu id)((x, y), z) | hmemcpy/milewski-ctfp-pdf | src/content/3.6/code/haskell/snippet09.hs | gpl-3.0 | 29 | 0 | 8 | 6 | 31 | 16 | 15 | -1 | -1 |
{-# language LambdaCase, ScopedTypeVariables #-}
{-# language OverloadedStrings #-}
module HFish.Main where
import Control.Lens
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.State.Class
import Control.Monad.State
import Control.Monad.Reader.Class
import qualified Data.Sequence as Seq
import ... | xaverdh/hfish | HFish/Main.hs | gpl-3.0 | 4,157 | 0 | 17 | 933 | 1,380 | 703 | 677 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/CollectionGroups/Indexes/Get.hs | mpl-2.0 | 5,656 | 0 | 15 | 1,197 | 701 | 411 | 290 | 111 | 1 |
{-
This file is part of Tractor.
Tractor is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Tractor is distribu... | ak1211/tractor | src/NetService/HomePage.hs | agpl-3.0 | 2,342 | 0 | 17 | 552 | 285 | 144 | 141 | 24 | 0 |
{-# LANGUAGE BangPatterns, OverloadedStrings #-}
module Data.HBCI.Gen where
import Data.Monoid ((<>))
import qualified Data.Text.Encoding as E
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C8
import Data.HBCI.Types
gen :: MSGValue -> BS.ByteString
gen segs = let... | paulkoerbitz/hsbci | src/Data/HBCI/Gen.hs | agpl-3.0 | 802 | 0 | 11 | 159 | 268 | 145 | 123 | 17 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
module Language.C.Obfuscate.CPS
where
import Data.Char
import Data.List (nubBy)
import Data.Maybe
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Language.C.Syntax.AST as AST
import qualified Languag... | luzhuomi/cpp-obs | Language/C/Obfuscate/CPS.hs | apache-2.0 | 92,814 | 9 | 31 | 28,042 | 23,363 | 12,203 | 11,160 | 937 | 19 |
module Main
( main
) where
import Protolude
import Test.Tasty (defaultMain, testGroup)
import qualified Spake2
import qualified Groups
import qualified Integration
main :: IO ()
main = sequence tests >>= defaultMain . testGroup "Spake2"
where
tests =
[ Spake2.tests
, Groups.tests
, Integ... | jml/haskell-spake2 | tests/Tasty.hs | apache-2.0 | 341 | 0 | 8 | 82 | 88 | 52 | 36 | 13 | 1 |
-- | Domain of terms.
module Akarui.FOL.Domain where
import Data.Set (Set)
import Akarui.Parser
import Text.Parsec
import Text.Parsec.String (Parser)
import qualified Data.Set as Set
-- | Domain of variables and constants.
data Domain =
Any
| Interval Double Double
| Finite (Set String)
-- | Parse a clause (... | PhDP/Manticore | Akarui/FOL/Domain.hs | apache-2.0 | 763 | 0 | 10 | 146 | 192 | 105 | 87 | 20 | 1 |
module Reddit.Routes.Search where
import Reddit.Types.Options
import Reddit.Types.Post
import Reddit.Types.Subreddit
import qualified Reddit.Types.SearchOptions as Search
import Data.Maybe
import Data.Text (Text)
import Network.API.Builder.Routes
searchRoute :: Maybe SubredditName -> Options PostID -> Search.Order -... | intolerable/reddit | src/Reddit/Routes/Search.hs | bsd-2-clause | 723 | 0 | 11 | 178 | 227 | 125 | 102 | 21 | 2 |
{-# LANGUAGE FlexibleContexts #-}
module Application.DiagramDrawer.Coroutine where
import Control.Monad.Coroutine
import Control.Monad.State
import Control.Monad.Coroutine.SuspensionFunctors
import Data.IORef
import Application.DiagramDrawer.Type
bouncecallback :: IORef (Await DiagramEvent (Iteratee DiagramEvent Di... | wavewave/diagdrawer | lib/Application/DiagramDrawer/Coroutine.hs | bsd-2-clause | 852 | 0 | 18 | 236 | 251 | 121 | 130 | 23 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QFileInfo.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:31
Warning : this file is machine generated - do not... | keera-studios/hsQt | Qtc/Core/QFileInfo.hs | bsd-2-clause | 15,873 | 0 | 13 | 2,716 | 5,155 | 2,612 | 2,543 | -1 | -1 |
module Main (main) where
import Paths_eclogues_impl (getDataFileName)
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
paths :: [String]
paths =
[ "app"
, "test"
]
arguments :: IO [String]
arguments = go <$> getDataFileName "HLint.hints"
where
go p = ("--hint=" ++... | futufeld/eclogues | eclogues-impl/test/HLint.hs | bsd-3-clause | 442 | 0 | 9 | 92 | 144 | 81 | 63 | 15 | 2 |
module Database.Riak (
M.RiakException(..),
M.VClock(..),
M.BucketName(..),
M.Key(..),
M.ClientId(..),
M.Quorum(..),
B.Riak,
B.Basic(..),
B.Pong(..),
B.ping,
B.getClientId,
B.setClientId,
B.getServerInfo,
B.get,
B.put,
B.delete,
B.listBuckets,
B.listKeys,
B.getBucket,
B.setBucket,
B.mapReduce,
B.i... | iand675/hiker | Database/Riak.hs | bsd-3-clause | 9,059 | 298 | 9 | 1,267 | 3,118 | 1,725 | 1,393 | 290 | 1 |
{-# LANGUAGE TypeFamilies #-}
-- | Number representations that are not part of the grammar.
--
-- To convert these types to 'Penny.Decimal.Decimal' and the like,
-- functions are available in "Penny.Copper.Decopperize".
module Penny.Rep where
import qualified Control.Lens as Lens
import qualified Control.Lens.Extras a... | massysett/penny | penny/lib/Penny/Rep.hs | bsd-3-clause | 10,925 | 0 | 14 | 1,787 | 3,043 | 1,504 | 1,539 | 277 | 4 |
test_disassembler :: IO ()
test_disassembler =
let table = [
(Mov (Register 12) (Register 14), "\xce\x2c"),
(Cli, "\xf8\x94"),
(Sei, "\x78\x94"),
(Clc, "\x88\x94"),
(Clh, "\xd8\x94"),
(Cln, "\xa8\x94"),
(Cls, "\xc8\x94"),
(Clv, "\xb8\x94"),
(Clz,... | MichaelBurge/stockfighter-jailbreak | test/Spec.hs | bsd-3-clause | 3,047 | 1 | 8 | 1,063 | 1,157 | 686 | 471 | -1 | -1 |
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DisambiguateRecordFields, NamedFieldPuns #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ViewPatterns #-... | pepeiborra/bytestring-xml | src/Text/Xml/Tiny/Internal.hs | bsd-3-clause | 6,677 | 0 | 16 | 1,510 | 2,091 | 1,096 | 995 | -1 | -1 |
module FP.Pretty.HTML where
import FP.Prelude
import FP.Pretty.Color
import FP.Pretty.Pretty
htmlFGCode :: Color -> 𝕊 -> 𝕊
htmlFGCode c s = "<span style='color:" ⧺ (htmlColorFrom256 #! c) ⧺ "'>" ⧺ s ⧺ "</span>"
htmlBGCode :: Color -> 𝕊 -> 𝕊
htmlBGCode c s = "<span style='background-color:" ⧺ (htmlColorFrom256 #!... | davdar/darailude | src/FP/Pretty/HTML.hs | bsd-3-clause | 7,055 | 84 | 10 | 1,576 | 2,850 | 1,829 | 1,021 | -1 | -1 |
module GL.Types
(
V2FL,
V3FL,
Coor2(..),
Coor3(..),
fromDegrees
) where
import Graphics.Rendering.OpenGL as GL
type V2FL = Vertex2 GLfloat
type V3FL = Vertex3 GLfloat
data Coor2 = D2 {x,y::GLfloat} deriving Show
data Coor3 = D3 {xx,yy,zz::GLfloat} deriving (Show)
fromDegr... | xruzzz/ax-fp-gl-haskell | src/GL/Types.hs | bsd-3-clause | 346 | 0 | 8 | 95 | 119 | 75 | 44 | 13 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module ZM.Types
( module Data.Model.Types
,... | tittoassini/typed | src/ZM/Types.hs | bsd-3-clause | 9,975 | 0 | 13 | 2,235 | 2,180 | 1,193 | 987 | 168 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Undecida... | ku-fpg/sunroof-active | Language/Sunroof/Active.hs | bsd-3-clause | 4,089 | 13 | 15 | 801 | 1,047 | 579 | 468 | -1 | -1 |
module More.MonadTs where
import Control.Monad.Trans.Class
import Control.Monad.Trans.Reader
import Control.Monad.Trans.State
import Control.Monad.Trans.Maybe
import Control.Monad.Identity
import Control.Monad.IO.Class
import Control.Monad
rDec :: Num a => Reader a a
rDec = ReaderT $ return . ((+) (-1))
rShow :: Sho... | stites/composition | src/MoreReaderT.hs | bsd-3-clause | 1,133 | 0 | 12 | 314 | 400 | 208 | 192 | 34 | 2 |
-- 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. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE GADT... | rfranek/duckling | Duckling/Time/PT/Rules.hs | bsd-3-clause | 40,248 | 0 | 21 | 10,644 | 11,503 | 6,237 | 5,266 | 1,289 | 2 |
-----------------------------------------------------------------------------
--
-- GHCi Interactive debugging commands
--
-- Pepe Iborra (supported by Google SoC) 2006
--
-- ToDo: lots of violation of layering here. This module should
-- decide whether it is above the GHC API (import GHC and nothing
-- else) or belo... | ekmett/ghc | compiler/ghci/Debugger.hs | bsd-3-clause | 9,338 | 7 | 21 | 2,986 | 2,288 | 1,168 | 1,120 | 171 | 8 |
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances, UndecidableInstances, Rank2Types #-}
module Control.Monad.Launcher
( Launcher
, setVersion, checkVersion
, withThreadIdDo, putThreadId, clunkTag
, withFileDo, withoutFileDo, putFile, clunkFile
) where
... | Elemir/network-ninep | src/Control/Monad/Launcher.hs | bsd-3-clause | 2,446 | 0 | 14 | 564 | 881 | 461 | 420 | 75 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
module Blip.Interpreter.HashTable.IntArray
( IntArray
, Elem
, elemMask
, primWordToElem
, elemToInt
, elemToInt#
, newArray
, readArray
, writeArray
, length
, toPtr
) where
-----------------------------... | bjpop/blip | blipinterpreter/src/Blip/Interpreter/HashTable/IntArray.hs | bsd-3-clause | 3,680 | 0 | 10 | 901 | 516 | 285 | 231 | 54 | 1 |
{-|
Module : Idris.IBC
Description : Core representations and code to generate IBC files.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.IBC (loadIBC, loadPkgIndex,
... | markuspf/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | 102,813 | 0 | 21 | 56,870 | 28,131 | 12,917 | 15,214 | 2,464 | 17 |
{-# LANGUAGE DeriveDataTypeable #-}
module Latex
( texString
, writeTexStdOut
, writeTexToFile
, writeTemplateToFile
) where
import Data.List
import System.IO
import System.Directory
import System.FilePath.Posix
import Args
import Lib
texString :: Arguments -> String
texString (Install {}) = error "Cannot f... | bkushigian/makeltx | src/Latex.hs | bsd-3-clause | 2,932 | 0 | 14 | 859 | 672 | 342 | 330 | 65 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,
TypeFamilies, Rank2Types, FunctionalDependencies #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Matrix.Banded.Base
-- Copyright : Copyright (c) , Pa... | patperry/hs-linear-algebra | lib/Data/Matrix/Banded/Base.hs | bsd-3-clause | 37,697 | 0 | 14 | 8,806 | 9,481 | 4,964 | 4,517 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Test.Connection
-- Copyright : (C) 2017 Yorick Laupa
-- License : (see the file LICENSE)
--
-- Maintainer : Yorick Laupa <yo.eight@gmail.com>
-- Stability : provisional
-- Portability : non-portable
--
--------------------... | YoEight/eventstore | tests/Test/Connection.hs | bsd-3-clause | 1,708 | 0 | 17 | 298 | 321 | 158 | 163 | 29 | 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. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
------------------... | rfranek/duckling | Duckling/Ranking/Classifiers/RO.hs | bsd-3-clause | 14,669 | 0 | 15 | 6,829 | 2,787 | 1,730 | 1,057 | 251 | 1 |
module Main where
import File
import Git
main :: IO ()
main = do
pullFilesToDisk
addCommitPush "Feeling hard working today!"
| gaoyuan/CodeThief | src/Main.hs | bsd-3-clause | 131 | 0 | 7 | 26 | 34 | 18 | 16 | 7 | 1 |
{-# LANGUAGE TemplateHaskell, RankNTypes, ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns, DeriveGeneric #-}
-- | This analysis identifies the addRef and decRef functions for a library,
-- along with the set of types that is reference counted. This analysis is
-- unsound and incomplete, but still useful.
--
-- It fi... | travitch/foreign-inference | src/Foreign/Inference/Analysis/RefCount.hs | bsd-3-clause | 24,835 | 7 | 31 | 6,267 | 5,057 | 2,701 | 2,356 | 384 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Juno.Monitoring.EkgSnap
( startServer
) where
import Control.Exception (throwIO)
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as S8
import Data.Function (on)
import qualified Data.HashMap.Strict as... | buckie/juno | src/Juno/Monitoring/EkgSnap.hs | bsd-3-clause | 5,304 | 0 | 18 | 1,421 | 1,296 | 678 | 618 | 107 | 4 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
module Pusher where
import Network.Google.Logging.Types
import Data.Scientific (fromFloatDigits)
import Data.Bifunctor (second)
import Data.Bits (shiftR, xor, (.&.))
import Data.Word (Word32)
import GHC.Int (Int32, Int64)
i... | dp-cylme/labourer | src/Pusher.hs | bsd-3-clause | 8,865 | 0 | 42 | 3,144 | 1,952 | 1,071 | 881 | 178 | 9 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Network.MPD.Applicative.ClientToClient
Copyright : (c) Joachim Fasting 2013
License : MIT
Maintainer : joachim.fasting@gmail.com
Stability : stable
Portability : unportable
Client to client communication.
-}
module Network.MPD.Applicative.ClientToClient... | beni55/libmpd-haskell | src/Network/MPD/Applicative/ClientToClient.hs | mit | 2,070 | 0 | 10 | 373 | 410 | 235 | 175 | 34 | 2 |
import qualified Data.Map as Map
import qualified Protein as P
-- | The prefix spectrum of a weighted string is the collection of all its
-- prefix weights. Given a list L of n (n≤100) positive real numbers,
-- return a protein string of length n−1 whose prefix spectrum is equal to L.
--
-- Notes:
-- If multiple solu... | mitochon/hoosalind | src/problems/spec.hs | mit | 1,153 | 0 | 16 | 257 | 312 | 168 | 144 | 16 | 2 |
{-# LANGUAGE CPP, ScopedTypeVariables, OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Leksah
-- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GNU-GPL
--
-- Maintainer : <maintainer at leksah.org>
-- Stabil... | juhp/leksah | src/IDE/Leksah.hs | gpl-2.0 | 24,775 | 0 | 23 | 8,750 | 5,601 | 2,850 | 2,751 | 476 | 12 |
-- Copyright (C) 2016-2019 Sergey Vinokurov <serg.foo@gmail.com>
-- Copyright (C) 2014-2016 Sebastian Wiesner <swiesner@lunaryorn.com>
-- Copyright (C) 2016-2018 Danny Navarro <j@dannynavarro.net>
-- Copyright (C) 2015 Mark Karpov <markkarpov@opmbx.org>
-- Copyright (C) 2015 Michael Alan Dorman <mdorman@ironicdesign.co... | emacsmirror/flycheck-haskell | get-cabal-configuration.hs | gpl-3.0 | 32,647 | 0 | 19 | 7,155 | 6,102 | 3,358 | 2,744 | 445 | 5 |
module Base.Renderable.CenterHorizontally where
import Graphics.Qt
import Base.Types
import Base.Renderable.Common ()
centerHorizontally :: Renderable r => r -> RenderableInstance
centerHorizontally = RenderableInstance . CenterHorizontally . RenderableInstance
data CenterHorizontally = CenterHorizontally Render... | geocurnoff/nikki | src/Base/Renderable/CenterHorizontally.hs | lgpl-3.0 | 818 | 0 | 14 | 182 | 209 | 107 | 102 | 17 | 1 |
yes = [(foo bar)] | bitemyapp/apply-refact | tests/examples/Bracket10.hs | bsd-3-clause | 17 | 0 | 7 | 3 | 15 | 8 | 7 | 1 | 1 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE ExistentialQuantification, NoImplicitPrelude #-}
module GHC.Event.Internal
(
-- * Event back end
Backend
, backend
, delete
, poll
, modifyFd
, modifyFdOnce
-- * Event type
, Event
, evtRead
, evtWrite
, evtClose
, eventIs
... | sdiehl/ghc | libraries/base/GHC/Event/Internal.hs | bsd-3-clause | 6,918 | 0 | 16 | 1,992 | 1,455 | 816 | 639 | 147 | 3 |
module Docs.AST where
import qualified Data.Map as Map
import qualified Elm.Compiler.Type as Type
import qualified Reporting.Annotation as A
-- FULL DOCUMENTATION
data Docs t = Docs
{ comment :: String
, aliases :: Map.Map String (A.Located Alias)
, types :: Map.Map String (A.Located Union)
, value... | pairyo/elm-compiler | src/Docs/AST.hs | bsd-3-clause | 848 | 0 | 13 | 207 | 268 | 160 | 108 | 23 | 0 |
module Fail2 where
f = let g xs = map (+1) xs in g list
where
list = [1,1,2,3,4]
| kmate/HaRe | old/testing/letToWhere/Fail2_TokOut.hs | bsd-3-clause | 101 | 0 | 10 | 39 | 57 | 32 | 25 | 3 | 1 |
{-# htermination addListToFM_C :: (b -> b -> b) -> FiniteMap Char b -> [(Char,b)] -> FiniteMap Char b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addListToFM_C_3.hs | mit | 123 | 0 | 3 | 22 | 5 | 3 | 2 | 1 | 0 |
module Text.ParserCombinators.TagWiki where
import Control.Applicative hiding ( many, (<|>) )
import Data.List
import Text.ParserCombinators.Parsec
class Parseable a where
parser :: GenParser Char st a
-- Parses and reads one or more digits
number :: GenParser Char st Int
number = read <$> many1 digit
real :: (R... | Soares/tagwiki | src/Text/ParserCombinators/TagWiki.hs | mit | 2,500 | 0 | 13 | 551 | 697 | 360 | 337 | 46 | 1 |
module Y2018.M08.D15.Exercise where
{--
Today we have a list of the top 5000 English language words (by frequency) from
https://www.wordfrequency.info. We are going to parse this file and answer
a question.
--}
import Prelude hiding (Word)
import Data.Array
import Data.Map
-- below modules available via 1HaskellADay... | geophf/1HaskellADay | exercises/HAD/Y2018/M08/D15/Exercise.hs | mit | 1,475 | 0 | 8 | 280 | 212 | 130 | 82 | 21 | 1 |
{-# LANGUAGE Rank2Types #-}
module Battle (
ix,
ixM,
ixIM,
BattleState(..),
Board (Board),
Tactic,
TacticList,
addTactic,
runBoard,
player,
enemy,
turn,
tacticList,
battleState,
module Character
) where
import Control.Arrow
import Control.Monad.State
import Data.List
import qualified Da... | myuon/OoP | src/Battle.hs | mit | 3,968 | 0 | 21 | 827 | 1,630 | 856 | 774 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module BigTable.TypeOfHtml where
import Criterion.Main (Benchmark, bench, nf)
import Data.Text.Lazy (Text)
import Html
import Weigh (Weigh, func)
-- | Render the argument matrix as an HTML table.
--
bigTable :: [[Int]] -- ^ Matrix.
... | TransportEngineering/nice-html | benchmarks/BigTable/TypeOfHtml.hs | mit | 1,874 | 0 | 26 | 555 | 529 | 289 | 240 | 41 | 1 |
-- a program for testing the alignment algorithm
{-# LANGUAGE OverloadedStrings #-}
import System.Environment
import Data.Text as ST
import Data.Text.IO as STIO
import Data.Text.Lazy as LT
import FastA
import Alignment
import NucModel
import PWMModel
import Align
smallprob = 0.0001
scale = 1000
main = do
[mod, s... | tjunier/mlgsc | src/alntoy.hs | mit | 583 | 0 | 12 | 113 | 171 | 90 | 81 | 20 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Nix (
module Nix.Expr,
module Nix.Parser,
module Nix.LicenseType
) where
import Nix.Common
import Nix.Expr
import Nix.Parser
import Nix.LicenseType
| adnelson/simple-nix | src/Nix.hs | mit | 205 | 0 | 5 | 38 | 45 | 29 | 16 | 9 | 0 |
{-# LANGUAGE Arrows, TupleSections #-}
module Server.Simulation(
mainWire
) where
import Control.DeepSeq
import Core
import Data.Text (Text)
import FRP.Netwire
import Prelude hiding (id, (.))
import Server.Game.Player
import Server.Game.World
mainWire :: GameMonad (GameWire () ())
mainWire = do
logInfo ... | NCrashed/sinister | src/server/Server/Simulation.hs | mit | 1,030 | 1 | 17 | 229 | 311 | 163 | 148 | 24 | 1 |
module BankAccount
( BankAccount
, closeAccount
, getBalance
, incrementBalance
, openAccount
) where
import Control.Concurrent.STM (TVar, atomically, modifyTVar, newTVarIO, readTVarIO, writeTVar)
data BankAccount = BankAccount { balance :: TVar (Maybe Integer) }
openAccount :: IO BankAccount
openAccount = do
st... | tfausak/exercism-solutions | haskell/bank-account/BankAccount.hs | mit | 781 | 0 | 11 | 125 | 239 | 127 | 112 | 20 | 1 |
{-# OPTIONS -Wall #-}
import Helpers.Grid (Grid, (!))
import qualified Helpers.Grid as Grid
main :: IO ()
main = do
heightMap <- Grid.fromDigits <$> getContents
let lowestPoints = findLowestPoints heightMap
print $ sum $ map succ lowestPoints
findLowestPoints :: Grid Int -> [Int]
findLowestPoints heightMap =
... | SamirTalwar/advent-of-code | 2021/AOC_09_1.hs | mit | 495 | 0 | 12 | 99 | 162 | 84 | 78 | 14 | 1 |
-- | Specification for the exercises of Chapter 2.
module Chapter02Spec where
import Chapter02 (myInit, myInit', myLast, myLast')
import Test.Hspec (Spec, describe, it)
import Test.QuickCheck (Property, property, (==>))
checkLastDef :: ([Int] -> Int) -> Property
checkLastDef ... | EindhovenHaskellMeetup/meetup | courses/programming-in-haskell/pih-exercises/test/Chapter02Spec.hs | mit | 886 | 0 | 11 | 205 | 279 | 141 | 138 | 20 | 1 |
--The following iterative sequence is defined for the set of positive integers:
--n → n/2 (n is even)
--n → 3n + 1 (n is odd)
--Using the rule above and starting with 13, we generate the following sequence:
--13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
--It can be seen that this sequence (starting at 13 and finishing... | jongensvantechniek/Project-Euler | problem014-haskell/problem14.hs | mit | 1,427 | 0 | 9 | 282 | 187 | 106 | 81 | 12 | 2 |
module Main where
import Render.Setup
import Graphics.UI.GLUT
import Data.Time
main :: IO ()
main = do
(progName, _args) <- getArgsAndInitialize
start <- getCurrentTime
initialDisplayMode $= [ SingleBuffered, RGBMode ]
initialWindowSize $= Size 512 512
initialWindowPosition $= Position 100 100
_ <- ... | dongy7/raytracer | src/Main.hs | mit | 576 | 0 | 9 | 115 | 167 | 79 | 88 | 20 | 1 |
module Twilio.IVRSpec where
import Test.Hspec
import Twilio.IVR
import Control.Lens
import Control.Lens.Setter
import Control.Monad.Coroutine
import Control.Monad.Coroutine.SuspensionFunctors
import Text.XML.Light
-- never use for production purposes, NOT TRUE XML EQUIVALENCE
instance Eq Content where
x == y ... | steven777400/TwilioIVR | test/Twilio/IVRSpec.hs | mit | 2,244 | 0 | 21 | 844 | 677 | 332 | 345 | 47 | 1 |
module Neural_Net where
import System.Random
import qualified System.Posix.Types as P
import qualified GHC.IO.Handle.Types as T
import Data.Dynamic
import qualified Data.Array.Repa as R
import qualified Data.Array.Repa.Eval as R
import qualified Data... | hamsal/DM-AtariAI | src/Neural_Net.hs | mit | 11,066 | 0 | 19 | 4,186 | 3,134 | 1,708 | 1,426 | 189 | 2 |
{-
Reasonably fast enumerations for combinations, `recombinations', and
permutations.
2009 Nathan Blythe, Dr. Oscar Boykin (see LICENSE for details)
A combination is a length m subset of {0 .. n - 1}.
A `recombination' is a length m submultiset of {0 .. n - 1}.
A permutation is a length m ordered subset o... | nblythe/MUB-Search | Combinadics.hs | mit | 9,472 | 0 | 16 | 4,528 | 2,651 | 1,418 | 1,233 | 134 | 5 |
module Main where
import qualified LexArithm_C
import qualified LexArithm_JVM
import qualified ParArithm_C
import qualified ParArithm_JVM
import qualified PrintArithm_C
import qualified PrintArithm_JVM
import AbsArithm
import ErrM
import System ( getArgs )
main :: IO ()
main = do
i:o:f:_ <- getArgs
s <- readFil... | MetaBorgCube/metaborg-lbnf | metaborg-lbnf/examples/multi/TestArithm.hs | gpl-2.0 | 610 | 0 | 11 | 118 | 196 | 103 | 93 | 23 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
----------------------------------------------... | jaccokrijnen/leksah | src/IDE/Pane/PackageEditor.hs | gpl-2.0 | 79,913 | 0 | 36 | 27,695 | 20,349 | 10,601 | 9,748 | 1,373 | 8 |
{- This module was generated from data in the Kate syntax
highlighting file erlang.xml, version 1.03, by Bill Ross (bill@emailme.net.au) -}
module Text.Highlighting.Kate.Syntax.Erlang
(highlight, parseExpression, syntaxName, syntaxExtensions)
where
import Text.Highlighting.Kate.Types
import Text.Highlight... | ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Erlang.hs | gpl-2.0 | 9,859 | 0 | 28 | 1,107 | 1,756 | 941 | 815 | 123 | 8 |
{-# LANGUAGE TypeSynonymInstances #-}
module Language.PiCalc.Semantics.Process (
PiProcess
, PiAction(..)
, nextFree
, term
, origin
-- , pdefs
-- * Conversion
, mkProcess
, fromProg
, fromProgWith
-- , toProg
, toTerm
, toStdNF
, successors
, optSuccessors
... | bordaigorl/jamesbound | src/Language/PiCalc/Semantics/Process.hs | gpl-2.0 | 8,345 | 0 | 18 | 2,060 | 2,914 | 1,602 | 1,312 | 152 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.ExMap
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- I'm a module waiting for some kind soul to give me a commentary!
mod... | atsukotakahashi/wi | src/library/Yi/Keymap/Vim/ExMap.hs | gpl-2.0 | 6,565 | 0 | 18 | 1,942 | 1,794 | 907 | 887 | 157 | 18 |
-- Copyright (c) 2011 - All rights reserved - Keera Studios
module Physics.Collisions where
import Control.Applicative
import Control.Arrow
import Data.Maybe
import FRP.Yampa.VectorSpace
import Physics.TwoDimensions.Dimensions
import Physics.Shapes
import Data ( pointX, rotateRespect, unrotateRespect
, mi... | keera-studios/pang-a-lambda | src/Physics/Collisions.hs | gpl-3.0 | 4,931 | 0 | 12 | 1,284 | 1,803 | 1,009 | 794 | 94 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.