code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DeriveFunctor #-}
module Blog.Types where
import Text.Pandoc
import Data.Monoid
import Data.Maybe (fromJust)
import System.Locale
import System.Time
import System.Time.ParseDate (parseCalendarTime)
-- | A simple data type representing a post.
data Post a = Post { slug :: String
, meta... | athanclark/deconfigured | src/Blog/Types.hs | bsd-3-clause | 1,347 | 0 | 11 | 410 | 487 | 275 | 212 | 31 | 3 |
{-# LANGUAGE PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.CSL.Proc.Collapse
-- Copyright : (c) Andrea Rossato
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Andrea Rossato <andrea.rossato@unitn.it>
-- Stability : unstab... | jkr/pandoc-citeproc | src/Text/CSL/Proc/Collapse.hs | bsd-3-clause | 9,339 | 0 | 20 | 3,625 | 2,928 | 1,510 | 1,418 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : System.Win32.Com.ClassFactory
-- Copyright : (c) Sigbjorn Finne <sof@dcs.gla.ac.uk> 1998-99
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : sof@forkIO.com
-- Stability : pro... | HJvT/com | System/Win32/Com/ClassFactory.hs | bsd-3-clause | 3,128 | 0 | 16 | 728 | 819 | 415 | 404 | 62 | 2 |
module Sexy.Classes (module X) where
import Sexy.Classes.BoolC as X
import Sexy.Classes.OrderingC as X
import Sexy.Classes.MaybeC as X
import Sexy.Classes.EitherC as X
import Sexy.Classes.Empty as X
import Sexy.Classes.DesnocMay as X
import Sexy.Classes.Show as X
import Sexy.Classes.FromInteger as X
import Sexy.Clas... | DanBurton/sexy | src/Sexy/Classes.hs | bsd-3-clause | 748 | 0 | 4 | 96 | 188 | 140 | 48 | 23 | 0 |
-- {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DataKinds, GADTs, TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FunctionalDependencies #-}
module HBLAS.BLAS.Level1Spec (main, spec) where
import Data.Complex
import Numerical... | wellposed/hblas | tests/HBLAS/BLAS/Level1Spec.hs | bsd-3-clause | 15,571 | 0 | 15 | 3,323 | 5,115 | 2,712 | 2,403 | 304 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE PolyKinds #-}
module Language.BCoPL.TypeLevel.Not where
data Absurd
type Not a = a -> Absurd
| nobsun/hs-bcopl | src/Language/BCoPL/TypeLevel/Not.hs | bsd-3-clause | 167 | 0 | 5 | 26 | 25 | 18 | 7 | -1 | -1 |
{-# LANGUAGE PackageImports #-}
module Debug.Trace (module M) where
import "base" Debug.Trace as M
| silkapp/base-noprelude | src/Debug/Trace.hs | bsd-3-clause | 104 | 0 | 4 | 18 | 21 | 15 | 6 | 3 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Ty... | mainland/nikola | tests/unit/Main.hs | bsd-3-clause | 11,262 | 0 | 16 | 3,175 | 4,367 | 2,342 | 2,025 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
module DockerCompose.API where
import Data.Proxy
import ... | amarpotghan/docker-compose-dsl | src/DockerCompose/API.hs | bsd-3-clause | 783 | 0 | 6 | 179 | 210 | 135 | 75 | -1 | -1 |
(>>=) :: IO a -> (a -> IO b) -> IO b | gahara/parsers-for-dummies | test4.hs | bsd-3-clause | 36 | 0 | 9 | 11 | 32 | 16 | 16 | 1 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
module HaskellCI.Config.HLint where
import HaskellCI.Prelude
import Distribution.Version (withinVersion)
import qualified Distribution.Compat.CharParsing as C
import qualified D... | hvr/multi-ghc-travis | src/HaskellCI/Config/HLint.hs | bsd-3-clause | 2,992 | 0 | 20 | 653 | 533 | 290 | 243 | -1 | -1 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes, DataKinds, TypeOperators
, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses
, TypeFamilies #-}
-- | An implementation of the base and derived SI units, as well as
-- numeric prefixes.
module Units.SI where
import Units
import Units.TH
import qualified Unit... | haasn/units | src/Units/SI.hs | bsd-3-clause | 4,642 | 0 | 9 | 1,103 | 1,097 | 635 | 462 | 78 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Main wher... | Soostone/hs-d3 | bench/Bench.hs | bsd-3-clause | 5,528 | 0 | 16 | 1,616 | 1,949 | 1,093 | 856 | 115 | 2 |
-- {-# OPTIONS_GHC -fprof-auto #-}
-- | Display game data on the screen using one of the available frontends
-- (determined at compile time with cabal flags).
module Game.LambdaHack.Client.UI.DrawM
( targetDesc, targetDescXhair, drawHudFrame
, checkWarningHP, checkWarningCalm
#ifdef EXPOSE_INTERNAL
-- * Interna... | LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/DrawM.hs | bsd-3-clause | 40,532 | 0 | 30 | 12,723 | 10,934 | 5,529 | 5,405 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Blc.Types
( module Blc.Types
, module Bl... | hectorhon/autotrace2 | app/Blc/Types.hs | bsd-3-clause | 4,994 | 0 | 16 | 2,036 | 891 | 454 | 437 | 90 | 0 |
-- A Virtual Conifer
--
-- Introduction
--
-- This project is to model a conifer as the expression of a set of "genes",
-- i.e. parameters that control lengths and angles and such, and to draw
-- a picture of it.
--
-- We'll start with a generic data structure and combinators to apply
-- functions to tree components in... | bobgru/conifer | src/Conifer.hs | bsd-3-clause | 14,389 | 0 | 13 | 3,991 | 4,410 | 2,401 | 2,009 | 216 | 3 |
{-# LANGUAGE ViewPatterns, TemplateHaskell, TypeFamilies, UndecidableInstances #-}
-- based on experiment 5 and 8, we try to find the best interpretation of output by making a tournament between constraint sets.
-- the evolution objects are constraint sets. we favor smaller sets so there is small penalty for them being... | Tener/deeplearning-thesis | src/gg-exp9.hs | bsd-3-clause | 5,741 | 0 | 21 | 1,313 | 1,431 | 750 | 681 | 129 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
-- | /WARNING/: This module is /not/ intended for use outside the TagSoup library.
--
-- This module provides an abstraction for String's as used inside TagSoup. It allows
-- TagSoup to work with String (list of Char), ByteString.Char8, ByteString.Lazy.Char8... | silkapp/tagsoup | Text/StringLike.hs | bsd-3-clause | 2,652 | 0 | 9 | 693 | 611 | 359 | 252 | 70 | 1 |
-- create a dtree by hypergraph partitioning
{-# LANGUAGE BangPatterns #-}
module DTreeHGP ( dtreeFromDimacs
, singleListElement
, DTree ( DNode, DLeaf )
, dtreeVars
, DTreevs ( DNodevs , DLeafvs )
, dvars
, printDTreeCutset... | malie/drolesat | DTreeHGP.hs | bsd-3-clause | 6,579 | 0 | 20 | 2,236 | 2,172 | 1,121 | 1,051 | 158 | 8 |
module Cardano.Wallet.WalletLayer.ExecutionTimeLimit (
limitExecutionTimeTo
, TimeExecutionLimit(..)
) where
import Universum
import Formatting (bprint, shown, (%))
import qualified Formatting.Buildable
import Test.QuickCheck (Arbitrary (..), Gen, Positive (..))
import ... | input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/WalletLayer/ExecutionTimeLimit.hs | mit | 1,666 | 0 | 16 | 431 | 417 | 228 | 189 | 34 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Metainfo.Provider
-- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GNU-GPL
--
-- Maintainer : <maintainer at... | juhp/leksah | src/IDE/Metainfo/Provider.hs | gpl-2.0 | 40,073 | 0 | 32 | 14,167 | 9,413 | 4,792 | 4,621 | 715 | 8 |
{-| Provides interface to the 'zlib' library.
-}
{-
Copyright (C) 2014 Google 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 ve... | kawamuray/ganeti | src/Ganeti/Codec.hs | gpl-2.0 | 1,667 | 0 | 10 | 358 | 189 | 114 | 75 | 19 | 1 |
module PathFind (findPath, dijkstra, aStar) where
import qualified PathFind.Dijkstra as D
import qualified PathFind.AStar as A
data FindPathAlgorithm = Dijkstra | AStar
findPath Dijkstra = D.findPath
findPath AStar = A.findPath
dijkstra = Dijkstra
aStar = AStar | graninas/The-Amoeba-World | src/Amoeba/Test/Experiments/ModuleAbstraction/PathFind.hs | gpl-3.0 | 265 | 0 | 5 | 39 | 71 | 44 | 27 | 8 | 1 |
module ExprDoPat1 where
main :: Int
main = unsafePerformIO (
do
(x:_) <- return [1, 2, 3]
return x
) | roberth/uu-helium | test/correct/ExprDoPat1.hs | gpl-3.0 | 125 | 0 | 11 | 44 | 52 | 28 | 24 | 6 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecursiveDo #-}
module Main where
import Control.Monad.Fix
import Data.Maybe
import qualified Data.Map as Map
import Reflex
import Reflex.EventWriter.Base
import Reflex.Network
import Reflex.Patch.MapWithMove
import Te... | ryantrinkle/reflex | test/Adjustable.hs | bsd-3-clause | 1,972 | 0 | 22 | 448 | 532 | 283 | 249 | 50 | 4 |
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-}
module Network.Wai.Handler.Warp.Header where
import Data.Array
import Data.Array.ST
import qualified Data.ByteString as BS
import Data.CaseInsensitive (foldedCase)
import Network.HTTP.Types
import Network.Wai.Handler.Warp.Types
-----------------------------------... | kazu-yamamoto/wai | warp/Network/Wai/Handler/Warp/Header.hs | mit | 3,836 | 0 | 11 | 952 | 849 | 461 | 388 | 69 | 21 |
module Queens (boardString, canAttack) where
type Position = (Int, Int)
boardString :: Maybe Position -> Maybe Position -> String
boardString w b = concatMap rowString [0..7]
where
rowString row = concatMap (tileString row) [0..7]
tileString row col = [tileChar (row, col), tileSep col]
tileSep 7 = '\n'
... | pminten/xhaskell | queen-attack/example.hs | mit | 665 | 0 | 11 | 189 | 275 | 143 | 132 | 19 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE Trustworthy #-} -- can't use Safe due to IsList instance
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.List.NonEmpty
-- Copyright : (C) 2011-2015 ... | rahulmutt/ghcvm | libraries/base/Data/List/NonEmpty.hs | bsd-3-clause | 17,509 | 0 | 13 | 4,374 | 3,736 | 2,066 | 1,670 | 213 | 2 |
module FunIn6 where
foo = h + t
where (h, t) = head $ (zip [1 .. 10] [3 .. 10])
main :: Int
main = foo + foo
| kmate/HaRe | old/testing/rmOneParameter/FunIn6_AstOut.hs | bsd-3-clause | 116 | 0 | 10 | 36 | 65 | 38 | 27 | 5 | 1 |
import Criterion.Main
fib :: Int -> Integer
fib n = fib' !! n
where fib' = 1:1:zipWith (+) fib' (tail fib')
main :: IO ()
main = defaultMain [
bgroup "bloh" [
bench "takie tam" $ whnf fib 100
]
]
| kgadek/hs_template | aBench.hs | mit | 218 | 0 | 10 | 63 | 102 | 51 | 51 | 8 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module DCC ( module Network.IRC.DCC
, DccIO
, runDccIO
, Env(..)
, Status(..)
, offerRec... | JanGe/xdcc | src/DCC.hs | mit | 8,545 | 0 | 17 | 2,814 | 2,485 | 1,252 | 1,233 | 198 | 4 |
{-# htermination (>=) :: (Ord a, Ord k) => (Either a k) -> (Either a k) -> Bool #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_GTEQ_10.hs | mit | 84 | 0 | 2 | 19 | 3 | 2 | 1 | 1 | 0 |
module System.Console.Docopt.Public
(
-- * Command line arguments parsers
parseArgs
, parseArgsOrExit
-- *** Re-exported from Parsec
, ParseError
-- * Parsed usage string
, Docopt ()
, usage
, exitWithUsage
, exitWithUsageMessage
-- * Argument lookup
, Option()
... | ethercrow/docopt.hs | System/Console/Docopt/Public.hs | mit | 5,943 | 0 | 15 | 1,402 | 1,199 | 646 | 553 | 121 | 6 |
module Chess.FigureMoves where
import Chess.Color
import Chess.Figure
import Chess.Field
-- | Sequences of relative figure positions for rook moves.
rookMoves = [([1..],repeat 0),
([-1,-2..],repeat 0),
(repeat 0,[1..]),
(repeat 0, [-1,-2..])]
-- | Sequences of relative figure p... | grzegorzbalcerek/chess-haskell | Chess/FigureMoves.hs | mit | 4,609 | 0 | 10 | 867 | 998 | 580 | 418 | 39 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : LinearRegression
Description : Gradient Descent
Copyright : (c) Fabrício Olivetti, 2017
License : GPL-3
Maintainer : fabricio.olivetti@gmail.com
Applies gradient descent to a linear regression problem.
-}
module Main where
imp... | folivetti/BIGDATA | 08 - Classificação/TestNBPar.hs | mit | 1,028 | 0 | 11 | 226 | 253 | 127 | 126 | 27 | 1 |
{-# LANGUAGE ScopedTypeVariables, TemplateHaskell #-}
module Sort_InsertionSort where
import Test.QuickCheck
import Test.QuickCheck.Poly
import Test.QuickCheck.All
import Data.List( sort, delete )
--------------------------------------------------------------------------------
isort :: Ord a => [a] -> [a]
isort [] ... | koengit/induction-examples | Sort_InsertionSort.hs | mit | 1,570 | 0 | 8 | 326 | 580 | 304 | 276 | 34 | 1 |
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE... | rubenmoor/skull | skull-server/src/HttpApp/Model.hs | mit | 2,323 | 0 | 7 | 1,062 | 207 | 133 | 74 | 28 | 0 |
import Control.Monad
import Data.Monoid
import Test.QuickCheck
monoidAssoc :: (Eq m, Monoid m) => m -> m -> m -> Bool
monoidAssoc a b c = (a <> (b <> c)) == ((a <> b) <> c)
monoidLeftIdentity :: (Eq m, Monoid m) => m -> Bool
monoidLeftIdentity a = (mempty <> a) == a
monoidRightIdentity :: (Eq m, Monoid m) => m -> Bo... | diminishedprime/.org | reading-list/haskell_programming_from_first_principles/15_12.hs | mit | 1,209 | 2 | 11 | 274 | 525 | 276 | 249 | 31 | 1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Signal.Command ( Command
, CommandPolicy(..)
, newCommand
, canExecute
, executing
, execute
, values
... | jspahrsummers/RxHaskell | Signal/Command.hs | mit | 7,616 | 0 | 19 | 2,567 | 1,627 | 826 | 801 | 147 | 3 |
-- |
-- Module : Copernicus
-- Description : Contains the core of the Copernicus project
-- Copyright : (c) Jonatan H Sundqvist, 2015
-- License : MIT
-- Maintainer : Jonatan H Sundqvist
-- Stability : experimental
-- Portability : POSIX (not sure)
--
-- Jonatan H Sundqvist
-- November 25 2014
--
-- TOD... | SwiftsNamesake/Copernicus | Copernicus.hs | mit | 3,620 | 2 | 14 | 698 | 630 | 358 | 272 | 20 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE ScopedTypeVariables #-}
--------------------------------------------------------------------------------
-- File : Parser
-- Author : Alejandro Gómez Londoño
-- Date : Tue Sep 30 20:21:25 2014
-- Description : An small command line parser for monadbox
--------------------... | agomezl/MonadBox | src/MonadBox/Parser.hs | mit | 1,861 | 0 | 13 | 411 | 523 | 269 | 254 | 55 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
generate various apply functions for the RTS, for speeding up
function application in the most common cases. The code is generated
because it contains lots of repeating patterns, and to make it more
flexible when changing the RTS (for example how arguments are passed)
... | ghcjs/ghcjs | src/Gen2/RtsApply.hs | mit | 27,811 | 0 | 39 | 11,511 | 8,962 | 4,585 | 4,377 | 514 | 2 |
data Point = Point Float Float deriving (Show)
data Shape = Circle Point Float | Rectangle Point Point deriving(Show)
surface::Shape->Float
surface (Circle _ r) = pi * r ^ 2
surface (Rectangle (Point x1 y1) (Point x2 y2)) = abs (x2 - x1) * abs (y2 - y1)
| srijanshetty/haskell-sample | Shape.hs | gpl-2.0 | 257 | 0 | 9 | 51 | 133 | 69 | 64 | 5 | 1 |
{-# LANGUAGE RecordWildCards, DeriveDataTypeable, FlexibleInstances #-}
{-|
Account balance history report.
-}
module Hledger.Reports.BalanceHistoryReport (
accountBalanceHistory
-- -- * Tests
-- tests_Hledger_Reports_BalanceReport
)
where
import Data.Time.Calendar
-- import Test.HUnit
import Hledger.Data
i... | kmels/hledger | hledger-lib/Hledger/Reports/BalanceHistoryReport.hs | gpl-3.0 | 973 | 0 | 10 | 143 | 192 | 115 | 77 | 14 | 3 |
module Html.Url where
import Text.Blaze
import Data.String
import Data.List
-- | These are all the urls our RESTish server supports. Type-safe urls are
-- cool.
data Url = UrlHome
| UrlUploadFile
| UrlUploadTarball
| UrlCopyFile
| UrlCopyFolder
| UrlBucketList
| U... | schell/pusher | src/Html/Url.hs | gpl-3.0 | 2,916 | 0 | 13 | 901 | 887 | 483 | 404 | 74 | 3 |
{-# LANGUAGE GADTs, RankNTypes #-}
module Text.Derp
( -- * Data Types
Parser, Token(..)
, -- * Parser construction
(<|>), (<~>), (==>), nul, ter, terM, terPrim, eps, emp
, -- * Parser computation steps
derive, compact, parseNull
, -- * Full parsing and result extraction
defaultCompactSteps, com... | haslab/SecreC | src/Text/Derp.hs | gpl-3.0 | 21,859 | 0 | 21 | 5,820 | 9,270 | 4,728 | 4,542 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnSampledReports/List.hs | mpl-2.0 | 5,700 | 0 | 20 | 1,340 | 677 | 395 | 282 | 110 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudprivatecatalogproducer/gen/Network/Google/Resource/CloudPrivateCatalogProducer/Operations/List.hs | mpl-2.0 | 6,749 | 0 | 19 | 1,534 | 979 | 571 | 408 | 130 | 1 |
{-# OPTIONS_GHC -Wall -Werror #-}
module ChapterExercises_6 where
import Text.Trifecta
import Data.Word
import ParseTestCaseHelpers
import Data.Bits
newtype Octet = Octet Word8
deriving (Eq, Show)
newtype IPAddress = IPAddress Word32
deriving (Eq, Ord)
instance Show IPAddress where
show (IPAddress w32) =
... | dmp1ce/Haskell-Programming-Exercises | Chapter 24/src/ChapterExercises_6.hs | unlicense | 1,612 | 0 | 17 | 369 | 569 | 282 | 287 | 46 | 2 |
module Sandbox.RedAndBlueDice where
import Data.List (permutations, tails)
import Helpers.Records (allMax, allMin, countMax, countMin, maxIndices)
-- https://math.stackexchange.com/questions/3035452/error-in-solution-of-peter-winkler-red-and-blue-dice-puzzle
-- On permutations
equalSumRootedStrings :: [Int] -> [Int] -... | peterokagey/haskellOEIS | src/Sandbox/OpenishProblems/Problem89.hs | apache-2.0 | 2,494 | 0 | 10 | 426 | 610 | 318 | 292 | 25 | 4 |
{- © Utrecht University (Department of Information and Computing Sciences) -}
module Domain.Scenarios.Exercises where
import Data.Maybe(fromMaybe)
import Ideas.Common.Library
import Ideas.Encoding.Encoder
import Domain.Scenarios.Strategy(makeStrategy)
import Domain.Scenarios.Scenario
import Domain.Scenarios.Scenari... | UURAGE/ScenarioReasoner | src/Domain/Scenarios/Exercises.hs | apache-2.0 | 1,606 | 0 | 11 | 371 | 351 | 202 | 149 | 30 | 1 |
module Graham.A278817Spec (main, spec) where
import Test.Hspec
import Graham.A278817 (a278817)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A278817" $
it "correctly computes the first 20 elements" $
take 20 (map a278817 [0..]) `shouldBe` expectedValue where
expectedValue = [1,1,3,2,1,5,2,... | peterokagey/haskellOEIS | test/Graham/A278817Spec.hs | apache-2.0 | 347 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE OverloadedStrings #-}
module Ghissue (
IssueRange(Issue, InclusiveRange),
Config(..),
Command(..),
allIssues,
contains,
failOnLeft,
issuesReadM,
listContains,
readConfig,
toAction,
urlForIssue
) where
import Data.Char(isSpace)
import Data.L... | johnynek/ghissue | src/Ghissue.hs | apache-2.0 | 4,834 | 0 | 19 | 1,337 | 1,412 | 733 | 679 | 106 | 4 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( withBottleStory
, withDevelAppPort
) where
import Foundation
import Settings
import Yesod.Static
import Yesod.Auth
import Yesod.Default.Config
import Yesod... | konn/BottleStory | Application.hs | bsd-2-clause | 1,682 | 0 | 14 | 270 | 281 | 158 | 123 | 30 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
--------------------------------------------------------------------
-- |
-- Copyright : (c) Edward Kmett and Dan Doel 2012-2013
-- License : BSD3
-- Maintainer: Edward Kmett <ekmett@gmail.com>
-- Stability : experimental
-- Portability: non-porta... | ekmett/ermine | src/Ermine/Syntax/Literal.hs | bsd-2-clause | 2,204 | 0 | 12 | 446 | 615 | 321 | 294 | 72 | 0 |
import System.ExceptionMailer
-- For some reason this example only works when compiled, not when intepreted
main = do
setupExceptionMailer (mkAddress "My Program" "noreply@example.com")
(mkAddress "Sysadmin" "sysadmin@example.com")
-- Unexpected runtime error
let badList = [] :: ... | drpowell/exception-mailer | example/example.hs | bsd-2-clause | 352 | 0 | 10 | 85 | 64 | 32 | 32 | 6 | 1 |
module Token (new) where
import qualified Data.Text as T
import System.Random (randomRs)
import System.Random.TF (newTFGen)
tokenLength :: Int
tokenLength = 128
new :: IO T.Text
new = T.pack . take tokenLength . randomRs ('A', 'Z') <$> newTFGen
| ktvoelker/auth-proxy | src/Token.hs | bsd-3-clause | 250 | 0 | 8 | 42 | 89 | 52 | 37 | 8 | 1 |
-- | See "Control.Monad.Ether.State".
module Control.Monad.Ether.Implicit.State
( module Control.Monad.Ether.Implicit.State.Lazy
) where
import Control.Monad.Ether.Implicit.State.Lazy
| bitemyapp/ether | src/Control/Monad/Ether/Implicit/State.hs | bsd-3-clause | 195 | 0 | 5 | 23 | 31 | 24 | 7 | 3 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Language.Pylon.Util.Subst
-- Copyright : Lukas Heidemann 2014
-- License : BSD
--
-- Maintainer : lukasheidemann@gmail.com
-- Stability : experimental
-- Portability : semi-portable
----------------------... | zrho/pylon | src/Language/Pylon/Util/Subst.hs | bsd-3-clause | 1,326 | 0 | 12 | 247 | 329 | 176 | 153 | 19 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module DocSource
( runTDSource
, TfIdfCollection
, DocumentsInfo (..)
) where
import Control.Lens ((.=))
import Control.Monad (mapM, unless)
import qualified Data.Map as M
import Data.Tex... | flyingleafe/itmo-ctd-se-coursework | src/DocSource.hs | bsd-3-clause | 2,213 | 0 | 14 | 629 | 618 | 338 | 280 | -1 | -1 |
module Normalization where
import Expression
normalize :: Exp -> Exp
normalize (ESub exp (ENum a)) = EAdd (ENum $ -a) $ normalize exp
normalize (EDiv exp (ENum a)) = if ((expWeight $ normalize exp) > expWeight (ENum a))
then EMul (ENum $ 1/a) $ normalize exp
... | sule45/FP2016 | src/Normalization.hs | bsd-3-clause | 2,262 | 4 | 10 | 464 | 1,003 | 507 | 496 | 38 | 4 |
module AST where
import qualified Data.Map as Map
import Atom
data Expression
= Variable !VariableName
| AttributeAccess !Expression !PropertyName
| MethodInvocation !Expression !MethodName ![ Expression ]
| Object !ClassName ![ Expression ]
| Coercion !ClassName !Expression
deriving ( Show, Ord, Eq )
t... | triplepointfive/Youtan | examples/FJ/AST.hs | bsd-3-clause | 1,259 | 0 | 12 | 328 | 255 | 144 | 111 | 77 | 0 |
{-# LANGUAGE CPP, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,
GeneralizedNewtypeDeriving, IncoherentInstances, OverlappingInstances,
OverloadedStrings, UndecidableInstances, ViewPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
#ifdef GENERICS
{-# LANGUAGE DefaultSignatures #-}
#endif
-- |
-- Mo... | lpsmith/aeson | Data/Aeson/Types/Instances.hs | bsd-3-clause | 27,716 | 0 | 21 | 7,863 | 7,613 | 4,010 | 3,603 | 586 | 6 |
module Evaluator.Evaluate (normalise, step) where
import Evaluator.Deeds
import Evaluator.FreeVars
--import Evaluator.Residualise
import Evaluator.Syntax
import Core.Prelude (falseDataCon, trueDataCon)
import Core.Renaming
import Core.Syntax
import Renaming
import StaticFlags
import Utilities
import Data.List (unco... | osa1/chsc | Evaluator/Evaluate.hs | bsd-3-clause | 13,355 | 0 | 24 | 3,942 | 3,727 | 1,961 | 1,766 | -1 | -1 |
module Main where
import Language.KansasLava
import Data.List as L
import Data.Char as C
import System.Environment
-- parse a line of values, into a
parseline :: [Type] -> String -> [[Char]]
parseline [] [] = []
parseline (B:ns) (x:xs) = [ toVCDBit x ] : parseline ns xs
parseline (S n:ns) xs = ( "b" ++ map... | andygill/kansas-lava | tools/Bits2VCD.hs | bsd-3-clause | 4,055 | 52 | 20 | 943 | 2,127 | 1,119 | 1,008 | 99 | 3 |
module Main (main) where
import qualified Types.BotTypes as BT
import Control.Monad (forever)
import Data.Char (toLower)
import Data.Random (sample)
import Data.Random.Extras (choice)
import System.Environment (getArgs)
import System.IO (stdout, stdin, hSetBuffering, BufferMode(..))
import Text.Regex.PCRE ((=~))
impor... | bus000/Dikunt | plugins/Policeman/Main.hs | bsd-3-clause | 2,025 | 0 | 14 | 471 | 613 | 349 | 264 | 64 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE Impred... | haskell-distributed/distributed-process-execution | src/Control/Distributed/Process/Execution/EventManager.hs | bsd-3-clause | 5,131 | 0 | 15 | 1,072 | 889 | 492 | 397 | 88 | 2 |
{-# LANGUAGE TemplateHaskell, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-}
module Text.MPretty.StateSpace where
import Data.List
import System.Console.ANSI
import Data.Monoid
import Data.Text.Lazy (Text)
import qualified Data.Text.Lazy as T
import Util.ConsoleState
import Data.Lens.Template
impo... | davdar/mpretty | Text/MPretty/StateSpace.hs | bsd-3-clause | 3,230 | 0 | 10 | 625 | 883 | 510 | 373 | 100 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module RealWorld.Model.Password
( Password(..), PasswordHash
, computeHash, verify
) where
import RealWorld.Prelude
import qualified Crypto.PasswordStore as PasswordStore
import Data.SafeCopy (base, deriveSa... | zudov/servant-realworld-example-app | src/RealWorld/Model/Password.hs | bsd-3-clause | 899 | 0 | 12 | 158 | 232 | 128 | 104 | 23 | 1 |
{-# LANGUAGE PackageImports #-}
module Mire.Data.Autocomplete (
Autocompletion (..),
AutocompleteDB,
newAutocompleteDB,
newAutocompleteDBFromList,
tryAutocomplete,
addAutocomplete,
addSplitAutocomplete,
useAutocomplete
) where
import Mire.Prelude
import Data.Char
import qualified "bytestrin... | ellej/mire | src/Mire/Data/Autocomplete.hs | bsd-3-clause | 3,497 | 0 | 12 | 624 | 918 | 506 | 412 | 66 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Applicative
import Control.Lens
import Data.ByteString (ByteString)
import qualified Data.Text as T
import Heist
... | dmjio/snaplet-auth-acid | examples/site/src/Main.hs | bsd-3-clause | 3,217 | 0 | 12 | 747 | 684 | 364 | 320 | 56 | 1 |
module Rumpus.Systems.Synth
( module Rumpus.Systems.Synth
, module Sound.Pd
) where
import PreludeExtra
import Sound.Pd
import Rumpus.Systems.Shared
import Rumpus.Systems.Scene
import Rumpus.Systems.Controls
import Data.Vector.Storable (Vector)
import qualified Data.Vector.Storable as V
type DACChannel =... | lukexi/rumpus | src/Rumpus/Systems/Synth.hs | bsd-3-clause | 11,087 | 0 | 22 | 2,918 | 2,639 | 1,301 | 1,338 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
module Math.Budget.Lens.AssociationsL where
import Math.Budget.Types
class AssociationsL cat target | target -> cat where
associationsL :: cat target Associations
| tonymorris/hbudget | src/Math/Budget/Lens/AssociationsL.hs | bsd-3-clause | 231 | 0 | 7 | 29 | 42 | 25 | 17 | 5 | 0 |
{-# LANGUAGE KindSignatures #-}
module Value where
data PrimValue
= IntV Int
| BoolV Bool
deriving (Eq, Show)
data Value ref
= PV PrimValue
| RefV ref
instance Show (Value ref) where
show (PV v) = show v
show _ = "ref"
isPVEq :: Value ref -> PrimValue -> Bool
isPVEq (PV v) w = v == w
isPVEq _ _ = Fals... | NogikuchiKBYS/hsit-sandbox | src/Value.hs | bsd-3-clause | 665 | 0 | 9 | 186 | 246 | 126 | 120 | 30 | 1 |
module Turbinado.View.Helpers.Tags (
anchorTag
) where
import Turbinado.View
anchorTag :: String -> String -> View XML
anchorTag l t = <a href=l><% t %></a>
| abuiles/turbinado-blog | Turbinado/View/Helpers/Tags.hs | bsd-3-clause | 166 | 4 | 8 | 33 | 62 | 34 | 28 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Pipe
module Haskus.System.Linux.Pipe
( createPipe
)
where
import Haskus.System.Linux.ErrorCode
import Haskus.System.Linux.Handle
import Haskus.System.Linux.Syscalls
import Haskus.Format.Binary.Ptr
import Hasku... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Linux/Pipe.hs | bsd-3-clause | 673 | 0 | 14 | 119 | 176 | 102 | 74 | 17 | 1 |
{-|
Module : Idris.ElabDecls
Description : Code to elaborate declarations.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE DeriveFunctor, FlexibleInstances, MultiParamTypeClasses,
PatternGuards #-}
module Idris.ElabDecls(elabDecl, elabDecl', elabDecls, elabMain, e... | uuhan/Idris-dev | src/Idris/ElabDecls.hs | bsd-3-clause | 12,921 | 183 | 17 | 4,355 | 3,073 | 1,744 | 1,329 | 239 | 12 |
module Network.HTTP.Types.Header.AsHttp
( module Network.HTTP.Types.Header.AsHttp
) where
-- generated by https://github.com/rvion/ride/tree/master/jetpack-gen
import qualified Network.HTTP.Types.Header as I
| rvion/ride | jetpack/src/Network/HTTP/Types/Header/AsHttp.hs | bsd-3-clause | 214 | 0 | 5 | 22 | 31 | 24 | 7 | 3 | 0 |
-- Typeclassopedia - Sec. 3.2, Exercise 3.
--
-- Original author: David Banas <capn.freako@gmail.com>
-- Original date: September 20, 2015
--
-- Copyright (c) 2015 David Banas; all rights reserved World wide.
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Monad (unless)
import System.Exit (exitF... | capn-freako/Haskell_Misc | Typeclassopedia/ex_3.2.3.hs | bsd-3-clause | 1,580 | 29 | 8 | 327 | 452 | 247 | 205 | 31 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
-- | This module contains the code for serializing Haskell values
-- into SMTLIB2 format, that is, the instances for the @SMTLIB2@
-- typeclass. We split it into a... | gridaphobe/liquid-fixpoint | src/Language/Fixpoint/Smt/Serialize.hs | bsd-3-clause | 5,605 | 0 | 11 | 1,910 | 1,669 | 839 | 830 | 102 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilies #-}
module Data.Hexagon.Types
( -- * HexCoordinates
HexCoordinate (..)
... | alios/hexagon | src/Data/Hexagon/Types.hs | bsd-3-clause | 8,592 | 9 | 20 | 2,110 | 3,416 | 1,891 | 1,525 | 193 | 2 |
{-# LANGUAGE
OverloadedStrings
, FlexibleContexts
, ScopedTypeVariables
#-}
{- |
Module : Routes
Copyright : (c) 2015 Athan L. Clark
License : BSD-3
Stability : experimental
Portability : GHC
This module enumerates the possible routes that the application can match against.
In the @routes@ term... | athanclark/contact-logger | src/Routes.hs | bsd-3-clause | 8,654 | 0 | 21 | 2,021 | 1,935 | 949 | 986 | 172 | 10 |
import qualified Data.Map as Map
import qualified Protein as P
-- | Given a protein string P of length at most 1000 aa,
-- return the total weight of P. Consult the monoisotopic mass table.
--
-- >>> SKADYEK
-- 821.392
prtm :: Foldable t => t Char -> Double
prtm s =
let weight = (\prot -> Map.lookup (read [prot]) P... | mitochon/hoosalind | src/problems/prtm.hs | mit | 480 | 0 | 14 | 106 | 145 | 79 | 66 | 10 | 1 |
module CO4.Example.LoopSrs.Standalone where
import Data.List (tails)
-- * string rewriting:
type Symbol = [ Bool ]
type Word = [ Symbol ]
type Rule = ( Word , Word )
type SRS = [ Rule ]
-- * top level constraint
data Looping_Derivation = Looping_Derivation Word [Step] Word
constraint :: SRS -> Looping_Derivation... | apunktbau/co4 | test/CO4/Example/LoopSrs/Standalone.hs | gpl-3.0 | 2,067 | 0 | 14 | 608 | 811 | 424 | 387 | 57 | 4 |
-- | Implicit methods for CouchDB documents.
--
-- All implicit methods needs parser or encoder.
module Database.CouchDB.Conduit.Implicit (
-- * Accessing documents
couchGet,
-- * Manipulating documents
couchPut,
couchPut_,
couchPut',
) where
import qualified Data.Aeson as A
i... | akaspin/couchdb-conduit | src/Database/CouchDB/Conduit/Implicit.hs | bsd-2-clause | 2,462 | 0 | 12 | 872 | 441 | 260 | 181 | 44 | 1 |
-- |
-- Module : Data.Memory.ExtendedWords
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- Extra Word size
--
module Data.Memory.ExtendedWords
( Word128(..)
) where
import Data.Word (Word64)
-- | A simple Extende... | NicolasDP/hs-memory | Data/Memory/ExtendedWords.hs | bsd-3-clause | 410 | 0 | 7 | 80 | 60 | 39 | 21 | 8 | 0 |
module DBus.UDisks2
( Connection
, connect
, disconnect
, withConnection
, Event(..)
, nextEvent
) where
import DBus.UDisks2.Internal
| rootzlevel/device-manager | lib/DBus/UDisks2.hs | bsd-3-clause | 184 | 0 | 5 | 68 | 36 | 24 | 12 | 8 | 0 |
-- Implements the \"@.\/cabal sdist@\" command, which creates a source
-- distribution for this package. That is, packs up the source code
-- into a tarball, making use of the corresponding Cabal module.
module Distribution.Client.SrcDist (
sdist
) where
import Distribution.Client.SetupWrapper
( ... | hackern/ghc-7.8.3 | libraries/Cabal/cabal-install/Distribution/Client/SrcDist.hs | bsd-3-clause | 6,328 | 0 | 19 | 1,462 | 1,230 | 668 | 562 | 98 | 7 |
-- Copyright : Isaac Jones 2003-2004
{- All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | darthdeus/ghc-mod-ng | Language/Haskell/GhcMod/Cabal18.hs | bsd-3-clause | 2,328 | 0 | 10 | 407 | 159 | 101 | 58 | 18 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
module Keter.Types.V10 where
import Control.Applicative ((<$>), (<*>), (<|>))
import Data.Aeson ... | telser/keter | Keter/Types/V10.hs | mit | 17,737 | 0 | 31 | 5,518 | 4,423 | 2,320 | 2,103 | 477 | 2 |
module SubSubPatternIn1 where
f :: [Int] -> Int
f ((x : (y : ys@[]))) = x + y
f ((x : (y : ys@(b_1 : b_2)))) = x + y
f ((x : (y : ys))) = x + y
| kmate/HaRe | old/testing/subIntroPattern/SubSubPatternIn1AST.hs | bsd-3-clause | 147 | 0 | 13 | 43 | 118 | 67 | 51 | 5 | 1 |
{- |
Module : XMonad.Actions.Launcher
Copyright : (C) 2012 Carlos López-Camey
License : None; public domain
Maintainer : <c.lopez@kmels.net>
Stability : unstable
A set of prompts for XMonad
-}
module XMonad.Actions.Launcher(
-- * Description and use
-- $description
defaultLauncherModes
, E... | pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Actions/Launcher.hs | bsd-2-clause | 4,689 | 1 | 18 | 1,013 | 707 | 377 | 330 | 51 | 1 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable #-}
-- |
-- Module : Data.Text.Lazy.Internal
-- Copyright : (c) 2013 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC
--
-- This module has been renamed to 'Data.Text.Internal.Lazy'.... | bgamari/text | src/Data/Text/Lazy/Internal.hs | bsd-2-clause | 572 | 0 | 5 | 107 | 38 | 31 | 7 | 6 | 0 |
import FizzBuzz
main = do
putStrLn "Test for FizzBuzz: "
let result = fizzbuzzTest
putStrLn $ "Test: " ++ (succesornot result)
where succesornot = (\x -> if x then "Succeeded!" else "Failed")
fizzbuzzTest :: Bool
fizzbuzzTest = fizzbuzz [1..100] == ["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Bu... | warreee/Algorithm-Implementations | FizzBuzz/Haskell/FizzBuzzTest.hs | mit | 885 | 0 | 9 | 62 | 386 | 245 | 141 | 8 | 2 |
-- test conversion of funny numbers through Rational (#3676)
main = mapM_ putStrLn $ concat $
[--map (show.d2d) doubles1,
-- map (show.d2f) doubles1,
map (show.d2r) doubles1,
-- map (show.f2d) floats1,
-- map (show.f2f) floats1,
map (show.f2r) floats1,
-- map (show.d2d) doubles2,
-- map (show.d2f) do... | k-bx/ghcjs | test/ghc/numeric/t3676.hs | mit | 907 | 0 | 9 | 183 | 306 | 179 | 127 | 19 | 1 |
{-# LANGUAGE RankNTypes #-}
module ShouldSucceed where
data SeqView t a = Null
| Cons a (t a)
class PriorityQueue q where
empty :: (Ord a) => q a
single :: (Ord a) => a -> q a
insert :: (Ord a) =>... | olsner/ghc | testsuite/tests/typecheck/should_compile/tc087.hs | bsd-3-clause | 1,127 | 0 | 11 | 544 | 428 | 214 | 214 | 24 | 2 |
{-# LANGUAGE TypeFamilies, GADTs, RankNTypes, ScopedTypeVariables #-}
module ShouldFail where
type family Const a
type instance Const a = ()
data T a where T :: c -> T (Const c)
coerce :: forall a b . a -> b
coerce x = case T x :: T (Const b) of
T y -> y
{-
T :: forall a. forall c. (a ~ Const c) => ... | urbanslug/ghc | testsuite/tests/indexed-types/should_fail/GADTwrong1.hs | bsd-3-clause | 678 | 0 | 9 | 208 | 98 | 55 | 43 | 8 | 1 |
{-|
Module : PostgREST.Config
Description : Manages PostgREST configuration options.
This module provides a helper function to read the command line arguments using the optparse-applicative
and the AppConfig type to store them.
It also can be used to define other middleware configuration that may be delegated to ... | league/postgrest | src/PostgREST/Config.hs | mit | 4,554 | 0 | 18 | 1,239 | 884 | 471 | 413 | 69 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module ColorSpec (spec) where
import Color
import Linear
import Test.Hspec
import Test.QuickCheck
inRange :: Float -> Bool
inRange x = 0 <= x && x <= 1
clamp0To1 :: Gen Float
clamp0To1 = arbitrary `suchThat` inRange
instance Arbitrary (RGB ... | tcsavage/color | tests/ColorSpec.hs | mit | 771 | 0 | 16 | 210 | 249 | 130 | 119 | 23 | 1 |
{-# htermination filterFM :: (Bool -> b -> Bool) -> FiniteMap Bool b -> FiniteMap Bool b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_filterFM_8.hs | mit | 110 | 0 | 3 | 20 | 5 | 3 | 2 | 1 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.