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 DL3055 (tests) where
import qualified Data.Map as Map
import qualified Hadolint.Process
import qualified Hadolint.Rule as Rule
import Helpers
import Test.Hspec
tests :: SpecWith ()
tests = do
let ?rulesConfig = Hadolint.Process.RulesConfig [] (Map.fromList [("githash", Rule.GitHash)]) False
describe "DL30... | lukasmartinelli/hadolint | test/DL3055.hs | gpl-3.0 | 1,143 | 0 | 15 | 195 | 208 | 100 | 108 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Locations/Clusters/SetLocations.hs | mpl-2.0 | 6,230 | 0 | 16 | 1,257 | 783 | 459 | 324 | 120 | 1 |
-- This file is part of purebred
-- Copyright (C) 2018-2021 Róman Joost and Fraser Tweedale
--
-- 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/UI/Status/Main.hs | agpl-3.0 | 6,755 | 0 | 16 | 1,380 | 1,853 | 965 | 888 | 115 | 18 |
module Libaddutil.Entity
where
import Libaddutil.Vector
class Eq a => Entital a where
getEntity :: a -> Entity
data Entity = Entity { location :: Vector3
, velocity :: Vector3
, acceleration :: Vector3
}
deriving (Eq, Show, Read)
setEnti... | anttisalonen/freekick | haskell/addutil/Libaddutil/Entity.hs | agpl-3.0 | 1,331 | 0 | 11 | 316 | 467 | 258 | 209 | 28 | 1 |
{-# OPTIONS_GHC -F -pgmF ./scripts/local-htfpp #-}
module Repeat (repeatMain) where
import Test.Framework
import Data.IORef
import System.IO.Unsafe
globalBool :: IORef Bool
globalBool = unsafePerformIO (newIORef True)
{-# NOINLINE globalBool #-}
readGlobalBool :: IO Bool
readGlobalBool =
do b <- readIORef glob... | skogsbaer/HTF | tests/real-bbt/Repeat.hs | lgpl-2.1 | 516 | 0 | 8 | 95 | 119 | 60 | 59 | 17 | 1 |
module HEP.Jet.FastJet.Class.Selector where
| wavewave/HFastJet | oldsrc/HEP/Jet/FastJet/Class/Selector.hs | lgpl-2.1 | 45 | 0 | 3 | 4 | 9 | 7 | 2 | 1 | 0 |
module Lupo.Site
( lupoInit
) where
import qualified Database.HDBC as DB
import qualified Database.HDBC.Sqlite3 as Sqlite3
import qualified Heist.Interpreted as H
import Prelude hiding (filter)
import Snap
import qualified Snap.Snaplet.Heist as H
import qualified Snap.Snaplet.Session.Backends.CookieSession as Cook... | keitax/lupo | src/Lupo/Site.hs | lgpl-3.0 | 2,616 | 0 | 15 | 448 | 713 | 417 | 296 | 63 | 1 |
{-# LANGUAGE ConstraintKinds #-}
-- TODO: Maybe use TVar instead of IORef to allow concurrency ?
module Link
( Link
, Linkable
, Context
, initContext
, saveContext
, defaultLink
, invalidLink
, createLink
, destroyLink
, restoreLink
, readLink
, writeLink
... | nitrix/lspace | legacy/Link.hs | unlicense | 10,466 | 0 | 24 | 3,375 | 2,422 | 1,193 | 1,229 | 182 | 5 |
{-# LANGUAGE TemplateHaskell #-}
module Main where
import qualified Data.FormulaTest
import Test.Tasty
import Test.Tasty.TH
main :: IO ()
main = $(defaultMainGenerator)
test_all :: [TestTree]
test_all =
[ Data.FormulaTest.tests
]
| jokusi/mso | test/mso-test.hs | apache-2.0 | 238 | 0 | 6 | 37 | 60 | 37 | 23 | 10 | 1 |
module ParserSpec(spec) where
import Text.Parsec
import ParserSupport
import Parser
import Syntax
import Test.Hspec
spec :: Spec
spec = do
describe "The common parser" $ do
it "Should pick standard expressions" $ do
let Right (Expression (Standard body) _ _) = parseExpression "{ evendistr 1 1 }"
bod... | eigengo/hwsexp | core/test/ParserSpec.hs | apache-2.0 | 1,629 | 0 | 23 | 412 | 535 | 248 | 287 | 36 | 1 |
module Syntax where
import Control.Monad.Error
import Text.ParserCombinators.Parsec hiding (spaces)
data LispVal = Atom String
| List [LispVal]
| DottedList [LispVal] LispVal
| Number Double
| String String
| Bool Bool
data LispError = NumArgs Integer [Lisp... | sys1yagi/scheme-haskell-llvm | Syntax.hs | apache-2.0 | 570 | 0 | 7 | 212 | 116 | 70 | 46 | 16 | 0 |
import Lift
main = do
putStrLn "What lift?"
-- lift <- getLine
let lift = "squat"
putStrLn "How many sets?"
-- sets <- getLine
let sets = "5"
putStrLn "Input the weight"
-- weight <- getLine
let weight = "255"
putStrLn "Input the reps"
--reps <- getLine
let reps = "5"
... | parsonsmatt/hlift | Main.hs | apache-2.0 | 571 | 0 | 14 | 169 | 181 | 80 | 101 | 17 | 1 |
-- 14316
import Data.Array((!), bounds, listArray)
import Data.List(group)
import Euler(intSqrt, primeFactorsP, primeSieve)
nn = 1000000
primes = primeSieve (intSqrt nn)
buildNext n = listArray (2,n) [divFunction x | x <- [2..n]]
divFunction n = product [sum [p^ai | ai <- [0..a]] | (a,p) <- xs] - n
where ds = pr... | higgsd/euler | hs/95.hs | bsd-2-clause | 917 | 0 | 12 | 262 | 434 | 226 | 208 | 21 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | A pedestrian implementation of a directed acyclic graph. Sharing is
-- explicitely represented by using node-level and edge-level identifi... | kawu/pedestrian-dag | src/Data/DAG.hs | bsd-2-clause | 19,908 | 0 | 21 | 4,703 | 4,588 | 2,462 | 2,126 | 337 | 3 |
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, FlexibleInstances, GADTs,
ConstraintKinds, TypeOperators, DataKinds, UndecidableInstances #-}
module Control.Coeffect.Coreader where
import Control.Coeffect
import Data.Type.Map
import GHC.TypeLits
{-| Provides 'reader monad'-like behaviour but as a como... | dorchard/effect-monad | src/Control/Coeffect/Coreader.hs | bsd-2-clause | 1,135 | 0 | 13 | 276 | 394 | 214 | 180 | 20 | 1 |
import Data.Array
kmp_table :: String -> Array Int Int
kmp_table (_ : []) = array (0, 0) [(0, -1)]
kmp_table (_ : _ : []) = array (0, 1) (zip [1 ..] [-1, 0])
kmp_table w = t
where
wl = length w
warr = array (0, wl - 1) (zip [0 ..] w)
tl = (zip [0 ..] (-1 : 0 : (kmp 2 0)))
t = array ... | pbl64k/HackerRank-Contests | 2014-03-21-FP/SubstringSearching/ss.accepted.hs | bsd-2-clause | 1,749 | 0 | 15 | 971 | 699 | 372 | 327 | 41 | 5 |
-- | UTF-8 encode a text
--
-- Tested in this benchmark:
--
-- * Replicating a string a number of times
--
-- * UTF-8 encoding it
--
module Benchmarks.EncodeUtf8
( benchmark
) where
import Test.Tasty.Bench (Benchmark, bgroup, bench, whnf)
import qualified Data.ByteString as B
import qualified Data.ByteString.L... | bos/text | benchmarks/haskell/Benchmarks/EncodeUtf8.hs | bsd-2-clause | 946 | 0 | 11 | 207 | 247 | 148 | 99 | 17 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
-- ^ is for the Bits a => Default a instance
module HSGen.FFI where
import Aux (apToLast)
import Control.Monad (liftM2)
import qualified Data.Text as T (Text, append, concat, cons, intercalate, pack, singleton, unwords)
import Data.Bits (Bits(..... | michaeljklein/CPlug | src/HSGen/FFI.hs | bsd-3-clause | 4,801 | 0 | 13 | 1,085 | 1,151 | 637 | 514 | 57 | 1 |
module Data.NotZero(
NotZero
, getNotZero
, notZero
, notZeroElse
, notZero1
, notZeroElse1
) where
import Control.Lens(Prism', prism')
import Data.Monoid(Monoid(mappend, mempty))
import Data.Semigroup(Semigroup((<>)))
import Data.Bool(bool)
import Data.Eq(Eq((==)))
import Data.Maybe(Maybe(Just, Nothing))
import Dat... | NICTA/notzero | src/Data/NotZero.hs | bsd-3-clause | 1,091 | 0 | 12 | 248 | 479 | 266 | 213 | 56 | 1 |
{-# LANGUAGE DeriveDataTypeable
, DataKinds
, RankNTypes
, GADTs
, FlexibleContexts #-}
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
module Tests.TestTools where
import Language.Hakaru.Types.Sing
import Language.Hakaru.Parser.Parser
import Language.Hakaru.Parser.SymbolResolve (reso... | zaxtax/hakaru | haskell/Tests/TestTools.hs | bsd-3-clause | 4,683 | 0 | 15 | 1,174 | 1,424 | 737 | 687 | 131 | 4 |
module Fal.Shape ( Shape (Rectangle, Ellipse, RtTriangle, Polygon),
Radius, Side, Vertex,
square, circle, distBetween, area
) where
data Shape = Rectangle Side Side
| Ellipse Radius Radius
| RtTriangle Side Side
| Polygon [Vertex]
deri... | Tarrasch/Hong | Fal/Shape.hs | bsd-3-clause | 1,235 | 0 | 13 | 486 | 482 | 263 | 219 | 33 | 2 |
{-# LANGUAGE PatternGuards #-}
module Idris.Elab.Data(elabData) where
import Idris.AbsSyntax
import Idris.ASTUtils
import Idris.DSL
import Idris.Error
import Idris.Delaborate
import Idris.Imports
import Idris.Elab.Term
import Idris.Coverage
import Idris.DataOpts
import Idris.Providers
import Idris.Primitives
import Id... | bkoropoff/Idris-dev | src/Idris/Elab/Data.hs | bsd-3-clause | 26,097 | 0 | 22 | 8,515 | 8,941 | 4,615 | 4,326 | 438 | 41 |
-- | The Syntax is as follows :
-- "nodeName[Class(optional)]{ID(optional)} > nodeName[Class(optional)]{ID(optional)}"
-- eg : "div{id1} > h1[class]"
{-# LANGUAGE OverloadedStrings, NoMonomorphismRestriction, FlexibleContexts #-}
module HScraper.QueryParser (
parseQuery
) where
import qualified Data.Text as T
impo... | Nishant9/hScraper | HScraper/QueryParser.hs | bsd-3-clause | 1,134 | 0 | 12 | 227 | 408 | 196 | 212 | 30 | 2 |
--------------------------------------------------------------------------------
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
-- | write module implements most of the utilities of the bot
mo... | Sahil-yerawar/IRChbot | src/Write.hs | bsd-3-clause | 10,064 | 0 | 23 | 2,124 | 3,247 | 1,592 | 1,655 | 223 | 2 |
calcdigit :: (Int -> Int -> Int) -> [Int] -> [Int] -> [Int]
calcdigit _ [] [] = []
calcdigit c (m:ms) [] = m : calcdigit c ms []
calcdigit c [] (n:ns) = n : calcdigit c [] ns
calcdigit c (m:ms) (n:ns) = (c m n) : calcdigit c ms ns
sumdigit :: [Int] -> [Int] -> [Int]
sumdigit = calcdigit (+)
toDecimal :: Char -> Int
t... | mskmysht/ProjectEuler | src/Problem13.hs | bsd-3-clause | 682 | 0 | 14 | 167 | 413 | 212 | 201 | 17 | 1 |
main = print $ snd . head $ rest where
fib' = 1 : 1 : zipWith (+) fib' (tail fib')
fib = zip fib' [1 .. ]
rest = dropWhile (\(f, index) -> (length . show $ f) < 1000) fib
| foreverbell/project-euler-solutions | src/25.hs | bsd-3-clause | 184 | 0 | 13 | 55 | 101 | 55 | 46 | 4 | 1 |
-- Solution to Stanford Compilers Course.
-- (c) Copyright 2012 Michael Starzinger. All Rights Reserved.
module Main (main) where
import CoolLexer (scan)
import System.Console.GetOpt
import System.Environment (getArgs)
-- This is a description of the command line options to this program.
options :: [OptDescr ()]
opti... | mstarzinger/coolc | lexer.hs | bsd-3-clause | 841 | 6 | 14 | 150 | 234 | 125 | 109 | 16 | 2 |
{-# Language GADTs #-}
{-# Language RecordWildCards #-}
{-# Language FlexibleContexts #-}
{-# Language LambdaCase #-}
{-# Language BlockArguments #-}
{-# Language RankNTypes #-}
{-# Language TemplateHaskell #-}
{-# Language QuasiQuotes #-}
{-# Language TypeOperators #-}
{-# Language DataKinds #-}
{-# Language ViewPatte... | GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/TypeChecker.hs | bsd-3-clause | 31,814 | 0 | 21 | 7,121 | 9,342 | 4,607 | 4,735 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module IPoint (IPoint, point) where
import Graphics.Gloss (Point)
-- Integer version of Graphics.Gloss.Point, which is Float-based.
type IPoint = (Int, Int)
instance Num IPoint where
(+) (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)
(-... | kqr/pacmANN | src/IPoint.hs | bsd-3-clause | 683 | 0 | 7 | 189 | 292 | 169 | 123 | 15 | 1 |
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE PackageImports #-}
{-# OPTIONS_GHC -fno-warn-overlapping-patterns #-}
module Repr.Stringy (
showsAST, parseAST, tryParseAST
, showsType, showsScheme
) where
import Co... | pqwy/redex | src/Repr/Stringy.hs | bsd-3-clause | 5,597 | 0 | 17 | 1,693 | 2,041 | 1,072 | 969 | -1 | -1 |
-- | This modules contains short names for common ops.
-- To try and compete with numpy/matlab in shortness.
-- Although those still win the battle
-- due to their task specific syntax[sugar]..
module Data.NumKell.Aliases
( (##), hn, sa, tf, tt
) where
import Data.HList (HCons(..), HNil(..))
import Data.NumKell.... | yairchu/numkell | src/Data/NumKell/Aliases.hs | bsd-3-clause | 538 | 0 | 7 | 106 | 160 | 104 | 56 | 16 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE... | sestrella/servant-persistent | src/GitHub.hs | bsd-3-clause | 3,739 | 0 | 14 | 958 | 1,042 | 533 | 509 | 96 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Arc where
import Graphics.Blank
import Wiki -- (578,200)
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
let centerX = width context / 2;
let centerY = height context / 2;
let radius = 75;
let startingAngle = 1.1 *... | ku-fpg/blank-canvas | wiki-suite/Arc.hs | bsd-3-clause | 738 | 0 | 16 | 225 | 249 | 120 | 129 | 23 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Types.FormQuote where
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
import Control.Monad (mzero)
import Data.Aeson
import Data.Set (Set)
import qualified Data.Text as T
... | meoblast001/quotum-snap | src/Types/FormQuote.hs | mit | 1,065 | 0 | 13 | 309 | 240 | 136 | 104 | 32 | 0 |
{-# 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-cognito-identity/gen/Network/AWS/CognitoIdentity/DescribeIdentity.hs | mpl-2.0 | 3,218 | 0 | 12 | 727 | 383 | 234 | 149 | 56 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Blackbox
( tests
, haTests
, ssltests
, startTestServers
) where
----------------------------------------------... | sopvop/snap-server | test/Test/Blackbox.hs | bsd-3-clause | 26,260 | 2 | 21 | 8,766 | 5,883 | 3,033 | 2,850 | 467 | 4 |
-- | standalone solver
-- command line arguments:
-- depth, width, instance
module Main where
import PCProblem.Family
import PCProblem.Param
import System
import IO
main = runit
$ Param { alpha = "0123"
, paare = 4
, breite = 6
, nah = 0
, fern = 100
, viel = 10000
}
| florianpilz/autotool | src/PCP.hs | gpl-2.0 | 320 | 2 | 7 | 105 | 72 | 47 | 25 | 12 | 1 |
{-# LANGUAGE
BangPatterns
, FlexibleContexts
, FlexibleInstances
, ScopedTypeVariables
, UnboxedTuples
, UndecidableInstances
, UnicodeSyntax
#-}
strictHead ∷ G.Bitstream (Packet d) ⇒ Bitstream d → Bool
{-# RULES "head → strictHead" [1]
∀(v ∷ G.Bitstream (Packet d) ⇒ Bitstream d).
head v = st... | mpickering/ghc-exactprint | tests/examples/ghc8/UnicodeRules.hs | bsd-3-clause | 421 | 0 | 8 | 85 | 58 | 29 | 29 | 14 | 1 |
{-# LANGUAGE BangPatterns #-}
module Throughput.BlazeBuilder (
serialize
) where
import Data.Monoid
import qualified Data.ByteString.Lazy as L
import Blaze.ByteString.Builder
import Throughput.Utils
serialize :: Int -> Int -> Endian -> Int -> L.ByteString
serialize wordSize chunkSize end = toLazyByteString .
c... | meiersi/blaze-builder | benchmarks/Throughput/BlazeBuilder.hs | bsd-3-clause | 24,218 | 0 | 27 | 7,725 | 9,938 | 5,440 | 4,498 | 618 | 50 |
{-
%
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
TcGenDeriv: Generating derived instance declarations
This module is nominally ``subordinate'' to @TcDeriv@, which is the
``official'' interface to deriving-related things.
This is where we do all the grimy bindings... | siddhanathan/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | 103,666 | 0 | 19 | 32,855 | 18,402 | 9,689 | 8,713 | 1,292 | 8 |
{-# LANGUAGE RecordWildCards, ScopedTypeVariables, MultiParamTypeClasses
, DeriveDataTypeable, OverloadedStrings
, GeneralizedNewtypeDeriving, FlexibleContexts #-}
-- this module isn't finished, and there's heaps of warnings.
{-# OPTIONS_GHC -w #-}
-- |
-- Module : Yi.Frontend.Pango.Contro... | noughtmare/yi | yi-frontend-pango/src/Yi/Frontend/Pango/Control.hs | gpl-2.0 | 32,220 | 195 | 22 | 9,711 | 8,243 | 4,333 | 3,910 | 601 | 5 |
-----------------------------------------------------------------------------
{- |
Module : Data.Packed
Copyright : (c) Alberto Ruiz 2006-2010
License : GPL-style
Maintainer : Alberto Ruiz (aruiz at um dot es)
Stability : provisional
Portability : uses ffi
Types for dense 'Vector' and 'Matrix' of ... | abakst/liquidhaskell | benchmarks/hmatrix-0.15.0.1/lib/Data/Packed.hs | bsd-3-clause | 737 | 0 | 5 | 111 | 44 | 33 | 11 | 5 | 0 |
-- !! TEST OF DEFACTORISATION FOR FUNCTIONS THAT DROP
-- !! POLYMORPHIC VARIABLES
module Test where
data Boolean = FF | TT
data Pair a b = MkPair a b
data LList alpha = Nill | Conss alpha (LList alpha)
data Nat = Zero | Succ Nat
data Tree x = Leaf x | Node (Tree x) (Tree x)
data A a = MkA a (A a)
appe... | urbanslug/ghc | testsuite/tests/stranal/should_compile/ins.hs | bsd-3-clause | 736 | 0 | 10 | 243 | 298 | 154 | 144 | 17 | 2 |
module Main where
-- See Trac #5549
-- The issue here is allocating integer constants inside a loop
lcs3 :: Eq a => [a] -> [a] -> [a]
lcs3 a b = fst $ aux (a, length a) (b, length b)
where
aux (_,0) _ = ([],0)
aux _ (_,0) = ([],0)
aux (a@(ha:as),la) (b@(hb:bs), lb)
| ha == hb = let (s,n) = aux (a... | urbanslug/ghc | testsuite/tests/perf/should_run/T5549.hs | bsd-3-clause | 757 | 0 | 14 | 223 | 487 | 265 | 222 | 19 | 4 |
{-# LANGUAGE
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
UndecidableInstances,
GADTs,
FunctionalDependencies,
RankNTypes #-}
data Empty
data New e t
class Env e where
instance Env Empty where
instance Env e => Env (New e t) where
data X0 t = V0
data Succ v t = VS v t
class Env e => Var... | hbasold/Sandbox | OTTTests/DecideEquiv_.hs | mit | 4,599 | 61 | 10 | 1,618 | 1,869 | 949 | 920 | -1 | -1 |
module Log where
type Rep = Integer
type Weight = Double
type Name = String
data LogEntry = Exercise Name [(Weight, Rep)]
| RepExercise Name [Rep]
deriving (Show)
type ExerciseLog = [LogEntry]
data Workout = MondayWorkout Name ExerciseLog
| TuesdayWorkou... | ladinu/cs457 | src/Log.hs | mit | 615 | 0 | 8 | 218 | 128 | 77 | 51 | 16 | 0 |
module MacroExpander(expand) where
import System.IO
import Data.String.Utils
import Control.Monad
import Text.Regex.Posix
expand :: String -> IO String
expand program = do
let capturedMacros = program =~ "(.*) = @(.*)\\((.*)\\)" :: [[String]]
fst $ foldl
(\(acc, id:ids) (pattern:macroReturn:macroFile:macroPa... | aleksanb/hdc | src/MacroExpander.hs | mit | 1,140 | 0 | 17 | 284 | 358 | 190 | 168 | 33 | 1 |
{-|
Module : Graphics.Shine.Input
Description : Short description
Copyright : (c) Francesco Gazzetta, 2016
License : MIT
Maintainer : francygazz@gmail.com
Stability : experimental
Datatypes representing inputs.
-}
module Graphics.Shine.Input where
import Web.KeyCode
-- | The state of a button on the ke... | fgaz/shine | src/Graphics/Shine/Input.hs | mit | 1,312 | 0 | 8 | 352 | 241 | 138 | 103 | 22 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
module RWPAS.Control.Types
( SentinelAI()
, sentinelAI
, AI(..)
, AITransition
, IsAI(..)
-- * Stepping AI
, stepAI
, stepDea... | Noeda/rwpas | src/RWPAS/Control/Types.hs | mit | 2,489 | 3 | 13 | 537 | 729 | 388 | 341 | 71 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE LambdaCase #-}
module Main where
import Prelude hiding (FilePath)
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Concurrent.Async
import Control.Monad
import Data.Graph.Inductive.Graph
import Data.Graph.I... | MadSciGuys/NodeInit | Main.hs | mit | 13,422 | 0 | 18 | 3,388 | 4,008 | 2,128 | 1,880 | 394 | 10 |
{-# LANGUAGE BangPatterns, FlexibleContexts #-}
module Cmm.Register.Allocation(
allocateRegisters
, generateAllocatedx86
) where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map.Strict as ... | cirquit/hjc | src/Cmm/Register/Allocation.hs | mit | 6,897 | 0 | 19 | 2,158 | 1,596 | 833 | 763 | 126 | 4 |
{-# htermination lookupWithDefaultFM :: (Ord a, Ord k) => FiniteMap (Either a k) b -> b -> (Either a k) -> b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_lookupWithDefaultFM_10.hs | mit | 130 | 0 | 3 | 25 | 5 | 3 | 2 | 1 | 0 |
module RenderSpec (spec) where
import Test.Hspec
spec :: Spec
spec = do
describe "dummy" $ do
it "dummy" $ do
True `shouldBe` True
| rcook/hqdsl | src/spec/RenderSpec.hs | mit | 146 | 0 | 13 | 38 | 53 | 28 | 25 | 7 | 1 |
{-# LANGUAGE FlexibleInstances #-}
module Database.Design.Ampersand.Classes.ConceptStructure (ConceptStructure(..)) where
import Database.Design.Ampersand.Core.AbstractSyntaxTree
import Database.Design.Ampersand.Basics
import Data.List
import Data.Maybe
import Database.Design.Ampersand.ADL1.Expression(primitives... | 4ZP6Capstone2015/ampersand | src/Database/Design/Ampersand/Classes/ConceptStructure.hs | gpl-3.0 | 8,413 | 0 | 15 | 2,422 | 2,349 | 1,213 | 1,136 | 157 | 6 |
module Fizz.Store
( record
, budget
, spend
, save
, earn
, realize
, redo
, queryBack
, queryRange
, queryUntil
, findEntry
, loadJournal
)
where
import Fizz.Core
import Fizz.Utils
import Fizz.Log
import Data.Either
import Data.List
import Data.Time
ensureTimestam... | josuf107/Fizzckle | src/Fizz/Store.hs | gpl-3.0 | 2,276 | 0 | 11 | 492 | 852 | 437 | 415 | 69 | 1 |
{-# LANGUAGE GADTs #-}
-- | The core module of Hive.
--
-- In this module we define the constructors and combinators for the Hive process algebra and also the interpreter.
--
-- For example usage check out the "Hive.Problem.Arithmetic" module.
module Hive.Process
( Process (..)
, BasicProcess
, Predicate
, run... | chrisbloecker/Hive | src/Hive/Process.hs | gpl-3.0 | 5,280 | 0 | 12 | 1,016 | 1,220 | 637 | 583 | 67 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module View.State where
import Debug.Trace
import Control.Lens
import Middleware.Gloss.Facade (Picture)
import GameLogic
import View.Convert
import Paths_gamenumber_gloss
data ViewData = ViewData { _game :: GameData
, _windowSize :: (Int, Int) -- current window siz... | EPashkin/gamenumber-gloss | src/View/State.hs | gpl-3.0 | 4,193 | 0 | 10 | 837 | 1,254 | 653 | 601 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
module Ampersand.Graphic.Graphics
(makePicture, writePicture, Picture(..), PictureReq(..),imagePath
)where
import Ampersand.ADL1
import Ampersand.Basics
import Ampersand.Classes
import Ampersand.Graphic.ClassDiagram(ClassDiag)
imp... | AmpersandTarski/ampersand | src/Ampersand/Graphic/Graphics.hs | gpl-3.0 | 21,346 | 0 | 24 | 9,611 | 4,251 | 2,244 | 2,007 | 310 | 20 |
{-# LANGUAGE OverloadedStrings #-}
module Pretty where
import Prelude hiding ((<$>))
import Syntax
import Text.PrettyPrint.ANSI.Leijen
import System.IO (Handle)
import Data.Text (Text, unpack)
import qualified Data.Map.Strict as Map
import qualified Data.Vector as V
prettyVariable :: Variable -> Doc
prettyVariable (... | fehrenbach/rechts | app/Pretty.hs | gpl-3.0 | 4,170 | 0 | 15 | 877 | 1,962 | 957 | 1,005 | 91 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/GetHealth.hs | mpl-2.0 | 4,547 | 0 | 18 | 1,107 | 552 | 328 | 224 | 91 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module HeistUtil where
import qualified Text.XmlHtml as X
import qualified Heist.Compiled as C
import qualified Data.Text as DT
import qualified Blaze.ByteString.Builder as BB
import Heist
import Data.Scientific
-- import Data.ByteString.Builder
import Control.Monad
---------------... | rjohnsondev/haskellshop | src/HeistUtil.hs | bsd-2-clause | 1,226 | 0 | 12 | 215 | 279 | 155 | 124 | 19 | 1 |
-- solve.hs
-- a solver for Hashiwokakero puzzles
-- Copyright (C) 2013 by Harald Bögeholz
-- See LICENSE file for license information
import Hashi
import System.Environment
import Control.Monad (when)
main :: IO ()
main = do
args <- getArgs
case args of
[filename] -> do
s <-... | ctbo/hashi | solve.hs | bsd-2-clause | 953 | 0 | 19 | 318 | 229 | 109 | 120 | 19 | 4 |
module Handler.View where
import Import
import Data.Time.Clock
import Model.Epub
import Handler.Utils
import Model.PaperP
import Handler.Render
import Model.PaperMongo (getRawHtmlById)
import Text.Blaze.Html (preEscapedToHtml)
--
-- Handlers for sending / showing the paper.
--
getPaperRa :: PaperId -> Handler Typ... | hirokai/PaperServer | Handler/View.hs | bsd-2-clause | 2,420 | 0 | 17 | 452 | 544 | 265 | 279 | 50 | 2 |
{-| A module that is the implementation of the CheckerState class
for the InternalState class -}
{-# LANGUAGE FlexibleInstances #-}
module DuckTest.Internal.State.Instance where
import DuckTest.Checker
import DuckTest.Internal.Common hiding (union)
import DuckTest.Internal.State
import DuckTest.Internal.Format
i... | jrahm/DuckTest | src/DuckTest/Internal/State/Instance.hs | bsd-2-clause | 11,460 | 0 | 25 | 3,461 | 2,715 | 1,310 | 1,405 | 157 | 3 |
module Type where
newtype TypeVariable =
TV String
deriving (Eq, Ord, Show)
data Type
= TypeVariable TypeVariable
| TypeSymbol String
| TypeArrow Type
Type
| TypeProduct Type
Type
| TypeSum Type
Type
deriving (Eq, Ord, Show)
data Scheme =
Forall [TypeVariab... | jjingram/satori | src/Type.hs | bsd-3-clause | 1,005 | 0 | 10 | 341 | 378 | 206 | 172 | 46 | 7 |
module Handler.Admin where
import Import
import Control.Monad.Random
import Settings.StaticFiles
import Yesod.Form.Bootstrap3 (BootstrapFormLayout (..), renderBootstrap3,
withSmallInput)
import Yesod.Auth.HashDB (setPassword)
postRemoveUserR :: Handler Html
postRemoveUserR = do
((musr,... | konn/leport | leport-web/Handler/Admin.hs | bsd-3-clause | 2,787 | 0 | 22 | 581 | 782 | 393 | 389 | -1 | -1 |
{-
- Types.hs
- By Steven Smith
-}
module SpirV.Builder.Types where
import Control.Applicative hiding (empty)
import Control.Monad.Fix
import Data.Sequence (Seq)
import Data.Word
import SpirV.Builder.Types.Internal
import SpirV.Instructions (Id(..), Instruction)
newtype Builder a = Builder { runBuilder :: Id -> ... | stevely/hspirv | src/SpirV/Builder/Types.hs | bsd-3-clause | 2,109 | 0 | 14 | 621 | 754 | 414 | 340 | 58 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Instrument.Types
( createInstrumentPool,
Samplers,
Counters,
Instrument... | Soostone/instrument | instrument/src/Instrument/Types.hs | bsd-3-clause | 8,846 | 0 | 12 | 1,585 | 1,793 | 1,041 | 752 | 205 | 1 |
{-
(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... | urbanslug/ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | 47,873 | 0 | 24 | 15,130 | 8,377 | 4,275 | 4,102 | 550 | 21 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
module Duckling.T... | rfranek/duckling | tests/Duckling/Time/GA/Tests.hs | bsd-3-clause | 591 | 0 | 9 | 96 | 80 | 51 | 29 | 11 | 1 |
module Main
where
import Control.Concurrent
import Control.Concurrent.STM
import Control.Concurrent.STM.TSem
import Control.Monad
import System.IO
import Debug.Trace
main = do
hSetBuffering stdout NoBuffering
noMansLand <- replicateM 998 $ newTVarIO 0
t0 <- newTVarIO (1::Int)
t999 <- newTVarIO (-... | jberryman/chan-benchmarks | RetryExperiment.hs | bsd-3-clause | 3,351 | 0 | 15 | 779 | 413 | 221 | 192 | 26 | 2 |
{-# LANGUAGE OverlappingInstances,
TypeSynonymInstances,
FlexibleContexts,
UndecidableInstances #-}
{-
Flatten.hs
Joel Svensson
-}
module Obsidian.ArrowObsidian.Flatten
(Flatten,
FData,
List(Nil,Unit,Tuple,For),
toFData,
from... | svenssonjoel/ArrowObsidian | Obsidian/ArrowObsidian/Flatten.hs | bsd-3-clause | 2,827 | 0 | 10 | 699 | 1,114 | 589 | 525 | 73 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module GitHub (getVersionTags) where
import Control.Monad.Error
import Data.Aeson as Json
import qualified Data.Maybe as Maybe
import Data.Monoid ((<>))
import qualified Data.Vector as Vector
import Network.HTTP.Client
import qualified Elm.Package.N... | rtfeldman/elm-package | src/GitHub.hs | bsd-3-clause | 1,350 | 0 | 13 | 297 | 382 | 214 | 168 | 33 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
import Prelude
import Control.Applicative
import Control.Lens
import Control.Monad
import Control.Monad.IO.Class
import Criterion
import Criterion.Analysis
import Criterion.Conf... | ekmett/thyme | tests/sanity.hs | bsd-3-clause | 5,637 | 0 | 18 | 1,464 | 1,581 | 843 | 738 | 112 | 3 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Aws.ElasticTranscoder.Commands.CreateJob
( CreateJob(..)
, CreateJobResponse(..)
, createJob
, defaultJSInput
, ... | cdornan/aws-elastic-transcoder | Aws/ElasticTranscoder/Commands/CreateJob.hs | bsd-3-clause | 2,696 | 0 | 12 | 735 | 471 | 266 | 205 | 51 | 1 |
{-# language CPP #-}
-- | = Name
--
-- VK_KHR_shader_subgroup_uniform_control_flow - device extension
--
-- == VK_KHR_shader_subgroup_uniform_control_flow
--
-- [__Name String__]
-- @VK_KHR_shader_subgroup_uniform_control_flow@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number_... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_KHR_shader_subgroup_uniform_control_flow.hs | bsd-3-clause | 9,078 | 0 | 14 | 1,354 | 970 | 606 | 364 | -1 | -1 |
module HughesTest where
import Hughes
import Test.Hspec
import Test.Hspec.QuickCheck
import Data.Monoid
-- This operation is especially slow for regular lists... but
-- actually quite fast for Hughes lists if you implement them
-- right.
slowReverse :: [a] -> Hughes a
slowReverse = foldr (flip snoc) mempty
main :: ... | bitemyapp/kata | HughesTest.hs | bsd-3-clause | 1,564 | 0 | 21 | 496 | 510 | 257 | 253 | 42 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Bazaari.Types where
import Data.ByteString
import Data.CountryCodes
import Data.Fixed
import qualified Data.Text as T
import Data.Time
import Text.Email.Validate
-- getCurrentDay :: IO Day
-- getCurrentDay = getCurrentTime >>= return . utctDay
type AccessKeyId = ByteString
ty... | nlander/bazaari | src/Bazaari/Types.hs | bsd-3-clause | 11,537 | 0 | 10 | 3,875 | 2,749 | 1,558 | 1,191 | 445 | 1 |
import Test.HUnit
import Core.Partition
import Data.Word (Word8)
import Core.UTF8
import Data.List (sort)
main :: IO ()
main = do runTestTT suite
return ()
t_splitRange = "splitRange" ~: test
[
-- 1
splitRange (Range '\0' '\10') ~=? ([Range '\0' '\10'], [], [], [])
, splitRange (Range '\40' '\127... | radekm/crep | tests/UTF8.hs | bsd-3-clause | 4,836 | 0 | 13 | 1,082 | 1,856 | 1,013 | 843 | 112 | 2 |
module Distribution.RefactorSpec (main, spec) where
import Distribution.Refactor
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Instances
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "someFunction" $ do
it "should work fine" $ do
property someFunction
someFunction ::... | athanclark/cabal-utils | test/Distribution/RefactorSpec.hs | bsd-3-clause | 373 | 0 | 13 | 70 | 116 | 61 | 55 | 14 | 1 |
module Jerimum.PostgreSQL.Types.Boolean
-- * CBOR codec
( boolEncoderV0
, boolDecoderV0
, encodeBool
-- * Value constructors
, fromBool
) where
import qualified Codec.CBOR.Decoding as D
import qualified Codec.CBOR.Encoding as E
import Jerimum.PostgreSQL.Types
imp... | dgvncsz0f/nws | src/Jerimum/PostgreSQL/Types/Boolean.hs | bsd-3-clause | 693 | 0 | 7 | 151 | 154 | 92 | 62 | 19 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Subversion.Dump.Raw
( FieldMap
, Entry(..)
, readInt
, readSvnDumpRaw
) where
import Control.Applicative hiding (many)
import Control.Monad
import qualified Data.Attoparsec.Char8 as AC
import Data.Attoparsec.Com... | jwiegley/svndump | src/Subversion/Dump/Raw.hs | bsd-3-clause | 3,385 | 4 | 15 | 988 | 868 | 480 | 388 | 68 | 2 |
module LocalPrelude
( Bool(..)
, Int
, Integer
, Rational
, Float
, Double
, Char
, String
, Maybe(..)
, Either(..)
, undefined
, error
, fromInteger
, fromRational
, toRational
, Show (..)
, IO
, map
, concat
, (++)
, ($)
-- , ... | mikeizbicki/homoiconic | src/Homoiconic/Heterogeneous/LocalPrelude.hs | bsd-3-clause | 586 | 0 | 5 | 220 | 132 | 92 | 40 | 31 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
module Structure.Monadiclasses.Conquer (
Conquer(..),
Unquer(..),
Contity(..)
) where
import Structure.Function
import Structure.Unit
class Conquer f where
conquer :: f a
conquer = undefined
conquer' :: (Unit t) => (a -> t) -> f a
... | Hexirp/monadiclasses | src/Structure/Monadiclasses/Conquer.hs | bsd-3-clause | 734 | 0 | 10 | 218 | 182 | 104 | 78 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
#if MTL
{-# OPTIONS_GHC -fno-w... | YellPika/effin | src/Control/Effect/Writer.hs | bsd-3-clause | 3,202 | 0 | 11 | 735 | 942 | 504 | 438 | -1 | -1 |
{-- snippet tuples --}
a = ("Porpoise", "Grey")
b = ("Table", "Oak")
{-- /snippet tuples --}
{-- snippet data --}
data Cetacean = Cetacean String String
data Furniture = Furniture String String
c = Cetacean "Porpoise" "Grey"
d = Furniture "Table" "Oak"
{-- /snippet data --}
| binesiyu/ifl | examples/ch03/Distinction.hs | mit | 277 | 3 | 6 | 48 | 78 | 40 | 38 | 6 | 1 |
{- |
Module : $Header$
Description : abstract syntax of VSE programs and dynamic logic
Copyright : (c) C. Maeder, DFKI 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
CASL extention to VSE programs and dynamic lo... | nevrenato/HetsAlloy | VSE/As.hs | gpl-2.0 | 8,212 | 2 | 20 | 2,041 | 2,989 | 1,524 | 1,465 | 194 | 3 |
{- |
Module : $Header$
Copyright : Francisc-Nicolae Bungiu, Jacobs University Bremen
License : GPLv2 or higher, see LICENSE.txt
RDF signature and sentences
-}
module RDF.Sign where
import RDF.AS
import Common.Result
import qualified Data.Set as Set
data Sign = Sign
{ subjects :: Set.Set Term
,... | nevrenato/HetsAlloy | RDF/Sign.hs | gpl-2.0 | 1,527 | 0 | 10 | 340 | 516 | 271 | 245 | 36 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-iam/gen/Network/AWS/IAM/UpdateSigningCertificate.hs | mpl-2.0 | 4,726 | 0 | 9 | 971 | 473 | 292 | 181 | 58 | 1 |
{-# LANGUAGE BangPatterns #-}
{-| Monitoring daemon backend
This module holds implements the querying of the monitoring daemons
for dynamic utilisation data.
-}
{-
Copyright (C) 2015 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted pro... | andir/ganeti | src/Ganeti/HTools/Backend/MonD.hs | bsd-2-clause | 15,106 | 0 | 23 | 3,927 | 3,396 | 1,799 | 1,597 | 262 | 3 |
{-# OPTIONS_GHC -fno-cse #-}
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GLU.ErrorsInternal
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gma... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GLU/ErrorsInternal.hs | bsd-3-clause | 5,582 | 0 | 13 | 905 | 1,142 | 611 | 531 | 101 | 2 |
{-| Cluster information printer.
-}
{-
Copyright (C) 2012 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 version.
This ... | narurien/ganeti-ceph | src/Ganeti/HTools/Program/Hinfo.hs | gpl-2.0 | 5,789 | 0 | 17 | 1,569 | 1,339 | 694 | 645 | 117 | 2 |
-- | The definitions related to jhc core
module E.Type where
import Data.Foldable hiding(concat)
import Data.Traversable
import C.Prims
import Cmm.Number
import Doc.DocLike hiding((<$>))
import Info.Types
import Name.Id
import Name.Names
import StringTable.Atom
import Util.Gen
import qualified Info.Info as Info
{- ... | hvr/jhc | src/E/Type.hs | mit | 8,669 | 2 | 14 | 2,121 | 2,588 | 1,407 | 1,181 | 153 | 2 |
module Test11 where
f = \ x y -> x + y
| SAdams601/HaRe | old/testing/refacSlicing/Test11_TokOut.hs | bsd-3-clause | 40 | 0 | 6 | 13 | 20 | 12 | 8 | 2 | 1 |
module Case where
{- imports will be added for the PointlessP librasies -}
import PointlessP.Combinators
import PointlessP.RecursionPatterns
import PointlessP.Isomorphisms
import PointlessP.Functors
-- the hole expression will be selected for translation.
coswap = app .
(((curry
... | mpickering/HaRe | old/testing/pointwiseToPointfree/Case_TokOut.hs | bsd-3-clause | 506 | 0 | 23 | 196 | 103 | 60 | 43 | 12 | 1 |
module C2 (module D2, module C2) where
import D2 hiding (sq)
anotherFun (x:xs) = x^4 + anotherFun xs
anotherFun [] = 0
| kmate/HaRe | old/testing/liftToToplevel/C2_TokOut.hs | bsd-3-clause | 129 | 0 | 7 | 32 | 59 | 34 | 25 | 4 | 1 |
{-# LANGUAGE CPP, MagicHash, BangPatterns #-}
-- |
-- Module : Data.Text.Encoding.Utf8
-- Copyright : (c) 2008, 2009 Tom Harper,
-- (c) 2009, 2010 Bryan O'Sullivan,
-- (c) 2009 Duncan Coutts
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com, rtomharper@googlemail.com,... | ssaavedra/liquidhaskell | benchmarks/text-0.11.2.3/Data/Text/Encoding/Utf8.hs | bsd-3-clause | 4,573 | 0 | 12 | 1,490 | 1,442 | 766 | 676 | 110 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
{-# LANGUAGE ForeignFunctionInterface #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.IO
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file li... | abakst/liquidhaskell | benchmarks/base-4.5.1.0/System/IO.hs | bsd-3-clause | 25,258 | 0 | 22 | 7,049 | 2,637 | 1,611 | 1,026 | -1 | -1 |
module A2 where
import D2
import C2
import B2
main :: Tree Int ->Bool
main t = isSame (sumSquares (fringe t))
(sumSquares (B2.myFringe t)+sumSquares (C2.myFringe t))
| RefactoringTools/HaRe | old/testing/moveDefBtwMods/A2_TokOut.hs | bsd-3-clause | 185 | 0 | 11 | 45 | 79 | 41 | 38 | 7 | 1 |
module T11245 where
foo x = do
let a | Just i <- x
, odd i
= True
| Nothing <- x
= False
print x
print a
| ezyang/ghc | testsuite/tests/pmcheck/should_compile/T11245.hs | bsd-3-clause | 147 | 0 | 14 | 71 | 66 | 29 | 37 | 9 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.