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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- |
-- Module: SwiftNav.SBP.Navigation
-- Copyright: Copyright (C) 2015 Swift Navigation, Inc.
-- License: LGPL-3
-- Maintainer: Mark Fine <dev@swiftnav.com>
-- Stability: experimental
-- Portability: portable
--
-- Geodetic navigation messages reporting GPS time, position, velocity, and
-- baseline posi... | mookerji/libsbp | haskell/src/SwiftNav/SBP/Navigation.hs | lgpl-3.0 | 17,788 | 0 | 11 | 3,420 | 2,663 | 1,377 | 1,286 | -1 | -1 |
module Database.QUDB.Utils where
{-
The following function is based on GHC's Data.List.sortBy distributed under a
following BSD-style license.
Copyright 2002, The University Court of the University of Glasgow.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modificatio... | jstepien/qudb | Database/QUDB/Utils.hs | lgpl-3.0 | 3,070 | 0 | 17 | 835 | 633 | 325 | 308 | 34 | 12 |
{-# LANGUAGE FlexibleContexts #-}
-- | Read-Eval-Print loop
module CoALPj.REPL (
runMain
, caMain
)where
import Control.Exception (SomeException,fromException)
import Control.Monad (when)
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Except (ExceptT (ExceptT), runExceptT)
import Control.Monad.Trans... | frantisekfarka/CoALP | inter/CoALPj/REPL.hs | lgpl-3.0 | 6,334 | 56 | 20 | 1,267 | 1,721 | 888 | 833 | 152 | 25 |
import Control.Parallel.Strategies
import System.Environment
import Control.Monad.Par
import Data.List
-- Various combinations of fib and mib, with or without parallelism. The
-- options with ppss uses the rpar-rpar/rseq-rseq parallelized functions. For
-- example, -ff runs two copies of fib sequentially while -ffpps... | jun0/parconc-experiments | FibAlloc.hs | unlicense | 3,032 | 0 | 13 | 666 | 910 | 482 | 428 | 60 | 8 |
--{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}
--{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeC... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/type-level/2017-12-2018-10-justin-le-intro-to-singletons-parts-1-4/src/Part3Manual.hs | unlicense | 30,584 | 0 | 9 | 6,036 | 729 | 392 | 337 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
module Language.K3.Interpreter.Builtins.Math where
import Control.Monad.State
import Language.K3.Core.Annotation
import Language.K3.Core.Common
import Language.K3.Core.Type
import Language.K3.Interpreter.Data.Types
import Language.K3.Interpre... | DaMSL/K3 | src/Language/K3/Interpreter/Builtins/Math.hs | apache-2.0 | 1,729 | 0 | 16 | 342 | 494 | 263 | 231 | 28 | 4 |
module Problem004 where
main =
print $ maximum [p | x <- [100..999], y <- [100..999], let p = x * y, let s = show p, s == reverse s]
| vasily-kartashov/playground | euler/problem-004.hs | apache-2.0 | 139 | 0 | 12 | 37 | 83 | 43 | 40 | 3 | 1 |
module DataExtension where
import DataBase
import PrettyPrinterBase
import EvaluatorBase
-- Data extension for negation
data Exp x => Neg x = Neg x
instance Exp x => Exp (Neg x)
-- Extending operation for pretty printing
instance PrettyPrint x => PrettyPrint (Neg x)
where
prettyPrint (Neg x) = do putStr "(- ... | egaburov/funstuff | Haskell/tytag/xproblem_src/samples/expressions/Haskell/OpenDatatype1/DataExtension.hs | apache-2.0 | 484 | 0 | 8 | 95 | 150 | 75 | 75 | 10 | 0 |
{-# LANGUAGE CPP #-}
module Data.FastPack
( Endian (..)
, GetData (..)
, PackData (..)
, PackNumType (..)
, runFastPack
, runFastUnpack
) where
import Data.FastPack.Get
import Data.FastPack.Put
import Data.FastPack.Types
| erikd/fastpack | src/Data/FastPack.hs | bsd-2-clause | 283 | 0 | 5 | 92 | 61 | 42 | 19 | 11 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
module Main where
import Control.Applicative ((<$>))
import Test.QuickCheck
import Data.Frequency.Hertz
import Data.Frequency.Megahertz
import System.Exit
instance Arbitrary Hertz where
arbitrary = Hertz <$> arbitrary
instance Arbitrary Megaher... | relrod/frequency | tests/quickcheck.hs | bsd-2-clause | 841 | 0 | 10 | 157 | 248 | 138 | 110 | 24 | 3 |
{-# LANGUAGE DeriveFunctor, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
-- | Wrapper around Markdown library
module Idris.Docstrings (
Docstring(..), Block(..), Inline(..), parseDocstring, renderDocstring, emptyDocstring, nullDocstring, noDocs,
overview, containsText, renderHtml, ann... | BartAdv/Idris-dev | src/Idris/Docstrings.hs | bsd-3-clause | 14,447 | 0 | 14 | 4,170 | 4,723 | 2,381 | 2,342 | 229 | 17 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
--
-- RegTypes.hs --- SPI register types
--
-- Copyright (C) 2013, Galois, Inc.
-- All Rights Reserved.
--
module Ivory.BSP.STM32.Peripheral.SPI.RegTypes where
import Ivory.Language
[ivor... | GaloisInc/ivory-tower-stm32 | ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/SPI/RegTypes.hs | bsd-3-clause | 569 | 0 | 4 | 116 | 32 | 26 | 6 | 7 | 0 |
-- | Simple labels with total getters and total and monomorphic modifications.
{-# LANGUAGE TypeOperators #-}
module Label.Simple
( (:->)
, (:~>)
, make
, get
, modify
, set
)
where
import qualified Label.Partial as Partial
import qualified Label.Total as Total
{-# INLINE make #-}
{-# INLINE get #-}
{-# INLI... | sebastiaanvisser/labels | src/Label/Simple.hs | bsd-3-clause | 1,050 | 0 | 10 | 253 | 267 | 165 | 102 | 24 | 1 |
{-# LANGUAGE CPP #-}
module Bead.Persistence.SQL.MySQLTestRunner where
import Bead.Persistence.Initialization
import Bead.Persistence.SQL.Entities (Persist)
import Bead.Persistence.SQL.MySQL
#ifdef TEST
import Data.IORef
import System.IO.Unsafe
#endif
#ifdef TEST
runPersist = runInterpreter
-- TODO: FIX this dirty... | andorp/bead | src/Bead/Persistence/SQL/MySQLTestRunner.hs | bsd-3-clause | 1,099 | 0 | 10 | 181 | 264 | 133 | 131 | 5 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Config
( T(), serverUrl, serverPort, serverAllowOrigins, proxyHost, proxyPort, proxyKey
, postmarkKey, postmarkSender
, authCookie, authKey, authEmailDomain, authTitle
, debug, load
) where
import Control.Lens
import Control.Monad
import Data.ByteString
import Data.Te... | ktvoelker/auth-proxy | src/Config.hs | bsd-3-clause | 1,626 | 0 | 20 | 438 | 532 | 298 | 234 | 58 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Calculator.Value
( Value
, Error (..)
, value
) where
import Calculator.Pretty
import Calculator.Tokens
import Control.Applicative ((<$>), (<*>))
import Data.Monoid ((<>))
import Data.Ratio (denominator, nu... | jonathanknowles/haskell-calculator | source/library/Calculator/Value.hs | bsd-3-clause | 1,478 | 0 | 12 | 509 | 581 | 305 | 276 | 41 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module MergeSpec (tests) where
import BasePrelude
-- Text
import qualified Data.Text.All as T
import Data.Text.All (Text)
-- Testing
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import Data.Text.Arbitrary ()
import Guide... | aelve/hslibs | tests/MergeSpec.hs | bsd-3-clause | 2,209 | 0 | 15 | 608 | 666 | 328 | 338 | 60 | 1 |
-- |
-- Module : Network.Frame.Conduit
-- Copyright : (c) Austin Seipp 2012
-- License : BSD3
--
-- Maintainer : mad.one@gmail.com
-- Stability : experimental
-- Portability : GHC probably
--
-- This package provides a 'Conduit' for parsing 'ByteString's into
-- raw TCP/IP/UDP headers and fields.
--
modul... | thoughtpolice/network-data-conduit | Network/Frame/Conduit.hs | bsd-3-clause | 368 | 0 | 3 | 82 | 22 | 19 | 3 | 2 | 0 |
-- | Module for the package @amsfonts@.
module Text.LaTeX.Packages.AMSFonts
( -- * AMSFonts package
amsfonts
-- * Fonts
, mathbb, mathfrak
-- * Number sets
, naturals, integers, rationals, reals, complexes
) where
import Text.LaTeX.Base.Class
import Text.LaTeX.Base.Types
-- | AMSFonts package.
-- Exam... | dmcclean/HaTeX | Text/LaTeX/Packages/AMSFonts.hs | bsd-3-clause | 1,123 | 0 | 6 | 233 | 227 | 134 | 93 | 23 | 1 |
-- Copyright 2019 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- https://developers.google.com/open-source/licenses/bsd
-- | This module exports all of the definitions in this package in one
-- convenient location.
--
-- For more details an... | google/ghc-source-gen | src/GHC/SourceGen.hs | bsd-3-clause | 1,426 | 0 | 5 | 278 | 157 | 114 | 43 | 22 | 0 |
module ScheduleEVR (dayItem, dayItemFile) where
import Output
import Parser
import FromID
import Data.Time
import Control.Applicative
dayItemFile :: Day -> [FilePath] -> IO [(Day, String)]
dayItemFile b = (dayItem b <$>) . mapM readFile
dayItem :: Day -> [String] -> [(Day, String)]
dayItem b = ((b, "start") :) . map... | YoshikuniJujo/forest | subprojects/schedevr/src/prog_graph/ScheduleEVR.hs | bsd-3-clause | 372 | 0 | 12 | 64 | 171 | 99 | 72 | 10 | 1 |
--
-- HTTP client for use with io-streams
--
-- Copyright Β© 2012-2014 Operational Dynamics Consulting, Pty Ltd
--
-- 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 BSD licen... | laurencer/confluence-sync | vendor/http-streams/lib/Network/Http/Connection.hs | bsd-3-clause | 19,480 | 0 | 20 | 4,714 | 2,626 | 1,475 | 1,151 | 222 | 5 |
{-|
Module : Database.Relational.RowType
Description : Definition of RowType and friends.
Copyright : (c) Alexander Vieth, 2015
Licence : BSD3
Maintainer : aovieth@gmail.com
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE TypeFamilies #-}... | avieth/Relational | Database/Relational/RowType.hs | bsd-3-clause | 5,806 | 0 | 9 | 2,134 | 1,887 | 1,100 | 787 | 158 | 0 |
{-# language CPP #-}
{-# LANGUAGE RankNTypes #-}
{-# language QuasiQuotes #-}
{-# language ConstraintKinds #-}
{-# language TemplateHaskell #-}
{-# language UndecidableInstances #-}
#if __GLASGOW_HASKELL__ >= 800
{-# options_ghc -Wno-redundant-constraints #-}
#endif
{-# options_ghc -fno-warn-orphans #-}
module OpenC... | Cortlandd/haskell-opencv | src/OpenCV/Internal/Core/Types/Mat.hs | bsd-3-clause | 17,224 | 0 | 18 | 4,384 | 4,183 | 2,247 | 1,936 | -1 | -1 |
module Numeric.Utilities.Tools where
import Control.Monad (liftM)
import Control.Monad.Primitive (PrimMonad, PrimState)
import Control.Monad.ST (runST)
import Data.Array.Repa.Index
import Data.Array.Repa as R
import Data.Array.Repa.Algorithms.Matrix (
col
,mmultP
... | felipeZ/OptimizationAlgorithms | Numeric/Utilities/Tools.hs | bsd-3-clause | 3,469 | 0 | 12 | 1,201 | 1,075 | 557 | 518 | 80 | 2 |
module Wikirick.Backends.JSONConnection
( module Wikirick.JSONConnection
, initJSONConnection
) where
import Control.Monad.CatchIO
import Data.Aeson
import Snap
import Wikirick.JSONConnection
initJSONConnection :: SnapletInit b JSONConnection
initJSONConnection = makeSnaplet "JSONConnection" "Provide a JSON co... | keitax/wikirick | src/Wikirick/Backends/JSONConnection.hs | bsd-3-clause | 694 | 0 | 15 | 138 | 160 | 85 | 75 | 18 | 1 |
module Graphics.Vty.Widgets.Builder.AST
( Doc(..)
, Param(..)
, Interface(..)
, ModuleImport(..)
, WidgetLike(..)
, WidgetElement(..)
, WidgetReference(..)
, ReferenceType(..)
, FocusReference(..)
, SourceLocation(..)
, Element(..)
, ElementContent(..)
, WidgetId
... | jtdaugherty/vty-ui-builder | src/Graphics/Vty/Widgets/Builder/AST.hs | bsd-3-clause | 6,514 | 0 | 10 | 1,821 | 1,503 | 851 | 652 | 156 | 4 |
module CANData
( Msg (..)
, BusType (..)
, toWord64
, fromWord64
, toWord32
, fromWord32
, CANDB (..)
, CANMsg (..)
, CANMsgAttr
, CANEndian (..)
, CANSign (..)
, CANSignalType (..)
, CANSignalMux (..)
, CANSignal (..)
) where
import Data.Bits
import Data.Word
import Text.Printf
data Msg... | tomahawkins/ecu | src/CANData.hs | bsd-3-clause | 2,406 | 0 | 13 | 553 | 860 | 496 | 364 | 69 | 1 |
{-# OPTIONS_HADDOCK hide #-}
------------------------------------------------------------------------------
-- |
-- Module: Control.Concurrent.STM.TChan.Split.Internal
-- Copyright: (c) 2013 Leon P Smith
-- License: BSD3
-- Maintainer: Leon P Smith <leon@melding-monads.com>
-- Stability: experimental
--
... | lpsmith/split-tchan | src/Control/Concurrent/STM/TChan/Split/Internal.hs | bsd-3-clause | 589 | 0 | 5 | 82 | 51 | 40 | 11 | 7 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Pattern-matching bindings (HsBinds and MonoBinds)
Handles @HsBinds@; those at the top level require different handling,
in that the @Rec@/@NonRec@/etc structure is thrown away (whereas at
lower levels it is preserved with... | vikraman/ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | 50,948 | 0 | 22 | 16,341 | 7,818 | 4,064 | 3,754 | 545 | 6 |
module SevenArrayOfNElements
( run
) where
fn n = replicate n 1
run :: IO()
run = do
n <- readLn :: IO Int
print (fn n)
| PisoMojado/HackerRankFunctionalProgramming | src/Exercises/SevenArrayOfNElements.hs | bsd-3-clause | 130 | 0 | 9 | 37 | 62 | 31 | 31 | 7 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | Strings in Javascript.
module Language.Sunroof.JS.String
( JSString
, string
) where
import Data.Boolean ( BooleanOf, IfB(..), EqB(..) )
import Data.Semigroup ( Semigroup(..) )
import Data.Char ( isAscii... | ku-fpg/sunroof-compiler | Language/Sunroof/JS/String.hs | bsd-3-clause | 3,890 | 0 | 14 | 676 | 927 | 503 | 424 | 67 | 13 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
-------------------------------------------------------------------------------
--
-- | Dynamic flags
--
-- Most flags are dynamic flags, which means they can change from compilation
-- to compilation using @OPTIONS_GHC@ pragmas, and in a multi-session GHC each
-... | ezyang/ghc | compiler/main/DynFlags.hs | bsd-3-clause | 228,498 | 1 | 41 | 60,338 | 41,377 | 22,627 | 18,750 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Control.Monad.IO.Class
import Data.Aeson
import Data.Proxy
import Data.Text
import Data.Time
imp... | rtrvrtg/servant-example | Main.hs | bsd-3-clause | 1,230 | 0 | 12 | 240 | 311 | 167 | 144 | 38 | 1 |
module Problem60 where
import Data.Digits
import Data.List (find)
import Data.Maybe
import Data.Numbers.Primes (isPrime)
import Data.Set (Set, elems, insert, size, member, fromList)
import Data.Set (elems)
import Data.Tuple (swap)
isPrimePair :: Int -> Int -> Bool
isPrimePair x y = isPrime (concatInt x y) && isPrime ... | noraesae/euler | src/Problem60.hs | bsd-3-clause | 1,976 | 0 | 17 | 576 | 798 | 415 | 383 | 51 | 3 |
module Jerimum.Tests.Integration.PostgreSQL.Types.DateRangeTests where
import Jerimum.PostgreSQL.Types
import Jerimum.PostgreSQL.Types.DateRange
import Jerimum.Tests.Integration.DataTypeHelper
import Jerimum.Tests.Integration.Resource
import Test.Tasty
tests :: TestTree
tests =
testGroup
"DATERANGE"
[ testG... | dgvncsz0f/nws | test/Jerimum/Tests/Integration/PostgreSQL/Types/DateRangeTests.hs | bsd-3-clause | 15,065 | 0 | 21 | 7,075 | 3,409 | 1,786 | 1,623 | 425 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- -----------------------------------------------------------------------------
-- |
-- Module : Network.IRC.Message.Types
-- Copyright : (c) Andreas-Christoph Bernstein 2011
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : andreas.bernstein@googlemail.com
-- ... | bernstein/ircfs | Network/IRC/Message/Types.hs | bsd-3-clause | 10,473 | 0 | 9 | 1,822 | 2,326 | 1,308 | 1,018 | 424 | 1 |
-- |The OSM module for Gloss will download and cache map tiles
-- and provides easy display of maps using Gloss 'Picture's.
--
-- For example:
--
-- @
-- p <- buildOSMBackground black (Frame 1280 1024 (pt 45 (-122.5) Nothing Nothing) 16)
-- display (FullScreen (1280,1024)) white p
-- @
--
-- Will build a map of the g... | TomMD/gloss-osm | Graphics/Gloss/OSM.hs | bsd-3-clause | 8,760 | 2 | 24 | 2,102 | 2,503 | 1,369 | 1,134 | 149 | 3 |
module Main where
import Lib
main :: IO ()
main = do
r <- getData
putStrLn "Data loaded"
putStrLn $ take 200 $ show r
| seantalts/hasktrip | app/Main.hs | bsd-3-clause | 133 | 0 | 9 | 40 | 52 | 25 | 27 | 7 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE DataKinds, FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Undecida... | paul-rouse/persistent | persistent-postgresql/test/EquivalentTypeTestPostgres.hs | mit | 1,460 | 0 | 13 | 245 | 198 | 109 | 89 | 27 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module NFA.Nerode.Incongruent.Solution where
import Autolib.Reader
import Autolib.ToDoc
import Convert.Input
import Autolib.FiniteMap
import Autolib.NFA ( NFAC )
import Data.Typeable
import Prelude hiding ( words )
data NFAC c Int => Solution c =
Solution { words :: [ [c] ]
... | florianpilz/autotool | src/NFA/Nerode/Incongruent/Solution.hs | gpl-2.0 | 702 | 2 | 13 | 183 | 233 | 135 | 98 | -1 | -1 |
{- |
Module : ./SoftFOL/MathServMapping.hs
Description : Maps a MathServResponse into a prover configuration.
Copyright : (c) Rainer Grabbe
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : needs POSIX
Maps a MathServResponse in... | spechub/Hets | SoftFOL/MathServMapping.hs | gpl-2.0 | 7,045 | 1 | 26 | 2,340 | 1,230 | 655 | 575 | 115 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : ./Fpl/As.der.hs
Description : abstract syntax for FPL
Copyright : (c) Christian Maeder, DFKI GmbH 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
abstract syntax f... | spechub/Hets | Fpl/As.der.hs | gpl-2.0 | 7,306 | 0 | 17 | 1,668 | 2,682 | 1,322 | 1,360 | 194 | 1 |
module HelloWorld (hello) where
hello :: String
hello = error "You need to implement this function."
| ZachGangwer/Exercism | haskell/hello-world/src/HelloWorld.hs | gpl-3.0 | 102 | 0 | 5 | 17 | 22 | 13 | 9 | 3 | 1 |
-- |
-- Copyright: (C) 2014-2015 EURL Tweag
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent
import Control.Monad ( replicateM )
import Data.IORef
import Network.Transport
import Network.Transport.ZMQ
import Test.Tasty
import Test.Tasty.HUnit
main :: IO ()
main = defaultMain $
testGr... | tweag/network-transport-zeromq | tests/TestAPI.hs | bsd-3-clause | 5,295 | 0 | 12 | 1,113 | 1,633 | 743 | 890 | 117 | 1 |
import System.Plugins
import API
src = "../Plugin.hs"
wrap = "../Wrapper.hs"
apipath = "../api"
main = do status <- make src ["-i"++apipath]
case status of
MakeSuccess _ _ -> f
MakeFailure e -> mapM_ putStrLn e
where
f = do v <- pdynload "../Plugin.o" ["..... | abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/testsuite/pdynload/should_fail0/prog/Main.hs | bsd-3-clause | 501 | 0 | 12 | 188 | 140 | 68 | 72 | 13 | 3 |
{- Temporary files and directories.
-
- Copyright 2010-2013 Joey Hess <id@joeyh.name>
-
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
module Utility.Tmp where
import Control.Exception (bracket)
import System.IO
import System.Directory
import Control.Monad.IfElse
import System.FilePath
import Utility.Exceptio... | avengerpenguin/propellor | src/Utility/Tmp.hs | bsd-2-clause | 3,395 | 0 | 15 | 644 | 701 | 349 | 352 | 50 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Command
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-... | TOSPIO/yi | src/library/Yi/Command.hs | gpl-2.0 | 5,529 | 0 | 18 | 1,382 | 1,310 | 707 | 603 | 87 | 5 |
{-# language ΓΒΆ MultiParamTypeClasses, DeriveDataTypeable #-}
import Safe
import Data.Data
import System.Environment
import Utils
import Base
import Object.Types
import qualified Editor.Pickle.Types as NewFormat
main = do
files <- getArgs
mapM_ convertFile files
convertFile file = do
content <- r... | geocurnoff/nikki | src/scripts/converter-0_2_20.hs | lgpl-3.0 | 1,460 | 0 | 11 | 266 | 388 | 205 | 183 | -1 | -1 |
import Test.Cabal.Prelude
-- Test for 'build-type: Configure' example from the setup manual.
-- Disabled on Windows since MingW doesn't ship with autoreconf by
-- default.
main = setupAndCabalTest $ do
skipIf =<< isWindows
_ <- shell "autoreconf" ["-i"]
setup_build []
| themoritz/cabal | cabal-testsuite/PackageTests/Configure/setup.test.hs | bsd-3-clause | 281 | 0 | 10 | 52 | 49 | 25 | 24 | 5 | 1 |
-- | MPlayer client demo
-- Author : Andy Stewart
-- Copyright : (c) 2010 Andy Stewart <lazycat.manatee@gmail.com>
module Main where
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad
import Control.Monad.Trans
import Graphics.UI.Gtk
import System.Exit
i... | k0001/gtk2hs | gtk/demo/embedded/MPlayer.hs | gpl-3.0 | 2,172 | 0 | 18 | 511 | 572 | 289 | 283 | 58 | 2 |
{-# LANGUAGE GADTs, DataKinds, KindSignatures, StandaloneDeriving, TypeOperators #-}
module T10348 where
import GHC.TypeLits
import Data.Typeable
import Data.Proxy
data Foo (n :: Nat) where
Hey :: KnownNat n => Foo n
deriving instance Show (Foo n)
data T t where
T :: (Show t, Typeable t) => t -> T t
deriving ... | sdiehl/ghc | testsuite/tests/typecheck/should_compile/T10348.hs | bsd-3-clause | 626 | 0 | 10 | 137 | 259 | 136 | 123 | 21 | 1 |
import Control.Exception
-- test that the out-of-band data in an ErrorCall exception is printed
main = throw (ErrorCallWithLocation "error" "out-of-band")
| ghc-android/ghc | libraries/base/tests/topHandler04.hs | bsd-3-clause | 157 | 0 | 7 | 22 | 23 | 12 | 11 | 2 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module ShouldCompile where
import Data.Typeable
data A a b c d e f g h i j = A deriving (Typeable)
-- Many args
data B a b = B (a b) deriving (Typeable)
-- Non type-kind args | urbanslug/ghc | testsuite/tests/deriving/should_compile/drv022.hs | bsd-3-clause | 217 | 0 | 8 | 48 | 60 | 41 | 19 | 5 | 0 |
module Zwerg.Generator.Enemy.Goblin (goblin) where
import Zwerg.Generator
import Zwerg.Generator.Default
-- import Zwerg.Generator.Verify
import Zwerg.Generator.Item.Weapon
goblin :: Generator
goblin = Generator goblinHatch []
+> assignUniformRandomStats (zip (enumFrom STR) (repeat (1,5)))
+> ge... | zmeadows/zwerg | lib/Zwerg/Generator/Enemy/Goblin.hs | mit | 1,371 | 0 | 14 | 339 | 379 | 192 | 187 | 33 | 1 |
module Proxy.Math.Interval (Interval(I),mkInterval, ilength, sup,inf,midpoint,trivial,isIn,intersection,trivialIntersection,interIntervalDistance,iUnion,iDist,closestInInterval) where
newtype Interval a = I (a,a)
deriving (Show,Eq)
mkInterval :: (Ord b) => b -> b -> Inte... | mapinguari/SC_HS_Proxy | src/Proxy/Math/Interval.hs | mit | 1,934 | 1 | 14 | 515 | 1,007 | 509 | 498 | 45 | 2 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Chap10 where
-- Chapter 10: First class families
... | shouya/thinking-dumps | haskell-types/src/Chap10.hs | mit | 3,695 | 0 | 11 | 859 | 998 | 552 | 446 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE NoMonomorphismRestriction#-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-... | paldepind/t-diagram | src/Main.hs | mit | 1,255 | 0 | 9 | 182 | 156 | 93 | 63 | 24 | 1 |
{-# htermination toLower :: Char -> Char #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_toLower_1.hs | mit | 45 | 0 | 2 | 8 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module Unison.Server.Endpoints.ListNamespace where
import Con... | unisonweb/platform | parser-typechecker/src/Unison/Server/Endpoints/ListNamespace.hs | mit | 7,279 | 0 | 24 | 1,497 | 1,529 | 829 | 700 | -1 | -1 |
{-# LANGUAGE JavaScriptFFI #-}
-- | FIXME: doc
module GHCJS.Electron.Protocol where
| taktoa/ghcjs-electron | src/GHCJS/Electron/Protocol.hs | mit | 85 | 0 | 3 | 12 | 9 | 7 | 2 | 2 | 0 |
{--*-Mode:haskell;coding:utf-8;tab-width:4;c-basic-offset:4;indent-tabs-mode:()-*-
ex: set ft=haskell fenc=utf-8 sts=4 ts=4 sw=4 et nomod: -}
{-
MIT License
Copyright (c) 2017-2019 Michael Truog <mjtruog at protonmail dot com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of... | CloudI/CloudI | src/api/haskell/src/Foreign/Erlang/Reference.hs | mit | 1,698 | 0 | 9 | 316 | 111 | 70 | 41 | 21 | 0 |
module ResistorColors (Color(..), value) where
data Color =
Black
| Brown
| Red
| Orange
| Yellow
| Green
| Blue
| Violet
| Grey
| White
deriving (Eq, Show, Enum, Bounded)
convert :: Color -> Int
convert Black = 0
convert Brown = 1
convert Red = 2
convert Orange = 3
convert Yellow = 4
convert ... | exercism/xhaskell | exercises/practice/resistor-color-duo/.meta/examples/success-standard/src/ResistorColors.hs | mit | 475 | 0 | 7 | 121 | 201 | 111 | 90 | 26 | 1 |
-- |
--
-- = Overview
--
-- == Trace
--
-- Given a type @t@, @'Trace' t@ is the sum of all possible ways to obtain a
-- value of type @A@ contained in a value of type @t@.
--
-- - For a function, we must apply it to some argument, and we can then recursively
-- obtain a value from the result.
-- - For a sum of produc... | Lysxia/metamorph | src/Test/Metamorph/Internal.hs | mit | 14,178 | 0 | 13 | 2,999 | 3,458 | 1,916 | 1,542 | -1 | -1 |
module Main where
import BasicPrelude
import Options.Applicative
import System.Random
data Options = Options
{ optionEmojis :: FilePath
, optionOutput :: FilePath
, optionNumChars :: Maybe Int
}
deriving Show
optionsParser :: ParserInfo Options
optionsParser = info (helper <*> options) fullDesc
where... | hachibu/erandom | src/Main.hs | mit | 1,211 | 0 | 14 | 358 | 380 | 195 | 185 | 33 | 2 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Data.Picture (Angle(..), Picture(..), Colour(..)) where
import Control.Monad
import Data.Binary
import GHC.Generics
import Philed.Data.NNeg (NNeg)
import Philed.Data.Vector
import Test.QuickCheck.Arbitrary
... | Chattered/guis | Data/Picture.hs | mit | 1,252 | 0 | 9 | 281 | 422 | 234 | 188 | 28 | 0 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGAnimatedRect
(getBaseVal, getAnimVal, SVGAnimatedRect(..), gTypeSVGAnimatedRect)
where
import Prelude (... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGAnimatedRect.hs | mit | 1,567 | 0 | 10 | 175 | 398 | 252 | 146 | 24 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleInstances #-}
module Graphics.Rendering.WebGL (
module GHCJS.DOM.HTMLCanvasElement,
module Graphics.Rendering.WebGL.Matrix,
module Graphics.Rendering.WebGL,
module Graphics.Rendering.WebGL.EnumConvert,... | isomorphism/webgl | src/Graphics/Rendering/WebGL.hs | mit | 16,831 | 0 | 15 | 2,733 | 5,156 | 2,664 | 2,492 | 276 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
-- | This module is an interface to the Readability's Reader API.
--
-- To get more info, visit <https://www.readability.com/developers/api/reader>.
--
-- Before performing any request, yo... | rasendubi/hsreadability | src/Network/Readability/Reader.hs | mit | 18,975 | 0 | 15 | 4,693 | 4,133 | 2,278 | 1,855 | 380 | 1 |
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
module Solver where
import Hand
import Data.List
import Data.List.Split
import Data.Functor
import Solver.Generic
import Solver.Interactive
import Data.Maybe
import Data.Hashable
import qualified Data.Bimap as BM
candidatePlaysH :: IDeal d => d -> Direction -> Maybe Sui... | mthvedt/hbridge | src/Solver.hs | epl-1.0 | 6,341 | 0 | 16 | 1,707 | 2,583 | 1,338 | 1,245 | 128 | 4 |
module Main where
import Flowskell.Shot
main = shot
| lordi/flowskell | src/Shot.hs | gpl-2.0 | 52 | 0 | 4 | 8 | 14 | 9 | 5 | 3 | 1 |
{-
CC_Clones - Classic games reimplemented
Β© Callum Lowcay 2006-2011
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
(at your option) any later version.
This prog... | CLowcay/CC_Clones | src/Common/UserData.hs | gpl-3.0 | 942 | 0 | 11 | 153 | 72 | 36 | 36 | 9 | 1 |
-- | A module for converting between types that represent real numbers, and rounding operators.
module MathPrelude.Classes.Real where
------------------------------
--- Imports
------------------------------
import MathPrelude.Prelude.CorePrelude
import qualified Prelude as P
import qua... | RossOgilvie/MathPrelude | MathPrelude/Classes/Real.hs | gpl-3.0 | 3,533 | 0 | 8 | 839 | 669 | 387 | 282 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Settings where
import Control.Applicative
import Control.Monad.State
import Data.Aeson
import qualified Data.ByteString.Lazy as B
import Types
settingsFile :: FilePath
settingsFile = "config/settings.json"
--todo: rename to somthing b... | MarkArts/wubstuts | src/Settings.hs | gpl-3.0 | 1,876 | 0 | 14 | 529 | 416 | 229 | 187 | 44 | 2 |
module GtkBlast.Achievement
(achievements
,getAchievement
,getAchievementString) where
import Import
achievements :: [(Int, Text)]
achievements =
reverse $
[(10, "ΠΠ½ΠΎΠ½")
,(20, "ΠΡΡΠ°")
,(50, "Π’ΡΠΎΠ»Π»Π΅Ρ")
,(100, "Π‘ΠΎΡΠ½Ρ ΡΠ°Π·ΠΎΡΠ²Π°Π½Π½ΡΡ
Π°Π½ΡΡΠΎΠ²")
,(150, "ΠΠ°ΠΉΠΏΠ΅Ρ")
... | exbb2/BlastItWithPiss | src/GtkBlast/Achievement.hs | gpl-3.0 | 1,140 | 0 | 10 | 262 | 272 | 169 | 103 | 29 | 2 |
module Lamdu.GUI.Expr.AssignmentEdit
( make
, Parts(..), makeFunctionParts
, makeJumpToRhs
) where
import Control.Applicative ((<|>), liftA2)
import qualified Control.Lens as Lens
import Data.CurAndPrev (CurAndPrev, current, fallbackToPrev)
import Data.List.Extended (withP... | Peaker/lamdu | src/Lamdu/GUI/Expr/AssignmentEdit.hs | gpl-3.0 | 19,764 | 0 | 23 | 5,786 | 5,282 | 2,770 | 2,512 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Util where
import Control.Monad.Logger
import Control.Monad.Trans.Resource
import qualified Data.Text as T
import Database.Persist.Sqlite hiding (get)
import Model.User
import Network.HTTP.Types.Status
import System.FilePath.Posix (spli... | bitraten/hands | src/Util.hs | gpl-3.0 | 1,647 | 0 | 10 | 416 | 499 | 271 | 228 | 37 | 4 |
module Logging (
initLogging,
module System.Log.Logger
) where
--import qualified Data.Configurator as CFG
--import qualified Data.Configurator.Types as CFG
import System.IO ( stderr )
import System.Log.Handler.Simple
import System.Log.Logger
-- | configure log handlers
initLogging :: IO ()
initLogging = do
... | waldheinz/ads | src/lib/Logging.hs | gpl-3.0 | 467 | 0 | 9 | 71 | 98 | 54 | 44 | 11 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANG... | bennofs/vplan | src/Data/VPlan/Modifier/Annotate.hs | gpl-3.0 | 3,107 | 0 | 9 | 728 | 1,084 | 568 | 516 | 54 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Sepa.DirectDebit
( -- Direct debit instructions set
mkDirectDebitSet,
DirectDebitSet, DirectDebitSetId,
... | gmarpons/sepa-debits | Sepa/DirectDebit.hs | gpl-3.0 | 5,008 | 0 | 12 | 1,171 | 963 | 527 | 436 | -1 | -1 |
{- hake: make tool. ruby : rake = haskell : hake
Copyright (C) 2008-2008 Yoshikuni Jujo <PAF01143@nifty.ne.jp>
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
(at ... | YoshikuniJujo/hake_haskell | Development/Hake.hs | gpl-3.0 | 5,550 | 11 | 17 | 1,409 | 1,771 | 970 | 801 | 117 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/Generate.hs | mpl-2.0 | 4,417 | 0 | 15 | 1,029 | 587 | 343 | 244 | 88 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : $Header$
Description : HTTP parsing for authochan.
Copyright : (c) plaimi 2015
License : AGPL-3
Maintainer : tempuhs@plaimi.net
-} module Authochan.HTTP.Parse where
import Control.Applicative
(
(<*),
(*>),
(<$>),
(<*>),
(<|>),
optional,
... | plaimi/authochan | src/Authochan/HTTP/Parse.hs | agpl-3.0 | 2,402 | 0 | 13 | 512 | 512 | 296 | 216 | 51 | 1 |
-- This file is part of purebred
-- Copyright (C) 2017-2020 Fraser Tweedale and RΓ³man Joost
--
-- purebred 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 yo... | purebred-mua/purebred | src/Purebred.hs | agpl-3.0 | 12,342 | 0 | 16 | 2,210 | 2,062 | 1,153 | 909 | -1 | -1 |
#!/usr/bin/env stack
-- stack --resolver lts-8.12 script
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE OverloadedStrings #-}
module S6LogTrick where
import Data.Functor.Identity
add1 :: Monad m => (String -> m ()) -> Int -> Int -> m Int
add1 logFunc x... | haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2017-05-snoyman-applied-haskell-at-lambdaconf/S6LogTrick.hs | unlicense | 869 | 0 | 12 | 215 | 318 | 158 | 160 | 30 | 1 |
module Geometry
( sphereVolume
, sphereArea
, cubeVolume
, cubeArea
, cuboidArea
, cuboidVolume
) where
sphereVolume :: Float -> Float
spherevolume radius = (4.0 / 3.0) * pi * (radius ^ 3)
sphereArea :: Float -> Float
sphereArea radius = 4 * pi * (radius ^ 2)
cubeVolume :: Float -> Float
cubeVolume side = cuboidVolu... | alexliew/learn_you_a_haskell | code/Geometry.hs | unlicense | 676 | 0 | 10 | 143 | 272 | 142 | 130 | 21 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
module Cache
where
import Control.Applicative
import qualified Data.Text as T
import Data.Binary
import Data.Maybe
import Data.Time.LocalTime
import Data.Time.Clock.POSIX
import System.Directory
import System.FilePath.Posix
import Text.HTML.DirectoryListi... | sifmelcara/pgdl | src/Cache.hs | unlicense | 1,808 | 0 | 20 | 599 | 513 | 255 | 258 | 54 | 3 |
module MadLibs where
import Data.Monoid
type Verb = String
type Adjective = String
type Adverb = String
type Noun = String
type Exclamation = String
madlibbin' :: Exclamation
-> Adverb
-> Noun
-> Adjective
-> String
madlibbin' e adv noun adj =
e <> "! he said " <>
adv... | thewoolleyman/haskellbook | 15/11/eric/MadLibs.hs | unlicense | 712 | 0 | 11 | 250 | 164 | 93 | 71 | 32 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilyDependencies #-}
-- |
-- Module : Geography.VectorTile.Internal
-- Copyright : (c) Colin Woodbury 2016 - 2018
-- License : BSD3
-- ... | sitewisely/zellige | src/Data/Geometry/VectorTile/Internal.hs | apache-2.0 | 20,683 | 0 | 24 | 6,364 | 5,556 | 2,904 | 2,652 | 305 | 7 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- A number of functions related to local data.
module Spark.Core.Internal.LocalDataFunctions(
constant,
iPackTupleObs
) where
imp... | tjhunter/karps | haskell/src/Spark/Core/Internal/LocalDataFunctions.hs | apache-2.0 | 3,961 | 0 | 12 | 743 | 1,020 | 552 | 468 | 81 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Main where
import Control.Monad
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString.Char8 as C8
import qualified Data.HashMap.Strict as M
import Data.Monoid
import qualified Data.Text as T
import Data.Time
import ... | erochest/whatisdh | data/loadDDH11.hs | bsd-2-clause | 2,718 | 0 | 20 | 994 | 724 | 378 | 346 | 68 | 4 |
-- |
-- Module : Crypto.KDF.Scrypt
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- Scrypt key derivation function as defined in Colin Percival's paper
-- "Stronger Key Derivation via Sequential Memory-Hard Functions"
-- <h... | nomeata/cryptonite | Crypto/KDF/Scrypt.hs | bsd-3-clause | 2,629 | 0 | 26 | 718 | 600 | 329 | 271 | 43 | 1 |
-- Copyright (c) 2014 Eric McCorkle. 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 conditi... | emc2/arith-encode | test/Tests/Data/ArithEncode/TestUtils.hs | bsd-3-clause | 7,755 | 0 | 20 | 1,881 | 2,103 | 1,084 | 1,019 | 136 | 1 |
module Snap.Snaplet.HTTPAuth (
AuthConfig (..),
AuthDomain (..),
IAuthDataSource (..),
wrapDataSource,
parseBasicAuthHeader,
parserToAHW,
parseAuthorizationHeader,
defaultAuthHeaders,
withAuthDomain,
withAuthDomain'
) where
import Snap.Snaplet.HTTPAuth.Authorise
import Snap.... | anchor/snaplet-httpauth | lib/Snap/Snaplet/HTTPAuth.hs | bsd-3-clause | 380 | 0 | 5 | 69 | 72 | 50 | 22 | 14 | 0 |
{-# Language RankNTypes #-}
module Algo.DebPho where
import Control.Monad.Reader
import Data.Functor.Identity
import Language.Deb
import Language.Pho
var :: v -> Term' Identity v
var = VarM . Identity
ex0 :: Term Identity
ex0 = LamM $ \x -> var x
ex1 :: Term Identity
ex1 = LetM (LamM $ \x -> var x) $ \f -> LamM $ ... | lambdageek/small | src/Algo/DebPho.hs | bsd-3-clause | 1,433 | 0 | 14 | 377 | 718 | 359 | 359 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveTraversable, DeriveFunctor #-}
module Language.Haskell.AST.Exts.GADTSyntax
where
import Data.Data
import Data.Foldable (Foldable)
import Data.Traversable (Traversable)
import Language.Haskell.AST.Core hiding ( TypeDecl )
data TypeDecl asst ty id l
= GDataDe... | jcpetruzza/haskell-ast | src/Language/Haskell/AST/Exts/GADTSyntax.hs | bsd-3-clause | 934 | 0 | 10 | 164 | 325 | 177 | 148 | 16 | 0 |
{-# OPTIONS_GHC -XBangPatterns #-}
-----------------------------------------------------------------------------
-- Module : Math.Statistics
-- Copyright : (c) 2008 Marshall Beddoe
-- License : BSD3
--
-- Maintainer : mbeddoe@<nospam>gmail.com
-- Stability : experimental
-- Portability : portable
--
-- D... | LukeHoersten/hstats | src/Math/Statistics.hs | bsd-3-clause | 5,933 | 0 | 16 | 1,751 | 2,409 | 1,279 | 1,130 | -1 | -1 |
module OneTimePad where
import qualified Playground14 as P14
myPad :: String
myPad = "Shhhhhh"
myPlainText :: String
myPlainText = "Haskell"
applyOTP' :: String -> String -> [P14.Bits]
applyOTP' pad plaintext =
map (\pair -> (fst pair) `P14.xor` (snd pair))
(zip padBits plaintex... | stefanocerruti/haskell-primer-alpha | src/OneTimePad.hs | bsd-3-clause | 1,199 | 0 | 10 | 290 | 400 | 211 | 189 | 32 | 1 |
module Dockerfile where
import System.FilePath
data Dockerfile = Dockerfile {
baseImage :: String,
orderedSteps :: [String]
} deriving (Eq, Show)
class ConstructionStep c where
blueprint :: c -> String
data RunStep = RunStep {
cmdToRun :: String
} deriving (Eq, Show)
... | wayofthepie/riverd | src/lib/Dockerfile.hs | bsd-3-clause | 1,190 | 0 | 9 | 307 | 382 | 202 | 180 | 29 | 1 |
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, PatternGuards #-}
----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.PositionStoreFloat
-- Copyright : (c) Jan Vornberger 2009
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : jan.v... | MasseR/xmonadcontrib | XMonad/Layout/PositionStoreFloat.hs | bsd-3-clause | 3,835 | 0 | 15 | 972 | 754 | 416 | 338 | 45 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.