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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
import Test.HUnit
import BinomialHeap
main =
let
q01 :: BinomialHeap Int
q01 = empty
q02 = insert q01 3
q03 = insert q02 0
q04 = insert q03 6
q05 = insert q04 2
q06 = insert q05 4
q07 = insert q06 7
q08 = insert q07 0
q09 = insert q08 0
Just (v1, q10) = deleteMin q09
... | cshung/MiscLab | Haskell99/BinomialHeap.test.hs | mit | 1,139 | 0 | 12 | 303 | 480 | 252 | 228 | 31 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE EmptyDataDecls #-}
m... | suzuki-shin/blogtools | Web/Readability/Api.hs | mit | 2,813 | 0 | 35 | 860 | 554 | 294 | 260 | 66 | 2 |
{-# htermination approxRational :: (Ratio Int) -> (Ratio Int) -> Rational #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_approxRational_3.hs | mit | 78 | 0 | 2 | 12 | 3 | 2 | 1 | 1 | 0 |
module CoreLang.TInst
(
eval
, compile
, showResults
)
where
import CoreLang.Utils
import CoreLang.Language
import CoreLang.ISeq
import Data.Maybe (fromMaybe)
type TiState = (TiStack, TiDump, TiHeap, TiGlobals, TiStats)
type TiStack = [Addr]
data TiDump = DummyTiDump
initialTiDump :: TiDump
initialTiDump = DummyT... | hengchu/CoreLang | CoreLang/TInst.hs | mit | 7,004 | 0 | 12 | 1,658 | 2,434 | 1,293 | 1,141 | 172 | 4 |
{-# LANGUAGE RecordWildCards #-}
module MachineLearning.Hopfield
(HopfieldNet(..),
initialize,
initializeWith,
activity,
train,
associate,
(//),
energy) where
import Control.Monad
import Control.Monad.Random hiding (fromList)
import Data.Packed.Matri... | ajtulloch/hopfield-networks | MachineLearning/Hopfield.hs | mit | 2,422 | 0 | 11 | 620 | 829 | 436 | 393 | -1 | -1 |
{-|
Module : Lipschitz
Description : Omejitev funkcij z premicami (koeficientom pravimo Lipschitzove konstante)
Copyright : (c) Andrej Borštnik, Barbara Bajcer, 2015
Maintainer : barbara.bajcer@gmail.com, andrej-borstnik@hotmail.com
Stability : experimental
Računanje vrednosti funkcije in konstant, ki lok... | andrejborstnik/Samodejno-odvajanje | Lipschitz/Lipschitz/lipschitz.hs | mit | 13,124 | 63 | 22 | 3,998 | 6,158 | 3,196 | 2,962 | 264 | 3 |
-- | <http://strava.github.io/api/v3/uploads/>
module Strive.Actions.Uploads
( uploadActivity
, getUpload
) where
import Data.ByteString (ByteString)
import Network.HTTP.Client (RequestBody (RequestBodyBS), requestBody)
import Network.HTTP.Types (Query, methodPost, toQuery)
import Strive.Aliases (Extension, Resu... | liskin/strive | library/Strive/Actions/Uploads.hs | mit | 1,326 | 0 | 12 | 189 | 327 | 181 | 146 | 26 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module Game.Play.Api where
import Servant ((:<|>), (:>), JSON, Post, ReqBody)
import Game.Api.Types (ErrorOr)
import Game.Play.Api.Types (PlaceBetRq, PlayCardRq)
import Game.Types (Game)
t... | rubenmoor/skull | skull-server/src/Game/Play/Api.hs | mit | 546 | 0 | 9 | 148 | 159 | 95 | 64 | 12 | 0 |
{-# LANGUAGE DeriveDataTypeable, PatternGuards, MultiParamTypeClasses, ScopedTypeVariables, TemplateHaskell, ImpredicativeTypes, FlexibleContexts #-}
module Main where
import Data.List
import BlazeHtml hiding (time, name)
import Data.Generics
import Data.Char
import Data.Maybe
import Data.Map (Map)
import qualified Da... | Oblosys/webviews | src/exec/Reservations/Main.hs | mit | 34,173 | 1 | 27 | 10,157 | 6,808 | 3,508 | 3,300 | 401 | 6 |
--file KMC-haskell/graphFuncs.hs
--module for performing operations on graphs
module KMC.Graph
(
Infinitable(..)
, breadthSearch
, permute
, goodMappings
, confirmMappings
)
where
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import qualified D... | NaevaTheCat/KMC-haskell | src/KMC/Graph.hs | mit | 11,760 | 3 | 16 | 3,131 | 3,721 | 1,936 | 1,785 | 206 | 3 |
module Haskrypto.Modular(
Modular(..),
inverse,
power,
extendedEuclidean,
randomNumber,
genRandomFermatPrime,
fermatPrimalityTest,
findFermatPrime,
nextCoprime,
gcd',
squareRoot,
modular,
nextSafePrime,
legendreSymbol,
isSafeFermatPrime
)where
import System.... | TachoMex/Haskrypto | src/Haskrypto/Modular.hs | mit | 4,163 | 0 | 13 | 1,298 | 1,664 | 865 | 799 | 111 | 2 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
module Update where
import Control.Exception
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Catch
im... | philopon/find-hackage | src/Update.hs | mit | 4,447 | 0 | 22 | 1,055 | 1,404 | 753 | 651 | 94 | 4 |
module H99.Q11to20
( tests11to20
) where
import Test.Tasty
import Test.Tasty.HUnit as HU
import H99.Q1to10 (encode)
{-| Problem 11.
Modify the result of problem 10 in such a way that if an element has no duplicates it is
simply copied into the result list. Only elements... | izmailoff/haskell-h99 | src/H99/Q11to20.hs | mit | 1,184 | 0 | 11 | 432 | 266 | 145 | 121 | 17 | 2 |
module Sync.MerkleTree.Util.Communication
( send,
receive,
)
where
import qualified Data.ByteString as BS
import Data.Bytes.Put (runPutS)
import Data.Bytes.Serial (Serial, deserialize, serialize)
import qualified Data.Serialize as CES
import System.IO.Streams (InputStream, OutputStream, read, unRead, write)
im... | ekarayel/sync-mht | src/Sync/MerkleTree/Util/Communication.hs | mit | 1,040 | 0 | 16 | 246 | 378 | 198 | 180 | 25 | 4 |
import Control.Arrow
churchNumber :: (Arrow a) => Int -> a b b -> a b b
churchNumber n f = if n == 0 then returnA else f >>> churchNumber (n - 1) f
a = churchNumber 3 (+1) 0
| luochen1990/my-utils.hs | churchNumber.hs | mit | 177 | 0 | 9 | 43 | 92 | 48 | 44 | 4 | 2 |
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE TypeFamilies #-}
module Problem07 (partA, partB) where
import Text.Megaparsec
import Text.Megaparsec.String
import Data.Monoid
import Data.Maybe
partA = partAString <$> readFile inputLocation
partB = partBString <$> readFile inputLocation
inputLocation = "input/in... | edwardwas/adventOfCodeTwo | src/Problem07.hs | mit | 1,772 | 0 | 20 | 524 | 803 | 412 | 391 | 47 | 3 |
-- Solve the map-coloring problem [Section 4.2, Map coloring, on page 87] using
-- Haskell.
module Main (mapColoring) where
colors = ["red", "green", "blue"]
mapColoring =
[
(["MS", ms], ["TN", tn], ["AL", al], ["GA", ga], ["FL", fl]) |
ms <- colors,
tn <- colors,
al <- colors,
ga... | ryanplusplus/seven-languages-in-seven-weeks | haskell/day1/map_coloring.hs | mit | 469 | 0 | 7 | 166 | 174 | 100 | 74 | 17 | 1 |
{-# LANGUAGE ScopedTypeVariables, ViewPatterns, MultiParamTypeClasses, FlexibleInstances, FunctionalDependencies #-}
{-|
Module : Labyrinth.Maze
Description : maze typeclass
Copyright : (c) deweyvm 2014
License : MIT
Maintainer : deweyvm
Stability : experimental
Portability : unknown
A maze and associate... | deweyvm/labyrinth | src/Labyrinth/Maze.hs | mit | 1,886 | 0 | 11 | 502 | 407 | 221 | 186 | 32 | 1 |
{- |
Module : $Header$
Description : Signature for propositional logic
Copyright : (c) Dominik Luecke, Uni Bremen 2007
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : experimental
Portability : portable
Definition of signatures for proposition... | nevrenato/HetsAlloy | Propositional/Sign.hs | gpl-2.0 | 2,666 | 0 | 10 | 705 | 510 | 280 | 230 | 41 | 2 |
{-|
This is the new parser module built using the @parsec@ parser
cominator library.
I think the option parsers should probably be moved to L.P.FileParser
-}
module Language.Pepa.Parser
( parseRateArrayOption
, parseRateOption
, parseActionArrayOption
, parseCommaSeparatedLowers
, parseRateExprOption
... | allanderek/ipclib | Language/Pepa/Parser.hs | gpl-2.0 | 33,085 | 0 | 16 | 8,843 | 4,564 | 2,362 | 2,202 | 505 | 2 |
-- 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/Run/RunWorld/OutputState/Plain.hs | gpl-3.0 | 1,272 | 0 | 9 | 315 | 115 | 77 | 38 | 23 | 1 |
module Pudding.Utilities.VectorFunctions
( pairApply
) where
import qualified Data.Vector.Unboxed as U
pairApply :: (U.Unbox a, U.Unbox b)
=> (b -> b -> b)
-> b
-> (a -> a -> b)
-> (U.Vector a)
-> b
pairApply combine neutral f v = U.ifoldl'
(\acc i p -> U.foldl' (\a... | jfulseca/Pudding | src/Pudding/Utilities/VectorFunctions.hs | gpl-3.0 | 419 | 0 | 12 | 153 | 174 | 94 | 80 | 15 | 1 |
{-|
Module : Hypercube.Config
Description : Configuration data of hypercube
Copyright : (c) Jaro Reinders, 2017
License : GPL-3
Maintainer : noughtmare@openmailbox.org
This file contains all configuration variables like @chunkSize@ and @renderDistance@.
TODO: Eventually we want this file to be dynamically... | noughtmare/hypercube | src/Hypercube/Config.hs | gpl-3.0 | 1,237 | 0 | 15 | 240 | 222 | 119 | 103 | 15 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Model.DriveCommand
( DriveCommand (..)
) where
import Data.Aeson
import GHC.Generics
import Test.QuickCheck
data DriveCommand = Drive... | massimo-zaniboni/netrobots | robot_examples/haskell-servant/rest_api/lib/Model/DriveCommand.hs | gpl-3.0 | 565 | 0 | 8 | 96 | 106 | 62 | 44 | 18 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.FactCheckTo... | brendanhay/gogol | gogol-factchecktools/gen/Network/Google/FactCheckTools/Types/Product.hs | mpl-2.0 | 37,107 | 0 | 18 | 7,544 | 5,048 | 2,914 | 2,134 | 644 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Projects/Locations/InspectTemplates/Get.hs | mpl-2.0 | 5,502 | 0 | 15 | 1,145 | 701 | 412 | 289 | 108 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/ChromeosDevices/List.hs | mpl-2.0 | 5,772 | 0 | 21 | 1,436 | 818 | 473 | 345 | 120 | 1 |
module Handler.BrowsePageSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getBrowsePageR" $ do
error "Spec not implemented: getBrowsePageR"
| learnyou/lypaste | test/Handler/BrowsePageSpec.hs | agpl-3.0 | 186 | 0 | 11 | 39 | 44 | 23 | 21 | 6 | 1 |
{- arch-tag: AnyDBM tests main file
Copyright (C) 2004-2005 John Goerzen <jgoerzen@complete.org>
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 of the License, or
(at your option) a... | jgoerzen/anydbm | testsrc/AnyDBMtest.hs | lgpl-2.1 | 4,744 | 0 | 16 | 1,757 | 1,264 | 656 | 608 | 85 | 1 |
module Claim where
import Text.Parsec hiding (upper,lower)
import Text.Parsec.String
parse s = Text.Parsec.parse claim "<>" s
-- | specification: http://cbr.uibk.ac.at/competition/rules.php
data Claim = MAYBE
| WORST_CASE (Quest Lower) (Quest Upper)
| YES
| NO
data Quest a = None | Some a
data Lower = Omega... | jwaldmann/ceta-postproc | src/Claim.hs | lgpl-3.0 | 1,777 | 0 | 16 | 417 | 727 | 368 | 359 | 48 | 1 |
import Data.List (genericIndex)
trees :: [Integer]
trees = 1 : 1 : 2 : map f [3..]
where f n = sum $ map (\x -> (trees !! (pred x)) * (trees !! (n - x))) [1..n]
answer = flip mod 100000007 . (!!) trees
main = do
t <- readLn
c <- getContents
putStr . unlines . map show . map answer . map read . take t $... | itsbruce/hackerrank | func/memo/numberOfBSTs.hs | unlicense | 329 | 0 | 15 | 89 | 187 | 95 | 92 | 9 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module OmekaIpsum.Options
( options
, execParser
) where
import qualified Data.ByteString.UTF8 as B8
import qualified Data.Text as T
import Data.Version
import Options.Applicative
import OmekaIpsum.Types
import Paths_... | erochest/omeka-ipsum | src/OmekaIpsum/Options.hs | apache-2.0 | 2,212 | 0 | 14 | 773 | 439 | 225 | 214 | 48 | 1 |
{-# LANGUAGE ExistentialQuantification, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} -- for debugging
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-orphans #-... | rrnewton/concurrent-skiplist | src/Data/Concurrent/SkipListMap.hs | apache-2.0 | 16,650 | 4 | 24 | 5,018 | 4,115 | 2,091 | 2,024 | 245 | 7 |
{-# LANGUAGE DeriveDataTypeable #-}
module MapGen.IO
(
ImageFormat(..)
, toFile
, renderKdTree
)
where
import MapGen.Floor
import MapGen.KdTree as KdTree
import MapGen.Space
import Data.Data
import Control.Monad.ST
import Graphics.Rendering.Cairo
import Prelude as P
data ImageFormat = SVG | PNG deriving (Dat... | jeannekamikaze/mapgen | MapGen/IO.hs | bsd-2-clause | 1,922 | 0 | 14 | 616 | 676 | 342 | 334 | 52 | 3 |
module Data.PGN (
PGN(..),
Result(..),
pgnParser,
showPgn,
-- resultOrMoveParser should only be exposed in an internals-only module?
resultOrMoveParser
) where
import Control.Applicative hiding (many, optional, (<|>))
import Control.Arrow
import Control.Monad
import Data.Char
import Data.List
import Data.L... | dancor/pgn | src/Data/PGN.hs | bsd-2-clause | 3,603 | 0 | 19 | 730 | 1,279 | 676 | 603 | 91 | 4 |
module SemanticData (MyType, defaultValue, makeUMns, makeMlt, makeDiv, makeAdd, makeSub, makeId) where
type MyType = Integer
defaultValue = 0
makeAdd x y = x + y
makeSub x y = x - y
makeMlt x y = x * y
makeDiv x y = div x y
makeId x = x
makeUMns x = -x
| marionette-of-u/kp19pp | sample/haskell/SemanticData.hs | bsd-2-clause | 266 | 0 | 5 | 67 | 116 | 64 | 52 | 9 | 1 |
module HEP.Automation.MadGraph.Model.Common where
mtop :: Double
-- mtop = 174.3
mtop = 172.0 -- value from FeynRules default param_card.dat : alphaS = 0.1184
gstrong :: Double
gstrong = 1.22 -- value from FeynRules default param_card.dat : alphaS = 0.1184 | wavewave/madgraph-auto-model | src/HEP/Automation/MadGraph/Model/Common.hs | bsd-2-clause | 272 | 0 | 4 | 54 | 32 | 22 | 10 | 5 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Mismi.EC2.Commands (
findSecurityGroupByName
) where
import Control.Lens (view, (.~))
import Mismi.Amazonka
import Mismi.EC2.Data
import Mismi.EC2.Amazonka
import P
findSecurityGrou... | ambiata/mismi | mismi-ec2/src/Mismi/EC2/Commands.hs | bsd-3-clause | 621 | 0 | 14 | 132 | 152 | 83 | 69 | 13 | 1 |
import WiringHs
import Control.Concurrent.Thread.Delay
import Control.Monad
pinI, pinO :: Pin
pinI = Pin 4
pinO = Pin 3
main :: IO ()
main = do
set <- wiringPiSetup Pins
when (not set) $ error "Couldn't set the GPIO."
pinMode pinI Input
pinMode pinO Output
setInterrupt pinI Rising (putStrLn "I felt somethi... | lostbean/radio-fm69 | test/TestPi.hs | bsd-3-clause | 642 | 0 | 15 | 157 | 257 | 119 | 138 | 24 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
-- |
-- Module: $HEADER$
-- Description: Read and parse configuration files.
-- Copyright: (c) 2015 Peter Trško
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portability: NoImplicitPrelude
--
-- Read and parse configuration... | trskop/toolbox-tray-icon | src/Main/ConfigFile.hs | bsd-3-clause | 3,737 | 0 | 14 | 752 | 757 | 426 | 331 | 65 | 2 |
module Language.Mojito.Inference.Substitution where
import Data.List (intersect, nub, union, (\\))
import Language.Mojito.Syntax.Types
import Language.Mojito.Inference.Context
----------------------------------------------------------------------
-- Substitution
------------------------------------------------------... | noteed/mojito | Language/Mojito/Inference/Substitution.hs | bsd-3-clause | 5,819 | 0 | 17 | 1,384 | 1,885 | 1,005 | 880 | 97 | 5 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Exception (SomeException, try)
import qualified Data.Text as T
import Snap.Http.Server
import Snap.Snaplet
import Snap.Core
import System.IO
import Site
import Snap.Loader.Prod
{-|
This is the entry point for this web server appli... | tomgr/webcspm | src/Main.hs | bsd-3-clause | 3,925 | 0 | 11 | 786 | 288 | 169 | 119 | 25 | 1 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
import Language.Haskell.Liquid.Prelude
-- gpp :: Monad m => m Int -> m Int
gpp z = do x <- z
return $ liquidAssert (x >= 0) (x + 1)
gpp' z n = do x <- z n
return $ liquidAssert (x >= 0) (x + 1)
myabs :: Int -> Int
myabs x | x >= 0 =... | spinda/liquidhaskell | tests/gsoc15/unknown/pos/monad5.hs | bsd-3-clause | 588 | 2 | 10 | 195 | 273 | 132 | 141 | 18 | 1 |
module Main where
import qualified Test.HUnit as HUnit
import HTMLSpec
import NWASpec
import NWAHTMLSpec
main :: IO ()
main = do {
putStrLn "\nTesting HTML Parsing";
htmlcounts <- HUnit.runTestTT htmltests;
putStrLn $ show htmlcounts;
putStrLn "\nTesting Nested Word Automaton";
nwacounts <- HUn... | katydid/nwe | test/Spec.hs | bsd-3-clause | 535 | 0 | 9 | 113 | 139 | 70 | 69 | 17 | 1 |
{-# LANGUAGE FlexibleContexts, FlexibleInstances #-}
module Data.Functor.Listable
( Listable(..)
, cons0
, cons1
, cons2
, cons3
, cons4
, cons5
, cons6
, (\/)
, (><)
, Listable1(..)
, tiers1
, Listable2(..)
, tiers2
, liftCons1
, liftCons2
, liftCons3
, ListableF(..)
, embedTiers
, nameTiers
, uncurryr3
, uncurryr4
) ... | robrix/surface | test/Data/Functor/Listable.hs | bsd-3-clause | 2,858 | 0 | 22 | 597 | 1,244 | 686 | 558 | 81 | 1 |
module NaturalHorn
(
module X
) where
import NHorn.NaturalHorn as X
import NHorn.NaturalHornExts as X
import NHorn.NaturalHornPretty as X
import NHorn.Sequent as X(Sequent, createSeq, ErrSec, Theory(..))
import NHorn.LaCarte as X
| esengie/algebraic-checker | src/NaturalHorn.hs | bsd-3-clause | 244 | 0 | 6 | 44 | 63 | 44 | 19 | 8 | 0 |
module Four where
import Data.Hash.MD5
import Data.List (find)
import Data.Maybe (fromJust)
import Data.String.Utils
-- "abcdef609043" Hashes to "000001dbbfa"
-- value ++ (show 5)
hashString :: String -> Int -> String
hashString value seed = md5s $ Str (value +... | purcell/adventofcodeteam | app/Four.hs | bsd-3-clause | 631 | 0 | 9 | 160 | 181 | 96 | 85 | 14 | 1 |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts, AllowAmbiguousTypes #-}
{-# LANGUAGE TypeOperators, TypeApplications, GADTs, DataKinds, ScopedTypeVariables, GeneralizedNew... | spacekitteh/libgrin | src/GRIN/Parser/ParseEffect.hs | bsd-3-clause | 7,217 | 0 | 15 | 1,522 | 1,570 | 809 | 761 | 59 | 1 |
module DnoList.Sysop where
import Data.Char
import Data.Maybe
import Data.Proxy
import Data.Monoid
import Control.Monad
import Data.Text (Text)
import Network.Wai.Handler.Warp (run)
import Servant.API
import Servant.Server
import Servant.Client
import Control.Monad.Trans.Either
import Control.Monad.Trans.Class
import ... | abbradar/dnolist | src/DnoList/Sysop.hs | bsd-3-clause | 5,013 | 0 | 46 | 1,495 | 1,722 | 869 | 853 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Distribution.Solver.Modular.Linking (
addLinking
, validateLinking
) where
import Prelude hiding (pi)
import Control.Exception (assert)
import Control.Monad.Reader
import Control.Monad.State
import Da... | thomie/cabal | cabal-install/Distribution/Solver/Modular/Linking.hs | bsd-3-clause | 23,716 | 0 | 21 | 6,079 | 5,993 | 3,087 | 2,906 | 333 | 11 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.TiledWindowDragging
-- Description : Change the position of windows by dragging them.
-- Copyright : (c) 2020 Leon Kowarschick
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Leon Kowa... | xmonad/xmonad-contrib | XMonad/Actions/TiledWindowDragging.hs | bsd-3-clause | 3,457 | 0 | 25 | 911 | 743 | 398 | 345 | 41 | 1 |
module Test.Feat.Class
( Enumerable(..)
, nullary
, unary
, funcurry
, shared
, consts
) where
import Control.Enumerable
-- compatability
{-# DEPRECATED nullary "use c0 instead" #-}
-- nullary :: x -> Memoizable f x
nullary x = c0 x
{-# DEPRECATED unary "use c1 instead" #-}
-- unary ... | patrikja/testing-feat | Test/Feat/Class.hs | bsd-3-clause | 683 | 0 | 6 | 168 | 118 | 69 | 49 | 18 | 1 |
-- -*- mode: haskell -*-
{-# LANGUAGE TemplateHaskell #-}
module PCProblem.Konfig where
import PCProblem.Type
import Autolib.ToDoc
import Autolib.Reader
data Konfig =
Konfig { instanz :: PCP
, folge :: Folge -- ^ achtung, falschrum! (damit wir vorn dranbauen)
, tief :: Int -- ^ im Suchbaum (= Länge ... | florianpilz/autotool | src/PCProblem/Konfig.hs | gpl-2.0 | 935 | 4 | 9 | 224 | 249 | 138 | 111 | 21 | 1 |
{-# LANGUAGE UndecidableInstances, TypeFamilies, BangPatterns, Rank2Types
, ExistentialQuantification, PatternGuards, ScopedTypeVariables
, MultiParamTypeClasses, GADTs
#-}
{-# OPTIONS_GHC -Wall #-}
----------------------------------------------------------------------
-- |
-- Module : Sh... | sseefried/shady-gen | src/Shady/Language/Reify.hs | agpl-3.0 | 2,730 | 0 | 21 | 887 | 674 | 331 | 343 | 51 | 2 |
<?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="ru-RU">
<title>SVN Digger Files</title>
<maps>
<homeID>svndigger</homeID>
<mapref locat... | secdec/zap-extensions | addOns/svndigger/src/main/javahelp/help_ru_RU/helpset_ru_RU.hs | apache-2.0 | 967 | 77 | 66 | 157 | 409 | 207 | 202 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE CPP #-}
module Test.Foundation.Number
( testNumber
, testNumberRefs
) where
import Foundation
import Foundati... | vincenthz/hs-foundation | foundation/tests/Test/Foundation/Number.hs | bsd-3-clause | 4,792 | 0 | 16 | 1,465 | 2,016 | 1,077 | 939 | 81 | 3 |
{-# LANGUAGE TemplateHaskellQuotes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Main (main) where
import Language.Haskell.TH
u1 :: a
u1 = undefined
u2 :: a
u2 = undefined
f :: a
f = undefined
(.+.) :: a
(.+.) = undefined
main :: IO ()
main = do runQ [| f u1 u2 |] >>= p
runQ [| u1 `f` u2 |] >>= p
... | mpickering/ghc-exactprint | tests/examples/ghc8/TH_ppr1.hs | bsd-3-clause | 867 | 0 | 8 | 336 | 276 | 155 | 121 | -1 | -1 |
#!/usr/bin/env runhaskell
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2014 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
import Cryptol.Parser
import Cryptol.Parser.AST(noPos)
import System.Process(readProcess)
main ::... | TomMD/cryptol | utils/CryAST.hs | bsd-3-clause | 534 | 0 | 11 | 125 | 130 | 70 | 60 | 10 | 1 |
module Main where
import Data.Char
import Data.List
import System.IO
data Test = Expr String
| Test [String] String
deriving Show
isExpr (Expr{}) = True
isExpr _ = False
main = do src <- readFile "../System/FilePath/Internal.hs"
let tests = concatMap getTest $ zip [1..] (lines src)
... | thomie/filepath | tests/GenTests.hs | bsd-3-clause | 3,147 | 0 | 14 | 970 | 1,300 | 678 | 622 | 67 | 3 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TransformListComp #-}
module Fun00012 where
data instance A = M { unA :: T -> A }
data instance B where
K :: D -> B
f = [ (x, y) | x <- xs,
y <- ys,
then sortWith ]
g = [ (x, y) | x <- xs,
y <- ys,
... | charleso/intellij-haskforce | tests/gold/parser/Fun00012.hs | apache-2.0 | 592 | 0 | 10 | 246 | 210 | 120 | 90 | 20 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS -fno-warn-unused-do-bind #-}
-- | Package identifier (name-version)... | anton-dessiatov/stack | src/Stack/Types/PackageIdentifier.hs | bsd-3-clause | 10,288 | 0 | 15 | 1,877 | 2,113 | 1,117 | 996 | 221 | 4 |
<?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="sq-AL">
<title>Custom Payloads Add-on</title>
<maps>
<homeID>custompayloads</homeID>
<m... | thc202/zap-extensions | addOns/custompayloads/src/main/javahelp/org/zaproxy/zap/extension/custompayloads/resources/help_sq_AL/helpset_sq_AL.hs | apache-2.0 | 978 | 77 | 67 | 157 | 413 | 209 | 204 | -1 | -1 |
module MultiMatchesIn1 where
--The application of a function is replaced by the right-hand side of the definition,
--with actual parameters replacing formals.
--In this example, unfold the first 'sq' in 'sumSquares'
--This example aims to test unfolding a function application with multiple matches.
sumSquares x y ... | kmate/HaRe | old/testing/foldDef/MultiMatchesIn1_TokOut.hs | bsd-3-clause | 425 | 0 | 10 | 113 | 72 | 39 | 33 | 7 | 2 |
-- | File Manager demo.
-- Author : Andy Stewart
-- Copyright : (c) 2010 Andy Stewart <lazycat.manatee@gmail.com>
-- | This simple file-manager base on gio.
--
module Main where
import Control.Monad
import Data.Maybe
import Graphics.UI.Gtk
import Graphics.UI.Gtk.General.IconTheme
import Graphics.UI.Gtk.Mod... | k0001/gtk2hs | gio/demo/FileManager.hs | gpl-3.0 | 5,935 | 0 | 18 | 1,629 | 1,544 | 764 | 780 | 125 | 2 |
module T14487 where
import T14487A hiding (duplicateName)
test = X duplicateName
duplicateName = 5
| sdiehl/ghc | testsuite/tests/rename/should_compile/T14487.hs | bsd-3-clause | 102 | 0 | 5 | 17 | 26 | 16 | 10 | 4 | 1 |
-- !!! Importing unknown module
module M where
import N
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/module/mod1.hs | bsd-3-clause | 56 | 0 | 3 | 10 | 8 | 6 | 2 | 2 | 0 |
module Futhark.CodeGen.ImpGen.Multicore.SegRed
( compileSegRed,
compileSegRed',
)
where
import Control.Monad
import qualified Futhark.CodeGen.ImpCode.Multicore as Imp
import Futhark.CodeGen.ImpGen
import Futhark.CodeGen.ImpGen.Multicore.Base
import Futhark.IR.MCMem
import Futhark.Util (chunks)
import Prelude h... | HIPERFIT/futhark | src/Futhark/CodeGen/ImpGen/Multicore/SegRed.hs | isc | 10,414 | 0 | 38 | 2,642 | 3,264 | 1,604 | 1,660 | 210 | 2 |
coeffs<-(readFile "b.txt" >>= return.map read.lines :: IO [Double])
pts <- readFile "test">>=return.map (map (read::String->Double)).map words.take 21.drop 1.lines
zipWith (\[x,y] [a,b,c,d] -> (a+b*x+c*x^2+d*x^3-y)/y) (tail pts) cs
| ducis/haskell-numerical-analysis-examples | G/check.hs | mit | 235 | 2 | 18 | 28 | 171 | 87 | 84 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Y2017.M11.D21.Solution where
{--
Okey-dokey. From yesterday's exercise, we're returning full articles with
key-phrases and ranked and everything!
Boss-man: I don't need full article text, just a summary of the first 140
characters. And remove the special characters. And dro... | geophf/1HaskellADay | exercises/HAD/Y2017/M11/D21/Solution.hs | mit | 2,903 | 0 | 12 | 549 | 511 | 293 | 218 | -1 | -1 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.Completion where
import qualified Data.Aeson as A
import Data.Aeson.TH
import Data.Scientific ( Scientific ... | alanz/haskell-lsp | lsp-types/src/Language/LSP/Types/Completion.hs | mit | 17,788 | 0 | 11 | 5,103 | 2,650 | 1,431 | 1,219 | 248 | 0 |
module Types.BCrypt
( BCrypt, hashPassword, validatePassword
) where
-- Prelude.
import ClassyPrelude hiding (hash)
import qualified Crypto.KDF.BCrypt as BC
import Database.Persist.Sql
import Katip (KatipContext, Severity (..), logStr,
... | jkachmar/servant-persistent-realworld | src/Types/BCrypt.hs | mit | 1,515 | 0 | 18 | 380 | 319 | 171 | 148 | -1 | -1 |
-- When greatest is less than smallest
-- http://www.codewars.com/kata/55f2a1c2cb3c95af75000045/
module Kata.WhenGreatestIsLessThanSmallest where
greatest :: Integer -> Integer -> Integer -> Integer
greatest x y n = ((n - 1) `div` (lcm x y)) * lcm x y
smallest :: Integer -> Integer -> Integer -> Integer
smallest x y ... | gafiatulin/codewars | src/6 kyu/WhenGreatestIsLessThanSmallest.hs | mit | 360 | 0 | 11 | 64 | 132 | 72 | 60 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-
replaces description on the NSDate object with swizzleDescription
pdfkiths[master*] % dist/build/testswizzle/testswizzle
2013-09-16 14:22:50 +0000
Succesfully swizzled
No soup for you
[1] 50767 segmentation fault dist/build/testswizzle/testswizzle
-}
module Main where
impor... | aktowns/pdfkiths | examples/testswizzle.hs | mit | 869 | 0 | 11 | 137 | 167 | 83 | 84 | 21 | 1 |
{-# htermination decodeFloat :: Float -> (Integer,Int) #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_decodeFloat_1.hs | mit | 59 | 0 | 2 | 8 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module KirstieUtilSpec where
import Test.Hspec
import Control.Exception
import Control.Monad
import Data.Text (Text)
import Data.List (sort, nub)
import Data.Time.Clock
import Database.MongoDB hiding (sort)
impo... | hekt/blog-system | test/KirstieUtilSpec.hs | mit | 2,654 | 0 | 19 | 954 | 685 | 357 | 328 | 61 | 1 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.CodeAction where
import Data.Aeson.TH
import Data.Aeson.Types
import Data.Default
import Data.Text (... | alanz/haskell-lsp | lsp-types/src/Language/LSP/Types/CodeAction.hs | mit | 9,813 | 0 | 11 | 2,298 | 1,161 | 677 | 484 | 117 | 0 |
{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}
-- module Sgd.Svm.Main where
import qualified Data.ByteString.Lazy.Char8 as C
import System.Console.CmdArgs
import System.Environment (getArgs, withArgs)
import System.Exit
import Control.Monad (when)
import qualified Sgd.Svm.Read as R
import qualified Sgd.Svm.Tra... | daz-li/svm_sgd_haskell | src/Sgd/Svm/Main.hs | mit | 3,191 | 0 | 15 | 743 | 699 | 372 | 327 | 55 | 3 |
-- Idiom brackets
-- ref: https://wiki.haskell.org/Idiom_brackets
-- f <$> x <*> y
-- Since f is not a pure function, it's f :: a -> b -> m c. The correct form would be
-- join $ f <$> x <*> y
-- f a b = [a+b]
-- join $ f <$> [1] <*> [2] = [3]
-- Idiom brakcets
-- Type class hackery to eliminate the 'join':
class A... | Airtnp/Freshman_Simple_Haskell_Lib | Idioms/Idiom-brackets.hs | mit | 1,169 | 0 | 8 | 330 | 323 | 171 | 152 | -1 | -1 |
module Day21Spec (spec) where
import Day21
import Test.Hspec
main :: IO ()
main = hspec spec
sampleInput :: String
sampleInput = unlines
[ "swap position 4 with position 0"
, "swap letter d with letter b"
, "reverse positions 0 through 4"
, "rotate left 1 step"
, "move position 1 to position 4"
... | brianshourd/adventOfCode2016 | test/Day21Spec.hs | mit | 4,972 | 0 | 16 | 1,261 | 907 | 426 | 481 | 77 | 1 |
module Hackup.Config.Fields where
import Data.Text (Text, pack)
newtype ConfigField = ConfigField { fieldName :: String } deriving (Show, Eq, Ord)
fieldText :: ConfigField -> Text
fieldText = pack . fieldName
rootDirField :: ConfigField
rootDirField = ConfigField "rootDir"
defaultKeepField :: ConfigField... | chwthewke/hackup | src/Hackup/Config/Fields.hs | mit | 1,168 | 0 | 6 | 140 | 222 | 124 | 98 | 29 | 1 |
module Feature.RangeSpec where
import qualified Data.ByteString.Lazy as BL
import Network.Wai (Application)
import Network.Wai.Test (SResponse (simpleHeaders, simpleStatus))
import Network.HTTP.Types
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Protolude hiding (get)
import SpecHe... | diogob/postgrest | test/Feature/RangeSpec.hs | mit | 10,546 | 0 | 23 | 3,209 | 1,902 | 1,003 | 899 | -1 | -1 |
-- |
-- Module: Math.NumberTheory.Powers.FourthTests
-- Copyright: (c) 2016 Andrew Lelechenko
-- Licence: MIT
-- Maintainer: Andrew Lelechenko <andrew.lelechenko@gmail.com>
-- Stability: Provisional
--
-- Tests for Math.NumberTheory.Powers.Fourth
--
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-type-de... | cfredric/arithmoi | test-suite/Math/NumberTheory/Powers/FourthTests.hs | mit | 5,790 | 0 | 17 | 1,024 | 1,131 | 606 | 525 | 61 | 2 |
module Main where
import qualified Language.Wasm.Entry as Entry
main :: IO ()
main = Entry.main
| haskell-wasm/wasm | exec/Main.hs | mit | 98 | 0 | 6 | 17 | 30 | 19 | 11 | 4 | 1 |
-- ID: RNA
-- Name: Transcribing DNA into RNA
-- Author: Samuel Jackson
-- Email: samueljackson@outlook.com
--replace any occurance of T with the letter U
transcribe :: String -> String
transcribe xs = map replace xs
where
replace :: Char -> Char
replace x
| x == 'T' = 'U'
| otherwise ... | samueljackson92/rosalind | src/RNA_transcribing_DNA_to_RNA.hs | gpl-2.0 | 398 | 2 | 9 | 109 | 100 | 49 | 51 | 10 | 1 |
--
-- Copyright (c) 2013-2019 Nicola Bonelli <nicola@pfq.io>
--
-- 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 of the License, or
-- (at your option) any later version.
--
-... | awgn/cgrep | src/CGrep/Strategy/Cpp/Tokenizer.hs | gpl-2.0 | 4,214 | 0 | 23 | 1,370 | 940 | 512 | 428 | 52 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module Point (Point(..)) where
import Control.Monad (liftM)
import qualified Data.Vector.Generic.Mutable as M
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Unboxed.Base as U
import Foreign.Ptr (castPtr)
... | meteogrid/hs-multivac | src/Point.hs | gpl-2.0 | 2,186 | 0 | 11 | 474 | 864 | 443 | 421 | 56 | 0 |
{-# OPTIONS_GHC -Wall -Werror -i.. #-}
{-# LANGUAGE GADTs, RankNTypes #-}
module HIR.DeadAssignmentElimination(deadAssignmentEliminationPass,
runDeadAssignmentElimination) where
import Compiler.Hoopl
import qualified Data.Maybe as Mby
import qualified Data.List as L
import qualifi... | sanjoy/echoes | src/HIR/DeadAssignmentElimination.hs | gpl-3.0 | 2,402 | 0 | 14 | 558 | 656 | 342 | 314 | 53 | 2 |
module ProjectEuler where
import Data.List
import Test.QuickCheck
import Control.Monad
import Data.Bits
prime :: Integer -> Bool
prime n = n > 1 && all (\ x -> rem n x /= 0) xs
where xs = takeWhile (\ y -> y^2 <= n) primes
primes :: [Integer]
primes = 2 : filter prime [3..]
-- Reusing the prime method from the lec... | vdweegen/UvA-Software_Testing | Lab1/Willem/ProjectEuler.hs | gpl-3.0 | 1,560 | 0 | 12 | 309 | 551 | 304 | 247 | 24 | 1 |
module Eval where
import qualified Data.Map as Map
import Data.List (foldl', null, isSuffixOf)
import Data.List.Split (splitOn, splitWhen)
import Data.Maybe (fromJust, mapMaybe, isJust)
import Control.Monad.State
import Control.Monad.State.Lazy (StateT(..), runStateT, liftIO, modify, get, put)
import System.Exit (exit... | eriksvedang/Carp | src/Eval.hs | mpl-2.0 | 57,414 | 3 | 30 | 19,875 | 16,401 | 8,042 | 8,359 | 981 | 83 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/SetAvailableProductSet.hs | mpl-2.0 | 6,402 | 0 | 21 | 1,470 | 871 | 508 | 363 | 131 | 1 |
module Cortex.G23.GrandMonadStack
( LesserMonadStack
, GrandMonadStack
) where
import Control.Monad.State (StateT)
import Control.Monad.Error (ErrorT)
import Cortex.Common.Miranda
type LesserMonadStack = ErrorT String IO
-- State holds Miranda host and port.
type GrandMonadStack = StateT MirandaInfo Les... | maarons/Cortex | G23/GrandMonadStack.hs | agpl-3.0 | 334 | 0 | 5 | 51 | 66 | 41 | 25 | 8 | 0 |
--------------------------------------------------------------------------------
-- $Id: SwishCommands.hs,v 1.14 2004/02/11 14:19:36 graham Exp $
--
-- Copyright (c) 2003, G. KLYNE. All rights reserved.
-- See end of this file for licence information.
-----------------------------------------------------------... | amccausl/Swish | Swish/HaskellRDF/SwishCommands.hs | lgpl-2.1 | 14,855 | 1 | 16 | 4,654 | 2,878 | 1,549 | 1,329 | 227 | 5 |
-- , pluginKey
-- , parseCategoryFile
-- , readCategoryFile
-- , getCategoryMap
-- , apiVersion
import System.FilePath
import Text.Regex
type Key = String
type Category = [String]
type CategoryMap = [(Key, Category)]
mkPluginKey :: FilePath -> String -> Key
mkPluginK... | kaoskorobase/hvamp | Sound/Analysis/Vamp/Category.hs | lgpl-3.0 | 1,038 | 0 | 14 | 241 | 268 | 144 | 124 | 20 | 2 |
module Data.Drasil.Units.PhysicalProperties where
import Data.Drasil.SI_Units (kilogram, m_3)
import Language.Drasil (UnitDefn, newUnit, (/:))
densityU :: UnitDefn
densityU = newUnit "density" $ kilogram /: m_3
| JacquesCarette/literate-scientific-software | code/drasil-data/Data/Drasil/Units/PhysicalProperties.hs | bsd-2-clause | 226 | 0 | 7 | 38 | 61 | 38 | 23 | 5 | 1 |
--
-- Copyright © 2015 Christian Marie <christian@ponies.io>
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
-- the 3-clause BSD licence.
--
{-# LANGUAGE OverloadedStrings #-... | christian-marie/votnik | lib/Botlike/Automations/Examples.hs | bsd-3-clause | 1,228 | 0 | 12 | 391 | 256 | 136 | 120 | 28 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module SDL.Input.Keyboard
( -- * Keyboard Modifiers
getModState
, KeyModifier(..)
, getKeyboardState
-- * Text Input
, startTextInput
, stopTextInput
-- * Screen Keyboard
, hasScreenKeyboardS... | svenkeidel/sdl2 | src/SDL/Input/Keyboard.hs | bsd-3-clause | 6,038 | 0 | 17 | 1,147 | 1,170 | 670 | 500 | 104 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, RecordWildCards, NamedFieldPuns, DeriveDataTypeable #-}
module Cards.Generic where
import Cards
import Cards.Common
import Cards.Pretty
import Data.List
import Data.Char
import Data.Set (Set)
import Data.Function (on)
import Data.Maybe
import Data.Data (Typeable)
import qualif... | archaephyrryx/CCG-Project | src/CCG/Cards/Generic.hs | bsd-3-clause | 4,793 | 0 | 12 | 2,617 | 975 | 522 | 453 | 111 | 6 |
module HttpStuff where
import Data.ByteString.Lazy hiding (map)
import Network.Wreq
a = "http://www.cnn.com"
urls :: [String]
urls = [ a ]
mappingGet :: [IO (Response ByteString)]
mappingGet = map get urls
traversedUrls :: IO [Response ByteString]
traversedUrls = traverse get urls
| chengzh2008/hpffp | src/ch21-Traversable/httpStuff.hs | bsd-3-clause | 286 | 0 | 8 | 44 | 93 | 53 | 40 | 10 | 1 |
{-# language MultiParamTypeClasses, FlexibleInstances, TypeOperators, OverlappingInstances #-}
module HList where
class In l ls where
-- | estrae l'elemento di tipo l
see :: ls -> l
-- | sostituisce l'elemento di tipo l
set :: l -> ls -> ls
instance In l (l,ls) where
see (l,_) = l
... | paolino/book-a-visit | common/HList.hs | bsd-3-clause | 900 | 0 | 8 | 289 | 305 | 174 | 131 | 24 | 1 |
module Main where
import Test.DocTest
main :: IO ()
main = doctest [
"-isrc",
"src/Data/TreeMap.hs",
"src/Data/Accounting/Account.hs",
"src/Data/Accounting/Currency.hs",
"src/Data/Accounting/Transaction.hs"]
| j-mueller/hldb | test/doctests.hs | bsd-3-clause | 220 | 0 | 6 | 30 | 42 | 25 | 17 | 9 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.