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 Main (main) where
import qualified Text.Uniqhash as U
import System.IO
main :: IO ()
main = do
hSetBuffering stdin LineBuffering
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
U.main
| sordina/uniqhash | Uniqhash.hs | mit | 224 | 0 | 7 | 39 | 66 | 34 | 32 | 9 | 1 |
{-# LANGUAGE DataKinds #-}
module Data.FixedSize.MatrixSpec (spec) where
import Test.Hspec
import Data.Utils
spec :: Spec
spec = do
mulSpec
rowSpec
columnSpec
indexSpec
transposeSpec
apSpec
generateSpec
mulSpec :: Spec
mulSpec = describe "(<%%>)" $
it "should multiply a matrix by a ... | brunjlar/neural | test/Data/FixedSize/MatrixSpec.hs | mit | 2,206 | 0 | 18 | 651 | 750 | 383 | 367 | 57 | 1 |
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses,
TemplateHaskell, OverloadedStrings, TypeSynonymInstances #-}
import Yesod
import Commands
import Term
import Interpreter
import System.IO.Unsafe
import Data.Text (Text,unpack)
import Control.Applicative ((<$>), (<*>))
import Yesod.Form.Jquery
... | ChrisBlom/Signs | src/Signs/Main.hs | mit | 1,907 | 0 | 12 | 378 | 412 | 224 | 188 | 41 | 2 |
{-# LANGUAGE CPP #-}
{-
Copyright (C) 2010-2014 John MacFarlane <jgm@berkeley.edu>
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 versi... | nickbart1980/pandoc | src/Text/Pandoc/UTF8.hs | gpl-2.0 | 4,066 | 0 | 10 | 1,023 | 652 | 372 | 280 | 58 | 1 |
--
-- Copyright (c) 2012 Citrix Systems, Inc.
--
-- 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.
--
-- This progra... | OpenXT/manager | rpc-proxy/Firewall.hs | gpl-2.0 | 8,678 | 0 | 19 | 2,257 | 2,409 | 1,246 | 1,163 | 147 | 5 |
{-# LANGUAGE TemplateHaskell, FlexibleContexts, FlexibleInstances #-}
{-# language UndecidableInstances, DeriveDataTypeable #-}
{-# language DatatypeContexts #-}
module SCS.Data where
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Set
import Data.Typeable
import Autolib.Xml
class ( Ord a, ToDoc a, Re... | marcellussiegburg/autotool | collection/src/SCS/Data.hs | gpl-2.0 | 826 | 10 | 10 | 181 | 251 | 143 | 108 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Copyright : (c) Felix Gabriel Mance
License : GPLv2 or higher, see LICENSE.txt
Maintainer : f.mance@jacobs-university.de
Stability : provisional
Portability : portable
Instances for some of the functions used in OWL 2... | nevrenato/HetsAlloy | OWL2/Function.hs | gpl-2.0 | 8,383 | 1 | 26 | 2,494 | 2,947 | 1,430 | 1,517 | 175 | 1 |
module Probability.Distribution.ExpTransform where
import Probability.Random
import Probability.Distribution.Normal
import Probability.Distribution.Exponential
import Probability.Distribution.Gamma
import Probability.Distribution.Laplace
import Probability.Distribution.Cauchy
-- This contains exp-transformed function... | bredelings/BAli-Phy | haskell/Probability/Distribution/ExpTransform.hs | gpl-2.0 | 852 | 0 | 13 | 155 | 262 | 134 | 128 | 21 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | source/File/IOS.hs | gpl-3.0 | 3,412 | 0 | 18 | 926 | 631 | 335 | 296 | 57 | 2 |
module Types (Compiled(..)) where
import System.IO
data Compiled = Compiled FilePath
| CompileError String
| tehmatt/Chankillo | src/types.hs | gpl-3.0 | 115 | 0 | 6 | 22 | 32 | 20 | 12 | 4 | 0 |
module Eval (evalExpr) where
import ErrorHandling (AssemblyState(..))
import Parser (Expr(..), getOp)
import Pass2 (SymbolTable)
import Data.Bits (complement)
import Text.ParserCombinators.Parsec (parse)
evalExpr :: SymbolTable -> Int -> Expr -> AssemblyState Integer
evalExpr symTable lineNum e = case e of
Str s ... | adamsmasher/EMA | Eval.hs | gpl-3.0 | 951 | 0 | 13 | 277 | 348 | 170 | 178 | 24 | 9 |
{-
All the Flow Youβd Expect
Python knows the usual control flow statements that other languages speak β
if, for, while and range β with some of its own twists, of course.
# For loop on a list
>>> numbers = [2, 4, 6, 8]
>>> product = 1
>>> for number in numbers:
... product = produc... | cblp/python5 | examples/control.hs | gpl-3.0 | 626 | 0 | 10 | 190 | 73 | 39 | 34 | 6 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
----... | oldmanmike/opensandbox | src/OpenSandbox/Protocol/Types.hs | gpl-3.0 | 33,551 | 0 | 18 | 8,302 | 10,218 | 5,106 | 5,112 | 1,441 | 4 |
--problem 36
{--
The decimal number, 585 = 1001001001_(2) (binary), is palindromic in both bases.
Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.
--}
import Numeric
import Char
showBin x = showIntAtBase 2 intToDigit x ""
palindrome x = x == (reverse x)
palindrome2 = pa... | goalieca/haskelling | 036.hs | gpl-3.0 | 549 | 0 | 10 | 100 | 122 | 64 | 58 | 8 | 1 |
module Cegt.Syntax where
-- import Control.Monad.State.Lazy
-- import Control.Monad.Reader
import Data.Char
import qualified Data.Set as S
import Data.List hiding (partition)
import Text.Parsec
import Text.Parsec.Pos
type Name = String
-- merge prog, kind, type into one syntactic category.
data Exp = Var Name
... | Fermat/CEGT | src/Cegt/Syntax.hs | gpl-3.0 | 5,184 | 0 | 7 | 1,437 | 280 | 217 | 63 | 20 | 0 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Main where
import Control.Monad
import Control.Monad.State
import Control.Applicative((<$>),(<*>))
import Control.Arrow
import Data.Maybe
import Data.List as L
import Data.Map as M
import Data.Set as S
import qualified Data.ByteString as B
import Data.Function
imp... | DanielSchuessler/logic-TPTP | testing/ParseRandom.hs | gpl-3.0 | 967 | 0 | 12 | 138 | 255 | 150 | 105 | 34 | 1 |
module PriorityQueue (
PriorityQueue(Empty),
makeNode,
peek,
enqueue,
enqueueList,
dequeue
) where
import Data.Maybe
data PriorityQueue a = PQNode a (PriorityQueue a) (PriorityQueue a) Int Int
| Empty
deriving (Show,Eq)
makeNode :: (Ord a) => a -> (PriorityQueue a) -> (PriorityQueue a) -> (PriorityQueue ... | joelwilliamson/Haskell_Learning | PriorityQueue.hs | gpl-3.0 | 2,936 | 62 | 13 | 605 | 1,221 | 648 | 573 | 74 | 3 |
-- The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
-- Find the sum of all the primes below two million.
main :: IO ()
main = putStrLn $ show . sum $ takeWhile (<2000000) primes
primes :: [Int]
primes = filter isPrime (2:[3,5..])
divides :: Int -> Int -> Bool
divides x d = (mod x d) == 0
isPrime :: Int -> Bool... | peri4n/projecteuler | haskell/problem10.hs | gpl-3.0 | 394 | 0 | 12 | 90 | 161 | 86 | 75 | 8 | 1 |
lucky :: (Integral a) => a -> String --pattern matching
lucky 7 = "Lucky number seven!"
lucky x = "Better luck next time..."
identityBoundFive :: (Integral a) => a -> String
identityBoundFive 1 = "One"
identityBoundFive 2 = "Two"
identityBoundFive 3 = "Three"
identityBoundFive 4 = "Four"
identityBoundFive 5 = "Five"
i... | torchhound/projects | haskell/syntaxInFunctions.hs | gpl-3.0 | 3,713 | 11 | 11 | 945 | 1,788 | 947 | 841 | 101 | 3 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module GUI.RSCoin.WalletTab
( createWalletTab
, initWalletTab
, updateWalletTab
) where
import Control.Monad (join, void, when)
import qualified Data.IntMap.Strict as M
import ... | input-output-hk/rscoin-haskell | src/User/GUI/RSCoin/WalletTab.hs | gpl-3.0 | 10,890 | 0 | 25 | 3,729 | 2,655 | 1,337 | 1,318 | -1 | -1 |
{-
Copyright (C) 2014 Albert Krewinkel <tarleb+metropolis@moltkeplatz.de>
This program 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 versio... | tarleb/rundoc | tests/rundoc-tests.hs | agpl-3.0 | 940 | 0 | 7 | 158 | 58 | 35 | 23 | 8 | 1 |
-- | Module for logging.
module Text.Logging (
LogLevel(..),
logg,
loggUnsafe,
setLogFile,
) where
import Data.IORef
import qualified Data.ByteString as SBS
import qualified Data.ByteString.UTF8 as SBS
import Control.Monad
import Control.Monad.IO.Class
import System.Info
import System.FilePath
i... | cstrahan/nikki | src/Text/Logging.hs | lgpl-3.0 | 1,752 | 0 | 17 | 409 | 503 | 264 | 239 | 51 | 3 |
module Git.Index (
Index(..),
loadIndex, indexTree
) where
import System.IO
import System.FilePath
import Control.Monad
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as B8
import Control.Applicative
import Data.Attoparsec
import qualified Data.Attoparsec.ByteString as AP (ta... | wereHamster/yag | Git/Index.hs | unlicense | 5,343 | 0 | 19 | 1,183 | 1,221 | 667 | 554 | 95 | 2 |
module KthDifferences.A999996 () where
import External.A174344 (a174344)
import Miscellaneous.A268038 (a268038)
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Maybe (Maybe, mapMaybe)
import Data.Ratio (Ratio, (%))
import Sandbox.SegmentIntersection (intersects, pointIsOnLine)
-- type KthDifferences... | peterokagey/haskellOEIS | src/Sandbox/GreedySpiralSequences/FirstDifferencesNonintersecting.hs | apache-2.0 | 2,171 | 1 | 10 | 399 | 604 | 351 | 253 | 32 | 1 |
{-
Copyright 2010-2012 Cognimeta Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | bitemyapp/perdure | exe-src/Database/Perdure/TestStoreFile.hs | apache-2.0 | 1,378 | 0 | 15 | 263 | 227 | 118 | 109 | 19 | 1 |
{- Copyright 2014 David Farrell <shokku.ra@gmail.com>
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or... | shockkolate/lambdircd | plugins.old/Join.hs | apache-2.0 | 3,055 | 0 | 17 | 646 | 858 | 461 | 397 | 50 | 3 |
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TypeFamilies #-}
-- | Alias analysis for bind expressions.
-- This is used by the interpreter to ensure consistent modification
-- of alias variables following the interpretation of a bind expression.
module Language.K3.Analysis.Interpreter.BindAlias (
labelBindAliase... | yliu120/K3 | src/Language/K3/Analysis/Interpreter/BindAlias.hs | apache-2.0 | 6,665 | 0 | 17 | 1,595 | 2,639 | 1,417 | 1,222 | 106 | 10 |
{-# LANGUAGE CPP #-}
#ifndef MIN_VERSION_integer_gmp
#define MIN_VERSION_integer_gmp(a,b,c) 0
#endif
#if MIN_VERSION_integer_gmp(0,5,1)
{-# LANGUAGE MagicHash, UnboxedTuples, BangPatterns #-}
#endif
-- |
-- Module : Crypto.Number.Serialize
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.... | vincenthz/hs-crypto-numbers | Crypto/Number/Serialize.hs | bsd-2-clause | 5,446 | 0 | 15 | 1,487 | 721 | 400 | 321 | 51 | 4 |
module Core.Topology where
-- base
import Data.List (nub, delete, minimumBy, maximumBy)
import Data.Ord (comparing)
import Control.Monad
-- fgl
import Data.Graph.Inductive.Internal.Queue
-- Classes
class Reversible a where
rev :: a -> a
rev = id
undir :: Reversible a => [a] -> [a]
undir as = as ++ map rev as
s... | wkoiking/fieldequip | src/Core/Topology.hs | bsd-3-clause | 3,873 | 0 | 15 | 976 | 1,732 | 886 | 846 | 88 | 2 |
module Import
( module Import
) where
import ClassyPrelude as Import hiding (parseTime)
import Yesod as Import hiding (Route (..))
import Yesod.Auth as Import
import Text.Julius as Import (rawJS)
import Foundation ... | SimSaladin/rnfssp | Import.hs | bsd-3-clause | 1,057 | 0 | 7 | 426 | 170 | 118 | 52 | -1 | -1 |
-- (c) The University of Glasgow 2006
-- (c) The GRASP/AQUA Project, Glasgow University, 1998
--
-- Type - public interface
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | Main functions for manipulating types and type-related things
module Type (
-- Note some of this is just re-exports from T... | christiaanb/ghc | compiler/types/Type.hs | bsd-3-clause | 66,842 | 0 | 14 | 18,137 | 13,095 | 6,884 | 6,211 | -1 | -1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Diagrams.Swimunit.Axis
where
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
import Diagrams.Swimunit.Base
{-|
Constructs the vertical baseline of height height.
-}
verticaxis :: Double
-> Diagram B
verticaxis hght = vrule hght
... | wherkendell/diagrams-contrib | src/Diagrams/Swimunit/Axis.hs | bsd-3-clause | 3,275 | 0 | 15 | 1,557 | 477 | 264 | 213 | 48 | 2 |
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
-- | Alternative applicative presentation
--
-- http://blog.ezyang.com/2012/08/applicative-functors/
module Applicative where
class Applicative' f where
unit :: f ()
(***) :: f a -> f b -> f (a, b)
instance (... | sleexyz/haskell-fun | Applicative.hs | bsd-3-clause | 501 | 0 | 10 | 111 | 179 | 96 | 83 | 12 | 0 |
module Test.BigOh.Fit.Naive
( Order
, fit
, polyOrder
, deriv
) where
import Test.BigOh.Fit.Base
type Order = Int -- ahahaha
-- | Estimate the polynomial order for some points, given
-- a margin of error.
--
polyOrder :: Double -> [Point] -> Maybe Order
polyOrder epsilon points@(_:_:_:_)
| i... | tranma/big-oh | src/Test/BigOh/Fit/Naive.hs | bsd-3-clause | 1,434 | 0 | 14 | 493 | 466 | 246 | 220 | 41 | 3 |
-- | Results of application of the production rules of a grammar.
{-# LANGUAGE ScopedTypeVariables #-}
module Data.Cfg.RuleApplication(
language,
yields,
directlyYields
) where
import Control.Monad(liftM, msum)
import Control.Monad.Omega
import Data.Cfg.Cfg
import qualified Data.DList as DL
import qual... | nedervold/context-free-grammar | src/Data/Cfg/RuleApplication.hs | bsd-3-clause | 2,256 | 0 | 16 | 632 | 681 | 355 | 326 | 38 | 2 |
{-# LANGUAGE OverloadedStrings,RecordWildCards,TypeSynonymInstances,DeriveDataTypeable #-}
module Data.CrawlerParameters (
CrawlParams(..),MongoParams(..),
_PROGRAM_NAME,_PROGRAM_VERSION,_PROGRAM_INFO,_PROGRAM_ABOUT,_COPYRIGHT,
processParams
) where
import Control.Monad
import Data.Maybe
im... | tkemps/bcbs-crawler | src/Data/CrawlerParameters.hs | bsd-3-clause | 5,604 | 0 | 17 | 1,443 | 1,480 | 766 | 714 | 136 | 10 |
{-# LANGUAGE GeneralizedNewtypeDeriving, ConstraintKinds, PatternGuards #-}
{-# OPTIONS_GHC -O0 #-}
module Idris.Parser(module Idris.Parser,
module Idris.ParseExpr,
module Idris.ParseData,
module Idris.ParseHelpers,
module Idris.ParseOps) w... | BartAdv/Idris-dev | src/Idris/Parser.hs | bsd-3-clause | 57,138 | 439 | 33 | 24,104 | 12,130 | 6,514 | 5,616 | 1,006 | 18 |
module TagSoupHelpers where
import Data.Maybe
import qualified Data.Map as M
import Text.HTML.TagSoup
import Text.StringLike
justSections a = Just . sections a
maybeFirstText :: StringLike str => [Tag str] -> Maybe String
maybeFirstText tags = do
let a1 = sections isTagText tags
a2 <- maybeHead a1
let a3... | rickardlindberg/alldoc | src/TagSoupHelpers.hs | bsd-3-clause | 900 | 0 | 16 | 206 | 351 | 177 | 174 | 25 | 2 |
{-# LANGUAGE Arrows #-}
module Control.Arrow.ArrEff where
import Prelude hiding ((.), id)
import Control.Category
import Control.Arrow
import Control.Monad.Free
type Prod eff b c = (c, ArrEff eff b c)
newtype ArrEff eff b c = ArrEff (b -> eff (Prod eff b c))
instance Monad eff => Category (ArrEff eff) where
id =... | graninas/Andromeda | lib/Control/Arrow/ArrEff.hs | bsd-3-clause | 2,364 | 0 | 15 | 708 | 1,111 | 564 | 547 | 60 | 1 |
----------------------------------------------------------------------------
-- |
-- Module : MainModule
-- Copyright : (c) Sergey Vinokurov 2018
-- License : BSD3-style (see LICENSE)
-- Maintainer : serg.foo@gmail.com
----------------------------------------------------------------------------
module ... | sergv/tags-server | test-data/0011hide_constructor_named_as_type/MainModule.hs | bsd-3-clause | 423 | 0 | 3 | 50 | 17 | 14 | 3 | 3 | 0 |
{-# LANGUAGE FlexibleContexts #-}
-- | Module for UCI protocol.
--
-- This module drives the engine (starts the search) in response to the GUI,
-- and provides the communication between the GUI and the engine using the UCI
-- v2 protocol.
module Chess.UCI
( uci
) where
----------------------------------... | phaul/chess | Chess/UCI.hs | bsd-3-clause | 7,959 | 0 | 21 | 2,296 | 1,821 | 913 | 908 | 163 | 3 |
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, MultiParamTypeClasses, TypeSynonymInstances, PatternGuards #-}
----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Hidden
-- Copyright : (c) Peter Jones 2015
-- License : BSD3-style (see LICENSE)
--... | f1u77y/xmonad-contrib | XMonad/Layout/Hidden.hs | bsd-3-clause | 5,638 | 0 | 14 | 930 | 791 | 428 | 363 | 53 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : System.Mem
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : provisional
-- Portability ... | OS2World/DEV-UTIL-HUGS | libraries/System/Mem.hs | bsd-3-clause | 547 | 2 | 4 | 93 | 35 | 27 | 8 | 4 | 0 |
{-# LANGUAGE GADTs, ExistentialQuantification #-}
{-# LANGUAGE RankNTypes, EmptyDataDecls #-}
import Text.PrettyPrint.Leijen hiding (pretty, list)
{-- GADT TEST:
from "Fun with Phantom Types" - http://www.cs.ox.ac.uk/ralf.hinze/publications/With.pdf
code translated to gadt syntax
@ https://github.com/... | gregor-samsa/hs.test | gadt.hs | bsd-3-clause | 5,671 | 59 | 12 | 1,417 | 2,446 | 1,250 | 1,196 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE FlexibleContexts #-}
module Main (main) where
import Control.DeepSeq
import Criterion.Types
import Criterion.Main
import qualified Data.Vector.Generic as VG
import qualified Data.Vector.Unboxed as VU
import qualif... | ajscholl/primitive-simd | bench/Bench.hs | bsd-3-clause | 16,900 | 0 | 24 | 7,069 | 4,706 | 2,309 | 2,397 | 277 | 2 |
module Main where
import Control.Monad
import Control.Monad.State
import Control.Monad.Exception
import Data.Maybe
import Data.List
import YaLedger.Types
import YaLedger.Kernel
import YaLedger.Main
import YaLedger.Exceptions
import YaLedger.Tests.Instances
import YaLedger.Tests.Correspondence
import qualified YaLedg... | portnov/yaledger | yaledger-tests.hs | bsd-3-clause | 406 | 0 | 6 | 48 | 92 | 57 | 35 | 16 | 1 |
{-# LANGUAGE MagicHash, GADTs, RankNTypes #-}
module Main where
import GHC.Exts
-- Obvious case for contification.
case1_yes :: () -> Int#
case1_yes ()
= let {-# NOINLINE k #-}
k x = 1# +# x
in k 3#
-- Can contify by floating in toward the one call site.
case2_yes :: () -> Int#
case2_yes ()
= let {-... | lukemaurer/sequent-core | examples/FullContification.hs | bsd-3-clause | 3,209 | 0 | 15 | 1,096 | 960 | 518 | 442 | 87 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Sig.Tool.Hackage where
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>))
#endif
import Control.Monad.Catch (MonadThrow, throwM)
import Control.Monad.IO.Class (MonadIO, lift... | commercialhaskell/sig-tool | src/Sig/Tool/Hackage.hs | bsd-3-clause | 2,005 | 0 | 16 | 472 | 500 | 282 | 218 | 51 | 2 |
{-# LANGUAGE MultiParamTypeClasses, ScopedTypeVariables, FlexibleInstances, GADTs
, RecordWildCards, FunctionalDependencies, CPP, TemplateHaskell #-}
module Llvm.Hir.Cast where
import Llvm.Hir.Data.Inst
import Llvm.Hir.Data.Type
import Llvm.Hir.Data.Module
import Data.Int
import Llvm.ErrorLoc
#define FLC (FileLoc $(s... | mlite/hLLVM | src/Llvm/Hir/Cast.hs | bsd-3-clause | 21,068 | 0 | 18 | 5,413 | 7,878 | 3,696 | 4,182 | -1 | -1 |
-- Copyright 2013 Kevin Backhouse.
{-|
The 'OrdCons' instrument uses two passes to implement hash-consing.
The values are added to the table during the first pass and a unique
index for each value is returned during the second pass.
'OrdCons' is implemented using 'Data.Map', so it can be used on any
datatype which is... | kevinbackhouse/Control-Monad-MultiPass | src/Control/Monad/MultiPass/Instrument/OrdCons.hs | bsd-3-clause | 6,785 | 0 | 19 | 1,801 | 1,865 | 956 | 909 | -1 | -1 |
module RomanNumbersKata.Day5Spec (spec) where
import Test.Hspec
import RomanNumbersKata.Day5 (toRomanNumber)
spec :: Spec
spec = do
it "returns an empty string when given 0"
(toRomanNumber 0 == "")
it "returns \"I\" when given 1"
(toRomanNumber 1 == "I")
... | Alex-Diez/haskell-tdd-kata | old-katas/test/RomanNumbersKata/Day5Spec.hs | bsd-3-clause | 878 | 0 | 10 | 313 | 198 | 94 | 104 | 23 | 1 |
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Metas
( goodTeamRatioArbitaryMeta
, goodTeamRatioTwoToLeftMeta
, GoodTeamRatio(..)
) where
import qualified Data.List as L
import Data.Monoid
import System.Environment
-- Notes:
-- - Round indices are 0... | bgwines/avalon-meta-comparison | src/Metas.hs | bsd-3-clause | 9,315 | 0 | 13 | 1,945 | 1,932 | 1,034 | 898 | 141 | 6 |
module Emission (makeEmissionVec, makePolyMap) where
import Prelude hiding (map, elem, product, foldr, zip, (++), length, filter, (!!), iterate, concatMap, all, sum)
import Data.Function (on)
import Data.List.Stream
import Data.Monoid (getAll, All)
import Numeric.Container
import GenoEquiv
import Control.Arrow ((&&&)... | cglazner/ibd_stitch | src/Emission.hs | bsd-3-clause | 2,726 | 0 | 15 | 675 | 948 | 508 | 440 | 48 | 3 |
module Jade.Decode.Val ( getName
, hasIdent
, isLit
, getIndexedName
) where
import Jade.Decode.Types
getName (ValIndex n _) = n
getName (Lit _) = "" -- this is also no good. this should be a Maybe String.
getIndexedName (Val... | drhodes/jade2hdl | jade-decode/src/Jade/Decode/Val.hs | bsd-3-clause | 501 | 0 | 7 | 177 | 150 | 80 | 70 | 13 | 1 |
-- |
-- Module : Control.Optimization.Bits
-- License : BSD3
-- Copyright: [2015..2015] Michael Vollmer, Bo Joel Svensson
-- Maintainer : Michael Vollmer <vollmerm@indiana.edu>
--
--
module Control.Optimization.Bits where
| vollmerm/comb-opt-hs | Control/Optimization/Bits.hs | bsd-3-clause | 224 | 0 | 3 | 31 | 14 | 12 | 2 | 1 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Berp.Base.StdTypes.Dictionary
-- Copyright : (c) 2010 Bernie Pope
-- License : BSD-style
-- Maintainer : florbitous@gmail.com
-- Stability : experimental
-- Portability : ghc
--
-- The standard dictionary type.
... | bjpop/berp | libs/src/Berp/Base/StdTypes/Dictionary.hs | bsd-3-clause | 2,688 | 0 | 14 | 489 | 667 | 369 | 298 | 60 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE UnicodeSyntax #-}
{-|
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] zpl
[@Native name@] East Sola de Vega Zapotec
[@English name@] LachixΓo Zapotec
-}
module Text.Numer... | telser/numerals | src-test/Text/Numeral/Language/ZPL/TestData.hs | bsd-3-clause | 5,302 | 0 | 8 | 1,489 | 1,201 | 803 | 398 | 135 | 1 |
{-# OPTIONS_GHC -Wall #-}
module Reporting.Error.Type where
import qualified Data.Char as Char
import Text.PrettyPrint ((<+>))
import qualified Text.PrettyPrint as P
import qualified AST.Helpers as Help
import qualified AST.Type as Type
import qualified AST.Variable as Var
import qualified Reporting.PrettyPrint as P
... | MaxGabriel/elm-compiler | src/Reporting/Error/Type.hs | bsd-3-clause | 8,898 | 0 | 28 | 2,948 | 1,755 | 931 | 824 | 220 | 25 |
module Codex.Lib.Game.Player (
Player (..),
PlayerType (..),
HumanT (..),
ComputerT (..)
) where
import Codex.Lib.Science.Gender
(Gender (..))
import Codex.Lib.Game.Match
(Stats (..))
data Player a = Player {
_id :: Int,
_type :: PlayerType,
_stats :: Stats,
_history :: [a]
} deriving (Show, Read, Eq)
dat... | adarqui/Codex | src/Codex/Lib/Game/Player.hs | bsd-3-clause | 569 | 0 | 9 | 106 | 217 | 135 | 82 | 25 | 0 |
module System.Build
(
module System.Build.Access
, module System.Build.Compile
, module System.Build.Data
, module System.Build.Java
) where
import System.Build.Access
import System.Build.Compile
import System.Build.Data
import System.Build.Java
| tonymorris/lastik | System/Build.hs | bsd-3-clause | 249 | 0 | 5 | 27 | 60 | 41 | 19 | 10 | 0 |
{-# LANGUAGE ConstraintKinds #-}
-- | Common internal things (no other internal deps)
module Analyze.Common where
import Control.Exception
import Control.Monad (forM_, unless)
import Control.Monad.Catch (MonadThrow (..))
import Data.Hashable (Hashable)
import ... | ejconlon/analyze | src/Analyze/Common.hs | bsd-3-clause | 3,874 | 0 | 17 | 920 | 1,361 | 724 | 637 | 62 | 3 |
-----------------------------------------------------------------------------
--
-- Code generation for foreign calls.
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmForeign (
cgForeignCall, loadThreadState, saveThreadState,... | nomeata/ghc | compiler/codeGen/StgCmmForeign.hs | bsd-3-clause | 15,454 | 0 | 20 | 4,359 | 2,517 | 1,309 | 1,208 | 220 | 6 |
{-|
Module : Idris.Erasure
Description : Utilities to erase stuff not necessary for runtime.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE PatternGuards #-}
module Idris.Erasure (performUsageAnalysis, mkFieldName) where
import Idris.AbsSyntax
import Idris.ASTUtils
import Idr... | uuhan/Idris-dev | src/Idris/Erasure.hs | bsd-3-clause | 27,202 | 627 | 14 | 8,210 | 6,728 | 3,692 | 3,036 | 353 | 52 |
module Hate.Events
( initialEventsState
, setCallbacks
, fetchEvents
, allowedEvent
, module Hate.Events.Types
)
where
import qualified Graphics.UI.GLFW as GLFW
import Control.Concurrent.STM (TQueue, atomically, newTQueueIO, tryReadTQueue, writeTQueue)
import Hate.Events.Types
... | bananu7/Hate | src/Hate/Events.hs | mit | 6,335 | 0 | 14 | 2,167 | 1,556 | 759 | 797 | 83 | 2 |
module Data.Wright.CIE.Illuminant.F11 (f11) where
import Data.Wright.Types (Model)
import Data.Wright.CIE.Illuminant.Environment (environment)
f11 :: Model
f11 = environment (0.38052, 0.37713) | fmap-archive/wright | src/Data/Wright/CIE/Illuminant/F11.hs | mit | 194 | 0 | 6 | 19 | 57 | 37 | 20 | 5 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeMyUserProfile.hs | mpl-2.0 | 4,318 | 0 | 13 | 865 | 494 | 297 | 197 | 70 | 1 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Riak.Protocol.GetClientIDRequest (GetClientIDRequest(..)) where
import Prelude ((+), (/), (++), (.))
import qualified Prelude as Prel... | tmcgilchrist/riak-haskell-client | protobuf/src/Network/Riak/Protocol/GetClientIDRequest.hs | apache-2.0 | 3,139 | 1 | 17 | 605 | 648 | 344 | 304 | 58 | 0 |
{-# LANGUAGE ScopedTypeVariables, DataKinds, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, UndecidableInstances, TemplateHaskell #-}
{-|
This module defines a routine for determining structural containment on a type
variable and set of constraints. This routine is used to define the "within"
opera... | DaMSL/K3 | src/Language/K3/TypeSystem/Within.hs | apache-2.0 | 10,449 | 0 | 19 | 2,911 | 2,764 | 1,450 | 1,314 | 215 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Make changes to the stack yaml file
module Stack.ConfigCmd
(ConfigCmdSet(..)
,cfgCmdSet
,cfgCmdSetName
,cfgCmdName) where
import Control.Monad.Catch (MonadMask, throwM)... | AndrewRademacher/stack | src/Stack/ConfigCmd.hs | bsd-3-clause | 2,210 | 0 | 13 | 625 | 426 | 236 | 190 | 56 | 1 |
module B1.Program.Chart.Dirty
( Dirty(..)
) where
type Dirty = Bool
| madjestic/b1 | src/B1/Program/Chart/Dirty.hs | bsd-3-clause | 73 | 0 | 5 | 15 | 23 | 16 | 7 | 3 | 0 |
{-# LANGUAGE DeriveGeneric #-}
-- | The type of kinds of game modes.
module Game.LambdaHack.Content.ModeKind
( Caves, Roster(..), Player(..), ModeKind(..), LeaderMode(..), AutoLeader(..)
, Outcome(..), HiIndeterminant(..), HiCondPoly, HiSummand, HiPolynomial
, validateSingleModeKind, validateAllModeKind
) where... | Concomitant/LambdaHack | Game/LambdaHack/Content/ModeKind.hs | bsd-3-clause | 7,476 | 0 | 16 | 1,852 | 1,265 | 743 | 522 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.Monitors.MPD
-- Copyright : (c) Jose A Ortega Ruiz
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jose A Ortega Ruiz <jao@gnu.org>
-- Stability : unstable
-- Portability : unportable
--
--... | bysy/xmobar | src/Plugins/Monitors/MPD.hs | bsd-3-clause | 4,616 | 0 | 14 | 1,153 | 1,699 | 907 | 792 | 104 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module RedBlackSet where
import Test.SmartCheck(SubTypes)
import GHC.Generics
import Data.Typeable
import Prelude hiding (max)
data Color =
R -- red
| B -- black
| BB -- double black
| NB -- negative black
deriving (Show, Read, Typeable, Ge... | markus1189/SmartCheck | examples/RedBlackTrees/RedBlackSet.hs | bsd-3-clause | 4,031 | 0 | 10 | 1,304 | 2,311 | 1,147 | 1,164 | 105 | 2 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "dist/dist-sandbox-261cd265/build/System/Posix/User.hs" #-}
{-# LINE 1 "System/Posix/User.hsc" #-}
{-# LANGUAGE Trustworthy, CApiFFI #-}
{-# LINE 2 "System/Posix/User.hsc" #-}
-----------------------------------------------------------------------------
-- |
-- Module : Sys... | phischu/fragnix | tests/packages/scotty/System.Posix.User.hs | bsd-3-clause | 16,733 | 10 | 20 | 3,457 | 2,835 | 1,515 | 1,320 | -1 | -1 |
module TestData where
import Data.IntMap as IMap
import Data.Map.Strict as Map
import Data.Set as Set
data Codegen = C | JS deriving (Show, Eq, Ord)
type Index = Int
data CompatCodegen = ANY | C_CG | NODE_CG | NONE
-- A TestFamily groups tests that share the same theme
data TestFamily = TestFamily {
-- A shorter l... | markuspf/Idris-dev | test/TestData.hs | bsd-3-clause | 7,947 | 0 | 13 | 3,512 | 2,924 | 1,907 | 1,017 | 296 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE CPP #-}
module Control.Distributed.Process.Serializable
( Serializable
, encodeFingerprint
, decodeFingerprint
, fingerprint
, sizeOfFingerprint
, Fingerpri... | qnikst/distributed-process | src/Control/Distributed/Process/Serializable.hs | bsd-3-clause | 2,930 | 1 | 13 | 587 | 557 | 313 | 244 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.BufferedPipeReader
-- Copyright : (c) Jochen Keil
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jochen Keil <jochen dot keil at gmail dot com>
-- Stability : unstable
-- Portability : unp... | tsiliakis/xmobar | src/Plugins/BufferedPipeReader.hs | bsd-3-clause | 2,783 | 0 | 19 | 917 | 888 | 452 | 436 | 54 | 1 |
<?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="sr-CS">
<title>Directory List v1.0</title>
<maps>
<homeID>directorylistv1</homeID>
<map... | thc202/zap-extensions | addOns/directorylistv1/src/main/javahelp/help_sr_CS/helpset_sr_CS.hs | apache-2.0 | 976 | 78 | 66 | 157 | 412 | 209 | 203 | -1 | -1 |
module Abs where
import PointlessP.Combinators
import PointlessP.Functors
import PointlessP.Isomorphisms
import PointlessP.RecursionPatterns
fun = app .
(((curry (curry (curry ((snd . fst) . fst)))) .
bang) /\
id)
| kmate/HaRe | old/testing/pointwiseToPointfree/AbsAST.hs | bsd-3-clause | 238 | 6 | 19 | 51 | 85 | 48 | 37 | 9 | 1 |
import StackTest
main :: IO ()
main = do
stack ["--version"]
stack ["--help"]
stack ["unpack", "acme-missiles-0.2"]
stack ["unpack", "acme-missiles"]
stackErr ["command-does-not-exist"]
stackErr ["unpack", "invalid-package-name-"]
stackErr ["build"]
doesNotExist "stack.yaml"
stack ... | phadej/stack | test/integration/tests/sanity/Main.hs | bsd-3-clause | 362 | 0 | 8 | 70 | 112 | 54 | 58 | 12 | 1 |
-- File : Card.hs
-- Author : Peter Schachte
-- Purpose : An implementation of a playing card type
-- | This code implements a playing card type, including types for
-- ranks and suits. All three types are in the Eq, Ord, Bounded,
-- Enum, Show, and Read classes. Note that we use a compact
-- format ... | CIS-UoM/assignments | COMP90048 Declarative Programming/haskell/2/Card.hs | mit | 2,600 | 0 | 11 | 723 | 665 | 363 | 302 | 43 | 2 |
import Primes
nmax = 1000000
factorizer = makeFactorizer nmax
factorize = runFactorization factorizer
phi = map (phiFold . factorize) [2..nmax]
answer = sum phi
| arekfu/project_euler | p0072/p0072.hs | mit | 166 | 0 | 7 | 29 | 55 | 29 | 26 | 6 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
-- syslogclient
module Main where
import Control.Monad
import Data.Bits
import Data.ByteString hiding (head, pack, unpack)
import Data.ByteString.Char8 hiding (head, length)
import Netw... | JoshuaGross/haskell-learning-log | Code/SyslogClient/src/Main.hs | mit | 2,748 | 0 | 17 | 911 | 645 | 341 | 304 | 55 | 2 |
module DP where
| vladfi1/hs-misc | DP.hs | mit | 18 | 0 | 2 | 5 | 4 | 3 | 1 | 1 | 0 |
module Util.Monad where
-- | Apply monadic computations to a value in sequence, returning the final result of passing the value through the pipeline
(~>) :: (Monad m) => a -> [(a -> m a)] -> m a
(~>) a [] = return a
a ~> (f:fs) = do f a >>= (~> fs)
unfoldrM :: (Monad m) => (b -> m (Maybe (a, b))) -> b -> m [a]
unfold... | sgord512/Utilities | Util/Monad.hs | mit | 664 | 0 | 14 | 195 | 322 | 163 | 159 | 18 | 2 |
module Compiler.Rum.Compiler.Emitter where
import Control.Monad.Except (ExceptT, forM_, runExceptT, (>=>))
import Control.Monad.State
import Data.Char (isUpper, ord)
import Data.Map (Map)
import qualified Data.Map as Map (fromList, lookup)
import qual... | vrom911/Compiler | src/Compiler/Rum/Compiler/Emitter.hs | mit | 10,858 | 0 | 20 | 2,703 | 3,665 | 1,834 | 1,831 | -1 | -1 |
-- Copyright (c) 2011 Alexander Poluektov (alexander.poluektov@gmail.com)
--
-- Use, modification and distribution are subject to the MIT license
-- (See accompanying file MIT-LICENSE)
import Domino.Game
import Domino.GameState
import Domino.Read
import Domino.Strategy
import Domino.Strategy.Simple
import Domino.Strat... | apoluektov/domino | src/Main.hs | mit | 2,474 | 0 | 17 | 601 | 823 | 404 | 419 | 58 | 5 |
{-# LANGUAGE QuasiQuotes #-}
module WordTests where
import Test.Framework
import qualified Grammar.Greek.Morph.Phoneme.Round as Round
import Grammar.Greek.Morph.QuasiQuoters
import Grammar.Greek.Morph.Types
import Grammar.Test.Round
coreWordPhonemeRound = testGroup "coreWordPhonemeRound" $ fmap (uncurry $ testRoundI... | ancientlanguage/haskell-analysis | greek-morph/test/WordTests.hs | mit | 446 | 0 | 10 | 46 | 74 | 48 | 26 | 9 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wall #-}
-----------------------------------------------------------------------------
-- |
-- module : Data.GF2
-- Copyright : (c) 2017 Naoyuki MORITA
-- License : MIT
--
-- Maintainer : naoyuki.morita@gmail.com
-- Stability : ... | naohaq/gf256-hs | src/Data/GF2.hs | mit | 1,968 | 0 | 9 | 425 | 528 | 288 | 240 | 37 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module FaveGraph(recommendPhotographer, recordFave, recordFollow, FaveRecord, PhotographerId, FavedById, FaveRating, PhotoId, FollowRecord, perform) where
import WeightedSlopeOne
import Database.Neo4j
import qualified Data.HashMap.Lazy as M
import qualified Data.Text as T
import Data.... | kailuowang/BeautifulMinds | src/FaveGraph.hs | mit | 3,967 | 0 | 18 | 857 | 1,085 | 554 | 531 | 81 | 2 |
module Render where
import SDL
| wowofbob/circles | src/Render.hs | mit | 34 | 0 | 3 | 8 | 7 | 5 | 2 | 2 | 0 |
{-# LANGUAGE UnicodeSyntax #-}
module Main where
infixr 9 β
type Proc = IO ()
(β) β· (a β b) β a β b
identity β· a β a
dump β· String β Proc
hello β· Proc
main β· Proc
a β b = a b
identity = id
dump "" = putStrLn ""
dump x = putStrLn x
hello = identity β dump β identity β "δ½ ε₯½δΈη"
main = do
foo β hello
bar β hell... | sgtest/haskell-simple-tests | src/Main.hs | mit | 433 | 0 | 9 | 107 | 176 | 92 | 84 | 20 | 1 |
{-# LANGUAGE OverloadedStrings, ViewPatterns #-}
module Y2017.M11.D07.Solution where
{--
Yesterday's exercise we read in a set of scored documents; the exercise before,
we parsed a set of keywords associated with articles.
Today continues the parsing exercises. This time we're parsing JSON, so it
'should' be easy.... | geophf/1HaskellADay | exercises/HAD/Y2017/M11/D07/Solution.hs | mit | 4,380 | 0 | 17 | 1,039 | 824 | 459 | 365 | -1 | -1 |
{-# LANGUAGE TupleSections #-}
module Pd.Master
( Score
, Steps
, playN
, play2
, table
) where
import Control.Arrow (second)
import Data.Function (on)
import Data.List (foldl')
import Data.Map.Strict ((!))
import qualified Data.Map.Strict as M
import Pd.Agents.Core
type Id = Int
type Sco... | atlaua/prisoners-dilemma | Pd/Master.hs | mit | 2,076 | 0 | 11 | 485 | 899 | 513 | 386 | 48 | 2 |
{-# OPTIONS_GHC -ddump-splices #-}
module Types where
import SqlFieldTypes
import Control.Applicative
import qualified Data.Csv as Csv
import Data.Csv ((.:))
import Data.Text
import Database.Persist
import Database.Persist.Class
import Database.Persist.Types
import Database.Persist.TH (mkPersist, mkMigrate, persistLo... | rdlester/meap-analysis | failed_src/Types.hs | mit | 2,770 | 0 | 27 | 620 | 560 | 287 | 273 | -1 | -1 |
-- | A data type representing the Bower.json package description file, together
-- with a parser and related functions.
--
-- This code is based on the specification at
-- <https://github.com/bower/bower.json-spec>.
module Web.Bower.PackageMeta
(
-- * Data types
PackageMeta(..)
, PackageName
, runPackageNam... | hdgarrood/bower-json | src/Web/Bower/PackageMeta.hs | mit | 719 | 0 | 5 | 138 | 118 | 84 | 34 | 24 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
module Codec.Xlsx.Types.SheetViews (
-- * Structured type to construct 'SheetViews'
SheetView(..)
, Selection(..)
, Pane(..)
, SheetViewType(..)
, ... | qrilka/xlsx | src/Codec/Xlsx/Types/SheetViews.hs | mit | 23,436 | 0 | 15 | 5,421 | 2,898 | 1,572 | 1,326 | 321 | 0 |
{- |
module: $Header$
description: Names in a hierarchical namespace
license: MIT
maintainer: Joe Leslie-Hurd <joe@gilith.com>
stability: provisional
portability: portable
-}
module HOL.Name
where
import qualified Data.Char as Char
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import Data.S... | gilith/hol | src/HOL/Name.hs | mit | 2,990 | 0 | 12 | 437 | 614 | 350 | 264 | 52 | 3 |
import Control.Monad (msum)
import Control.Applicative ((<$>))
import Data.Maybe (fromJust)
import Data.List (nub)
import Memoize (memoize)
import Data.Functor ((<$))
smallestInt :: Int -> Int
smallestInt size = fromJust . msum $ map keepIfDecomposable [size ..]
where
keepIfDecomposable n = n <$ decompose size... | afiodorov/projectEuler | 88.hs | mit | 1,144 | 0 | 11 | 288 | 501 | 264 | 237 | 26 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
-- | We use our own functions for throwing exceptions in order to get
-- the actual error message via 'zmq_strerror'. 0MQ defines additional
-- error numbers besides those defined by the operating system, so
-- 'zmq_strerror' should be used in preference to 'strerror' which is
-- us... | twittner/zeromq-haskell | src/System/ZMQ4/Internal/Error.hs | mit | 3,573 | 0 | 12 | 795 | 1,158 | 593 | 565 | 68 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.